mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-12-22 03:42:41 +00:00
Some checks failed
Build OpenWrt/uCentral images / build (cig_wf186h) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cig_wf186w) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cig_wf188n) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cig_wf189) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cig_wf196) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cybertan_eww631-a1) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cybertan_eww631-b1) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap101) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap102) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap104) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap105) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap111) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap112) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_oap101) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_oap101-6e) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_oap101e) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_oap101e-6e) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4x) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4x_2) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4x_3) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4x_w) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4xe) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4xi) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4xi_w) (push) Has been cancelled
Build OpenWrt/uCentral images / build (indio_um-305ax) (push) Has been cancelled
Build OpenWrt/uCentral images / build (sercomm_ap72tip) (push) Has been cancelled
Build OpenWrt/uCentral images / build (sonicfi_rap630c-311g) (push) Has been cancelled
Build OpenWrt/uCentral images / build (sonicfi_rap630w-211g) (push) Has been cancelled
Build OpenWrt/uCentral images / build (sonicfi_rap630w-311g) (push) Has been cancelled
Build OpenWrt/uCentral images / build (udaya_a6-id2) (push) Has been cancelled
Build OpenWrt/uCentral images / build (udaya_a6-od2) (push) Has been cancelled
Build OpenWrt/uCentral images / build (wallys_dr5018) (push) Has been cancelled
Build OpenWrt/uCentral images / build (wallys_dr6018) (push) Has been cancelled
Build OpenWrt/uCentral images / build (wallys_dr6018-v4) (push) Has been cancelled
Build OpenWrt/uCentral images / build (yuncore_ax820) (push) Has been cancelled
Build OpenWrt/uCentral images / build (yuncore_ax840) (push) Has been cancelled
Build OpenWrt/uCentral images / build (yuncore_fap640) (push) Has been cancelled
Build OpenWrt/uCentral images / build (yuncore_fap650) (push) Has been cancelled
Build OpenWrt/uCentral images / build (yuncore_fap655) (push) Has been cancelled
Build OpenWrt/uCentral images / trigger-testing (push) Has been cancelled
Build OpenWrt/uCentral images / create-x64_vm-ami (push) Has been cancelled
Signed-off-by: John Crispin <john@phrozen.org>
137 lines
4.6 KiB
Diff
137 lines
4.6 KiB
Diff
From b98fadd4a3b47f950e7076d04fdcdfe7420cf6c9 Mon Sep 17 00:00:00 2001
|
|
From: Karthikeyan Kathirvel <quic_kathirve@quicinc.com>
|
|
Date: Wed, 3 Jan 2024 18:11:59 +0530
|
|
Subject: [PATCH] hostapd: set eht oper based on the following condition
|
|
|
|
As per spec, an EHT AP shall set the EHT Operation Information Present
|
|
subfield in the EHT Operation element to 1 if all the following conditions
|
|
are satisfied:
|
|
|
|
— the AP is operating in the 5 GHz or in the 6 GHz band
|
|
|
|
— the AP announces to EHT non-AP STAs a BSS operating channel
|
|
width through the EHT Operation
|
|
Information field that is different from the BSS operating
|
|
channel width(s) that it announces to nonEHT non-AP STAs
|
|
in the same Management frame
|
|
|
|
— the BSS operating channel width announced to EHT non-AP STAs
|
|
includes at least one punctured 20 MHz subchannel and/or is 320 MHz.
|
|
|
|
Signed-off-by: Karthikeyan Kathirvel <quic_kathirve@quicinc.com>
|
|
---
|
|
src/ap/ieee802_11_eht.c | 21 +++++++++++++++++++--
|
|
1 file changed, 19 insertions(+), 2 deletions(-)
|
|
|
|
--- a/src/ap/ieee802_11_eht.c
|
|
+++ b/src/ap/ieee802_11_eht.c
|
|
@@ -244,7 +244,7 @@ u8 * hostapd_eid_eht_operation(struct ho
|
|
*pos++ = WLAN_EID_EXT_EHT_OPERATION;
|
|
|
|
oper = (struct ieee80211_eht_operation *) pos;
|
|
- oper->oper_params = EHT_OPER_INFO_PRESENT;
|
|
+ os_memset(oper, 0, sizeof(*oper));
|
|
|
|
/* TODO: Fill in appropriate EHT-MCS max Nss information */
|
|
oper->basic_eht_mcs_nss_set[0] = 0x11;
|
|
@@ -252,11 +252,38 @@ u8 * hostapd_eid_eht_operation(struct ho
|
|
oper->basic_eht_mcs_nss_set[2] = 0x00;
|
|
oper->basic_eht_mcs_nss_set[3] = 0x00;
|
|
|
|
+ pos += 5;
|
|
+
|
|
if (is_6ghz_op_class(conf->op_class))
|
|
chwidth = op_class_to_ch_width(conf->op_class);
|
|
else
|
|
chwidth = conf->eht_oper_chwidth;
|
|
|
|
+ /*
|
|
+ * As per spec, an EHT AP shall set the EHT Operation Information
|
|
+ * Present subfield in the EHT Operation element to 1 if
|
|
+ * all the following conditions are satisfied:
|
|
+ * — the AP is operating in the 5 GHz or in the 6 GHz band
|
|
+ * — the AP announces to EHT non-AP STAs a BSS operating channel
|
|
+ * width through the EHT Operation
|
|
+ * Information field that is different from the BSS operating
|
|
+ * channel width(s) that it announces to nonEHT non-AP STAs
|
|
+ * in the same Management frame
|
|
+ * — the BSS operating channel width announced to EHT non-AP STAs
|
|
+ * includes at least one punctured
|
|
+ * 20 MHz subchannel and/or is 320 MHz.
|
|
+ */
|
|
+
|
|
+ if (!(is_5ghz_freq(mode->channels->freq) || is_6ghz_freq(mode->channels->freq)))
|
|
+ goto exit;
|
|
+
|
|
+ if (!hapd->iconf->ru_punct_bitmap &&
|
|
+ ((is_6ghz_op_class(conf->op_class) && hapd->he_oper_chwidth == chwidth) ||
|
|
+ (hapd->vht_oper_chwidth == chwidth)))
|
|
+ goto exit;
|
|
+
|
|
+ oper->oper_params = EHT_OPER_INFO_PRESENT;
|
|
+
|
|
if (hapd->iconf->ru_punct_bitmap && !hapd->iface->ru_punct_supp_bw) {
|
|
hapd->iconf->ru_punct_bitmap = 0;
|
|
wpa_printf(MSG_ERROR,
|
|
@@ -320,19 +347,22 @@ u8 * hostapd_eid_eht_operation(struct ho
|
|
oper->oper_info.ccfs0 = seg0;
|
|
oper->oper_info.ccfs1 = seg1;
|
|
|
|
- if (hapd->iconf->ru_punct_bitmap) {
|
|
- oper->oper_params |= EHT_OPER_DISABLED_SUBCHAN_BITMAP_PRESENT;
|
|
- oper->oper_info.disabled_chan_bitmap = host_to_le16(hapd->iconf->ru_punct_bitmap);
|
|
- pos += DISABLED_SUBCHANNEL_BITMAP_BYTES_SIZE;
|
|
- }
|
|
-
|
|
if (hapd->iconf->punct_bitmap) {
|
|
oper->oper_params |= EHT_OPER_DISABLED_SUBCHAN_BITMAP_PRESENT;
|
|
oper->oper_info.disabled_chan_bitmap =
|
|
host_to_le16(hapd->iconf->punct_bitmap);
|
|
}
|
|
|
|
- pos += 8;
|
|
+ pos += 3;
|
|
+
|
|
+exit:
|
|
+
|
|
+ if (hapd->iconf->ru_punct_bitmap) {
|
|
+ oper->oper_params |= EHT_OPER_DISABLED_SUBCHAN_BITMAP_PRESENT;
|
|
+ oper->oper_info.disabled_chan_bitmap = host_to_le16(hapd->iconf->ru_punct_bitmap);
|
|
+ pos += DISABLED_SUBCHANNEL_BITMAP_BYTES_SIZE;
|
|
+ }
|
|
+
|
|
*length_pos = pos - (eid + 2);
|
|
|
|
return pos;
|
|
--- a/src/ap/hostapd.h
|
|
+++ b/src/ap/hostapd.h
|
|
@@ -227,6 +227,8 @@ struct hostapd_data {
|
|
unsigned int started:1;
|
|
unsigned int disabled:1;
|
|
unsigned int reenable_beacon:1;
|
|
+ enum oper_chan_width vht_oper_chwidth;
|
|
+ enum oper_chan_width he_oper_chwidth;
|
|
|
|
u8 own_addr[ETH_ALEN];
|
|
|
|
--- a/src/ap/ieee802_11_he.c
|
|
+++ b/src/ap/ieee802_11_he.c
|
|
@@ -292,6 +292,7 @@ u8 * hostapd_eid_he_operation(struct hos
|
|
|
|
*pos++ = control;
|
|
|
|
+ hapd->he_oper_chwidth = oper_chwidth;
|
|
/* Channel Center Freq Seg0/Seg1 */
|
|
if (oper_chwidth == 2) {
|
|
/*
|
|
--- a/src/ap/ieee802_11_vht.c
|
|
+++ b/src/ap/ieee802_11_vht.c
|
|
@@ -130,6 +130,7 @@ u8 * hostapd_eid_vht_operation(struct ho
|
|
oper->vht_op_info_chan_center_freq_seg1_idx = seg1;
|
|
|
|
oper->vht_op_info_chwidth = oper_chwidth;
|
|
+ hapd->vht_oper_chwidth = oper_chwidth;
|
|
vht_capabilities_info = host_to_le32(hapd->iface->current_mode->vht_capab);
|
|
if (oper_chwidth == CONF_OPER_CHWIDTH_160MHZ) {
|
|
/*
|