diff options
author | Johannes Berg <johannes.berg@intel.com> | 2022-06-24 16:28:33 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2022-07-15 11:43:16 +0200 |
commit | 42ed6748afa45fb3f540a5fd83595eee050c48fe (patch) | |
tree | dcc791f3ab742a9472586edbed23600f4d8dbf40 /net/mac80211/mlme.c | |
parent | b65567b03c9502e67bed6707cb53a4c730c2bee2 (diff) | |
download | linux-42ed6748afa45fb3f540a5fd83595eee050c48fe.tar.gz linux-42ed6748afa45fb3f540a5fd83595eee050c48fe.tar.bz2 linux-42ed6748afa45fb3f540a5fd83595eee050c48fe.zip |
wifi: mac80211: mlme: do IEEE80211_STA_RESET_SIGNAL_AVE per link
Remove the IEEE80211_STA_RESET_SIGNAL_AVE flag and use
a bool instead, but invert the polarity (now calling it
tracking_signal_avg) so we don't have to initialize it,
and put that into the link instead.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r-- | net/mac80211/mlme.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index a2e8fe9b43ab..8cd275c3be70 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -2317,8 +2317,6 @@ static void ieee80211_set_associated(struct ieee80211_sub_if_data *sdata, ieee80211_check_rate_mask(sdata); - sdata->u.mgd.flags |= IEEE80211_STA_RESET_SIGNAL_AVE; - if (sdata->vif.p2p || sdata->vif.driver_flags & IEEE80211_VIF_GET_NOA_UPDATE) { const struct cfg80211_bss_ies *ies; @@ -2523,6 +2521,7 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata, sdata->vif.bss_conf.beacon_rate = NULL; sdata->deflink.u.mgd.have_beacon = false; + sdata->deflink.u.mgd.tracking_signal_avg = false; ifmgd->flags = 0; sdata->deflink.u.mgd.conn_flags = 0; @@ -4052,8 +4051,8 @@ static void ieee80211_handle_beacon_sig(struct ieee80211_sub_if_data *sdata, { /* Track average RSSI from the Beacon frames of the current AP */ - if (ifmgd->flags & IEEE80211_STA_RESET_SIGNAL_AVE) { - ifmgd->flags &= ~IEEE80211_STA_RESET_SIGNAL_AVE; + if (!sdata->deflink.u.mgd.tracking_signal_avg) { + sdata->deflink.u.mgd.tracking_signal_avg = true; ewma_beacon_signal_init(&sdata->deflink.u.mgd.ave_beacon_signal); sdata->deflink.u.mgd.last_cqm_event_signal = 0; sdata->deflink.u.mgd.count_beacon_signal = 1; |