Extend 6 GHz Operation Info field in HE Operation element

Add new field definitions for the 6 GHz Operation Information field in
the HE Operation element per IEEE Std 802.11ax-2021, 9.4.2.249. These
will be used for TPC operation in the 6 GHz band.

Signed-off-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
This commit is contained in:
Pradeep Kumar Chitrapu 2022-04-07 16:56:52 -07:00 committed by Jouni Malinen
parent 0eb686637d
commit bc3dc72a3a
2 changed files with 31 additions and 4 deletions

View file

@ -218,6 +218,7 @@ u8 * hostapd_eid_he_operation(struct hostapd_data *hapd, u8 *eid)
if (is_6ghz_op_class(hapd->iconf->op_class)) {
u8 seg0 = hostapd_get_oper_centr_freq_seg0_idx(hapd->iconf);
u8 seg1 = hostapd_get_oper_centr_freq_seg1_idx(hapd->iconf);
u8 control;
if (!seg0)
seg0 = hapd->iconf->channel;
@ -230,11 +231,23 @@ u8 * hostapd_eid_he_operation(struct hostapd_data *hapd, u8 *eid)
*/
*pos++ = hapd->iconf->channel; /* Primary Channel */
/* Control: Channel Width */
/* Control:
* bits 0-1: Channel Width
* bit 2: Duplicate Beacon
* bits 3-5: Regulatory Info
*/
/* Channel Width */
if (seg1)
*pos++ = 3;
control = 3;
else
*pos++ = center_idx_to_bw_6ghz(seg0);
control = center_idx_to_bw_6ghz(seg0);
if (hapd->iconf->he_6ghz_reg_pwr_type == 1)
control |= HE_6GHZ_STANDARD_POWER_AP <<
HE_6GHZ_OPER_INFO_CTRL_REG_INFO_SHIFT;
else
control |= HE_6GHZ_INDOOR_AP <<
HE_6GHZ_OPER_INFO_CTRL_REG_INFO_SHIFT;
*pos++ = control;
/* Channel Center Freq Seg0/Seg1 */
if (hapd->iconf->he_oper_chwidth == 2) {

View file

@ -2199,7 +2199,7 @@ struct ieee80211_he_operation {
* Operation Information subfield (5 octets). */
} STRUCT_PACKED;
/* IEEE P802.11ax/D6.0, Figure 9-787k - 6 GHz Operation Information field */
/* IEEE Std 802.11ax-2021, Figure 9-788k - 6 GHz Operation Information field */
struct ieee80211_he_6ghz_oper_info {
u8 primary_chan;
u8 control;
@ -2208,8 +2208,11 @@ struct ieee80211_he_6ghz_oper_info {
u8 min_rate;
} STRUCT_PACKED;
/* IEEE Std 802.11ax-2021, Figure 9-788l - Control field format */
#define HE_6GHZ_OPER_INFO_CTRL_CHAN_WIDTH_MASK (BIT(0) | BIT(1))
#define HE_6GHZ_OPER_INFO_CTRL_DUP_BEACON BIT(2)
#define HE_6GHZ_OPER_INFO_CTRL_REG_INFO_MASK (BIT(3) | BIT(4) | BIT(5))
#define HE_6GHZ_OPER_INFO_CTRL_REG_INFO_SHIFT 3
/* IEEE P802.11ax/D6.0, 9.4.2.261 HE 6 GHz Band Capabilities element */
struct ieee80211_he_6ghz_band_cap {
@ -2306,6 +2309,17 @@ struct ieee80211_spatial_reuse {
#define HE_OPERATION_BSS_COLOR_DISABLED ((u32) BIT(31))
#define HE_OPERATION_BSS_COLOR_OFFSET 24
/**
* enum he_6ghz_ap_type - Allowed Access Point types for 6 GHz Band
*
* IEEE Std 802.11ax-2021, Table E-12 (Regulatory Info subfield encoding in the
* United States)
*/
enum he_6ghz_ap_type {
HE_6GHZ_INDOOR_AP = 0,
HE_6GHZ_STANDARD_POWER_AP = 1,
};
/* Spatial Reuse defines */
#define SPATIAL_REUSE_SRP_DISALLOWED BIT(0)
#define SPATIAL_REUSE_NON_SRG_OBSS_PD_SR_DISALLOWED BIT(1)