1 Enabling beacon filtering before receving a beacon
2 might result in not having a beacon at all for the
3 current connected AP, which prevents the station
4 from entering power-save.
6 Replace the current approach (of starting beacon
7 filtering on init) and configure beacon filering
8 only after bss_conf->dtimper is set (which means
9 mac80211 already parsed a beacon).
11 Signed-off-by: Eliad Peller <eliad@wizery.com>
14 drivers/net/wireless/ti/wlcore/acx.c | 3 ++-
15 drivers/net/wireless/ti/wlcore/init.c | 4 ++--
16 drivers/net/wireless/ti/wlcore/main.c | 12 ++++++++++++
17 3 files changed, 16 insertions(+), 3 deletions(-)
19 --- a/drivers/net/wireless/ti/wlcore/acx.c
20 +++ b/drivers/net/wireless/ti/wlcore/acx.c
21 @@ -358,7 +358,8 @@ int wl1271_acx_beacon_filter_opt(struct
22 struct acx_beacon_filter_option *beacon_filter = NULL;
25 - wl1271_debug(DEBUG_ACX, "acx beacon filter opt");
26 + wl1271_debug(DEBUG_ACX, "acx beacon filter opt enable=%d",
30 wl->conf.conn.bcn_filt_mode == CONF_BCN_FILT_MODE_DISABLED)
31 --- a/drivers/net/wireless/ti/wlcore/init.c
32 +++ b/drivers/net/wireless/ti/wlcore/init.c
33 @@ -287,8 +287,8 @@ static int wl1271_init_sta_beacon_filter
37 - /* enable beacon filtering */
38 - ret = wl1271_acx_beacon_filter_opt(wl, wlvif, true);
39 + /* disable beacon filtering until we get the first beacon */
40 + ret = wl1271_acx_beacon_filter_opt(wl, wlvif, false);
44 --- a/drivers/net/wireless/ti/wlcore/main.c
45 +++ b/drivers/net/wireless/ti/wlcore/main.c
46 @@ -2941,6 +2941,11 @@ static int wlcore_unset_assoc(struct wl1
47 ret = wl1271_acx_keep_alive_mode(wl, wlvif, false);
51 + /* disable beacon filtering */
52 + ret = wl1271_acx_beacon_filter_opt(wl, wlvif, false);
57 if (test_and_clear_bit(WLVIF_FLAG_CS_PROGRESS, &wlvif->flags)) {
58 @@ -4345,6 +4350,13 @@ static void wl1271_bss_info_changed_sta(
62 + if ((changed & BSS_CHANGED_BEACON_INFO) && bss_conf->dtim_period) {
63 + /* enable beacon filtering */
64 + ret = wl1271_acx_beacon_filter_opt(wl, wlvif, true);
69 ret = wl1271_bss_erp_info_changed(wl, vif, bss_conf, changed);