struct acx_beacon_filter_option *beacon_filter = NULL;
        int ret = 0;
 
-       wl1271_debug(DEBUG_ACX, "acx beacon filter opt");
+       wl1271_debug(DEBUG_ACX, "acx beacon filter opt enable=%d",
+                    enable_filter);
 
        if (enable_filter &&
            wl->conf.conn.bcn_filt_mode == CONF_BCN_FILT_MODE_DISABLED)
 
        if (ret < 0)
                return ret;
 
-       /* enable beacon filtering */
-       ret = wl1271_acx_beacon_filter_opt(wl, wlvif, true);
+       /* disable beacon filtering until we get the first beacon */
+       ret = wl1271_acx_beacon_filter_opt(wl, wlvif, false);
        if (ret < 0)
                return ret;
 
 
                ret = wl1271_acx_keep_alive_mode(wl, wlvif, false);
                if (ret < 0)
                        return ret;
+
+               /* disable beacon filtering */
+               ret = wl1271_acx_beacon_filter_opt(wl, wlvif, false);
+               if (ret < 0)
+                       return ret;
        }
 
        if (test_and_clear_bit(WLVIF_FLAG_CS_PROGRESS, &wlvif->flags)) {
                }
        }
 
+       if ((changed & BSS_CHANGED_BEACON_INFO) && bss_conf->dtim_period) {
+               /* enable beacon filtering */
+               ret = wl1271_acx_beacon_filter_opt(wl, wlvif, true);
+               if (ret < 0)
+                       goto out;
+       }
+
        ret = wl1271_bss_erp_info_changed(wl, vif, bss_conf, changed);
        if (ret < 0)
                goto out;