diff options
author | Kalle Valo <kvalo@codeaurora.org> | 2018-01-05 07:02:36 -0500 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2018-01-05 07:02:36 -0500 |
commit | 49fdde89e2b8574cb55f99b57b7798f44567bc4b (patch) | |
tree | aa0993d9d84a92efa2aab6fd3c33819fad97a186 | |
parent | 943309d4aad6732b905f3f500e6e17e33c211494 (diff) | |
parent | 0856655a25476d4431005e39d606e349050066b0 (diff) |
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
-rw-r--r-- | drivers/net/wireless/ath/wcn36xx/main.c | 23 | ||||
-rw-r--r-- | drivers/net/wireless/ath/wcn36xx/pmc.c | 6 |
2 files changed, 16 insertions, 13 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) | |||
384 | } | 384 | } |
385 | } | 385 | } |
386 | 386 | ||
387 | if (changed & IEEE80211_CONF_CHANGE_PS) { | ||
388 | list_for_each_entry(tmp, &wcn->vif_list, list) { | ||
389 | vif = wcn36xx_priv_to_vif(tmp); | ||
390 | if (hw->conf.flags & IEEE80211_CONF_PS) { | ||
391 | if (vif->bss_conf.ps) /* ps allowed ? */ | ||
392 | wcn36xx_pmc_enter_bmps_state(wcn, vif); | ||
393 | } else { | ||
394 | wcn36xx_pmc_exit_bmps_state(wcn, vif); | ||
395 | } | ||
396 | } | ||
397 | } | ||
398 | |||
387 | mutex_unlock(&wcn->conf_mutex); | 399 | mutex_unlock(&wcn->conf_mutex); |
388 | 400 | ||
389 | return 0; | 401 | return 0; |
@@ -747,17 +759,6 @@ static void wcn36xx_bss_info_changed(struct ieee80211_hw *hw, | |||
747 | vif_priv->dtim_period = bss_conf->dtim_period; | 759 | vif_priv->dtim_period = bss_conf->dtim_period; |
748 | } | 760 | } |
749 | 761 | ||
750 | if (changed & BSS_CHANGED_PS) { | ||
751 | wcn36xx_dbg(WCN36XX_DBG_MAC, | ||
752 | "mac bss PS set %d\n", | ||
753 | bss_conf->ps); | ||
754 | if (bss_conf->ps) { | ||
755 | wcn36xx_pmc_enter_bmps_state(wcn, vif); | ||
756 | } else { | ||
757 | wcn36xx_pmc_exit_bmps_state(wcn, vif); | ||
758 | } | ||
759 | } | ||
760 | |||
761 | if (changed & BSS_CHANGED_BSSID) { | 762 | if (changed & BSS_CHANGED_BSSID) { |
762 | wcn36xx_dbg(WCN36XX_DBG_MAC, "mac bss changed_bssid %pM\n", | 763 | wcn36xx_dbg(WCN36XX_DBG_MAC, "mac bss changed_bssid %pM\n", |
763 | bss_conf->bssid); | 764 | bss_conf->bssid); |
diff --git a/drivers/net/wireless/ath/wcn36xx/pmc.c b/drivers/net/wireless/ath/wcn36xx/pmc.c index 589fe5f70971..1976b80c235f 100644 --- a/drivers/net/wireless/ath/wcn36xx/pmc.c +++ b/drivers/net/wireless/ath/wcn36xx/pmc.c | |||
@@ -45,8 +45,10 @@ int wcn36xx_pmc_exit_bmps_state(struct wcn36xx *wcn, | |||
45 | struct wcn36xx_vif *vif_priv = wcn36xx_vif_to_priv(vif); | 45 | struct wcn36xx_vif *vif_priv = wcn36xx_vif_to_priv(vif); |
46 | 46 | ||
47 | if (WCN36XX_BMPS != vif_priv->pw_state) { | 47 | if (WCN36XX_BMPS != vif_priv->pw_state) { |
48 | wcn36xx_err("Not in BMPS mode, no need to exit from BMPS mode!\n"); | 48 | /* Unbalanced call or last BMPS enter failed */ |
49 | return -EINVAL; | 49 | wcn36xx_dbg(WCN36XX_DBG_PMC, |
50 | "Not in BMPS mode, no need to exit\n"); | ||
51 | return -EALREADY; | ||
50 | } | 52 | } |
51 | wcn36xx_smd_exit_bmps(wcn, vif); | 53 | wcn36xx_smd_exit_bmps(wcn, vif); |
52 | vif_priv->pw_state = WCN36XX_FULL_POWER; | 54 | vif_priv->pw_state = WCN36XX_FULL_POWER; |