From 19fbd31398e6994c6a7bbc9a9c5efa2300225a9f Mon Sep 17 00:00:00 2001 From: Yuri Ershov Date: Wed, 27 Oct 2010 17:24:55 +0400 Subject: [PATCH] wl1251: Add vif checking to rssi and beacon loss events The chipset is initialized and the vif for the interface are created separately - there is a small window, when the interface is configured, that the firmware sends rssi or beacon loss events while the vif is not yet existing, causing an oops in the mac80211. Add checking for the vif to the handlers, ignoring the events if there is not yet a vif. Signed-off-by: Juuso Oikarinen Reviewed-by: Kalle Valo Signed-off-by: Luciano Coelho Signed-off-by: Yuri Ershov --- drivers/net/wireless/wl12xx/wl1251_event.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/wl12xx/wl1251_event.c b/drivers/net/wireless/wl12xx/wl1251_event.c index 8fed56b..15cdf84 100644 --- a/drivers/net/wireless/wl12xx/wl1251_event.c +++ b/drivers/net/wireless/wl12xx/wl1251_event.c @@ -118,7 +118,7 @@ static int wl1251_event_process(struct wl1251 *wl, struct event_mailbox *mbox) return ret; } - if (vector & SYNCHRONIZATION_TIMEOUT_EVENT_ID) { + if (wl->vif && (vector & SYNCHRONIZATION_TIMEOUT_EVENT_ID)) { wl1251_debug(DEBUG_EVENT, "SYNCHRONIZATION_TIMEOUT_EVENT"); /* need to unlock mutex to avoid deadlocking with rtnl */ mutex_unlock(&wl->mutex); -- 2.39.5