Linux Device Interface - linux_dev
¶
The linux_dev
application for CPU High implements the interface between the MAC and the mango_wlan
kernel module. CPU High must run the linux_dev
application in order for Linux to use the 802.11 MAC/PHY as a wireless network interface.
Message Passing¶
The linux_dev
application translates messages between the kernel and the MAC. All communication between the kernel and MAC passes through the msg_fifo
kernel module and the linux_dev
application. The kernel and linux_dev
application must use the identical message format definitions via the shared mango_wlan_msg.h
header.
The core MAC/driver messages are listed below. New message formats can be defined for custom MAC extensions.
Driver to MAC messages¶
Message ID | Description |
---|---|
WLAN_MSG_CONFIG |
MAC configuration parameters specified by the kernel driver and applied to the MAC. The driver always sends a complete CONFIG struct to ensure driver and MAC state remain consistent across partial reboots. |
MSG_TX_MPDU |
New packet from the kernel for wireless transmission, linux_dev adds to queue for future transmission |
MSG_TX_BEACON |
Updated beacon contents provided by kernel networking stack, to be used in next beacon transmission |
MAC_ADDR_ARRAY |
List of MAC addresses for local wireless network interfaces |
MAC to Driver messages¶
Message ID | Description |
---|---|
MSG_BEACON_UPDATE_TRIGGER |
Notification from the MAC that a beacon Tx is occurring soon, requesting the kernel to update the beacon contents. |
MSG_TX_MPDU_DONE |
Completion of a wireless transmission by the MAC for a packet previously sent from the driver via a MSG_TX_MPDU message. |
MSG_RX_MPDU |
Wireless reception by the MAC, reported to the kernel. By default all wireless receptions are passed to the kernel driver for processing / filtering. |
MSG_HW_BOOTED |
Notification that the MAC software has booted (or rebooted). |
Wireless Tx Queue Handling¶
The linux_dev
application uses the High MAC Framework’s queueing subsystem to implement multiple transmit queues. By default the linux_dev
app uses two queues:
- Multicast Data: for all non-management packets addressed to a multicast MAC address
- Data: all non-multicast packets awaiting transmission
The Multicast queue is used when the kernel is operating an access point and needs to buffer multicast packets until the next DTIM.
The linux_dev
queues are independent of the packet queues maintained in the Linux kernel. Every packet in a linux_dev
queue will eventually be transmitted and reported to the kernel via a TX_MPDU_DONE
message.