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_CONNECTION_H__ ) |
Gopichand Nakkala | 66923aa | 2013-03-06 23:17:24 +0530 | [diff] [blame^] | 43 | #define HDD_CONNECTION_H__ |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 44 | #include <wlan_hdd_mib.h> |
Gopichand Nakkala | c984e03 | 2013-02-27 22:24:12 -0800 | [diff] [blame] | 45 | #define HDD_MAX_NUM_IBSS_STA ( 9 ) |
Mohit Khanna | 698ba2a | 2012-12-04 15:08:18 -0800 | [diff] [blame] | 46 | #ifdef FEATURE_WLAN_TDLS |
Gopichand Nakkala | b977a97 | 2013-02-18 19:15:09 -0800 | [diff] [blame] | 47 | #define HDD_MAX_NUM_TDLS_STA ( HDD_MAX_NUM_IBSS_STA - 1 ) // up to 3 as 1 is assigned to AP |
Mohit Khanna | 698ba2a | 2012-12-04 15:08:18 -0800 | [diff] [blame] | 48 | #endif |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 49 | #define TKIP_COUNTER_MEASURE_STARTED 1 |
| 50 | #define TKIP_COUNTER_MEASURE_STOPED 0 |
| 51 | /* Timeout (in ms) for Link to Up before Registering Station */ |
| 52 | #define ASSOC_LINKUP_TIMEOUT 60 |
| 53 | typedef enum |
| 54 | { |
| 55 | /** Not associated in Infra or participating in an IBSS / Ad-hoc network.*/ |
| 56 | eConnectionState_NotConnected, |
Madan Mohan Koyyalamudi | fd4e1da | 2012-11-09 17:50:19 -0800 | [diff] [blame] | 57 | |
| 58 | /** While connection in progress */ |
| 59 | eConnectionState_Connecting, |
| 60 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 61 | /** Associated in an Infrastructure network.*/ |
| 62 | eConnectionState_Associated, |
| 63 | |
| 64 | /** Participating in an IBSS network though disconnected (no partner stations |
| 65 | in the IBSS).*/ |
| 66 | eConnectionState_IbssDisconnected, |
| 67 | |
| 68 | /** Participating in an IBSS network with partner stations also present*/ |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 69 | eConnectionState_IbssConnected, |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 70 | |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 71 | /** Disconnecting in an Infrastructure network.*/ |
| 72 | eConnectionState_Disconnecting |
Madan Mohan Koyyalamudi | 1bed598 | 2012-10-22 14:38:06 -0700 | [diff] [blame] | 73 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 74 | }eConnectionState; |
| 75 | /**This structure stores the connection information */ |
| 76 | typedef struct connection_info_s |
| 77 | { |
| 78 | /** connection state of the NIC.*/ |
| 79 | eConnectionState connState; |
| 80 | |
| 81 | /** BSS type of the current connection. Comes from the MIB at the |
| 82 | time the connect request is issued in combination with the BssDescription |
| 83 | from the associated entity.*/ |
| 84 | |
| 85 | eMib_dot11DesiredBssType connDot11DesiredBssType; |
| 86 | /** BSSID */ |
| 87 | tCsrBssid bssId; |
| 88 | |
| 89 | /** SSID Info*/ |
| 90 | tCsrSSIDInfo SSID; |
| 91 | |
| 92 | /** Station ID */ |
| 93 | v_U8_t staId[ HDD_MAX_NUM_IBSS_STA ]; |
| 94 | /** Peer Mac Address of the IBSS Stations */ |
| 95 | v_MACADDR_t peerMacAddress[ HDD_MAX_NUM_IBSS_STA ]; |
| 96 | /** Auth Type */ |
| 97 | eCsrAuthType authType; |
| 98 | |
| 99 | /** Unicast Encryption Type */ |
| 100 | eCsrEncryptionType ucEncryptionType; |
| 101 | |
| 102 | /** Multicast Encryption Type */ |
| 103 | eCsrEncryptionType mcEncryptionType; |
| 104 | |
| 105 | /** Keys */ |
| 106 | tCsrKeys Keys; |
| 107 | |
| 108 | /** Operation Channel */ |
| 109 | v_U8_t operationChannel; |
| 110 | |
| 111 | /** Remembers authenticated state */ |
| 112 | v_U8_t uIsAuthenticated; |
| 113 | |
| 114 | }connection_info_t; |
| 115 | /*Forward declaration of Adapter*/ |
| 116 | typedef struct hdd_adapter_s hdd_adapter_t; |
| 117 | typedef struct hdd_context_s hdd_context_t; |
| 118 | typedef struct hdd_station_ctx hdd_station_ctx_t; |
| 119 | typedef struct hdd_ap_ctx_s hdd_ap_ctx_t; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 120 | typedef struct hdd_mon_ctx_s hdd_mon_ctx_t; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 121 | |
| 122 | |
| 123 | extern v_BOOL_t hdd_connIsConnected( hdd_station_ctx_t *pHddStaCtx ); |
| 124 | extern eHalStatus hdd_smeRoamCallback( void *pContext, tCsrRoamInfo *pRoamInfo, v_U32_t roamId, |
| 125 | eRoamCmdStatus roamStatus, eCsrRoamResult roamResult ); |
| 126 | |
| 127 | extern v_VOID_t hdd_connSaveConnectInfo( hdd_adapter_t *pAdapter, tCsrRoamInfo *pRoamInfo, eCsrRoamBssType eBssType ); |
| 128 | |
Jeff Johnson | 51019dc | 2013-02-21 16:44:09 -0800 | [diff] [blame] | 129 | v_BOOL_t hdd_connGetConnectedBssType( hdd_station_ctx_t *pHddCtx, |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 130 | eMib_dot11DesiredBssType *pConnectedBssType ); |
| 131 | |
| 132 | int hdd_SetGENIEToCsr( hdd_adapter_t *pAdapter, eCsrAuthType *RSNAuthType ); |
| 133 | |
| 134 | int hdd_set_csr_auth_type( hdd_adapter_t *pAdapter, eCsrAuthType RSNAuthType ); |
Hoonki Lee | 11f7dda | 2013-02-14 16:55:44 -0800 | [diff] [blame] | 135 | VOS_STATUS hdd_roamRegisterTDLSSTA( hdd_adapter_t *pAdapter, |
| 136 | tANI_U8 *peerMac, tANI_U16 staId, tANI_U8 ucastSig); |
| 137 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 138 | #endif |