summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rtlwifi/ps.c
diff options
context:
space:
mode:
authorLarry Finger <Larry.Finger@lwfinger.net>2010-12-17 19:36:25 -0600
committerJohn W. Linville <linville@tuxdriver.com>2010-12-20 14:49:48 -0500
commitd704300fa546a613ec3821b908528b20685cb92a (patch)
treef11a738d188c0f0538d385cb205a1149534c6014 /drivers/net/wireless/rtlwifi/ps.c
parentf0b3e4b7307f02a203029441b0473a84aebc6435 (diff)
rtlwifi: Fix use of mutex in interrupt code
A previous conversion from semaphoreto mutexes missed the fact that one of the semaphores was used in interrupt code. Fixed by changing to a spinlock. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rtlwifi/ps.c')
-rw-r--r--drivers/net/wireless/rtlwifi/ps.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/wireless/rtlwifi/ps.c b/drivers/net/wireless/rtlwifi/ps.c
index 22c293e5b88..d2326c13449 100644
--- a/drivers/net/wireless/rtlwifi/ps.c
+++ b/drivers/net/wireless/rtlwifi/ps.c
@@ -286,8 +286,9 @@ void rtl_ips_nic_on(struct ieee80211_hw *hw)
struct rtl_priv *rtlpriv = rtl_priv(hw);
struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw));
enum rf_pwrstate rtstate;
+ unsigned long flags;
- mutex_lock(&rtlpriv->locks.ips_mutex);
+ spin_lock_irqsave(&rtlpriv->locks.ips_lock, flags);
if (ppsc->b_inactiveps) {
rtstate = ppsc->rfpwr_state;
@@ -303,7 +304,7 @@ void rtl_ips_nic_on(struct ieee80211_hw *hw)
}
}
- mutex_unlock(&rtlpriv->locks.ips_mutex);
+ spin_unlock_irqrestore(&rtlpriv->locks.ips_lock, flags);
}
/*for FW LPS*/