e23dc4d226a0af781bfa305854dfdd1d6bfef5ec
[openwrt/staging/blogic.git] /
1 From: Muna Sinada <quic_msinada@quicinc.com>
2 Date: Wed, 5 Oct 2022 14:54:45 -0700
3 Subject: [PATCH] wifi: mac80211: Add VHT MU-MIMO related flags in
4 ieee80211_bss_conf
5
6 Adding flags for SU Beamformer, SU Beamformee, MU Beamformer and
7 MU Beamformee for VHT. This is utilized to pass MU-MIMO
8 configurations from user space to driver in AP mode.
9
10 Signed-off-by: Muna Sinada <quic_msinada@quicinc.com>
11 Link: https://lore.kernel.org/r/1665006886-23874-1-git-send-email-quic_msinada@quicinc.com
12 [fixed indentation, removed redundant !!]
13 Signed-off-by: Johannes Berg <johannes.berg@intel.com>
14 ---
15
16 --- a/include/net/mac80211.h
17 +++ b/include/net/mac80211.h
18 @@ -653,6 +653,14 @@ struct ieee80211_fils_discovery {
19 * write-protected by sdata_lock and local->mtx so holding either is fine
20 * for read access.
21 * @color_change_color: the bss color that will be used after the change.
22 + * @vht_su_beamformer: in AP mode, does this BSS support operation as an VHT SU
23 + * beamformer
24 + * @vht_su_beamformee: in AP mode, does this BSS support operation as an VHT SU
25 + * beamformee
26 + * @vht_mu_beamformer: in AP mode, does this BSS support operation as an VHT MU
27 + * beamformer
28 + * @vht_mu_beamformee: in AP mode, does this BSS support operation as an VHT MU
29 + * beamformee
30 */
31 struct ieee80211_bss_conf {
32 const u8 *bssid;
33 @@ -726,6 +734,11 @@ struct ieee80211_bss_conf {
34
35 bool color_change_active;
36 u8 color_change_color;
37 +
38 + bool vht_su_beamformer;
39 + bool vht_su_beamformee;
40 + bool vht_mu_beamformer;
41 + bool vht_mu_beamformee;
42 };
43
44 /**
45 --- a/net/mac80211/cfg.c
46 +++ b/net/mac80211/cfg.c
47 @@ -1252,6 +1252,21 @@ static int ieee80211_start_ap(struct wip
48 prev_beacon_int = link_conf->beacon_int;
49 link_conf->beacon_int = params->beacon_interval;
50
51 + if (params->vht_cap) {
52 + link_conf->vht_su_beamformer =
53 + params->vht_cap->vht_cap_info &
54 + cpu_to_le32(IEEE80211_VHT_CAP_SU_BEAMFORMER_CAPABLE);
55 + link_conf->vht_su_beamformee =
56 + params->vht_cap->vht_cap_info &
57 + cpu_to_le32(IEEE80211_VHT_CAP_SU_BEAMFORMEE_CAPABLE);
58 + link_conf->vht_mu_beamformer =
59 + params->vht_cap->vht_cap_info &
60 + cpu_to_le32(IEEE80211_VHT_CAP_MU_BEAMFORMER_CAPABLE);
61 + link_conf->vht_mu_beamformee =
62 + params->vht_cap->vht_cap_info &
63 + cpu_to_le32(IEEE80211_VHT_CAP_MU_BEAMFORMEE_CAPABLE);
64 + }
65 +
66 if (params->he_cap && params->he_oper) {
67 link_conf->he_support = true;
68 link_conf->htc_trig_based_pkt_ext =