فهرست منبع

Merge changes I87f9c706,I11d15457,I4c8d9b28,I3996ce76,Idee37eb6,If3ba082b,I8263688a into wlan-cld3.driver.lnx.1.1-dev

* changes:
  Release 5.1.0.22C
  qcacld-3.0: Update correct authtype during connect
  qcacld-3.0: Changes to support wmi tx bundle completion
  qcacld-3.0: Enable LRO, NAPI, Fastpath
  qcacld-3.0: Kbuild: Enable LRO
  qcacld-3.0: Update handling of WOW packet buffer
  qcacld-3.0: CL 1546701 - update fw common interface files
Service qcabuildsw 9 سال پیش
والد
کامیت
980d5423e6

+ 4 - 6
Kbuild

@@ -168,12 +168,10 @@ ifneq ($(CONFIG_ROME_IF),sdio)
 	endif
 	endif
 
 
 	# Flag to enable LRO (Large Receive Offload)
 	# Flag to enable LRO (Large Receive Offload)
-	ifeq ($(CONFIG_CNSS_EOS), y)
-		ifeq ($(CONFIG_INET_LRO), y)
-			CONFIG_WLAN_LRO := y
-		else
-			CONFIG_WLAN_LRO := n
-		endif
+	ifeq ($(CONFIG_INET_LRO), y)
+		CONFIG_WLAN_LRO := y
+	else
+		CONFIG_WLAN_LRO := n
 	endif
 	endif
 endif
 endif
 
 

+ 57 - 31
config/WCNSS_qcom_cfg.ini

@@ -442,16 +442,6 @@ gEnablePowerSaveOffload=2
 #Enable firmware uart print
 #Enable firmware uart print
 gEnablefwprint=0
 gEnablefwprint=0
 
 
-#IPA config
-gIPAConfig=0
-gIPADescSize=800
-gIPAPreFilterEnable=1
-gIPARMEnable=1
-gIPAIPv6Enable=1
-
-IpaUcOffloadEnabled=0
-gIpaUcStaOffload=0
-
 #P2P Listen offload
 #P2P Listen offload
 gEnableP2pListenOffload=1
 gEnableP2pListenOffload=1
 
 
@@ -479,12 +469,6 @@ gEnableMCCAdaptiveScheduler=1
 #Enable or Disable p2p device address administered
 #Enable or Disable p2p device address administered
 isP2pDeviceAddrAdministrated=0
 isP2pDeviceAddrAdministrated=0
 
 
-#Enable Rx thread
-gEnableRxThread=1
-
-#Enable NAPI
-gEnableNAPI=1
-
 # Set Thermal Power limit
 # Set Thermal Power limit
 TxPower2g=10
 TxPower2g=10
 TxPower5g=10
 TxPower5g=10
@@ -511,14 +495,6 @@ ssdp = 0
 #Enable Memory Deep Sleep
 #Enable Memory Deep Sleep
 gEnableMemDeepSleep=1
 gEnableMemDeepSleep=1
 
 
-# Bus bandwidth threshold values in terms of number of packets
-gBusBandwidthHighThreshold=2000
-gBusBandwidthMediumThreshold=500
-gBusBandwidthLowThreshold=150
-
-# Bus bandwidth compute timeout value in ms
-gBusBandwidthComputeInterval=100
-
 # Regulatory Setting; 0=STRICT; 1=CUSTOM
 # Regulatory Setting; 0=STRICT; 1=CUSTOM
 gRegulatoryChangeCountry=1
 gRegulatoryChangeCountry=1
 # RA filtering rate limit param, the current value would not
 # RA filtering rate limit param, the current value would not
@@ -600,20 +576,70 @@ gEnableTDLSOffChannel=1
 # 1=Enable, 0=Disable (default)
 # 1=Enable, 0=Disable (default)
 gEnableMacAddrSpoof=0
 gEnableMacAddrSpoof=0
 
 
+################ Datapath feature set Begin ################
+# Bus bandwidth threshold values in terms of number of packets
+gBusBandwidthHighThreshold=2000
+gBusBandwidthMediumThreshold=500
+gBusBandwidthLowThreshold=150
+
+# Bus bandwidth compute timeout value in ms
+gBusBandwidthComputeInterval=100
+
+# VHT Tx/Rx MCS values
+# Valid values are 0,1,2. If commented out, the default value is 0.
+# 0=MCS0-7, 1=MCS0-8, 2=MCS0-9
+gVhtRxMCS=2
+gVhtTxMCS=2
+
+# VHT Tx/Rx MCS values for 2x2
+# Valid values are 0,1,2. If commented out, the default value is 0.
+# 0=MCS0-7, 1=MCS0-8, 2=MCS0-9
+gEnable2x2=1
+gVhtRxMCS2x2=2
+gVhtTxMCS2x2=2
+
+#IPA config
+gIPAConfig=0
+gIPADescSize=800
+gIPAPreFilterEnable=1
+gIPARMEnable=1
+gIPAIPv6Enable=1
+
+IpaUcOffloadEnabled=0
+gIpaUcStaOffload=0
+
+# Enable/Disable RX full reorder offload
+gReorderOffloadSupported=1
+
+# Enable CE classification
+# 1 - enable(default)  0 - disable
+gCEClassifyEnable=1
+
+#Enable Rx thread
+# 1 - enable  0 - disable(default)
+gEnableRxThread=0
+
 # Enable(Tx) fastpath for data traffic.
 # Enable(Tx) fastpath for data traffic.
-# 0 - disable
-# 1 - enable
+# 1 - enable(default)  0 - disable
 gEnableFastPath=1
 gEnableFastPath=1
 
 
+# This flag enables IP, TCP and UDP checksum offload
+# 1 - enable(default)  0 - disable
+gEnableIpTcpUdpChecksumOffload=1
+
+# Enable NAPI
+# 1 - enable(default)  0 - disable
+gEnableNAPI=1
+
 # Enable TCP Segmentation Offload
 # Enable TCP Segmentation Offload
-# 0 - disable
-# 1 - enable
+# 1 - enable(default)  0 - disable
 TSOEnable=1
 TSOEnable=1
 
 
-# Enable Large Receive Offload
-# 0 - disable
-# 1 - enable
+# Enable Large Recieve Offload
+# 1 - enable(default)  0 - disable
 LROEnable=1
 LROEnable=1
+################ Datapath feature set End ################
+
 END
 END
 
 
 # Note: Configuration parser would not read anything past the END marker
 # Note: Configuration parser would not read anything past the END marker

+ 0 - 26
core/cds/inc/cds_api.h

@@ -90,32 +90,6 @@ void cds_set_driver_state(enum cds_driver_state);
 void cds_clear_driver_state(enum cds_driver_state);
 void cds_clear_driver_state(enum cds_driver_state);
 enum cds_driver_state cds_get_driver_state(void);
 enum cds_driver_state cds_get_driver_state(void);
 
 
