qcacld-2.0: CL 3915919 - update fw commmon interface files

WMI: define msgs to configure neighbor reporting

Change-Id: I749c12de8e82994608db19d076dbfef7c3bcc833
CRs-Fixed: 865207
diff --git a/CORE/SERVICES/COMMON/wlan_module_ids.h b/CORE/SERVICES/COMMON/wlan_module_ids.h
index 62dee69..a18d1e6 100644
--- a/CORE/SERVICES/COMMON/wlan_module_ids.h
+++ b/CORE/SERVICES/COMMON/wlan_module_ids.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2014-2017 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011, 2014-2018 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -108,7 +108,7 @@
   WLAN_MODULE_RX,                       /* 0x49 */
   WLAN_MODULE_WLM,                      /* 0x4a */
   WLAN_MODULE_RU_ALLOCATOR,             /* 0x4b */
-
+  WLAN_MODULE_11K_OFFLOAD,              /* 0x4c */
   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 a33d263..7ba1b3e 100644
--- a/CORE/SERVICES/COMMON/wmi_services.h
+++ b/CORE/SERVICES/COMMON/wmi_services.h
@@ -335,6 +335,7 @@
     WMI_SERVICE_SUPPORT_DIRECT_DMA=146, /* indicates target supports direct DMA,
                                          * host will rely on WMI_DMA_RING_CAPABILITIES to get supported modules */
     WMI_SERVICE_AP_OBSS_DETECTION_OFFLOAD=147, /* Support SAP mode OBSS detection offload */
+    WMI_SERVICE_11K_NEIGHBOUR_REPORT_SUPPORT=148, /* Support for 11k neighbor report */
     /******* ADD NEW SERVICES HERE *******/
 
     WMI_MAX_EXT_SERVICE
diff --git a/CORE/SERVICES/COMMON/wmi_tlv_defs.h b/CORE/SERVICES/COMMON/wmi_tlv_defs.h
index c27f939..4bc01cb 100644
--- a/CORE/SERVICES/COMMON/wmi_tlv_defs.h
+++ b/CORE/SERVICES/COMMON/wmi_tlv_defs.h
@@ -876,6 +876,9 @@
     WMITLV_TAG_STRUC_wmi_sar_get_limits_cmd_fixed_param,
     WMITLV_TAG_STRUC_wmi_sar_get_limits_event_fixed_param,
     WMITLV_TAG_STRUC_wmi_sar_get_limits_event_row,
+    WMITLV_TAG_STRUC_wmi_offload_11k_report_fixed_param,
+    WMITLV_TAG_STRUC_wmi_invoke_neighbor_report_fixed_param,
+    WMITLV_TAG_STRUC_wmi_neighbor_report_offload_tlv_param,
 } WMITLV_TAG_ID;
 
 /*
@@ -1229,6 +1232,8 @@
     OP(WMI_SAP_OBSS_DETECTION_CFG_CMDID) \
     OP(WMI_PDEV_DMA_RING_CFG_REQ_CMDID) \
     OP(WMI_SAR_GET_LIMITS_CMDID) \
+    OP(WMI_11K_OFFLOAD_REPORT_CMDID) \
+    OP(WMI_11K_INVOKE_NEIGHBOR_REPORT_CMDID) \
     /* add new CMD_LIST elements above this line */
 
 /*
@@ -1535,6 +1540,19 @@
 
 WMITLV_CREATE_PARAM_STRUC(WMI_RMV_BCN_FILTER_CMDID);
 
+/*  Offload 11k related requests */
+#define WMITLV_TABLE_WMI_11K_OFFLOAD_REPORT_CMDID(id,op,buf,len) \
+    WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_offload_11k_report_fixed_param, wmi_11k_offload_report_fixed_param,fixed_param, WMITLV_SIZE_FIX) \
+    WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_neighbor_report_11k_offload_tlv_param, offload_neighbor_report_param, WMITLV_SIZE_VAR)
+
+WMITLV_CREATE_PARAM_STRUC(WMI_11K_OFFLOAD_REPORT_CMDID);
+
+/* invoke 11k neighbor report req from FW */
+#define WMITLV_TABLE_WMI_11K_INVOKE_NEIGHBOR_REPORT_CMDID(id,op,buf,len) \
+    WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_invoke_neighbor_report_fixed_param,wmi_11k_offload_invoke_neighbor_report_fixed_param, fixed_param, WMITLV_SIZE_FIX)
+
+WMITLV_CREATE_PARAM_STRUC(WMI_11K_INVOKE_NEIGHBOR_REPORT_CMDID);
+
 /** Service bit WMI_SERVICE_ROAM_OFFLOAD for Roaming feature */
 /* Roam scan mode Cmd */
 #define WMITLV_TABLE_WMI_ROAM_SCAN_MODE(id,op,buf,len) \
diff --git a/CORE/SERVICES/COMMON/wmi_unified.h b/CORE/SERVICES/COMMON/wmi_unified.h
index 0be066a..3d568e4 100644
--- a/CORE/SERVICES/COMMON/wmi_unified.h
+++ b/CORE/SERVICES/COMMON/wmi_unified.h
@@ -242,6 +242,7 @@
     WMI_GRP_REGULATORY,          /* 0x3a */
     WMI_GRP_HW_DATA_FILTER,      /* 0x3b */
     WMI_GRP_WLM,                 /* 0x3c WLAN Latency Manager */
+    WMI_GRP_11K_OFFLOAD,         /* 0x3d */
 } WMI_GRP_ID;
 
 #define WMI_CMD_GRP_START_ID(grp_id) (((grp_id) << 12) | 0x1)
