qcacld: Update fw interface common files per CL 790083

Update fw interface common files per CL 790083

Change-Id: Ifba65f381ca57779793445736f26406943576bd0
CRs-Fixed: 585074
diff --git a/CORE/SERVICES/COMMON/wlan_module_ids.h b/CORE/SERVICES/COMMON/wlan_module_ids.h
index 0b8e43d..acb0baa 100644
--- a/CORE/SERVICES/COMMON/wlan_module_ids.h
+++ b/CORE/SERVICES/COMMON/wlan_module_ids.h
@@ -74,6 +74,7 @@
   WLAN_MODULE_TDLS,
   WLAN_MODULE_HB,
   WLAN_MODULE_TXBF,
+  WLAN_MODULE_BATCH_SCAN,
   WLAN_MODULE_ID_MAX,
   WLAN_MODULE_ID_INVALID = WLAN_MODULE_ID_MAX,
 } WLAN_MODULE_ID;
diff --git a/CORE/SERVICES/COMMON/wmi_services.h b/CORE/SERVICES/COMMON/wmi_services.h
index 577f5b0..95cad3f 100644
--- a/CORE/SERVICES/COMMON/wmi_services.h
+++ b/CORE/SERVICES/COMMON/wmi_services.h
@@ -89,6 +89,7 @@
     WMI_SERVICE_FILTER_IPSEC_NATKEEPALIVE,
     WMI_SERVICE_WLAN_HB,           /* wlan HB service */
     WMI_SERVICE_LTE_ANT_SHARE_SUPPORT,       /* support LTE/WLAN antenna sharing */
+    WMI_SERVICE_BATCH_SCAN,        /*Service to support batch scan*/
     WMI_MAX_SERVICE=64                /* max service */
 } WMI_SERVICE;
 
diff --git a/CORE/SERVICES/COMMON/wmi_tlv_defs.h b/CORE/SERVICES/COMMON/wmi_tlv_defs.h
index 4053213..85df513 100644
--- a/CORE/SERVICES/COMMON/wmi_tlv_defs.h
+++ b/CORE/SERVICES/COMMON/wmi_tlv_defs.h
@@ -396,6 +396,13 @@
     WMITLV_TAG_STRUC_wmi_dfs_radar_event_fixed_param,
     WMITLV_TAG_STRUC_wmi_dfs_phyerr_filter_ena_cmd_fixed_param,
     WMITLV_TAG_STRUC_wmi_dfs_phyerr_filter_dis_cmd_fixed_param,
+    WMITLV_TAG_STRUC_wmi_batch_scan_result_scan_list,
+    WMITLV_TAG_STRUC_wmi_batch_scan_result_network_info,
+    WMITLV_TAG_STRUC_wmi_batch_scan_enable_cmd_fixed_param,
+    WMITLV_TAG_STRUC_wmi_batch_scan_disable_cmd_fixed_param,
+    WMITLV_TAG_STRUC_wmi_batch_scan_trigger_result_cmd_fixed_param,
+    WMITLV_TAG_STRUC_wmi_batch_scan_enabled_event_fixed_param,
+    WMITLV_TAG_STRUC_wmi_batch_scan_result_event_fixed_param,
 } WMITLV_TAG_ID;
 
 /*
@@ -530,7 +537,10 @@
     OP(WMI_HB_SET_UDP_PARAMS_CMDID) \
     OP(WMI_HB_SET_UDP_PKT_FILTER_CMDID) \
     OP(WMI_DFS_PHYERR_FILTER_ENA_CMDID) \
-    OP(WMI_DFS_PHYERR_FILTER_DIS_CMDID)
+    OP(WMI_DFS_PHYERR_FILTER_DIS_CMDID) \
+    OP(WMI_BATCH_SCAN_ENABLE_CMDID) \
+    OP(WMI_BATCH_SCAN_DISABLE_CMDID) \
+    OP(WMI_BATCH_SCAN_TRIGGER_RESULT_CMDID)
 
 /*
  * IMPORTANT: Please add _ALL_ WMI Events Here.
@@ -583,7 +593,9 @@
     OP(WMI_P2P_NOA_EVENTID) \
     OP(WMI_TX_PAUSE_EVENTID) \
     OP(WMI_RFKILL_STATE_CHANGE_EVENTID) \
-    OP(WMI_DFS_RADAR_EVENTID)
+    OP(WMI_DFS_RADAR_EVENTID) \
+    OP(WMI_BATCH_SCAN_ENABLED_EVENTID) \
+    OP(WMI_BATCH_SCAN_RESULT_EVENTID)
 
 /* TLV definitions of WMI commands */
 
