summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorJuuso Oikarinen <juuso.oikarinen@nokia.com>2010-03-18 11:26:45 +0100
committerJohn W. Linville <linville@tuxdriver.com>2010-03-23 21:50:25 +0100
commit2ea9fb3d79aac371e5bb0c4b0f5be7195e8fcd33 (patch)
tree04fac29aa5185bcd72f495cedfc4e07dc1b11ccc /drivers/net/wireless
parentwl1271: Don't generate null func template for ad-hoc (diff)
downloadlinux-2ea9fb3d79aac371e5bb0c4b0f5be7195e8fcd33.tar.xz
linux-2ea9fb3d79aac371e5bb0c4b0f5be7195e8fcd33.zip
wl1271: Remove circular interlocking related to the inetaddr notifier chain
Removing the wl1271 from the inet addr notifier chain sometimes causes the registered handler to be called - causing locking problems if the removing function is called from within the mutex. Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com> Reviewed-by: Teemu Paasikivi <ext-teemu.3.paasikivi@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')
-rw-r--r--drivers/net/wireless/wl12xx/wl1271_main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271_main.c b/drivers/net/wireless/wl12xx/wl1271_main.c
index 6f6d366491a3..0bebc456ec0d 100644
--- a/drivers/net/wireless/wl12xx/wl1271_main.c
+++ b/drivers/net/wireless/wl12xx/wl1271_main.c
@@ -1029,12 +1029,13 @@ static void wl1271_op_remove_interface(struct ieee80211_hw *hw,
struct wl1271 *wl = hw->priv;
int i;
+ unregister_inetaddr_notifier(&wl1271_dev_notifier);
+
mutex_lock(&wl->mutex);
wl1271_debug(DEBUG_MAC80211, "mac80211 remove interface");
wl1271_info("down");
- unregister_inetaddr_notifier(&wl1271_dev_notifier);
list_del(&wl->list);
WARN_ON(wl->state != WL1271_STATE_ON);