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>
This commit is contained in:
parent
b65567b03c
commit
42ed6748af
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user