52 | | A key function of the lower MAC is implementing the MAC protocol's transmit state machines. The MAC protocol defines when packets can be transmitted. For example the DCF requires an ACK transmission a SIFS interval after receiving a DATA packet. The DCF also requires a random backoff period before an RTS or DATA transmission if the medium was recently busy. The {{{wlan_mac_hw}}} core implements 3 transmit state machines to facilitate these various protocol requirements. The 3 Tx controllers differ in their state machine inputs/outputs, each tailored to a different MAC protocol task. Each controller is configured from software. |
| 52 | A key function of the lower MAC is implementing the MAC protocol's transmit state machines. The MAC protocol defines when packets can be transmitted. For example the DCF requires an ACK transmission a SIFS interval after receiving a DATA packet. The DCF also requires a random backoff period before an RTS or DATA transmission if the medium was recently busy. |
| 53 | |
| 54 | The {{{wlan_mac_hw}}} core implements 4 transmit state machines to facilitate these various protocol requirements. The 4 Tx controllers differ in their state machine inputs/outputs, each tailored to a different MAC protocol task. Each controller is configured from software. |
| 55 | |
| 56 | Our reference DCF implementation requires 4 Tx state machines to implement the worst-case event of 4 simultaneous packets "in flight" that occurs when: |
| 57 | * '''TX A''': Unicast MPDU is deferring to medium activity |
| 58 | * '''TX D''': Multicast packets buffered for DTIM overlap next TBTT, multicast Tx defers to beacon Tx |
| 59 | * '''TX C''': Beacon Tx is required at TBTT, defers to ongoing Rx event |
| 60 | * '''TX B''': ACK Tx |
| 61 | |
| 62 | In this case all four Tx controllers have pending transmissions at the same time. The ACK Tx uses the PHY first (B), followed by the deferred Beacon (C), then the remaining DTIM multicast packets (D), then finally the deferred unicast packet (A). |