wlan-ap-Telecominfraproject/feeds/qca/hostapd/patches/q02-031-ru_puncturing-retrieve-driver-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

123 lines
4.0 KiB
Diff

From 74cd6b31e4300bd70dd67ecfeab07231fb3436d2 Mon Sep 17 00:00:00 2001
From: Muna Sinada <quic_msinada@quicinc.com>
Date: Wed, 8 Dec 2021 23:11:27 -0800
Subject: [PATCH 1/6] ru_puncturing: retrieve driver support
Retrieve the driver support for RU puncturing which is advertised
using the attribute NL80211_ATTR_RU_PUNCT_SUPP_BW.
Value indicates the bandwidths in which puncturing is supported -
80 MHz, 160 MHz or 320 MHz.
Absence of the attribute or the value 0 means the driver does not
support this feature.
Signed-off-by: Muna Sinada <quic_msinada@quicinc.com>
Signed-off-by: Aloka Dixit <quic_alokad@quicinc.com>
---
hostapd/main.c | 1 +
src/ap/hostapd.h | 3 +++
src/drivers/driver.h | 3 +++
src/drivers/driver_nl80211_capa.c | 18 ++++++++++++++++++
src/drivers/nl80211_copy.h | 12 ++++++++++++
5 files changed, 37 insertions(+)
diff --git a/hostapd/main.c b/hostapd/main.c
index 46aa151..b155a5f 100644
--- a/hostapd/main.c
+++ b/hostapd/main.c
@@ -309,6 +309,7 @@ setup_mld:
iface->extended_capa_mask = capa.extended_capa_mask;
iface->extended_capa_len = capa.extended_capa_len;
iface->drv_max_acl_mac_addrs = capa.max_acl_mac_addrs;
+ iface->ru_punct_supp_bw = capa.ru_punct_supp_bw;
/*
* Override extended capa with per-interface type (AP), if
diff --git a/src/ap/hostapd.h b/src/ap/hostapd.h
index fc3fe6e..d3aaf40 100644
--- a/src/ap/hostapd.h
+++ b/src/ap/hostapd.h
@@ -682,6 +682,9 @@ struct hostapd_iface {
/* Maximum profile periodicity for enhanced MBSSID advertisement */
unsigned int ema_max_periodicity;
+ /* Minimum bandwidth the driver supports RU puncturing */
+ u8 ru_punct_supp_bw;
+
int (*enable_iface_cb)(struct hostapd_iface *iface);
int (*disable_iface_cb)(struct hostapd_iface *iface);
diff --git a/src/drivers/driver.h b/src/drivers/driver.h
index a9c8e9c..aaf04ab 100644
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
@@ -2443,6 +2443,9 @@ struct wpa_driver_capa {
unsigned int mbssid_max_interfaces;
/* Maximum profile periodicity for enhanced MBSSID advertisement */
unsigned int ema_max_periodicity;
+
+ /* Minimum bandwidth the driver supports RU Puncturing */
+ u8 ru_punct_supp_bw;
};
diff --git a/src/drivers/driver_nl80211_capa.c b/src/drivers/driver_nl80211_capa.c
index 8693d7f..b4f1f5e 100644
--- a/src/drivers/driver_nl80211_capa.c
+++ b/src/drivers/driver_nl80211_capa.c
@@ -1155,6 +1155,24 @@ static int wiphy_info_handler(struct nl_msg *msg, void *arg)
if (tb[NL80211_ATTR_MBSSID_CONFIG])
wiphy_info_mbssid(capa, tb[NL80211_ATTR_MBSSID_CONFIG]);
+ if (tb[NL80211_ATTR_RU_PUNCT_SUPP_BW]) {
+ u8 supp_bw = nla_get_u8(tb[NL80211_ATTR_RU_PUNCT_SUPP_BW]);
+
+ switch (supp_bw) {
+ case NL80211_RU_PUNCT_SUPP_BW_80:
+ capa->ru_punct_supp_bw = CONF_OPER_CHWIDTH_80MHZ;
+ break;
+ case NL80211_RU_PUNCT_SUPP_BW_160:
+ capa->ru_punct_supp_bw = CONF_OPER_CHWIDTH_160MHZ;
+ break;
+ case NL80211_RU_PUNCT_SUPP_BW_320:
+ capa->ru_punct_supp_bw = CONF_OPER_CHWIDTH_320MHZ;
+ break;
+ default:
+ break;
+ }
+ }
+
if (tb[NL80211_ATTR_MLO_SUPPORT])
capa->flags2 |= WPA_DRIVER_FLAGS2_MLO;
diff --git a/src/drivers/nl80211_copy.h b/src/drivers/nl80211_copy.h
index 8bd1f69..ce325cf 100644
--- a/src/drivers/nl80211_copy.h
+++ b/src/drivers/nl80211_copy.h
@@ -3378,7 +3378,11 @@ enum nl80211_attrs {
NL80211_ATTR_AWGN_INTERFERENCE_BITMAP,
- /* add attributes here, update the policy in nl80211.c */
+ NL80211_ATTR_RU_PUNCT_SUPP_BW,
+ NL80211_ATTR_RU_PUNCT_SUPP_HE,
+ NL80211_ATTR_RU_PUNCT_BITMAP,
+
+/* add attributes here, update the policy in nl80211.c */
__NL80211_ATTR_AFTER_LAST,
NUM_NL80211_ATTR = __NL80211_ATTR_AFTER_LAST,
@@ -7901,4 +7905,12 @@ enum nl80211_beacon_tx_mode {
NL80211_BEACON_STAGGERED_MODE = 1,
NL80211_BEACON_BURST_MODE = 2,
};
+
+enum nl80211_ru_punct_supp_bw {
+ NL80211_RU_PUNCT_NOT_SUPP,
+ NL80211_RU_PUNCT_SUPP_BW_80,
+ NL80211_RU_PUNCT_SUPP_BW_160,
+ NL80211_RU_PUNCT_SUPP_BW_320,
+};
+
#endif /* __LINUX_NL80211_H */