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
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.
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>
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
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
24 + * @vht_su_beamformee: in AP mode, does this BSS support operation as an VHT SU
26 + * @vht_mu_beamformer: in AP mode, does this BSS support operation as an VHT MU
28 + * @vht_mu_beamformee: in AP mode, does this BSS support operation as an VHT MU
31 struct ieee80211_bss_conf {
33 @@ -726,6 +734,11 @@ struct ieee80211_bss_conf {
35 bool color_change_active;
36 u8 color_change_color;
38 + bool vht_su_beamformer;
39 + bool vht_su_beamformee;
40 + bool vht_mu_beamformer;
41 + bool vht_mu_beamformee;
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;
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);
66 if (params->he_cap && params->he_oper) {
67 link_conf->he_support = true;
68 link_conf->htc_trig_based_pkt_ext =