diff options
author | Arik Nemtsov <arik@wizery.com> | 2013-03-12 11:19:40 -0400 |
---|---|---|
committer | Luciano Coelho <coelho@ti.com> | 2013-03-25 06:33:12 -0400 |
commit | 8910cfa3ac022feebfe1c4ae021afc34a1c1af25 (patch) | |
tree | 849e6ec76d642e8de188b5d324d0551030694f4d /drivers/net/wireless | |
parent | 0a9ffac09f772edee60abf3a0fe00f7bb5335c51 (diff) |
wlcore: change warn on missing lock in wlcore_queue_xx funcs
On !CONFIG_SMP builds spin_is_locked always returns 0. Assert the
locking using assert_spin_locked, which is written to behave correctly
in all cases.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/ti/wlcore/tx.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/wireless/ti/wlcore/tx.c b/drivers/net/wireless/ti/wlcore/tx.c index 859955649c97..e0d9504c9ef7 100644 --- a/drivers/net/wireless/ti/wlcore/tx.c +++ b/drivers/net/wireless/ti/wlcore/tx.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/kernel.h> | 24 | #include <linux/kernel.h> |
25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
26 | #include <linux/etherdevice.h> | 26 | #include <linux/etherdevice.h> |
27 | #include <linux/spinlock.h> | ||
27 | 28 | ||
28 | #include "wlcore.h" | 29 | #include "wlcore.h" |
29 | #include "debug.h" | 30 | #include "debug.h" |
@@ -1289,7 +1290,7 @@ bool wlcore_is_queue_stopped_by_reason_locked(struct wl1271 *wl, | |||
1289 | { | 1290 | { |
1290 | int hwq = wlcore_tx_get_mac80211_queue(wlvif, queue); | 1291 | int hwq = wlcore_tx_get_mac80211_queue(wlvif, queue); |
1291 | 1292 | ||
1292 | WARN_ON_ONCE(!spin_is_locked(&wl->wl_lock)); | 1293 | assert_spin_locked(&wl->wl_lock); |
1293 | return test_bit(reason, &wl->queue_stop_reasons[hwq]); | 1294 | return test_bit(reason, &wl->queue_stop_reasons[hwq]); |
1294 | } | 1295 | } |
1295 | 1296 | ||
@@ -1298,6 +1299,6 @@ bool wlcore_is_queue_stopped_locked(struct wl1271 *wl, struct wl12xx_vif *wlvif, | |||
1298 | { | 1299 | { |
1299 | int hwq = wlcore_tx_get_mac80211_queue(wlvif, queue); | 1300 | int hwq = wlcore_tx_get_mac80211_queue(wlvif, queue); |
1300 | 1301 | ||
1301 | WARN_ON_ONCE(!spin_is_locked(&wl->wl_lock)); | 1302 | assert_spin_locked(&wl->wl_lock); |
1302 | return !!wl->queue_stop_reasons[hwq]; | 1303 | return !!wl->queue_stop_reasons[hwq]; |
1303 | } | 1304 | } |