diff mbox series

[v3,2/2] mac80211: Add HE MU-MIMO related flags in ieee80211_bss_conf

Message ID 1660286767-11853-2-git-send-email-quic_msinada@quicinc.com
State New
Headers show
Series [v3,1/2] mac80211: Add VHT MU-MIMO related flags in ieee80211_bss_conf | expand

Commit Message

Muna Sinada Aug. 12, 2022, 6:46 a.m. UTC
Adding flags for SU Beamformer, SU Beamformee, MU Beamformer and Full
Bandwidth UL MU-MIMO for HE. This is utilized to pass MU-MIMO
configurations from user space to driver.

Signed-off-by: Muna Sinada <quic_msinada@quicinc.com>
---
 include/net/mac80211.h | 10 ++++++++++
 net/mac80211/cfg.c     | 15 +++++++++++++++
 2 files changed, 25 insertions(+)
diff mbox series

Patch

diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 893cc7b98448..a3a655fa1958 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -655,6 +655,12 @@  struct ieee80211_fils_discovery {
  * @vht_su_beamformee: does this BSS support operation as an VHT SU beamformee
  * @vht_mu_beamformer: does this BSS support operation as an VHT MU beamformer
  * @vht_mu_beamformee: does this BSS support operation as an VHT MU beamformee
+ * @he_su_beamformer: does this BSS support operation as an HE SU beamformer
+ * @he_su_beamformee: does this BSS support operation as an HE SU beamformee
+ * @he_mu_beamformer: does this BSS support operation as an HE MU beamformer
+ * @he_full_ul_mumimo: does this BSS support the reception (AP) or transmission
+ *	(non-AP STA) of an HE TB PPDU on an RU that spans the entire PPDU
+ *	bandwidth
  */
 struct ieee80211_bss_conf {
 	const u8 *bssid;
@@ -733,6 +739,10 @@  struct ieee80211_bss_conf {
 	bool vht_su_beamformee;
 	bool vht_mu_beamformer;
 	bool vht_mu_beamformee;
+	bool he_su_beamformer;
+	bool he_su_beamformee;
+	bool he_mu_beamformer;
+	bool he_full_ul_mumimo;
 };
 
 /**
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index b13ce9ecfda8..727f5559a6da 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -1208,6 +1208,21 @@  static int ieee80211_start_ap(struct wiphy *wiphy, struct net_device *dev,
 			changed |= BSS_CHANGED_HE_BSS_COLOR;
 	}
 
+	if (params->he_cap) {
+		sdata->vif.bss_conf.he_su_beamformer =
+					!!(params->he_cap->phy_cap_info[3] &
+					   IEEE80211_HE_PHY_CAP3_SU_BEAMFORMER);
+		sdata->vif.bss_conf.he_su_beamformee =
+					!!(params->he_cap->phy_cap_info[4] &
+					   IEEE80211_HE_PHY_CAP4_SU_BEAMFORMEE);
+		sdata->vif.bss_conf.he_mu_beamformer =
+					!!(params->he_cap->phy_cap_info[4] &
+					   IEEE80211_HE_PHY_CAP4_MU_BEAMFORMER);
+		sdata->vif.bss_conf.he_full_ul_mumimo =
+				   !!(params->he_cap->phy_cap_info[2] &
+				      IEEE80211_HE_PHY_CAP2_UL_MU_FULL_MU_MIMO);
+	}
+
 	if (sdata->vif.type == NL80211_IFTYPE_AP &&
 	    params->mbssid_config.tx_wdev) {
 		err = ieee80211_set_ap_mbssid_options(sdata,