diff mbox series

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

Message ID 1660286767-11853-1-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
MU Beamformee for VHT. 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 |  9 +++++++++
 net/mac80211/cfg.c     | 15 +++++++++++++++
 2 files changed, 24 insertions(+)

Comments

Johannes Berg Aug. 26, 2022, 8:15 a.m. UTC | #1
On Thu, 2022-08-11 at 23:46 -0700, Muna Sinada wrote:
> 
> + * @vht_su_beamformer: does this BSS support operation as an VHT SU beamformer
> + * @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


Should probably say that you meant this only for AP mode?

Though why not fill it also in client mode?

>  	link_conf->beacon_int = params->beacon_interval;

You rebased on a multi-link tree ...

> +	if (params->vht_cap) {
> +		sdata->vif.bss_conf.vht_su_beamformer =


but still used vif.bss_conf :)

Please respin with MLO support.

johannes
diff mbox series

Patch

diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index f198af600b5e..893cc7b98448 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -651,6 +651,10 @@  struct ieee80211_fils_discovery {
  *	write-protected by sdata_lock and local->mtx so holding either is fine
  *	for read access.
  * @color_change_color: the bss color that will be used after the change.
+ * @vht_su_beamformer: does this BSS support operation as an VHT SU beamformer
+ * @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
  */
 struct ieee80211_bss_conf {
 	const u8 *bssid;
@@ -724,6 +728,11 @@  struct ieee80211_bss_conf {
 
 	bool color_change_active;
 	u8 color_change_color;
+
+	bool vht_su_beamformer;
+	bool vht_su_beamformee;
+	bool vht_mu_beamformer;
+	bool vht_mu_beamformee;
 };
 
 /**
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index a4f6971b7a19..b13ce9ecfda8 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -1179,6 +1179,21 @@  static int ieee80211_start_ap(struct wiphy *wiphy, struct net_device *dev,
 	prev_beacon_int = link_conf->beacon_int;
 	link_conf->beacon_int = params->beacon_interval;
 
+	if (params->vht_cap) {
+		sdata->vif.bss_conf.vht_su_beamformer =
+		       !!(params->vht_cap->vht_cap_info &
+			  cpu_to_le32(IEEE80211_VHT_CAP_SU_BEAMFORMER_CAPABLE));
+		sdata->vif.bss_conf.vht_su_beamformee =
+		       !!(params->vht_cap->vht_cap_info &
+			  cpu_to_le32(IEEE80211_VHT_CAP_SU_BEAMFORMEE_CAPABLE));
+		sdata->vif.bss_conf.vht_mu_beamformer =
+		       !!(params->vht_cap->vht_cap_info &
+			  cpu_to_le32(IEEE80211_VHT_CAP_MU_BEAMFORMER_CAPABLE));
+		sdata->vif.bss_conf.vht_mu_beamformee =
+		       !!(params->vht_cap->vht_cap_info &
+			  cpu_to_le32(IEEE80211_VHT_CAP_MU_BEAMFORMEE_CAPABLE));
+	}
+
 	if (params->he_cap && params->he_oper) {
 		link_conf->he_support = true;
 		link_conf->htc_trig_based_pkt_ext =