aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/wireless/rtlwifi/base.c2
-rw-r--r--drivers/net/wireless/rtlwifi/ps.c5
-rw-r--r--drivers/net/wireless/rtlwifi/wifi.h4
3 files changed, 6 insertions, 5 deletions
diff --git a/drivers/net/wireless/rtlwifi/base.c b/drivers/net/wireless/rtlwifi/base.c
index 87530eaa88b..77fa59af63d 100644
--- a/drivers/net/wireless/rtlwifi/base.c
+++ b/drivers/net/wireless/rtlwifi/base.c
@@ -309,8 +309,8 @@ int rtl_init_core(struct ieee80211_hw *hw)
309 } 309 }
310 310
311 /* <4> locks */ 311 /* <4> locks */
312 mutex_init(&rtlpriv->locks.ips_mutex);
313 mutex_init(&rtlpriv->locks.conf_mutex); 312 mutex_init(&rtlpriv->locks.conf_mutex);
313 spin_lock_init(&rtlpriv->locks.ips_lock);
314 spin_lock_init(&rtlpriv->locks.irq_th_lock); 314 spin_lock_init(&rtlpriv->locks.irq_th_lock);
315 spin_lock_init(&rtlpriv->locks.h2c_lock); 315 spin_lock_init(&rtlpriv->locks.h2c_lock);
316 spin_lock_init(&rtlpriv->locks.rf_ps_lock); 316 spin_lock_init(&rtlpriv->locks.rf_ps_lock);
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)
286 struct rtl_priv *rtlpriv = rtl_priv(hw); 286 struct rtl_priv *rtlpriv = rtl_priv(hw);
287 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); 287 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw));
288 enum rf_pwrstate rtstate; 288 enum rf_pwrstate rtstate;
289 unsigned long flags;
289 290
290 mutex_lock(&rtlpriv->locks.ips_mutex); 291 spin_lock_irqsave(&rtlpriv->locks.ips_lock, flags);
291 292
292 if (ppsc->b_inactiveps) { 293 if (ppsc->b_inactiveps) {
293 rtstate = ppsc->rfpwr_state; 294 rtstate = ppsc->rfpwr_state;
@@ -303,7 +304,7 @@ void rtl_ips_nic_on(struct ieee80211_hw *hw)
303 } 304 }
304 } 305 }
305 306
306 mutex_unlock(&rtlpriv->locks.ips_mutex); 307 spin_unlock_irqrestore(&rtlpriv->locks.ips_lock, flags);
307} 308}
308 309
309/*for FW LPS*/ 310/*for FW LPS*/
diff --git a/drivers/net/wireless/rtlwifi/wifi.h b/drivers/net/wireless/rtlwifi/wifi.h
index 77d5fa370bd..d44d79613d2 100644
--- a/drivers/net/wireless/rtlwifi/wifi.h
+++ b/drivers/net/wireless/rtlwifi/wifi.h
@@ -1192,11 +1192,11 @@ struct rtl_hal_cfg {
1192}; 1192};
1193 1193
1194struct rtl_locks { 1194struct rtl_locks {
1195 /*sem */ 1195 /* mutex */
1196 struct mutex ips_mutex;
1197 struct mutex conf_mutex; 1196 struct mutex conf_mutex;
1198 1197
1199 /*spin lock */ 1198 /*spin lock */
1199 spinlock_t ips_lock;
1200 spinlock_t irq_th_lock; 1200 spinlock_t irq_th_lock;
1201 spinlock_t h2c_lock; 1201 spinlock_t h2c_lock;
1202 spinlock_t rf_ps_lock; 1202 spinlock_t rf_ps_lock;