summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath
diff options
context:
space:
mode:
authorMichal Kazior <michal.kazior@tieto.com>2014-12-12 12:41:38 +0100
committerKalle Valo <kvalo@qca.qualcomm.com>2014-12-16 09:25:57 +0200
commitbf14e65cb750be9837c8b0f61471145a03ba4a36 (patch)
tree58187bf4590ead4896aad84883e8917d190da2d0 /drivers/net/wireless/ath
parent526549a850bf6f549b88a271c7df9dd847e02bcf (diff)
downloadop-kernel-dev-bf14e65cb750be9837c8b0f61471145a03ba4a36.zip
op-kernel-dev-bf14e65cb750be9837c8b0f61471145a03ba4a36.tar.gz
ath10k: enable per-vif sta powersave
Per-vif bss_conf.ps should be used to configure powersave. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath')
-rw-r--r--drivers/net/wireless/ath/ath10k/mac.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index 2804952..19ddbc6 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -1099,9 +1099,6 @@ static int ath10k_mac_vif_recalc_ps_poll_count(struct ath10k_vif *arvif)
return 0;
}
-/*
- * Review this when mac80211 gains per-interface powersave support.
- */
static int ath10k_mac_vif_setup_ps(struct ath10k_vif *arvif)
{
struct ath10k *ar = arvif->ar;
@@ -1117,7 +1114,7 @@ static int ath10k_mac_vif_setup_ps(struct ath10k_vif *arvif)
if (arvif->vif->type != NL80211_IFTYPE_STATION)
return 0;
- if (conf->flags & IEEE80211_CONF_PS) {
+ if (vif->bss_conf.ps) {
psmode = WMI_STA_PS_MODE_ENABLED;
param = WMI_STA_PS_PARAM_INACTIVITY_TIME;
@@ -3378,6 +3375,13 @@ static void ath10k_bss_info_changed(struct ieee80211_hw *hw,
ath10k_warn(ar, "failed to recalc tx power: %d\n", ret);
}
+ if (changed & BSS_CHANGED_PS) {
+ ret = ath10k_mac_vif_setup_ps(arvif);
+ if (ret)
+ ath10k_warn(ar, "failed to setup ps on vdev %i: %d\n",
+ arvif->vdev_id, ret);
+ }
+
mutex_unlock(&ar->conf_mutex);
}
OpenPOWER on IntegriCloud