Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1 | /* |
Gopichand Nakkala | 92f07d8 | 2013-01-08 21:16:34 -0800 | [diff] [blame] | 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 | */ |
| 21 | /* |
Jeff Johnson | 32d95a3 | 2012-09-10 13:15:23 -0700 | [diff] [blame] | 22 | * Copyright (c) 2012, The Linux Foundation. All rights reserved. |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 23 | * |
| 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 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 60 | |
| 61 | //value for initial part of frames and number of bytes to be compared |
| 62 | #define GAS_INITIAL_REQ "\x04\x0a" |
| 63 | #define GAS_INITIAL_REQ_SIZE 2 |
| 64 | |
| 65 | #define GAS_INITIAL_RSP "\x04\x0b" |
| 66 | #define GAS_INITIAL_RSP_SIZE 2 |
| 67 | |
| 68 | #define GAS_COMEBACK_REQ "\x04\x0c" |
| 69 | #define GAS_COMEBACK_REQ_SIZE 2 |
| 70 | |
| 71 | #define GAS_COMEBACK_RSP "\x04\x0d" |
| 72 | #define GAS_COMEBACK_RSP_SIZE 2 |
| 73 | |
| 74 | #define P2P_PUBLIC_ACTION_FRAME "\x04\x09\x50\x6f\x9a\x09" |
| 75 | #define P2P_PUBLIC_ACTION_FRAME_SIZE 6 |
| 76 | |
| 77 | #define P2P_ACTION_FRAME "\x7f\x50\x6f\x9a\x09" |
| 78 | #define P2P_ACTION_FRAME_SIZE 5 |
| 79 | |
Chet Lanctot | 186b573 | 2013-03-18 10:26:30 -0700 | [diff] [blame] | 80 | #define SA_QUERY_FRAME_REQ "\x08\x00" |
| 81 | #define SA_QUERY_FRAME_REQ_SIZE 2 |
| 82 | |
| 83 | #define SA_QUERY_FRAME_RSP "\x08\x01" |
| 84 | #define SA_QUERY_FRAME_RSP_SIZE 2 |
| 85 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 86 | #define HDD_P2P_WILDCARD_SSID "DIRECT-" //TODO Put it in proper place; |
| 87 | #define HDD_P2P_WILDCARD_SSID_LEN 7 |
| 88 | |
Gopichand Nakkala | e3d56e7 | 2013-04-21 23:33:32 +0530 | [diff] [blame] | 89 | #define WNM_BSS_ACTION_FRAME "\x0a\x07" |
| 90 | #define WNM_BSS_ACTION_FRAME_SIZE 2 |
| 91 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 92 | #define WPA_OUI_TYPE "\x00\x50\xf2\x01" |
| 93 | #define BLACKLIST_OUI_TYPE "\x00\x50\x00\x00" |
| 94 | #define WHITELIST_OUI_TYPE "\x00\x50\x00\x01" |
| 95 | #define WPA_OUI_TYPE_SIZE 4 |
| 96 | |
| 97 | #define WLAN_BSS_MEMBERSHIP_SELECTOR_HT_PHY 127 |
| 98 | #define BASIC_RATE_MASK 0x80 |
| 99 | #define RATE_MASK 0x7f |
| 100 | |
Madan Mohan Koyyalamudi | 86f629e | 2012-11-09 16:27:29 -0800 | [diff] [blame] | 101 | #ifdef WLAN_ENABLE_AGEIE_ON_SCAN_RESULTS |
| 102 | /* GPS application requirement */ |
| 103 | #define QCOM_VENDOR_IE_ID 221 |
| 104 | #define QCOM_OUI1 0x00 |
| 105 | #define QCOM_OUI2 0xA0 |
| 106 | #define QCOM_OUI3 0xC6 |
| 107 | #define QCOM_VENDOR_IE_AGE_TYPE 0x100 |
Gopichand Nakkala | edbd89b | 2013-05-03 13:46:45 +0530 | [diff] [blame] | 108 | #define QCOM_VENDOR_IE_AGE_LEN 11 |
Madan Mohan Koyyalamudi | 86f629e | 2012-11-09 16:27:29 -0800 | [diff] [blame] | 109 | |
Gopichand Nakkala | b977a97 | 2013-02-18 19:15:09 -0800 | [diff] [blame] | 110 | #ifdef FEATURE_WLAN_TDLS |
| 111 | #define WLAN_IS_TDLS_SETUP_ACTION(action) \ |
| 112 | ((SIR_MAC_TDLS_SETUP_REQ <= action) && (SIR_MAC_TDLS_SETUP_CNF >= action)) |
| 113 | #endif |
| 114 | |
Madan Mohan Koyyalamudi | 86f629e | 2012-11-09 16:27:29 -0800 | [diff] [blame] | 115 | typedef struct { |
| 116 | u8 element_id; |
| 117 | u8 len; |
| 118 | u8 oui_1; |
| 119 | u8 oui_2; |
| 120 | u8 oui_3; |
| 121 | u32 type; |
| 122 | u32 age; |
| 123 | }__attribute__((packed)) qcom_ie_age ; |
| 124 | #endif |
| 125 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 126 | struct cfg80211_bss* wlan_hdd_cfg80211_update_bss_db( hdd_adapter_t *pAdapter, |
| 127 | tCsrRoamInfo *pRoamInfo |
| 128 | ); |
Jeff Johnson | 04dd8a8 | 2012-06-29 20:41:40 -0700 | [diff] [blame] | 129 | |
| 130 | #ifdef FEATURE_WLAN_LFR |
| 131 | int wlan_hdd_cfg80211_pmksa_candidate_notify( |
| 132 | hdd_adapter_t *pAdapter, tCsrRoamInfo *pRoamInfo, |
| 133 | int index, bool preauth ); |
| 134 | #endif |
| 135 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 136 | #ifdef FEATURE_WLAN_WAPI |
| 137 | void wlan_hdd_cfg80211_set_key_wapi(hdd_adapter_t* pAdapter, |
| 138 | u8 key_index, const u8 *mac_addr, u8 *key , int key_Len); |
| 139 | #endif |
Madan Mohan Koyyalamudi | 7127826 | 2013-04-12 22:00:48 +0530 | [diff] [blame] | 140 | struct wiphy *wlan_hdd_cfg80211_wiphy_alloc(int priv_size); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 141 | |
Hoonki Lee | 93e67ff | 2013-03-19 15:49:25 -0700 | [diff] [blame] | 142 | int wlan_hdd_cfg80211_scan( struct wiphy *wiphy, |
| 143 | #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,6,0)) |
| 144 | struct net_device *dev, |
| 145 | #endif |
| 146 | struct cfg80211_scan_request *request); |
| 147 | |
Madan Mohan Koyyalamudi | 7127826 | 2013-04-12 22:00:48 +0530 | [diff] [blame] | 148 | int wlan_hdd_cfg80211_init(struct device *dev, |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 149 | struct wiphy *wiphy, |
| 150 | hdd_config_t *pCfg |
| 151 | ); |
| 152 | |
Madan Mohan Koyyalamudi | 7127826 | 2013-04-12 22:00:48 +0530 | [diff] [blame] | 153 | int wlan_hdd_cfg80211_register( struct wiphy *wiphy); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 154 | void wlan_hdd_cfg80211_post_voss_start(hdd_adapter_t* pAdapter); |
| 155 | |
| 156 | void wlan_hdd_cfg80211_pre_voss_stop(hdd_adapter_t* pAdapter); |
| 157 | |
Amar Singhal | fddc28c | 2013-09-05 13:03:40 -0700 | [diff] [blame] | 158 | #ifdef CONFIG_ENABLE_LINUX_REG |
Yue Ma | f49ba87 | 2013-08-19 12:04:25 -0700 | [diff] [blame] | 159 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0)) |
Amar Singhal | fddc28c | 2013-09-05 13:03:40 -0700 | [diff] [blame] | 160 | void wlan_hdd_linux_reg_notifier(struct wiphy *wiphy, struct regulatory_request *request); |
Yue Ma | f49ba87 | 2013-08-19 12:04:25 -0700 | [diff] [blame] | 161 | #else |
Amar Singhal | fddc28c | 2013-09-05 13:03:40 -0700 | [diff] [blame] | 162 | int wlan_hdd_linux_reg_notifier(struct wiphy *wiphy, struct regulatory_request *request); |
Yue Ma | f49ba87 | 2013-08-19 12:04:25 -0700 | [diff] [blame] | 163 | #endif |
Amar Singhal | fddc28c | 2013-09-05 13:03:40 -0700 | [diff] [blame] | 164 | #endif |
| 165 | |
Madan Mohan Koyyalamudi | d5acbf5 | 2012-11-28 01:45:08 +0530 | [diff] [blame] | 166 | extern v_VOID_t hdd_connSetConnectionState( hdd_station_ctx_t *pHddStaCtx, |
| 167 | eConnectionState connState ); |
Varun Reddy Yeturu | 920df21 | 2013-05-22 08:07:23 -0700 | [diff] [blame] | 168 | VOS_STATUS wlan_hdd_validate_operation_channel(hdd_adapter_t *pAdapter,int channel); |
Chilam NG | 571c65a | 2013-01-19 12:27:36 +0530 | [diff] [blame] | 169 | #ifdef FEATURE_WLAN_TDLS |
| 170 | int wlan_hdd_cfg80211_send_tdls_discover_req(struct wiphy *wiphy, |
| 171 | struct net_device *dev, u8 *peer); |
| 172 | #endif |
Gopichand Nakkala | 870cbae | 2013-03-15 21:16:09 +0530 | [diff] [blame] | 173 | #ifdef WLAN_FEATURE_GTK_OFFLOAD |
| 174 | extern void wlan_hdd_cfg80211_update_replayCounterCallback(void *callbackContext, |
| 175 | tpSirGtkOffloadGetInfoRspParams pGtkOffloadGetInfoRsp); |
| 176 | #endif |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 177 | |
Shailender Karmuchi | 15cd067 | 2013-05-15 19:50:04 -0700 | [diff] [blame] | 178 | void hdd_select_cbmode( hdd_adapter_t *pAdapter,v_U8_t operationChannel); |
| 179 | |
| 180 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 181 | #endif |