]> git.karo-electronics.de Git - karo-tx-linux.git/commit
iwlegacy: fix channel switch locking
authorStanislaw Gruszka <sgruszka@redhat.com>
Wed, 8 Jun 2011 13:26:31 +0000 (15:26 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 23 Jun 2011 22:05:41 +0000 (15:05 -0700)
commit890cd1ba9bba495fd7eb8e8cdfea0b016a34bfa6
tree7c7d279235f7c74a19b960a2080a38eb76e98ac0
parent4d41d0d8666e0bb083224cf1cd49f1c9be55d467
iwlegacy: fix channel switch locking

commit 51e65257142a87fe46a1ce5c35c86c5baf012614 upstream.

We use priv->mutex to avoid race conditions between chswitch_done()
and mac_channel_switch(), when marking channel switch in
progress. But chswitch_done() can be called in atomic context
from rx_csa() or with mutex already taken from commit_rxon().

To fix remove mutex from chswitch_done() and use atomic bitops
for marking channel switch pending.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/net/wireless/iwlegacy/iwl-4965.c
drivers/net/wireless/iwlegacy/iwl-core.c
drivers/net/wireless/iwlegacy/iwl-core.h
drivers/net/wireless/iwlegacy/iwl-dev.h
drivers/net/wireless/iwlegacy/iwl4965-base.c