2022-06-07 19:13:23

by Muna Sinada

[permalink] [raw]
Subject: [PATCH] mac80211: Add HE MU-MIMO related flags in ieee80211_bss_conf

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 <[email protected]>
---
include/net/mac80211.h | 10 ++++++++++
net/mac80211/cfg.c | 15 +++++++++++++++
2 files changed, 25 insertions(+)

diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index ebadb2103968..5c8d99e6bb1e 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -636,6 +636,12 @@ struct ieee80211_fils_discovery {
* @tx_pwr_env_num: number of @tx_pwr_env.
* @pwr_reduction: power constraint of BSS.
* @eht_support: does this BSS support EHT
+ * @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;
@@ -711,6 +717,10 @@ struct ieee80211_bss_conf {
u8 tx_pwr_env_num;
u8 pwr_reduction;
bool eht_support;
+ 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 f7896f257e1b..900046825981 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -1178,6 +1178,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,
--
2.7.4


2022-06-11 14:57:09

by Ryder Lee

[permalink] [raw]
Subject: Re: [PATCH] mac80211: Add HE MU-MIMO related flags in ieee80211_bss_conf

On Tue, 2022-06-07 at 10:54 -0700, Muna Sinada wrote:
> 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 <[email protected]>
> ---
> include/net/mac80211.h | 10 ++++++++++
> net/mac80211/cfg.c | 15 +++++++++++++++
> 2 files changed, 25 insertions(+)
>
> diff --git a/include/net/mac80211.h b/include/net/mac80211.h
> index ebadb2103968..5c8d99e6bb1e 100644
> --- a/include/net/mac80211.h
> +++ b/include/net/mac80211.h
> @@ -636,6 +636,12 @@ struct ieee80211_fils_discovery {
> * @tx_pwr_env_num: number of @tx_pwr_env.
> * @pwr_reduction: power constraint of BSS.
> * @eht_support: does this BSS support EHT
> + * @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;
> @@ -711,6 +717,10 @@ struct ieee80211_bss_conf {
> u8 tx_pwr_env_num;
> u8 pwr_reduction;
> bool eht_support;
> + 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 f7896f257e1b..900046825981 100644
> --- a/net/mac80211/cfg.c
> +++ b/net/mac80211/cfg.c
> @@ -1178,6 +1178,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_BEA
> MFORMER);
> + sdata->vif.bss_conf.he_su_beamformee =
> + !!(params->he_cap-
> >phy_cap_info[4] &
> + IEEE80211_HE_PHY_CAP4_SU_BEA
> MFORMEE);
> + sdata->vif.bss_conf.he_mu_beamformer =
> + !!(params->he_cap-
> >phy_cap_info[4] &
> + IEEE80211_HE_PHY_CAP4_MU_BEA
> MFORMER);
> + 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 &&

What about VHT? I think we should also take them into account since
user space (hostap) doesn't propagate all (not just HE) MIMO related
configurations to kernel actually.

So, I added a similar check into mt76 driver.

Ryder