summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rtl8187.h
diff options
context:
space:
mode:
authorLarry Finger <Larry.Finger@lwfinger.net>2008-07-31 19:30:48 -0500
committerJohn W. Linville <linville@tuxdriver.com>2008-08-01 15:31:35 -0400
commit7dcdd073bf78bb6958bbc12a1a47754a0f3c4721 (patch)
tree296f03bd684ff19698db4c44330a68f4ae9846b3 /drivers/net/wireless/rtl8187.h
parentbf4634afd8bb72936d2d56425ec792ca1bfa92a2 (diff)
downloadtalos-op-linux-7dcdd073bf78bb6958bbc12a1a47754a0f3c4721.tar.gz
talos-op-linux-7dcdd073bf78bb6958bbc12a1a47754a0f3c4721.zip
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>
Diffstat (limited to 'drivers/net/wireless/rtl8187.h')
-rw-r--r--drivers/net/wireless/rtl8187.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/wireless/rtl8187.h b/drivers/net/wireless/rtl8187.h
index 1b0d750f6623..5a9515c99960 100644
--- a/drivers/net/wireless/rtl8187.h
+++ b/drivers/net/wireless/rtl8187.h
@@ -94,6 +94,10 @@ struct rtl8187_priv {
const struct rtl818x_rf_ops *rf;
struct ieee80211_vif *vif;
int mode;
+ /* The mutex protects the TX loopback state.
+ * Any attempt to set channels concurrently locks the device.
+ */
+ struct mutex conf_mutex;
/* rtl8187 specific */
struct ieee80211_channel channels[14];
OpenPOWER on IntegriCloud