ath10k: configure the vdev listen interval before wow suspend

During the WLAN WOWLAN mode the default listen interval needs
to be configured for each vdev to receive and process the WLAN
WOW pattern match found by the WLAN firmware.

Improper listen interval configuration for the vdev leads to WOW
pattern match missing by the WLAN module and a result WLAN module
failed to wakeup the target as per the WOW pattern configured
during WOWLAN suspend method.

CRs-Fixed: 2141933
Change-Id: I4b4e03c134ecea328bbda55748b1dd633697167a
Signed-off-by: Sarada Prasanna Garnayak <sgarna@codeaurora.org>
This commit is contained in:
Sarada Prasanna Garnayak 2017-11-11 14:07:04 +05:30 committed by Gerrit - the friendly Code Review server
parent f697ab3e51
commit 1e4bd1242e
3 changed files with 34 additions and 0 deletions

View file

@ -509,6 +509,7 @@ const struct ath10k_hw_values wcn3990_values = {
.num_target_ce_config_wlan = 12,
.ce_desc_meta_data_mask = 0xFFF0,
.ce_desc_meta_data_lsb = 4,
.default_listen_interval = 1,
};
struct fw_flag wcn3990_fw_flags = {

View file

@ -369,6 +369,7 @@ struct ath10k_hw_values {
u8 num_target_ce_config_wlan;
u16 ce_desc_meta_data_mask;
u8 ce_desc_meta_data_lsb;
u8 default_listen_interval;
};
extern const struct ath10k_hw_values qca988x_values;

View file

@ -224,6 +224,31 @@ static int ath10k_wow_wakeup(struct ath10k *ar)
return 0;
}
static int ath10k_config_wow_listen_interval(struct ath10k *ar)
{
int ret;
u32 param = ar->wmi.vdev_param->listen_interval;
u8 listen_interval = ar->hw_values->default_listen_interval;
struct ath10k_vif *arvif;
if (!listen_interval)
return 0;
list_for_each_entry(arvif, &ar->arvifs, list) {
if (arvif->vdev_type != WMI_VDEV_TYPE_STA)
continue;
ret = ath10k_wmi_vdev_set_param(ar, arvif->vdev_id,
param, listen_interval);
if (ret) {
ath10k_err(ar, "failed to config LI for vdev_id: %d\n",
arvif->vdev_id);
return ret;
}
}
return 0;
}
int ath10k_wow_op_suspend(struct ieee80211_hw *hw,
struct cfg80211_wowlan *wowlan)
{
@ -252,6 +277,13 @@ int ath10k_wow_op_suspend(struct ieee80211_hw *hw,
goto cleanup;
}
ret = ath10k_config_wow_listen_interval(ar);
if (ret) {
ath10k_warn(ar, "failed to config wow listen interval: %d\n",
ret);
goto cleanup;
}
ret = ath10k_wow_enable(ar);
if (ret) {
ath10k_warn(ar, "failed to start wow: %d\n", ret);