Sunday, May 21, 2017

WiFi: What are control response frames?

I have pasted some snippets from the standard which describe how rate control has to work for these special frames. This blog post is based on excerpts from section 9.7 of the 802.11 standard.

What are control response frames?
Following table shows all control frames, with the control response frames highlighted in bold:

Type description
Subtype value
Subtype description

01
Control
0000-0111
Reserved

01
Control
1000
Block Ack Request

01
Control
1001
Block Ack

01
Control
1010
PS-Poll

01
Control
1011
RTS

01
Control
1100
CTS

01
Control
1101
ACK

01
Control
1110
CF-end

01
Control
1111
CF-end + CF-ack

ACK or CTS or block-ack frames are referred to as control response frames by the WiFi standard. These are referred so because they are control frames sent in response to other frames.

How is rate selected for these frames?
Rules for CTS/ACK frames: 

  • If a CTS or ACK control response frame is carried in a non-HT PPDU, the primary rate is defined to be the highest rate in the BSSBasicRateSet parameter that is less than or equal to the rate. 
  • The STA shall transmit the non-HT PPDU CTS or ACK control response frame at either the primary rate or the alternate rate, if one exists.
Rules for BA (immediate): 

  • the BlockAck frame is carried in a non-HT PPDU, the primary rate is defined to be the highest rate in the BSSBasicRateSet parameter that is less than or equal to the rate (or non-HT reference rate; see 9.7.9) of the previous frame. 
  • If no rate in the BSSBasicRateSet parameter meets these conditions, the primary rate is defined to be the highest mandatory rate of the attached PHY that is less than or equal to the rate.  
  • The primary rate is defined to be the same rate and modulation class as the BlockAckReq frame, and the STA shall transmit the Basic BlockAck frame at the primary rate.
Restriction on Modulation:
The modulation class of the control response frame shall be selected according to the following rules:
— If the received frame is of a modulation class other than HT and the control response frame is carried in a non-HT PPDU, the control response frame shall be transmitted using the same modulation class as the received frame. In addition, the control response frame shall be sent using the same value for the TXVECTOR parameter PREAMBLE_TYPE as the received frame.
— If the received frame is of the modulation class HT and the control response frame is carried in a non-HT PPDU, the control response frame shall be transmitted using one of the ERP-OFDM or OFDM modulation classes.
— If the control response frame is carried in an HT PPDU, the modulation class shall be HT.

The implication of this is that, say for example we are on 2.4GHz and we only have 11Mbps (CCK) as a basic rate, but we receive a frame with an OFDM rate, we will end up responding with the CCK rate which the client may not like - since it could be expecting to get a frame with the same modulation as what it transmitted. - Always good to have one OFDM rate in the basic rate set.

9.7.6.5.3 Control response frame MCS computation
This discussion applies only if the control response frame is going to be transmitted in an HT-PPDU.  The Rx Supported MCS Set can be determined based on the map in the HT capabilities IE as a part of the association response:

Association response frame with rx mcs map
The CandidateMCSSet is determined using the following rules:
  • If the frame eliciting the response was an STBC frame and the Dual CTS Protection bit is equal to 1, the CandidateMCSSet shall contain only the basic STBC MCS.
  • If the frame eliciting the response had an L-SIG duration value (see 9.23.5) and initiates a TXOP,the CandidateMCSSet is the MCS Set consisting of the intersection of the Rx Supported MCS Set ofthe STA that sent the frame that is eliciting the response and the set of MCSs that the responding STA is capable of transmitting.
  • If none of the above conditions is true, the CandidateMCSSet is the BSSBasicMCSSet parameter. If the BSSBasicMCSSet parameter is empty, the CandidateMCSSet shall consist of the set of mandatory HT PHY MCSs.