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_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

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.

Tx

linux_dev is has responsibilities at the endpoints of every transmission: when a new transmission request comes from Linux and when a transmission is complete.

New Transmissions

linux_dev receives SKBs from Linux containing packets that must be sent as well as metadata describing how they should be sent. linux_dev must secure an empty Tx packet buffer, DMA the contents of the SKB into it, and inform the low-level MAC that the payload is ready to be sent.

Completed Transmissions

linux_dev packages the status of a completed transmission and informs Linux of that the SKB is finished.