Browse Source

qcacld-3.0: Store WMI version in a global variable

qcacld-2.0 to qcacld-3.0 propagation

Capture WMI version in a global variable for crashscope
to extract WMI logs.

Change-Id: I2f06eaf182bb67dceade397652f801e6311b8f68
CRs-Fixed: 978901
Mukul Sharma 8 years ago
parent
commit
5ff3c587fb
2 changed files with 18 additions and 0 deletions
  1. 12 0
      core/wma/inc/wma.h
  2. 6 0
      core/wma/src/wma_main.c

+ 12 - 0
core/wma/inc/wma.h

@@ -754,6 +754,18 @@ typedef struct {
 	gtx_config_t gtx_info;
 } vdev_cli_config_t;
 
+/**
+ * struct wma_version_info - Store wmi version info
+ * @major: wmi major version
+ * @minor: wmi minor version
+ * @revision: wmi revision number
+ */
+struct wma_version_info {
+	u_int32_t major;
+	u_int32_t minor;
+	u_int32_t revision;
+};
+
 /**
  * struct wma_wow - store wow patterns
  * @magic_ptrn_enable: magic pattern enable/disable

+ 6 - 0
core/wma/src/wma_main.c

@@ -1637,6 +1637,8 @@ static void wma_init_max_no_of_peers(tp_wma_handle wma_handle,
 	cfg->max_no_of_peers = max_peers;
 }
 
+struct wma_version_info g_wmi_version_info;
+
 /**
  * wma_open() - Allocate wma context and initialize it.
  * @cds_context:  cds context
@@ -1663,6 +1665,10 @@ QDF_STATUS wma_open(void *cds_context,
 
 	WMA_LOGD("%s: Enter", __func__);
 
+	g_wmi_version_info.major = __WMI_VER_MAJOR_;
+	g_wmi_version_info.minor = __WMI_VER_MINOR_;
+	g_wmi_version_info.revision = __WMI_REVISION_;
+
 	qdf_dev = cds_get_context(QDF_MODULE_ID_QDF_DEVICE);
 	htc_handle = cds_get_context(QDF_MODULE_ID_HTC);