diff options
author | Ping-Ke Shih <pkshih@realtek.com> | 2018-01-17 01:15:21 -0500 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2018-01-17 10:09:10 -0500 |
commit | a3fa3669d18c959c265eda2048b998c0062a61ce (patch) | |
tree | 50aac2c73bb59847acc8bc536ce567b6218905a8 /drivers/net/wireless/realtek/rtlwifi/usb.c | |
parent | 98051872fd25077d3b106ab3d2b945fa7025c1ef (diff) |
rtlwifi: Use mutex to replace spin_lock to protect IPS and LPS
Enter/leavel IPS and LPS are large critical section, and they can't use
sleep function because running in atomic-context, which own a spin_lock.
In commit ba9f93f82aba ("rtlwifi: Fix enter/exit power_save"), it moves
LPS functions to thread-context, so this commit can simply change LPS's
spin lock to mutex.
Considering IPS functions, rtl_ips_nic_on() may be called by TX tasklet
(softirq-context) that check whether packet is auth frame. Fortunately,
current mac80211 will ask driver to leave IPS using op_config with
changed flag IEEE80211_CONF_CHANGE_IDLE, before issuing auth frame, so
IPS functions can run in thread-context and use mutex to protect critical
section, too.
Also, this commit removes some useless spin locks.
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/realtek/rtlwifi/usb.c')
-rw-r--r-- | drivers/net/wireless/realtek/rtlwifi/usb.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/net/wireless/realtek/rtlwifi/usb.c b/drivers/net/wireless/realtek/rtlwifi/usb.c index 39b033b3b53a..ce3103bb8ebb 100644 --- a/drivers/net/wireless/realtek/rtlwifi/usb.c +++ b/drivers/net/wireless/realtek/rtlwifi/usb.c | |||
@@ -962,7 +962,6 @@ static void _rtl_usb_tx_preprocess(struct ieee80211_hw *hw, | |||
962 | memset(&tcb_desc, 0, sizeof(struct rtl_tcb_desc)); | 962 | memset(&tcb_desc, 0, sizeof(struct rtl_tcb_desc)); |
963 | if (ieee80211_is_auth(fc)) { | 963 | if (ieee80211_is_auth(fc)) { |
964 | RT_TRACE(rtlpriv, COMP_SEND, DBG_DMESG, "MAC80211_LINKING\n"); | 964 | RT_TRACE(rtlpriv, COMP_SEND, DBG_DMESG, "MAC80211_LINKING\n"); |
965 | rtl_ips_nic_on(hw); | ||
966 | } | 965 | } |
967 | 966 | ||
968 | if (rtlpriv->psc.sw_ps_enabled) { | 967 | if (rtlpriv->psc.sw_ps_enabled) { |