Madwifi无线发送数据过程

来源:互联网 发布:网络连接错误651怎么办 编辑:程序博客网 时间:2024/06/13 13:42

 

数据发送过程:

 

 

 

 

 

The kernel calls ieee80211_hardstart() (dev->hard_start_xmit of the virtual interface) to transmit a packet, which in turn calls ath_hardstart() (dev_hard_start_xmit of the physical interface). The function ath_hardstart() encapsulates the ethernet packet into 802.11 packet. The function ath_tx_start() encrypts the packets if necessary, maps the skb to DMA buffer and selects a transmit queues acording the priority of the packets (QoS control). The function ath_tx_txqaddbuf() inserts the buffer into the selected transmit queue and calls the HAL function to start a transmission.

 

Management packets are generated within the 802.11 layer. They are transmitted from the function ieee80211_mgmt_output().

 

Beacon messages are trigered by HAL. When it's time to send a beacon, the HAL issues an interrupt, then the function ath_beacon_send() is invoked to send the beacon message. The beacon messages are directly passed to the HAL to transmit.

 

After the HAL successfully transmited a packet, an interrupt is generated (ath_intr()) to report the transmission of the packet as shown in the following figure. The function ath_tx_tasklet() updates infomation for this transmission. If there is a virtual interface working in monitor mode, the packet is passed to the monitor interface in function ath_tx_capture().

 

 

 

 

原创粉丝点击