-/**
- * cds_get_u16()- get 16 bit data in little endian
- * @ptr: buffer that holds data
- *
- * Return: uint16_t data in little endian format
- */
-static inline uint16_t cds_get_u16(uint8_t *ptr)
-{
-	return ((uint16_t) (*(ptr+1) << 8)) |
-		((uint16_t) (*ptr));
-}
-
-/**
- * cds_get_u32()- get 32 bit data in little endian
- * @ptr: buffer that holds data
- *
- * Return: uint32_t data in little endian format
- */
-static inline uint32_t cds_get_u32(uint8_t *ptr)
-{
-	return (*(ptr+3) << 24) |
-		(*(ptr+2) << 16) |
-		(*(ptr+1) << 8) |
-		(*(ptr));
-}
-
 /**
 /**
  * cds_is_driver_loading() - Is driver load in progress
  * cds_is_driver_loading() - Is driver load in progress
  *
  *

+ 3 - 1
core/hdd/inc/wlan_hdd_assoc.h

@@ -99,6 +99,8 @@ typedef enum {
  * @ht_present: ht element present or not
  * @ht_present: ht element present or not
  * @vht_present: vht element present or not
  * @vht_present: vht element present or not
  * @hs20_present: hs20 element present or not
  * @hs20_present: hs20 element present or not
+ * @ht_op_present: ht operation present or not
+ * @vht_op_present: vht operation present or not
  */
  */
 struct hdd_conn_flag {
 struct hdd_conn_flag {
 	uint8_t ht_present:1;
 	uint8_t ht_present:1;
@@ -173,7 +175,7 @@ struct hdd_conn_flag {
  * @ht_caps: holds ht capabilities info
  * @ht_caps: holds ht capabilities info
  * @vht_caps: holds vht capabilities info
  * @vht_caps: holds vht capabilities info
  * @hs20vendor_ie: holds passpoint/hs20 info
  * @hs20vendor_ie: holds passpoint/hs20 info
- * @hdd_conn_flag: flag conn info params is present or not
+ * @conn_flag: flag conn info params is present or not
  * @roam_count: roaming counter
  * @roam_count: roaming counter
  * @signal: holds rssi info
  * @signal: holds rssi info
  * @assoc_status_code: holds assoc fail reason
  * @assoc_status_code: holds assoc fail reason

+ 3 - 3
core/hdd/src/wlan_hdd_cfg80211.c

@@ -3328,7 +3328,7 @@ fail:
  *
  *
  * Return: Success(0) or reason code for failure
  * Return: Success(0) or reason code for failure
  */
  */
-static int32_t
+static int
 __hdd_cfg80211_get_station_cmd(struct wiphy *wiphy,
 __hdd_cfg80211_get_station_cmd(struct wiphy *wiphy,
 			       struct wireless_dev *wdev,
 			       struct wireless_dev *wdev,
 			       const void *data,
 			       const void *data,
@@ -9465,8 +9465,8 @@ int wlan_hdd_cfg80211_connect_start(hdd_adapter_t *pAdapter,
 	}
 	}
 
 
 	pRoamProfile = &pWextState->roamProfile;
 	pRoamProfile = &pWextState->roamProfile;
-	qdf_mem_zero(&hdd_sta_ctx->conn_info,
-		     sizeof(hdd_sta_ctx->conn_info));
+	qdf_mem_zero(&hdd_sta_ctx->conn_info.conn_flag,
+		     sizeof(hdd_sta_ctx->conn_info.conn_flag));
 
 
 	if (pRoamProfile) {
 	if (pRoamProfile) {
 		hdd_station_ctx_t *pHddStaCtx;
 		hdd_station_ctx_t *pHddStaCtx;

+ 3 - 0
core/hdd/src/wlan_hdd_cfg80211.h

@@ -406,8 +406,10 @@ enum qca_nl80211_vendor_subcmds {
  * latest cached information during the connected state , if queried
  * latest cached information during the connected state , if queried
  * when in disconnected state.
  * when in disconnected state.
  *
  *
+ * @QCA_WLAN_VENDOR_ATTR_GET_STATION_INVALID: Invalid attribute
  * @QCA_WLAN_VENDOR_ATTR_GET_STATION_INFO: bss info
  * @QCA_WLAN_VENDOR_ATTR_GET_STATION_INFO: bss info
  * @QCA_WLAN_VENDOR_ATTR_GET_STATION_ASSOC_FAIL_REASON: assoc fail reason
  * @QCA_WLAN_VENDOR_ATTR_GET_STATION_ASSOC_FAIL_REASON: assoc fail reason
+ * @QCA_WLAN_VENDOR_ATTR_GET_STATION_AFTER_LAST: After last
  */
  */
 enum qca_wlan_vendor_attr_get_station {
 enum qca_wlan_vendor_attr_get_station {
 	QCA_WLAN_VENDOR_ATTR_GET_STATION_INVALID = 0,
 	QCA_WLAN_VENDOR_ATTR_GET_STATION_INVALID = 0,
@@ -504,6 +506,7 @@ enum qca_wlan_auth_type {
  * @QCA_WLAN_VENDOR_ATTR_GET_STATION_INFO_ASSOC_FAIL_REASON:
  * @QCA_WLAN_VENDOR_ATTR_GET_STATION_INFO_ASSOC_FAIL_REASON:
  *  Status Code Corresponding to the Association Failure.
  *  Status Code Corresponding to the Association Failure.
  *  Unsigned 32 bit value.
  *  Unsigned 32 bit value.
+ * @QCA_WLAN_VENDOR_ATTR_GET_STATION_INFO_AFTER_LAST: After last
  */
  */
 enum qca_wlan_vendor_attr_get_station_info {
 enum qca_wlan_vendor_attr_get_station_info {
 	QCA_WLAN_VENDOR_ATTR_GET_STATION_INFO_INVALID = 0,
 	QCA_WLAN_VENDOR_ATTR_GET_STATION_INFO_INVALID = 0,

+ 2 - 2
core/mac/inc/qwlan_version.h

@@ -41,9 +41,9 @@
 #define QWLAN_VERSION_MAJOR            5
 #define QWLAN_VERSION_MAJOR            5
 #define QWLAN_VERSION_MINOR            1
 #define QWLAN_VERSION_MINOR            1
 #define QWLAN_VERSION_PATCH            0
 #define QWLAN_VERSION_PATCH            0
-#define QWLAN_VERSION_EXTRA            "B"
+#define QWLAN_VERSION_EXTRA            "C"
 #define QWLAN_VERSION_BUILD            22
 #define QWLAN_VERSION_BUILD            22
 
 
-#define QWLAN_VERSIONSTR               "5.1.0.22B"
+#define QWLAN_VERSIONSTR               "5.1.0.22C"
 
 
 #endif /* QWLAN_VERSION_H */
 #endif /* QWLAN_VERSION_H */

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

@@ -2077,6 +2077,8 @@ struct wmi_desc_t *wmi_desc_get(tp_wma_handle wma_handle);
 void wmi_desc_put(tp_wma_handle wma_handle, struct wmi_desc_t *wmi_desc);
 void wmi_desc_put(tp_wma_handle wma_handle, struct wmi_desc_t *wmi_desc);
 int wma_mgmt_tx_completion_handler(void *handle, uint8_t *cmpl_event_params,
 int wma_mgmt_tx_completion_handler(void *handle, uint8_t *cmpl_event_params,
 				   uint32_t len);
 				   uint32_t len);
+int wma_mgmt_tx_bundle_completion_handler(void *handle,
+	uint8_t *cmpl_event_params, uint32_t len);
 void wma_set_dfs_region(tp_wma_handle wma, uint8_t dfs_region);
 void wma_set_dfs_region(tp_wma_handle wma, uint8_t dfs_region);
 uint32_t wma_get_vht_ch_width(void);
 uint32_t wma_get_vht_ch_width(void);
 QDF_STATUS
 QDF_STATUS

+ 197 - 91
core/wma/src/wma_features.c

@@ -2732,6 +2732,138 @@ static void wma_wow_wake_up_stats(tp_wma_handle wma, uint8_t *data,
 	return;
 	return;
 }
 }
 
 
+#ifdef FEATURE_WLAN_EXTSCAN
+/**
+ * wma_extscan_get_eventid_from_tlvtag() - map tlv tag to corresponding event id
+ * @tag: WMI TLV tag
+ *
+ * Return:
+ *	0 if TLV tag is invalid
+ *	else return corresponding WMI event id
+ */
+static int wma_extscan_get_eventid_from_tlvtag(uint32_t tag)
+{
+	uint32_t event_id;
+
+	switch (tag) {
+	case WMITLV_TAG_STRUC_wmi_extscan_start_stop_event_fixed_param:
+		event_id = WMI_EXTSCAN_START_STOP_EVENTID;
+		break;
+
+	case WMITLV_TAG_STRUC_wmi_extscan_operation_event_fixed_param:
+		event_id = WMI_EXTSCAN_OPERATION_EVENTID;
+		break;
+
+	case WMITLV_TAG_STRUC_wmi_extscan_table_usage_event_fixed_param:
+		event_id = WMI_EXTSCAN_TABLE_USAGE_EVENTID;
+		break;
+
+	case WMITLV_TAG_STRUC_wmi_extscan_cached_results_event_fixed_param:
+		event_id = WMI_EXTSCAN_CACHED_RESULTS_EVENTID;
+		break;
+
+	case WMITLV_TAG_STRUC_wmi_extscan_wlan_change_results_event_fixed_param:
+		event_id = WMI_EXTSCAN_WLAN_CHANGE_RESULTS_EVENTID;
+		break;
+
+	case WMITLV_TAG_STRUC_wmi_extscan_hotlist_match_event_fixed_param:
+		event_id = WMI_EXTSCAN_HOTLIST_MATCH_EVENTID;
+		break;
+
+	case WMITLV_TAG_STRUC_wmi_extscan_capabilities_event_fixed_param:
+		event_id = WMI_EXTSCAN_CAPABILITIES_EVENTID;
+		break;
+
+	case WMITLV_TAG_STRUC_wmi_extscan_hotlist_ssid_match_event_fixed_param:
+		event_id = WMI_EXTSCAN_HOTLIST_SSID_MATCH_EVENTID;
+		break;
+
+	default:
+		event_id = 0;
+		WMA_LOGE("%s: Unknown tag: %d", __func__, tag);
+		break;
+	}
+
+	WMA_LOGI("%s: For tag %d WMI event 0x%x", __func__, tag, event_id);
+	return event_id;
+}
+#else
+static int wma_extscan_get_eventid_from_tlvtag(uint32_t tag)
+{
+	return 0;
+}
+#endif
+
+/**
+ * wow_get_wmi_eventid() - map reason or tlv tag to corresponding event id
+ * @tag: WMI TLV tag
+ * @reason: WOW reason
+ *
+ * WOW reason type is primarily used to find the ID. If there could be
+ * multiple events that can be sent as a WOW event with same reason
+ * then tlv tag is used to identify the corresponding event.
+ *
+ * Return:
+ *      0 if TLV tag/reason is invalid
+ *      else return corresponding WMI event id
+ */
+static int wow_get_wmi_eventid(int32_t reason, uint32_t tag)
+{
+	uint32_t event_id;
+
+	switch (reason) {
+	case WOW_REASON_NLO_SCAN_COMPLETE:
+		event_id = WMI_NLO_SCAN_COMPLETE_EVENTID;
+		break;
+	case WOW_REASON_CSA_EVENT:
+		event_id = WMI_CSA_HANDLING_EVENTID;
+		break;
+	case WOW_REASON_LOW_RSSI:
+		event_id = WMI_ROAM_EVENTID;
+		break;
+	case WOW_REASON_CLIENT_KICKOUT_EVENT:
+		event_id = WMI_PEER_STA_KICKOUT_EVENTID;
+		break;
+	case WOW_REASON_EXTSCAN:
+		event_id = wma_extscan_get_eventid_from_tlvtag(tag);
+		break;
+	case WOW_REASON_RSSI_BREACH_EVENT:
+		event_id = WMI_RSSI_BREACH_EVENTID;
+		break;
+	case WOW_REASON_NAN_EVENT:
+		event_id = WMI_NAN_EVENTID;
+		break;
+	default:
+		WMA_LOGD(FL("Unexpected WOW reason : %s(%d)"),
+			 wma_wow_wake_reason_str(reason), reason);
+		event_id = 0;
+		break;
+	}
+
+	return event_id;
+}
+
+/**
+ * tlv_check_required() - tells whether to check the wow packet buffer
+ *                        for proper TLV structure.
+ * @reason: WOW reason
+ *
+ * In most cases, wow wake up event carries the actual event buffer in
+ * wow_packet_buffer with some exceptions. This function is used to
+ * determine when to check for the TLVs in wow_packet_buffer.
+ *
+ * Return: true if check is required and false otherwise.
+ */
+static bool tlv_check_required(int32_t reason)
+{
+	switch (reason) {
+	case WOW_REASON_PATTERN_MATCH_FOUND:
+		return false;
+	default:
+		return true;
+	}
+}
+
 /**
 /**
  * wma_wow_wakeup_host_event() - wakeup host event handler
  * wma_wow_wakeup_host_event() - wakeup host event handler
  * @handle: wma handle
  * @handle: wma handle
@@ -2753,7 +2885,9 @@ int wma_wow_wakeup_host_event(void *handle, uint8_t *event,
 	struct wma_txrx_node *node;
 	struct wma_txrx_node *node;
 #endif /* FEATURE_WLAN_SCAN_PNO */
 #endif /* FEATURE_WLAN_SCAN_PNO */
 	uint32_t wake_lock_duration = 0;
 	uint32_t wake_lock_duration = 0;
-	uint32_t wow_buf_pkt_len = 0;
+	void *wmi_cmd_struct_ptr = NULL;
+	uint32_t tlv_hdr, tag, wow_buf_pkt_len = 0, event_id = 0;
+	int tlv_ok_status;
 
 
 	param_buf = (WMI_WOW_WAKEUP_HOST_EVENTID_param_tlvs *) event;
 	param_buf = (WMI_WOW_WAKEUP_HOST_EVENTID_param_tlvs *) event;
 	if (!param_buf) {
 	if (!param_buf) {
@@ -2769,6 +2903,35 @@ int wma_wow_wakeup_host_event(void *handle, uint8_t *event,
 
 
 	qdf_event_set(&wma->wma_resume_event);
 	qdf_event_set(&wma->wma_resume_event);
 
 
+	if (param_buf->wow_packet_buffer &&
+	    tlv_check_required(wake_info->wake_reason)) {
+		/*
+		 * In case of wow_packet_buffer, first 4 bytes is the length.
+		 * Following the length is the actual buffer.
+		 */
+		wow_buf_pkt_len = *(uint32_t *)param_buf->wow_packet_buffer;
+		tlv_hdr = WMITLV_GET_HDR(
+				(uint8_t *)param_buf->wow_packet_buffer + 4);
+
+		tag = WMITLV_GET_TLVTAG(tlv_hdr);
+		event_id = wow_get_wmi_eventid(wake_info->wake_reason, tag);
+		if (!event_id) {
+			WMA_LOGE(FL("Unable to find matching ID"));
+			return -EINVAL;
+		}
+
+		tlv_ok_status = wmitlv_check_and_pad_event_tlvs(
+				    handle, param_buf->wow_packet_buffer + 4,
+				    wow_buf_pkt_len, event_id,
+				    &wmi_cmd_struct_ptr);
+
+		if (tlv_ok_status != 0) {
+			WMA_LOGE(FL("Invalid TLVs, Length:%d event_id:%d status: %d"),
+				 wow_buf_pkt_len, event_id, tlv_ok_status);
+			return -EINVAL;
+		}
+	}
+
 	switch (wake_info->wake_reason) {
 	switch (wake_info->wake_reason) {
 	case WOW_REASON_AUTH_REQ_RECV:
 	case WOW_REASON_AUTH_REQ_RECV:
 		wake_lock_duration = WMA_AUTH_REQ_RECV_WAKE_LOCK_TIMEOUT;
 		wake_lock_duration = WMA_AUTH_REQ_RECV_WAKE_LOCK_TIMEOUT;
@@ -2819,34 +2982,19 @@ int wma_wow_wakeup_host_event(void *handle, uint8_t *event,
 		break;
 		break;
 
 
 	case WOW_REASON_NLO_SCAN_COMPLETE:
 	case WOW_REASON_NLO_SCAN_COMPLETE:
-		{
-			WMI_NLO_SCAN_COMPLETE_EVENTID_param_tlvs param;
-
-			WMA_LOGD("Host woken up due to pno scan complete reason");
-
-			/* First 4-bytes of wow_packet_buffer is the length */
-			if (param_buf->wow_packet_buffer) {
-				param.fixed_param = (wmi_nlo_event *)
-					(param_buf->wow_packet_buffer + 4);
-				wma_nlo_scan_cmp_evt_handler(handle,
-					(u_int8_t *)&param, sizeof(param));
-			} else
-				WMA_LOGD("No wow_packet_buffer present");
-		}
+		WMA_LOGD("Host woken up due to pno scan complete reason");
+		if (param_buf->wow_packet_buffer)
+			wma_nlo_scan_cmp_evt_handler(handle,
+					wmi_cmd_struct_ptr, wow_buf_pkt_len);
+		else
+			WMA_LOGD("No wow_packet_buffer present");
 		break;
 		break;
 #endif /* FEATURE_WLAN_SCAN_PNO */
 #endif /* FEATURE_WLAN_SCAN_PNO */
 
 
 	case WOW_REASON_CSA_EVENT:
 	case WOW_REASON_CSA_EVENT:
-	{
-		WMI_CSA_HANDLING_EVENTID_param_tlvs param;
 		WMA_LOGD("Host woken up because of CSA IE");
 		WMA_LOGD("Host woken up because of CSA IE");
-		param.fixed_param = (wmi_csa_event_fixed_param *)
-				    (((uint8_t *) wake_info)
-				     + sizeof(WOW_EVENT_INFO_fixed_param)
-				     + WOW_CSA_EVENT_OFFSET);
-		wma_csa_offload_handler(handle, (uint8_t *) &param,
-					sizeof(param));
-	}
+		wma_csa_offload_handler(handle, wmi_cmd_struct_ptr,
+					wow_buf_pkt_len);
 	break;
 	break;
 
 
 #ifdef FEATURE_WLAN_LPHB
 #ifdef FEATURE_WLAN_LPHB
@@ -2878,115 +3026,69 @@ int wma_wow_wakeup_host_event(void *handle, uint8_t *event,
 		break;
 		break;
 
 
 	case WOW_REASON_LOW_RSSI:
 	case WOW_REASON_LOW_RSSI:
-	{
 		/* WOW_REASON_LOW_RSSI is used for all roaming events.
 		/* WOW_REASON_LOW_RSSI is used for all roaming events.
 		 * WMI_ROAM_REASON_BETTER_AP, WMI_ROAM_REASON_BMISS,
 		 * WMI_ROAM_REASON_BETTER_AP, WMI_ROAM_REASON_BMISS,
 		 * WMI_ROAM_REASON_SUITABLE_AP will be handled by
 		 * WMI_ROAM_REASON_SUITABLE_AP will be handled by
 		 * wma_roam_event_callback().
 		 * wma_roam_event_callback().
 		 */
 		 */
-		WMI_ROAM_EVENTID_param_tlvs param;
 		wma_wow_wake_up_stats(wma, NULL, 0, WOW_REASON_LOW_RSSI);
 		wma_wow_wake_up_stats(wma, NULL, 0, WOW_REASON_LOW_RSSI);
+		WMA_LOGD("Host woken up because of roam event");
 		if (param_buf->wow_packet_buffer) {
 		if (param_buf->wow_packet_buffer) {
 			/* Roam event is embedded in wow_packet_buffer */
 			/* Roam event is embedded in wow_packet_buffer */
-			WMA_LOGD("Host woken up because of roam event");
-			qdf_mem_copy((uint8_t *) &wow_buf_pkt_len,
-				     param_buf->wow_packet_buffer, 4);
 			WMA_LOGD("wow_packet_buffer dump");
 			WMA_LOGD("wow_packet_buffer dump");
 			qdf_trace_hex_dump(QDF_MODULE_ID_WMA,
 			qdf_trace_hex_dump(QDF_MODULE_ID_WMA,
 					   QDF_TRACE_LEVEL_DEBUG,
 					   QDF_TRACE_LEVEL_DEBUG,
 					   param_buf->wow_packet_buffer,
 					   param_buf->wow_packet_buffer,
 					   wow_buf_pkt_len);
 					   wow_buf_pkt_len);
-			if (wow_buf_pkt_len >= sizeof(param)) {
-				param.fixed_param =
-					(wmi_roam_event_fixed_param *)
-					(param_buf->wow_packet_buffer + 4);
-				wma_roam_event_callback(handle,
-							(uint8_t *) &
-							param,
-							sizeof(param));
-			} else {
-				WMA_LOGE("Wrong length for roam event = %d bytes",
-					wow_buf_pkt_len);
-			}
+			wma_roam_event_callback(handle, wmi_cmd_struct_ptr,
+						wow_buf_pkt_len);
 		} else {
 		} else {
-			/* No wow_packet_buffer means a better AP beacon
+			/*
+			 * No wow_packet_buffer means a better AP beacon
 			 * will follow in a later event.
 			 * will follow in a later event.
 			 */
 			 */
 			WMA_LOGD("Host woken up because of better AP beacon");
 			WMA_LOGD("Host woken up because of better AP beacon");
 		}
 		}
 		break;
 		break;
-	}
 	case WOW_REASON_CLIENT_KICKOUT_EVENT:
 	case WOW_REASON_CLIENT_KICKOUT_EVENT:
-		{
-		WMI_PEER_STA_KICKOUT_EVENTID_param_tlvs param;
+		WMA_LOGD("Host woken up because of sta_kickout event");
 		if (param_buf->wow_packet_buffer) {
 		if (param_buf->wow_packet_buffer) {
-		    /* station kickout event embedded in wow_packet_buffer */
-		    WMA_LOGD("Host woken up because of sta_kickout event");
-		    qdf_mem_copy((u_int8_t *) &wow_buf_pkt_len,
-				param_buf->wow_packet_buffer, 4);
-		    WMA_LOGD("wow_packet_buffer dump");
-				qdf_trace_hex_dump(QDF_MODULE_ID_WMA,
+			WMA_LOGD("wow_packet_buffer dump");
+			qdf_trace_hex_dump(QDF_MODULE_ID_WMA,
 				QDF_TRACE_LEVEL_DEBUG,
 				QDF_TRACE_LEVEL_DEBUG,
 				param_buf->wow_packet_buffer, wow_buf_pkt_len);
 				param_buf->wow_packet_buffer, wow_buf_pkt_len);
-		    if (wow_buf_pkt_len >= sizeof(param)) {
-			param.fixed_param = (wmi_peer_sta_kickout_event_fixed_param *)
-					(param_buf->wow_packet_buffer + 4);
 			wma_peer_sta_kickout_event_handler(handle,
 			wma_peer_sta_kickout_event_handler(handle,
-					(u_int8_t *)&param, sizeof(param));
-		    } else {
-			WMA_LOGE("Wrong length for sta_kickout event = %d bytes",
-					wow_buf_pkt_len);
-		    }
+				wmi_cmd_struct_ptr, wow_buf_pkt_len);
 		} else {
 		} else {
 		    WMA_LOGD("No wow_packet_buffer present");
 		    WMA_LOGD("No wow_packet_buffer present");
 		}
 		}
 		break;
 		break;
-	}
 #ifdef FEATURE_WLAN_EXTSCAN
 #ifdef FEATURE_WLAN_EXTSCAN
 	case WOW_REASON_EXTSCAN:
 	case WOW_REASON_EXTSCAN:
 		WMA_LOGD("Host woken up because of extscan reason");
 		WMA_LOGD("Host woken up because of extscan reason");
 		wma_wow_wake_up_stats(wma, NULL, 0, WOW_REASON_EXTSCAN);
 		wma_wow_wake_up_stats(wma, NULL, 0, WOW_REASON_EXTSCAN);
-		if (param_buf->wow_packet_buffer) {
-			wow_buf_pkt_len =
-				*(uint32_t *)param_buf->wow_packet_buffer;
+		if (param_buf->wow_packet_buffer)
 			wma_extscan_wow_event_callback(handle,
 			wma_extscan_wow_event_callback(handle,
-				(u_int8_t *)(param_buf->wow_packet_buffer + 4),
-				wow_buf_pkt_len);
-		} else
+				wmi_cmd_struct_ptr, wow_buf_pkt_len);
+		else
 			WMA_LOGE("wow_packet_buffer is empty");
 			WMA_LOGE("wow_packet_buffer is empty");
 		break;
 		break;
 #endif
 #endif
 	case WOW_REASON_RSSI_BREACH_EVENT:
 	case WOW_REASON_RSSI_BREACH_EVENT:
-		{
-			WMI_RSSI_BREACH_EVENTID_param_tlvs param;
-
-			wma_wow_wake_up_stats(wma, NULL, 0,
+		wma_wow_wake_up_stats(wma, NULL, 0,
 				WOW_REASON_RSSI_BREACH_EVENT);
 				WOW_REASON_RSSI_BREACH_EVENT);
-			WMA_LOGD("Host woken up because of rssi breach reason");
-			/* rssi breach event is embedded in wow_packet_buffer */
-			if (param_buf->wow_packet_buffer) {
-				qdf_mem_copy((u_int8_t *) &wow_buf_pkt_len,
-					param_buf->wow_packet_buffer, 4);
-				if (wow_buf_pkt_len >= sizeof(param)) {
-					param.fixed_param =
-					(wmi_rssi_breach_event_fixed_param *)
-					(param_buf->wow_packet_buffer + 4);
-					wma_rssi_breached_event_handler(handle,
-							(u_int8_t *)&param,
-							sizeof(param));
-				} else {
-					WMA_LOGE("%s: Wrong length: %d bytes",
-						__func__, wow_buf_pkt_len);
-				}
-			} else
-			    WMA_LOGD("No wow_packet_buffer present");
-		}
+		WMA_LOGD("Host woken up because of rssi breach reason");
+		/* rssi breach event is embedded in wow_packet_buffer */
+		if (param_buf->wow_packet_buffer)
+			wma_rssi_breached_event_handler(handle,
+				wmi_cmd_struct_ptr, wow_buf_pkt_len);
+		else
+		    WMA_LOGD("No wow_packet_buffer present");
 		break;
 		break;
 	case WOW_REASON_NAN_EVENT:
 	case WOW_REASON_NAN_EVENT:
 		WMA_LOGA("Host woken up due to NAN event reason");
 		WMA_LOGA("Host woken up due to NAN event reason");
 		wma_nan_rsp_event_handler(handle,
 		wma_nan_rsp_event_handler(handle,
-				(uint8_t *)param_buf->wow_packet_buffer,
-				sizeof(WMI_NAN_EVENTID_param_tlvs));
+				wmi_cmd_struct_ptr, wow_buf_pkt_len);
 		break;
 		break;
 	case WOW_REASON_NAN_DATA:
 	case WOW_REASON_NAN_DATA:
 		WMA_LOGD(FL("Host woken up for NAN data path event from FW"));
 		WMA_LOGD(FL("Host woken up for NAN data path event from FW"));
@@ -3006,6 +3108,9 @@ int wma_wow_wakeup_host_event(void *handle, uint8_t *event,
 		}
 		}
 		break;
 		break;
 	default:
 	default:
+		WMA_LOGE(FL("WOW reason %s(%d)- not handled"),
+			wma_wow_wake_reason_str(wake_info->wake_reason),
+			wake_info->wake_reason);
 		break;
 		break;
 	}
 	}
 
 
@@ -3016,6 +3121,7 @@ int wma_wow_wakeup_host_event(void *handle, uint8_t *event,
 		WMA_LOGA("Holding %d msec wake_lock", wake_lock_duration);
 		WMA_LOGA("Holding %d msec wake_lock", wake_lock_duration);
 	}
 	}
 
 
+	wmitlv_free_allocated_event_tlvs(event_id, &wmi_cmd_struct_ptr);
 	return 0;
 	return 0;
 }
 }
 
 

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

@@ -238,6 +238,8 @@ static void wma_set_default_tgt_config(tp_wma_handle wma_handle)
 	tgt_cfg.num_tids = (2 * (no_of_peers_supported + CFG_TGT_NUM_VDEV + 2));
 	tgt_cfg.num_tids = (2 * (no_of_peers_supported + CFG_TGT_NUM_VDEV + 2));
 	tgt_cfg.scan_max_pending_req = wma_handle->max_scan;
 	tgt_cfg.scan_max_pending_req = wma_handle->max_scan;
 
 
+	WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_SET(tgt_cfg.flag1, 1);
+
 	WMITLV_SET_HDR(&tgt_cfg.tlv_header,
 	WMITLV_SET_HDR(&tgt_cfg.tlv_header,
 		       WMITLV_TAG_STRUC_wmi_resource_config,
 		       WMITLV_TAG_STRUC_wmi_resource_config,
 		       WMITLV_GET_STRUCT_TLVLEN(wmi_resource_config));
 		       WMITLV_GET_STRUCT_TLVLEN(wmi_resource_config));
@@ -4318,6 +4320,16 @@ int wma_rx_service_ready_event(void *handle, uint8_t *cmd_param_info,
 			return -EINVAL;
 			return -EINVAL;
 		}
 		}
 
 
+		status = wmi_unified_register_event_handler(
+				wma_handle->wmi_handle,
+				WMI_MGMT_TX_BUNDLE_COMPLETION_EVENTID,
+				wma_mgmt_tx_bundle_completion_handler,
+				WMA_RX_SERIALIZER_CTX);
+		if (status) {
+			WMA_LOGE("Failed to register MGMT over WMI completion handler");
+			return -EINVAL;
+		}
+
 	} else {
 	} else {
 		WMA_LOGE("FW doesnot support WMI_SERVICE_MGMT_TX_WMI, Use HTT interface for Management Tx");
 		WMA_LOGE("FW doesnot support WMI_SERVICE_MGMT_TX_WMI, Use HTT interface for Management Tx");
 	}
 	}

+ 77 - 31
core/wma/src/wma_mgmt.c

@@ -2452,46 +2452,28 @@ void wma_beacon_miss_handler(tp_wma_handle wma, uint32_t vdev_id)
 }
 }
 
 
 /**
 /**
- * wma_mgmt_tx_completion_handler() - wma mgmt Tx completion event handler
- * @handle: wma handle
- * @cmpl_event_params: completion event handler data
- * @len: length of @cmpl_event_params
+ * wma_process_mgmt_tx_completion() - process mgmt completion
+ * @wma_handle: wma handle
+ * @desc_id: descriptor id
+ * @status: status
  *
  *
- * Return: 0 on success; error number otherwise
+ * Return: 0 for success or error code
  */
  */
-
-int wma_mgmt_tx_completion_handler(void *handle, uint8_t *cmpl_event_params,
-				   uint32_t len)
+int wma_process_mgmt_tx_completion(tp_wma_handle wma_handle,
+		uint32_t desc_id, uint32_t status)
 {
 {
-	tp_wma_handle wma_handle = (tp_wma_handle)handle;
-	WMI_MGMT_TX_COMPLETION_EVENTID_param_tlvs *param_buf;
-	wmi_mgmt_tx_compl_event_fixed_param	*cmpl_params;
 	struct wmi_desc_t *wmi_desc;
 	struct wmi_desc_t *wmi_desc;
-
 	ol_txrx_pdev_handle pdev = cds_get_context(QDF_MODULE_ID_TXRX);
 	ol_txrx_pdev_handle pdev = cds_get_context(QDF_MODULE_ID_TXRX);
-	if (!pdev) {
-		WMA_LOGE("%s: txrx pdev is NULL", __func__);
-		return -EINVAL;
-	}
 
 
 	if (pdev == NULL) {
 	if (pdev == NULL) {
 		WMA_LOGE("%s: NULL pdev pointer", __func__);
 		WMA_LOGE("%s: NULL pdev pointer", __func__);
 		return -EINVAL;
 		return -EINVAL;
 	}
 	}
 
 
-	param_buf = (WMI_MGMT_TX_COMPLETION_EVENTID_param_tlvs *)
-		cmpl_event_params;
-	if (!param_buf || !wma_handle) {
-		WMA_LOGE("%s: Invalid mgmt Tx completion event", __func__);
-		return -EINVAL;
-	}
-	cmpl_params = param_buf->fixed_param;
-
-	WMA_LOGI("%s: status:%d wmi_desc_id:%d", __func__, cmpl_params->status,
-		 cmpl_params->desc_id);
+	WMA_LOGI("%s: status:%d wmi_desc_id:%d", __func__, status, desc_id);
 
 
 	wmi_desc = (struct wmi_desc_t *)
 	wmi_desc = (struct wmi_desc_t *)
-		(&wma_handle->wmi_desc_pool.array[cmpl_params->desc_id]);
+			(&wma_handle->wmi_desc_pool.array[desc_id]);
 
 
 	if (!wmi_desc) {
 	if (!wmi_desc) {
 		WMA_LOGE("%s: Invalid wmi desc", __func__);
 		WMA_LOGE("%s: Invalid wmi desc", __func__);
@@ -2500,18 +2482,82 @@ int wma_mgmt_tx_completion_handler(void *handle, uint8_t *cmpl_event_params,
 
 
 	if (wmi_desc->nbuf)
 	if (wmi_desc->nbuf)
 		qdf_nbuf_unmap_single(pdev->osdev, wmi_desc->nbuf,
 		qdf_nbuf_unmap_single(pdev->osdev, wmi_desc->nbuf,
-				      QDF_DMA_TO_DEVICE);
+					  QDF_DMA_TO_DEVICE);
 	if (wmi_desc->tx_cmpl_cb)
 	if (wmi_desc->tx_cmpl_cb)
 		wmi_desc->tx_cmpl_cb(wma_handle->mac_context,
 		wmi_desc->tx_cmpl_cb(wma_handle->mac_context,
-				       wmi_desc->nbuf, 1);
+					   wmi_desc->nbuf, 1);
 
 
 	if (wmi_desc->ota_post_proc_cb)
 	if (wmi_desc->ota_post_proc_cb)
 		wmi_desc->ota_post_proc_cb((tpAniSirGlobal)
 		wmi_desc->ota_post_proc_cb((tpAniSirGlobal)
-					     wma_handle->mac_context,
-					     cmpl_params->status);
+						 wma_handle->mac_context,
+						 status);
 
 
 	wmi_desc_put(wma_handle, wmi_desc);
 	wmi_desc_put(wma_handle, wmi_desc);
+	return 0;
+}
+
+/**
+ * wma_mgmt_tx_completion_handler() - wma mgmt Tx completion event handler
+ * @handle: wma handle
+ * @cmpl_event_params: completion event handler data
+ * @len: length of @cmpl_event_params
+ *
+ * Return: 0 on success; error number otherwise
+ */
+
+int wma_mgmt_tx_completion_handler(void *handle, uint8_t *cmpl_event_params,
+				   uint32_t len)
+{
+	tp_wma_handle wma_handle = (tp_wma_handle)handle;
+	WMI_MGMT_TX_COMPLETION_EVENTID_param_tlvs *param_buf;
+	wmi_mgmt_tx_compl_event_fixed_param	*cmpl_params;
+
+	param_buf = (WMI_MGMT_TX_COMPLETION_EVENTID_param_tlvs *)
+		cmpl_event_params;
+	if (!param_buf || !wma_handle) {
+		WMA_LOGE("%s: Invalid mgmt Tx completion event", __func__);
+		return -EINVAL;
+	}
+	cmpl_params = param_buf->fixed_param;
+
+	wma_process_mgmt_tx_completion(wma_handle,
+		cmpl_params->desc_id, cmpl_params->status);
+
+	return 0;
+}
+
+/**
+ * wma_mgmt_tx_bundle_completion_handler() - mgmt bundle comp handler
+ * @handle: wma handle
+ * @buf: buffer
+ * @len: length
+ *
+ * Return: 0 for success or error code
+ */
+int wma_mgmt_tx_bundle_completion_handler(void *handle, uint8_t *buf,
+				   uint32_t len)
+{
+	tp_wma_handle wma_handle = (tp_wma_handle)handle;
+	WMI_MGMT_TX_BUNDLE_COMPLETION_EVENTID_param_tlvs *param_buf;
+	wmi_mgmt_tx_compl_bundle_event_fixed_param	*cmpl_params;
+	uint32_t num_reports;
+	uint32_t *desc_ids;
+	uint32_t *status;
+	int i;
+
+	param_buf = (WMI_MGMT_TX_BUNDLE_COMPLETION_EVENTID_param_tlvs *)buf;
+	if (!param_buf && !wma_handle) {
+		WMA_LOGE("%s: Invalid mgmt Tx completion event", __func__);
+		return -EINVAL;
+	}
+	cmpl_params = param_buf->fixed_param;
+	num_reports = cmpl_params->num_reports;
+	desc_ids = (uint32_t *)(param_buf->desc_ids);
+	status = (uint32_t *)(param_buf->status);
 
 
+	for (i = 0; i < num_reports; i++)
+		wma_process_mgmt_tx_completion(wma_handle,
+			desc_ids[i], status[i]);
 	return 0;
 	return 0;
 }
 }
 
 

+ 11 - 90
core/wma/src/wma_scan_roam.c

@@ -3259,61 +3259,6 @@ void wma_scan_cache_updated_ind(tp_wma_handle wma, uint8_t sessionId)
 }
 }
 
 
 #ifdef FEATURE_WLAN_EXTSCAN
 #ifdef FEATURE_WLAN_EXTSCAN
-/**
- * wma_extscan_get_eventid_from_tlvtag() - map tlv tag to corresponding event id
- * @tag: WMI TLV tag
- *
- * Return:
- *	0 if TLV tag is invalid
- *	else return corresponding WMI event id
- */
-static int wma_extscan_get_eventid_from_tlvtag(uint32_t tag)
-{
-	uint32_t event_id;
-
-	switch (tag) {
-	case WMITLV_TAG_STRUC_wmi_extscan_start_stop_event_fixed_param:
-		event_id = WMI_EXTSCAN_START_STOP_EVENTID;
-		break;
-
-	case WMITLV_TAG_STRUC_wmi_extscan_operation_event_fixed_param:
-		event_id = WMI_EXTSCAN_OPERATION_EVENTID;
-		break;
-
-	case WMITLV_TAG_STRUC_wmi_extscan_table_usage_event_fixed_param:
-		event_id = WMI_EXTSCAN_TABLE_USAGE_EVENTID;
-		break;
-
-	case WMITLV_TAG_STRUC_wmi_extscan_cached_results_event_fixed_param:
-		event_id = WMI_EXTSCAN_CACHED_RESULTS_EVENTID;
-		break;
-
-	case WMITLV_TAG_STRUC_wmi_extscan_wlan_change_results_event_fixed_param:
-		event_id = WMI_EXTSCAN_WLAN_CHANGE_RESULTS_EVENTID;
-		break;
-
-	case WMITLV_TAG_STRUC_wmi_extscan_hotlist_match_event_fixed_param:
-		event_id = WMI_EXTSCAN_HOTLIST_MATCH_EVENTID;
-		break;
-
-	case WMITLV_TAG_STRUC_wmi_extscan_capabilities_event_fixed_param:
-		event_id = WMI_EXTSCAN_CAPABILITIES_EVENTID;
-		break;
-
-	case WMITLV_TAG_STRUC_wmi_extscan_hotlist_ssid_match_event_fixed_param:
-		event_id = WMI_EXTSCAN_HOTLIST_SSID_MATCH_EVENTID;
-		break;
-
-	default:
-		event_id = 0;
-		WMA_LOGE("%s: Unknown tag: %d", __func__, tag);
-		break;
-	}
-
-	WMA_LOGI("%s: For tag %d WMI event 0x%x", __func__, tag, event_id);
-	return event_id;
-}
-
 /**
 /**
  * wma_extscan_wow_event_callback() - extscan wow event callback
  * wma_extscan_wow_event_callback() - extscan wow event callback
  * @handle: WMA handle
  * @handle: WMA handle
@@ -3326,77 +3271,53 @@ static int wma_extscan_get_eventid_from_tlvtag(uint32_t tag)
  * of event buffer is common tlv header, which is a combination
  * of event buffer is common tlv header, which is a combination
  * of tag (higher 2 bytes) and length (lower 2 bytes). The tag is used to
  * of tag (higher 2 bytes) and length (lower 2 bytes). The tag is used to
  * identify the event which triggered wow event.
  * identify the event which triggered wow event.
+ * Payload is extracted and converted into generic tlv structure before
+ * being passed to this function.
  *
  *
  * @Return: none
  * @Return: none
  */
  */
 void wma_extscan_wow_event_callback(void *handle, void *event, uint32_t len)
 void wma_extscan_wow_event_callback(void *handle, void *event, uint32_t len)
 {
 {
-	uint32_t id;
-	int tlv_ok_status = 0;
-	void *wmi_cmd_struct_ptr = NULL;
 	uint32_t tag = WMITLV_GET_TLVTAG(WMITLV_GET_HDR(event));
 	uint32_t tag = WMITLV_GET_TLVTAG(WMITLV_GET_HDR(event));
 
 
-	id = wma_extscan_get_eventid_from_tlvtag(tag);
-	if (!id) {
-		WMA_LOGE("%s: Invalid  Tag: %d", __func__, tag);
-		return;
-	}
-
-	tlv_ok_status = wmitlv_check_and_pad_event_tlvs(
-				handle, event, len, id,
-				&wmi_cmd_struct_ptr);
-	if (tlv_ok_status != 0) {
-		WMA_LOGE("%s: Invalid Tag: %d could not check and pad tlvs",
-			 __func__, tag);
-		return;
-	}
-
 	switch (tag) {
 	switch (tag) {
 	case WMITLV_TAG_STRUC_wmi_extscan_start_stop_event_fixed_param:
 	case WMITLV_TAG_STRUC_wmi_extscan_start_stop_event_fixed_param:
-		wma_extscan_start_stop_event_handler(handle,
-				wmi_cmd_struct_ptr, len);
+		wma_extscan_start_stop_event_handler(handle, event, len);
 		break;
 		break;
 
 
 	case WMITLV_TAG_STRUC_wmi_extscan_operation_event_fixed_param:
 	case WMITLV_TAG_STRUC_wmi_extscan_operation_event_fixed_param:
-		wma_extscan_operations_event_handler(handle,
-				wmi_cmd_struct_ptr, len);
+		wma_extscan_operations_event_handler(handle, event, len);
 		break;
 		break;
 
 
 	case WMITLV_TAG_STRUC_wmi_extscan_table_usage_event_fixed_param:
 	case WMITLV_TAG_STRUC_wmi_extscan_table_usage_event_fixed_param:
-		wma_extscan_table_usage_event_handler(handle,
-				wmi_cmd_struct_ptr, len);
+		wma_extscan_table_usage_event_handler(handle, event, len);
 		break;
 		break;
 
 
 	case WMITLV_TAG_STRUC_wmi_extscan_cached_results_event_fixed_param:
 	case WMITLV_TAG_STRUC_wmi_extscan_cached_results_event_fixed_param:
-		wma_extscan_cached_results_event_handler(handle,
-				wmi_cmd_struct_ptr, len);
+		wma_extscan_cached_results_event_handler(handle, event, len);
 		break;
 		break;
 
 
 	case WMITLV_TAG_STRUC_wmi_extscan_wlan_change_results_event_fixed_param:
 	case WMITLV_TAG_STRUC_wmi_extscan_wlan_change_results_event_fixed_param:
-		wma_extscan_change_results_event_handler(handle,
-				wmi_cmd_struct_ptr, len);
+		wma_extscan_change_results_event_handler(handle, event, len);
 		break;
 		break;
 
 
 	case WMITLV_TAG_STRUC_wmi_extscan_hotlist_match_event_fixed_param:
 	case WMITLV_TAG_STRUC_wmi_extscan_hotlist_match_event_fixed_param:
-		wma_extscan_hotlist_match_event_handler(handle,
-				wmi_cmd_struct_ptr, len);
+		wma_extscan_hotlist_match_event_handler(handle,	event, len);
 		break;
 		break;
 
 
 	case WMITLV_TAG_STRUC_wmi_extscan_capabilities_event_fixed_param:
 	case WMITLV_TAG_STRUC_wmi_extscan_capabilities_event_fixed_param:
-		wma_extscan_capabilities_event_handler(handle,
-				wmi_cmd_struct_ptr, len);
+		wma_extscan_capabilities_event_handler(handle, event, len);
 		break;
 		break;
 
 
 	case WMITLV_TAG_STRUC_wmi_extscan_hotlist_ssid_match_event_fixed_param:
 	case WMITLV_TAG_STRUC_wmi_extscan_hotlist_ssid_match_event_fixed_param:
 		wma_extscan_hotlist_ssid_match_event_handler(handle,
 		wma_extscan_hotlist_ssid_match_event_handler(handle,
-				wmi_cmd_struct_ptr, len);
+							     event, len);
 		break;
 		break;
 
 
 	default:
 	default:
-		WMA_LOGE("%s: Unknown tag: %d", __func__, tag);
+		WMA_LOGE(FL("Unknown tag: %d"), tag);
 		break;
 		break;
 	}
 	}
-	wmitlv_free_allocated_event_tlvs(id, &wmi_cmd_struct_ptr);
 
 
 	return;
 	return;
 }
 }

+ 4 - 1
target/inc/wmi_tlv_defs.h

@@ -723,6 +723,7 @@ typedef enum {
 	WMITLV_TAG_STRUC_wmi_pdev_set_reorder_timeout_val_cmd_fixed_param,
 	WMITLV_TAG_STRUC_wmi_pdev_set_reorder_timeout_val_cmd_fixed_param,
 	WMITLV_TAG_STRUC_wmi_peer_set_rx_blocksize_cmd_fixed_param,
 	WMITLV_TAG_STRUC_wmi_peer_set_rx_blocksize_cmd_fixed_param,
 	WMITLV_TAG_STRUC_WMI_PDEV_SET_WAKEUP_CONFIG_CMDID_fixed_param,
 	WMITLV_TAG_STRUC_WMI_PDEV_SET_WAKEUP_CONFIG_CMDID_fixed_param,
+	WMITLV_TAG_STRUC_wmi_tlv_buf_len_param,
 } WMITLV_TAG_ID;
 } WMITLV_TAG_ID;
 
 
 /*
 /*
@@ -1290,7 +1291,9 @@ WMITLV_CREATE_PARAM_STRUC(WMI_RMV_BCN_FILTER_CMDID);
 	WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_roam_offload_tlv_param, offload_param, WMITLV_SIZE_VAR)	\
 	WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_roam_offload_tlv_param, offload_param, WMITLV_SIZE_VAR)	\
 	WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_roam_11i_offload_tlv_param, offload_11i_param, WMITLV_SIZE_VAR)	\
 	WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_roam_11i_offload_tlv_param, offload_11i_param, WMITLV_SIZE_VAR)	\
 	WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_roam_11r_offload_tlv_param, offload_11r_param, WMITLV_SIZE_VAR) \
 	WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_roam_11r_offload_tlv_param, offload_11r_param, WMITLV_SIZE_VAR) \
-	WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_roam_ese_offload_tlv_param, offload_ese_param, WMITLV_SIZE_VAR)
+	WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_ARRAY_STRUC, wmi_roam_ese_offload_tlv_param, offload_ese_param, WMITLV_SIZE_VAR) \
+	WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_ARRAY_STRUC, wmi_tlv_buf_len_param, assoc_ie_len_param, WMITLV_SIZE_VAR) \
+	WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_ARRAY_BYTE, A_UINT8, assoc_ie_buf, WMITLV_SIZE_VAR)
 
 
 WMITLV_CREATE_PARAM_STRUC(WMI_ROAM_SCAN_MODE);
 WMITLV_CREATE_PARAM_STRUC(WMI_ROAM_SCAN_MODE);
 
 

+ 32 - 3
target/inc/wmi_unified.h

@@ -539,7 +539,7 @@ typedef enum {
 	/** configure thresholds for MAWC */
 	/** configure thresholds for MAWC */
 	WMI_ROAM_CONFIGURE_MAWC_CMDID,
 	WMI_ROAM_CONFIGURE_MAWC_CMDID,
 	/** configure MultiBand Operation(refer WFA MBO spec) parameter */
 	/** configure MultiBand Operation(refer WFA MBO spec) parameter */
-	WMI_ROAM_SET_MBO_PARAM_CMDID,
+	WMI_ROAM_SET_MBO_PARAM_CMDID, /* DEPRECATED */
 
 
 	/** offload scan specific commands */
 	/** offload scan specific commands */
 	/** set offload scan AP profile   */
 	/** set offload scan AP profile   */
@@ -2489,6 +2489,24 @@ typedef struct {
 	A_UINT32 ie_data[1];
 	A_UINT32 ie_data[1];
 } wmi_ie_data;
 } wmi_ie_data;
 
 
+/**
+ * TLV used for length/buffer
+ */
+typedef struct {
+	/**
+	 * TLV tag and len; tag equals
+	 * WMITLV_TAG_STRUC_wmi_tlv_buf_len_param
+	 */
+	A_UINT32 tlv_header;
+	A_UINT32 buf_len;       /** Length of buf */
+	/**
+	 * Following this structure is the TLV byte stream of buf
+	 * of length buf_len:
+	 * A_UINT8 buf[];
+	 *
+	 */
+} wmi_tlv_buf_len_param;
+
 typedef struct {
 typedef struct {
 	/** Len of the SSID */
 	/** Len of the SSID */
 	A_UINT32 ssid_len;
 	A_UINT32 ssid_len;
@@ -14234,6 +14252,15 @@ typedef struct {
 	A_UINT32 qtimer_high;
 	A_UINT32 qtimer_high;
 } wmi_vdev_tsf_report_event_fixed_param;
 } wmi_vdev_tsf_report_event_fixed_param;
 
 
+/**
+ * ie_id values:
+ * 0 to 255 are used for individual IEEE802.11 Information Element types
+ */
+#define WMI_SET_VDEV_IE_ID_SCAN_SET_DEFAULT_IE 256
+
+/* source values: */
+#define WMI_SET_VDEV_IE_SOURCE_HOST     0x0
+
 typedef struct {
 typedef struct {
 	/** TLV tag and len; tag equals
 	/** TLV tag and len; tag equals
 	 * WMITLV_TAG_STRUC_wmi_vdev_set_ie_cmd_fixed_param */
 	 * WMITLV_TAG_STRUC_wmi_vdev_set_ie_cmd_fixed_param */
@@ -14244,6 +14271,8 @@ typedef struct {
 	A_UINT32 ie_id;
 	A_UINT32 ie_id;
 	/* ie_len corresponds to num of bytes in ie_data[] */
 	/* ie_len corresponds to num of bytes in ie_data[] */
 	A_UINT32 ie_len;
 	A_UINT32 ie_len;
+	/** source of this command */
+	A_UINT32 ie_source; /* see WMI_SET_VDEV_IE_SOURCE_ defs */
 	/*
 	/*
 	 * Following this structure is the TLV byte stream of ie data of length
 	 * Following this structure is the TLV byte stream of ie data of length
 	 * buf_len:
 	 * buf_len:
@@ -14681,7 +14710,7 @@ typedef struct {
  *        1 - Allow to connect to MBO AP only
  *        1 - Allow to connect to MBO AP only
  * Bit 1-31 : reserved.
  * Bit 1-31 : reserved.
  */
  */
-#define WMI_ROAM_MBO_FLAG_MBO_ONLY_MODE  (1<<0)
+#define WMI_ROAM_MBO_FLAG_MBO_ONLY_MODE  (1<<0) /* DEPRECATED */
 
 
 typedef struct {
 typedef struct {
 	/*
 	/*
@@ -14695,7 +14724,7 @@ typedef struct {
 	A_UINT32 enable;
 	A_UINT32 enable;
 	/** MBO flags, refer to definition of MBO flags*/
 	/** MBO flags, refer to definition of MBO flags*/
 	A_UINT32 flags;
 	A_UINT32 flags;
-} wmi_roam_set_mbo_fixed_param;
+} wmi_roam_set_mbo_fixed_param; /* DEPRECATED */
 
 
 typedef struct {
 typedef struct {
 	/*
 	/*

+ 1 - 1
target/inc/wmi_version.h

@@ -36,7 +36,7 @@
 #define __WMI_VER_MINOR_    0
 #define __WMI_VER_MINOR_    0
 /** WMI revision number has to be incremented when there is a
 /** WMI revision number has to be incremented when there is a
  *  change that may or may not break compatibility */
  *  change that may or may not break compatibility */
-#define __WMI_REVISION_ 274
+#define __WMI_REVISION_ 275
 
 
 /** The Version Namespace should not be normally changed. Only
 /** The Version Namespace should not be normally changed. Only
  *  host and firmware of the same WMI namespace will work
  *  host and firmware of the same WMI namespace will work