mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-12-21 11:22:50 +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>
68 lines
2.9 KiB
Diff
68 lines
2.9 KiB
Diff
From d2b5a9ed668829c04a8c86e8712cc045a9aaac5f Mon Sep 17 00:00:00 2001
|
|
From: Muna Sinada <msinada@codeaurora.org>
|
|
Date: Mon, 11 Jan 2021 17:30:34 -0800
|
|
Subject: [PATCH] hostapd: Setting Spectrum Management bit for chan switch
|
|
|
|
When CSA IEs are adversied by AP when CSA is initiated, spectrum
|
|
management bit in capability information located in management frame's
|
|
fixed field shoud be set. Therfore when channel switch is supported,
|
|
the spectrum management bit is set.
|
|
|
|
Signed-off-by: Muna Sinada <msinada@codeaurora.org>
|
|
---
|
|
src/ap/ap_config.c | 4 +++-
|
|
src/ap/ieee802_11.c | 15 +++++++++------
|
|
2 files changed, 12 insertions(+), 7 deletions(-)
|
|
|
|
diff --git a/src/ap/ap_config.c b/src/ap/ap_config.c
|
|
index 41c7070..4b33c3c 100644
|
|
--- a/src/ap/ap_config.c
|
|
+++ b/src/ap/ap_config.c
|
|
@@ -235,6 +235,8 @@ struct hostapd_config * hostapd_config_defaults(void)
|
|
conf->fragm_threshold = -2; /* user driver default: 2346 */
|
|
/* Set to invalid value means do not add Power Constraint IE */
|
|
conf->local_pwr_constraint = -1;
|
|
+ /* Set to invalid value means that user did not set this value */
|
|
+ conf->spectrum_mgmt_required = -1;
|
|
|
|
conf->wmm_ac_params[0] = ac_be;
|
|
conf->wmm_ac_params[1] = ac_bk;
|
|
@@ -1532,7 +1534,7 @@ int hostapd_config_check(struct hostapd_config *conf, int full_config)
|
|
return -1;
|
|
}
|
|
|
|
- if (full_config && conf->spectrum_mgmt_required &&
|
|
+ if (full_config && conf->spectrum_mgmt_required != -1 &&
|
|
conf->local_pwr_constraint == -1) {
|
|
wpa_printf(MSG_ERROR, "Cannot set Spectrum Management bit without Country and Power Constraint elements");
|
|
return -1;
|
|
diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
|
|
index 90756fa..50e4744 100644
|
|
--- a/src/ap/ieee802_11.c
|
|
+++ b/src/ap/ieee802_11.c
|
|
@@ -309,15 +309,18 @@ u16 hostapd_own_capab_info(struct hostapd_data *hapd)
|
|
capab |= WLAN_CAPABILITY_SHORT_SLOT_TIME;
|
|
|
|
/*
|
|
- * Currently, Spectrum Management capability bit is set when directly
|
|
- * requested in configuration by spectrum_mgmt_required or when AP is
|
|
- * running on DFS channel.
|
|
+ * Currently, Spectrum Management capability bit is set by default when
|
|
+ * channel switch is supported. When CSA is not supported, then Spectrum
|
|
+ * Management capability bit is set when directly requested in
|
|
+ * configuration by spectrum_mgmt_required or when AP is running on DFS
|
|
+ * channel.
|
|
* TODO: Also consider driver support for TPC to set Spectrum Mgmt bit
|
|
*/
|
|
if (hapd->iface->current_mode &&
|
|
- hapd->iface->current_mode->mode == HOSTAPD_MODE_IEEE80211A &&
|
|
- (hapd->iconf->spectrum_mgmt_required || dfs))
|
|
- capab |= WLAN_CAPABILITY_SPECTRUM_MGMT;
|
|
+ hapd->iface->current_mode->mode == HOSTAPD_MODE_IEEE80211A)
|
|
+ if (!(hapd->iconf->spectrum_mgmt_required == 0 && !dfs) &&
|
|
+ (hapd->iface->drv_flags & WPA_DRIVER_FLAGS_AP_CSA || dfs))
|
|
+ capab |= WLAN_CAPABILITY_SPECTRUM_MGMT;
|
|
|
|
for (i = 0; i < RRM_CAPABILITIES_IE_LEN; i++) {
|
|
if (hapd->conf->radio_measurements[i]) {
|