@@ -1381,6 +1393,21 @@
 
 WMITLV_CREATE_PARAM_STRUC(WMI_MCC_SCHED_TRAFFIC_STATS_CMDID);
 
+#define WMITLV_TABLE_WMI_BATCH_SCAN_ENABLE_CMDID(id,op,buf,len) \
+    WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_batch_scan_enable_cmd_fixed_param, wmi_batch_scan_enable_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX)
+
+WMITLV_CREATE_PARAM_STRUC(WMI_BATCH_SCAN_ENABLE_CMDID);
+
+#define WMITLV_TABLE_WMI_BATCH_SCAN_DISABLE_CMDID(id,op,buf,len) \
+    WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_batch_scan_disable_cmd_fixed_param, wmi_batch_scan_disable_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX)
+
+WMITLV_CREATE_PARAM_STRUC(WMI_BATCH_SCAN_DISABLE_CMDID);
+
+#define WMITLV_TABLE_WMI_BATCH_SCAN_TRIGGER_RESULT_CMDID(id,op,buf,len) \
+    WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_batch_scan_trigger_result_cmd_fixed_param, wmi_batch_scan_trigger_result_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX)
+
+WMITLV_CREATE_PARAM_STRUC(WMI_BATCH_SCAN_TRIGGER_RESULT_CMDID);
+
 
 /************************** TLV definitions of WMI events *******************************/
 
@@ -1628,6 +1655,16 @@
     WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_vdev_mcc_bcn_intvl_change_event_fixed_param, wmi_vdev_mcc_bcn_intvl_change_event_fixed_param, fixed_param, WMITLV_SIZE_FIX)
 WMITLV_CREATE_PARAM_STRUC(WMI_VDEV_MCC_BCN_INTERVAL_CHANGE_REQ_EVENTID);
 
+#define WMITLV_TABLE_WMI_BATCH_SCAN_ENABLED_EVENTID(id,op,buf,len)                                                         \
+    WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_batch_scan_enabled_event_fixed_param, wmi_batch_scan_enabled_event_fixed_param, fixed_param, WMITLV_SIZE_FIX)
+WMITLV_CREATE_PARAM_STRUC(WMI_BATCH_SCAN_ENABLED_EVENTID);
+
+#define WMITLV_TABLE_WMI_BATCH_SCAN_RESULT_EVENTID(id,op,buf,len) \
+    WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_batch_scan_result_event_fixed_param, wmi_batch_scan_result_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) \
+    WMITLV_ELEM(id,op,buf,len,WMITLV_TAG_ARRAY_STRUC, wmi_batch_scan_result_scan_list, scan_list, WMITLV_SIZE_VAR)    \
+    WMITLV_ELEM(id,op,buf,len,WMITLV_TAG_ARRAY_STRUC, wmi_batch_scan_result_network_info, network_list, WMITLV_SIZE_VAR)
+WMITLV_CREATE_PARAM_STRUC(WMI_BATCH_SCAN_RESULT_EVENTID);
+
 #define WMITLV_TABLE_WMI_OFFLOAD_BCN_TX_STATUS_EVENTID(id,op,buf,len)                                                                                                 \
 WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_offload_bcn_tx_status_event_fixed_param, wmi_offload_bcn_tx_status_event_fixed_param, fixed_param, WMITLV_SIZE_FIX)
     WMITLV_CREATE_PARAM_STRUC(WMI_OFFLOAD_BCN_TX_STATUS_EVENTID);
diff --git a/CORE/SERVICES/COMMON/wmi_unified.h b/CORE/SERVICES/COMMON/wmi_unified.h
index 2f3c772..dcb0aea 100644
--- a/CORE/SERVICES/COMMON/wmi_unified.h
+++ b/CORE/SERVICES/COMMON/wmi_unified.h
@@ -165,14 +165,15 @@
     WMI_GRP_TDLS,
     WMI_GRP_RESMGR,
     WMI_GRP_STA_SMPS,
