From bc8454e978212f4a2675f4dd5ba6bf14d54a66eb Mon Sep 17 00:00:00 2001 From: Srinivas Girigowda Date: Mon, 17 Jul 2017 17:07:20 -0700 Subject: [PATCH] qcacld-3.0: Properly advertise mem_dump feature support Currently, mem_dump feature support is advertized just based on the compile macro, if the firmware does not support this feature, still code ends up sending true to the user space. Fix this by properly advertising the mem_dump feature support based on the the FW support. Change-Id: I4d601f764c6598c51c48d43e24e15fb6c35875bd CRs-Fixed: 2077931 --- core/hdd/inc/wlan_hdd_main.h | 6 +++--- core/hdd/src/wlan_hdd_cfg80211.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h index 27cbc65c5b06..8524984fbc4c 100644 --- a/core/hdd/inc/wlan_hdd_main.h +++ b/core/hdd/inc/wlan_hdd_main.h @@ -2179,12 +2179,12 @@ void hdd_switch_sap_channel(struct hdd_adapter *adapter, uint8_t channel); * * Return: true if supported and false otherwise */ -static inline bool hdd_is_memdump_supported(void) +static inline bool hdd_is_memdump_supported(struct hdd_context *hdd_ctx) { - return true; + return hdd_ctx->fw_mem_dump_enabled; } #else -static inline bool hdd_is_memdump_supported(void) +static inline bool hdd_is_memdump_supported(struct hdd_context *hdd_ctx) { return false; } diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index d2977b594c21..e531dd5a8528 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -5190,7 +5190,7 @@ __wlan_hdd_cfg80211_get_logger_supp_feature(struct wiphy *wiphy, features = 0; - if (hdd_is_memdump_supported()) + if (hdd_is_memdump_supported(hdd_ctx)) features |= WIFI_LOGGER_MEMORY_DUMP_SUPPORTED; features |= WIFI_LOGGER_PER_PACKET_TX_RX_STATUS_SUPPORTED; features |= WIFI_LOGGER_CONNECT_EVENT_SUPPORTED;