[[Include(wiki:802.11/beta-note)]] [[TracNav(802.11/TOC)]] = Upper-level MAC Description = The upper-level MAC is responsible for inter-packet states that are not time critical. The state machine implemented by the upper-level MAC has 6 states: {{{Idle}}}, {{{MPDU Tx}}}, {{{MPDU Rx}}}, {{{Ethernet Tx}}}, {{{Ethernet Rx}}}, and {{{Scheduled Event}}}. [[Image(wiki:802.11/files:wlan_mac_cpu_high_overview.png, width=800)]] == States == * {{{Idle}}}: This state is the default state where no actions are performed by the upper-level MAC. All other states return to {{{Idle}}} when completed. * {{{MPDU Tx}}}: This state handles the transmission of wireless MPDUs from a transmit queue. * Detailed description for Access Point: [wiki:./AP/MPDU_Tx MPDU Tx for AP] * {{{MPDU Rx}}}: This state handles the reception of wireless MPDUs. * Detailed description for Access Point: [wiki:./AP/MPDU_Rx MPDU Rx for AP] * {{{Ethernet Tx}}}: This state handles the transmission of wired Ethernet frames. * Detailed description for Access Point: [wiki:./AP/Ethernet_Tx Ethernet Tx for AP] * {{{Ethernet Rx}}}: This state handles the reception of wired Ethernet frames. * Detailed description for Access Point: [wiki:./AP/Ethernet_Rx Ethernet Rx for AP] * {{{Scheduled Event}}}: This state handles actions by the high-level MAC that are internally scheduled for times in the future. * Detailed description for Access Point: [wiki:./AP/Scheduled_Event Scheduled Event for AP] == State Transitions == * {{{Idle}}} → {{{MPDU Tx}}}: This transition occurs when two conditions are met: (a) The [wiki:../Lower lower-level MAC] has indicated that it is ready to receiver another packet for wireless transmission and (b) the transmit queue in the upper-level MAC contains a packet that needs to be sent. * {{{Idle}}} → {{{MPDU Rx}}}: This transition occurs when the [wiki:../Lower low-level MAC] has indicated that a reception has occurred with the following criteria: (a) the received packet is not a control packet (e.g. ACK, RTS, CTS) and (b) the received packet has a receiver address that is either a broadcast packet or a unicast packet whose address matches the MAC address of the node running this software. * {{{MPDU Rx}}} → {{{Ethernet Tx}}}: This transition occurs when a wireless MPDU data reception occurs that should be de-encapsulated and via Ethernet. ''Note: Unlike the {{{MPDU Tx}}} state, the {{{Ethernet Tx}}} state does not employ a queue. As such, it can be directly accessed from the {{{MPDU Rx}}} state without transitioning through {{{Idle}}}. There is a good reason for this asymmetry: even at the fastest 802.11g rates, wireless packets are much slower than gigabit-per-second wired packets. When receiving a wireless packet, there is enough time to directly transmit a wired packet without halting the next wireless reception. This is not the case for wired receptions, so they must be queued in order to mitigate dropping packets during bursty Ethernet arrivals.'' * {{{Idle}}} → {{{Ethernet Rx}}}: This transition occurs when any packet has been received by the Ethernet MAC on the board. * {{{Idle}}} → {{{Scheduled Event}}}: This transition occurs when a timer indicates that a scheduled event should be processed.