wifi: mac80211: add link_id to eht.c code for MLO
authorJohannes Berg <johannes.berg@intel.com>
Mon, 30 May 2022 21:22:19 +0000 (23:22 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 20 Jun 2022 10:55:27 +0000 (12:55 +0200)
Update the code in eht.c and add the link_id parameter where
necessary.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/cfg.c
net/mac80211/eht.c
net/mac80211/ieee80211_i.h
net/mac80211/mlme.c

index 53aac8f277e1ec79da14406144b649ee14790503..9780d70fcf28be5996715d739769ea67d9980d03 100644 (file)
@@ -1778,7 +1778,7 @@ static int sta_apply_parameters(struct ieee80211_local *local,
                                                    params->he_capa_len,
                                                    params->eht_capa,
                                                    params->eht_capa_len,
-                                                   sta);
+                                                   sta, 0);
 
        if (params->opmode_notif_used) {
                /* returned value is only needed for rc update, but the
index 2d9c6e845ce4942c54873d49d07fb8feb3a78892..de762a803c38d175accc293f0f624b723763c5ba 100644 (file)
@@ -12,9 +12,11 @@ ieee80211_eht_cap_ie_to_sta_eht_cap(struct ieee80211_sub_if_data *sdata,
                                    struct ieee80211_supported_band *sband,
                                    const u8 *he_cap_ie, u8 he_cap_len,
                                    const struct ieee80211_eht_cap_elem *eht_cap_ie_elem,
-                                   u8 eht_cap_len, struct sta_info *sta)
+                                   u8 eht_cap_len, struct sta_info *sta,
+                                   unsigned int link_id)
 {
-       struct ieee80211_sta_eht_cap *eht_cap = &sta->sta.deflink.eht_cap;
+       struct ieee80211_sta_eht_cap *eht_cap =
+               &sta->sta.link[link_id]->eht_cap;
        struct ieee80211_he_cap_elem *he_cap_ie_elem = (void *)he_cap_ie;
        u8 eht_ppe_size = 0;
        u8 mcs_nss_size;
@@ -71,6 +73,8 @@ ieee80211_eht_cap_ie_to_sta_eht_cap(struct ieee80211_sub_if_data *sdata,
 
        eht_cap->has_eht = 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);
 }
index 5be96b0bbd96b3fb4b281014e41558d75aef9913..c59dc8f6126b46808bb4423bed2c843b481d5366 100644 (file)
@@ -2577,5 +2577,6 @@ ieee80211_eht_cap_ie_to_sta_eht_cap(struct ieee80211_sub_if_data *sdata,
                                    struct ieee80211_supported_band *sband,
                                    const u8 *he_cap_ie, u8 he_cap_len,
                                    const struct ieee80211_eht_cap_elem *eht_cap_ie_elem,
-                                   u8 eht_cap_len, struct sta_info *sta);
+                                   u8 eht_cap_len, struct sta_info *sta,
+                                   unsigned int link_id);
 #endif /* IEEE80211_I_H */
index 643ef0ae786e481b00ca9028464ce315126157a1..459780169e23ad658f087472f924791aee5288fa 100644 (file)
@@ -3599,7 +3599,7 @@ static bool ieee80211_assoc_success(struct ieee80211_sub_if_data *sdata,
                                                            elems->he_cap_len,
                                                            elems->eht_cap,
                                                            elems->eht_cap_len,
-                                                           sta);
+                                                           sta, 0);
 
                        bss_conf->eht_support = sta->sta.deflink.eht_cap.has_eht;
                } else {