wl12xx: keep beacon-filtering enabled during STA operation

Enable beacon filtering on STA init, and don't disable it when entering
active mode. Otherwise dynamic-PS supports means we receive beacons from
the current AP during any Tx/Rx performed by the driver.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
diff --git a/drivers/net/wireless/wl12xx/init.c b/drivers/net/wireless/wl12xx/init.c
index c6084f8..14ff01e 100644
--- a/drivers/net/wireless/wl12xx/init.c
+++ b/drivers/net/wireless/wl12xx/init.c
@@ -254,17 +254,17 @@
 	return 0;
 }
 
-static int wl1271_init_beacon_filter(struct wl1271 *wl,
-				     struct wl12xx_vif *wlvif)
+static int wl1271_init_sta_beacon_filter(struct wl1271 *wl,
+					 struct wl12xx_vif *wlvif)
 {
 	int ret;
 
-	/* disable beacon filtering at this stage */
-	ret = wl1271_acx_beacon_filter_opt(wl, wlvif, false);
+	ret = wl1271_acx_beacon_filter_table(wl, wlvif);
 	if (ret < 0)
 		return ret;
 
-	ret = wl1271_acx_beacon_filter_table(wl, wlvif);
+	/* enable beacon filtering */
+	ret = wl1271_acx_beacon_filter_opt(wl, wlvif, true);
 	if (ret < 0)
 		return ret;
 
@@ -529,7 +529,7 @@
 		return ret;
 
 	/* Beacon filtering */
-	ret = wl1271_init_beacon_filter(wl, wlvif);
+	ret = wl1271_init_sta_beacon_filter(wl, wlvif);
 	if (ret < 0)
 		return ret;