aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl12xx
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2010-08-26 07:30:27 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-08-27 13:27:06 -0400
commit0ec2f2724d7e457b91e5983d11db8adba9aad47e (patch)
tree24b4075547c3e850d2c3b1847adc61b32d8b68d1 /drivers/net/wireless/wl12xx
parent8789d459bc5e837bf37d261453df96ef54018d7b (diff)
wl12xx: remove unneeded locking
With the scan callback now being callable from any context, these unlocks/locks can go away. This makes the code easier to understand, since callers of these functions must no longer be aware that the mutex may be dropped. As Stanislaw is working on iwlwifi scanning, I didn't change it to take advantage of the new mac80211 semantics. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx')
-rw-r--r--drivers/net/wireless/wl12xx/wl1251_event.c2
-rw-r--r--drivers/net/wireless/wl12xx/wl1251_main.c2
-rw-r--r--drivers/net/wireless/wl12xx/wl1271_main.c2
-rw-r--r--drivers/net/wireless/wl12xx/wl1271_scan.c2
4 files changed, 0 insertions, 8 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1251_event.c b/drivers/net/wireless/wl12xx/wl1251_event.c
index 00c3e648d93f..54223556b308 100644
--- a/drivers/net/wireless/wl12xx/wl1251_event.c
+++ b/drivers/net/wireless/wl12xx/wl1251_event.c
@@ -34,9 +34,7 @@ static int wl1251_event_scan_complete(struct wl1251 *wl,
34 mbox->scheduled_scan_channels); 34 mbox->scheduled_scan_channels);
35 35
36 if (wl->scanning) { 36 if (wl->scanning) {
37 mutex_unlock(&wl->mutex);
38 ieee80211_scan_completed(wl->hw, false); 37 ieee80211_scan_completed(wl->hw, false);
39 mutex_lock(&wl->mutex);
40 wl1251_debug(DEBUG_MAC80211, "mac80211 hw scan completed"); 38 wl1251_debug(DEBUG_MAC80211, "mac80211 hw scan completed");
41 wl->scanning = false; 39 wl->scanning = false;
42 } 40 }
diff --git a/drivers/net/wireless/wl12xx/wl1251_main.c b/drivers/net/wireless/wl12xx/wl1251_main.c
index edd4845c3707..f9d9ad620cc9 100644
--- a/drivers/net/wireless/wl12xx/wl1251_main.c
+++ b/drivers/net/wireless/wl12xx/wl1251_main.c
@@ -467,9 +467,7 @@ static void wl1251_op_stop(struct ieee80211_hw *hw)
467 WARN_ON(wl->state != WL1251_STATE_ON); 467 WARN_ON(wl->state != WL1251_STATE_ON);
468 468
469 if (wl->scanning) { 469 if (wl->scanning) {
470 mutex_unlock(&wl->mutex);
471 ieee80211_scan_completed(wl->hw, true); 470 ieee80211_scan_completed(wl->hw, true);
472 mutex_lock(&wl->mutex);
473 wl->scanning = false; 471 wl->scanning = false;
474 } 472 }
475 473
diff --git a/drivers/net/wireless/wl12xx/wl1271_main.c b/drivers/net/wireless/wl12xx/wl1271_main.c
index 30194c0f36a9..8e55cf8d509d 100644
--- a/drivers/net/wireless/wl12xx/wl1271_main.c
+++ b/drivers/net/wireless/wl12xx/wl1271_main.c
@@ -948,9 +948,7 @@ static void wl1271_op_remove_interface(struct ieee80211_hw *hw,
948 ieee80211_enable_dyn_ps(wl->vif); 948 ieee80211_enable_dyn_ps(wl->vif);
949 949
950 if (wl->scan.state != WL1271_SCAN_STATE_IDLE) { 950 if (wl->scan.state != WL1271_SCAN_STATE_IDLE) {
951 mutex_unlock(&wl->mutex);
952 ieee80211_scan_completed(wl->hw, true); 951 ieee80211_scan_completed(wl->hw, true);
953 mutex_lock(&wl->mutex);
954 wl->scan.state = WL1271_SCAN_STATE_IDLE; 952 wl->scan.state = WL1271_SCAN_STATE_IDLE;
955 kfree(wl->scan.scanned_ch); 953 kfree(wl->scan.scanned_ch);
956 wl->scan.scanned_ch = NULL; 954 wl->scan.scanned_ch = NULL;
diff --git a/drivers/net/wireless/wl12xx/wl1271_scan.c b/drivers/net/wireless/wl12xx/wl1271_scan.c
index fec43eed8c55..9c80ba9b6be0 100644
--- a/drivers/net/wireless/wl12xx/wl1271_scan.c
+++ b/drivers/net/wireless/wl12xx/wl1271_scan.c
@@ -215,9 +215,7 @@ void wl1271_scan_stm(struct wl1271 *wl)
215 break; 215 break;
216 216
217 case WL1271_SCAN_STATE_DONE: 217 case WL1271_SCAN_STATE_DONE:
218 mutex_unlock(&wl->mutex);
219 ieee80211_scan_completed(wl->hw, false); 218 ieee80211_scan_completed(wl->hw, false);
220 mutex_lock(&wl->mutex);
221 219
222 kfree(wl->scan.scanned_ch); 220 kfree(wl->scan.scanned_ch);
223 wl->scan.scanned_ch = NULL; 221 wl->scan.scanned_ch = NULL;