Commit 6359598d authored by Johannes Berg's avatar Johannes Berg

wifi: mac80211: split IEEE80211_STA_DISABLE_WMM to link data

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: default avatarJohannes Berg <johannes.berg@intel.com>
parent 5bd5666d
......@@ -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;
......
......@@ -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))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment