Skip to content

Commit

Permalink
wl1271: Check vif for NULL when indicating beacon-loss
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Juuso Oikarinen authored and John W. Linville committed Dec 28, 2009
1 parent 38ad2d8 commit 04477bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/wireless/wl12xx/wl1271_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ static int wl1271_event_process(struct wl1271 *wl, struct event_mailbox *mbox)
return ret;
}

if (beacon_loss) {
if (wl->vif && beacon_loss) {
/* Obviously, it's dangerous to release the mutex while
we are holding many of the variables in the wl struct.
That's why it's done last in the function, and care must
Expand Down

0 comments on commit 04477bf

Please sign in to comment.