wlan: add helpers to check if fw supports management logging

If firmware supports management logging, then DXE has to know
about it so that it can setup a new channel to receive the logs.
These helper functions will be used by DXE driver to make the
decision of setting up the new channel.

CRs-Fixed: 813591
Change-Id: I04050cdcf3c0fa7088e4a22b12c15411490ba075
diff --git a/CORE/HDD/inc/wlan_hdd_main.h b/CORE/HDD/inc/wlan_hdd_main.h
index 62cdeda..813427f 100644
--- a/CORE/HDD/inc/wlan_hdd_main.h
+++ b/CORE/HDD/inc/wlan_hdd_main.h
@@ -1616,4 +1616,5 @@
 VOS_STATUS wlan_hdd_handle_dfs_chan_scan(hdd_context_t *pHddCtx,
                                    tANI_U8 dfsScanMode);
 
+v_U8_t hdd_is_fw_logging_enabled(void);
 #endif    // end #if !defined( WLAN_HDD_MAIN_H )
diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c
index 2d8a6f5..8ff97e4 100755
--- a/CORE/HDD/src/wlan_hdd_main.c
+++ b/CORE/HDD/src/wlan_hdd_main.c
@@ -11021,6 +11021,20 @@
     return sme_isSta_p2p_clientConnected(pHddCtx->hHal);
 }
 
+
+/*
+ * API to find if the firmware will send logs using DXE channel
+ */
+v_U8_t hdd_is_fw_logging_enabled(void)
+{
+    hdd_context_t *pHddCtx;
+
+    pHddCtx = vos_get_context(VOS_MODULE_ID_HDD,
+                              vos_get_global_context(VOS_MODULE_ID_HDD, NULL));
+
+    return (pHddCtx && pHddCtx->mgmt_frame_logging);
+}
+
 /*
  * API to find if there is any session connected
  */
diff --git a/CORE/VOSS/inc/vos_api.h b/CORE/VOSS/inc/vos_api.h
index a368407..e4128fe 100644
--- a/CORE/VOSS/inc/vos_api.h
+++ b/CORE/VOSS/inc/vos_api.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012-2013 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2015 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -335,4 +335,7 @@
 v_U8_t    vos_get_roam_delay_stats_enabled(v_VOID_t);
 v_U32_t   vos_get_dxeReplenishRXTimerVal(void);
 v_BOOL_t  vos_get_dxeSSREnable(void);
+
+v_U8_t vos_is_fw_logging_enabled(void);
+
 #endif // if !defined __VOS_NVITEM_H
diff --git a/CORE/VOSS/src/vos_api.c b/CORE/VOSS/src/vos_api.c
index ae45680..8885c10 100644
--- a/CORE/VOSS/src/vos_api.c
+++ b/CORE/VOSS/src/vos_api.c
@@ -2298,6 +2298,23 @@
 
 /**---------------------------------------------------------------------------
 
+  \brief vos_is_fw_logging_enabled() -
+
+  API to check if firmware is configured to send logs using DXE channel
+
+  \param  -  None
+
+  \return -  0: firmware logging is not enabled
+             1: firmware logging is enabled
+
+  --------------------------------------------------------------------------*/
+v_U8_t vos_is_fw_logging_enabled(void)
+{
+   return hdd_is_fw_logging_enabled();
+}
+
+/**---------------------------------------------------------------------------
+
   \brief vos_set_roam_delay_stats_enabled() -
 
   API to set value of roamDelayStatsEnabled in vos context
diff --git a/CORE/WDI/WPAL/inc/wlan_qct_pal_api.h b/CORE/WDI/WPAL/inc/wlan_qct_pal_api.h
index 194eec3..a5b6eab 100644
--- a/CORE/WDI/WPAL/inc/wlan_qct_pal_api.h
+++ b/CORE/WDI/WPAL/inc/wlan_qct_pal_api.h
@@ -386,4 +386,5 @@
 int  wpalGetDxeReplenishRXTimerVal(void);
 int  wpalIsDxeSSREnable(void);
 
+wpt_uint8 wpalIsFwLoggingEnabled(void);
 #endif // __WLAN_QCT_PAL_API_H
diff --git a/CORE/WDI/WPAL/src/wlan_qct_pal_api.c b/CORE/WDI/WPAL/src/wlan_qct_pal_api.c
index e882fa1..42ad108 100644
--- a/CORE/WDI/WPAL/src/wlan_qct_pal_api.c
+++ b/CORE/WDI/WPAL/src/wlan_qct_pal_api.c
@@ -430,6 +430,19 @@
 }
 
 /*---------------------------------------------------------------------------
+    wpalIsFwLoggingEnabled -  Check if Firmware will send logs using DXE
+
+    Param:
+       None
+    Return:
+        Check the documentation of vos_is_fw_logging_enabled
+---------------------------------------------------------------------------*/
+wpt_uint8 wpalIsFwLoggingEnabled(void)
+{
+  return vos_is_fw_logging_enabled();
+}
+
+/*---------------------------------------------------------------------------
     wpalFwDumpReq -  Trigger the dump commands to Firmware
      
     Param: