diff options
author | Grazvydas Ignotas <notasas@gmail.com> | 2014-04-21 20:09:55 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-05-13 15:56:27 -0400 |
commit | e5b02f649bbe2c412e833951c7ef62c14191daee (patch) | |
tree | 4fdceba4fe1c07ba2d2abee86d24b4b2f4636f51 /drivers/net/wireless/ti | |
parent | 863bdbc91803b42cf7628e34f41dbd142d8de645 (diff) |
wl1251: only call ieee80211_beacon_loss in managed mode
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>
Diffstat (limited to 'drivers/net/wireless/ti')
-rw-r--r-- | drivers/net/wireless/ti/wl1251/event.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/wireless/ti/wl1251/event.c b/drivers/net/wireless/ti/wl1251/event.c index db0105313745..c98630394a1a 100644 --- a/drivers/net/wireless/ti/wl1251/event.c +++ b/drivers/net/wireless/ti/wl1251/event.c | |||
@@ -124,11 +124,12 @@ static int wl1251_event_process(struct wl1251 *wl, struct event_mailbox *mbox) | |||
124 | return ret; | 124 | return ret; |
125 | } | 125 | } |
126 | 126 | ||
127 | if (wl->vif && vector & SYNCHRONIZATION_TIMEOUT_EVENT_ID) { | 127 | if (vector & SYNCHRONIZATION_TIMEOUT_EVENT_ID) { |
128 | wl1251_debug(DEBUG_EVENT, "SYNCHRONIZATION_TIMEOUT_EVENT"); | 128 | wl1251_debug(DEBUG_EVENT, "SYNCHRONIZATION_TIMEOUT_EVENT"); |
129 | 129 | ||
130 | /* indicate to the stack, that beacons have been lost */ | 130 | /* indicate to the stack, that beacons have been lost */ |
131 | ieee80211_beacon_loss(wl->vif); | 131 | if (wl->vif && wl->vif->type == NL80211_IFTYPE_STATION) |
132 | ieee80211_beacon_loss(wl->vif); | ||
132 | } | 133 | } |
133 | 134 | ||
134 | if (vector & REGAINED_BSS_EVENT_ID) { | 135 | if (vector & REGAINED_BSS_EVENT_ID) { |