wlan_exp Experiments Framework

The High MAC framework contains code responsible for interacting with wlan_exp hosts. This interaction takes place in the form of Ethernet I/O – processing commands issued by the wlan_exp host and issuing responses.

A major architectural feature of wlan_exp processing on the node is that almost all processing takes place outside of an interrupt context and is designed to be interrupted for critical MAC operations. wlan_exp should not adversely affect the performance of wireless design.

General Command Processing

The general behavior for command processing is that a wlan_exp host sends a command to a node and the node replies with a response. Depending on what the command is, the response may contain information requested by the wlan_exp host or it may be a simple acknowledgement that lets the host know that the command was successfully received and acted upon.

List and Log Retreival Command Processing

There are two command classes that may result in one or more response packets. List retrieval commands (e.g. retrieving multiple station information structs) and log retrieval commands have a unique structure:

  1. The node begins a loop over the number of packets it determines will be needed to communicate the entire requested payload to the wlan_exp host. It lowers a mask in the software interrupt core to prevent the wlan_exp transmission queue from being emptied.
  2. At the start of the loop, the Ethernet and wlan_exp headers of the current response packet are copied into the next packet via a nonblocking CDMA operation. The values here do not change from packet-to-packet, so the node is able to avoid costly reconstruction of packet headers.
  3. The list or log payload for the current packet is attached. In the case of list retrieval, the payload bytes are copied directly into the Ethernet queue buffer after header bytes. In the case of log retrieval, the Ethernet queue buffer is updated so that it points to the relevant log data elswhere in memory. The platform’s underlying Ethernet peripheral can configure a scatter-gather DMA to construct the contiguous Ethernet frame as it is transmitted.
  4. The completed response frame is enqueued for transmission.
  5. After a certain number of packets are enqueued, the mask for the wlan_exp transmission queue in the software interrupt core is raised so that a burst of enqueued transmissions can be sent.