Initial commit
mbed-dev-master/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F439xI/TARGET_MODULE_UBLOX_ODIN_W2/sdk/ublox-odin-w2-drivers/cb_wlan_types.h@0:bb348c97df44, 2020-09-16 (annotated)
- Committer:
- lypinator
- Date:
- Wed Sep 16 01:11:49 2020 +0000
- Revision:
- 0:bb348c97df44
Added PWM
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
lypinator | 0:bb348c97df44 | 1 | /*--------------------------------------------------------------------------- |
lypinator | 0:bb348c97df44 | 2 | * Copyright (c) 2016, u-blox Malmö, All Rights Reserved |
lypinator | 0:bb348c97df44 | 3 | * SPDX-License-Identifier: LicenseRef-PBL |
lypinator | 0:bb348c97df44 | 4 | * |
lypinator | 0:bb348c97df44 | 5 | * This file and the related binary are licensed under the |
lypinator | 0:bb348c97df44 | 6 | * Permissive Binary License, Version 1.0 (the "License"); |
lypinator | 0:bb348c97df44 | 7 | * you may not use these files except in compliance with the License. |
lypinator | 0:bb348c97df44 | 8 | * |
lypinator | 0:bb348c97df44 | 9 | * You may obtain a copy of the License here: |
lypinator | 0:bb348c97df44 | 10 | * LICENSE-permissive-binary-license-1.0.txt and at |
lypinator | 0:bb348c97df44 | 11 | * https://www.mbed.com/licenses/PBL-1.0 |
lypinator | 0:bb348c97df44 | 12 | * |
lypinator | 0:bb348c97df44 | 13 | * See the License for the specific language governing permissions and |
lypinator | 0:bb348c97df44 | 14 | * limitations under the License. |
lypinator | 0:bb348c97df44 | 15 | * |
lypinator | 0:bb348c97df44 | 16 | * Component : WLAN driver |
lypinator | 0:bb348c97df44 | 17 | * File : cb_wlan_types.h |
lypinator | 0:bb348c97df44 | 18 | * |
lypinator | 0:bb348c97df44 | 19 | * Description : Common wireless LAN defines and types. |
lypinator | 0:bb348c97df44 | 20 | *-------------------------------------------------------------------------*/ |
lypinator | 0:bb348c97df44 | 21 | |
lypinator | 0:bb348c97df44 | 22 | /** |
lypinator | 0:bb348c97df44 | 23 | * @file cb_wlan_types.h The main WLAN 802.11 interface |
lypinator | 0:bb348c97df44 | 24 | * |
lypinator | 0:bb348c97df44 | 25 | * @ingroup WLANDriver |
lypinator | 0:bb348c97df44 | 26 | */ |
lypinator | 0:bb348c97df44 | 27 | |
lypinator | 0:bb348c97df44 | 28 | #ifndef _CB_WLAN_TYPES_H_ |
lypinator | 0:bb348c97df44 | 29 | #define _CB_WLAN_TYPES_H_ |
lypinator | 0:bb348c97df44 | 30 | |
lypinator | 0:bb348c97df44 | 31 | #include "cb_types.h" |
lypinator | 0:bb348c97df44 | 32 | |
lypinator | 0:bb348c97df44 | 33 | #ifdef __cplusplus |
lypinator | 0:bb348c97df44 | 34 | extern "C" { |
lypinator | 0:bb348c97df44 | 35 | #endif |
lypinator | 0:bb348c97df44 | 36 | |
lypinator | 0:bb348c97df44 | 37 | /*=========================================================================== |
lypinator | 0:bb348c97df44 | 38 | * DEFINES |
lypinator | 0:bb348c97df44 | 39 | *=========================================================================*/ |
lypinator | 0:bb348c97df44 | 40 | |
lypinator | 0:bb348c97df44 | 41 | /** |
lypinator | 0:bb348c97df44 | 42 | * Max length for an SSID |
lypinator | 0:bb348c97df44 | 43 | * |
lypinator | 0:bb348c97df44 | 44 | * @ingroup wlantypes |
lypinator | 0:bb348c97df44 | 45 | */ |
lypinator | 0:bb348c97df44 | 46 | #define cbWLAN_SSID_MAX_LENGTH (32) |
lypinator | 0:bb348c97df44 | 47 | |
lypinator | 0:bb348c97df44 | 48 | /** |
lypinator | 0:bb348c97df44 | 49 | * EAPOL ethernet type |
lypinator | 0:bb348c97df44 | 50 | * |
lypinator | 0:bb348c97df44 | 51 | * @ingroup wlantypes |
lypinator | 0:bb348c97df44 | 52 | */ |
lypinator | 0:bb348c97df44 | 53 | #define cbWLAN_ETHTYPE_EAPOL (0x888E) |
lypinator | 0:bb348c97df44 | 54 | |
lypinator | 0:bb348c97df44 | 55 | /** |
lypinator | 0:bb348c97df44 | 56 | * Maximum size of a predefined WEP key |
lypinator | 0:bb348c97df44 | 57 | * |
lypinator | 0:bb348c97df44 | 58 | * @ingroup wlantypes |
lypinator | 0:bb348c97df44 | 59 | */ |
lypinator | 0:bb348c97df44 | 60 | #define cbWLAN_KEY_SIZE_WEP_MAX (cbWLAN_KEY_SIZE_WEP128) |
lypinator | 0:bb348c97df44 | 61 | |
lypinator | 0:bb348c97df44 | 62 | #define cbWLAN_OUI_SIZE 3 |
lypinator | 0:bb348c97df44 | 63 | |
lypinator | 0:bb348c97df44 | 64 | #define cbRATE_MASK_B (cbRATE_MASK_01 | cbRATE_MASK_02 | cbRATE_MASK_5_5 | cbRATE_MASK_11) |
lypinator | 0:bb348c97df44 | 65 | #define cbRATE_MASK_G (cbRATE_MASK_06 | cbRATE_MASK_09 | cbRATE_MASK_12 | cbRATE_MASK_18 | cbRATE_MASK_24 | cbRATE_MASK_36 | cbRATE_MASK_48 | cbRATE_MASK_54) |
lypinator | 0:bb348c97df44 | 66 | #define cbRATE_MASK_A (cbRATE_MASK_G) |
lypinator | 0:bb348c97df44 | 67 | #define cbRATE_MASK_N (cbRATE_MASK_MCS0 | cbRATE_MASK_MCS1 | cbRATE_MASK_MCS2 | cbRATE_MASK_MCS3 | cbRATE_MASK_MCS4 | cbRATE_MASK_MCS5 | cbRATE_MASK_MCS6 | cbRATE_MASK_MCS7) |
lypinator | 0:bb348c97df44 | 68 | #define cbRATE_TX_MIMO (cbRATE_MASK_MCS8 | cbRATE_MASK_MCS9 | cbRATE_MASK_MCS10 | cbRATE_MASK_MCS11 | cbRATE_MASK_MCS12 | cbRATE_MASK_MCS13 | cbRATE_MASK_MCS14 | cbRATE_MASK_MCS15) |
lypinator | 0:bb348c97df44 | 69 | #define cbRATE_TX_WIDE (cbRATE_MASK_WIDE) |
lypinator | 0:bb348c97df44 | 70 | #define cbRATE_MASK_ALL (cbRATE_MASK_B | cbRATE_MASK_G | cbRATE_MASK_N | cbRATE_TX_MIMO | cbRATE_TX_WIDE) |
lypinator | 0:bb348c97df44 | 71 | |
lypinator | 0:bb348c97df44 | 72 | #define cbWLAN_MAX_CHANNEL_LIST_LENGTH 38 |
lypinator | 0:bb348c97df44 | 73 | |
lypinator | 0:bb348c97df44 | 74 | #define cbWLAN_TX_POWER_AUTO 0xFF |
lypinator | 0:bb348c97df44 | 75 | |
lypinator | 0:bb348c97df44 | 76 | #define cbWLAN_PMF_MFPR cb_BIT_6 // Bit 6: Management Frame Protection Required (MFPR) |
lypinator | 0:bb348c97df44 | 77 | #define cbWLAN_PMF_MFPC cb_BIT_7 // Bit 7: Management Frame Protection Capable (MFPC). |
lypinator | 0:bb348c97df44 | 78 | |
lypinator | 0:bb348c97df44 | 79 | /*=========================================================================== |
lypinator | 0:bb348c97df44 | 80 | * TYPES |
lypinator | 0:bb348c97df44 | 81 | *=========================================================================*/ |
lypinator | 0:bb348c97df44 | 82 | |
lypinator | 0:bb348c97df44 | 83 | /** |
lypinator | 0:bb348c97df44 | 84 | * The encryption mode. |
lypinator | 0:bb348c97df44 | 85 | * |
lypinator | 0:bb348c97df44 | 86 | * @ingroup wlantypes |
lypinator | 0:bb348c97df44 | 87 | */ |
lypinator | 0:bb348c97df44 | 88 | typedef enum cbWLAN_EncryptionMode_e { |
lypinator | 0:bb348c97df44 | 89 | cbWLAN_ENC_NONE, |
lypinator | 0:bb348c97df44 | 90 | cbWLAN_ENC_WEP64, |
lypinator | 0:bb348c97df44 | 91 | cbWLAN_ENC_WEP128, |
lypinator | 0:bb348c97df44 | 92 | cbWLAN_ENC_TKIP, |
lypinator | 0:bb348c97df44 | 93 | cbWLAN_ENC_AES, |
lypinator | 0:bb348c97df44 | 94 | cbWLAN_ENC_BIP, |
lypinator | 0:bb348c97df44 | 95 | } cbWLAN_EncryptionMode; |
lypinator | 0:bb348c97df44 | 96 | |
lypinator | 0:bb348c97df44 | 97 | typedef enum cbWLAN_CipherSuite { |
lypinator | 0:bb348c97df44 | 98 | cbWLAN_CIPHER_SUITE_NONE = 0x00, |
lypinator | 0:bb348c97df44 | 99 | cbWLAN_CIPHER_SUITE_WEP64 = 0x01, |
lypinator | 0:bb348c97df44 | 100 | cbWLAN_CIPHER_SUITE_WEP128 = 0x02, |
lypinator | 0:bb348c97df44 | 101 | cbWLAN_CIPHER_SUITE_TKIP = 0x04, |
lypinator | 0:bb348c97df44 | 102 | cbWLAN_CIPHER_SUITE_AES_CCMP = 0x08, |
lypinator | 0:bb348c97df44 | 103 | cbWLAN_CIPHER_SUITE_BIP = 0x10, |
lypinator | 0:bb348c97df44 | 104 | } cbWLAN_CipherSuite; |
lypinator | 0:bb348c97df44 | 105 | |
lypinator | 0:bb348c97df44 | 106 | typedef enum cbWLAN_AuthenticationSuite { |
lypinator | 0:bb348c97df44 | 107 | cbWLAN_AUTHENTICATION_SUITE_NONE = 0x0000, |
lypinator | 0:bb348c97df44 | 108 | cbWLAN_AUTHENTICATION_SUITE_SHARED_SECRET = 0x0001, |
lypinator | 0:bb348c97df44 | 109 | cbWLAN_AUTHENTICATION_SUITE_PSK = 0x0002, |
lypinator | 0:bb348c97df44 | 110 | cbWLAN_AUTHENTICATION_SUITE_8021X = 0x0004, |
lypinator | 0:bb348c97df44 | 111 | cbWLAN_AUTHENTICATION_SUITE_USE_WPA = 0x0008, |
lypinator | 0:bb348c97df44 | 112 | cbWLAN_AUTHENTICATION_SUITE_USE_WPA2 = 0x0010, |
lypinator | 0:bb348c97df44 | 113 | cbWLAN_AUTHENTICATION_SUITE_PSK_SHA256 = 0x0020, |
lypinator | 0:bb348c97df44 | 114 | cbWLAN_AUTHENTICATION_SUITE_8021X_SHA256 = 0x0040, |
lypinator | 0:bb348c97df44 | 115 | cbWLAN_AUTHENTICATION_SUITE_8021X_FT = 0x0080, |
lypinator | 0:bb348c97df44 | 116 | cbWLAN_AUTHENTICATION_SUITE_PSK_FT = 0x0100, |
lypinator | 0:bb348c97df44 | 117 | } cbWLAN_AuthenticationSuite; |
lypinator | 0:bb348c97df44 | 118 | |
lypinator | 0:bb348c97df44 | 119 | |
lypinator | 0:bb348c97df44 | 120 | /** |
lypinator | 0:bb348c97df44 | 121 | * Enterprise authentication mode. |
lypinator | 0:bb348c97df44 | 122 | * |
lypinator | 0:bb348c97df44 | 123 | * @ingroup wlan |
lypinator | 0:bb348c97df44 | 124 | */ |
lypinator | 0:bb348c97df44 | 125 | typedef enum cbWLAN_EnterpriseMode { |
lypinator | 0:bb348c97df44 | 126 | cbWLAN_ENTERPRISE_MODE_LEAP, |
lypinator | 0:bb348c97df44 | 127 | cbWLAN_ENTERPRISE_MODE_PEAP, |
lypinator | 0:bb348c97df44 | 128 | cbWLAN_ENTERPRISE_MODE_EAPTLS, |
lypinator | 0:bb348c97df44 | 129 | } cbWLAN_EnterpriseMode; |
lypinator | 0:bb348c97df44 | 130 | |
lypinator | 0:bb348c97df44 | 131 | /** |
lypinator | 0:bb348c97df44 | 132 | * Key sizes for the supported encryptions. |
lypinator | 0:bb348c97df44 | 133 | * |
lypinator | 0:bb348c97df44 | 134 | * @ingroup wlantypes |
lypinator | 0:bb348c97df44 | 135 | */ |
lypinator | 0:bb348c97df44 | 136 | typedef enum cbWLAN_EncryptionKeySize_e { |
lypinator | 0:bb348c97df44 | 137 | cbWLAN_KEY_SIZE_WEP64 = 5, |
lypinator | 0:bb348c97df44 | 138 | cbWLAN_KEY_SIZE_WEP128 = 13, |
lypinator | 0:bb348c97df44 | 139 | cbWLAN_KEY_SIZE_WEP2 = 16, |
lypinator | 0:bb348c97df44 | 140 | cbWLAN_KEY_SIZE_TKIP = 16, |
lypinator | 0:bb348c97df44 | 141 | cbWLAN_KEY_SIZE_AES = 16, |
lypinator | 0:bb348c97df44 | 142 | cbWLAN_KEY_SIZE_TKIP_MIC = 8 |
lypinator | 0:bb348c97df44 | 143 | } cbWLAN_EncryptionKeySize; |
lypinator | 0:bb348c97df44 | 144 | |
lypinator | 0:bb348c97df44 | 145 | enum cbWLAN_Channel_e { |
lypinator | 0:bb348c97df44 | 146 | cbWLAN_CHANNEL_ALL = 0, |
lypinator | 0:bb348c97df44 | 147 | cbWLAN_CHANNEL_01 = 1, |
lypinator | 0:bb348c97df44 | 148 | cbWLAN_CHANNEL_02, |
lypinator | 0:bb348c97df44 | 149 | cbWLAN_CHANNEL_03, |
lypinator | 0:bb348c97df44 | 150 | cbWLAN_CHANNEL_04, |
lypinator | 0:bb348c97df44 | 151 | cbWLAN_CHANNEL_05, |
lypinator | 0:bb348c97df44 | 152 | cbWLAN_CHANNEL_06, |
lypinator | 0:bb348c97df44 | 153 | cbWLAN_CHANNEL_07, |
lypinator | 0:bb348c97df44 | 154 | cbWLAN_CHANNEL_08, |
lypinator | 0:bb348c97df44 | 155 | cbWLAN_CHANNEL_09, |
lypinator | 0:bb348c97df44 | 156 | cbWLAN_CHANNEL_10, |
lypinator | 0:bb348c97df44 | 157 | cbWLAN_CHANNEL_11, |
lypinator | 0:bb348c97df44 | 158 | cbWLAN_CHANNEL_12, |
lypinator | 0:bb348c97df44 | 159 | cbWLAN_CHANNEL_13, |
lypinator | 0:bb348c97df44 | 160 | cbWLAN_CHANNEL_14, |
lypinator | 0:bb348c97df44 | 161 | |
lypinator | 0:bb348c97df44 | 162 | cbWLAN_CHANNEL_36 = 36, |
lypinator | 0:bb348c97df44 | 163 | cbWLAN_CHANNEL_40 = 40, |
lypinator | 0:bb348c97df44 | 164 | cbWLAN_CHANNEL_44 = 44, |
lypinator | 0:bb348c97df44 | 165 | cbWLAN_CHANNEL_48 = 48, |
lypinator | 0:bb348c97df44 | 166 | cbWLAN_CHANNEL_52 = 52, |
lypinator | 0:bb348c97df44 | 167 | cbWLAN_CHANNEL_56 = 56, |
lypinator | 0:bb348c97df44 | 168 | cbWLAN_CHANNEL_60 = 60, |
lypinator | 0:bb348c97df44 | 169 | cbWLAN_CHANNEL_64 = 64, |
lypinator | 0:bb348c97df44 | 170 | cbWLAN_CHANNEL_100 = 100, |
lypinator | 0:bb348c97df44 | 171 | cbWLAN_CHANNEL_104 = 104, |
lypinator | 0:bb348c97df44 | 172 | cbWLAN_CHANNEL_108 = 108, |
lypinator | 0:bb348c97df44 | 173 | cbWLAN_CHANNEL_112 = 112, |
lypinator | 0:bb348c97df44 | 174 | cbWLAN_CHANNEL_116 = 116, |
lypinator | 0:bb348c97df44 | 175 | cbWLAN_CHANNEL_120 = 120, |
lypinator | 0:bb348c97df44 | 176 | cbWLAN_CHANNEL_124 = 124, |
lypinator | 0:bb348c97df44 | 177 | cbWLAN_CHANNEL_128 = 128, |
lypinator | 0:bb348c97df44 | 178 | cbWLAN_CHANNEL_132 = 132, |
lypinator | 0:bb348c97df44 | 179 | cbWLAN_CHANNEL_136 = 136, |
lypinator | 0:bb348c97df44 | 180 | cbWLAN_CHANNEL_140 = 140, |
lypinator | 0:bb348c97df44 | 181 | cbWLAN_CHANNEL_149 = 149, |
lypinator | 0:bb348c97df44 | 182 | cbWLAN_CHANNEL_153 = 153, |
lypinator | 0:bb348c97df44 | 183 | cbWLAN_CHANNEL_157 = 157, |
lypinator | 0:bb348c97df44 | 184 | cbWLAN_CHANNEL_161 = 161, |
lypinator | 0:bb348c97df44 | 185 | cbWLAN_CHANNEL_165 = 165 |
lypinator | 0:bb348c97df44 | 186 | }; |
lypinator | 0:bb348c97df44 | 187 | |
lypinator | 0:bb348c97df44 | 188 | /** |
lypinator | 0:bb348c97df44 | 189 | * WLAN Channels |
lypinator | 0:bb348c97df44 | 190 | * Valid values are found in @ref cbWLAN_Channel_e |
lypinator | 0:bb348c97df44 | 191 | * @ingroup wlantypes |
lypinator | 0:bb348c97df44 | 192 | */ |
lypinator | 0:bb348c97df44 | 193 | typedef cb_uint8 cbWLAN_Channel; |
lypinator | 0:bb348c97df44 | 194 | |
lypinator | 0:bb348c97df44 | 195 | /** |
lypinator | 0:bb348c97df44 | 196 | * WLAN Channel list |
lypinator | 0:bb348c97df44 | 197 | * @ingroup wlantypes |
lypinator | 0:bb348c97df44 | 198 | */ |
lypinator | 0:bb348c97df44 | 199 | typedef struct { |
lypinator | 0:bb348c97df44 | 200 | cb_uint32 length; |
lypinator | 0:bb348c97df44 | 201 | cbWLAN_Channel channels[cbWLAN_MAX_CHANNEL_LIST_LENGTH]; |
lypinator | 0:bb348c97df44 | 202 | } cbWLAN_ChannelList; |
lypinator | 0:bb348c97df44 | 203 | |
lypinator | 0:bb348c97df44 | 204 | /** |
lypinator | 0:bb348c97df44 | 205 | * Standard 802.11 rates |
lypinator | 0:bb348c97df44 | 206 | * |
lypinator | 0:bb348c97df44 | 207 | * @ingroup wlantypes |
lypinator | 0:bb348c97df44 | 208 | */ |
lypinator | 0:bb348c97df44 | 209 | enum cbWLAN_Rate_e { |
lypinator | 0:bb348c97df44 | 210 | cbWLAN_RATE_01 = 1, // 1 |
lypinator | 0:bb348c97df44 | 211 | cbWLAN_RATE_02, // 2 |
lypinator | 0:bb348c97df44 | 212 | cbWLAN_RATE_5_5, // 3 |
lypinator | 0:bb348c97df44 | 213 | cbWLAN_RATE_06, // 4 |
lypinator | 0:bb348c97df44 | 214 | cbWLAN_RATE_09, // 5 |
lypinator | 0:bb348c97df44 | 215 | cbWLAN_RATE_11, // 6 |
lypinator | 0:bb348c97df44 | 216 | cbWLAN_RATE_12, // 7 |
lypinator | 0:bb348c97df44 | 217 | cbWLAN_RATE_18, // 8 |
lypinator | 0:bb348c97df44 | 218 | cbWLAN_RATE_24, // 9 |
lypinator | 0:bb348c97df44 | 219 | cbWLAN_RATE_36, // 10 |
lypinator | 0:bb348c97df44 | 220 | cbWLAN_RATE_48, // 11 |
lypinator | 0:bb348c97df44 | 221 | cbWLAN_RATE_54, // 12 |
lypinator | 0:bb348c97df44 | 222 | cbWLAN_RATE_MCS0, // 13 |
lypinator | 0:bb348c97df44 | 223 | cbWLAN_RATE_MCS1, // 14 |
lypinator | 0:bb348c97df44 | 224 | cbWLAN_RATE_MCS2, // 15 |
lypinator | 0:bb348c97df44 | 225 | cbWLAN_RATE_MCS3, // 16 |
lypinator | 0:bb348c97df44 | 226 | cbWLAN_RATE_MCS4, // 17 |
lypinator | 0:bb348c97df44 | 227 | cbWLAN_RATE_MCS5, // 18 |
lypinator | 0:bb348c97df44 | 228 | cbWLAN_RATE_MCS6, // 19 |
lypinator | 0:bb348c97df44 | 229 | cbWLAN_RATE_MCS7, // 20 |
lypinator | 0:bb348c97df44 | 230 | cbWLAN_RATE_MCS8, // 21 |
lypinator | 0:bb348c97df44 | 231 | cbWLAN_RATE_MCS9, // 22 |
lypinator | 0:bb348c97df44 | 232 | cbWLAN_RATE_MCS10, // 23 |
lypinator | 0:bb348c97df44 | 233 | cbWLAN_RATE_MCS11, // 24 |
lypinator | 0:bb348c97df44 | 234 | cbWLAN_RATE_MCS12, // 25 |
lypinator | 0:bb348c97df44 | 235 | cbWLAN_RATE_MCS13, // 26 |
lypinator | 0:bb348c97df44 | 236 | cbWLAN_RATE_MCS14, // 27 |
lypinator | 0:bb348c97df44 | 237 | cbWLAN_RATE_MCS15, // 28 |
lypinator | 0:bb348c97df44 | 238 | cbWLAN_RATE_MAX, // 29 |
lypinator | 0:bb348c97df44 | 239 | cbWLAN_RATE_UNSUPPORTED = 0xff |
lypinator | 0:bb348c97df44 | 240 | }; |
lypinator | 0:bb348c97df44 | 241 | |
lypinator | 0:bb348c97df44 | 242 | /** |
lypinator | 0:bb348c97df44 | 243 | * Type for containing values found in @ref cbWLAN_Rate_e |
lypinator | 0:bb348c97df44 | 244 | * @ingroup wlantypes |
lypinator | 0:bb348c97df44 | 245 | */ |
lypinator | 0:bb348c97df44 | 246 | typedef cb_uint8 cbWLAN_Rate; |
lypinator | 0:bb348c97df44 | 247 | |
lypinator | 0:bb348c97df44 | 248 | |
lypinator | 0:bb348c97df44 | 249 | /** |
lypinator | 0:bb348c97df44 | 250 | * Mask bits for standard 802.11 rates |
lypinator | 0:bb348c97df44 | 251 | * |
lypinator | 0:bb348c97df44 | 252 | * @ingroup wlantypes |
lypinator | 0:bb348c97df44 | 253 | */ |
lypinator | 0:bb348c97df44 | 254 | enum cbWLAN_RateMask_e { |
lypinator | 0:bb348c97df44 | 255 | cbRATE_MASK_01 = 0x00000001, |
lypinator | 0:bb348c97df44 | 256 | cbRATE_MASK_02 = 0x00000002, |
lypinator | 0:bb348c97df44 | 257 | cbRATE_MASK_5_5 = 0x00000004, |
lypinator | 0:bb348c97df44 | 258 | cbRATE_MASK_11 = 0x00000008, |
lypinator | 0:bb348c97df44 | 259 | cbRATE_MASK_06 = 0x00000010, |
lypinator | 0:bb348c97df44 | 260 | cbRATE_MASK_09 = 0x00000020, |
lypinator | 0:bb348c97df44 | 261 | cbRATE_MASK_12 = 0x00000040, |
lypinator | 0:bb348c97df44 | 262 | cbRATE_MASK_18 = 0x00000080, |
lypinator | 0:bb348c97df44 | 263 | cbRATE_MASK_24 = 0x00000100, |
lypinator | 0:bb348c97df44 | 264 | cbRATE_MASK_36 = 0x00000200, |
lypinator | 0:bb348c97df44 | 265 | cbRATE_MASK_48 = 0x00000400, |
lypinator | 0:bb348c97df44 | 266 | cbRATE_MASK_54 = 0x00000800, |
lypinator | 0:bb348c97df44 | 267 | // NOTE: Don't move MCS rates bit offset, see note on define below |
lypinator | 0:bb348c97df44 | 268 | cbRATE_MASK_MCS0 = 0x00001000, |
lypinator | 0:bb348c97df44 | 269 | cbRATE_MASK_MCS1 = 0x00002000, |
lypinator | 0:bb348c97df44 | 270 | cbRATE_MASK_MCS2 = 0x00004000, |
lypinator | 0:bb348c97df44 | 271 | cbRATE_MASK_MCS3 = 0x00008000, |
lypinator | 0:bb348c97df44 | 272 | cbRATE_MASK_MCS4 = 0x00010000, |
lypinator | 0:bb348c97df44 | 273 | cbRATE_MASK_MCS5 = 0x00020000, |
lypinator | 0:bb348c97df44 | 274 | cbRATE_MASK_MCS6 = 0x00040000, |
lypinator | 0:bb348c97df44 | 275 | cbRATE_MASK_MCS7 = 0x00080000, |
lypinator | 0:bb348c97df44 | 276 | //TX MIMO RATES |
lypinator | 0:bb348c97df44 | 277 | cbRATE_MASK_MCS8 = 0x00100000, |
lypinator | 0:bb348c97df44 | 278 | cbRATE_MASK_MCS9 = 0x00200000, |
lypinator | 0:bb348c97df44 | 279 | cbRATE_MASK_MCS10 = 0x00400000, |
lypinator | 0:bb348c97df44 | 280 | cbRATE_MASK_MCS11 = 0x00800000, |
lypinator | 0:bb348c97df44 | 281 | cbRATE_MASK_MCS12 = 0x01000000, |
lypinator | 0:bb348c97df44 | 282 | cbRATE_MASK_MCS13 = 0x02000000, |
lypinator | 0:bb348c97df44 | 283 | cbRATE_MASK_MCS14 = 0x04000000, |
lypinator | 0:bb348c97df44 | 284 | cbRATE_MASK_MCS15 = 0x08000000, |
lypinator | 0:bb348c97df44 | 285 | //TX RATE USE WIDE CHANNEL |
lypinator | 0:bb348c97df44 | 286 | cbRATE_MASK_WIDE = 0x80000000 |
lypinator | 0:bb348c97df44 | 287 | }; |
lypinator | 0:bb348c97df44 | 288 | |
lypinator | 0:bb348c97df44 | 289 | |
lypinator | 0:bb348c97df44 | 290 | /** |
lypinator | 0:bb348c97df44 | 291 | * Access categories |
lypinator | 0:bb348c97df44 | 292 | * |
lypinator | 0:bb348c97df44 | 293 | * @ingroup wlantypes |
lypinator | 0:bb348c97df44 | 294 | */ |
lypinator | 0:bb348c97df44 | 295 | typedef enum cbWLAN_AccessCategory_e { |
lypinator | 0:bb348c97df44 | 296 | cbWLAN_AC_BK = 1, /**< Background */ |
lypinator | 0:bb348c97df44 | 297 | cbWLAN_AC_SP = 2, /**< Background (Spare) */ |
lypinator | 0:bb348c97df44 | 298 | |
lypinator | 0:bb348c97df44 | 299 | cbWLAN_AC_BE = 0, /**< Best effort */ |
lypinator | 0:bb348c97df44 | 300 | cbWLAN_AC_EE = 3, /**< Best effort (Excellent Effort) */ |
lypinator | 0:bb348c97df44 | 301 | |
lypinator | 0:bb348c97df44 | 302 | cbWLAN_AC_CL = 4, /**< Video (Controlled Load) */ |
lypinator | 0:bb348c97df44 | 303 | cbWLAN_AC_VI = 5, /**< Video */ |
lypinator | 0:bb348c97df44 | 304 | |
lypinator | 0:bb348c97df44 | 305 | cbWLAN_AC_VO = 6, /**< Voice */ |
lypinator | 0:bb348c97df44 | 306 | cbWLAN_AC_NC = 7, /**< Voice (Network Control)*/ |
lypinator | 0:bb348c97df44 | 307 | } cbWLAN_AccessCategory; |
lypinator | 0:bb348c97df44 | 308 | |
lypinator | 0:bb348c97df44 | 309 | /** |
lypinator | 0:bb348c97df44 | 310 | * Fast Transition (802.11r) modes. |
lypinator | 0:bb348c97df44 | 311 | * |
lypinator | 0:bb348c97df44 | 312 | * @ingroup wlantypes |
lypinator | 0:bb348c97df44 | 313 | */ |
lypinator | 0:bb348c97df44 | 314 | typedef enum cbWLAN_FTMode_e { |
lypinator | 0:bb348c97df44 | 315 | cbWLAN_FT_OFF, |
lypinator | 0:bb348c97df44 | 316 | cbWLAN_FT_OVER_AIR, |
lypinator | 0:bb348c97df44 | 317 | cbWLAN_FT_OVER_DS, |
lypinator | 0:bb348c97df44 | 318 | } cbWLAN_FTMode; |
lypinator | 0:bb348c97df44 | 319 | /** |
lypinator | 0:bb348c97df44 | 320 | * connectBlue Hardware Identification |
lypinator | 0:bb348c97df44 | 321 | * |
lypinator | 0:bb348c97df44 | 322 | * @ingroup types |
lypinator | 0:bb348c97df44 | 323 | */ |
lypinator | 0:bb348c97df44 | 324 | typedef enum cbWM_ModuleType_e { |
lypinator | 0:bb348c97df44 | 325 | cbWM_MODULE_UNKNOWN, |
lypinator | 0:bb348c97df44 | 326 | cbWM_MODULE_OWL22X, |
lypinator | 0:bb348c97df44 | 327 | cbWM_MODULE_OWL253, |
lypinator | 0:bb348c97df44 | 328 | cbWM_MODULE_OWS451, |
lypinator | 0:bb348c97df44 | 329 | cbWM_MODULE_OWL351, |
lypinator | 0:bb348c97df44 | 330 | cbWM_MODULE_ODIN_W16X = cbWM_MODULE_OWL351, |
lypinator | 0:bb348c97df44 | 331 | cbWM_MODULE_ODIN_W26X, |
lypinator | 0:bb348c97df44 | 332 | } cbWM_ModuleType; |
lypinator | 0:bb348c97df44 | 333 | |
lypinator | 0:bb348c97df44 | 334 | /** |
lypinator | 0:bb348c97df44 | 335 | * Mac address type |
lypinator | 0:bb348c97df44 | 336 | * |
lypinator | 0:bb348c97df44 | 337 | * @ingroup wlantypes |
lypinator | 0:bb348c97df44 | 338 | */ |
lypinator | 0:bb348c97df44 | 339 | typedef cb_uint8 cbWLAN_MACAddress[6]; |
lypinator | 0:bb348c97df44 | 340 | |
lypinator | 0:bb348c97df44 | 341 | /** |
lypinator | 0:bb348c97df44 | 342 | * Type for containing values found in @ref cbWLAN_RateMask_e |
lypinator | 0:bb348c97df44 | 343 | * @ingroup wlantypes |
lypinator | 0:bb348c97df44 | 344 | */ |
lypinator | 0:bb348c97df44 | 345 | typedef cb_uint32 cbWLAN_RateMask; |
lypinator | 0:bb348c97df44 | 346 | |
lypinator | 0:bb348c97df44 | 347 | /** |
lypinator | 0:bb348c97df44 | 348 | * Transmission power |
lypinator | 0:bb348c97df44 | 349 | * |
lypinator | 0:bb348c97df44 | 350 | * @ingroup wlantypes |
lypinator | 0:bb348c97df44 | 351 | */ |
lypinator | 0:bb348c97df44 | 352 | typedef cb_uint8 cbWLAN_TxPower; |
lypinator | 0:bb348c97df44 | 353 | |
lypinator | 0:bb348c97df44 | 354 | /** |
lypinator | 0:bb348c97df44 | 355 | * The different frequency bands to choose from. |
lypinator | 0:bb348c97df44 | 356 | * |
lypinator | 0:bb348c97df44 | 357 | * @ingroup wlantypes |
lypinator | 0:bb348c97df44 | 358 | */ |
lypinator | 0:bb348c97df44 | 359 | typedef enum cbWLAN_Band_e { |
lypinator | 0:bb348c97df44 | 360 | cbWLAN_BAND_UNDEFINED, |
lypinator | 0:bb348c97df44 | 361 | cbWLAN_BAND_2_4GHz, |
lypinator | 0:bb348c97df44 | 362 | cbWLAN_BAND_5GHz, |
lypinator | 0:bb348c97df44 | 363 | } cbWLAN_Band; |
lypinator | 0:bb348c97df44 | 364 | |
lypinator | 0:bb348c97df44 | 365 | /** |
lypinator | 0:bb348c97df44 | 366 | * The operational mode. |
lypinator | 0:bb348c97df44 | 367 | * |
lypinator | 0:bb348c97df44 | 368 | * @ingroup wlantypes |
lypinator | 0:bb348c97df44 | 369 | */ |
lypinator | 0:bb348c97df44 | 370 | typedef enum cbWLAN_OperationalMode_e { |
lypinator | 0:bb348c97df44 | 371 | cbWLAN_OPMODE_MANAGED, |
lypinator | 0:bb348c97df44 | 372 | cbWLAN_OPMODE_ADHOC, |
lypinator | 0:bb348c97df44 | 373 | } cbWLAN_OperationalMode; |
lypinator | 0:bb348c97df44 | 374 | |
lypinator | 0:bb348c97df44 | 375 | /** |
lypinator | 0:bb348c97df44 | 376 | * Encryption key type |
lypinator | 0:bb348c97df44 | 377 | * |
lypinator | 0:bb348c97df44 | 378 | * @ingroup wlantypes |
lypinator | 0:bb348c97df44 | 379 | */ |
lypinator | 0:bb348c97df44 | 380 | typedef enum cbWLAN_KeyType_e { |
lypinator | 0:bb348c97df44 | 381 | cbWLAN_KEY_UNICAST, |
lypinator | 0:bb348c97df44 | 382 | cbWLAN_KEY_BROADCAST, |
lypinator | 0:bb348c97df44 | 383 | cbWLAN_KEY_IGTK, |
lypinator | 0:bb348c97df44 | 384 | } cbWLAN_KeyType; |
lypinator | 0:bb348c97df44 | 385 | |
lypinator | 0:bb348c97df44 | 386 | typedef enum { |
lypinator | 0:bb348c97df44 | 387 | cbWLAN_CONNECT_MODE_OPEN, |
lypinator | 0:bb348c97df44 | 388 | cbWLAN_CONNECT_MODE_WEP_OPEN, |
lypinator | 0:bb348c97df44 | 389 | cbWLAN_CONNECT_MODE_WPA_PSK, |
lypinator | 0:bb348c97df44 | 390 | cbWLAN_CONNECT_MODE_ENTERPRISE, |
lypinator | 0:bb348c97df44 | 391 | } cbWLAN_ConnectMode; |
lypinator | 0:bb348c97df44 | 392 | |
lypinator | 0:bb348c97df44 | 393 | typedef enum { |
lypinator | 0:bb348c97df44 | 394 | cbWLAN_AP_MODE_OPEN, |
lypinator | 0:bb348c97df44 | 395 | cbWLAN_AP_MODE_WEP_OPEN, |
lypinator | 0:bb348c97df44 | 396 | cbWLAN_AP_MODE_WPA_PSK, |
lypinator | 0:bb348c97df44 | 397 | cbWLAN_AP_MODE_ENTERPRISE, |
lypinator | 0:bb348c97df44 | 398 | } cbWLAN_ApMode; |
lypinator | 0:bb348c97df44 | 399 | |
lypinator | 0:bb348c97df44 | 400 | #if defined(CB_FEATURE_802DOT11R) |
lypinator | 0:bb348c97df44 | 401 | /** |
lypinator | 0:bb348c97df44 | 402 | * Description of the Mobility Domain Information Element |
lypinator | 0:bb348c97df44 | 403 | * |
lypinator | 0:bb348c97df44 | 404 | * @ingroup wlantypes |
lypinator | 0:bb348c97df44 | 405 | */ |
lypinator | 0:bb348c97df44 | 406 | |
lypinator | 0:bb348c97df44 | 407 | cb_PACKED_STRUCT_BEGIN(cbWLAN_MDInformation) { |
lypinator | 0:bb348c97df44 | 408 | cb_uint8 eId; |
lypinator | 0:bb348c97df44 | 409 | cb_uint8 len; |
lypinator | 0:bb348c97df44 | 410 | cb_uint16 MDID; |
lypinator | 0:bb348c97df44 | 411 | cb_uint8 FtCapabilityPolicy; |
lypinator | 0:bb348c97df44 | 412 | } cb_PACKED_STRUCT_END(cbWLAN_MDInformation); |
lypinator | 0:bb348c97df44 | 413 | |
lypinator | 0:bb348c97df44 | 414 | /** |
lypinator | 0:bb348c97df44 | 415 | * Description of the Timeout Interval Information Element |
lypinator | 0:bb348c97df44 | 416 | * |
lypinator | 0:bb348c97df44 | 417 | * @ingroup wlantypes |
lypinator | 0:bb348c97df44 | 418 | */ |
lypinator | 0:bb348c97df44 | 419 | |
lypinator | 0:bb348c97df44 | 420 | cb_PACKED_STRUCT_BEGIN(cbWLAN_TimeOutInformation){ |
lypinator | 0:bb348c97df44 | 421 | cb_uint8 eId; |
lypinator | 0:bb348c97df44 | 422 | cb_uint8 len; |
lypinator | 0:bb348c97df44 | 423 | cb_uint8 timeOutType; |
lypinator | 0:bb348c97df44 | 424 | cb_uint32 value; |
lypinator | 0:bb348c97df44 | 425 | } cb_PACKED_STRUCT_END(cbWLAN_TimeOutInformation); |
lypinator | 0:bb348c97df44 | 426 | |
lypinator | 0:bb348c97df44 | 427 | /** |
lypinator | 0:bb348c97df44 | 428 | * Description of the Mobility Domain Information Element |
lypinator | 0:bb348c97df44 | 429 | * |
lypinator | 0:bb348c97df44 | 430 | * @ingroup wlantypes |
lypinator | 0:bb348c97df44 | 431 | */ |
lypinator | 0:bb348c97df44 | 432 | |
lypinator | 0:bb348c97df44 | 433 | cb_PACKED_STRUCT_BEGIN(cbWLAN_FtInformation){ |
lypinator | 0:bb348c97df44 | 434 | cb_uint8 eId; |
lypinator | 0:bb348c97df44 | 435 | cb_uint8 len; |
lypinator | 0:bb348c97df44 | 436 | cb_uint16 micControl; |
lypinator | 0:bb348c97df44 | 437 | cb_uint8 mic[16]; |
lypinator | 0:bb348c97df44 | 438 | cb_uint8 ANonce[32]; |
lypinator | 0:bb348c97df44 | 439 | cb_uint8 SNonce[32]; |
lypinator | 0:bb348c97df44 | 440 | cb_uint8 optionalParams[174]; // length field can maximum be 256, therefore optional params can be max 172 bytes |
lypinator | 0:bb348c97df44 | 441 | } cb_PACKED_STRUCT_END(cbWLAN_FtInformation); |
lypinator | 0:bb348c97df44 | 442 | |
lypinator | 0:bb348c97df44 | 443 | |
lypinator | 0:bb348c97df44 | 444 | |
lypinator | 0:bb348c97df44 | 445 | typedef struct cbWLAN_BSSChangeParameters { |
lypinator | 0:bb348c97df44 | 446 | cbWLAN_MACAddress currentBssid; /**< BSSID of connected AP. > */ |
lypinator | 0:bb348c97df44 | 447 | cbWLAN_MACAddress targetBssid; /**< BSSID to connect to. > */ |
lypinator | 0:bb348c97df44 | 448 | cbWLAN_Channel channel; /**< The channel the BSS is located on. > */ |
lypinator | 0:bb348c97df44 | 449 | cb_uint32 reAssocDeadline; /**< Reassociation Deadline time*/ |
lypinator | 0:bb348c97df44 | 450 | } cbWLAN_BSSChangeParameters; |
lypinator | 0:bb348c97df44 | 451 | #endif |
lypinator | 0:bb348c97df44 | 452 | |
lypinator | 0:bb348c97df44 | 453 | //#if defined(CB_FEATURE_802DOT11W) |
lypinator | 0:bb348c97df44 | 454 | typedef enum { |
lypinator | 0:bb348c97df44 | 455 | cbWLAN_PMF_DISABLE = 0, /**< MFPC = 0, MFPR = 0 */ |
lypinator | 0:bb348c97df44 | 456 | cbWLAN_PMF_OPTIONAL = 1, /**< MFPC = 1, MFPR = 0 */ |
lypinator | 0:bb348c97df44 | 457 | cbWLAN_PMF_REQUIRED = 2, /**< MFPC = 1, MFPR = 1 */ |
lypinator | 0:bb348c97df44 | 458 | } cbWLAN_PMF; |
lypinator | 0:bb348c97df44 | 459 | //#endif |
lypinator | 0:bb348c97df44 | 460 | typedef enum cbAP_KdeType_e { |
lypinator | 0:bb348c97df44 | 461 | RESERVED, |
lypinator | 0:bb348c97df44 | 462 | GTK_KDE, |
lypinator | 0:bb348c97df44 | 463 | RESERVED_2, |
lypinator | 0:bb348c97df44 | 464 | MAC_ADDRESS_KDE, |
lypinator | 0:bb348c97df44 | 465 | PMKID_KDE, |
lypinator | 0:bb348c97df44 | 466 | SMK_KDE, |
lypinator | 0:bb348c97df44 | 467 | NONCE_KDE, |
lypinator | 0:bb348c97df44 | 468 | LIFETIME_KDE, |
lypinator | 0:bb348c97df44 | 469 | ERROR_KDE, |
lypinator | 0:bb348c97df44 | 470 | IGTK_KDE, |
lypinator | 0:bb348c97df44 | 471 | KEY_ID_KDE, |
lypinator | 0:bb348c97df44 | 472 | } cbAP_KdeType; |
lypinator | 0:bb348c97df44 | 473 | |
lypinator | 0:bb348c97df44 | 474 | |
lypinator | 0:bb348c97df44 | 475 | /** |
lypinator | 0:bb348c97df44 | 476 | * Ethernet header |
lypinator | 0:bb348c97df44 | 477 | * |
lypinator | 0:bb348c97df44 | 478 | * @ingroup wlantypes |
lypinator | 0:bb348c97df44 | 479 | */ |
lypinator | 0:bb348c97df44 | 480 | cb_PACKED_STRUCT_BEGIN(cbWLAN_EthernetHeader) { |
lypinator | 0:bb348c97df44 | 481 | cbWLAN_MACAddress dest; |
lypinator | 0:bb348c97df44 | 482 | cbWLAN_MACAddress src; |
lypinator | 0:bb348c97df44 | 483 | cb_uint16 type; |
lypinator | 0:bb348c97df44 | 484 | } cb_PACKED_STRUCT_END(cbWLAN_EthernetHeader); |
lypinator | 0:bb348c97df44 | 485 | |
lypinator | 0:bb348c97df44 | 486 | |
lypinator | 0:bb348c97df44 | 487 | cb_PACKED_STRUCT_BEGIN(cbWLAN_EthernetFrame) { |
lypinator | 0:bb348c97df44 | 488 | cbWLAN_EthernetHeader header; |
lypinator | 0:bb348c97df44 | 489 | cb_uint8 payload[cb_EMPTY_ARRAY]; |
lypinator | 0:bb348c97df44 | 490 | } cb_PACKED_STRUCT_END(cbWLAN_EthernetFrame); |
lypinator | 0:bb348c97df44 | 491 | |
lypinator | 0:bb348c97df44 | 492 | /** |
lypinator | 0:bb348c97df44 | 493 | * SNAP header |
lypinator | 0:bb348c97df44 | 494 | * |
lypinator | 0:bb348c97df44 | 495 | * @ingroup wlantypes |
lypinator | 0:bb348c97df44 | 496 | */ |
lypinator | 0:bb348c97df44 | 497 | cb_PACKED_STRUCT_BEGIN(cbWLAN_SNAPHeader) { |
lypinator | 0:bb348c97df44 | 498 | cb_uint8 dsap; |
lypinator | 0:bb348c97df44 | 499 | cb_uint8 ssap; |
lypinator | 0:bb348c97df44 | 500 | cb_uint8 ctrl; |
lypinator | 0:bb348c97df44 | 501 | cb_uint8 encapsulation[3]; |
lypinator | 0:bb348c97df44 | 502 | cb_uint16 ethType; |
lypinator | 0:bb348c97df44 | 503 | } cb_PACKED_STRUCT_END(cbWLAN_SNAPHeader); |
lypinator | 0:bb348c97df44 | 504 | |
lypinator | 0:bb348c97df44 | 505 | cb_PACKED_STRUCT_BEGIN(cbWLAN_SNAPFrame) { |
lypinator | 0:bb348c97df44 | 506 | cbWLAN_SNAPHeader header; |
lypinator | 0:bb348c97df44 | 507 | cb_uint8 payload[cb_EMPTY_ARRAY]; |
lypinator | 0:bb348c97df44 | 508 | } cb_PACKED_STRUCT_END(cbWLAN_SNAPFrame); |
lypinator | 0:bb348c97df44 | 509 | |
lypinator | 0:bb348c97df44 | 510 | |
lypinator | 0:bb348c97df44 | 511 | /** |
lypinator | 0:bb348c97df44 | 512 | * Defines an ssid. |
lypinator | 0:bb348c97df44 | 513 | * |
lypinator | 0:bb348c97df44 | 514 | * @ingroup wlantypes |
lypinator | 0:bb348c97df44 | 515 | */ |
lypinator | 0:bb348c97df44 | 516 | typedef struct cbWLAN_Ssid_s { |
lypinator | 0:bb348c97df44 | 517 | cb_uint8 ssid[cbWLAN_SSID_MAX_LENGTH]; |
lypinator | 0:bb348c97df44 | 518 | cb_uint32 ssidLength; |
lypinator | 0:bb348c97df44 | 519 | } cbWLAN_Ssid; |
lypinator | 0:bb348c97df44 | 520 | |
lypinator | 0:bb348c97df44 | 521 | /** |
lypinator | 0:bb348c97df44 | 522 | * Defines one wep key. |
lypinator | 0:bb348c97df44 | 523 | * |
lypinator | 0:bb348c97df44 | 524 | * @ingroup wlantypes |
lypinator | 0:bb348c97df44 | 525 | */ |
lypinator | 0:bb348c97df44 | 526 | typedef struct cbWLAN_WepKey_s { |
lypinator | 0:bb348c97df44 | 527 | cb_uint8 key[cbWLAN_KEY_SIZE_WEP_MAX]; |
lypinator | 0:bb348c97df44 | 528 | cb_uint32 length; |
lypinator | 0:bb348c97df44 | 529 | } cbWLAN_WEPKey; |
lypinator | 0:bb348c97df44 | 530 | |
lypinator | 0:bb348c97df44 | 531 | /** |
lypinator | 0:bb348c97df44 | 532 | * Describes host revisions. |
lypinator | 0:bb348c97df44 | 533 | * @see cbWM_Version |
lypinator | 0:bb348c97df44 | 534 | * |
lypinator | 0:bb348c97df44 | 535 | * @ingroup types |
lypinator | 0:bb348c97df44 | 536 | */ |
lypinator | 0:bb348c97df44 | 537 | typedef struct { |
lypinator | 0:bb348c97df44 | 538 | struct { |
lypinator | 0:bb348c97df44 | 539 | cb_uint32 major; |
lypinator | 0:bb348c97df44 | 540 | cb_uint32 minor; |
lypinator | 0:bb348c97df44 | 541 | cb_uint32 patch1; |
lypinator | 0:bb348c97df44 | 542 | } software; |
lypinator | 0:bb348c97df44 | 543 | struct { |
lypinator | 0:bb348c97df44 | 544 | const char* id; |
lypinator | 0:bb348c97df44 | 545 | } manufacturer; |
lypinator | 0:bb348c97df44 | 546 | } cbWM_DriverRevision; |
lypinator | 0:bb348c97df44 | 547 | |
lypinator | 0:bb348c97df44 | 548 | /** |
lypinator | 0:bb348c97df44 | 549 | * Describes firmware revisions. |
lypinator | 0:bb348c97df44 | 550 | * @see cbWM_Version |
lypinator | 0:bb348c97df44 | 551 | * |
lypinator | 0:bb348c97df44 | 552 | * @ingroup types |
lypinator | 0:bb348c97df44 | 553 | */ |
lypinator | 0:bb348c97df44 | 554 | typedef struct { |
lypinator | 0:bb348c97df44 | 555 | struct { |
lypinator | 0:bb348c97df44 | 556 | cb_uint32 major; |
lypinator | 0:bb348c97df44 | 557 | cb_uint32 minor; |
lypinator | 0:bb348c97df44 | 558 | cb_uint32 patch1; |
lypinator | 0:bb348c97df44 | 559 | cb_uint32 patch2; |
lypinator | 0:bb348c97df44 | 560 | } firmware; |
lypinator | 0:bb348c97df44 | 561 | struct { |
lypinator | 0:bb348c97df44 | 562 | const char* id; |
lypinator | 0:bb348c97df44 | 563 | } manufacturer; |
lypinator | 0:bb348c97df44 | 564 | } cbWM_FWRevision; |
lypinator | 0:bb348c97df44 | 565 | |
lypinator | 0:bb348c97df44 | 566 | /** |
lypinator | 0:bb348c97df44 | 567 | * Describes firmware revisions. Is divided into three parts; one for the |
lypinator | 0:bb348c97df44 | 568 | * host driver side, one for target firmware, and one information string |
lypinator | 0:bb348c97df44 | 569 | * descibing the HW manufacturer. |
lypinator | 0:bb348c97df44 | 570 | * |
lypinator | 0:bb348c97df44 | 571 | * @ingroup types |
lypinator | 0:bb348c97df44 | 572 | */ |
lypinator | 0:bb348c97df44 | 573 | typedef struct version_st{ |
lypinator | 0:bb348c97df44 | 574 | cbWM_DriverRevision host; |
lypinator | 0:bb348c97df44 | 575 | cbWM_FWRevision target; |
lypinator | 0:bb348c97df44 | 576 | } cbWM_Version; |
lypinator | 0:bb348c97df44 | 577 | |
lypinator | 0:bb348c97df44 | 578 | /** |
lypinator | 0:bb348c97df44 | 579 | * Describes power levels for dynamic power level control. |
lypinator | 0:bb348c97df44 | 580 | * |
lypinator | 0:bb348c97df44 | 581 | * @ingroup types |
lypinator | 0:bb348c97df44 | 582 | */ |
lypinator | 0:bb348c97df44 | 583 | typedef struct cbWM_TxPowerSettings_s { |
lypinator | 0:bb348c97df44 | 584 | cbWLAN_TxPower lowTxPowerLevel; |
lypinator | 0:bb348c97df44 | 585 | cbWLAN_TxPower medTxPowerLevel; |
lypinator | 0:bb348c97df44 | 586 | cbWLAN_TxPower maxTxPowerLevel; |
lypinator | 0:bb348c97df44 | 587 | } cbWM_TxPowerSettings; |
lypinator | 0:bb348c97df44 | 588 | |
lypinator | 0:bb348c97df44 | 589 | /** |
lypinator | 0:bb348c97df44 | 590 | * Describes the startup settings needed to boot properly. |
lypinator | 0:bb348c97df44 | 591 | * |
lypinator | 0:bb348c97df44 | 592 | * @ingroup types |
lypinator | 0:bb348c97df44 | 593 | */ |
lypinator | 0:bb348c97df44 | 594 | typedef struct cbWM_BootParameters_s { |
lypinator | 0:bb348c97df44 | 595 | cbWM_TxPowerSettings txPowerSettings; |
lypinator | 0:bb348c97df44 | 596 | cb_uint8 primaryAntenna; |
lypinator | 0:bb348c97df44 | 597 | cb_uint8 numberOfAntennas; |
lypinator | 0:bb348c97df44 | 598 | } cbWM_BootParameters; |
lypinator | 0:bb348c97df44 | 599 | |
lypinator | 0:bb348c97df44 | 600 | /** |
lypinator | 0:bb348c97df44 | 601 | * Describes an access point. |
lypinator | 0:bb348c97df44 | 602 | * |
lypinator | 0:bb348c97df44 | 603 | * @ingroup types |
lypinator | 0:bb348c97df44 | 604 | */ |
lypinator | 0:bb348c97df44 | 605 | typedef struct cbWLAN_ApInformation { |
lypinator | 0:bb348c97df44 | 606 | cbWLAN_Ssid ssid; /**< SSID */ |
lypinator | 0:bb348c97df44 | 607 | cbWLAN_MACAddress bssid; /**< BSSID */ |
lypinator | 0:bb348c97df44 | 608 | cbWLAN_Channel channel; /**< Channel */ |
lypinator | 0:bb348c97df44 | 609 | } cbWLAN_ApInformation; |
lypinator | 0:bb348c97df44 | 610 | |
lypinator | 0:bb348c97df44 | 611 | /** |
lypinator | 0:bb348c97df44 | 612 | * Describes a station connected to an access point. |
lypinator | 0:bb348c97df44 | 613 | * |
lypinator | 0:bb348c97df44 | 614 | * @ingroup types |
lypinator | 0:bb348c97df44 | 615 | */ |
lypinator | 0:bb348c97df44 | 616 | typedef struct cbWLAN_ApStaInformation { |
lypinator | 0:bb348c97df44 | 617 | cbWLAN_MACAddress MAC; |
lypinator | 0:bb348c97df44 | 618 | } cbWLAN_ApStaInformation; |
lypinator | 0:bb348c97df44 | 619 | |
lypinator | 0:bb348c97df44 | 620 | typedef struct cbWLAN_HTCapabilities_st { |
lypinator | 0:bb348c97df44 | 621 | cbWLAN_RateMask rates; |
lypinator | 0:bb348c97df44 | 622 | cb_uint16 info; |
lypinator | 0:bb348c97df44 | 623 | } cbWLAN_HTCapabilities; |
lypinator | 0:bb348c97df44 | 624 | /*--------------------------------------------------------------------------- |
lypinator | 0:bb348c97df44 | 625 | * VARIABLE DECLARATIONS |
lypinator | 0:bb348c97df44 | 626 | *-------------------------------------------------------------------------*/ |
lypinator | 0:bb348c97df44 | 627 | extern const cbWLAN_MACAddress nullMac; |
lypinator | 0:bb348c97df44 | 628 | extern const cbWLAN_MACAddress broadcastMac; |
lypinator | 0:bb348c97df44 | 629 | |
lypinator | 0:bb348c97df44 | 630 | extern const cb_uint8 OUI_Microsoft[cbWLAN_OUI_SIZE]; |
lypinator | 0:bb348c97df44 | 631 | extern const cb_uint8 OUI_Epigram[cbWLAN_OUI_SIZE]; |
lypinator | 0:bb348c97df44 | 632 | extern const cb_uint8 OUI_ConnectBlue[cbWLAN_OUI_SIZE]; |
lypinator | 0:bb348c97df44 | 633 | extern const cb_uint8 OUI_IEEE8021[cbWLAN_OUI_SIZE]; |
lypinator | 0:bb348c97df44 | 634 | |
lypinator | 0:bb348c97df44 | 635 | extern const cb_uint8 PATTERN_TKIP[2]; |
lypinator | 0:bb348c97df44 | 636 | extern const cb_uint8 PATTERN_WME_IE[3]; |
lypinator | 0:bb348c97df44 | 637 | extern const cb_uint8 PATTERN_WME_PE[3]; |
lypinator | 0:bb348c97df44 | 638 | |
lypinator | 0:bb348c97df44 | 639 | /*--------------------------------------------------------------------------- |
lypinator | 0:bb348c97df44 | 640 | * FUNCTIONS |
lypinator | 0:bb348c97df44 | 641 | *-------------------------------------------------------------------------*/ |
lypinator | 0:bb348c97df44 | 642 | |
lypinator | 0:bb348c97df44 | 643 | /** |
lypinator | 0:bb348c97df44 | 644 | * Misc |
lypinator | 0:bb348c97df44 | 645 | */ |
lypinator | 0:bb348c97df44 | 646 | |
lypinator | 0:bb348c97df44 | 647 | /** |
lypinator | 0:bb348c97df44 | 648 | * Returns the correct frequency @ref cbWLAN_Band band based on the input channel. |
lypinator | 0:bb348c97df44 | 649 | * |
lypinator | 0:bb348c97df44 | 650 | * For @ref cbWLAN_CHANNEL_ALL This function will return @ref cbWLAN_BAND_2_4GHz. |
lypinator | 0:bb348c97df44 | 651 | * |
lypinator | 0:bb348c97df44 | 652 | * @param channel The channel to be queried for band. |
lypinator | 0:bb348c97df44 | 653 | * @return The @ref cbWLAN_Band band for the requested channel. |
lypinator | 0:bb348c97df44 | 654 | */ |
lypinator | 0:bb348c97df44 | 655 | cbWLAN_Band cbWLAN_getBandFromChannel(cbWLAN_Channel channel); |
lypinator | 0:bb348c97df44 | 656 | |
lypinator | 0:bb348c97df44 | 657 | /** |
lypinator | 0:bb348c97df44 | 658 | * Returns the valid rates @ref cbWLAN_RateMask based for the channel. |
lypinator | 0:bb348c97df44 | 659 | * |
lypinator | 0:bb348c97df44 | 660 | * @param channel The channel to be queried for rates. |
lypinator | 0:bb348c97df44 | 661 | * @return The valid rates @ref cbWLAN_RateMask for the requested channel. |
lypinator | 0:bb348c97df44 | 662 | */ |
lypinator | 0:bb348c97df44 | 663 | cbWLAN_RateMask cbWLAN_getRatesForChannel(cbWLAN_Channel channel, cb_uint8 numberOfAntennas); |
lypinator | 0:bb348c97df44 | 664 | |
lypinator | 0:bb348c97df44 | 665 | /** |
lypinator | 0:bb348c97df44 | 666 | * Checks is the input rate is a 802.11n rate or not. |
lypinator | 0:bb348c97df44 | 667 | * |
lypinator | 0:bb348c97df44 | 668 | * @param rate The rate to check |
lypinator | 0:bb348c97df44 | 669 | * @return @ref TRUE if the input rate is an n-rate. @ref FALSE otherwise. |
lypinator | 0:bb348c97df44 | 670 | */ |
lypinator | 0:bb348c97df44 | 671 | cb_boolean cbWLAN_isNRate(cbWLAN_Rate rate); |
lypinator | 0:bb348c97df44 | 672 | |
lypinator | 0:bb348c97df44 | 673 | /** |
lypinator | 0:bb348c97df44 | 674 | * Checks if a channel is valid |
lypinator | 0:bb348c97df44 | 675 | * |
lypinator | 0:bb348c97df44 | 676 | * @return @ref TRUE if the channel is valid. @ref FALSE otherwise. |
lypinator | 0:bb348c97df44 | 677 | */ |
lypinator | 0:bb348c97df44 | 678 | cb_boolean cbWLAN_isValidChannel(cbWLAN_Channel channel); |
lypinator | 0:bb348c97df44 | 679 | |
lypinator | 0:bb348c97df44 | 680 | /** |
lypinator | 0:bb348c97df44 | 681 | * Checks if a channel is valid for HT40- |
lypinator | 0:bb348c97df44 | 682 | * |
lypinator | 0:bb348c97df44 | 683 | * @return @ref TRUE if the channel is valid. @ref FALSE otherwise. |
lypinator | 0:bb348c97df44 | 684 | */ |
lypinator | 0:bb348c97df44 | 685 | cb_boolean cbWLAN_isValidHT40MinusChannel(cbWLAN_Channel channel); |
lypinator | 0:bb348c97df44 | 686 | |
lypinator | 0:bb348c97df44 | 687 | /** |
lypinator | 0:bb348c97df44 | 688 | * Checks if a channel is valid for HT40+ |
lypinator | 0:bb348c97df44 | 689 | * |
lypinator | 0:bb348c97df44 | 690 | * @return @ref TRUE if the channel is valid. @ref FALSE otherwise. |
lypinator | 0:bb348c97df44 | 691 | */ |
lypinator | 0:bb348c97df44 | 692 | cb_boolean cbWLAN_isValidHT40PlusChannel(cbWLAN_Channel channel); |
lypinator | 0:bb348c97df44 | 693 | |
lypinator | 0:bb348c97df44 | 694 | #ifdef __cplusplus |
lypinator | 0:bb348c97df44 | 695 | } |
lypinator | 0:bb348c97df44 | 696 | #endif |
lypinator | 0:bb348c97df44 | 697 | |
lypinator | 0:bb348c97df44 | 698 | #endif |
lypinator | 0:bb348c97df44 | 699 |