blob: 74c0d0792824d92a3a854ab7464fea18e692e5c7 [file] [log] [blame]
developerebaa5512023-04-19 18:23:21 +08001From 4244ed072fedc6f391ddad20fbc70bbb9dfb7c2c Mon Sep 17 00:00:00 2001
2From: Ryder Lee <ryder.lee@mediatek.com>
3Date: Sat, 18 Feb 2023 01:48:59 +0800
4Subject: [PATCH 9/9] wifi: mac80211: add EHT MU-MIMO related flags in
5 ieee80211_bss_conf
6
7Similar to VHT/HE. This is utilized to pass MU-MIMO configurations
8from user space (i.e. hostapd) to driver.
9
10Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
11Link: https://lore.kernel.org/r/8d9966c4c1e77cb1ade77d42bdc49905609192e9.1676628065.git.ryder.lee@mediatek.com
12[move into combined if statement, reset on !eht]
13Signed-off-by: Johannes Berg <johannes.berg@intel.com>
14---
15 include/net/mac80211.h | 9 +++++++++
16 net/mac80211/cfg.c | 16 ++++++++++++++++
17 2 files changed, 25 insertions(+)
18
19diff --git a/include/net/mac80211.h b/include/net/mac80211.h
20index c4ff6a3..24d2a66 100644
21--- a/include/net/mac80211.h
22+++ b/include/net/mac80211.h
23@@ -676,6 +676,12 @@ struct ieee80211_fils_discovery {
24 * @he_full_ul_mumimo: does this BSS support the reception (AP) or transmission
25 * (non-AP STA) of an HE TB PPDU on an RU that spans the entire PPDU
26 * bandwidth
27+ * @eht_su_beamformer: in AP-mode, does this BSS enable operation as an EHT SU
28+ * beamformer
29+ * @eht_su_beamformee: in AP-mode, does this BSS enable operation as an EHT SU
30+ * beamformee
31+ * @eht_mu_beamformer: in AP-mode, does this BSS enable operation as an EHT MU
32+ * beamformer
33 */
34 struct ieee80211_bss_conf {
35 const u8 *bssid;
36@@ -764,6 +770,9 @@ struct ieee80211_bss_conf {
37 bool he_su_beamformee;
38 bool he_mu_beamformer;
39 bool he_full_ul_mumimo;
40+ bool eht_su_beamformer;
41+ bool eht_su_beamformee;
42+ bool eht_mu_beamformer;
43 };
44
45 /**
46diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
47index 6defc1d..49760bf 100644
48--- a/net/mac80211/cfg.c
49+++ b/net/mac80211/cfg.c
50@@ -1310,6 +1310,22 @@ static int ieee80211_start_ap(struct wiphy *wiphy, struct net_device *dev,
51 if (params->eht_cap) {
52 link_conf->eht_puncturing = params->punct_bitmap;
53 changed |= BSS_CHANGED_EHT_PUNCTURING;
54+
55+ link_conf->eht_su_beamformer =
56+ params->eht_cap->fixed.phy_cap_info[0] &
57+ IEEE80211_EHT_PHY_CAP0_SU_BEAMFORMER;
58+ link_conf->eht_su_beamformee =
59+ params->eht_cap->fixed.phy_cap_info[0] &
60+ IEEE80211_EHT_PHY_CAP0_SU_BEAMFORMEE;
61+ link_conf->eht_mu_beamformer =
62+ params->eht_cap->fixed.phy_cap_info[7] &
63+ (IEEE80211_EHT_PHY_CAP7_MU_BEAMFORMER_80MHZ |
64+ IEEE80211_EHT_PHY_CAP7_MU_BEAMFORMER_160MHZ |
65+ IEEE80211_EHT_PHY_CAP7_MU_BEAMFORMER_320MHZ);
66+ } else {
67+ link_conf->eht_su_beamformer = false;
68+ link_conf->eht_su_beamformee = false;
69+ link_conf->eht_mu_beamformer = false;
70 }
71
72 if (sdata->vif.type == NL80211_IFTYPE_AP &&
73--
742.39.2
75