]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
wl12xx: handle idle changes per-interface
authorEliad Peller <eliad@wizery.com>
Sun, 23 Oct 2011 06:21:55 +0000 (08:21 +0200)
committerLuciano Coelho <coelho@ti.com>
Tue, 8 Nov 2011 13:58:46 +0000 (15:58 +0200)
Idle changes are currently handled per hardware.
However, some operations should be done only per-interface.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
drivers/net/wireless/wl12xx/main.c

index aa1c0f3ebeeb08d5ee9247f90296a3709f7325d5..dbb088eadf71f5089f7e02c24425ff1f8584fefb 100644 (file)
@@ -2540,13 +2540,6 @@ static int wl12xx_config_vif(struct wl1271 *wl, struct wl12xx_vif *wlvif,
                }
        }
 
-       if (changed & IEEE80211_CONF_CHANGE_IDLE && !is_ap) {
-               ret = wl1271_sta_handle_idle(wl, wlvif,
-                                       conf->flags & IEEE80211_CONF_IDLE);
-               if (ret < 0)
-                       wl1271_warning("idle mode change failed %d", ret);
-       }
-
        /*
         * if mac80211 changes the PSM mode, make sure the mode is not
         * incorrectly changed after the pspoll failure active window.
@@ -3617,6 +3610,12 @@ static void wl1271_bss_info_changed_sta(struct wl1271 *wl,
                do_join = true;
        }
 
+       if (changed & BSS_CHANGED_IDLE) {
+               ret = wl1271_sta_handle_idle(wl, wlvif, bss_conf->idle);
+               if (ret < 0)
+                       wl1271_warning("idle mode change failed %d", ret);
+       }
+
        if ((changed & BSS_CHANGED_CQM)) {
                bool enable = false;
                if (bss_conf->cqm_rssi_thold)