@@ -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;
@@ -2316,8 +2316,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;
@@ -2522,6 +2520,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;
@@ -4051,8 +4050,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;