wl1271: Removed checking of PSM from handling BSS_LOST_EVENT
authorTeemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Fri, 26 Mar 2010 10:53:26 +0000 (12:53 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 31 Mar 2010 18:39:15 +0000 (14:39 -0400)
Change the driver to call ieee80211_beacon_loss function always when
BSS_LOST_EVENT is received. Reason for the change is that entering PSM
might fail before driver receives BSS_LOST_EVENT. In such case the
driver would disable PSM and the stack would not be notified about beacon
loss and connection loss detection would be delayed by tens of seconds.

Signed-off-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/wl12xx/wl1271_event.c

index 4d35af96c597c43256a3f783eb9162e87e161090..a5c1910a0247935774842536b4c08a77c9bf54f3 100644 (file)
@@ -173,9 +173,12 @@ static int wl1271_event_process(struct wl1271 *wl, struct event_mailbox *mbox)
         * The BSS_LOSE_EVENT_ID is only needed while psm (and hence beacon
         * filtering) is enabled. Without PSM, the stack will receive all
         * beacons and can detect beacon loss by itself.
+        *
+        * As there's possibility that the driver disables PSM before receiving
+        * BSS_LOSE_EVENT, beacon loss has to be reported to the stack.
+        *
         */
-       if (vector & BSS_LOSE_EVENT_ID &&
-           test_bit(WL1271_FLAG_PSM, &wl->flags)) {
+       if (vector & BSS_LOSE_EVENT_ID) {
                wl1271_debug(DEBUG_EVENT, "BSS_LOSE_EVENT");
 
                /* indicate to the stack, that beacons have been lost */