]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
hostapd: Update 160 MHz center freq calculation in 6 GHz
authorP Praneesh <ppranees@codeaurora.org>
Mon, 5 Apr 2021 05:45:26 +0000 (11:15 +0530)
committerJouni Malinen <j@w1.fi>
Mon, 3 May 2021 14:35:59 +0000 (17:35 +0300)
In the 6 GHz Operation Information field, the Channel Center Frequency
Segment 0 field indicates the channel center frequency index for
the 20 MHz, 40 MHz, 80 MHz, or 80+80 MHz channel on which the
BSS operates in the 6 GHz band. If the BSS channel width is 160 MHz
then the Channel Center Frequency Segment 0 field indicates the
channel center frequency index of the primary 80 MHz.

The Channel Center Frequency Segment 1 field indicates the channel
center frequency index of the 160 MHz channel on which the BSS operates
in the 6 GHz band or the channel center frequency of the secondary 80
MHz for the 80+80 MHz channel.

Since Channel Center Frequency Segment 1 was 0 for 160 MHz, 6 GHz STA
associated using 80 MHz. Update seg0 and seg1 fields per standard (IEEE
P802.11ax/D8.0: 9.4.2.249 HE Operation element).

Signed-off-by: P Praneesh <ppranees@codeaurora.org>
hostapd/hostapd.conf
src/ap/ieee802_11_he.c

index 7932cb862f48e9a55124463bdbae801fcf179320..a89ce9b36643eb3ebc8fbb85fcef2b45827f041c 100644 (file)
@@ -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
index 917ed946df3f63c9e03b3e236afdbaf555481ece..8ff38359498eb9bd72c738834ac4b73aad0bc319 100644 (file)
@@ -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 */