Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1 | /* |
Kiet Lam | 842dad0 | 2014-02-18 18:44:02 -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 | |
| 22 | /* |
Kiet Lam | a7f454d | 2014-07-24 12:04:06 -0700 | [diff] [blame] | 23 | * This file was originally distributed by Qualcomm Atheros, Inc. |
| 24 | * under proprietary terms before Copyright ownership was assigned |
| 25 | * to the Linux Foundation. |
Gopichand Nakkala | 92f07d8 | 2013-01-08 21:16:34 -0800 | [diff] [blame] | 26 | */ |
Kiet Lam | 842dad0 | 2014-02-18 18:44:02 -0800 | [diff] [blame] | 27 | |
| 28 | |
Kiet Lam | a7f454d | 2014-07-24 12:04:06 -0700 | [diff] [blame] | 29 | |
| 30 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 31 | #if !defined( HDD_CONNECTION_H__ ) |
Gopichand Nakkala | 66923aa | 2013-03-06 23:17:24 +0530 | [diff] [blame] | 32 | #define HDD_CONNECTION_H__ |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 33 | #include <wlan_hdd_mib.h> |
Ravi Joshi | aa81ca2 | 2013-06-25 17:20:52 -0700 | [diff] [blame] | 34 | #define HDD_MAX_NUM_IBSS_STA ( 32 ) |
Mohit Khanna | 698ba2a | 2012-12-04 15:08:18 -0800 | [diff] [blame] | 35 | #ifdef FEATURE_WLAN_TDLS |
Madan Mohan Koyyalamudi | 7d5eed3 | 2013-08-05 13:13:14 +0530 | [diff] [blame] | 36 | #define HDD_MAX_NUM_TDLS_STA ( 8 ) |
Gopichand Nakkala | 2f4a282 | 2013-04-17 11:22:01 -0700 | [diff] [blame] | 37 | #define TDLS_STA_INDEX_VALID(staId) \ |
Masti, Narayanraddi | 975a927 | 2015-05-19 11:11:43 +0530 | [diff] [blame] | 38 | (((staId) >= 3) && ((staId) < 0xFF)) |
Mohit Khanna | 698ba2a | 2012-12-04 15:08:18 -0800 | [diff] [blame] | 39 | #endif |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 40 | #define TKIP_COUNTER_MEASURE_STARTED 1 |
| 41 | #define TKIP_COUNTER_MEASURE_STOPED 0 |
| 42 | /* Timeout (in ms) for Link to Up before Registering Station */ |
| 43 | #define ASSOC_LINKUP_TIMEOUT 60 |
Ravi Joshi | fe5e116 | 2013-06-17 18:24:34 -0700 | [diff] [blame] | 44 | #define IBSS_BROADCAST_STAID 0 |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 45 | typedef enum |
| 46 | { |
| 47 | /** Not associated in Infra or participating in an IBSS / Ad-hoc network.*/ |
| 48 | eConnectionState_NotConnected, |
Madan Mohan Koyyalamudi | fd4e1da | 2012-11-09 17:50:19 -0800 | [diff] [blame] | 49 | |
| 50 | /** While connection in progress */ |
| 51 | eConnectionState_Connecting, |
| 52 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 53 | /** Associated in an Infrastructure network.*/ |
| 54 | eConnectionState_Associated, |
| 55 | |
| 56 | /** Participating in an IBSS network though disconnected (no partner stations |
| 57 | in the IBSS).*/ |
| 58 | eConnectionState_IbssDisconnected, |
| 59 | |
| 60 | /** Participating in an IBSS network with partner stations also present*/ |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 61 | eConnectionState_IbssConnected, |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 62 | |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 63 | /** Disconnecting in an Infrastructure network.*/ |
| 64 | eConnectionState_Disconnecting |
Madan Mohan Koyyalamudi | 1bed598 | 2012-10-22 14:38:06 -0700 | [diff] [blame] | 65 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 66 | }eConnectionState; |
| 67 | /**This structure stores the connection information */ |
| 68 | typedef struct connection_info_s |
| 69 | { |
| 70 | /** connection state of the NIC.*/ |
| 71 | eConnectionState connState; |
| 72 | |
| 73 | /** BSS type of the current connection. Comes from the MIB at the |
| 74 | time the connect request is issued in combination with the BssDescription |
| 75 | from the associated entity.*/ |
| 76 | |
| 77 | eMib_dot11DesiredBssType connDot11DesiredBssType; |
| 78 | /** BSSID */ |
| 79 | tCsrBssid bssId; |
| 80 | |
| 81 | /** SSID Info*/ |
| 82 | tCsrSSIDInfo SSID; |
| 83 | |
| 84 | /** Station ID */ |
| 85 | v_U8_t staId[ HDD_MAX_NUM_IBSS_STA ]; |
| 86 | /** Peer Mac Address of the IBSS Stations */ |
| 87 | v_MACADDR_t peerMacAddress[ HDD_MAX_NUM_IBSS_STA ]; |
| 88 | /** Auth Type */ |
| 89 | eCsrAuthType authType; |
| 90 | |
| 91 | /** Unicast Encryption Type */ |
| 92 | eCsrEncryptionType ucEncryptionType; |
| 93 | |
| 94 | /** Multicast Encryption Type */ |
| 95 | eCsrEncryptionType mcEncryptionType; |
| 96 | |
| 97 | /** Keys */ |
| 98 | tCsrKeys Keys; |
| 99 | |
| 100 | /** Operation Channel */ |
| 101 | v_U8_t operationChannel; |
| 102 | |
| 103 | /** Remembers authenticated state */ |
| 104 | v_U8_t uIsAuthenticated; |
Gopichand Nakkala | dacbcb5 | 2013-04-18 16:41:54 +0530 | [diff] [blame] | 105 | |
| 106 | /** Dot11Mode */ |
| 107 | tANI_U32 dot11Mode; |
Deepthi Gowri | ae6a166 | 2015-10-12 12:59:37 +0530 | [diff] [blame] | 108 | |
| 109 | uint32_t rate_flags; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 110 | |
| 111 | }connection_info_t; |
| 112 | /*Forward declaration of Adapter*/ |
| 113 | typedef struct hdd_adapter_s hdd_adapter_t; |
| 114 | typedef struct hdd_context_s hdd_context_t; |
| 115 | typedef struct hdd_station_ctx hdd_station_ctx_t; |
| 116 | typedef struct hdd_ap_ctx_s hdd_ap_ctx_t; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 117 | typedef struct hdd_mon_ctx_s hdd_mon_ctx_t; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 118 | |
| 119 | |
| 120 | extern v_BOOL_t hdd_connIsConnected( hdd_station_ctx_t *pHddStaCtx ); |
Agarwal Ashish | 450ffde | 2014-04-08 19:53:00 +0530 | [diff] [blame] | 121 | eCsrBand hdd_connGetConnectedBand( hdd_station_ctx_t *pHddStaCtx ); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 122 | extern eHalStatus hdd_smeRoamCallback( void *pContext, tCsrRoamInfo *pRoamInfo, v_U32_t roamId, |
| 123 | eRoamCmdStatus roamStatus, eCsrRoamResult roamResult ); |
| 124 | |
| 125 | extern v_VOID_t hdd_connSaveConnectInfo( hdd_adapter_t *pAdapter, tCsrRoamInfo *pRoamInfo, eCsrRoamBssType eBssType ); |
| 126 | |
Jeff Johnson | 51019dc | 2013-02-21 16:44:09 -0800 | [diff] [blame] | 127 | v_BOOL_t hdd_connGetConnectedBssType( hdd_station_ctx_t *pHddCtx, |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 128 | eMib_dot11DesiredBssType *pConnectedBssType ); |
| 129 | |
| 130 | int hdd_SetGENIEToCsr( hdd_adapter_t *pAdapter, eCsrAuthType *RSNAuthType ); |
| 131 | |
| 132 | int hdd_set_csr_auth_type( hdd_adapter_t *pAdapter, eCsrAuthType RSNAuthType ); |
Hoonki Lee | 11f7dda | 2013-02-14 16:55:44 -0800 | [diff] [blame] | 133 | VOS_STATUS hdd_roamRegisterTDLSSTA( hdd_adapter_t *pAdapter, |
Anand N Sunkad | 9bfc262 | 2015-07-30 15:18:54 +0530 | [diff] [blame] | 134 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0)) |
| 135 | const tANI_U8 *peerMac, |
| 136 | #else |
| 137 | tANI_U8 *peerMac, |
| 138 | #endif |
| 139 | tANI_U16 staId, tANI_U8 ucastSig); |
Gopichand Nakkala | 3d29592 | 2013-05-07 16:19:14 +0530 | [diff] [blame] | 140 | void hdd_PerformRoamSetKeyComplete(hdd_adapter_t *pAdapter); |
Masti, Narayanraddi | 1fb32a9 | 2015-06-29 13:14:06 +0530 | [diff] [blame] | 141 | VOS_STATUS hdd_roamDeregisterTDLSSTA(hdd_adapter_t *pAdapter, tANI_U8 staId); |
Srinivas Girigowda | 0c6d7fe | 2014-05-28 18:18:10 -0700 | [diff] [blame] | 142 | |
| 143 | #if defined(FEATURE_WLAN_ESE) && defined(FEATURE_WLAN_ESE_UPLOAD) |
| 144 | void hdd_indicateEseBcnReportNoResults(const hdd_adapter_t *pAdapter, |
| 145 | const tANI_U16 measurementToken, |
| 146 | const tANI_BOOLEAN flag, |
| 147 | const tANI_U8 numBss); |
| 148 | #endif /* FEATURE_WLAN_ESE && FEATURE_WLAN_ESE_UPLOAD */ |
| 149 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 150 | #endif |