diff options
author | Ping-Ke Shih <pkshih@realtek.com> | 2017-06-18 19:12:42 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2017-06-21 18:28:01 +0300 |
commit | e332e2a29448065bbdf298d4dc21ed4cc3bebb3f (patch) | |
tree | 62b63b687e4ed079ff4c9f96471662520d03042c /drivers/net/wireless/realtek/rtlwifi/core.c | |
parent | f95d95a7cd5514549dcf6ba754f0ee834cce3e1f (diff) | |
download | linux-e332e2a29448065bbdf298d4dc21ed4cc3bebb3f.tar.xz |
rtlwifi: Correct power save capability while init mac80211
Since the driver itself will enter power saving mode dynamically
according to the traffic, we set hw capability SUPPORTS_PS and
SUPPORTS_DYNAMIC_PS in case of fwctrl_lps.
The process IEEE80211_CONF_CHANGE_PS in op_config is used by
SW-LPS only, so we add constraints to avoid errors.
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: vincent_fann <vincent_fann@realtek.com>
Signed-off-by: shaofu <shaofu@realtek.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/realtek/rtlwifi/core.c')
-rw-r--r-- | drivers/net/wireless/realtek/rtlwifi/core.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wireless/realtek/rtlwifi/core.c b/drivers/net/wireless/realtek/rtlwifi/core.c index a4f8e326a2bc..5053d8c73e29 100644 --- a/drivers/net/wireless/realtek/rtlwifi/core.c +++ b/drivers/net/wireless/realtek/rtlwifi/core.c @@ -629,7 +629,8 @@ static int rtl_op_config(struct ieee80211_hw *hw, u32 changed) } /*For LPS */ - if (changed & IEEE80211_CONF_CHANGE_PS) { + if ((changed & IEEE80211_CONF_CHANGE_PS) && + rtlpriv->psc.swctrl_lps && !rtlpriv->psc.fwctrl_lps) { cancel_delayed_work(&rtlpriv->works.ps_work); cancel_delayed_work(&rtlpriv->works.ps_rfon_wq); if (conf->flags & IEEE80211_CONF_PS) { |