blob: c0cefb64b0589d7c11bbcc60c8e2672a36a1012b [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Gopichand Nakkala92f07d82013-01-08 21:16:34 -08002 * 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 */
21/*
Jeff Johnson32d95a32012-09-10 13:15:23 -070022 * Copyright (c) 2012, The Linux Foundation. All rights reserved.
Jeff Johnson295189b2012-06-20 16:38:30 -070023 *
24 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
25 *
26 *
27 * Permission to use, copy, modify, and/or distribute this software for
28 * any purpose with or without fee is hereby granted, provided that the
29 * above copyright notice and this permission notice appear in all
30 * copies.
31 *
32 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
33 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
34 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
35 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
36 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
37 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
38 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
39 * PERFORMANCE OF THIS SOFTWARE.
40 */
41
42#if !defined( HDD_CFG80211_H__ )
43#define HDD_CFG80211_H__
44
45
46/**===========================================================================
47
48 \file wlan_hdd_cfg80211.h
49
50 \brief cfg80211 functions declarations
51
52 Copyright 2008 (c) Qualcomm, Incorporated.
53 All Rights Reserved.
54 Qualcomm Confidential and Proprietary.
55
56 ==========================================================================*/
57
58/* $HEADER$ */
59
60#ifdef CONFIG_CFG80211
61
62//value for initial part of frames and number of bytes to be compared
63#define GAS_INITIAL_REQ "\x04\x0a"
64#define GAS_INITIAL_REQ_SIZE 2
65
66#define GAS_INITIAL_RSP "\x04\x0b"
67#define GAS_INITIAL_RSP_SIZE 2
68
69#define GAS_COMEBACK_REQ "\x04\x0c"
70#define GAS_COMEBACK_REQ_SIZE 2
71
72#define GAS_COMEBACK_RSP "\x04\x0d"
73#define GAS_COMEBACK_RSP_SIZE 2
74
75#define P2P_PUBLIC_ACTION_FRAME "\x04\x09\x50\x6f\x9a\x09"
76#define P2P_PUBLIC_ACTION_FRAME_SIZE 6
77
78#define P2P_ACTION_FRAME "\x7f\x50\x6f\x9a\x09"
79#define P2P_ACTION_FRAME_SIZE 5
80
81#define HDD_P2P_WILDCARD_SSID "DIRECT-" //TODO Put it in proper place;
82#define HDD_P2P_WILDCARD_SSID_LEN 7
83
84#define WPA_OUI_TYPE "\x00\x50\xf2\x01"
85#define BLACKLIST_OUI_TYPE "\x00\x50\x00\x00"
86#define WHITELIST_OUI_TYPE "\x00\x50\x00\x01"
87#define WPA_OUI_TYPE_SIZE 4
88
89#define WLAN_BSS_MEMBERSHIP_SELECTOR_HT_PHY 127
90#define BASIC_RATE_MASK 0x80
91#define RATE_MASK 0x7f
92
Madan Mohan Koyyalamudi86f629e2012-11-09 16:27:29 -080093#ifdef WLAN_ENABLE_AGEIE_ON_SCAN_RESULTS
94/* GPS application requirement */
95#define QCOM_VENDOR_IE_ID 221
96#define QCOM_OUI1 0x00
97#define QCOM_OUI2 0xA0
98#define QCOM_OUI3 0xC6
99#define QCOM_VENDOR_IE_AGE_TYPE 0x100
100#define QCOM_VENDOR_IE_AGE_LEN 4
101
102typedef struct {
103 u8 element_id;
104 u8 len;
105 u8 oui_1;
106 u8 oui_2;
107 u8 oui_3;
108 u32 type;
109 u32 age;
110}__attribute__((packed)) qcom_ie_age ;
111#endif
112
Jeff Johnson295189b2012-06-20 16:38:30 -0700113struct cfg80211_bss* wlan_hdd_cfg80211_update_bss_db( hdd_adapter_t *pAdapter,
114 tCsrRoamInfo *pRoamInfo
115 );
Jeff Johnson04dd8a82012-06-29 20:41:40 -0700116
117#ifdef FEATURE_WLAN_LFR
118int wlan_hdd_cfg80211_pmksa_candidate_notify(
119 hdd_adapter_t *pAdapter, tCsrRoamInfo *pRoamInfo,
120 int index, bool preauth );
121#endif
122
Jeff Johnson295189b2012-06-20 16:38:30 -0700123#ifdef FEATURE_WLAN_WAPI
124void wlan_hdd_cfg80211_set_key_wapi(hdd_adapter_t* pAdapter,
125 u8 key_index, const u8 *mac_addr, u8 *key , int key_Len);
126#endif
127struct wiphy *wlan_hdd_cfg80211_init(int priv_size);
128
129int wlan_hdd_cfg80211_register(struct device *dev,
130 struct wiphy *wiphy,
131 hdd_config_t *pCfg
132 );
133
134void wlan_hdd_cfg80211_post_voss_start(hdd_adapter_t* pAdapter);
135
136void wlan_hdd_cfg80211_pre_voss_stop(hdd_adapter_t* pAdapter);
137
Madan Mohan Koyyalamudic3a240c2012-09-28 15:34:08 -0700138int wlan_hdd_crda_reg_notifier(struct wiphy *wiphy, struct regulatory_request *request);
139int wlan_hdd_get_crda_regd_entry(struct wiphy *wiphy, hdd_config_t *pCfg);
Madan Mohan Koyyalamudid5acbf52012-11-28 01:45:08 +0530140extern v_VOID_t hdd_connSetConnectionState( hdd_station_ctx_t *pHddStaCtx,
141 eConnectionState connState );
Chilam NG571c65a2013-01-19 12:27:36 +0530142#ifdef FEATURE_WLAN_TDLS
143int wlan_hdd_cfg80211_send_tdls_discover_req(struct wiphy *wiphy,
144 struct net_device *dev, u8 *peer);
145#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700146
147#endif // CONFIG_CFG80211
148
149#endif