summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbings <bings@codeaurora.org>2018-06-01 14:36:43 +0800
committerbings <bings@codeaurora.org>2018-06-19 13:51:16 +0800
commitfa97b5d3a9c6bf18cf879d2c5e86a8caacf4e9bb (patch)
tree2b11959d6d953be4b0d8a535b143f169628f23a8
parent2ff436d891779bb66b6fb78871a5f8567c986566 (diff)
qcacld-2.0: Prevent suspend if FW does not support WOW
FW removes WOW related code in some SP and does not indicate WOW_SUPPORT to driver at the same time. Driver should not send WOW related wmi command and prevent suspend in this condition if gEnableWoW is set as 1. Change-Id: I0df66965ab76f3e94df6ca9d548bea5378df1531 CRs-Fixed: 2247266
-rw-r--r--CORE/HDD/inc/wlan_hdd_main.h1
-rw-r--r--CORE/HDD/inc/wlan_hdd_tgt_cfg.h3
-rw-r--r--CORE/HDD/src/wlan_hdd_cfg80211.c5
-rw-r--r--CORE/HDD/src/wlan_hdd_main.c6
-rw-r--r--CORE/SERVICES/WMA/wma.c2
5 files changed, 16 insertions, 1 deletions
diff --git a/CORE/HDD/inc/wlan_hdd_main.h b/CORE/HDD/inc/wlan_hdd_main.h
index 4332ca81ec75..4809f806ae0c 100644
--- a/CORE/HDD/inc/wlan_hdd_main.h
+++ b/CORE/HDD/inc/wlan_hdd_main.h
@@ -1826,6 +1826,7 @@ struct hdd_context_s
v_BOOL_t hdd_wlan_suspended;
v_BOOL_t suspended;
+ bool prevent_suspend;
spinlock_t filter_lock;
diff --git a/CORE/HDD/inc/wlan_hdd_tgt_cfg.h b/CORE/HDD/inc/wlan_hdd_tgt_cfg.h
index bcacb5f0eb62..8d82316ae99c 100644
--- a/CORE/HDD/inc/wlan_hdd_tgt_cfg.h
+++ b/CORE/HDD/inc/wlan_hdd_tgt_cfg.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2017 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2018 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -59,6 +59,7 @@ struct hdd_tgt_services {
bool sap_auth_offload_service;
#endif
bool get_peer_info_enabled;
+ bool wow_support;
};
struct hdd_tgt_ht_cap {
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index c575a8616320..3129e95197dd 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -30583,6 +30583,11 @@ int __wlan_hdd_cfg80211_suspend_wlan(struct wiphy *wiphy,
return 0;
}
+ if (pHddCtx->prevent_suspend) {
+ hddLog(LOGE, FL("WOW is enabled in host while not supported in FW. Prevent suspend"));
+ return -EOPNOTSUPP;
+ }
+
/* If RADAR detection is in progress (HDD), prevent suspend. The flag
* "dfs_cac_block_tx" is set to TRUE when RADAR is found and stay TRUE until
* CAC is done for a SoftAP which is in started state.
diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c
index 3aaa2febfaa4..a2c9a749ebf5 100644
--- a/CORE/HDD/src/wlan_hdd_main.c
+++ b/CORE/HDD/src/wlan_hdd_main.c
@@ -8750,6 +8750,12 @@ static void hdd_update_tgt_services(hdd_context_t *hdd_ctx,
cfg_ini->enable_sap_auth_offload &= cfg->sap_auth_offload_service;
#endif
cfg_ini->sap_get_peer_info &= cfg->get_peer_info_enabled;
+ if (cfg_ini->wowEnable && (!cfg->wow_support)) {
+ hdd_ctx->prevent_suspend = true;
+ cfg_ini->wowEnable = 0;
+ } else {
+ hdd_ctx->prevent_suspend = false;
+ }
}
/**
diff --git a/CORE/SERVICES/WMA/wma.c b/CORE/SERVICES/WMA/wma.c
index d90f6d79d2c9..f8568db2c967 100644
--- a/CORE/SERVICES/WMA/wma.c
+++ b/CORE/SERVICES/WMA/wma.c
@@ -37650,6 +37650,8 @@ static inline void wma_update_target_services(tp_wma_handle wh,
if (WMI_SERVICE_IS_ENABLED(wh->wmi_service_bitmap,
WMI_SERVICE_PEER_STATS_INFO))
cfg->get_peer_info_enabled = 1;
+ cfg->wow_support = WMI_SERVICE_IS_ENABLED(wh->wmi_service_bitmap,
+ WMI_SERVICE_WOW);
}
static inline void wma_update_target_ht_cap(tp_wma_handle wh,