2023-02-08 22:09:21

by Ryder Lee

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

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

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,
--
2.18.0



2023-02-08 22:09:22

by Ryder Lee

[permalink] [raw]
Subject: [PATCH 2/2] wifi: mac80211: add LDPC related flags in ieee80211_bss_conf

This is utilized to pass LDPC configurations from user space (i.e. hostap) to driver.

Signed-off-by: Ryder Lee <[email protected]>
---
include/net/mac80211.h | 6 ++++++
net/mac80211/cfg.c | 12 ++++++++++++
2 files changed, 18 insertions(+)

diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 943f2aec6042..76a12bec71d5 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -653,6 +653,9 @@ 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.
+ * @ht_ldpc: in AP mode, indicates interface owns HT LDPC capability.
+ * @vht_ldpc: in AP mode, indicates interface owns VHT LDPC capability.
+ * @he_ldpc: in AP mode, indicates interface owns HE LDPC capability.
* @vht_su_beamformer: in AP mode, does this BSS support operation as an VHT SU
* beamformer
* @vht_su_beamformee: in AP mode, does this BSS support operation as an VHT SU
@@ -750,6 +753,9 @@ struct ieee80211_bss_conf {
bool color_change_active;
u8 color_change_color;

+ bool ht_ldpc;
+ bool vht_ldpc;
+ bool he_ldpc;
bool vht_su_beamformer;
bool vht_su_beamformee;
bool vht_mu_beamformer;
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 6bf1cdf254f6..a080010da8fb 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -1252,7 +1252,16 @@ 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->ht_cap) {
+ link_conf->ht_ldpc =
+ params->ht_cap->cap_info &
+ cpu_to_le16(IEEE80211_HT_CAP_LDPC_CODING);
+ }
+
if (params->vht_cap) {
+ link_conf->vht_ldpc =
+ params->vht_cap->vht_cap_info &
+ cpu_to_le32(IEEE80211_VHT_CAP_RXLDPC);
link_conf->vht_su_beamformer =
params->vht_cap->vht_cap_info &
cpu_to_le32(IEEE80211_VHT_CAP_SU_BEAMFORMER_CAPABLE);
@@ -1282,6 +1291,9 @@ static int ieee80211_start_ap(struct wiphy *wiphy, struct net_device *dev,
}

if (params->he_cap) {
+ link_conf->he_ldpc =
+ params->he_cap->phy_cap_info[1] &
+ IEEE80211_HE_PHY_CAP1_LDPC_CODING_IN_PAYLOAD;
link_conf->he_su_beamformer =
params->he_cap->phy_cap_info[3] &
IEEE80211_HE_PHY_CAP3_SU_BEAMFORMER;
--
2.18.0


2023-02-15 17:42:19

by Johannes Berg

[permalink] [raw]
Subject: Re: [PATCH 1/2] wifi: mac80211: add EHT MU-MIMO related flags in ieee80211_bss_conf

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


2023-02-15 17:43:20

by Johannes Berg

[permalink] [raw]
Subject: Re: [PATCH 2/2] wifi: mac80211: add LDPC related flags in ieee80211_bss_conf

On Thu, 2023-02-09 at 06:09 +0800, Ryder Lee wrote:
> This is utilized to pass LDPC configurations from user space (i.e. hostap) to driver.

again, hostapd

why do we need this?

> + * @ht_ldpc: in AP mode, indicates interface owns HT LDPC capability.
> + * @vht_ldpc: in AP mode, indicates interface owns VHT LDPC capability.
> + * @he_ldpc: in AP mode, indicates interface owns HE LDPC capability.

what do you mean by "owns" the capability? Has? Uses it?

> diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
> index 6bf1cdf254f6..a080010da8fb 100644
> --- a/net/mac80211/cfg.c
> +++ b/net/mac80211/cfg.c
> @@ -1252,7 +1252,16 @@ 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->ht_cap) {
> + link_conf->ht_ldpc =
> + params->ht_cap->cap_info &
> + cpu_to_le16(IEEE80211_HT_CAP_LDPC_CODING);
> + }

No need for braces.

johannes

2023-02-17 09:21:32

by Ryder Lee

[permalink] [raw]
Subject: Re: [PATCH 1/2] wifi: mac80211: add EHT MU-MIMO related flags in ieee80211_bss_conf

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

2023-02-17 09:33:11

by Ryder Lee

[permalink] [raw]
Subject: Re: [PATCH 2/2] wifi: mac80211: add LDPC related flags in ieee80211_bss_conf

On Wed, 2023-02-15 at 18:43 +0100, Johannes Berg wrote:
> On Thu, 2023-02-09 at 06:09 +0800, Ryder Lee wrote:
> > This is utilized to pass LDPC configurations from user space (i.e.
> > hostap) to driver.
>
> again, hostapd
>
> why do we need this?
>

User can configure hostapd.conf "# LDPC coding capability: [LDPC] =
supported" to decide if an AP mode has LDPC caps. They are actaully
long-standing configurations of hostapd, but have never been propegated
to kernel. One of our use cases is for certification setup.

> > + * @ht_ldpc: in AP mode, indicates interface owns HT LDPC
> > capability.
> > + * @vht_ldpc: in AP mode, indicates interface owns VHT LDPC
> > capability.
> > + * @he_ldpc: in AP mode, indicates interface owns HE LDPC
> > capability.
>
> what do you mean by "owns" the capability? Has? Uses it?

Copy-and-pasted from @mu_mimo_owner, but indeed, "has" is better. Will
fix.

> > diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
> > index 6bf1cdf254f6..a080010da8fb 100644
> > --- a/net/mac80211/cfg.c
> > +++ b/net/mac80211/cfg.c
> > @@ -1252,7 +1252,16 @@ 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->ht_cap) {
> > + link_conf->ht_ldpc =
> > + params->ht_cap->cap_info &
> > + cpu_to_le16(IEEE80211_HT_CAP_LDPC_CODIN
> > G);
> > + }
>
> No need for braces.
>
OK.
Ryder