iPXE
Data Fields
net80211_device_operations Struct Reference

Operations that must be implemented by an 802.11 driver. More...

#include <net80211.h>

Data Fields

int(* open )(struct net80211_device *dev)
 Open 802.11 device. More...
 
void(* close )(struct net80211_device *dev)
 Close 802.11 network device. More...
 
int(* transmit )(struct net80211_device *dev, struct io_buffer *iobuf)
 Transmit packet on 802.11 network device. More...
 
void(* poll )(struct net80211_device *dev)
 Poll for completed and received packets. More...
 
void(* irq )(struct net80211_device *dev, int enable)
 Enable or disable interrupts. More...
 
int(* config )(struct net80211_device *dev, int changed)
 Update hardware state to match 802.11 layer state. More...
 

Detailed Description

Operations that must be implemented by an 802.11 driver.

Definition at line 293 of file net80211.h.

Field Documentation

◆ open

int( * net80211_device_operations::open) (struct net80211_device *dev)

Open 802.11 device.

Parameters
dev802.11 device
Return values
rcReturn status code

This method should allocate RX I/O buffers and enable the hardware to start transmitting and receiving packets on the channels its net80211_register() call indicated it could handle. It does not need to tune the antenna to receive packets on any particular channel.

Definition at line 305 of file net80211.h.

Referenced by net80211_netdev_open().

◆ close

void( * net80211_device_operations::close) (struct net80211_device *dev)

Close 802.11 network device.

Parameters
dev802.11 device

This method should stop the flow of packets, and call net80211_tx_complete() for any packets remaining in the device's TX queue.

Definition at line 315 of file net80211.h.

Referenced by net80211_netdev_close().

◆ transmit

int( * net80211_device_operations::transmit) (struct net80211_device *dev, struct io_buffer *iobuf)

Transmit packet on 802.11 network device.

Parameters
dev802.11 device
iobufI/O buffer
Return values
rcReturn status code

This method should cause the hardware to initiate transmission of the I/O buffer, using the channel and rate most recently indicated by an appropriate call to the config callback. The 802.11 layer guarantees that said channel and rate will be the same as those currently reflected in the fields of dev.

If this method returns success, the I/O buffer remains owned by the network layer's TX queue, and the driver must eventually call net80211_tx_complete() to free the buffer whether transmission succeeded or not. If this method returns failure, it will be interpreted as "failure to enqueue buffer" and the I/O buffer will be immediately released.

This method is guaranteed to be called only when the device is open.

Definition at line 341 of file net80211.h.

Referenced by net80211_netdev_transmit().

◆ poll

void( * net80211_device_operations::poll) (struct net80211_device *dev)

Poll for completed and received packets.

Parameters
dev802.11 device

This method should cause the hardware to check for completed transmissions and received packets. Any received packets should be delivered via net80211_rx(), and completed transmissions should be indicated using net80211_tx_complete().

This method is guaranteed to be called only when the device is open.

Definition at line 357 of file net80211.h.

Referenced by net80211_netdev_poll().

◆ irq

void( * net80211_device_operations::irq) (struct net80211_device *dev, int enable)

Enable or disable interrupts.

Parameters
dev802.11 device
enableIf TRUE, interrupts should be enabled

Definition at line 364 of file net80211.h.

Referenced by net80211_netdev_irq(), and net80211_register().

◆ config

int( * net80211_device_operations::config) (struct net80211_device *dev, int changed)

Update hardware state to match 802.11 layer state.

Parameters
dev802.11 device
changedSet of flags indicating what may have changed
Return values
rcReturn status code

This method should cause the hardware state to be reinitialized from the state indicated in fields of net80211_device, in the areas indicated by bits set in changed. If the hardware is unable to do so, this method may return an appropriate error indication.

This method is guaranteed to be called only when the device is open.

Definition at line 381 of file net80211.h.

Referenced by net80211_change_channel(), net80211_filter_hw_channels(), net80211_prepare_assoc(), net80211_prepare_probe(), net80211_probe_start(), net80211_probe_step(), net80211_process_capab(), net80211_process_ie(), and net80211_set_rate_idx().


The documentation for this struct was generated from the following file: