summaryrefslogtreecommitdiffstats
path: root/net/mac80211/he.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2022-05-30 23:52:41 +0200
committerJohannes Berg <johannes.berg@intel.com>2022-06-20 12:55:32 +0200
commit40a27ea07949a022a083de28da99f8f472242e2e (patch)
tree3db5c267585b412df2248645359b9907906546e1 /net/mac80211/he.c
parente9aac179ad4526afa3190856b71aa41decb6dc6a (diff)
downloadlinux-40a27ea07949a022a083de28da99f8f472242e2e.tar.bz2
wifi: mac80211: make ieee80211_he_cap_ie_to_sta_he_cap() MLO-aware
Add the link_id parameter and adjust the code accordingly. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/he.c')
-rw-r--r--net/mac80211/he.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/net/mac80211/he.c b/net/mac80211/he.c
index 20448dda8c4d..e48e9a021622 100644
--- a/net/mac80211/he.c
+++ b/net/mac80211/he.c
@@ -10,7 +10,7 @@
static void
ieee80211_update_from_he_6ghz_capa(const struct ieee80211_he_6ghz_capa *he_6ghz_capa,
- struct sta_info *sta)
+ struct sta_info *sta, unsigned int link_id)
{
enum ieee80211_smps_mode smps_mode;
@@ -49,7 +49,7 @@ ieee80211_update_from_he_6ghz_capa(const struct ieee80211_he_6ghz_capa *he_6ghz_
break;
}
- sta->sta.deflink.he_6ghz_capa = *he_6ghz_capa;
+ sta->sta.link[link_id]->he_6ghz_capa = *he_6ghz_capa;
}
static void ieee80211_he_mcs_disable(__le16 *he_mcs)
@@ -108,9 +108,9 @@ ieee80211_he_cap_ie_to_sta_he_cap(struct ieee80211_sub_if_data *sdata,
struct ieee80211_supported_band *sband,
const u8 *he_cap_ie, u8 he_cap_len,
const struct ieee80211_he_6ghz_capa *he_6ghz_capa,
- struct sta_info *sta)
+ struct sta_info *sta, unsigned int link_id)
{
- struct ieee80211_sta_he_cap *he_cap = &sta->sta.deflink.he_cap;
+ struct ieee80211_sta_he_cap *he_cap = &sta->sta.link[link_id]->he_cap;
struct ieee80211_sta_he_cap own_he_cap;
struct ieee80211_he_cap_elem *he_cap_ie_elem = (void *)he_cap_ie;
u8 he_ppe_size;
@@ -153,11 +153,13 @@ ieee80211_he_cap_ie_to_sta_he_cap(struct ieee80211_sub_if_data *sdata,
he_cap->has_he = true;
- sta->deflink.cur_max_bandwidth = ieee80211_sta_cap_rx_bw(sta, 0);
- sta->sta.deflink.bandwidth = ieee80211_sta_cur_vht_bw(sta, 0);
+ sta->link[link_id]->cur_max_bandwidth =
+ ieee80211_sta_cap_rx_bw(sta, link_id);
+ sta->sta.link[link_id]->bandwidth =
+ ieee80211_sta_cur_vht_bw(sta, link_id);
if (sband->band == NL80211_BAND_6GHZ && he_6ghz_capa)
- ieee80211_update_from_he_6ghz_capa(he_6ghz_capa, sta);
+ ieee80211_update_from_he_6ghz_capa(he_6ghz_capa, sta, link_id);
ieee80211_he_mcs_intersection(&own_he_cap.he_mcs_nss_supp.rx_mcs_80,
&he_cap->he_mcs_nss_supp.rx_mcs_80,