Skip to content

Commit bbc6f03

Browse files
committed
mac80211: reset profile_periodicity/ema_ap
Apparently we never clear these values, so they'll remain set since the setting of them is conditional. Clear the values in the relevant other cases. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Luca Coelho <[email protected]> Link: https://lore.kernel.org/r/iwlwifi.20210618133832.316e32d136a9.I2a12e51814258e1e1b526103894f4b9f19a91c8d@changeid Signed-off-by: Johannes Berg <[email protected]>
1 parent 0288e5e commit bbc6f03

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

net/mac80211/mlme.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4062,10 +4062,14 @@ static void ieee80211_rx_mgmt_beacon(struct ieee80211_sub_if_data *sdata,
40624062
if (elems.mbssid_config_ie)
40634063
bss_conf->profile_periodicity =
40644064
elems.mbssid_config_ie->profile_periodicity;
4065+
else
4066+
bss_conf->profile_periodicity = 0;
40654067

40664068
if (elems.ext_capab_len >= 11 &&
40674069
(elems.ext_capab[10] & WLAN_EXT_CAPA11_EMA_SUPPORT))
40684070
bss_conf->ema_ap = true;
4071+
else
4072+
bss_conf->ema_ap = false;
40694073

40704074
/* continue assoc process */
40714075
ifmgd->assoc_data->timeout = jiffies;
@@ -5802,12 +5806,16 @@ int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata,
58025806
beacon_ies->data, beacon_ies->len);
58035807
if (elem && elem->datalen >= 3)
58045808
sdata->vif.bss_conf.profile_periodicity = elem->data[2];
5809+
else
5810+
sdata->vif.bss_conf.profile_periodicity = 0;
58055811

58065812
elem = cfg80211_find_elem(WLAN_EID_EXT_CAPABILITY,
58075813
beacon_ies->data, beacon_ies->len);
58085814
if (elem && elem->datalen >= 11 &&
58095815
(elem->data[10] & WLAN_EXT_CAPA11_EMA_SUPPORT))
58105816
sdata->vif.bss_conf.ema_ap = true;
5817+
else
5818+
sdata->vif.bss_conf.ema_ap = false;
58115819
} else {
58125820
assoc_data->timeout = jiffies;
58135821
assoc_data->timeout_started = true;

0 commit comments

Comments
 (0)