Merge "qca-wifi: Smart Antenna multi radio support"
diff --git a/umac/dfs/core/src/misc/dfs_zero_cac.c b/umac/dfs/core/src/misc/dfs_zero_cac.c
index ab8b076..661bca3 100644
--- a/umac/dfs/core/src/misc/dfs_zero_cac.c
+++ b/umac/dfs/core/src/misc/dfs_zero_cac.c
@@ -1675,6 +1675,7 @@
 			    (ieee_chan != exclude_pri_ch_ieee) &&
 			    (ieee_chan != exclude_sec_ch_ieee))
 				break;
+			ieee_chan = 0;
 		}
 	}
 	PRECAC_LIST_UNLOCK(dfs);
diff --git a/wmi/inc/wmi_unified_ap_api.h b/wmi/inc/wmi_unified_ap_api.h
index 002bd4f..8dc898d 100644
--- a/wmi/inc/wmi_unified_ap_api.h
+++ b/wmi/inc/wmi_unified_ap_api.h
@@ -132,6 +132,20 @@
 		wmi_unified_t wmi_handle,
 		struct peer_update_wds_entry_params *param);
 
+
+/**
+ * wmi_unified_peer_ft_roam_send() - reset BA window in fw
+ * @wmi_handle: wmi handle
+ * @peer_addr: peer mac address
+ * @vdev_id: vdev id
+ *
+ * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
+ */
+QDF_STATUS
+wmi_unified_peer_ft_roam_send(wmi_unified_t wmi_handle,
+			      uint8_t peer_addr[QDF_MAC_ADDR_SIZE],
+			      uint8_t vdev_id);
+
 /**
  *  wmi_unified_vdev_set_neighbour_rx_cmd_send() - WMI set neighbour rx function
  *  @wmi_handle: handle to WMI.
diff --git a/wmi/src/wmi_unified_ap_api.c b/wmi/src/wmi_unified_ap_api.c
index 60e119e..5945a87 100644
--- a/wmi/src/wmi_unified_ap_api.c
+++ b/wmi/src/wmi_unified_ap_api.c
@@ -400,6 +400,17 @@
 	return QDF_STATUS_E_FAILURE;
 }
 
+QDF_STATUS wmi_unified_peer_ft_roam_send(wmi_unified_t wmi_handle,
+					 uint8_t peer_addr[QDF_MAC_ADDR_SIZE],
+					 uint8_t vdev_id)
+{
+	if (wmi_handle->ops->send_peer_ft_roam_cmd)
+		return wmi_handle->ops->send_peer_ft_roam_cmd(wmi_handle,
+					peer_addr, vdev_id);
+
+	return QDF_STATUS_E_FAILURE;
+}
+
 QDF_STATUS wmi_extract_pdev_tpc_ev_param(
 		wmi_unified_t wmi_handle, void *evt_buf,
 		wmi_host_pdev_tpc_event *param)
diff --git a/wmi/src/wmi_unified_non_tlv.c b/wmi/src/wmi_unified_non_tlv.c
index 31f7aaf..a5ea482 100644
--- a/wmi/src/wmi_unified_non_tlv.c
+++ b/wmi/src/wmi_unified_non_tlv.c
@@ -942,6 +942,40 @@
 }
 
 /**
+ * send_peer_ft_roam_cmd_non_tlv() - send PEER BA reset command to fw
+ * @wmi_handle: wmi handle
+ * @peer_addr: peer mac addr
+ * @vdev_id: vdev id
+ *
+ * Return: 0 for success or error code
+ */
+
+static QDF_STATUS send_peer_ft_roam_cmd_non_tlv(wmi_unified_t wmi_handle,
+					uint8_t peer_addr[QDF_MAC_ADDR_SIZE],
+					uint8_t vdev_id)
+{
+	wmi_peer_ft_roaming_peer_update_cmd *cmd;
+	wmi_buf_t buf;
+	QDF_STATUS ret;
+	int len = sizeof(wmi_peer_ft_roaming_peer_update_cmd);
+
+	buf = wmi_buf_alloc(wmi_handle, len);
+	if (!buf) {
+		WMI_LOGE("%s:wmi_buf_alloc failed", __func__);
+		return QDF_STATUS_E_NOMEM;
+	}
+	cmd = (wmi_peer_ft_roaming_peer_update_cmd *)wmi_buf_data(buf);
+	WMI_CHAR_ARRAY_TO_MAC_ADDR(peer_addr, &cmd->peer_macaddr);
+	ret =  wmi_unified_cmd_send(wmi_handle, buf, len,
+			WMI_PEER_FT_ROAMING_PEER_UPDATE_CMDID);
+	if (QDF_IS_STATUS_ERROR(ret)) {
+		WMI_LOGE("Failed to send WMI_PEER_FT_ROAMING_PEER_UPDATE_CMDID");
+		wmi_buf_free(buf);
+	}
+	return ret;
+}
+
+/**
  * convert_host_peer_param_id_to_target_id_non_tlv - convert host peer param_id
  * to target id.
  * @peer_param_id: host param id.
@@ -9920,6 +9954,7 @@
 	.send_peer_create_cmd = send_peer_create_cmd_non_tlv,
 	.send_peer_delete_cmd = send_peer_delete_cmd_non_tlv,
 	.send_peer_delete_all_cmd = send_peer_delete_all_cmd_non_tlv,
+	.send_peer_ft_roam_cmd = send_peer_ft_roam_cmd_non_tlv,
 #ifdef WLAN_SUPPORT_GREEN_AP
 	.send_green_ap_ps_cmd = send_green_ap_ps_cmd_non_tlv,
 #endif