diff mbox series

[1/2] wifi: mac80211: add EHT MU-MIMO related flags in ieee80211_bss_conf

Message ID c1a6ef2f42e26a6e0473d4fb2ce1b572f8448d87.1675893838.git.ryder.lee@mediatek.com (mailing list archive)
State Changes Requested
Delegated to: Johannes Berg
Headers show
Series [1/2] wifi: mac80211: add EHT MU-MIMO related flags in ieee80211_bss_conf | expand

Commit Message

Ryder Lee Feb. 8, 2023, 10:09 p.m. UTC
Simliar to VHT/HE. This is utilized to pass MU-MIMO configurations
from user space (i.e. hostap) to driver.

Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
---
 include/net/mac80211.h |  9 +++++++++
 net/mac80211/cfg.c     | 14 ++++++++++++++
 2 files changed, 23 insertions(+)

Comments

Johannes Berg Feb. 15, 2023, 5:42 p.m. UTC | #1
On Thu, 2023-02-09 at 06:09 +0800, Ryder Lee wrote:
> Simliar to VHT/HE. This is utilized to pass MU-MIMO configurations

Typo - similar

> from user space (i.e. hostap) to driver.

^^ hostapd

> + * @eht_su_beamformer: in AP-mode, does this BSS support operation as an EHT SU
> + *	beamformer
> + * @eht_su_beamformee: in AP-mode, does this BSS support operation as an EHT SU
> + *	beamformee
> + * @eht_mu_beamformer: in AP-mode, does this BSS support operation as an EHT MU
> + *	beamformer

Is that really about _supporting_ it rather than _using_ it? Or
_enabling_ it?

johannes
Ryder Lee Feb. 17, 2023, 9:21 a.m. UTC | #2
On Wed, 2023-02-15 at 18:42 +0100, Johannes Berg wrote:
> On Thu, 2023-02-09 at 06:09 +0800, Ryder Lee wrote:
> > Simliar to VHT/HE. This is utilized to pass MU-MIMO configurations
> 
> Typo - similar
> 
> > from user space (i.e. hostap) to driver.
> 
> ^^ hostapd
> 

will fix.

> > + * @eht_su_beamformer: in AP-mode, does this BSS support operation
> > as an EHT SU
> > + *	beamformer
> > + * @eht_su_beamformee: in AP-mode, does this BSS support operation
> > as an EHT SU
> > + *	beamformee
> > + * @eht_mu_beamformer: in AP-mode, does this BSS support operation
> > as an EHT MU
> > + *	beamformer
> 
> Is that really about _supporting_ it rather than _using_ it? Or
> _enabling_ it?
> 

Will fix. For the sake of consistency, I copy-and-pasted from VHT/HE
MU-MIMO's statement.

Ryder
diff mbox series

Patch

diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 2635e6de8101..943f2aec6042 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -670,6 +670,12 @@  struct ieee80211_fils_discovery {
  * @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
+ * @eht_su_beamformer: in AP-mode, does this BSS support operation as an EHT SU
+ *	beamformer
+ * @eht_su_beamformee: in AP-mode, does this BSS support operation as an EHT SU
+ *	beamformee
+ * @eht_mu_beamformer: in AP-mode, does this BSS support operation as an EHT MU
+ *	beamformer
  */
 struct ieee80211_bss_conf {
 	const u8 *bssid;
@@ -752,6 +758,9 @@  struct ieee80211_bss_conf {
 	bool he_su_beamformee;
 	bool he_mu_beamformer;
 	bool he_full_ul_mumimo;
+	bool eht_su_beamformer;
+	bool eht_su_beamformee;
+	bool eht_mu_beamformer;
 };
 
 /**
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index f5d43f42f6d8..6bf1cdf254f6 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -1296,6 +1296,20 @@  static int ieee80211_start_ap(struct wiphy *wiphy, struct net_device *dev,
 				IEEE80211_HE_PHY_CAP2_UL_MU_FULL_MU_MIMO;
 	}
 
+	if (params->eht_cap) {
+		link_conf->eht_su_beamformer =
+			params->eht_cap->fixed.phy_cap_info[0] &
+				IEEE80211_EHT_PHY_CAP0_SU_BEAMFORMER;
+		link_conf->eht_su_beamformee =
+			params->eht_cap->fixed.phy_cap_info[0] &
+				IEEE80211_EHT_PHY_CAP0_SU_BEAMFORMEE;
+		link_conf->eht_mu_beamformer =
+			params->eht_cap->fixed.phy_cap_info[7] &
+				(IEEE80211_EHT_PHY_CAP7_MU_BEAMFORMER_80MHZ |
+				 IEEE80211_EHT_PHY_CAP7_MU_BEAMFORMER_160MHZ |
+				 IEEE80211_EHT_PHY_CAP7_MU_BEAMFORMER_320MHZ);
+	}
+
 	if (sdata->vif.type == NL80211_IFTYPE_AP &&
 	    params->mbssid_config.tx_wdev) {
 		err = ieee80211_set_ap_mbssid_options(sdata,