aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rtl8187.h
diff options
context:
space:
mode:
authorLarry Finger <Larry.Finger@lwfinger.net>2008-07-31 20:30:48 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-08-01 15:31:35 -0400
commit7dcdd073bf78bb6958bbc12a1a47754a0f3c4721 (patch)
tree296f03bd684ff19698db4c44330a68f4ae9846b3 /drivers/net/wireless/rtl8187.h
parentbf4634afd8bb72936d2d56425ec792ca1bfa92a2 (diff)
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 {
94 const struct rtl818x_rf_ops *rf; 94 const struct rtl818x_rf_ops *rf;
95 struct ieee80211_vif *vif; 95 struct ieee80211_vif *vif;
96 int mode; 96 int mode;
97 /* The mutex protects the TX loopback state.
98 * Any attempt to set channels concurrently locks the device.
99 */
100 struct mutex conf_mutex;
97 101
98 /* rtl8187 specific */ 102 /* rtl8187 specific */
99 struct ieee80211_channel channels[14]; 103 struct ieee80211_channel channels[14];