Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1 | /* |
Jeff Johnson | 32d95a3 | 2012-09-10 13:15:23 -0700 | [diff] [blame] | 2 | * Copyright (c) 2012, The Linux Foundation. All rights reserved. |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 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 | |
| 22 | #if !defined( HDD_CFG80211_H__ ) |
| 23 | #define HDD_CFG80211_H__ |
| 24 | |
| 25 | |
| 26 | /**=========================================================================== |
| 27 | |
| 28 | \file wlan_hdd_cfg80211.h |
| 29 | |
| 30 | \brief cfg80211 functions declarations |
| 31 | |
| 32 | Copyright 2008 (c) Qualcomm, Incorporated. |
| 33 | All Rights Reserved. |
| 34 | Qualcomm Confidential and Proprietary. |
| 35 | |
| 36 | ==========================================================================*/ |
| 37 | |
| 38 | /* $HEADER$ */ |
| 39 | |
| 40 | #ifdef CONFIG_CFG80211 |
| 41 | |
| 42 | //value for initial part of frames and number of bytes to be compared |
| 43 | #define GAS_INITIAL_REQ "\x04\x0a" |
| 44 | #define GAS_INITIAL_REQ_SIZE 2 |
| 45 | |
| 46 | #define GAS_INITIAL_RSP "\x04\x0b" |
| 47 | #define GAS_INITIAL_RSP_SIZE 2 |
| 48 | |
| 49 | #define GAS_COMEBACK_REQ "\x04\x0c" |
| 50 | #define GAS_COMEBACK_REQ_SIZE 2 |
| 51 | |
| 52 | #define GAS_COMEBACK_RSP "\x04\x0d" |
| 53 | #define GAS_COMEBACK_RSP_SIZE 2 |
| 54 | |
| 55 | #define P2P_PUBLIC_ACTION_FRAME "\x04\x09\x50\x6f\x9a\x09" |
| 56 | #define P2P_PUBLIC_ACTION_FRAME_SIZE 6 |
| 57 | |
| 58 | #define P2P_ACTION_FRAME "\x7f\x50\x6f\x9a\x09" |
| 59 | #define P2P_ACTION_FRAME_SIZE 5 |
| 60 | |
| 61 | #define HDD_P2P_WILDCARD_SSID "DIRECT-" //TODO Put it in proper place; |
| 62 | #define HDD_P2P_WILDCARD_SSID_LEN 7 |
| 63 | |
| 64 | #define WPA_OUI_TYPE "\x00\x50\xf2\x01" |
| 65 | #define BLACKLIST_OUI_TYPE "\x00\x50\x00\x00" |
| 66 | #define WHITELIST_OUI_TYPE "\x00\x50\x00\x01" |
| 67 | #define WPA_OUI_TYPE_SIZE 4 |
| 68 | |
| 69 | #define WLAN_BSS_MEMBERSHIP_SELECTOR_HT_PHY 127 |
| 70 | #define BASIC_RATE_MASK 0x80 |
| 71 | #define RATE_MASK 0x7f |
| 72 | |
Madan Mohan Koyyalamudi | 86f629e | 2012-11-09 16:27:29 -0800 | [diff] [blame] | 73 | #ifdef WLAN_ENABLE_AGEIE_ON_SCAN_RESULTS |
| 74 | /* GPS application requirement */ |
| 75 | #define QCOM_VENDOR_IE_ID 221 |
| 76 | #define QCOM_OUI1 0x00 |
| 77 | #define QCOM_OUI2 0xA0 |
| 78 | #define QCOM_OUI3 0xC6 |
| 79 | #define QCOM_VENDOR_IE_AGE_TYPE 0x100 |
| 80 | #define QCOM_VENDOR_IE_AGE_LEN 4 |
| 81 | |
| 82 | typedef struct { |
| 83 | u8 element_id; |
| 84 | u8 len; |
| 85 | u8 oui_1; |
| 86 | u8 oui_2; |
| 87 | u8 oui_3; |
| 88 | u32 type; |
| 89 | u32 age; |
| 90 | }__attribute__((packed)) qcom_ie_age ; |
| 91 | #endif |
| 92 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 93 | struct cfg80211_bss* wlan_hdd_cfg80211_update_bss_db( hdd_adapter_t *pAdapter, |
| 94 | tCsrRoamInfo *pRoamInfo |
| 95 | ); |
Jeff Johnson | 04dd8a8 | 2012-06-29 20:41:40 -0700 | [diff] [blame] | 96 | |
| 97 | #ifdef FEATURE_WLAN_LFR |
| 98 | int wlan_hdd_cfg80211_pmksa_candidate_notify( |
| 99 | hdd_adapter_t *pAdapter, tCsrRoamInfo *pRoamInfo, |
| 100 | int index, bool preauth ); |
| 101 | #endif |
| 102 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 103 | #ifdef FEATURE_WLAN_WAPI |
| 104 | void wlan_hdd_cfg80211_set_key_wapi(hdd_adapter_t* pAdapter, |
| 105 | u8 key_index, const u8 *mac_addr, u8 *key , int key_Len); |
| 106 | #endif |
| 107 | struct wiphy *wlan_hdd_cfg80211_init(int priv_size); |
| 108 | |
| 109 | int wlan_hdd_cfg80211_register(struct device *dev, |
| 110 | struct wiphy *wiphy, |
| 111 | hdd_config_t *pCfg |
| 112 | ); |
| 113 | |
| 114 | void wlan_hdd_cfg80211_post_voss_start(hdd_adapter_t* pAdapter); |
| 115 | |
| 116 | void wlan_hdd_cfg80211_pre_voss_stop(hdd_adapter_t* pAdapter); |
| 117 | |
Madan Mohan Koyyalamudi | c3a240c | 2012-09-28 15:34:08 -0700 | [diff] [blame] | 118 | int wlan_hdd_crda_reg_notifier(struct wiphy *wiphy, struct regulatory_request *request); |
| 119 | int wlan_hdd_get_crda_regd_entry(struct wiphy *wiphy, hdd_config_t *pCfg); |
Madan Mohan Koyyalamudi | d5acbf5 | 2012-11-28 01:45:08 +0530 | [diff] [blame] | 120 | extern v_VOID_t hdd_connSetConnectionState( hdd_station_ctx_t *pHddStaCtx, |
| 121 | eConnectionState connState ); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 122 | |
| 123 | #endif // CONFIG_CFG80211 |
| 124 | |
| 125 | #endif |