rtl8187: Fix lockups due to concurrent access to config routine
authorLarry Finger <Larry.Finger@lwfinger.net>
Fri, 1 Aug 2008 00:30:48 +0000 (19:30 -0500)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 1 Aug 2008 19:31:35 +0000 (15:31 -0400)
commit7dcdd073bf78bb6958bbc12a1a47754a0f3c4721
tree296f03bd684ff19698db4c44330a68f4ae9846b3
parentbf4634afd8bb72936d2d56425ec792ca1bfa92a2
rtl8187: Fix lockups due to concurrent access to config routine

Some users of the RTL8187B have experienced difficulties since commit
49292d56352a6ab90d04c3448dd8b6106dfef2d6 that introduced the power
management wext hooks. This difficulty has not made much sense until
it was realized that it was possible for mac80211 to make a call to the
config routine while that routine was already being executed. On this
device, it is necessary to loopback the TX when changing channels. Unless
this is properly restored, the device will lockup. A mutex now protects
the device state, and the private data in several places.

The problem was found by Herton Ronaldo Krzesinski <herton@mandriva.com.br>,
who also suggested this type of fix.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Acked-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Acked-by: Hin-Tak Leung <htl10@users.sourceforge.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rtl8187.h
drivers/net/wireless/rtl8187_dev.c