TDLS Support for the P2P interface
Make the HDD TDLS Context separate for each interface and have the
TDLS connection information common for both interface in HDD global
context.
CRs-Fixed: 458139
Change-Id: I07f06f3caa446d6d57645ff1abcb0dd09f4b0ea4
diff --git a/CORE/HDD/inc/wlan_hdd_tdls.h b/CORE/HDD/inc/wlan_hdd_tdls.h
index ed07f91..7dda53a 100644
--- a/CORE/HDD/inc/wlan_hdd_tdls.h
+++ b/CORE/HDD/inc/wlan_hdd_tdls.h
@@ -96,7 +96,18 @@
} tdls_rssi_config_t;
typedef struct {
+ struct list_head peer_list[256];
+ hdd_adapter_t *pAdapter;
+ 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;
+
+typedef struct {
struct list_head node;
+ tdlsCtx_t *pHddTdlsCtx;
tSirMacAddr peerMac;
tANI_U16 staId ;
tANI_S8 rssi;
@@ -112,53 +123,50 @@
tANI_U8 isTDLSInProgress;
} hddTdlsPeer_t;
-
typedef struct {
- struct list_head peer_list[256];
- struct net_device *dev;
- vos_timer_t peerDiscoverTimer;
- vos_timer_t peerUpdateTimer;
- tdls_config_params_t threshold_config;
- tANI_S32 discovery_peer_cnt;
- tANI_U16 connected_peer_count;
- tANI_S8 ap_rssi;
-} tdlsCtx_t;
+ /* Session ID */
+ tANI_U8 sessionId;
+ /*TDLS peer station id */
+ v_U8_t staId;
+ /* TDLS peer mac Address */
+ v_MACADDR_t peerMac;
+} tdlsConnInfo_t;
-int wlan_hdd_tdls_init(struct net_device *dev);
+int wlan_hdd_tdls_init(hdd_adapter_t *pAdapter);
-void wlan_hdd_tdls_exit(void);
+void wlan_hdd_tdls_exit(hdd_adapter_t *pAdapter);
void wlan_hdd_tdls_extract_da(struct sk_buff *skb, u8 *mac);
void wlan_hdd_tdls_extract_sa(struct sk_buff *skb, u8 *mac);
-int wlan_hdd_tdls_increment_pkt_count(u8 *mac, u8 tx);
+int wlan_hdd_tdls_increment_pkt_count(hdd_adapter_t *pAdapter, u8 *mac, u8 tx);
-int wlan_hdd_tdls_set_sta_id(u8 *mac, u8 staId);
+int wlan_hdd_tdls_set_sta_id(hdd_adapter_t *pAdapter, u8 *mac, u8 staId);
-hddTdlsPeer_t *wlan_hdd_tdls_find_peer(u8 *mac);
+hddTdlsPeer_t *wlan_hdd_tdls_find_peer(hdd_adapter_t *pAdapter, u8 *mac);
-hddTdlsPeer_t *wlan_hdd_tdls_get_peer(u8 *mac);
+hddTdlsPeer_t *wlan_hdd_tdls_get_peer(hdd_adapter_t *pAdapter, u8 *mac);
void wlan_hdd_tdls_set_link_status(hddTdlsPeer_t *curr_peer, int status);
-int wlan_hdd_tdls_recv_discovery_resp(u8 *mac);
+int wlan_hdd_tdls_recv_discovery_resp(hdd_adapter_t *pAdapter, u8 *mac);
-int wlan_hdd_tdls_set_rssi(u8 *mac, tANI_S8 rxRssi);
+int wlan_hdd_tdls_set_rssi(hdd_adapter_t *pAdapter, u8 *mac, tANI_S8 rxRssi);
-int wlan_hdd_tdls_set_responder(u8 *mac, tANI_U8 responder);
+int wlan_hdd_tdls_set_responder(hdd_adapter_t *pAdapter, u8 *mac, tANI_U8 responder);
-int wlan_hdd_tdls_get_responder(u8 *mac);
+int wlan_hdd_tdls_get_responder(hdd_adapter_t *pAdapter, u8 *mac);
-int wlan_hdd_tdls_set_signature(u8 *mac, tANI_U8 uSignature);
+int wlan_hdd_tdls_set_signature(hdd_adapter_t *pAdapter, u8 *mac, tANI_U8 uSignature);
int wlan_hdd_tdls_set_params(struct net_device *dev, tdls_config_params_t *config);
-int wlan_hdd_tdls_reset_peer(u8 *mac);
+int wlan_hdd_tdls_reset_peer(hdd_adapter_t *pAdapter, u8 *mac);
-tANI_U16 wlan_hdd_tdlsConnectedPeers(void);
+tANI_U16 wlan_hdd_tdlsConnectedPeers(hdd_adapter_t *pAdapter);
-int wlan_hdd_tdls_get_all_peers(char *buf, int buflen);
+int wlan_hdd_tdls_get_all_peers(hdd_adapter_t *pAdapter, char *buf, int buflen);
void wlan_hdd_tdls_connection_callback(hdd_adapter_t *pAdapter);
@@ -166,14 +174,14 @@
void wlan_hdd_tdls_mgmt_completion_callback(hdd_adapter_t *pAdapter, tANI_U32 statusCode);
-void wlan_hdd_tdls_increment_peer_count(void);
+void wlan_hdd_tdls_increment_peer_count(hdd_adapter_t *pAdapter);
-void wlan_hdd_tdls_decrement_peer_count(void);
+void wlan_hdd_tdls_decrement_peer_count(hdd_adapter_t *pAdapter);
-void wlan_hdd_tdls_check_bmps(hdd_context_t *pHddCtx);
+void wlan_hdd_tdls_check_bmps(hdd_adapter_t *pAdapter);
-void wlan_hdd_tdls_set_connection_progress(u8* mac, u8 isProgress);
+void wlan_hdd_tdls_set_connection_progress(hdd_adapter_t *pAdapter, u8* mac, u8 isProgress);
-u8 wlan_hdd_tdls_is_progress(u8* mac, u8 skip_self);
+u8 wlan_hdd_tdls_is_progress(hdd_adapter_t *pAdapter, u8* mac, u8 skip_self);
#endif // __HDD_TDSL_H