Version 20 (modified by chunter, 6 years ago) (diff)


Upper-level MAC Description

The upper-level MAC is responsible for inter-packet states that are not time critical. For example, the Access Point implementation is an upper-level MAC that handles the association handshake state machine, but relies on the lower-level DCF MAC for actual medium access.

There is a considerable amount of shared code among different upper-level MAC implementations. The MAC High Framework is the collection of these shared operations. The interaction between an upper-level MAC and this framework can be broken down into 4 broad categories:

Wireless Receptions

The MAC High Framework notifies the upper-level MAC of a wireless reception via a callback that is registered at boot. Within the framework, wireless receptions are handled via an interrupt attached to the inter-processor mailbox that connects the high and low processors.

Wireless Transmissions

When the upper-level MAC wants to transmit a packet wirelessly, there are a few steps:

  1. The upper-level MAC enqueues a packet into any of a number of outgoing wireless transmission queues. It performs this step by calling a function in the MAC High Framework.
  2. Because the process by which a transmit queue is emptied depends on the upper-level MAC, the upper-level MAC owns the code responsible for this. As such, the upper-level MAC calls its own function for processing any currently-filled transmit queues. In addition, the framework itself is capable of calling this function via a registered callback. It will call this function whenever the lower-level MAC has finished sending an MPDU.
  3. Finally, the upper-level MAC is notified whenever the lower-level MAC has finished sending an MPDU via a registered callback.

Wired Receptions

Whenever the framework received a wired Ethernet frame, it encapsulates the packet and passes it off to the upper-level MAC via a registered callback.

Wired Transmissions

When the upper-level MAC receives a wireless packet that needs to be sent via Ethernet, it calls a function in the MAC High Framework that de-encapsulates the packet and sends it via Ethernet.