diff options
author | Carl Huang <cjhuang@codeaurora.org> | 2020-09-25 14:30:48 +0800 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2020-09-25 11:19:04 +0300 |
commit | 8ed948219a2ee1806859f500cdad4fa175bc593c (patch) | |
tree | 49719253a0a027ceda98169b32c771e88ce5f56b | |
parent | 37f099bf407f12eb10da2db60c99e216d6961dac (diff) |
ath11k: enable idle power save modeath11k-qca6390-bringup-202009250825
Host sends wmi command to allow hardware enter idle power
save mode in ath11k_mac_op_start function.
hw parameter idle_ps indicates whether idle power save is supported.
Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1
Signed-off-by: Carl Huang <cjhuang@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
-rw-r--r-- | drivers/net/wireless/ath/ath11k/core.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath11k/hw.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath11k/mac.c | 9 |
3 files changed, 13 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath11k/core.c b/drivers/net/wireless/ath/ath11k/core.c index b915c1869e95..e11c3435a930 100644 --- a/drivers/net/wireless/ath/ath11k/core.c +++ b/drivers/net/wireless/ath/ath11k/core.c @@ -66,6 +66,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = { .wakeup_mhi = false, .shadow_support = false, .shadow_support_fix = false, + .idle_ps = false, }, { .hw_rev = ATH11K_HW_IPQ6018_HW10, @@ -104,6 +105,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = { .wakeup_mhi = false, .shadow_support = false, .shadow_support_fix = false, + .idle_ps = false, }, { .name = "qca6390 hw2.0", @@ -141,6 +143,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = { .wakeup_mhi = true, .shadow_support = true, .shadow_support_fix = true, + .idle_ps = true, }, }; diff --git a/drivers/net/wireless/ath/ath11k/hw.h b/drivers/net/wireless/ath/ath11k/hw.h index fbb32258d748..a0858ada3c26 100644 --- a/drivers/net/wireless/ath/ath11k/hw.h +++ b/drivers/net/wireless/ath/ath11k/hw.h @@ -162,6 +162,7 @@ struct ath11k_hw_params { bool wakeup_mhi; bool shadow_support; bool shadow_support_fix; + bool idle_ps; }; struct ath11k_hw_ops { diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c index 76e218e53fe7..d42858d1a578 100644 --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c @@ -4208,6 +4208,15 @@ static int ath11k_mac_op_start(struct ieee80211_hw *hw) rcu_assign_pointer(ab->pdevs_active[ar->pdev_idx], &ab->pdevs[ar->pdev_idx]); + /* allow device to enter IMPS */ + if (ab->hw_params.idle_ps) { + ret = ath11k_wmi_pdev_set_param(ar, WMI_PDEV_PARAM_IDLE_PS_CONFIG, + 1, pdev->pdev_id); + if (ret) { + ath11k_err(ab, "failed to enable idle ps: %d\n", ret); + goto err; + } + } return 0; err: |