wifi: mac80211: move tdls_chan_switch_prohibited to link data
authorJohannes Berg <johannes.berg@intel.com>
Wed, 29 Jun 2022 10:01:41 +0000 (12:01 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 15 Jul 2022 09:43:17 +0000 (11:43 +0200)
This value should be per link, since a TDLS connection is
only established on a given link.

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

index 9214883eb0a86a6c5041c6d798c3a96e66478b94..e0ddecbb50aa480554fba53bc596a515d76af9a8 100644 (file)
@@ -1759,7 +1759,7 @@ static int sta_apply_parameters(struct ieee80211_local *local,
 
        /* mark TDLS channel switch support, if the AP allows it */
        if (test_sta_flag(sta, WLAN_STA_TDLS_PEER) &&
-           !sdata->u.mgd.tdls_chan_switch_prohibited &&
+           !sdata->deflink.u.mgd.tdls_chan_switch_prohibited &&
            params->ext_capab_len >= 4 &&
            params->ext_capab[3] & WLAN_EXT_CAPA4_TDLS_CHAN_SWITCH)
                set_sta_flag(sta, WLAN_STA_TDLS_CHAN_SWITCH);
index 2cf13ea4c9f74b20bde29574068a8812ced575e4..a8211ced719ef1e8d81a1ed9e8d648685373fc08 100644 (file)
@@ -514,7 +514,6 @@ struct ieee80211_if_managed {
        struct sk_buff *orig_teardown_skb; /* The original teardown skb */
        struct sk_buff *teardown_skb; /* A copy to send through the AP */
        spinlock_t teardown_lock; /* To lock changing teardown_skb */
-       bool tdls_chan_switch_prohibited;
        bool tdls_wider_bw_prohibited;
 
        /* WMM-AC TSPEC support */
@@ -880,6 +879,8 @@ struct ieee80211_link_data_managed {
 
        s16 p2p_noa_index;
 
+       bool tdls_chan_switch_prohibited;
+
        bool have_beacon;
        bool tracking_signal_avg;
        bool disable_wmm_tracking;
index 6f25ac2055d5f3b4d8b2db4de355411601384b5f..267229462973b29c9ca9e4bd93ece4eee85bfbbb 100644 (file)
@@ -3504,7 +3504,7 @@ static bool ieee80211_assoc_success(struct ieee80211_sub_if_data *sdata,
        }
 
        sdata->vif.cfg.aid = aid;
-       ifmgd->tdls_chan_switch_prohibited =
+       sdata->deflink.u.mgd.tdls_chan_switch_prohibited =
                elems->ext_capab && elems->ext_capab_len >= 5 &&
                (elems->ext_capab[4] & WLAN_EXT_CAPA5_TDLS_CH_SW_PROHIBITED);