Madwifi无线发送数据过程

本文详细解析了无线网络中数据包从内核到物理层的发送过程,包括IEEE 802.11标准下数据包的封装、加密、传输队列选择等关键步骤,并介绍了信标帧的触发与发送机制。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

数据发送过程:

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() .

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值