wlan-ap-Telecominfraproject/feeds/qca/hostapd/patches/q02-044-01-hostapd-Add-320-MHz-support.patch
John Crispin 008ca9618d
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
ipq95xx: import ath12.4-cs kernel and drivers
Signed-off-by: John Crispin <john@phrozen.org>
2024-10-20 09:25:13 +02:00

86 lines
3.4 KiB
Diff

From 387b308a6af81ada3643cc1c1658a7756f359b5a Mon Sep 17 00:00:00 2001
From: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
Date: Tue, 21 Sep 2021 17:20:23 +0530
Subject: [PATCH] hostapd: Add 320 MHz support
Added 320 MHz channel support in 6GHz band (EHT)
as define by IEEE P802.11be/D1.1, July 2021
section 36.3.23.2. It covers channel bringup,
frequency validation, channel switch and also
across all channel width and frequency manipulation.
Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
Signed-off-by: Ramya Gnanasekar <quic_rgnanase@quicinc.com>
---
hostapd/ctrl_iface.c | 31 +++++++++++++++++++++++++++++++
src/ap/drv_callbacks.c | 6 ++++++
src/ap/hostapd.c | 9 +++++++++
src/ap/ieee802_11.c | 4 ++++
src/ap/ieee802_11_eht.c | 4 +++-
src/ap/neighbor_db.c | 9 ++++++---
src/common/defs.h | 1 +
src/common/hw_features_common.c | 3 +++
src/common/ieee802_11_common.c | 6 ++++++
src/common/ieee802_11_defs.h | 6 ++++++
src/drivers/driver.h | 1 +
src/drivers/driver_common.c | 4 ++++
src/drivers/driver_nl80211.c | 5 +++++
src/drivers/driver_nl80211_capa.c | 3 +++
src/drivers/driver_nl80211_event.c | 6 ++++++
src/drivers/nl80211_copy.h | 2 ++
wpa_supplicant/ctrl_iface.c | 2 ++
17 files changed, 98 insertions(+), 4 deletions(-)
diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h
index 45245f1..c8d219b 100644
--- a/src/ap/ap_config.h
+++ b/src/ap/ap_config.h
@@ -1238,7 +1238,8 @@ hostapd_set_oper_chwidth(struct hostapd_config *conf,
oper_chwidth = CONF_OPER_CHWIDTH_160MHZ;
#endif /* CONFIG_IEEE80211BE */
#ifdef CONFIG_IEEE80211AX
- if (conf->ieee80211ax)
+ if (conf->ieee80211ax &&
+ oper_chwidth < CONF_OPER_CHWIDTH_320MHZ)
conf->he_oper_chwidth = oper_chwidth;
#endif /* CONFIG_IEEE80211AX */
conf->vht_oper_chwidth = oper_chwidth;
diff --git a/src/ap/ieee802_11_he.c b/src/ap/ieee802_11_he.c
index c3af932..8543101 100644
--- a/src/ap/ieee802_11_he.c
+++ b/src/ap/ieee802_11_he.c
@@ -230,7 +230,7 @@ u8 * hostapd_eid_he_operation(struct hostapd_data *hapd, u8 *eid)
enum oper_chan_width oper_chwidth =
hostapd_get_oper_chwidth(hapd->iconf);
u8 seg0 = hapd->iconf->he_oper_centr_freq_seg0_idx;
- u8 seg1 = hostapd_get_oper_centr_freq_seg1_idx(hapd->iconf);
+ u8 seg1 = hapd->iconf->he_oper_centr_freq_seg1_idx;
u8 control;
#ifdef CONFIG_IEEE80211BE
diff --git a/src/drivers/driver_nl80211_capa.c b/src/drivers/driver_nl80211_capa.c
index b4f1f5e..841e327 100644
--- a/src/drivers/driver_nl80211_capa.c
+++ b/src/drivers/driver_nl80211_capa.c
@@ -1708,6 +1708,8 @@ static void phy_info_freq(struct hostapd_hw_modes *mode,
chan->allowed_bw &= ~HOSTAPD_CHAN_WIDTH_80;
if (tb_freq[NL80211_FREQUENCY_ATTR_NO_160MHZ])
chan->allowed_bw &= ~HOSTAPD_CHAN_WIDTH_160;
+ if (tb_freq[NL80211_FREQUENCY_ATTR_NO_320MHZ])
+ chan->allowed_bw &= ~HOSTAPD_CHAN_WIDTH_320;
if (tb_freq[NL80211_FREQUENCY_ATTR_DFS_STATE]) {
enum nl80211_dfs_state state =
diff --git a/src/drivers/nl80211_copy.h b/src/drivers/nl80211_copy.h
index ce325cf..c7353a6 100644
--- a/src/drivers/nl80211_copy.h
+++ b/src/drivers/nl80211_copy.h
@@ -4282,6 +4282,7 @@ enum nl80211_frequency_attr {
NL80211_FREQUENCY_ATTR_16MHZ,
NL80211_FREQUENCY_ATTR_NO_320MHZ,
NL80211_FREQUENCY_ATTR_NO_EHT,
+ NL80211_FREQUENCY_ATTR_PSD,
/* keep last */
__NL80211_FREQUENCY_ATTR_AFTER_LAST,