Monday, February 15, 2016

WiFi: PP-AMSDU versus SPP-AMSDU a brief comparison

Before we jump into the different type of AMSDUs supported, let us do a quick recap of where AMSDUs fit in with the aggregation hierarchy. Here is an image from Wikipedia:
MSDU, MPDU and PPDU
Multiple MSDUs aggregate to form an AMSDU. Multiple of these will form an AMPDU. The different type of AMSDUs are defined in the WGs documents:
3.114n Payload Protected A-MSDU (PP A-MSDU): An A-MSDU that is CCMP protected but does not include the A-MSDU Present field (bit 7 of the QoS control field) in the construction of the AAD. 
3.135n Signaling and Payload Protected A-MSDU (SPP A-MSDU): An A-MSDU that is CCMP protected and does include the A-MSDU Present field (bit 7 of the Qos control field) in the construction of the AAD.

Construction of the AAD and its use in decryption with CCMP [from some random forum]:




Thus  the only difference between a PPAMSDU and an SPPAMSDU is the absence or presence of the AMSDU-present bit in the QOSctrl field.


The support for these types of AMSDU is highlighted in the RSN cap IE:

B0
B1      
B2-3
B4-5
B6
B7
B8
B9
<ANA1>
<ANA2>
B12-15
Pre-Auth
No Pairwise
PTKSA Replay Counter
GTKSA Replay Counter
AES-128-CMAC
Robust Management Frame protection
Reserved
Peerkey Enabled
SPP
A-MSDU Capable
SPP
A-MSDU Required
Reserved

 RSN Capabilities field format



The document also has a nice table of comparison - when and what type of AMSDUs are supported based on negotiations. If the wrong type of AMSDU is sent, it will fail decryption and the frame will be dropped.

Figure n61-B defines both transmit and receive behaviour of a STA (STA1) that has successfully negotiated an HT and RSNA (re)association with another STA (STA2).


STA1 State

STA2 State

STA1 Action with respect to STA2.

SPP
A-MSDU Capable
SPP
A-MSDU  Required
SPP
A-MSDU Capable
SPP
A-MSDU  Required
0
0
X
0
May transmit PP A-MSDU
Shall not transmit SPP A-MSDU
Shall receive PP A-MSDU
Received SPP A-MSDU decryption will fail
0
0
X
1
Shall not transmit PP A-MSDU
Shall not transmit SPP A-MSDU
Shall discard received PP A-MSDU
Received SPP A-MSDU decryption will fail
0
1
X
X
Shall not transmit PP A-MSDU
Shall not transmit SPP A-MSDU
Shall discard received (PP and SPP) A-MSDU
1
0
0
0
May transmit PP A-MSDU
Shall not transmit SPP A-MSDU
Shall receive PP A-MSDU
Received SPP A-MSDU decryption will fail
1
0
0
1
Shall not transmit PP A-MSDU
Shall not transmit SPP A-MSDU
Shall discard received (PP and SPP) A-MSDU
1
X
1
X
Shall not transmit PP A-MSDU
May transmit SPP A-MSDU
Received PP A-MSDU decryption will fail
Shall receive SPP A-MSDU
1
1
0
X
Shall not transmit PP A-MSDU
Shall not transmit SPP A-MSDU
Shall discard received (PP and SPP) A-MSDU
NOTE:
            X = Don’t Care