-    WMI_GRP_WLAN_HB
+    WMI_GRP_WLAN_HB,
+    WMI_GRP_LOCATION_SCAN
 } WMI_GRP_ID;
 
 #define WMI_CMD_GRP_START_ID(grp_id) (((grp_id) << 12) | 0x1)
 #define WMI_EVT_GRP_START_ID(grp_id) (((grp_id) << 12) | 0x1)
 
 /**
- * Command IDs and commange events.
+ * Command IDs and commange events
  */
 typedef enum {
     /** initialize the wlan sub system */
@@ -540,11 +541,17 @@
     WMI_HB_SET_UDP_PARAMS_CMDID,
     /* set udp pkt filter for wlan HB */
     WMI_HB_SET_UDP_PKT_FILTER_CMDID,
-
     /** enable DFS phyerr/parse filter offload */
     WMI_DFS_PHYERR_FILTER_ENA_CMDID,
     /** enable DFS phyerr/parse filter offload */
     WMI_DFS_PHYERR_FILTER_DIS_CMDID,
+    /*location scan commands*/
+    /*start batch scan*/
+    WMI_BATCH_SCAN_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_LOCATION_SCAN),
+    /*stop batch scan*/
+    WMI_BATCH_SCAN_DISABLE_CMDID,
+    /*get batch scan result*/
+    WMI_BATCH_SCAN_TRIGGER_RESULT_CMDID,
 } WMI_CMD_ID;
 
 typedef enum {
@@ -712,6 +719,11 @@
     /** DFS radar event  */
     WMI_DFS_RADAR_EVENTID,
 
+    /*location scan event*/
+    /*report the firmware's capability of batch scan*/
+    WMI_BATCH_SCAN_ENABLED_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_LOCATION_SCAN),
+    /*batch scan result*/
+    WMI_BATCH_SCAN_RESULT_EVENTID,
 } WMI_EVT_ID;
 
 #define WMI_OEM_DATA_REQ_CMDID             WMI_RTT_MEASREQ_CMDID
@@ -5756,6 +5768,69 @@
      */
 } wmi_mcc_sched_traffic_stats_cmd_fixed_param;
 
+typedef struct
+{
+    A_UINT32 tlv_header;     /* TLV tag and len; tag equals  WMITLV_TAG_STRUC_wmi_batch_scan_enable_cmd_fixed_param */
+    /* unique id identifying the VDEV, generated by the caller */
+    A_UINT32 vdev_id;
+    /*Batch scan enable command parameters*/
+    A_UINT32 scanInterval;
+    A_UINT32 numScan2Batch;
+    A_UINT32 bestNetworks;
+    A_UINT32 rfBand;
+    A_UINT32 rtt;
+} wmi_batch_scan_enable_cmd_fixed_param;
+
+typedef struct
+{
+    A_UINT32 tlv_header;     /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_enabled_event_fixed_param  */
+    A_UINT32 supportedMscan;
+} wmi_batch_scan_enabled_event_fixed_param;
+
+typedef struct
+{
+    A_UINT32 tlv_header;     /* TLV tag and len; tag equals  WMITLV_TAG_STRUC_wmi_batch_scan_disable_cmd_fixed_param */
+/* unique id identifying the VDEV, generated by the caller */
+    A_UINT32 vdev_id;
+    A_UINT32   param;
+} wmi_batch_scan_disable_cmd_fixed_param;
+
+typedef struct
+{
+    A_UINT32 tlv_header;     /* TLV tag and len; tag equals  WMITLV_TAG_STRUC_wmi_batch_scan_trigger_result_cmd_fixed_param */
+    /** unique id identifying the VDEV, generated by the caller */
+    A_UINT32 vdev_id;
+    A_UINT32 param;
+} wmi_batch_scan_trigger_result_cmd_fixed_param;
+
+typedef struct
+{
+    A_UINT32 tlv_header;
+    wmi_mac_addr   bssid;     /* BSSID */
+    wmi_ssid   ssid;     /* SSID */
+    A_UINT32   ch;           /* Channel */
+    A_UINT32   rssi;         /* RSSI or Level */
+    /* Timestamp when Network was found. Used to calculate age based on timestamp in GET_RSP msg header */
+    A_UINT32  timestamp;
+} wmi_batch_scan_result_network_info;
+
+typedef struct
+{
+    A_UINT32 tlv_header;
+    A_UINT32 scanId;                         /* Scan List ID. */
+    /* No of AP in a Scan Result. Should be same as bestNetwork in SET_REQ msg */
+    A_UINT32 numNetworksInScanList;
+    A_UINT32 netWorkStartIndex;  /* indicate the start index of network info*/
+} wmi_batch_scan_result_scan_list;
+
+typedef struct
+{
+    A_UINT32 tlv_header;
+    A_UINT32 timestamp;   /*timestamp of batch scan event*/
+    A_UINT32 numScanLists;  /*number of scan in this event*/
+    A_UINT32 isLastResult;  /*is this event a last event of the whole batch scan*/
+}  wmi_batch_scan_result_event_fixed_param;
+
 typedef struct {
     A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_event_fixed_param  */
     A_UINT32 vdev_id;