]> git.karo-electronics.de Git - linux-beck.git/commitdiff
wl1251: only call ieee80211_beacon_loss in managed mode
authorGrazvydas Ignotas <notasas@gmail.com>
Tue, 22 Apr 2014 00:09:55 +0000 (03:09 +0300)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 13 May 2014 19:56:27 +0000 (15:56 -0400)
ieee80211_beacon_loss() is only to be called in managed mode,
but the firmware may send the sync timeout event at any time,
so do a check before calling.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Tested-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ti/wl1251/event.c

index db0105313745f08a02c9d408564c5d8029aa05ca..c98630394a1a299b77b907ce53851b62b7d84030 100644 (file)
@@ -124,11 +124,12 @@ static int wl1251_event_process(struct wl1251 *wl, struct event_mailbox *mbox)
                        return ret;
        }
 
-       if (wl->vif && vector & SYNCHRONIZATION_TIMEOUT_EVENT_ID) {
+       if (vector & SYNCHRONIZATION_TIMEOUT_EVENT_ID) {
                wl1251_debug(DEBUG_EVENT, "SYNCHRONIZATION_TIMEOUT_EVENT");
 
                /* indicate to the stack, that beacons have been lost */
-               ieee80211_beacon_loss(wl->vif);
+               if (wl->vif && wl->vif->type == NL80211_IFTYPE_STATION)
+                       ieee80211_beacon_loss(wl->vif);
        }
 
        if (vector & REGAINED_BSS_EVENT_ID) {