diff options
author | Larry Finger <Larry.Finger@lwfinger.net> | 2010-12-18 04:36:25 +0300 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-12-20 22:49:48 +0300 |
commit | d704300fa546a613ec3821b908528b20685cb92a (patch) | |
tree | f11a738d188c0f0538d385cb205a1149534c6014 /drivers/net/wireless/rtlwifi/ps.c | |
parent | f0b3e4b7307f02a203029441b0473a84aebc6435 (diff) | |
download | linux-d704300fa546a613ec3821b908528b20685cb92a.tar.xz |
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.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/wireless/rtlwifi/ps.c b/drivers/net/wireless/rtlwifi/ps.c index 22c293e5b88c..d2326c13449e 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*/ |