summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/wcn36xx/main.c
diff options
context:
space:
mode:
authorKalle Valo <kvalo@codeaurora.org>2018-01-05 15:02:36 +0300
committerKalle Valo <kvalo@codeaurora.org>2018-01-05 15:02:36 +0300
commit49fdde89e2b8574cb55f99b57b7798f44567bc4b (patch)
treeaa0993d9d84a92efa2aab6fd3c33819fad97a186 /drivers/net/wireless/ath/wcn36xx/main.c
parent943309d4aad6732b905f3f500e6e17e33c211494 (diff)
parent0856655a25476d4431005e39d606e349050066b0 (diff)
downloadlinux-49fdde89e2b8574cb55f99b57b7798f44567bc4b.tar.xz
Merge ath-current from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
ath.git fixes for 4.15. Major changes: wcn36xx * fix dynamic power save which has been broken since the driver was commited
Diffstat (limited to 'drivers/net/wireless/ath/wcn36xx/main.c')
-rw-r--r--drivers/net/wireless/ath/wcn36xx/main.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/drivers/net/wireless/ath/wcn36xx/main.c b/drivers/net/wireless/ath/wcn36xx/main.c
index f7d228b5ba93..987f1252a3cf 100644
--- a/drivers/net/wireless/ath/wcn36xx/main.c
+++ b/drivers/net/wireless/ath/wcn36xx/main.c
@@ -384,6 +384,18 @@ static int wcn36xx_config(struct ieee80211_hw *hw, u32 changed)
}
}
+ if (changed & IEEE80211_CONF_CHANGE_PS) {
+ list_for_each_entry(tmp, &wcn->vif_list, list) {
+ vif = wcn36xx_priv_to_vif(tmp);
+ if (hw->conf.flags & IEEE80211_CONF_PS) {
+ if (vif->bss_conf.ps) /* ps allowed ? */
+ wcn36xx_pmc_enter_bmps_state(wcn, vif);
+ } else {
+ wcn36xx_pmc_exit_bmps_state(wcn, vif);
+ }
+ }
+ }
+
mutex_unlock(&wcn->conf_mutex);
return 0;
@@ -747,17 +759,6 @@ static void wcn36xx_bss_info_changed(struct ieee80211_hw *hw,
vif_priv->dtim_period = bss_conf->dtim_period;
}
- if (changed & BSS_CHANGED_PS) {
- wcn36xx_dbg(WCN36XX_DBG_MAC,
- "mac bss PS set %d\n",
- bss_conf->ps);
- if (bss_conf->ps) {
- wcn36xx_pmc_enter_bmps_state(wcn, vif);
- } else {
- wcn36xx_pmc_exit_bmps_state(wcn, vif);
- }
- }
-
if (changed & BSS_CHANGED_BSSID) {
wcn36xx_dbg(WCN36XX_DBG_MAC, "mac bss changed_bssid %pM\n",
bss_conf->bssid);