qcacld-3.0: Configure TDLS peer mac and kickout threshold to target

qcacld-2.0 to qcacld-3.0 propagation.

Add new TDLS mode for TDLS external control operation to
achieve power save on the target. Firmware will use this mode
to control timers precisely and save the power.
Add configuration "gTDLSPeerKickoutThreshold" to fine tune
TDLS peer sta kick out operation.

Change-Id: Ie941f93b54983ca6323ef4384a66e0807a56a7b1
CRs-Fixed: 929749
diff --git a/core/wma/src/wma_features.c b/core/wma/src/wma_features.c
index 7ed21d9..acebf9b 100644
--- a/core/wma/src/wma_features.c
+++ b/core/wma/src/wma_features.c
@@ -6492,6 +6492,8 @@
 		cmd->state = WMI_TDLS_ENABLE_PASSIVE;
 	} else if (WMA_TDLS_SUPPORT_ENABLED == tdls_mode) {
 		cmd->state = WMI_TDLS_ENABLE_ACTIVE;
+	} else if (WMA_TDLS_SUPPORT_ACTIVE_EXTERNAL_CONTROL == tdls_mode) {
+		cmd->state = WMI_TDLS_ENABLE_ACTIVE_EXTERNAL_CONTROL;
 	} else {
 		cmd->state = WMI_TDLS_DISABLE;
 	}
@@ -6511,6 +6513,8 @@
 		wma_tdls->puapsd_rx_frame_threshold;
 	cmd->teardown_notification_ms =
 		wma_tdls->teardown_notification_ms;
+	cmd->tdls_peer_kickout_threshold =
+		wma_tdls->tdls_peer_kickout_threshold;
 
 	WMA_LOGD("%s: tdls_mode: %d, state: %d, "
 		 "notification_interval_ms: %d, "
@@ -6524,7 +6528,8 @@
 		 "tdls_puapsd_mask: 0x%x, "
 		 "tdls_puapsd_inactivity_time: %d, "
 		 "tdls_puapsd_rx_frame_threshold: %d, "
-		 "teardown_notification_ms: %d",
+		 "teardown_notification_ms: %d, "
+		 "tdls_peer_kickout_threshold: %d",
 		 __func__, tdls_mode, cmd->state,
 		 cmd->notification_interval_ms,
 		 cmd->tx_discovery_threshold,
@@ -6537,7 +6542,8 @@
 		 cmd->tdls_puapsd_mask,
 		 cmd->tdls_puapsd_inactivity_time_ms,
 		 cmd->tdls_puapsd_rx_frame_threshold,
-		 cmd->teardown_notification_ms);
+		 cmd->teardown_notification_ms,
+		 cmd->tdls_peer_kickout_threshold);
 
 	if (wmi_unified_cmd_send(wma_handle->wmi_handle, wmi_buf, len,
 				 WMI_TDLS_SET_STATE_CMDID)) {
@@ -6621,6 +6627,12 @@
 	case WMA_TDLS_PEER_STATE_TEARDOWN:
 		cmd->peer_state = WMI_TDLS_PEER_STATE_TEARDOWN;
 		break;
+	case  WMA_TDLS_PEER_ADD_MAC_ADDR:
+		cmd->peer_state = WMI_TDLS_PEER_ADD_MAC_ADDR;
+		break;
+	case  WMA_TDLS_PEER_REMOVE_MAC_ADDR:
+		cmd->peer_state = WMI_TDLS_PEER_REMOVE_MAC_ADDR;
+		break;
 	}
 
 	WMA_LOGD("%s: vdev_id: %d, peerStateParams->peerMacAddr: %pM, "