diff options
author | Johannes Berg <johannes.berg@intel.com> | 2022-06-24 17:28:33 +0300 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2022-07-15 12:43:16 +0300 |
commit | 42ed6748afa45fb3f540a5fd83595eee050c48fe (patch) | |
tree | dcc791f3ab742a9472586edbed23600f4d8dbf40 /net/mac80211 | |
parent | b65567b03c9502e67bed6707cb53a4c730c2bee2 (diff) | |
download | linux-42ed6748afa45fb3f540a5fd83595eee050c48fe.tar.xz |
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')
-rw-r--r-- | net/mac80211/ieee80211_i.h | 2 | ||||
-rw-r--r-- | net/mac80211/mlme.c | 7 |
2 files changed, 4 insertions, 5 deletions
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index 699dabaa9f0d..711129edd923 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h @@ -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_RESET_SIGNAL_AVE = BIT(9), IEEE80211_STA_DISABLE_WMM = BIT(14), IEEE80211_STA_ENABLE_RRM = BIT(15), }; @@ -885,6 +884,7 @@ struct ieee80211_link_data_managed { s16 p2p_noa_index; bool have_beacon; + bool tracking_signal_avg; bool csa_waiting_bcn; bool csa_ignored_same_chan; 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; |