@@ -880,6 +881,11 @@
     /* Thermal Throttling SET CONF commands */
     WMI_THERM_THROT_SET_CONF_CMDID,
 
+    /*  Offload 11k related requests */
+    WMI_11K_OFFLOAD_REPORT_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_11K_OFFLOAD),
+    /* invoke neighbor report from FW */
+    WMI_11K_INVOKE_NEIGHBOR_REPORT_CMDID,
+
     /* GPIO Configuration */
     WMI_GPIO_CONFIG_CMDID=WMI_CMD_GRP_START_ID(WMI_GRP_GPIO),
     WMI_GPIO_OUTPUT_CMDID,
@@ -3265,6 +3271,42 @@
     /* followed by WMITLV_TAG_ARRAY_BYTE */
 } wmi_diag_event_fixed_param;
 
+#define WMI_11K_OFFLOAD_BITMAP_NEIGHBOR_REPORT_REQ  0x1
+
+typedef struct {
+    A_UINT32 time_offset;                   /* positive offset in secs from the time 11k offload command has been received, 0xFFFFFFFF if offset is not valid */
+    A_UINT32 low_rssi_offset;               /* positive offset in dB from current low rssi roaming trigger to send neighbor req, 0xFFFFFFFF if offset is not valid */
+    A_UINT32 bmiss_count_trigger;           /* value 1 is to send neighbor report at 1st BMISS, 0xFFFFFFFF if input is not valid */
+    A_UINT32 per_threshold_offset;          /* percentage offset from the current per_threshold, 0xFFFFFFFF if input is not valid */
+    A_UINT32 neighbor_report_cache_timeout; /* cache timeout in secs after which neighbor cache is not valid in FW, 0xFFFFFFFF if input is not valid */
+    A_UINT32 max_neighbor_report_req_cap;   /* 0xFFFFFFFF if input is not valid, else positive number per every roam, these are the maximum number of
+                                             * neighbor report requests that will be sent by FW after every roam */
+    wmi_ssid ssid;                          /* ssid of current connected AP FW might choose to use this SSID in the neighbor report req frame if it is
+                                             * interested in candidate of the same SSID */
+} wmi_neighbor_report_offload;
+
+typedef struct {
+    A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offload_11k_report_fixed_param */
+    A_UINT32 vdev_id;
+    A_UINT32 offload_11k; /* bitmask to indicate to FW what all 11k features are offloaded */
+} wmi_11k_offload_report_fixed_param;
+
+typedef struct {
+    A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_neighbor_report_offload_tlv_param */
+    wmi_neighbor_report_offload neighbor_rep_ofld_params;
+} wmi_neighbor_report_11k_offload_tlv_param;
+
+#define WMI_INVOKE_NEIGHBOR_REPORT_FLAGS_SEND_RESP_TO_HOST 0x1
+
+typedef struct {
+    A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_invoke_neighbor_report_fixed_param */
+    A_UINT32 vdev_id;
+    A_UINT32 flags;
+    wmi_ssid ssid; /* if ssid.len == 0, firmware doesn't include ssid sub-element.
+                    * In that case AP gives all the candidates in ESS without SSID filter
+                    * If host wants to insert ssid subelement in the neighbor report request frame, then it can specify the ssid here */
+} wmi_11k_offload_invoke_neighbor_report_fixed_param;
+
 #define WMI_MAX_PMKID_LEN   16
 #define WMI_MAX_PMK_LEN     64
 
@@ -21161,6 +21203,9 @@
 		WMI_RETURN_STRING(WMI_PDEV_SET_RX_FILTER_PROMISCUOUS_CMDID);
                 WMI_RETURN_STRING(WMI_SAP_OBSS_DETECTION_CFG_CMDID);
                 WMI_RETURN_STRING(WMI_PDEV_DMA_RING_CFG_REQ_CMDID);
+                WMI_RETURN_STRING(WMI_11K_OFFLOAD_REPORT_CMDID);
+                WMI_RETURN_STRING(WMI_11K_INVOKE_NEIGHBOR_REPORT_CMDID);
+
 	}
 
 	return "Invalid WMI cmd";
diff --git a/CORE/SERVICES/COMMON/wmi_version.h b/CORE/SERVICES/COMMON/wmi_version.h
index a9171c7..ce980b3 100644
--- a/CORE/SERVICES/COMMON/wmi_version.h
+++ b/CORE/SERVICES/COMMON/wmi_version.h
@@ -36,7 +36,7 @@
 #define __WMI_VER_MINOR_    0
 /** WMI revision number has to be incremented when there is a
  *  change that may or may not break compatibility. */
-#define __WMI_REVISION_ 482
+#define __WMI_REVISION_ 483
 
 /** The Version Namespace should not be normally changed. Only
  *  host and firmware of the same WMI namespace will work
diff --git a/CORE/SERVICES/WMI/wmi_unified.c b/CORE/SERVICES/WMI/wmi_unified.c
index 5868128..79286b1 100644
--- a/CORE/SERVICES/WMI/wmi_unified.c
+++ b/CORE/SERVICES/WMI/wmi_unified.c
@@ -771,6 +771,8 @@
 		CASE_RETURN_STRING(WMI_SAP_OBSS_DETECTION_CFG_CMDID);
 		CASE_RETURN_STRING(WMI_PDEV_DMA_RING_CFG_REQ_CMDID);
 		CASE_RETURN_STRING(WMI_SAR_GET_LIMITS_CMDID);
+		CASE_RETURN_STRING(WMI_11K_OFFLOAD_REPORT_CMDID);
+		CASE_RETURN_STRING(WMI_11K_INVOKE_NEIGHBOR_REPORT_CMDID);
 	}
 	return "Invalid WMI cmd";
 }