OLD | NEW |
(Empty) | |
| 1 //------------------------------------------------------------------------------ |
| 2 // <copyright file="wmi_thin.h" company="Atheros"> |
| 3 // Copyright (c) 2004-2008 Atheros Corporation. All rights reserved. |
| 4 // |
| 5 // This program is free software; you can redistribute it and/or modify |
| 6 // it under the terms of the GNU General Public License version 2 as |
| 7 // published by the Free Software Foundation; |
| 8 // |
| 9 // Software distributed under the License is distributed on an "AS |
| 10 // IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or |
| 11 // implied. See the License for the specific language governing |
| 12 // rights and limitations under the License. |
| 13 // |
| 14 // |
| 15 //------------------------------------------------------------------------------ |
| 16 //============================================================================== |
| 17 // Author(s): ="Atheros" |
| 18 //============================================================================== |
| 19 |
| 20 /* |
| 21 * This file contains the definitions of the WMI protocol specified in the |
| 22 * Wireless Module Interface (WMI). It includes definitions of all the |
| 23 * commands and events. Commands are messages from the host to the WM. |
| 24 * Events and Replies are messages from the WM to the host. |
| 25 * |
| 26 * Ownership of correctness in regards to WMI commands |
| 27 * belongs to the host driver and the WM is not required to validate |
| 28 * parameters for value, proper range, or any other checking. |
| 29 * |
| 30 */ |
| 31 |
| 32 #ifndef _WMI_THIN_H_ |
| 33 #define _WMI_THIN_H_ |
| 34 |
| 35 #ifdef __cplusplus |
| 36 extern "C" { |
| 37 #endif |
| 38 |
| 39 |
| 40 typedef enum { |
| 41 WMI_THIN_CONFIG_CMDID = 0x8000, // WMI_THIN_RESERVED_START |
| 42 WMI_THIN_SET_MIB_CMDID, |
| 43 WMI_THIN_GET_MIB_CMDID, |
| 44 WMI_THIN_JOIN_CMDID, |
| 45 } WMI_THIN_COMMAND_ID; |
| 46 |
| 47 typedef enum{ |
| 48 TEMPLATE_FRM_FIRST = 0, |
| 49 TEMPLATE_FRM_PROBE_REQ =TEMPLATE_FRM_FIRST, |
| 50 TEMPLATE_FRM_BEACON, |
| 51 TEMPLATE_FRM_PROBE_RESP, |
| 52 TEMPLATE_FRM_NULL, |
| 53 TEMPLATE_FRM_QOS_NULL, |
| 54 TEMPLATE_FRM_PSPOLL, |
| 55 TEMPLATE_FRM_MAX |
| 56 }WMI_TEMPLATE_FRM_TYPE; |
| 57 |
| 58 /* TEMPLATE_FRM_LEN... represent the maximum allowable |
| 59 * data lengths (bytes) for each frame type */ |
| 60 #define TEMPLATE_FRM_LEN_PROBE_REQ (256) /* Symbian dictates a minimum of 256 f
or these 3 frame types */ |
| 61 #define TEMPLATE_FRM_LEN_BEACON (256) |
| 62 #define TEMPLATE_FRM_LEN_PROBE_RESP (256) |
| 63 #define TEMPLATE_FRM_LEN_NULL (32) |
| 64 #define TEMPLATE_FRM_LEN_QOS_NULL (32) |
| 65 #define TEMPLATE_FRM_LEN_PSPOLL (32) |
| 66 #define TEMPLATE_FRM_LEN_SUM (TEMPLATE_FRM_LEN_PROBE_REQ + TEMPLATE_FRM_LEN_BEAC
ON + TEMPLATE_FRM_LEN_PROBE_RESP + \ |
| 67 TEMPLATE_FRM_LEN_NULL + TEMPLATE_FRM_LEN_QOS_NULL + TEMPLATE_FRM_LEN
_PSPOLL) |
| 68 |
| 69 |
| 70 /* MAC Header Build Rules */ |
| 71 /* These values allow the host to configure the |
| 72 * target code that is responsible for constructing |
| 73 * the MAC header. In cases where the MAC header |
| 74 * is provided by the host framework, the target |
| 75 * has a diminished responsibility over what fields |
| 76 * it must write. This will vary from framework to framework. |
| 77 * Symbian requires different behavior from MAC80211 which |
| 78 * requires different behavior from MS Native Wifi. */ |
| 79 #define WMI_WRT_VER_TYPE 0x00000001 |
| 80 #define WMI_WRT_DURATION 0x00000002 |
| 81 #define WMI_WRT_DIRECTION 0x00000004 |
| 82 #define WMI_WRT_POWER 0x00000008 |
| 83 #define WMI_WRT_WEP 0x00000010 |
| 84 #define WMI_WRT_MORE 0x00000020 |
| 85 #define WMI_WRT_BSSID 0x00000040 |
| 86 #define WMI_WRT_QOS 0x00000080 |
| 87 #define WMI_WRT_SEQNO 0x00000100 |
| 88 #define WMI_GUARD_TX 0x00000200 /* prevents TX ops that are not allowed f
or a current state */ |
| 89 #define WMI_WRT_DEFAULT_CONFIG (WMI_WRT_VER_TYPE | WMI_WRT_DURATION | WMI_WRT_D
IRECTION | \ |
| 90 WMI_WRT_POWER | WMI_WRT_MORE | WMI_WRT_WEP | WM
I_WRT_BSSID | \ |
| 91 WMI_WRT_QOS | WMI_WRT_SEQNO | WMI_GUARD_TX) |
| 92 |
| 93 /* WMI_THIN_CONFIG_TXCOMPLETE -- Used to configure the params and content for |
| 94 * TX Complete messages the will come from the Target. these messages are |
| 95 * disabled by default but can be enabled using this structure and the |
| 96 * WMI_THIN_CONFIG_CMDID. */ |
| 97 typedef PREPACK struct { |
| 98 A_UINT8 version; /* the versioned type of messages to use or 0 to disabl
e */ |
| 99 A_UINT8 countThreshold; /* msg count threshold triggering a tx complete
message */ |
| 100 A_UINT16 timeThreshold; /* timeout interval in MSEC triggering a tx compl
ete message */ |
| 101 } POSTPACK WMI_THIN_CONFIG_TXCOMPLETE; |
| 102 |
| 103 /* WMI_THIN_CONFIG_DECRYPT_ERR -- Used to configure behavior for received frames
|
| 104 * that have decryption errors. The default behavior is to discard the frame |
| 105 * without notification. Alternately, the MAC Header is forwarded to the host |
| 106 * with the failed status. */ |
| 107 typedef PREPACK struct { |
| 108 A_UINT8 enable; /* 1 == send decrypt errors to the host, 0 == don't */ |
| 109 A_UINT8 reserved[3]; /* align padding */ |
| 110 } POSTPACK WMI_THIN_CONFIG_DECRYPT_ERR; |
| 111 |
| 112 /* WMI_THIN_CONFIG_TX_MAC_RULES -- Used to configure behavior for transmitted |
| 113 * frames that require partial MAC header construction. These rules |
| 114 * are used by the target to indicate which fields need to be written. */ |
| 115 typedef PREPACK struct { |
| 116 A_UINT32 rules; /* combination of WMI_WRT_... values */ |
| 117 } POSTPACK WMI_THIN_CONFIG_TX_MAC_RULES; |
| 118 |
| 119 /* WMI_THIN_CONFIG_RX_FILTER_RULES -- Used to configure behavior for received |
| 120 * frames as to which frames should get forwarded to the host and which |
| 121 * should get processed internally. */ |
| 122 typedef PREPACK struct { |
| 123 A_UINT32 rules; /* combination of WMI_FILT_... values */ |
| 124 } POSTPACK WMI_THIN_CONFIG_RX_FILTER_RULES; |
| 125 |
| 126 /* WMI_THIN_CONFIG_CMD -- Used to contain some combination of the above |
| 127 * WMI_THIN_CONFIG_... structures. The actual combination is indicated |
| 128 * by the value of cfgField. Each bit in this field corresponds to |
| 129 * one of the above structures. */ |
| 130 typedef PREPACK struct { |
| 131 #define WMI_THIN_CFG_TXCOMP 0x00000001 |
| 132 #define WMI_THIN_CFG_DECRYPT 0x00000002 |
| 133 #define WMI_THIN_CFG_MAC_RULES 0x00000004 |
| 134 #define WMI_THIN_CFG_FILTER_RULES 0x00000008 |
| 135 A_UINT32 cfgField; /* combination of WMI_THIN_CFG_... describes content
s of config command */ |
| 136 A_UINT16 length; /* length in bytes of appended sub-commands */
|
| 137 A_UINT8 reserved[2]; /* align padding */ |
| 138 } POSTPACK WMI_THIN_CONFIG_CMD; |
| 139 |
| 140 /* MIB Access Identifiers tailored for Symbian. */ |
| 141 enum { |
| 142 MIB_ID_STA_MAC = 1, // [READONLY] |
| 143 MIB_ID_RX_LIFE_TIME, // [NOT IMPLEMENTED] |
| 144 MIB_ID_SLOT_TIME, // [READ/WRITE] |
| 145 MIB_ID_RTS_THRESHOLD, // [READ/WRITE] |
| 146 MIB_ID_CTS_TO_SELF, // [READ/WRITE] |
| 147 MIB_ID_TEMPLATE_FRAME, // [WRITE ONLY] |
| 148 MIB_ID_RXFRAME_FILTER, // [READ/WRITE] |
| 149 MIB_ID_BEACON_FILTER_TABLE, // [WRITE ONLY] |
| 150 MIB_ID_BEACON_FILTER, // [READ/WRITE] |
| 151 MIB_ID_BEACON_LOST_COUNT, // [WRITE ONLY] |
| 152 MIB_ID_RSSI_THRESHOLD, // [WRITE ONLY] |
| 153 MIB_ID_HT_CAP, // [NOT IMPLEMENTED] |
| 154 MIB_ID_HT_OP, // [NOT IMPLEMENTED] |
| 155 MIB_ID_HT_2ND_BEACON, // [NOT IMPLEMENTED] |
| 156 MIB_ID_HT_BLOCK_ACK, // [NOT IMPLEMENTED] |
| 157 MIB_ID_PREAMBLE, // [READ/WRITE] |
| 158 /*MIB_ID_GROUP_ADDR_TABLE,*/ |
| 159 /*MIB_ID_WEP_DEFAULT_KEY_ID */ |
| 160 /*MIB_ID_TX_POWER */ |
| 161 /*MIB_ID_ARP_IP_TABLE */ |
| 162 /*MIB_ID_SLEEP_MODE */ |
| 163 /*MIB_ID_WAKE_INTERVAL*/ |
| 164 /*MIB_ID_STAT_TABLE*/ |
| 165 /*MIB_ID_IBSS_PWR_SAVE*/ |
| 166 /*MIB_ID_COUNTERS_TABLE*/ |
| 167 /*MIB_ID_ETHERTYPE_FILTER*/ |
| 168 /*MIB_ID_BC_UDP_FILTER*/ |
| 169 |
| 170 }; |
| 171 |
| 172 typedef PREPACK struct { |
| 173 A_UINT8 addr[ATH_MAC_LEN]; |
| 174 } POSTPACK WMI_THIN_MIB_STA_MAC; |
| 175 |
| 176 typedef PREPACK struct { |
| 177 A_UINT32 time; // units == msec |
| 178 } POSTPACK WMI_THIN_MIB_RX_LIFE_TIME; |
| 179 |
| 180 typedef PREPACK struct { |
| 181 A_UINT8 enable; //1 = on, 0 = off |
| 182 } POSTPACK WMI_THIN_MIB_CTS_TO_SELF; |
| 183 |
| 184 typedef PREPACK struct { |
| 185 A_UINT32 time; // units == usec |
| 186 } POSTPACK WMI_THIN_MIB_SLOT_TIME; |
| 187 |
| 188 typedef PREPACK struct { |
| 189 A_UINT16 length; //units == bytes |
| 190 } POSTPACK WMI_THIN_MIB_RTS_THRESHOLD; |
| 191 |
| 192 typedef PREPACK struct { |
| 193 A_UINT8 type; // type of frame |
| 194 A_UINT8 rate; // tx rate to be used (one of WMI_BIT_RATE) |
| 195 A_UINT16 length; // num bytes following this structure as the template data |
| 196 } POSTPACK WMI_THIN_MIB_TEMPLATE_FRAME; |
| 197 |
| 198 typedef PREPACK struct { |
| 199 #define FRAME_FILTER_PROMISCUOUS 0x00000001 |
| 200 #define FRAME_FILTER_BSSID 0x00000002 |
| 201 A_UINT32 filterMask; |
| 202 } POSTPACK WMI_THIN_MIB_RXFRAME_FILTER; |
| 203 |
| 204 |
| 205 #define IE_FILTER_TREATMENT_CHANGE 1 |
| 206 #define IE_FILTER_TREATMENT_APPEAR 2 |
| 207 |
| 208 typedef PREPACK struct { |
| 209 A_UINT8 ie; |
| 210 A_UINT8 treatment; |
| 211 } POSTPACK WMI_THIN_MIB_BEACON_FILTER_TABLE; |
| 212 |
| 213 typedef PREPACK struct { |
| 214 A_UINT8 ie; |
| 215 A_UINT8 treatment; |
| 216 A_UINT8 oui[3]; |
| 217 A_UINT8 type; |
| 218 A_UINT16 version; |
| 219 } POSTPACK WMI_THIN_MIB_BEACON_FILTER_TABLE_OUI; |
| 220 |
| 221 typedef PREPACK struct { |
| 222 A_UINT16 numElements; |
| 223 A_UINT8 entrySize; // sizeof(WMI_THIN_MIB_BEACON_FILTER_TABLE) on host cpu m
ay be 2 may be 4 |
| 224 A_UINT8 reserved; |
| 225 } POSTPACK WMI_THIN_MIB_BEACON_FILTER_TABLE_HEADER; |
| 226 |
| 227 typedef PREPACK struct { |
| 228 A_UINT32 count; /* num beacons between deliveries */ |
| 229 A_UINT8 enable; |
| 230 A_UINT8 reserved[3]; |
| 231 } POSTPACK WMI_THIN_MIB_BEACON_FILTER; |
| 232 |
| 233 typedef PREPACK struct { |
| 234 A_UINT32 count; /* num consec lost beacons after which send event */ |
| 235 } POSTPACK WMI_THIN_MIB_BEACON_LOST_COUNT; |
| 236 |
| 237 typedef PREPACK struct { |
| 238 A_UINT8 rssi; /* the low threshold which can trigger an event warning */ |
| 239 A_UINT8 tolerance; /* the range above and below the threshold to prevent eve
nt flooding to the host. */ |
| 240 A_UINT8 count; /* the sample count of consecutive frames necessary to trigge
r an event. */ |
| 241 A_UINT8 reserved[1]; /* padding */ |
| 242 } POSTPACK WMI_THIN_MIB_RSSI_THRESHOLD; |
| 243 |
| 244 |
| 245 typedef PREPACK struct { |
| 246 A_UINT32 cap; |
| 247 A_UINT32 rxRateField; |
| 248 A_UINT32 beamForming; |
| 249 A_UINT8 addr[ATH_MAC_LEN]; |
| 250 A_UINT8 enable; |
| 251 A_UINT8 stbc; |
| 252 A_UINT8 maxAMPDU; |
| 253 A_UINT8 msduSpacing; |
| 254 A_UINT8 mcsFeedback; |
| 255 A_UINT8 antennaSelCap; |
| 256 } POSTPACK WMI_THIN_MIB_HT_CAP; |
| 257 |
| 258 typedef PREPACK struct { |
| 259 A_UINT32 infoField; |
| 260 A_UINT32 basicRateField; |
| 261 A_UINT8 protection; |
| 262 A_UINT8 secondChanneloffset; |
| 263 A_UINT8 channelWidth; |
| 264 A_UINT8 reserved; |
| 265 } POSTPACK WMI_THIN_MIB_HT_OP; |
| 266 |
| 267 typedef PREPACK struct { |
| 268 #define SECOND_BEACON_PRIMARY 1 |
| 269 #define SECOND_BEACON_EITHER 2 |
| 270 #define SECOND_BEACON_SECONDARY 3 |
| 271 A_UINT8 cfg; |
| 272 A_UINT8 reserved[3]; /* padding */ |
| 273 } POSTPACK WMI_THIN_MIB_HT_2ND_BEACON; |
| 274 |
| 275 typedef PREPACK struct { |
| 276 A_UINT8 txTIDField; |
| 277 A_UINT8 rxTIDField; |
| 278 A_UINT8 reserved[2]; /* padding */ |
| 279 } POSTPACK WMI_THIN_MIB_HT_BLOCK_ACK; |
| 280 |
| 281 typedef PREPACK struct { |
| 282 A_UINT8 enableLong; // 1 == long preamble, 0 == short preamble |
| 283 A_UINT8 reserved[3]; |
| 284 } POSTPACK WMI_THIN_MIB_PREAMBLE; |
| 285 |
| 286 typedef PREPACK struct { |
| 287 A_UINT16 length; /* the length in bytes of the appended MIB data */ |
| 288 A_UINT8 mibID; /* the ID of the MIB element being set */ |
| 289 A_UINT8 reserved; /* align padding */ |
| 290 } POSTPACK WMI_THIN_SET_MIB_CMD; |
| 291 |
| 292 typedef PREPACK struct { |
| 293 A_UINT8 mibID; /* the ID of the MIB element being set */ |
| 294 A_UINT8 reserved[3]; /* align padding */ |
| 295 } POSTPACK WMI_THIN_GET_MIB_CMD; |
| 296 |
| 297 typedef PREPACK struct { |
| 298 A_UINT32 basicRateMask; /* bit mask of basic rates */ |
| 299 A_UINT32 beaconIntval; /* TUs */ |
| 300 A_UINT16 atimWindow; /* TUs */ |
| 301 A_UINT16 channel; /* frequency in Mhz */ |
| 302 A_UINT8 networkType; /* INFRA_NETWORK | ADHOC_NETWORK */ |
| 303 A_UINT8 ssidLength; /* 0 - 32 */ |
| 304 A_UINT8 probe; /* != 0 : issue probe req at start */ |
| 305 A_UINT8 reserved; /* alignment */ |
| 306 A_UCHAR ssid[WMI_MAX_SSID_LEN]; |
| 307 A_UINT8 bssid[ATH_MAC_LEN]; |
| 308 } POSTPACK WMI_THIN_JOIN_CMD; |
| 309 |
| 310 typedef PREPACK struct { |
| 311 A_UINT16 dtim; /* dtim interval in num beacons */ |
| 312 A_UINT16 aid; /* 80211 AID from Assoc resp */ |
| 313 } POSTPACK WMI_THIN_POST_ASSOC_CMD; |
| 314 |
| 315 #ifdef __cplusplus |
| 316 } |
| 317 #endif |
| 318 |
| 319 #endif /* _WMI_THIN_H_ */ |
OLD | NEW |