瀏覽代碼

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
Srinivas Girigowda 8 年之前
父節點
當前提交
bc8454e978
共有 2 個文件被更改,包括 4 次插入4 次删除
  1. 3 3
      core/hdd/inc/wlan_hdd_main.h
  2. 1 1
      core/hdd/src/wlan_hdd_cfg80211.c

+ 3 - 3
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;
 }

+ 1 - 1
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;