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. In addition to general MAC and PHY management, linux_dev
is a party to every outgoing transmission. All incoming receptions, however, bypass this application for improved performance.
MSG¶
linux_dev
is responsible for certain message handshakes with the Linux driver.
Driver-to-MAC messages¶
Message ID | Description |
---|---|
MANGO_WLAN_MSG_HW_INFO |
Contains information about the hardware. This message acts as one step of the configuration handshake when the firmware is being brought online. |
MANGO_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. |
MANGO_WLAN_MSG_PING |
Test message to verify MSG FIFO functionality. |
MANGO_WLAN_MSG_MAC_ADDR_ARRAY |
List of MAC addresses for local wireless network interfaces |
MANGO_WLAN_MSG_ADDBA |
Contains new Block ACK session details |
MANGO_WLAN_MSG_DELBA |
Contains Block ACK session details that should be destroyed |
MANGO_WLAN_MSG_RX_FILTER |
Contains information on what subset of receptions should be passed up to Linux |
MANGO_WLAN_MSG_MAC_PARAM |
Generic MAC configuration parameters. |
MAC-to-Driver messages¶
Message ID | Description |
---|---|
MANGO_WLAN_MSG_HW_BOOTED |
Notification that the MAC software has booted (or rebooted). This message acts as one step of the configuration handshake when the firmware is being brought online. |
MANGO_WLAN_MSG_PING |
Test message to verify MSG FIFO functionality. |
Tx¶
linux_dev
is responsible for both aggregating transmissions and managing their lifecycle from driver request to completion.
New Transmissions¶
linux_dev
receives SKBs from Linux containing packets that must be sent as well as metadata describing how they should be sent. When requested by the driver, linux_dev
will aggregate multiple SKBs into a single A-MPDU (Aggregated MAC Protocol Data Unit) transmission. The process involves:
- Securing an empty Tx packet buffer
- DMAing the contents of multiple SKBs into the buffer as constituent MPDUs
- Informing the low-level MAC that the aggregated payload is ready to be sent
Completed Transmissions¶
linux_dev
packages the status of completed transmissions and informs Linux the the SKBs are finished.