blob: 48ac52530dd9c4c0211640bf99a2c78f96668b9a [file] [log] [blame]
Gopichand Nakkalabd9fa2d2013-01-08 13:16:22 -08001/*
2 * Copyright (c) 2012-2013, 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.
20 */
Kiran V1ccee932012-12-12 14:49:46 -080021#ifndef __HDD_TDSL_H
22#define __HDD_TDSL_H
23/**===========================================================================
24
25\file wlan_hdd_tdls.h
26
27\brief Linux HDD TDLS include file
Gopichand Nakkala0c1331e2013-01-07 22:49:07 -080028
Kiran V1ccee932012-12-12 14:49:46 -080029==========================================================================*/
30
Chilam NG571c65a2013-01-19 12:27:36 +053031#define MAX_NUM_TDLS_PEER 3
Kiran V1ccee932012-12-12 14:49:46 -080032
Chilam NG571c65a2013-01-19 12:27:36 +053033#define TDLS_MAX_DISCOVER_ATTEMPT 2
Kiran V1ccee932012-12-12 14:49:46 -080034
Chilam NG571c65a2013-01-19 12:27:36 +053035#define TDLS_DISCOVERY_PERIOD 3600000
Kiran V1ccee932012-12-12 14:49:46 -080036
Chilam NG571c65a2013-01-19 12:27:36 +053037#define TDLS_TX_STATS_PERIOD 3600000
38
39#define TDLS_IMPLICIT_TRIGGER_PKT_THRESHOLD 100
40
41#define TDLS_RX_IDLE_TIMEOUT 5000
42
43#define TDLS_RSSI_TRIGGER_HYSTERESIS 50
44
45typedef struct
46{
47 tANI_U32 tx_period_t;
48 tANI_U32 tx_packet_n;
49 tANI_U32 discovery_period_t;
50 tANI_U32 discovery_tries_n;
51 tANI_U32 rx_timeout_t;
52 tANI_U32 rssi_hysteresis;
53} tdls_config_params_t;
54
55typedef enum {
56 eTDLS_CAP_NOT_SUPPORTED = -1,
57 eTDLS_CAP_UNKNOWN = 0,
58 eTDLS_CAP_SUPPORTED = 1,
59} eTDLSCapType;
60
61typedef enum {
62 eTDLS_LINK_NOT_CONNECTED = 0,
63 eTDLS_LINK_CONNECTED = 1,
64} eTDLSLinkStatus;
65
66typedef struct {
67 tANI_U16 period;
68 tANI_U16 bytes;
69} tdls_tx_tput_config_t;
70
71typedef struct {
72 tANI_U16 period;
73 tANI_U16 tries;
74} tdls_discovery_config_t;
75
76typedef struct {
77 tANI_U16 timeout;
78} tdls_rx_idle_config_t;
79
80typedef struct {
81 tANI_U16 rssi_thres;
82} tdls_rssi_config_t;
83
84
85int wlan_hdd_tdls_init(struct net_device *dev);
86
87void wlan_hdd_tdls_exit(void);
88
89u8 wlan_hdd_tdls_extract_da(struct sk_buff *skb, u8 *mac);
90
91int wlan_hdd_tdls_add_peer_to_list(u8 key, u8 *mac);
92
93int wlan_hdd_saveTdlsPeer(tCsrRoamInfo *pRoamInfo);
94
95int wlan_hdd_findTdlsPeer(tSirMacAddr peerMac);
96
97int wlan_hdd_tdls_set_link_status(u8 *mac, int status);
98
99int wlan_hdd_tdls_set_cap(u8 *mac, int cap);
100
101int wlan_hdd_tdls_set_rssi(u8 *mac, tANI_S8 rxRssi);
102
103int wlan_hdd_tdls_set_params(tdls_config_params_t *config);
104
105void wlan_hdd_removeTdlsPeer(tCsrRoamInfo *pRoamInfo);
Kiran V1ccee932012-12-12 14:49:46 -0800106#endif // __HDD_TDSL_H