diff options
author | Juuso Oikarinen <juuso.oikarinen@nokia.com> | 2009-12-11 08:41:09 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-12-28 16:31:36 -0500 |
commit | 04477bf095afd008b73717f7a4ea1fdf18b1b5e2 (patch) | |
tree | e76d1cf437b9c2317be7f98768f75a9962b03686 /drivers/net/wireless/wl12xx | |
parent | 38ad2d87d42ba847c100ef132e8e363513982c8b (diff) |
wl1271: Check vif for NULL when indicating beacon-loss
Because the interface is started and the vif are created and destroyed
separately, there is a slim possibility beacon-loss indications occur while
there is no vif - causing a kernel-oops unless checked.
Add checking for the vif.
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx')
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1271_event.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271_event.c b/drivers/net/wireless/wl12xx/wl1271_event.c index 6ff535d5c7ee..0a145afc9905 100644 --- a/drivers/net/wireless/wl12xx/wl1271_event.c +++ b/drivers/net/wireless/wl12xx/wl1271_event.c | |||
@@ -150,7 +150,7 @@ static int wl1271_event_process(struct wl1271 *wl, struct event_mailbox *mbox) | |||
150 | return ret; | 150 | return ret; |
151 | } | 151 | } |
152 | 152 | ||
153 | if (beacon_loss) { | 153 | if (wl->vif && beacon_loss) { |
154 | /* Obviously, it's dangerous to release the mutex while | 154 | /* Obviously, it's dangerous to release the mutex while |
155 | we are holding many of the variables in the wl struct. | 155 | we are holding many of the variables in the wl struct. |
156 | That's why it's done last in the function, and care must | 156 | That's why it's done last in the function, and care must |