diff --git a/hostapd/hostapd.conf b/hostapd/hostapd.conf index 7932cb862..a89ce9b36 100644 --- a/hostapd/hostapd.conf +++ b/hostapd/hostapd.conf @@ -837,6 +837,11 @@ wmm_ac_vo_acm=0 #he_rts_threshold=0 # HE operating channel information; see matching vht_* parameters for details. +# he_oper_centr_freq_seg0_idx field is used to indicate center frequency of 80 +# and 160 MHz bandwidth operation. In 80+80 MHz operation, it is the center +# frequency of the lower frequency segment. he_oper_centr_freq_seg1_idx field +# is used only with 80+80 MHz bandwidth operation and it is used to transmit +# the center frequency of the second segment. # On the 6 GHz band the center freq calculation starts from 5.950 GHz offset. # For example idx=3 would result in 5965 MHz center frequency. In addition, # he_oper_chwidth is ignored, and the channel width is derived from the diff --git a/src/ap/ieee802_11_he.c b/src/ap/ieee802_11_he.c index 917ed946d..8ff383594 100644 --- a/src/ap/ieee802_11_he.c +++ b/src/ap/ieee802_11_he.c @@ -216,7 +216,10 @@ u8 * hostapd_eid_he_operation(struct hostapd_data *hapd, u8 *eid) params |= HE_OPERATION_6GHZ_OPER_INFO; - /* 6 GHz Operation Information field */ + /* 6 GHz Operation Information field + * IEEE P802.11ax/D8.0, 9.4.2.249 HE Operation element, + * Figure 9-788k + */ *pos++ = hapd->iconf->channel; /* Primary Channel */ /* Control: Channel Width */ @@ -226,6 +229,18 @@ u8 * hostapd_eid_he_operation(struct hostapd_data *hapd, u8 *eid) *pos++ = center_idx_to_bw_6ghz(seg0); /* Channel Center Freq Seg0/Seg1 */ + if (hapd->iconf->he_oper_chwidth == 2) { + /* + * Seg 0 indicates the channel center frequency index of + * the 160 MHz channel. + */ + seg1 = seg0; + if (hapd->iconf->channel < seg0) + seg0 -= 8; + else + seg0 += 8; + } + *pos++ = seg0; *pos++ = seg1; /* Minimum Rate */