Gopichand Nakkala | bd9fa2d | 2013-01-08 13:16:22 -0800 | [diff] [blame] | 1 | /* |
Kiet Lam | 842dad0 | 2014-02-18 18:44:02 -0800 | [diff] [blame] | 2 | * Copyright (c) 2012-2014 The Linux Foundation. All rights reserved. |
| 3 | * |
| 4 | * Previously licensed under the ISC license by Qualcomm Atheros, Inc. |
| 5 | * |
| 6 | * |
| 7 | * Permission to use, copy, modify, and/or distribute this software for |
| 8 | * any purpose with or without fee is hereby granted, provided that the |
| 9 | * above copyright notice and this permission notice appear in all |
| 10 | * copies. |
| 11 | * |
| 12 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL |
| 13 | * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED |
| 14 | * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE |
| 15 | * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL |
| 16 | * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR |
| 17 | * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER |
| 18 | * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
| 19 | * PERFORMANCE OF THIS SOFTWARE. |
Gopichand Nakkala | bd9fa2d | 2013-01-08 13:16:22 -0800 | [diff] [blame] | 20 | */ |
Kiet Lam | 842dad0 | 2014-02-18 18:44:02 -0800 | [diff] [blame] | 21 | |
| 22 | /* |
| 23 | * This file was originally distributed by Qualcomm Atheros, Inc. |
| 24 | * under proprietary terms before Copyright ownership was assigned |
| 25 | * to the Linux Foundation. |
| 26 | */ |
| 27 | |
Kiran V | 1ccee93 | 2012-12-12 14:49:46 -0800 | [diff] [blame] | 28 | #ifndef __HDD_TDSL_H |
| 29 | #define __HDD_TDSL_H |
| 30 | /**=========================================================================== |
| 31 | |
| 32 | \file wlan_hdd_tdls.h |
| 33 | |
| 34 | \brief Linux HDD TDLS include file |
Kiran V | 1ccee93 | 2012-12-12 14:49:46 -0800 | [diff] [blame] | 35 | ==========================================================================*/ |
| 36 | |
Chilam NG | 571c65a | 2013-01-19 12:27:36 +0530 | [diff] [blame] | 37 | #define MAX_NUM_TDLS_PEER 3 |
Kiran V | 1ccee93 | 2012-12-12 14:49:46 -0800 | [diff] [blame] | 38 | |
Gopichand Nakkala | c369458 | 2013-02-13 20:51:22 -0800 | [diff] [blame] | 39 | #define TDLS_SUB_DISCOVERY_PERIOD 100 |
| 40 | |
| 41 | #define TDLS_MAX_DISCOVER_REQS_PER_TIMER 1 |
Kiran V | 1ccee93 | 2012-12-12 14:49:46 -0800 | [diff] [blame] | 42 | |
Chilam NG | 571c65a | 2013-01-19 12:27:36 +0530 | [diff] [blame] | 43 | #define TDLS_DISCOVERY_PERIOD 3600000 |
Kiran V | 1ccee93 | 2012-12-12 14:49:46 -0800 | [diff] [blame] | 44 | |
Chilam NG | 571c65a | 2013-01-19 12:27:36 +0530 | [diff] [blame] | 45 | #define TDLS_TX_STATS_PERIOD 3600000 |
| 46 | |
| 47 | #define TDLS_IMPLICIT_TRIGGER_PKT_THRESHOLD 100 |
| 48 | |
| 49 | #define TDLS_RX_IDLE_TIMEOUT 5000 |
| 50 | |
| 51 | #define TDLS_RSSI_TRIGGER_HYSTERESIS 50 |
| 52 | |
Gopichand Nakkala | ccd3a38 | 2013-03-19 13:56:10 -0700 | [diff] [blame] | 53 | /* before UpdateTimer expires, we want to timeout discovery response. |
| 54 | should not be more than 2000 */ |
| 55 | #define TDLS_DISCOVERY_TIMEOUT_BEFORE_UPDATE 1000 |
Gopichand Nakkala | 75e7b28 | 2013-03-15 18:37:13 -0700 | [diff] [blame] | 56 | |
Hoonki Lee | 93e67ff | 2013-03-19 15:49:25 -0700 | [diff] [blame] | 57 | #define TDLS_CTX_MAGIC 0x54444c53 // "TDLS" |
| 58 | |
| 59 | #define TDLS_MAX_SCAN_SCHEDULE 10 |
Hoonki Lee | fb8df67 | 2013-04-10 18:20:34 -0700 | [diff] [blame] | 60 | #define TDLS_MAX_SCAN_REJECT 5 |
Hoonki Lee | 93e67ff | 2013-03-19 15:49:25 -0700 | [diff] [blame] | 61 | #define TDLS_DELAY_SCAN_PER_CONNECTION 100 |
| 62 | |
Gopichand Nakkala | e7cbc5d | 2013-03-27 21:09:23 -0700 | [diff] [blame] | 63 | #define TDLS_IS_CONNECTED(peer) \ |
| 64 | ((eTDLS_LINK_CONNECTED == (peer)->link_status) || \ |
| 65 | (eTDLS_LINK_TEARING == (peer)->link_status)) |
Chilam NG | 571c65a | 2013-01-19 12:27:36 +0530 | [diff] [blame] | 66 | typedef struct |
| 67 | { |
Chilam Ng | 0112041 | 2013-02-19 18:32:21 -0800 | [diff] [blame] | 68 | tANI_U32 tdls; |
Chilam NG | 571c65a | 2013-01-19 12:27:36 +0530 | [diff] [blame] | 69 | tANI_U32 tx_period_t; |
| 70 | tANI_U32 tx_packet_n; |
| 71 | tANI_U32 discovery_period_t; |
| 72 | tANI_U32 discovery_tries_n; |
Chilam Ng | 0112041 | 2013-02-19 18:32:21 -0800 | [diff] [blame] | 73 | tANI_U32 idle_timeout_t; |
| 74 | tANI_U32 idle_packet_n; |
Chilam NG | 571c65a | 2013-01-19 12:27:36 +0530 | [diff] [blame] | 75 | tANI_U32 rssi_hysteresis; |
Chilam Ng | 0112041 | 2013-02-19 18:32:21 -0800 | [diff] [blame] | 76 | tANI_S32 rssi_trigger_threshold; |
| 77 | tANI_S32 rssi_teardown_threshold; |
Chilam NG | 571c65a | 2013-01-19 12:27:36 +0530 | [diff] [blame] | 78 | } tdls_config_params_t; |
| 79 | |
Hoonki Lee | 93e67ff | 2013-03-19 15:49:25 -0700 | [diff] [blame] | 80 | typedef struct |
| 81 | { |
| 82 | struct wiphy *wiphy; |
| 83 | #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,6,0)) |
| 84 | struct net_device *dev; |
| 85 | #endif |
| 86 | struct cfg80211_scan_request *scan_request; |
| 87 | int magic; |
| 88 | int attempt; |
Hoonki Lee | fb8df67 | 2013-04-10 18:20:34 -0700 | [diff] [blame] | 89 | int reject; |
Hoonki Lee | 93e67ff | 2013-03-19 15:49:25 -0700 | [diff] [blame] | 90 | struct delayed_work tdls_scan_work; |
| 91 | } tdls_scan_context_t; |
| 92 | |
Chilam NG | 571c65a | 2013-01-19 12:27:36 +0530 | [diff] [blame] | 93 | typedef enum { |
Hoonki Lee | 2751190 | 2013-03-14 18:19:06 -0700 | [diff] [blame] | 94 | eTDLS_SUPPORT_NOT_ENABLED = 0, |
| 95 | eTDLS_SUPPORT_DISABLED, /* suppress implicit trigger and not respond to the peer */ |
| 96 | eTDLS_SUPPORT_EXPLICIT_TRIGGER_ONLY, /* suppress implicit trigger, but respond to the peer */ |
| 97 | eTDLS_SUPPORT_ENABLED, /* implicit trigger */ |
Chilam Ng | 0112041 | 2013-02-19 18:32:21 -0800 | [diff] [blame] | 98 | } eTDLSSupportMode; |
| 99 | |
Gopichand Nakkala | 901e892 | 2013-03-04 23:45:58 -0800 | [diff] [blame] | 100 | typedef enum eTDLSCapType{ |
Chilam NG | 571c65a | 2013-01-19 12:27:36 +0530 | [diff] [blame] | 101 | eTDLS_CAP_NOT_SUPPORTED = -1, |
| 102 | eTDLS_CAP_UNKNOWN = 0, |
| 103 | eTDLS_CAP_SUPPORTED = 1, |
Gopichand Nakkala | 901e892 | 2013-03-04 23:45:58 -0800 | [diff] [blame] | 104 | } tTDLSCapType; |
Chilam NG | 571c65a | 2013-01-19 12:27:36 +0530 | [diff] [blame] | 105 | |
Gopichand Nakkala | 901e892 | 2013-03-04 23:45:58 -0800 | [diff] [blame] | 106 | typedef enum eTDLSLinkStatus { |
| 107 | eTDLS_LINK_IDLE = 0, |
| 108 | eTDLS_LINK_DISCOVERING, |
Gopichand Nakkala | 0592280 | 2013-03-14 12:23:19 -0700 | [diff] [blame] | 109 | eTDLS_LINK_DISCOVERED, |
Gopichand Nakkala | 901e892 | 2013-03-04 23:45:58 -0800 | [diff] [blame] | 110 | eTDLS_LINK_CONNECTING, |
| 111 | eTDLS_LINK_CONNECTED, |
Gopichand Nakkala | e7cbc5d | 2013-03-27 21:09:23 -0700 | [diff] [blame] | 112 | eTDLS_LINK_TEARING, |
Gopichand Nakkala | 901e892 | 2013-03-04 23:45:58 -0800 | [diff] [blame] | 113 | } tTDLSLinkStatus; |
Chilam NG | 571c65a | 2013-01-19 12:27:36 +0530 | [diff] [blame] | 114 | |
Atul Mittal | 115287b | 2014-07-08 13:26:33 +0530 | [diff] [blame] | 115 | |
| 116 | typedef enum { |
| 117 | eTDLS_LINK_SUCCESS, /* Success */ |
| 118 | eTDLS_LINK_UNSPECIFIED = -1, /* Unspecified reason */ |
| 119 | eTDLS_LINK_NOT_SUPPORTED = -2, /* Remote side doesn't support TDLS */ |
| 120 | eTDLS_LINK_UNSUPPORTED_BAND = -3, /* Remote side doesn't support this band */ |
| 121 | eTDLS_LINK_NOT_BENEFICIAL = -4, /* Going to AP is better than going direct */ |
| 122 | eTDLS_LINK_DROPPED_BY_REMOTE = -5 /* Remote side doesn't want it anymore */ |
| 123 | } tTDLSLinkReason; |
| 124 | |
| 125 | typedef struct { |
| 126 | int channel; /* channel hint, in channel number (NOT frequency ) */ |
| 127 | int global_operating_class; /* operating class to use */ |
| 128 | int max_latency_ms; /* max latency that can be tolerated by apps */ |
| 129 | int min_bandwidth_kbps; /* bandwidth required by apps, in kilo bits per second */ |
| 130 | } tdls_req_params_t; |
| 131 | |
| 132 | typedef enum { |
| 133 | WIFI_TDLS_DISABLED, /* TDLS is not enabled, or is disabled now */ |
| 134 | WIFI_TDLS_ENABLED, /* TDLS is enabled, but not yet tried */ |
| 135 | WIFI_TDLS_TRYING, /* Direct link is being attempted (optional) */ |
| 136 | WIFI_TDLS_ESTABLISHED, /* Direct link is established */ |
| 137 | WIFI_TDLS_ESTABLISHED_OFF_CHANNEL, /* Direct link is established using MCC */ |
| 138 | WIFI_TDLS_DROPPED, /* Direct link was established, but is now dropped */ |
| 139 | WIFI_TDLS_FAILED /* Direct link failed */ |
| 140 | } tdls_state_t; |
| 141 | |
| 142 | typedef int (*cfg80211_exttdls_callback)(tANI_U8* mac, |
| 143 | tANI_S32 state, |
| 144 | tANI_S32 reason, |
| 145 | void *ctx); |
Chilam NG | 571c65a | 2013-01-19 12:27:36 +0530 | [diff] [blame] | 146 | typedef struct { |
| 147 | tANI_U16 period; |
| 148 | tANI_U16 bytes; |
| 149 | } tdls_tx_tput_config_t; |
| 150 | |
| 151 | typedef struct { |
| 152 | tANI_U16 period; |
| 153 | tANI_U16 tries; |
| 154 | } tdls_discovery_config_t; |
| 155 | |
| 156 | typedef struct { |
| 157 | tANI_U16 timeout; |
| 158 | } tdls_rx_idle_config_t; |
| 159 | |
| 160 | typedef struct { |
| 161 | tANI_U16 rssi_thres; |
| 162 | } tdls_rssi_config_t; |
| 163 | |
Hoonki Lee | d37cbb3 | 2013-04-20 00:31:14 -0700 | [diff] [blame] | 164 | struct _hddTdlsPeer_t; |
Sunil Dutt | 41de4e2 | 2013-11-14 18:09:02 +0530 | [diff] [blame] | 165 | |
| 166 | typedef struct { |
Gopichand Nakkala | 4327a15 | 2013-03-04 23:22:42 -0800 | [diff] [blame] | 167 | struct list_head peer_list[256]; |
| 168 | hdd_adapter_t *pAdapter; |
Hoonki Lee | d37cbb3 | 2013-04-20 00:31:14 -0700 | [diff] [blame] | 169 | #ifdef TDLS_USE_SEPARATE_DISCOVERY_TIMER |
Gopichand Nakkala | 4327a15 | 2013-03-04 23:22:42 -0800 | [diff] [blame] | 170 | vos_timer_t peerDiscoverTimer; |
Hoonki Lee | d37cbb3 | 2013-04-20 00:31:14 -0700 | [diff] [blame] | 171 | #endif |
Gopichand Nakkala | 4327a15 | 2013-03-04 23:22:42 -0800 | [diff] [blame] | 172 | vos_timer_t peerUpdateTimer; |
Gopichand Nakkala | 75e7b28 | 2013-03-15 18:37:13 -0700 | [diff] [blame] | 173 | vos_timer_t peerDiscoveryTimeoutTimer; |
Gopichand Nakkala | 4327a15 | 2013-03-04 23:22:42 -0800 | [diff] [blame] | 174 | tdls_config_params_t threshold_config; |
| 175 | tANI_S32 discovery_peer_cnt; |
Gopichand Nakkala | 75e7b28 | 2013-03-15 18:37:13 -0700 | [diff] [blame] | 176 | tANI_U32 discovery_sent_cnt; |
Gopichand Nakkala | 4327a15 | 2013-03-04 23:22:42 -0800 | [diff] [blame] | 177 | tANI_S8 ap_rssi; |
Hoonki Lee | d37cbb3 | 2013-04-20 00:31:14 -0700 | [diff] [blame] | 178 | struct _hddTdlsPeer_t *curr_candidate; |
| 179 | struct work_struct implicit_setup; |
| 180 | v_U32_t magic; |
Gopichand Nakkala | 4327a15 | 2013-03-04 23:22:42 -0800 | [diff] [blame] | 181 | } tdlsCtx_t; |
| 182 | |
Hoonki Lee | d37cbb3 | 2013-04-20 00:31:14 -0700 | [diff] [blame] | 183 | typedef struct _hddTdlsPeer_t { |
Hoonki Lee | 387663d | 2013-02-05 18:08:43 -0800 | [diff] [blame] | 184 | struct list_head node; |
Gopichand Nakkala | 4327a15 | 2013-03-04 23:22:42 -0800 | [diff] [blame] | 185 | tdlsCtx_t *pHddTdlsCtx; |
Hoonki Lee | 387663d | 2013-02-05 18:08:43 -0800 | [diff] [blame] | 186 | tSirMacAddr peerMac; |
| 187 | tANI_U16 staId ; |
| 188 | tANI_S8 rssi; |
Gopichand Nakkala | 901e892 | 2013-03-04 23:45:58 -0800 | [diff] [blame] | 189 | tTDLSCapType tdls_support; |
| 190 | tTDLSLinkStatus link_status; |
Hoonki Lee | 11f7dda | 2013-02-14 16:55:44 -0800 | [diff] [blame] | 191 | tANI_U8 signature; |
Hoonki Lee | a34dd89 | 2013-02-05 22:56:02 -0800 | [diff] [blame] | 192 | tANI_U8 is_responder; |
Gopichand Nakkala | c369458 | 2013-02-13 20:51:22 -0800 | [diff] [blame] | 193 | tANI_U8 discovery_processed; |
Hoonki Lee | 387663d | 2013-02-05 18:08:43 -0800 | [diff] [blame] | 194 | tANI_U16 discovery_attempt; |
| 195 | tANI_U16 tx_pkt; |
| 196 | tANI_U16 rx_pkt; |
Gopichand Nakkala | 79ff85d | 2013-05-27 17:05:29 +0530 | [diff] [blame] | 197 | tANI_U8 uapsdQueues; |
Agarwal Ashish | 16020c4 | 2014-12-29 22:01:11 +0530 | [diff] [blame^] | 198 | tANI_U8 qos; |
Gopichand Nakkala | 79ff85d | 2013-05-27 17:05:29 +0530 | [diff] [blame] | 199 | tANI_U8 maxSp; |
| 200 | tANI_U8 isBufSta; |
Naresh Jayaram | 3180aa4 | 2014-02-12 21:47:26 +0530 | [diff] [blame] | 201 | tANI_U8 isOffChannelSupported; |
| 202 | tANI_U8 supported_channels_len; |
| 203 | tANI_U8 supported_channels[SIR_MAC_MAX_SUPP_CHANNELS]; |
| 204 | tANI_U8 supported_oper_classes_len; |
| 205 | tANI_U8 supported_oper_classes[SIR_MAC_MAX_SUPP_OPER_CLASSES]; |
Hoonki Lee | 387663d | 2013-02-05 18:08:43 -0800 | [diff] [blame] | 206 | vos_timer_t peerIdleTimer; |
Hoonki Lee | 1462135 | 2013-04-16 17:51:19 -0700 | [diff] [blame] | 207 | vos_timer_t initiatorWaitTimeoutTimer; |
Naresh Jayaram | 937abdf | 2013-11-26 19:50:25 +0530 | [diff] [blame] | 208 | tANI_BOOLEAN isForcedPeer; |
Atul Mittal | 115287b | 2014-07-08 13:26:33 +0530 | [diff] [blame] | 209 | /*EXT TDLS*/ |
| 210 | tTDLSLinkReason reason; |
| 211 | cfg80211_exttdls_callback state_change_notification; |
Hoonki Lee | 387663d | 2013-02-05 18:08:43 -0800 | [diff] [blame] | 212 | } hddTdlsPeer_t; |
| 213 | |
Hoonki Lee | 387663d | 2013-02-05 18:08:43 -0800 | [diff] [blame] | 214 | typedef struct { |
Gopichand Nakkala | 4327a15 | 2013-03-04 23:22:42 -0800 | [diff] [blame] | 215 | /* Session ID */ |
| 216 | tANI_U8 sessionId; |
| 217 | /*TDLS peer station id */ |
| 218 | v_U8_t staId; |
| 219 | /* TDLS peer mac Address */ |
| 220 | v_MACADDR_t peerMac; |
| 221 | } tdlsConnInfo_t; |
Chilam NG | 571c65a | 2013-01-19 12:27:36 +0530 | [diff] [blame] | 222 | |
Agarwal Ashish | 4b87f92 | 2014-06-18 03:03:21 +0530 | [diff] [blame] | 223 | int wlan_hdd_sta_tdls_init(hdd_adapter_t *pAdapter); |
| 224 | |
| 225 | void wlan_hdd_tdls_init(hdd_context_t * pHddCtx); |
Chilam NG | 571c65a | 2013-01-19 12:27:36 +0530 | [diff] [blame] | 226 | |
Gopichand Nakkala | 4327a15 | 2013-03-04 23:22:42 -0800 | [diff] [blame] | 227 | void wlan_hdd_tdls_exit(hdd_adapter_t *pAdapter); |
Chilam NG | 571c65a | 2013-01-19 12:27:36 +0530 | [diff] [blame] | 228 | |
Hoonki Lee | 387663d | 2013-02-05 18:08:43 -0800 | [diff] [blame] | 229 | void wlan_hdd_tdls_extract_da(struct sk_buff *skb, u8 *mac); |
Chilam NG | 571c65a | 2013-01-19 12:27:36 +0530 | [diff] [blame] | 230 | |
Hoonki Lee | 387663d | 2013-02-05 18:08:43 -0800 | [diff] [blame] | 231 | void wlan_hdd_tdls_extract_sa(struct sk_buff *skb, u8 *mac); |
Chilam Ng | 1279e23 | 2013-01-25 15:06:52 -0800 | [diff] [blame] | 232 | |
Gopichand Nakkala | 4327a15 | 2013-03-04 23:22:42 -0800 | [diff] [blame] | 233 | int wlan_hdd_tdls_increment_pkt_count(hdd_adapter_t *pAdapter, u8 *mac, u8 tx); |
Chilam NG | 571c65a | 2013-01-19 12:27:36 +0530 | [diff] [blame] | 234 | |
Gopichand Nakkala | 4327a15 | 2013-03-04 23:22:42 -0800 | [diff] [blame] | 235 | int wlan_hdd_tdls_set_sta_id(hdd_adapter_t *pAdapter, u8 *mac, u8 staId); |
Chilam NG | 571c65a | 2013-01-19 12:27:36 +0530 | [diff] [blame] | 236 | |
Madan Mohan Koyyalamudi | 9679744 | 2013-10-08 16:04:42 +0530 | [diff] [blame] | 237 | hddTdlsPeer_t *wlan_hdd_tdls_find_peer(hdd_adapter_t *pAdapter, u8 *mac, tANI_BOOLEAN mutexLock); |
Chilam NG | 571c65a | 2013-01-19 12:27:36 +0530 | [diff] [blame] | 238 | |
Hoonki Lee | a6d49be | 2013-04-05 09:43:25 -0700 | [diff] [blame] | 239 | hddTdlsPeer_t *wlan_hdd_tdls_find_all_peer(hdd_context_t *pHddCtx, u8 *mac); |
| 240 | |
Gopichand Nakkala | 79ff85d | 2013-05-27 17:05:29 +0530 | [diff] [blame] | 241 | int wlan_hdd_tdls_get_link_establish_params(hdd_adapter_t *pAdapter, u8 *mac, |
| 242 | tCsrTdlsLinkEstablishParams* tdlsLinkEstablishParams); |
Gopichand Nakkala | 4327a15 | 2013-03-04 23:22:42 -0800 | [diff] [blame] | 243 | hddTdlsPeer_t *wlan_hdd_tdls_get_peer(hdd_adapter_t *pAdapter, u8 *mac); |
Hoonki Lee | 387663d | 2013-02-05 18:08:43 -0800 | [diff] [blame] | 244 | |
Gopichand Nakkala | 34d1b06 | 2013-03-19 15:28:33 -0700 | [diff] [blame] | 245 | int wlan_hdd_tdls_set_cap(hdd_adapter_t *pAdapter, u8* mac, tTDLSCapType cap); |
Hoonki Lee | 2751190 | 2013-03-14 18:19:06 -0700 | [diff] [blame] | 246 | |
Atul Mittal | 115287b | 2014-07-08 13:26:33 +0530 | [diff] [blame] | 247 | void wlan_hdd_tdls_set_peer_link_status(hddTdlsPeer_t *curr_peer, |
| 248 | tTDLSLinkStatus status, |
| 249 | tTDLSLinkReason reason); |
| 250 | void wlan_hdd_tdls_set_link_status(hdd_adapter_t *pAdapter, |
| 251 | u8* mac, |
| 252 | tTDLSLinkStatus linkStatus, |
| 253 | tTDLSLinkReason reason); |
Chilam NG | 571c65a | 2013-01-19 12:27:36 +0530 | [diff] [blame] | 254 | |
Gopichand Nakkala | 4327a15 | 2013-03-04 23:22:42 -0800 | [diff] [blame] | 255 | int wlan_hdd_tdls_recv_discovery_resp(hdd_adapter_t *pAdapter, u8 *mac); |
Chilam NG | 571c65a | 2013-01-19 12:27:36 +0530 | [diff] [blame] | 256 | |
Gopichand Nakkala | 79ff85d | 2013-05-27 17:05:29 +0530 | [diff] [blame] | 257 | int wlan_hdd_tdls_set_peer_caps(hdd_adapter_t *pAdapter, |
| 258 | u8 *mac, |
Naresh Jayaram | 3180aa4 | 2014-02-12 21:47:26 +0530 | [diff] [blame] | 259 | tCsrStaParams *StaParams, |
| 260 | tANI_BOOLEAN isBufSta, |
| 261 | tANI_BOOLEAN isOffChannelSupported); |
Gopichand Nakkala | 79ff85d | 2013-05-27 17:05:29 +0530 | [diff] [blame] | 262 | |
Gopichand Nakkala | 4327a15 | 2013-03-04 23:22:42 -0800 | [diff] [blame] | 263 | int wlan_hdd_tdls_set_rssi(hdd_adapter_t *pAdapter, u8 *mac, tANI_S8 rxRssi); |
Chilam NG | 571c65a | 2013-01-19 12:27:36 +0530 | [diff] [blame] | 264 | |
Gopichand Nakkala | 4327a15 | 2013-03-04 23:22:42 -0800 | [diff] [blame] | 265 | int wlan_hdd_tdls_set_responder(hdd_adapter_t *pAdapter, u8 *mac, tANI_U8 responder); |
Hoonki Lee | a34dd89 | 2013-02-05 22:56:02 -0800 | [diff] [blame] | 266 | |
Gopichand Nakkala | 4327a15 | 2013-03-04 23:22:42 -0800 | [diff] [blame] | 267 | int wlan_hdd_tdls_get_responder(hdd_adapter_t *pAdapter, u8 *mac); |
Hoonki Lee | a34dd89 | 2013-02-05 22:56:02 -0800 | [diff] [blame] | 268 | |
Gopichand Nakkala | 4327a15 | 2013-03-04 23:22:42 -0800 | [diff] [blame] | 269 | int wlan_hdd_tdls_set_signature(hdd_adapter_t *pAdapter, u8 *mac, tANI_U8 uSignature); |
Hoonki Lee | 11f7dda | 2013-02-14 16:55:44 -0800 | [diff] [blame] | 270 | |
Chilam Ng | 0112041 | 2013-02-19 18:32:21 -0800 | [diff] [blame] | 271 | int wlan_hdd_tdls_set_params(struct net_device *dev, tdls_config_params_t *config); |
Chilam NG | 571c65a | 2013-01-19 12:27:36 +0530 | [diff] [blame] | 272 | |
Gopichand Nakkala | 4327a15 | 2013-03-04 23:22:42 -0800 | [diff] [blame] | 273 | int wlan_hdd_tdls_reset_peer(hdd_adapter_t *pAdapter, u8 *mac); |
Hoonki Lee | 387663d | 2013-02-05 18:08:43 -0800 | [diff] [blame] | 274 | |
Gopichand Nakkala | 4327a15 | 2013-03-04 23:22:42 -0800 | [diff] [blame] | 275 | tANI_U16 wlan_hdd_tdlsConnectedPeers(hdd_adapter_t *pAdapter); |
Lee Hoonki | c1262f2 | 2013-01-24 21:59:00 -0800 | [diff] [blame] | 276 | |
Gopichand Nakkala | 4327a15 | 2013-03-04 23:22:42 -0800 | [diff] [blame] | 277 | int wlan_hdd_tdls_get_all_peers(hdd_adapter_t *pAdapter, char *buf, int buflen); |
Chilam Ng | 16a2a1c | 2013-01-29 01:27:29 -0800 | [diff] [blame] | 278 | |
Gopichand Nakkala | c369458 | 2013-02-13 20:51:22 -0800 | [diff] [blame] | 279 | void wlan_hdd_tdls_connection_callback(hdd_adapter_t *pAdapter); |
| 280 | |
| 281 | void wlan_hdd_tdls_disconnection_callback(hdd_adapter_t *pAdapter); |
| 282 | |
Gopichand Nakkala | b977a97 | 2013-02-18 19:15:09 -0800 | [diff] [blame] | 283 | void wlan_hdd_tdls_mgmt_completion_callback(hdd_adapter_t *pAdapter, tANI_U32 statusCode); |
| 284 | |
Gopichand Nakkala | 4327a15 | 2013-03-04 23:22:42 -0800 | [diff] [blame] | 285 | void wlan_hdd_tdls_increment_peer_count(hdd_adapter_t *pAdapter); |
Gopichand Nakkala | b977a97 | 2013-02-18 19:15:09 -0800 | [diff] [blame] | 286 | |
Gopichand Nakkala | 4327a15 | 2013-03-04 23:22:42 -0800 | [diff] [blame] | 287 | void wlan_hdd_tdls_decrement_peer_count(hdd_adapter_t *pAdapter); |
Gopichand Nakkala | b977a97 | 2013-02-18 19:15:09 -0800 | [diff] [blame] | 288 | |
Gopichand Nakkala | 4327a15 | 2013-03-04 23:22:42 -0800 | [diff] [blame] | 289 | void wlan_hdd_tdls_check_bmps(hdd_adapter_t *pAdapter); |
Gopichand Nakkala | b977a97 | 2013-02-18 19:15:09 -0800 | [diff] [blame] | 290 | |
Gopichand Nakkala | 34d1b06 | 2013-03-19 15:28:33 -0700 | [diff] [blame] | 291 | u8 wlan_hdd_tdls_is_peer_progress(hdd_adapter_t *pAdapter, u8 *mac); |
| 292 | |
Madan Mohan Koyyalamudi | 9679744 | 2013-10-08 16:04:42 +0530 | [diff] [blame] | 293 | hddTdlsPeer_t *wlan_hdd_tdls_is_progress(hdd_context_t *pHddCtx, u8* mac, u8 skip_self); |
Hoonki Lee | 387663d | 2013-02-05 18:08:43 -0800 | [diff] [blame] | 294 | |
Gopichand Nakkala | dcbcf4e | 2013-03-23 14:32:39 -0700 | [diff] [blame] | 295 | void wlan_hdd_tdls_set_mode(hdd_context_t *pHddCtx, |
| 296 | eTDLSSupportMode tdls_mode, |
| 297 | v_BOOL_t bUpdateLast); |
Hoonki Lee | 2751190 | 2013-03-14 18:19:06 -0700 | [diff] [blame] | 298 | |
Gopichand Nakkala | ccd3a38 | 2013-03-19 13:56:10 -0700 | [diff] [blame] | 299 | tANI_U32 wlan_hdd_tdls_discovery_sent_cnt(hdd_context_t *pHddCtx); |
| 300 | |
Gopichand Nakkala | 34d1b06 | 2013-03-19 15:28:33 -0700 | [diff] [blame] | 301 | void wlan_hdd_tdls_check_power_save_prohibited(hdd_adapter_t *pAdapter); |
Gopichand Nakkala | ccd3a38 | 2013-03-19 13:56:10 -0700 | [diff] [blame] | 302 | |
Hoonki Lee | 93e67ff | 2013-03-19 15:49:25 -0700 | [diff] [blame] | 303 | void wlan_hdd_tdls_free_scan_request (tdls_scan_context_t *tdls_scan_ctx); |
| 304 | |
| 305 | int wlan_hdd_tdls_copy_scan_context(hdd_context_t *pHddCtx, |
| 306 | struct wiphy *wiphy, |
| 307 | #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,6,0)) |
| 308 | struct net_device *dev, |
| 309 | #endif |
| 310 | struct cfg80211_scan_request *request); |
| 311 | |
| 312 | int wlan_hdd_tdls_scan_callback (hdd_adapter_t *pAdapter, |
| 313 | struct wiphy *wiphy, |
| 314 | #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,6,0)) |
| 315 | struct net_device *dev, |
| 316 | #endif |
| 317 | struct cfg80211_scan_request *request); |
| 318 | |
| 319 | void wlan_hdd_tdls_scan_done_callback(hdd_adapter_t *pAdapter); |
| 320 | |
Gopichand Nakkala | 3046fc9 | 2013-03-23 13:56:43 -0700 | [diff] [blame] | 321 | void wlan_hdd_tdls_timer_restart(hdd_adapter_t *pAdapter, |
| 322 | vos_timer_t *timer, |
| 323 | v_U32_t expirationTime); |
Gopichand Nakkala | e7cbc5d | 2013-03-27 21:09:23 -0700 | [diff] [blame] | 324 | void wlan_hdd_tdls_indicate_teardown(hdd_adapter_t *pAdapter, |
Atul Mittal | 115287b | 2014-07-08 13:26:33 +0530 | [diff] [blame] | 325 | hddTdlsPeer_t *curr_peer, |
| 326 | tANI_U16 reason); |
Gopichand Nakkala | e7cbc5d | 2013-03-27 21:09:23 -0700 | [diff] [blame] | 327 | |
Naresh Jayaram | 937abdf | 2013-11-26 19:50:25 +0530 | [diff] [blame] | 328 | int wlan_hdd_tdls_set_force_peer(hdd_adapter_t *pAdapter, u8 *mac, |
| 329 | tANI_BOOLEAN forcePeer); |
Atul Mittal | 115287b | 2014-07-08 13:26:33 +0530 | [diff] [blame] | 330 | int wlan_hdd_tdls_extctrl_deconfig_peer(hdd_adapter_t *pAdapter, u8 *peer); |
| 331 | int wlan_hdd_tdls_extctrl_config_peer(hdd_adapter_t *pAdapter, |
| 332 | u8 *peer, |
| 333 | cfg80211_exttdls_callback callback); |
| 334 | /*EXT TDLS*/ |
| 335 | int wlan_hdd_tdls_get_status(hdd_adapter_t *pAdapter, |
| 336 | tANI_U8* mac, |
| 337 | tANI_S32 *state, |
| 338 | tANI_S32 *reason); |
| 339 | void wlan_hdd_tdls_get_wifi_hal_state(hddTdlsPeer_t *curr_peer, |
| 340 | tANI_S32 *state, |
| 341 | tANI_S32 *reason); |
| 342 | int wlan_hdd_set_callback(hddTdlsPeer_t *curr_peer, |
| 343 | cfg80211_exttdls_callback callback); |
Agarwal Ashish | ef54a18 | 2014-12-16 15:07:31 +0530 | [diff] [blame] | 344 | int hdd_set_tdls_scan_type(hdd_adapter_t *pAdapter, |
| 345 | tANI_U8 *ptr); |
Gopichand Nakkala | 3046fc9 | 2013-03-23 13:56:43 -0700 | [diff] [blame] | 346 | |
Atul Mittal | c0f739f | 2014-07-31 13:47:47 +0530 | [diff] [blame] | 347 | // tdlsoffchan |
| 348 | hddTdlsPeer_t *wlan_hdd_tdls_get_first_connected_peer(hdd_adapter_t *pAdapter); |
Kiran V | 1ccee93 | 2012-12-12 14:49:46 -0800 | [diff] [blame] | 349 | #endif // __HDD_TDSL_H |