wifi: mac80211: split IEEE80211_STA_DISABLE_WMM to link data
authorJohannes Berg <johannes.berg@intel.com>
Mon, 27 Jun 2022 11:13:04 +0000 (13:13 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 15 Jul 2022 09:43:16 +0000 (11:43 +0200)
If we decide to stop tracking QoS/WMM parameters, then
this should be a per-link decision. Move the flag to
the link instead.

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

index 20b9979d150656e25d0fbe51fdde3beb660f1113..3e360bcaa03ba812031a8cdb6af8f28e1449406e 100644 (file)
@@ -361,7 +361,6 @@ enum ieee80211_sta_flags {
        IEEE80211_STA_MFP_ENABLED       = BIT(6),
        IEEE80211_STA_UAPSD_ENABLED     = BIT(7),
        IEEE80211_STA_NULLFUNC_ACKED    = BIT(8),
-       IEEE80211_STA_DISABLE_WMM       = BIT(14),
        IEEE80211_STA_ENABLE_RRM        = BIT(15),
 };
 
@@ -883,6 +882,7 @@ struct ieee80211_link_data_managed {
 
        bool have_beacon;
        bool tracking_signal_avg;
+       bool disable_wmm_tracking;
 
        bool csa_waiting_bcn;
        bool csa_ignored_same_chan;
index 35c62e940946dd073af83816422a98efc9402683..918f095950f049f066dea7bf1595bf575c03bcf2 100644 (file)
@@ -2540,6 +2540,7 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata,
 
        link->u.mgd.have_beacon = false;
        link->u.mgd.tracking_signal_avg = false;
+       link->u.mgd.disable_wmm_tracking = false;
 
        ifmgd->flags = 0;
        link->u.mgd.conn_flags = 0;
@@ -3795,21 +3796,21 @@ static bool ieee80211_assoc_success(struct ieee80211_sub_if_data *sdata,
        link->u.mgd.wmm_last_param_set = -1;
        link->u.mgd.mu_edca_last_param_set = -1;
 
-       if (ifmgd->flags & IEEE80211_STA_DISABLE_WMM) {
+       if (link->u.mgd.disable_wmm_tracking) {
                ieee80211_set_wmm_default(link, false, false);
        } else if (!ieee80211_sta_wmm_params(local, link, elems->wmm_param,
                                             elems->wmm_param_len,
                                             elems->mu_edca_param_set)) {
                /* still enable QoS since we might have HT/VHT */
                ieee80211_set_wmm_default(link, false, true);
-               /* set the disable-WMM flag in this case to disable
+               /* disable WMM tracking in this case to disable
                 * tracking WMM parameter changes in the beacon if
                 * the parameters weren't actually valid. Doing so
                 * avoids changing parameters very strangely when
                 * the AP is going back and forth between valid and
                 * invalid parameters.
                 */
-               ifmgd->flags |= IEEE80211_STA_DISABLE_WMM;
+               link->u.mgd.disable_wmm_tracking = true;
        }
        changed |= BSS_CHANGED_QOS;
 
@@ -4397,7 +4398,7 @@ static void ieee80211_rx_mgmt_beacon(struct ieee80211_link_data *link,
                                         rx_status->device_timestamp,
                                         elems, true);
 
-       if (!(ifmgd->flags & IEEE80211_STA_DISABLE_WMM) &&
+       if (!link->u.mgd.disable_wmm_tracking &&
            ieee80211_sta_wmm_params(local, link, elems->wmm_param,
                                     elems->wmm_param_len,
                                     elems->mu_edca_param_set))