diff mbox series

[v2,2/3] nl80211: retrieve EHT operation element in AP mode

Message ID 20220323225443.13947-2-quic_alokad@quicinc.com
State New
Headers show
Series [v2,1/3] nl80211: retrieve EHT capabilities in AP mode | expand

Commit Message

Aloka Dixit March 23, 2022, 10:54 p.m. UTC
Add support to retrieve the EHT operation element passed by
the userspace in the beacon template and store the pointer in
struct cfg80211_ap_settings to be used by MAC80211.

Signed-off-by: Aloka Dixit <quic_alokad@quicinc.com>
---
v2: Rebased on top of wireless-next git repository

 include/net/cfg80211.h | 2 ++
 net/wireless/nl80211.c | 3 +++
 2 files changed, 5 insertions(+)
diff mbox series

Patch

diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 845db70a9473..45d676d0f61e 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -1295,6 +1295,7 @@  struct cfg80211_unsol_bcast_probe_resp {
  * @he_obss_pd: OBSS Packet Detection settings
  * @he_bss_color: BSS Color settings
  * @he_oper: HE operation IE (or %NULL if HE isn't enabled)
+ * @eht_oper: EHT operation IE (or %NULL if EHT isn't enabled)
  * @fils_discovery: FILS discovery transmission parameters
  * @unsol_bcast_probe_resp: Unsolicited broadcast probe response parameters
  * @mbssid_config: AP settings for multiple bssid
@@ -1324,6 +1325,7 @@  struct cfg80211_ap_settings {
 	const struct ieee80211_he_cap_elem *he_cap;
 	const struct ieee80211_he_operation *he_oper;
 	const struct ieee80211_eht_cap_elem *eht_cap;
+	const struct ieee80211_eht_operation *eht_oper;
 	bool ht_required, vht_required, he_required, sae_h2e_required;
 	bool twt_responder;
 	u32 flags;
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 71946ad89059..c16d554a1819 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -5445,6 +5445,9 @@  static void nl80211_calculate_ap_params(struct cfg80211_ap_settings *params)
 	cap = cfg80211_find_ext_elem(WLAN_EID_EXT_EHT_CAPABILITY, ies, ies_len);
 	if (cap && cap->datalen >= sizeof(*params->eht_cap) + 1)
 		params->eht_cap = (void *)(cap->data + 1);
+	cap = cfg80211_find_ext_elem(WLAN_EID_EXT_EHT_OPERATION, ies, ies_len);
+	if (cap && cap->datalen >= sizeof(*params->eht_oper) + 1)
+		params->eht_oper = (void *)(cap->data + 1);
 }
 
 static bool nl80211_get_ap_channel(struct cfg80211_registered_device *rdev,