blob: f8b934cc9a7fccc5bdcc85ba2625825bf7af95ff [file] [log] [blame]
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001/*
Nitesh Shahb9d3dbb2017-01-16 16:37:20 +05302 * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved.
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003 *
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.
20 */
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
28#ifndef __HDD_TDLS_H
29#define __HDD_TDLS_H
30/**
31 * DOC: wlan_hdd_tdls.h
32 * WLAN Host Device Driver TDLS include file
33 */
34
Nitesh Shah61c10d92016-10-19 19:29:15 +053035/*
Srinivas Girigowda17d35172017-03-25 15:56:25 -070036 * enum tdls_support_mode - TDLS support modes
Nitesh Shah61c10d92016-10-19 19:29:15 +053037 * @eTDLS_SUPPORT_NOT_ENABLED: TDLS support not enabled
38 * @eTDLS_SUPPORT_DISABLED: suppress implicit trigger and not respond
39 * to the peer
40 * @eTDLS_SUPPORT_EXPLICIT_TRIGGER_ONLY: suppress implicit trigger,
41 * but respond to the peer
42 * @eTDLS_SUPPORT_ENABLED: implicit trigger
43 * @eTDLS_SUPPORT_EXTERNAL_CONTROL: implicit trigger but only to a
44 * peer mac configured by user space.
45 */
Srinivas Girigowda17d35172017-03-25 15:56:25 -070046enum tdls_support_mode {
Nitesh Shah61c10d92016-10-19 19:29:15 +053047 eTDLS_SUPPORT_NOT_ENABLED = 0,
48 eTDLS_SUPPORT_DISABLED,
49 eTDLS_SUPPORT_EXPLICIT_TRIGGER_ONLY,
50 eTDLS_SUPPORT_ENABLED,
51 eTDLS_SUPPORT_EXTERNAL_CONTROL,
Srinivas Girigowda17d35172017-03-25 15:56:25 -070052};
Nitesh Shah61c10d92016-10-19 19:29:15 +053053
Kabilan Kannan6ca98482017-02-14 13:26:15 -080054/**
55 * enum tdls_concerned_external_events - External events that affect TDLS
56 * @P2P_ROC_START: P2P remain on channel starts
57 * @P2P_ROC_END: P2P remain on channel ends
58 */
59enum tdls_concerned_external_events {
60 P2P_ROC_START,
61 P2P_ROC_END,
62};
63
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080064#ifdef FEATURE_WLAN_TDLS
65
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080066/*
67 * Before UpdateTimer expires, we want to timeout discovery response
68 * should not be more than 2000.
69 */
70#define TDLS_DISCOVERY_TIMEOUT_BEFORE_UPDATE 1000
71
72#define TDLS_CTX_MAGIC 0x54444c53 /* "TDLS" */
73
74#define TDLS_MAX_SCAN_SCHEDULE 10
75#define TDLS_MAX_SCAN_REJECT 5
76#define TDLS_DELAY_SCAN_PER_CONNECTION 100
77#define TDLS_MAX_CONNECTED_PEERS_TO_ALLOW_SCAN 1
78
79#define TDLS_IS_CONNECTED(peer) \
80 ((eTDLS_LINK_CONNECTED == (peer)->link_status) || \
81 (eTDLS_LINK_TEARING == (peer)->link_status))
82
83/* Bit mask flag for tdls_option to FW */
84#define ENA_TDLS_OFFCHAN (1 << 0) /* TDLS Off Channel support */
85#define ENA_TDLS_BUFFER_STA (1 << 1) /* TDLS Buffer STA support */
86#define ENA_TDLS_SLEEP_STA (1 << 2) /* TDLS Sleep STA support */
87#define TDLS_SEC_OFFCHAN_OFFSET_0 0
88#define TDLS_SEC_OFFCHAN_OFFSET_40PLUS 40
89#define TDLS_SEC_OFFCHAN_OFFSET_40MINUS (-40)
90#define TDLS_SEC_OFFCHAN_OFFSET_80 80
91#define TDLS_SEC_OFFCHAN_OFFSET_160 160
92
93#define TDLS_PEER_LIST_SIZE 256
94
Kabilan Kannan36090ce2016-05-03 19:28:44 -070095#define TDLS_CT_MAC_AGE_OUT_TIME (30*60*1000) /* Age out time is 30 mins */
96
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080097#define EXTTDLS_EVENT_BUF_SIZE (4096)
98
Kabilan Kannan36090ce2016-05-03 19:28:44 -070099#define TDLS_CT_MAC_MAX_TABLE_SIZE 8
100
Nitesh Shah98097b92016-12-28 17:16:58 +0530101/* Define the interval for 5 minutes */
102#define TDLS_ENABLE_CDS_FLUSH_INTERVAL 300000000
103
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800104/**
Nitesh Shah2b946fa2016-10-19 17:05:09 +0530105 * enum tdls_disable_source - TDLS disable sources
106 * @HDD_SET_TDLS_MODE_SOURCE_USER: disable from user
107 * @HDD_SET_TDLS_MODE_SOURCE_SCAN: disable during scan
108 * @HDD_SET_TDLS_MODE_SOURCE_OFFCHANNEL: disable during offchannel
109 * @HDD_SET_TDLS_MODE_SOURCE_BTC: disable during bluetooth
110 * @HDD_SET_TDLS_MODE_SOURCE_P2P: disable during p2p
111 */
112enum tdls_disable_source {
113 HDD_SET_TDLS_MODE_SOURCE_USER = 0,
114 HDD_SET_TDLS_MODE_SOURCE_SCAN,
115 HDD_SET_TDLS_MODE_SOURCE_OFFCHANNEL,
116 HDD_SET_TDLS_MODE_SOURCE_BTC,
117 HDD_SET_TDLS_MODE_SOURCE_P2P,
118};
119
120/**
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800121 * struct tdls_config_params_t - tdls config params
122 *
123 * @tdls: tdls
124 * @tx_period_t: tx period
125 * @tx_packet_n: tx packets number
126 * @discovery_tries_n: discovery tries
Kabilan Kannan36090ce2016-05-03 19:28:44 -0700127 * @idle_timeout_t: idle traffic time out value
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800128 * @idle_packet_n: idle packet number
129 * @rssi_trigger_threshold: rssi trigger threshold
130 * @rssi_teardown_threshold: rssi tear down threshold
131 * @rssi_delta: rssi delta
132 */
133typedef struct {
134 uint32_t tdls;
135 uint32_t tx_period_t;
136 uint32_t tx_packet_n;
137 uint32_t discovery_tries_n;
Kabilan Kannan36090ce2016-05-03 19:28:44 -0700138 uint32_t idle_timeout_t;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800139 uint32_t idle_packet_n;
140 int32_t rssi_trigger_threshold;
141 int32_t rssi_teardown_threshold;
142 int32_t rssi_delta;
143} tdls_config_params_t;
144
145/**
146 * struct tdls_scan_context_t - tdls scan context
147 *
148 * @wiphy: pointer to wiphy structure
149 * @dev: pointer to netdev
150 * @scan_request: scan request
151 * @magic: magic
152 * @attempt: attempt
153 * @reject: reject
Nitesh Shah9ed1a9f2017-01-05 18:55:05 +0530154 * @source: scan request source(NL/Vendor scan)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800155 * @tdls_scan_work: delayed tdls scan work
156 */
157typedef struct {
158 struct wiphy *wiphy;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800159 struct cfg80211_scan_request *scan_request;
Nitesh Shah9ed1a9f2017-01-05 18:55:05 +0530160 uint32_t magic;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800161 int attempt;
162 int reject;
Nitesh Shah9ed1a9f2017-01-05 18:55:05 +0530163 uint8_t source;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800164 struct delayed_work tdls_scan_work;
165} tdls_scan_context_t;
166
167/**
Archana Ramachandran2ad7de22016-04-22 16:53:25 -0700168 * enum tdls_spatial_streams - TDLS spatial streams
169 * @TDLS_NSS_1x1_MODE: TDLS tx/rx spatial streams = 1
170 * @TDLS_NSS_2x2_MODE: TDLS tx/rx spatial streams = 2
171 */
172enum tdls_spatial_streams {
173 TDLS_NSS_1x1_MODE = 0,
174 TDLS_NSS_2x2_MODE = 0xff,
175};
176
177/**
Kabilan Kannanff89f742016-08-15 18:14:10 -0700178 * enum tdls_nss_transition_type - TDLS NSS transition states
179 * @TDLS_NSS_TRANSITION_UNKNOWN: default state
180 * @TDLS_NSS_TRANSITION_2x2_to_1x1: transition from 2x2 to 1x1 stream
181 * @TDLS_NSS_TRANSITION_1x1_to_2x2: transition from 1x1 to 2x2 stream
182 */
183enum tdls_nss_transition_type {
184 TDLS_NSS_TRANSITION_UNKNOWN = 0,
185 TDLS_NSS_TRANSITION_2x2_to_1x1,
186 TDLS_NSS_TRANSITION_1x1_to_2x2,
187};
188
189/**
Srinivas Girigowda17d35172017-03-25 15:56:25 -0700190 * enum tdls_cap_type - tdls capability type
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800191 *
192 * @eTDLS_CAP_NOT_SUPPORTED: tdls not supported
193 * @eTDLS_CAP_UNKNOWN: unknown capability
194 * @eTDLS_CAP_SUPPORTED: tdls capability supported
195 */
Srinivas Girigowda17d35172017-03-25 15:56:25 -0700196enum tdls_cap_type {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800197 eTDLS_CAP_NOT_SUPPORTED = -1,
198 eTDLS_CAP_UNKNOWN = 0,
199 eTDLS_CAP_SUPPORTED = 1,
Srinivas Girigowda17d35172017-03-25 15:56:25 -0700200};
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800201
202/**
Srinivas Girigowda17d35172017-03-25 15:56:25 -0700203 * enum tdls_link_status - tdls link status
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800204 *
205 * @eTDLS_LINK_IDLE: tdls link idle
206 * @eTDLS_LINK_DISCOVERING: tdls link discovering
207 * @eTDLS_LINK_DISCOVERED: tdls link discovered
208 * @eTDLS_LINK_CONNECTING: tdls link connecting
209 * @eTDLS_LINK_CONNECTED: tdls link connected
210 * @eTDLS_LINK_TEARING: tdls link tearing
211 */
Srinivas Girigowda17d35172017-03-25 15:56:25 -0700212enum tdls_link_status {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800213 eTDLS_LINK_IDLE = 0,
214 eTDLS_LINK_DISCOVERING,
215 eTDLS_LINK_DISCOVERED,
216 eTDLS_LINK_CONNECTING,
217 eTDLS_LINK_CONNECTED,
218 eTDLS_LINK_TEARING,
Srinivas Girigowda17d35172017-03-25 15:56:25 -0700219};
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800220
221/**
Abhishek Singh4ef5fe02016-04-27 12:21:24 +0530222 * enum tdls_teardown_reason - Reason for TDLS teardown
223 * @eTDLS_TEARDOWN_EXT_CTRL: Reason ext ctrl.
224 * @eTDLS_TEARDOWN_CONCURRENCY: Reason concurrency.
225 * @eTDLS_TEARDOWN_RSSI_THRESHOLD: Reason rssi threshold.
226 * @eTDLS_TEARDOWN_TXRX_THRESHOLD: Reason txrx threshold.
227 * @eTDLS_TEARDOWN_BTCOEX: Reason BTCOEX.
228 * @eTDLS_TEARDOWN_SCAN: Reason scan.
229 * @eTDLS_TEARDOWN_BSS_DISCONNECT: Reason bss disconnected.
230 * @eTDLS_TEARDOWN_ANTENNA_SWITCH: Disconnected due to antenna switch
231 *
232 * Reason to indicate in diag event of tdls teardown.
233 */
234enum tdls_teardown_reason {
235 eTDLS_TEARDOWN_EXT_CTRL,
236 eTDLS_TEARDOWN_CONCURRENCY,
237 eTDLS_TEARDOWN_RSSI_THRESHOLD,
238 eTDLS_TEARDOWN_TXRX_THRESHOLD,
239 eTDLS_TEARDOWN_BTCOEX,
240 eTDLS_TEARDOWN_SCAN,
241 eTDLS_TEARDOWN_BSS_DISCONNECT,
242 eTDLS_TEARDOWN_ANTENNA_SWITCH,
243};
244
245/**
Srinivas Girigowda17d35172017-03-25 15:56:25 -0700246 * enum tdls_link_reason - tdls link reason
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800247 *
248 * @eTDLS_LINK_SUCCESS: Success
249 * @eTDLS_LINK_UNSPECIFIED: Unspecified reason
250 * @eTDLS_LINK_NOT_SUPPORTED: Remote side doesn't support TDLS
251 * @eTDLS_LINK_UNSUPPORTED_BAND: Remote side doesn't support this band
252 * @eTDLS_LINK_NOT_BENEFICIAL: Going to AP is better than direct
253 * @eTDLS_LINK_DROPPED_BY_REMOTE: Remote side doesn't want it anymore
254 */
Srinivas Girigowda17d35172017-03-25 15:56:25 -0700255enum tdls_link_reason {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800256 eTDLS_LINK_SUCCESS,
257 eTDLS_LINK_UNSPECIFIED = -1,
258 eTDLS_LINK_NOT_SUPPORTED = -2,
259 eTDLS_LINK_UNSUPPORTED_BAND = -3,
260 eTDLS_LINK_NOT_BENEFICIAL = -4,
261 eTDLS_LINK_DROPPED_BY_REMOTE = -5
Srinivas Girigowda17d35172017-03-25 15:56:25 -0700262};
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800263
264/**
265 * struct tdls_req_params_t - tdls request parameters
266 *
267 * @channel: channel hint, in channel number (NOT frequency)
268 * @global_operating_class: operating class to use
269 * @max_latency_ms: max latency that can be tolerated by apps
270 * @min_bandwidth_kbps: bandwidth required by apps, in kilo bits per second
271 */
272typedef struct {
273 int channel;
274 int global_operating_class;
275 int max_latency_ms;
276 int min_bandwidth_kbps;
277} tdls_req_params_t;
278
279/**
Srinivas Girigowda17d35172017-03-25 15:56:25 -0700280 * enum tdls_state - tdls state
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800281 *
282 * @QCA_WIFI_HAL_TDLS_DISABLED: TDLS is not enabled, or is disabled now
283 * @QCA_WIFI_HAL_TDLS_ENABLED: TDLS is enabled, but not yet tried
284 * @QCA_WIFI_HAL_TDLS_ESTABLISHED: Direct link is established
285 * @QCA_WIFI_HAL_TDLS_ESTABLISHED_OFF_CHANNEL: Direct link established using MCC
286 * @QCA_WIFI_HAL_TDLS_DROPPED: Direct link was established, but is now dropped
287 * @QCA_WIFI_HAL_TDLS_FAILED: Direct link failed
288 */
Srinivas Girigowda17d35172017-03-25 15:56:25 -0700289enum tdls_state {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800290 QCA_WIFI_HAL_TDLS_DISABLED = 1,
291 QCA_WIFI_HAL_TDLS_ENABLED,
292 QCA_WIFI_HAL_TDLS_ESTABLISHED,
293 QCA_WIFI_HAL_TDLS_ESTABLISHED_OFF_CHANNEL,
294 QCA_WIFI_HAL_TDLS_DROPPED,
295 QCA_WIFI_HAL_TDLS_FAILED
Srinivas Girigowda17d35172017-03-25 15:56:25 -0700296};
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800297
298typedef int (*cfg80211_exttdls_callback)(const uint8_t *mac,
Masti, Narayanraddic4a7ab82015-11-25 15:41:10 +0530299 uint32_t opclass,
300 uint32_t channel,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800301 uint32_t state,
302 int32_t reason, void *ctx);
303
304/**
305 * struct tdls_tx_tput_config_t - tdls tx throughput config
306 *
307 * @period: period
308 * @bytes: bytes
309 */
310typedef struct {
311 uint16_t period;
312 uint16_t bytes;
313} tdls_tx_tput_config_t;
314
315/**
316 * struct tdls_discovery_config_t - tdls discovery config
317 *
318 * @period: period
319 * @tries: number of tries
320 */
321typedef struct {
322 uint16_t period;
323 uint16_t tries;
324} tdls_discovery_config_t;
325
326/**
327 * struct tdls_rx_idle_config_t - tdls rx idle config
328 *
329 * @timeout: timeout
330 */
331typedef struct {
332 uint16_t timeout;
333} tdls_rx_idle_config_t;
334
335/**
336 * struct tdls_rssi_config_t - tdls rssi config
337 *
338 * @rssi_thres: rssi_thres
339 */
340typedef struct {
341 uint16_t rssi_thres;
342} tdls_rssi_config_t;
343
344struct _hddTdlsPeer_t;
345
346/**
Kabilan Kannan36090ce2016-05-03 19:28:44 -0700347 * struct tdls_ct_mac_table - connection tracker peer mac address table
348 * @mac_address: peer mac address
349 * @tx_packet_cnt: number of tx pkts
350 * @rx_packet_cnt: number of rx pkts
351 * @peer_timestamp_ms: time stamp of latest peer traffic
352 */
353struct tdls_ct_mac_table {
354 struct qdf_mac_addr mac_address;
355 uint32_t tx_packet_cnt;
356 uint32_t rx_packet_cnt;
357 uint32_t peer_timestamp_ms;
358};
Kabilan Kannan163fd0b2016-06-08 15:21:51 -0700359
360/**
361 * struct tdls_set_state_db - set state command data base
362 * @set_state_cnt: tdls set state count
363 * @vdev_id: vdev id of last set state command
364 */
365struct tdls_set_state_info {
366 uint8_t set_state_cnt;
367 uint8_t vdev_id;
368};
369
Kabilan Kannan36090ce2016-05-03 19:28:44 -0700370/**
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800371 * struct tdlsCtx_t - tdls context
372 *
373 * @peer_list: peer list
374 * @pAdapter: pointer to adapter
Kabilan Kannan36090ce2016-05-03 19:28:44 -0700375 * @peer_update_timer: connection tracker timer
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800376 * @peerDiscoverTimer: peer discovery timer
377 * @peerDiscoveryTimeoutTimer: peer discovery timeout timer
378 * @threshold_config: threshold config
379 * @discovery_peer_cnt: discovery peer count
380 * @discovery_sent_cnt: discovery sent count
381 * @ap_rssi: ap rssi
382 * @curr_candidate: current candidate
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800383 * @magic: magic
Nitesh Shah98097b92016-12-28 17:16:58 +0530384 * @last_flush_ts: last timestamp when flush logs was displayed.
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800385 *
386 */
387typedef struct {
388 struct list_head peer_list[TDLS_PEER_LIST_SIZE];
389 hdd_adapter_t *pAdapter;
Kabilan Kannan36090ce2016-05-03 19:28:44 -0700390 qdf_mc_timer_t peer_update_timer;
Anurag Chouhan210db072016-02-22 18:42:15 +0530391 qdf_mc_timer_t peerDiscoveryTimeoutTimer;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800392 tdls_config_params_t threshold_config;
393 int32_t discovery_peer_cnt;
394 uint32_t discovery_sent_cnt;
395 int8_t ap_rssi;
396 struct _hddTdlsPeer_t *curr_candidate;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800397 uint32_t magic;
Nitesh Shah98097b92016-12-28 17:16:58 +0530398 uint64_t last_flush_ts;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800399} tdlsCtx_t;
400
401/**
402 * struct hddTdlsPeer_t - tdls peer data
403 *
404 * @node: node
405 * @pHddTdlsCtx: pointer to tdls context
406 * @peerMac: peer mac address
407 * @staId: station identifier
408 * @rssi: rssi
409 * @tdls_support: tdls support
410 * @link_status: tdls link status
411 * @signature: signature
412 * @is_responder: is responder
413 * @discovery_processed: discovery processed flag
414 * @discovery_attempt: discovery attempt
415 * @tx_pkt: tx packet
416 * @rx_pkt: rx packet
417 * @uapsdQueues: uapsd queues
418 * @maxSp: max sp
419 * @isBufSta: is buffer sta
420 * @isOffChannelSupported: is offchannel supported flag
421 * @supported_channels_len: supported channels length
422 * @supported_channels: supported channels
423 * @supported_oper_classes_len: supported operation classes length
424 * @supported_oper_classes: supported operation classes
425 * @isForcedPeer: is forced peer
426 * @op_class_for_pref_off_chan: op class for preferred off channel
427 * @pref_off_chan_num: preferred off channel number
428 * @op_class_for_pref_off_chan_is_set: op class for preferred off channel set
Kabilan Kannan36090ce2016-05-03 19:28:44 -0700429 * @peer_idle_timer: time to check idle traffic in tdls peers
430 * @is_peer_idle_timer_initialised: Flag to check idle timer init
Archana Ramachandran2ad7de22016-04-22 16:53:25 -0700431 * @spatial_streams: Number of TX/RX spatial streams for TDLS
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800432 * @reason: reason
433 * @state_change_notification: state change notification
Agrawal Ashishd3f22f62016-09-04 13:46:15 +0530434 * @qos: QOS capability of TDLS link
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800435 */
436typedef struct _hddTdlsPeer_t {
437 struct list_head node;
438 tdlsCtx_t *pHddTdlsCtx;
439 tSirMacAddr peerMac;
440 uint16_t staId;
441 int8_t rssi;
Srinivas Girigowda17d35172017-03-25 15:56:25 -0700442 enum tdls_cap_type tdls_support;
443 enum tdls_link_status link_status;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800444 uint8_t signature;
445 uint8_t is_responder;
446 uint8_t discovery_processed;
447 uint16_t discovery_attempt;
448 uint16_t tx_pkt;
449 uint16_t rx_pkt;
450 uint8_t uapsdQueues;
451 uint8_t maxSp;
452 uint8_t isBufSta;
453 uint8_t isOffChannelSupported;
454 uint8_t supported_channels_len;
455 uint8_t supported_channels[SIR_MAC_MAX_SUPP_CHANNELS];
456 uint8_t supported_oper_classes_len;
Naveen Rawat3b6068c2016-04-14 19:01:06 -0700457 uint8_t supported_oper_classes[CDS_MAX_SUPP_OPER_CLASSES];
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800458 bool isForcedPeer;
459 uint8_t op_class_for_pref_off_chan;
460 uint8_t pref_off_chan_num;
461 uint8_t op_class_for_pref_off_chan_is_set;
Kabilan Kannan36090ce2016-05-03 19:28:44 -0700462 qdf_mc_timer_t peer_idle_timer;
463 bool is_peer_idle_timer_initialised;
Archana Ramachandran2ad7de22016-04-22 16:53:25 -0700464 uint8_t spatial_streams;
Srinivas Girigowda17d35172017-03-25 15:56:25 -0700465 enum tdls_link_reason reason;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800466 cfg80211_exttdls_callback state_change_notification;
Agrawal Ashishd3f22f62016-09-04 13:46:15 +0530467 uint8_t qos;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800468} hddTdlsPeer_t;
469
470/**
471 * struct tdlsConnInfo_t - tdls connection info
472 *
473 * @sessionId: Session ID
474 * @staId: TDLS peer station id
475 * @peerMac: peer mac address
476 */
477typedef struct {
478 uint8_t sessionId;
479 uint8_t staId;
Anurag Chouhan6d760662016-02-20 16:05:43 +0530480 struct qdf_mac_addr peerMac;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800481} tdlsConnInfo_t;
482
483/**
484 * struct tdlsInfo_t - tdls info
485 *
486 * @vdev_id: vdev id
487 * @tdls_state: tdls state
488 * @notification_interval_ms: notification interval in ms
489 * @tx_discovery_threshold: tx discovery threshold
490 * @tx_teardown_threshold: tx teardown threshold
491 * @rssi_teardown_threshold: rx teardown threshold
492 * @rssi_delta: rssi delta
493 * @tdls_options: tdls options
494 * @peer_traffic_ind_window: peer traffic indication window
495 * @peer_traffic_response_timeout: peer traffic response timeout
496 * @puapsd_mask: puapsd mask
497 * @puapsd_inactivity_time: puapsd inactivity time
498 * @puapsd_rx_frame_threshold: puapsd rx frame threshold
Kabilan Kannanca670be2015-11-23 01:56:12 -0800499 * @teardown_notification_ms: tdls teardown notification interval
Kabilan Kannan421714b2015-11-23 04:44:59 -0800500 * @tdls_peer_kickout_threshold: tdls packets threshold
501 * for peer kickout operation
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800502 */
503typedef struct {
504 uint32_t vdev_id;
505 uint32_t tdls_state;
506 uint32_t notification_interval_ms;
507 uint32_t tx_discovery_threshold;
508 uint32_t tx_teardown_threshold;
509 int32_t rssi_teardown_threshold;
510 int32_t rssi_delta;
511 uint32_t tdls_options;
512 uint32_t peer_traffic_ind_window;
513 uint32_t peer_traffic_response_timeout;
514 uint32_t puapsd_mask;
515 uint32_t puapsd_inactivity_time;
516 uint32_t puapsd_rx_frame_threshold;
Kabilan Kannanca670be2015-11-23 01:56:12 -0800517 uint32_t teardown_notification_ms;
Kabilan Kannan421714b2015-11-23 04:44:59 -0800518 uint32_t tdls_peer_kickout_threshold;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800519} tdlsInfo_t;
520
521int wlan_hdd_tdls_init(hdd_adapter_t *pAdapter);
522
523void wlan_hdd_tdls_exit(hdd_adapter_t *pAdapter);
524
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800525void wlan_hdd_tdls_extract_sa(struct sk_buff *skb, uint8_t *mac);
526
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800527int wlan_hdd_tdls_set_sta_id(hdd_adapter_t *pAdapter, const uint8_t *mac,
528 uint8_t staId);
529
530hddTdlsPeer_t *wlan_hdd_tdls_find_peer(hdd_adapter_t *pAdapter,
Nitesh Shah90a02e92017-02-01 15:28:03 +0530531 const uint8_t *mac);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800532
533hddTdlsPeer_t *wlan_hdd_tdls_find_all_peer(hdd_context_t *pHddCtx,
534 const uint8_t *mac);
535
536int wlan_hdd_tdls_get_link_establish_params(hdd_adapter_t *pAdapter,
537 const uint8_t *mac,
538 tCsrTdlsLinkEstablishParams *
539 tdlsLinkEstablishParams);
540hddTdlsPeer_t *wlan_hdd_tdls_get_peer(hdd_adapter_t *pAdapter,
Nitesh Shah379449e2017-01-31 19:11:29 +0530541 const uint8_t *mac);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800542
543int wlan_hdd_tdls_set_cap(hdd_adapter_t *pAdapter, const uint8_t *mac,
Srinivas Girigowda17d35172017-03-25 15:56:25 -0700544 enum tdls_cap_type cap);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800545
546void wlan_hdd_tdls_set_peer_link_status(hddTdlsPeer_t *curr_peer,
Srinivas Girigowda17d35172017-03-25 15:56:25 -0700547 enum tdls_link_status status,
548 enum tdls_link_reason reason);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800549void wlan_hdd_tdls_set_link_status(hdd_adapter_t *pAdapter,
550 const uint8_t *mac,
Srinivas Girigowda17d35172017-03-25 15:56:25 -0700551 enum tdls_link_status linkStatus,
552 enum tdls_link_reason reason);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800553
554int wlan_hdd_tdls_recv_discovery_resp(hdd_adapter_t *pAdapter,
555 const uint8_t *mac);
556
557int wlan_hdd_tdls_set_peer_caps(hdd_adapter_t *pAdapter,
558 const uint8_t *mac,
559 tCsrStaParams *StaParams,
Nitesh Shah99934ac2016-09-05 15:54:08 +0530560 bool isBufSta, bool isOffChannelSupported,
561 bool is_qos_wmm_sta);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800562
563int wlan_hdd_tdls_set_rssi(hdd_adapter_t *pAdapter, const uint8_t *mac,
564 int8_t rxRssi);
565
566int wlan_hdd_tdls_set_responder(hdd_adapter_t *pAdapter, const uint8_t *mac,
567 uint8_t responder);
568
569int wlan_hdd_tdls_set_signature(hdd_adapter_t *pAdapter, const uint8_t *mac,
570 uint8_t uSignature);
571
572int wlan_hdd_tdls_set_params(struct net_device *dev,
573 tdls_config_params_t *config);
574
575int wlan_hdd_tdls_reset_peer(hdd_adapter_t *pAdapter, const uint8_t *mac);
576
577uint16_t wlan_hdd_tdls_connected_peers(hdd_adapter_t *pAdapter);
578
579int wlan_hdd_tdls_get_all_peers(hdd_adapter_t *pAdapter, char *buf,
580 int buflen);
581
582void wlan_hdd_tdls_connection_callback(hdd_adapter_t *pAdapter);
583
584void wlan_hdd_tdls_disconnection_callback(hdd_adapter_t *pAdapter);
585
586void wlan_hdd_tdls_mgmt_completion_callback(hdd_adapter_t *pAdapter,
587 uint32_t statusCode);
588
Jeff Johnson414e9f32016-10-05 15:46:19 -0700589void wlan_hdd_tdls_increment_peer_count(hdd_adapter_t *pAdapter);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800590
591void wlan_hdd_tdls_decrement_peer_count(hdd_adapter_t *pAdapter);
592
593hddTdlsPeer_t *wlan_hdd_tdls_is_progress(hdd_context_t *pHddCtx,
Nitesh Shah90a02e92017-02-01 15:28:03 +0530594 const uint8_t *mac, uint8_t skip_self);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800595
596int wlan_hdd_tdls_copy_scan_context(hdd_context_t *pHddCtx,
597 struct wiphy *wiphy,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800598 struct cfg80211_scan_request *request);
599
600int wlan_hdd_tdls_scan_callback(hdd_adapter_t *pAdapter, struct wiphy *wiphy,
Nitesh Shah9ed1a9f2017-01-05 18:55:05 +0530601 struct cfg80211_scan_request *request,
602 uint8_t source);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800603
604void wlan_hdd_tdls_scan_done_callback(hdd_adapter_t *pAdapter);
605
606void wlan_hdd_tdls_timer_restart(hdd_adapter_t *pAdapter,
Anurag Chouhan210db072016-02-22 18:42:15 +0530607 qdf_mc_timer_t *timer,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800608 uint32_t expirationTime);
609void wlan_hdd_tdls_indicate_teardown(hdd_adapter_t *pAdapter,
610 hddTdlsPeer_t *curr_peer,
Nitesh Shah8816f572017-01-31 17:56:28 +0530611 uint16_t reason);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800612
Nitesh Shah983e8f52016-11-25 12:36:29 +0530613void wlan_hdd_tdls_implicit_send_discovery_request(tdlsCtx_t *hdd_tdls_ctx);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800614
615int wlan_hdd_tdls_set_extctrl_param(hdd_adapter_t *pAdapter,
616 const uint8_t *mac,
617 uint32_t chan,
618 uint32_t max_latency,
619 uint32_t op_class, uint32_t min_bandwidth);
620int wlan_hdd_tdls_set_force_peer(hdd_adapter_t *pAdapter, const uint8_t *mac,
621 bool forcePeer);
622
Kabilan Kannan421714b2015-11-23 04:44:59 -0800623int wlan_hdd_tdls_update_peer_mac(hdd_adapter_t *adapter,
624 const uint8_t *mac,
625 uint32_t peer_state);
626
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800627int wlan_hdd_tdls_extctrl_deconfig_peer(hdd_adapter_t *pAdapter,
628 const uint8_t *peer);
629int wlan_hdd_tdls_extctrl_config_peer(hdd_adapter_t *pAdapter,
630 const uint8_t *peer,
631 cfg80211_exttdls_callback callback,
632 uint32_t chan,
633 uint32_t max_latency,
634 uint32_t op_class,
635 uint32_t min_bandwidth);
636int wlan_hdd_tdls_get_status(hdd_adapter_t *pAdapter,
Masti, Narayanraddic4a7ab82015-11-25 15:41:10 +0530637 const uint8_t *mac, uint32_t *opclass,
638 uint32_t *channel, uint32_t *state,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800639 int32_t *reason);
640void wlan_hdd_tdls_get_wifi_hal_state(hddTdlsPeer_t *curr_peer,
Masti, Narayanraddic4a7ab82015-11-25 15:41:10 +0530641 uint32_t *state, int32_t *reason);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800642int wlan_hdd_set_callback(hddTdlsPeer_t *curr_peer,
643 cfg80211_exttdls_callback callback);
644void wlan_hdd_update_tdls_info(hdd_adapter_t *adapter, bool tdls_prohibited,
645 bool tdls_chan_swit_prohibited);
646
647int wlan_hdd_tdls_add_station(struct wiphy *wiphy,
648 struct net_device *dev, const uint8_t *mac,
649 bool update, tCsrStaParams *StaParams);
650
651int wlan_hdd_cfg80211_exttdls_enable(struct wiphy *wiphy,
652 struct wireless_dev *wdev,
653 const void *data,
654 int data_len);
655
656int wlan_hdd_cfg80211_exttdls_disable(struct wiphy *wiphy,
657 struct wireless_dev *wdev,
658 const void *data,
659 int data_len);
660
661int wlan_hdd_cfg80211_exttdls_get_status(struct wiphy *wiphy,
662 struct wireless_dev *wdev,
663 const void *data,
664 int data_len);
665
666#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0))
667int wlan_hdd_cfg80211_tdls_oper(struct wiphy *wiphy,
668 struct net_device *dev,
669 const uint8_t *peer,
670 enum nl80211_tdls_operation oper);
671#else
672int wlan_hdd_cfg80211_tdls_oper(struct wiphy *wiphy,
673 struct net_device *dev,
674 uint8_t *peer,
675 enum nl80211_tdls_operation oper);
676#endif
677
678#ifdef TDLS_MGMT_VERSION2
679int wlan_hdd_cfg80211_tdls_mgmt(struct wiphy *wiphy,
680 struct net_device *dev, u8 *peer,
681 u8 action_code, u8 dialog_token,
682 u16 status_code, u32 peer_capability,
683 const u8 *buf, size_t len);
684#else
685#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 17, 0))
686int wlan_hdd_cfg80211_tdls_mgmt(struct wiphy *wiphy,
687 struct net_device *dev, const uint8_t *peer,
688 uint8_t action_code, uint8_t dialog_token,
689 uint16_t status_code, uint32_t peer_capability,
690 bool initiator, const uint8_t *buf,
691 size_t len);
692#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0))
693int wlan_hdd_cfg80211_tdls_mgmt(struct wiphy *wiphy,
694 struct net_device *dev, const uint8_t *peer,
695 uint8_t action_code, uint8_t dialog_token,
696 uint16_t status_code, uint32_t peer_capability,
697 const uint8_t *buf, size_t len);
698#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0))
699int wlan_hdd_cfg80211_tdls_mgmt(struct wiphy *wiphy,
700 struct net_device *dev, uint8_t *peer,
701 uint8_t action_code, uint8_t dialog_token,
702 uint16_t status_code, uint32_t peer_capability,
703 const uint8_t *buf, size_t len);
704#else
705int wlan_hdd_cfg80211_tdls_mgmt(struct wiphy *wiphy,
706 struct net_device *dev, uint8_t *peer,
707 uint8_t action_code, uint8_t dialog_token,
708 uint16_t status_code, const uint8_t *buf,
709 size_t len);
710#endif
711#endif
712
Nitesh Shahe6359752017-02-23 19:57:50 +0530713void hdd_update_tdls_ct_and_teardown_links(hdd_context_t *hdd_ctx);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800714void wlan_hdd_tdls_disable_offchan_and_teardown_links(hdd_context_t *hddctx);
715
716hddTdlsPeer_t *wlan_hdd_tdls_find_first_connected_peer(hdd_adapter_t *adapter);
717int hdd_set_tdls_offchannel(hdd_context_t *hdd_ctx, int offchannel);
718int hdd_set_tdls_secoffchanneloffset(hdd_context_t *hdd_ctx, int offchanoffset);
719int hdd_set_tdls_offchannelmode(hdd_adapter_t *adapter, int offchanmode);
Kabilan Kannan36090ce2016-05-03 19:28:44 -0700720void wlan_hdd_tdls_update_tx_pkt_cnt(hdd_adapter_t *adapter,
721 struct sk_buff *skb);
722void wlan_hdd_tdls_update_rx_pkt_cnt(hdd_adapter_t *adapter,
723 struct sk_buff *skb);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800724int hdd_set_tdls_scan_type(hdd_context_t *hdd_ctx, int val);
Nitesh Shahd1266d72017-01-25 22:07:07 +0530725void hdd_tdls_context_init(hdd_context_t *hdd_ctx, bool ssr);
Prashanth Bhatta527fd752016-04-28 12:35:23 -0700726void hdd_tdls_context_destroy(hdd_context_t *hdd_ctx);
Archana Ramachandrand5d2e922016-04-20 16:57:35 -0700727int wlan_hdd_tdls_antenna_switch(hdd_context_t *hdd_ctx,
Archana Ramachandran2ad7de22016-04-22 16:53:25 -0700728 hdd_adapter_t *adapter,
729 uint32_t mode);
Kabilan Kannan32eb5022016-10-04 12:24:50 -0700730/**
731 * wlan_hdd_tdls_notify_connect() - Update tdls state for every
732 * connect event.
733 * @adapter: hdd adapter
734 * @csr_roam_info: csr information
735 *
736 * After every connect event in the system, check whether TDLS
737 * can be enabled in the system. If TDLS can be enabled, update the
738 * TDLS state as needed.
739 *
740 * Return: None
741 */
742void wlan_hdd_tdls_notify_connect(hdd_adapter_t *adapter,
743 tCsrRoamInfo *csr_roam_info);
Kabilan Kannan163fd0b2016-06-08 15:21:51 -0700744
Kabilan Kannan32eb5022016-10-04 12:24:50 -0700745/**
746 * wlan_hdd_tdls_notify_disconnect() - Update tdls state for every
747 * disconnect event.
748 * @adapter: hdd adapter
Nitesh Shahb9d3dbb2017-01-16 16:37:20 +0530749 * @lfr_roam: roaming case
Kabilan Kannan32eb5022016-10-04 12:24:50 -0700750 *
751 * After every disconnect event in the system, check whether TDLS
752 * can be disabled/enabled in the system and update the
753 * TDLS state as needed.
754 *
755 * Return: None
756 */
Nitesh Shahb9d3dbb2017-01-16 16:37:20 +0530757void wlan_hdd_tdls_notify_disconnect(hdd_adapter_t *adapter, bool lfr_roam);
Nitesh Shah61c10d92016-10-19 19:29:15 +0530758void wlan_hdd_change_tdls_mode(void *hdd_ctx);
Kabilan Kannan6ca98482017-02-14 13:26:15 -0800759
760/**
761 * hdd_tdls_notify_p2p_roc() - Notify p2p roc event to TDLS
762 * @hdd_ctx: ptr to hdd context.
763 * @event: P2P roc event that affect TDLS
764 *
765 * P2P roc events notified to TDLS to avoid overlap between P2P listen
766 * and TDLS operation.
767 * Based on P2P remain on channel event, TDLS mode will be
768 * updated and TDLS source timer started with timer period
769 * equivalent to P2P ROC interval to revert the TDLS mode.
770 *
771 * Return: None
772 */
773void hdd_tdls_notify_p2p_roc(hdd_context_t *hdd_ctx,
774 enum tdls_concerned_external_events event);
Archana Ramachandrand5d2e922016-04-20 16:57:35 -0700775
Kabilan Kannand053aaf2016-10-26 02:06:14 -0700776/**
777 * wlan_hdd_cfg80211_configure_tdls_mode() - configure tdls mode
778 * @wiphy: pointer to wireless wiphy structure.
779 * @wdev: pointer to wireless_dev structure.
780 * @data: Pointer to the data to be passed via vendor interface
781 * @data_len:Length of the data to be passed
782 *
783 * Return: Return the Success or Failure code.
784 */
785int wlan_hdd_cfg80211_configure_tdls_mode(struct wiphy *wiphy,
786 struct wireless_dev *wdev,
787 const void *data,
788 int data_len);
789
Frank Liud4b2fa02017-03-29 11:46:48 +0800790QDF_STATUS hdd_tdls_register_tdls_peer(void *userdata, uint32_t vdev_id,
791 const uint8_t *mac, uint16_t sta_id,
792 uint8_t ucastsig, uint8_t qos);
793
794QDF_STATUS hdd_tdls_deregister_tdl_peer(void *userdata,
795 uint32_t vdev_id, uint8_t sta_id);
796
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800797#else
Nitesh Shahe6359752017-02-23 19:57:50 +0530798static inline void hdd_update_tdls_ct_and_teardown_links(hdd_context_t *hdd_ctx)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800799{
800}
801static inline void
802wlan_hdd_tdls_disable_offchan_and_teardown_links(hdd_context_t *hddctx)
803{
804}
805static inline void wlan_hdd_tdls_exit(hdd_adapter_t *adapter)
806{
807}
Kabilan Kannan36090ce2016-05-03 19:28:44 -0700808static inline void wlan_hdd_tdls_update_tx_pkt_cnt(hdd_adapter_t *adapter,
809 struct sk_buff *skb)
810{
811}
812static inline void wlan_hdd_tdls_update_rx_pkt_cnt(hdd_adapter_t *adapter,
813 struct sk_buff *skb)
814{
815}
Nitesh Shahd1266d72017-01-25 22:07:07 +0530816static inline void hdd_tdls_context_init(hdd_context_t *hdd_ctx, bool ssr) { }
Prashanth Bhatta527fd752016-04-28 12:35:23 -0700817static inline void hdd_tdls_context_destroy(hdd_context_t *hdd_ctx) { }
Archana Ramachandrand5d2e922016-04-20 16:57:35 -0700818
819static inline int wlan_hdd_tdls_antenna_switch(hdd_context_t *hdd_ctx,
Archana Ramachandran2ad7de22016-04-22 16:53:25 -0700820 hdd_adapter_t *adapter,
821 uint32_t mode)
Archana Ramachandrand5d2e922016-04-20 16:57:35 -0700822{
823 return 0;
824}
Kabilan Kannan163fd0b2016-06-08 15:21:51 -0700825static inline void wlan_hdd_update_tdls_info(hdd_adapter_t *adapter,
826 bool tdls_prohibited,
827 bool tdls_chan_swit_prohibited)
828{
829}
Kabilan Kannan32eb5022016-10-04 12:24:50 -0700830static inline void wlan_hdd_tdls_notify_connect(hdd_adapter_t *adapter,
831 tCsrRoamInfo *csr_roam_info)
832{
833}
Nitesh Shahb9d3dbb2017-01-16 16:37:20 +0530834static inline void wlan_hdd_tdls_notify_disconnect(hdd_adapter_t *adapter,
835 bool lfr_roam)
Kabilan Kannan32eb5022016-10-04 12:24:50 -0700836{
837}
Kabilan Kannand053aaf2016-10-26 02:06:14 -0700838
839static inline int wlan_hdd_cfg80211_configure_tdls_mode(struct wiphy *wiphy,
840 struct wireless_dev *wdev,
841 const void *data,
842 int data_len)
843{
844 return 0;
845}
846
Nitesh Shah61c10d92016-10-19 19:29:15 +0530847static inline void wlan_hdd_change_tdls_mode(void *hdd_ctx)
848{
849}
850static inline void
Kabilan Kannan6ca98482017-02-14 13:26:15 -0800851hdd_tdls_notify_p2p_roc(hdd_context_t *hdd_ctx,
852 enum tdls_concerned_external_events event)
Nitesh Shah61c10d92016-10-19 19:29:15 +0530853{
854}
Frank Liud4b2fa02017-03-29 11:46:48 +0800855
856static QDF_STATUS hdd_tdls_register_tdls_peer(void *userdata,
857 uint32_t vdev_id,
858 const uint8_t *mac,
859 uint16_t sta_id,
860 uint8_t ucastsig,
861 uint8_t qos)
862{
863}
864
865static QDF_STATUS hdd_tdls_deregister_tdl_peer(void *userdata,
866 uint32_t vdev_id, uint8_t sta_id)
867
868{
869}
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800870#endif /* End of FEATURE_WLAN_TDLS */
871
Abhishek Singh4ef5fe02016-04-27 12:21:24 +0530872#ifdef FEATURE_WLAN_DIAG_SUPPORT
873void hdd_send_wlan_tdls_teardown_event(uint32_t reason,
874 uint8_t *peer_mac);
Abhishek Singh74bcb0a2016-04-27 12:30:48 +0530875void hdd_wlan_tdls_enable_link_event(const uint8_t *peer_mac,
876 uint8_t is_off_chan_supported,
877 uint8_t is_off_chan_configured,
878 uint8_t is_off_chan_established);
Abhishek Singhaf1d0c92016-04-27 13:46:59 +0530879void hdd_wlan_block_scan_by_tdls_event(void);
Abhishek Singh4ef5fe02016-04-27 12:21:24 +0530880#else
881static inline
882void hdd_send_wlan_tdls_teardown_event(uint32_t reason,
883 uint8_t *peer_mac) {}
Abhishek Singh74bcb0a2016-04-27 12:30:48 +0530884static inline
885void hdd_wlan_tdls_enable_link_event(const uint8_t *peer_mac,
886 uint8_t is_off_chan_supported,
887 uint8_t is_off_chan_configured,
888 uint8_t is_off_chan_established) {}
Abhishek Singhaf1d0c92016-04-27 13:46:59 +0530889static inline void hdd_wlan_block_scan_by_tdls_event(void) {}
Abhishek Singh4ef5fe02016-04-27 12:21:24 +0530890#endif /* FEATURE_WLAN_DIAG_SUPPORT */
Tushnim Bhattacharyya06697712017-03-15 10:22:47 -0700891bool cds_check_is_tdls_allowed(enum tQDF_ADAPTER_MODE device_mode);
892void cds_set_tdls_ct_mode(hdd_context_t *hdd_ctx);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800893#endif /* __HDD_TDLS_H */