Fix to not flood TDLS Discovery Request frames

Once the discovery timer elapses , the discovery request
is sent to all the intended peers at a time , resulting in a flood
of discovery request frame at the sme , resulting in the loss of
the data packets.Enhance the mechanism of the discovery transmission
by inducing a delay between transmitting successive discovery
requests, thereby preventing packet flood.

Change-Id: Ia9716a20afe99cc6292b5c179b2a9318e0085686
CRs-fixed: 451700
diff --git a/CORE/HDD/inc/wlan_hdd_tdls.h b/CORE/HDD/inc/wlan_hdd_tdls.h
index 9aff049..3b91776 100644
--- a/CORE/HDD/inc/wlan_hdd_tdls.h
+++ b/CORE/HDD/inc/wlan_hdd_tdls.h
@@ -30,7 +30,9 @@
 
 #define MAX_NUM_TDLS_PEER           3
 
-#define TDLS_MAX_DISCOVER_ATTEMPT   2
+#define TDLS_SUB_DISCOVERY_PERIOD   100
+
+#define TDLS_MAX_DISCOVER_REQS_PER_TIMER 1
 
 #define TDLS_DISCOVERY_PERIOD       3600000
 
@@ -89,6 +91,7 @@
     tANI_S8     tdls_support;
     tANI_S8     link_status;
     tANI_U8     is_responder;
+    tANI_U8     discovery_processed;
     tANI_U16    discovery_attempt;
     tANI_U16    tx_pkt;
     tANI_U16    rx_pkt;
@@ -103,6 +106,7 @@
     vos_timer_t     peerDiscoverTimer;
     vos_timer_t     peerUpdateTimer;
     tdls_config_params_t threshold_config;
+    tANI_S32        discovery_peer_cnt;
     tANI_S8         ap_rssi;
 } tdlsCtx_t;
 
@@ -112,6 +116,8 @@
 
 void wlan_hdd_tdls_timers_stop(void);
 
+void wlan_hdd_tdls_timers_destroy(void);
+
 void wlan_hdd_tdls_extract_da(struct sk_buff *skb, u8 *mac);
 
 void wlan_hdd_tdls_extract_sa(struct sk_buff *skb, u8 *mac);
@@ -142,5 +148,9 @@
 
 int wlan_hdd_tdls_get_all_peers(char *buf, int buflen);
 
+void wlan_hdd_tdls_connection_callback(hdd_adapter_t *pAdapter);
+
+void wlan_hdd_tdls_disconnection_callback(hdd_adapter_t *pAdapter);
+
 
 #endif // __HDD_TDSL_H