1 /**************************************************************************** 2 **+-----------------------------------------------------------------------+** 3 **| |** 4 **| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved. |** 5 **| All rights reserved. |** 6 **| |** 7 **| Redistribution and use in source and binary forms, with or without |** 8 **| modification, are permitted provided that the following conditions |** 9 **| are met: |** 10 **| |** 11 **| * Redistributions of source code must retain the above copyright |** 12 **| notice, this list of conditions and the following disclaimer. |** 13 **| * Redistributions in binary form must reproduce the above copyright |** 14 **| notice, this list of conditions and the following disclaimer in |** 15 **| the documentation and/or other materials provided with the |** 16 **| distribution. |** 17 **| * Neither the name Texas Instruments nor the names of its |** 18 **| contributors may be used to endorse or promote products derived |** 19 **| from this software without specific prior written permission. |** 20 **| |** 21 **| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |** 22 **| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |** 23 **| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |** 24 **| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |** 25 **| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |** 26 **| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |** 27 **| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |** 28 **| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |** 29 **| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |** 30 **| (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |** 31 **| OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |** 32 **| |** 33 **+-----------------------------------------------------------------------+** 34 ****************************************************************************/ 35 36 #ifndef __COMMON_TYPES_H__ 37 #define __COMMON_TYPES_H__ 38 39 #include "osTIType.h" 40 #include "osDot11.h" 41 #include "tiwlnif.h" 42 #include "paramMng.h" 43 #include "whalDefaultParams.h" 44 45 /***************************************************************************** 46 ** ** 47 ** ** 48 ** CONSTANTS ** 49 ** ** 50 ** ** 51 *****************************************************************************/ 52 53 /************************************/ 54 /* Report Module values */ 55 /************************************/ 56 57 #define CONFIG_MGR_MODULE_LOG (0x00) 58 #define SME_SM_MODULE_LOG (0x01) 59 #define SITE_MGR_MODULE_LOG (0x02) 60 #define CONN_MODULE_LOG (0x03) 61 #define MLME_SM_MODULE_LOG (0x04) 62 #define AUTH_MODULE_LOG (0x05) 63 #define ASSOC_MODULE_LOG (0x06) 64 #define RX_DATA_MODULE_LOG (0x07) 65 #define TX_DATA_MODULE_LOG (0x08) 66 #define CTRL_DATA_MODULE_LOG (0x09) 67 #define RSN_MODULE_LOG (0x0A) 68 #define HAL_RX_MODULE_LOG (0x0B) 69 #define HAL_TX_MODULE_LOG (0x0C) 70 #define HAL_CTRL_MODULE_LOG (0x0D) 71 #define HAL_SECURITY_MODULE_LOG (0x0E) 72 #define MEM_MGR_MODULE_LOG (0x0F) 73 #define REPORT_MODULE_LOG (0x10) 74 #define SITE_UPDATE_MODULE_LOG (0x11) 75 #define REGULATORY_DOMAIN_MODULE_LOG (0x12) 76 #define MEASUREMENT_MNGR_MODULE_LOG (0x13) 77 #define MEASUREMENT_SRV_MODULE_LOG (0x14) 78 #define SOFT_GEMINI_MODULE_LOG (0x15) 79 #define SC_MODULE_LOG (0x16) 80 #define EXC_MANAGER_MODULE_LOG (0x17) 81 #define ROAMING_MANAGER_MODULE_LOG (0x18) 82 #define QOS_MANAGER_MODULE_LOG (0x19) 83 #define TRAFFIC_ADM_CTRL_MODULE_LOG (0x1A) 84 #define POWER_MANAGER_MODULE_LOG (0x1B) 85 #define POWER_CONTROL_MODULE_LOG (0x1C) 86 #define POWER_SERVER_MODULE_LOG (0x1D) 87 #define ELP_MODULE_LOG (0x1E) 88 #define SCR_MODULE_LOG (0x1F) 89 #define SCAN_SRV_MODULE_LOG (0x20) 90 #define SCAN_CNCN_MODULE_LOG (0x21) 91 #define SCAN_MNGR_MODULE_LOG (0x22) 92 #define GWSI_ADAPT_MODULE_LOG (0x23) 93 #define GWSI_ADAPT_CB_MODULE_LOG (0x24) 94 #define CORE_ADAPT_MODULE_LOG (0x25) 95 #define TX_HW_QUEUE_MODULE_LOG (0x26) 96 #define TX_CTRL_BLK_MODULE_LOG (0x27) 97 #define TX_RESULT_MODULE_LOG (0x28) 98 #define TNETW_IF_MODULE_LOG (0x29) 99 #define TNETW_ARBITER_MODULE_LOG (0x2a) 100 #define CURR_BSS_MODULE_LOG (0x2b) 101 #define FW_EVENT_MODULE_LOG (0x2c) 102 #define CMD_MBOX_MODULE_LOG (0x2d) 103 #define CMDQUEUE_MODULE_LOG (0x2e) 104 #define EVENT_MBOX_MODULE_LOG (0x2f) 105 #define TNETW_DRV_MODULE_LOG (0x30) 106 #define TNETW_XFER_MODULE_LOG (0x31) 107 #define RECOVERY_MGR_MODULE_LOG (0x32) 108 #define RECOVERY_CTRL_MODULE_LOG (0x33) 109 #define HW_INIT_MODULE_LOG (0x34) 110 111 #define WLAN_MAX_LOG_MODULES (HW_INIT_MODULE_LOG + 1) 112 113 114 /************************************/ 115 /* Report Severity values */ 116 /************************************/ 117 #define WLAN_SEVERITY_INIT 1 118 #define WLAN_SEVERITY_INFORMATION 2 119 #define WLAN_SEVERITY_WARNING 3 120 #define WLAN_SEVERITY_ERROR 4 121 #define WLAN_SEVERITY_FATAL_ERROR 5 122 #define WLAN_SEVERITY_SM 6 123 #define WLAN_SEVERITY_CONSOLE 7 124 #define WLAN_SEVERITY_DEBUG_RX 8 125 #define WLAN_SEVERITY_DEBUG_TX 9 126 #define WLAN_SEVERITY_DEBUG_CONTROL 10 127 #define WLAN_SEVERITY_GWSI_RECORDING 11 128 129 #define WLAN_MAX_SEVERITIES (WLAN_SEVERITY_GWSI_RECORDING + 1) 130 131 132 133 #define MAX_INFO_ELEMENT_LEN (32) 134 135 #define IP_ADDR_LEN 4 136 #define IP_V4_ADDR_LEN 4 137 #define IP_V6_ADDR_LEN 6 138 139 140 #define MAX_MULTICAST_GROUP_ADDRS 8 141 142 143 #define NUM_OF_NOISE_HISTOGRAM_COUNTERS (8) 144 145 146 #define MAX_SUPPORTED_RATES 32 147 #define RATES_SET_LEN 2 148 149 #define MIN_DEFAULT_KEY_ID 0 150 #define MAX_DEFAULT_KEY_ID 3 151 152 #define KEY_RSC_LEN 8 153 154 #define MIN_KEY_LEN 5 155 #define MAX_KEY_LEN 32 156 157 #define MAX_IDENTITY_LEN 64 158 #define MAX_PASSWD_LEN 128 159 160 #define MAX_NUM_OUI 16 161 #define DOT11_OUI_LEN 3 162 163 /* The maximum number of multiple SSIDs that can be used in a single scan command */ 164 #define SCAN_MAX_SSID_NUM (1) 165 166 /* The maximum number of information elements that sent in an active scan probe request 167 including the SSID */ 168 #define SCAN_MAX_INFO_ELEMENTS (3) 169 170 /* WoneIndex value when running as station */ 171 #define STATION_WONE_INDEX (0) 172 173 /* Power translation table definitions */ 174 #define NUM_POWER_LEVELS (4) 175 #define MAX_POWER_LEVEL (0) 176 #define MIN_POWER_LEVEL (NUM_POWER_LEVELS - 1) 177 #define DBM_TO_TX_POWER_FACTOR 10 178 179 /* TX_POWER is in Dbm/10 units */ 180 #define MAX_TX_POWER 255 181 #define MIN_TX_POWER 0 182 #define NUM_SUB_BANDS_FOR_POWER_TABLE 5 183 #define BAND_2_4_POWER_TABLE 0 184 185 #define MAX_NUM_OF_TX_RATE_CLASS_POLICIES 8 /* max num of policies */ 186 #define MAX_PARAM_MODULE_NUMBER (GET_PARAM_MODULE_NUMBER(MAX_PARAM_MODULE_PARAM)) /*19*/ 187 #define FW_VERSION_LEN 20 188 #ifndef TI_STATUS 189 #define TI_STATUS systemStatus_e 190 #endif 191 #define NUM_OF_MAX_TRIPLET_CHANNEL (32) 192 #define COUNTRY_STRING_LEN 3 193 194 /* Definitions for Rx Filter MIB. */ 195 #define PLT_MIB_RX_FILTER_PROMISCOUS_SET (UINT8) 0x01 /* set Enable: Forward all frames to host driver*/ 196 #define PLT_MIB_RX_FILTER_PROMISCOUS_CLEAR (UINT8) 0x00 /* cleared Disable: Do not orward all frames to the host driver*/ 197 #define PLT_MIB_RX_FILTER_BSSID_SET (UINT8) 0x02 /* set filter enabled: receive only those frames that match the BSSID given in the Join command*/ 198 #define PLT_MIB_RX_FILTER_BSSID_CLEAR (UINT8) 0x00 /* cleared filter disabled: ignore BSSID in receiving*/ 199 200 201 202 /***************************************************************************** 203 ** ** 204 ** ** 205 ** ENUMS ** 206 ** ** 207 ** ** 208 *****************************************************************************/ 209 210 typedef enum 211 { 212 txPolicy54 = 0, 213 txPolicy48, 214 txPolicy36, 215 txPolicy24, 216 txPolicy22, 217 txPolicy18, 218 txPolicy12, 219 txPolicy11, 220 txPolicy9, 221 txPolicy6, 222 txPolicy5_5, 223 txPolicy2, 224 txPolicy1, 225 MAX_NUM_OF_TX_RATES_IN_CLASS 226 }txRateClassId_e; 227 228 229 typedef enum{ 230 DROP_NEW_PACKET = 0, 231 DROP_OLD_PACKET 232 }qOvFlowPolicy_e; 233 234 typedef enum 235 { 236 SG_ENABLE = 0, 237 SG_DISABLE , 238 SG_SENSE_NO_ACTIVITY , 239 SG_SENSE_ACTIVE 240 } SoftGeminiEnableModes_e; 241 242 243 typedef enum 244 { 245 IP_VER_4 = 0, 246 IP_VER_6 247 } IPver_e; 248 249 typedef enum 250 { 251 DRV_MODULATION_NONE = 0, 252 DRV_MODULATION_CCK = 1, 253 DRV_MODULATION_PBCC = 2, 254 DRV_MODULATION_QPSK = 3, 255 DRV_MODULATION_OFDM = 4, 256 } modulationType_e; 257 258 /* tx antenna */ 259 typedef enum 260 { 261 TX_ANTENNA_2 = 0, 262 TX_ANTENNA_1 = 1 263 } txAntenna_e; 264 265 /* rx antenna */ 266 typedef enum 267 { 268 RX_ANTENNA_1 = 0, 269 RX_ANTENNA_2 = 1, 270 RX_ANTENNA_FULL = 2, 271 RX_ANTENNA_PARTIAL = 3 272 } rxAntenna_e; 273 274 typedef enum 275 { 276 HW_CLOCK_40_MHZ = 40, 277 HW_CLOCK_80_MHZ = 80 278 } hwClock_e; 279 280 typedef enum 281 { 282 MAXIM = 0, 283 RFMD = 1, 284 RADIA_BG = 2, 285 RADIA_ABG = 3, 286 UNKNOWN_RADIO_TYPE = 4 287 } radioType_e; 288 289 /** Available cipher suites for admission control */ 290 typedef enum 291 { 292 RSN_CIPHER_NONE = 0, /**< no chpiher suite */ 293 RSN_CIPHER_WEP = 1, /**< WEP-40 chpiher suite */ 294 RSN_CIPHER_TKIP = 2, /**< TKIP chpiher suite */ 295 RSN_CIPHER_AES_WRAP = 3, /**< AES WRAP chpiher suite */ 296 RSN_CIPHER_AES_CCMP = 4, /**< AES CCMP chpiher suite */ 297 RSN_CIPHER_WEP104 = 5, /**< WEP-104 chpiher suite */ 298 RSN_CIPHER_CKIP = 6, /**< CKIP chpiher suite */ 299 RSN_CIPHER_UNKNOWN = 255 /**< UNKNOWN chpiher suite */ 300 } cipherSuite_e; 301 302 303 /** RSN supported authentication suites */ 304 typedef enum 305 { 306 RSN_AUTH_OPEN = 0, /*< Legacy Open authentication suite */ 307 RSN_AUTH_SHARED_KEY = 1, /*< Legacy Shared Key authentication suite */ 308 RSN_AUTH_AUTO_SWITCH = 2, /*< Automatic authentication suite */ 309 RSN_AUTH_NONE = 255 /*< no authentication suite */ 310 } authSuite_e; 311 312 /* Available External authentication modes for admission control */ 313 typedef enum 314 { 315 RSN_EXT_AUTH_MODE_OPEN = RSN_AUTH_OPEN, 316 RSN_EXT_AUTH_MODE_SHARED_KEY = RSN_AUTH_SHARED_KEY, 317 RSN_EXT_AUTH_MODE_AUTO_SWITCH = RSN_AUTH_AUTO_SWITCH, 318 RSN_EXT_AUTH_MODE_WPA, 319 RSN_EXT_AUTH_MODE_WPAPSK, 320 RSN_EXT_AUTH_MODE_WPANONE, 321 RSN_EXT_AUTH_MODE_WPA2, 322 RSN_EXT_AUTH_MODE_WPA2PSK, 323 RSN_EXT_AUTH_MODEMAX /* Not a real mode, defined as upper bound */ 324 } externalAuthMode_e; 325 326 typedef enum 327 { 328 RSN_AUTH_STATUS_INVALID_TYPE = 0x0001, 329 RSN_AUTH_STATUS_TIMEOUT = 0x0002, 330 RSN_AUTH_STATUS_CHALLENGE_FROM_AP_FAILED = 0x0003, 331 RSN_AUTH_STATUS_CHALLENGE_TO_AP_FAILED = 0x0004 332 } authStatus_e; 333 334 /************************************/ 335 /* System return values. */ 336 /************************************/ 337 #undef OK 338 #undef NOK 339 340 typedef enum 341 { 342 /* System section */ 343 #if !defined(OK) || (OK!=0) 344 OK = 0, 345 #endif 346 #if !defined(NOK) || (NOK!=1) 347 NOK = 1, 348 #endif 349 /* GWSI status */ 350 GWSI_FAILED = 1, 351 PARAM_NOT_SUPPORTED = 2, 352 PARAM_VALUE_NOT_VALID = 3, 353 CONFIGURATION_NOT_VALID = 4, 354 NO_SITE_SELECTED_YET = 5, 355 RE_SCAN_NEEDED = 6, 356 EXTERNAL_SET_PARAM_DENIED = 7, 357 EXTERNAL_GET_PARAM_DENIED = 8, 358 PARAM_MODULE_NUMBER_INVALID = 9, 359 STATION_IS_NOT_RUNNING = 10, 360 CARD_IS_NOT_INSTALLED = 11, 361 362 /* Data path section */ 363 RX_MIC_FAILURE_ERROR = 12, 364 RX_DECRYPT_FAILURE = 13, 365 RX_STATUS_FAILURE = 14, 366 TX_QUEUE_SELECTED_OK = 15, 367 NO_TX_QUEUE_SELECTED = 16, 368 TX_STATUS_PENDING = 17, 369 TX_STATUS_NO_RESOURCES = 18, 370 TX_STATUS_FAILURE = 19, 371 TX_STATUS_OK = 20, 372 373 /* 4x section */ 374 MAKE_CONCATENATION = 21, 375 SEND_ONE_MSDU = 22, 376 DO_NOT_SEND_MSDU = 23, 377 FOUR_X_DISABLE = 24, 378 379 /* Scanning section */ 380 NO_COUNTRY = 25, 381 SCAN_ALREADY_IN_PROGRESS = 26, 382 NO_SCAN_IN_PROGRESS = 27, 383 384 /* Setting same power */ 385 TX_POWER_SET_SAME_VALUE = 28, 386 /* changing service channel */ 387 CHANNEL_CHANGED = 29, 388 SUPPORT_IMMEDIATE_MEASUREMENT_ONLY = 30, 389 MEASUREMENT_TYPE_NOT_SUPPORT = 31, 390 MEASUREMENT_CAN_NOT_EXECUTED_IN_PARALLEL = 32, 391 MEASUREMENT_REQUEST_IGNORED = 33, 392 CANNOT_SET_MEASUREMENT_PARAM_WHEN_ACTIVATED = 34, 393 CANNOT_SET_CHANNEL_THAT_IS_NOT_SUPPORTED = 35, 394 395 /* rsn */ 396 STATUS_BAD_KEY_PARAM = 36, 397 STATUS_RX_MIC_FAIL = 37, 398 399 /* site Manager */ 400 STATUS_FIRST_PRIMARY_SITE_SET = 38, 401 402 /* 403 Power Management 404 */ 405 POWER_SAVE_802_11_SUCCESS = 39, 406 POWER_SAVE_802_11_FAIL = 40, 407 POWER_SAVE_802_11_NOT_ALLOWED = 41, 408 PENDING = 42, 409 410 /* GWSI TX packet sending status */ 411 SEND_COMPLETE_SUCCESS = 44, 412 SEND_COMPLETE_RETRY_EXCEEDED = 45, 413 SEND_COMPLETE_LIFETIME_EXCEEDED = 46, 414 SEND_COMPLETE_NO_LINK = 47, 415 SEND_COMPLETE_MAC_CRASHED = 48, 416 /*POWER_SAVE_802_11_NOT_ALLOWED = 39,*/ 417 POWER_SAVE_802_11_IS_CURRENT = 49, 418 419 /* GWSI TX Send-Packet status */ 420 SEND_PACKET_XFER_DONE = 50, /* Xfer completed, another packet can be sent, Xfer-Done won't be called. */ 421 SEND_PACKET_SUCCESS = 51, /* Xfer in process, another packet can be sent, Xfer-Done will be called. */ 422 SEND_PACKET_PENDING = 52, /* Xfer in process, another packet CAN-NOT be sent. Xfer-Done will be called. */ 423 SEND_PACKET_BUSY = 53, /* Packet rejected due to queue lack of resources. 424 Should be sent again after resources are freed on Tx-complete. */ 425 SEND_PACKET_ERROR = 54, /* Packet rejected due to API violation (sending in PENDING state or wrong params. */ 426 SEND_PACKET_RECOVERY = 55, /* Recovery happened during Xfer */ 427 428 /* QoSMngr */ 429 TI_WLAN_QOS_RETURN_CODES, /* detailed in tiQosTypes.h */ 430 431 /* TNETWIF Return Errors */ 432 TNETWIF_NONE, 433 TNETWIF_OK, 434 TNETWIF_COMPLETE, 435 TNETWIF_PENDING, 436 TNETWIF_ERROR, 437 TNETWIF_MORE, 438 439 /* Rx Data Filters */ 440 RX_NO_AVAILABLE_FILTERS, 441 RX_FILTER_ALREADY_EXISTS, 442 RX_FILTER_DOES_NOT_EXIST, 443 444 /* Soft Gemini */ 445 SG_REJECT_MEAS_SG_ACTIVE, 446 447 } systemStatus_e; 448 449 typedef enum 450 { 451 NO_FAILURE = -1, 452 NO_SCAN_COMPLETE_FAILURE = 0, 453 MBOX_FAILURE, 454 HW_AWAKE_FAILURE, 455 BUS_ERROR, 456 DEVICE_ERROR, 457 TX_STUCK, 458 DISCONNECT_TIMEOUT, 459 POWER_SAVE_FAILURE, 460 MEASUREMENT_FAILURE, 461 MAX_FAILURE_EVENTS 462 } failureEvent_e; 463 464 /** \enum TnetWakeOn_e */ 465 typedef enum 466 { 467 468 TNET_WAKE_ON_BEACON, /**< Indicate the wake on event of the HW - beacon. 469 * In this event the HW configure to be awake on every beacon. 470 */ 471 472 TNET_WAKE_ON_DTIM, /**< Indicate the wake on event of the HW - DTIM. In this event 473 * the HW configure to be awake on every DITM (configure by the AP). 474 */ 475 476 TNET_WAKE_ON_N_BEACON, /**< Indicate the wake on event of the HW - listen interval. 477 * In this event the HW configure to be awake on every 478 * configured number of beacons. 479 */ 480 481 TNET_WAKE_ON_N_DTIM, /**< Indicate the wake on event of the HW - listen interval. 482 * In this event the HW configure to be awake on every 483 * configured number of beacons. 484 */ 485 486 TNET_WAKE_ON_HOST /**< Indicate the wake on event of the HW - Host access only 487 */ 488 489 }PowerMgr_TnetWakeOn_e; 490 491 492 /** \enum PowerMgr_RequestFor_802_11_PS_e */ 493 typedef enum 494 { 495 REQUEST_TO_ENTER_POWER_SAVE_802_11, /**< request to enter to power save 496 * of 802.11 497 */ 498 499 REQUEST_NOT_TO_CHANGE_POWER_SAVE_802_11, /**< request to not change the 500 * power save of 802.11 501 */ 502 503 REQUEST_TO_EXIT_POWER_SAVE_802_11 /**< request to exit from power save 504 * of 802.11 505 */ 506 }PowerMgr_RequestFor_802_11_PS_e; 507 508 typedef enum 509 { 510 POWER_SAVE_OFF, /**< power save of 802.11 511 */ 512 513 POWER_SAVE_ON , /**< power save on 802.11 514 */ 515 516 POWER_SAVE_KEEP_CURRENT /**< power save 802.11 don't change 517 */ 518 }PowerMgr_802_11_PsMode_e; 519 520 typedef enum 521 { 522 POWERAUTHO_POLICY_ELP = 0, 523 POWERAUTHO_POLICY_PD = 1, 524 POWERAUTHO_POLICY_AWAKE = 2, 525 POWERAUTHO_POLICY_NUM 526 } powerAutho_PowerPolicy_e; 527 528 typedef enum 529 { 530 ELPCTRL_MODE_NORMAL = 0, 531 ELPCTRL_MODE_KEEP_AWAKE 532 } elpCtrl_Mode_e; 533 534 /* 535 * this enum defines the protocol modes of the QOS management object. 536 */ 537 typedef enum{ 538 WME = 0, 539 NONE_QOS, 540 }qosProtocols_e; 541 542 typedef enum 543 { 544 RX_PACKET_TYPE_DATA = 0, 545 RX_PACKET_TYPE_MANAGEMENT 546 }rxPacketType_e; 547 548 typedef enum 549 { 550 DOT11_B_MODE = 1, 551 DOT11_A_MODE = 2, 552 DOT11_G_MODE = 3, 553 DOT11_DUAL_MODE = 4, 554 555 DOT11_MAX_MODE 556 } dot11mode_e; 557 558 /* hw access method*/ 559 typedef enum 560 { 561 HW_ACCESS_BUS_SLAVE_INDIRECT = 0, 562 HW_ACCESS_BUS_SLAVE_DIRECT = 1, 563 HW_ACCESS_BUS_MASTER = 2 564 } hwAccessMethod_e; 565 566 /* 567 * this enum includes the header converting modes configured to dataCtrl object. 568 */ 569 typedef enum{ 570 NO_CONVERT = 0, 571 QOS_CONVERT, 572 LEGACY_CONVERT, 573 }headerConvetMode_e; 574 575 /* * this enum defines the admission state configured to dataCtrl object. 576 */ 577 typedef enum{ 578 ADMISSION_NOT_REQUIRED = 0, 579 ADMISSION_REQUIRED = 1, 580 }admissionState_e; 581 582 583 /***************************************************************************** 584 ** ** 585 ** ** 586 ** TYPEDEFS ** 587 ** ** 588 ** ** 589 *****************************************************************************/ 590 /**< 591 * Callback for 802.11 PS - Success/Fail 592 */ 593 typedef void (*ps802_11_NotificationCB_t)(TI_HANDLE module, 594 TI_STATUS thePsSuccess); 595 596 /**< 597 * Asynchronous init mode callback function type 598 */ 599 typedef void (*fnotify_t)(TI_HANDLE module, TI_STATUS status); 600 601 typedef struct 602 { 603 UINT8 txRate[MAX_NUM_OF_TX_RATES_IN_CLASS]; 604 UINT8 shortRetryLimit; 605 UINT8 longRetryLimit; 606 UINT8 flags; 607 }txRateClass_t; 608 609 typedef struct 610 { 611 UINT32 numOfRateClasses; 612 txRateClass_t rateClass[MAX_NUM_OF_TX_RATE_CLASS_POLICIES]; 613 }txRatePolicy_t; 614 615 PACKED_STRUCT( e2Version_t, 616 617 UINT16 major; 618 UINT8 minor; 619 UINT8 last; 620 UINT16 bugfix; 621 ); 622 623 PACKED_STRUCT( TripletCahnnel_t, 624 625 UINT8 firstChannelNumber; 626 UINT8 numberOfChannels; 627 UINT8 maxTxPowerLevel; 628 ); 629 630 PACKED_STRUCT( IpAddress_t, 631 632 UINT8 addr[IP_ADDR_LEN]; 633 ); 634 635 PACKED_STRUCT( informationElementHeader_t, 636 637 UINT8 eleId; 638 UINT8 eleLen; 639 ); 640 641 PACKED_STRUCT( informationElement_t, 642 643 informationElementHeader_t hdr; 644 UINT8 info[MAX_INFO_ELEMENT_LEN]; 645 ); 646 647 PACKED_STRUCT( countryIE_t, 648 649 UINT8 CountryString[COUNTRY_STRING_LEN]; 650 TripletCahnnel_t tripletChannels[NUM_OF_MAX_TRIPLET_CHANNEL]; 651 ); 652 653 /* Struct retrieved from NVS */ 654 typedef struct 655 { 656 UINT8 uDbm[NUM_SUB_BANDS_FOR_POWER_TABLE][NUM_POWER_LEVELS]; 657 } powerLevelTable_t; 658 659 PACKED_STRUCT( SoftGeminiParam_t, 660 UINT32 wlanRxMinRateToRespectBtHp; /* Integer rate number. Note that Fw gets it in Index rate */ 661 UINT16 btHpMaxTime; /* the maximum length of time the BT HP will be respected*/ 662 UINT16 wlanHpMaxTime; /* the maximum length of time the WLAN HP will be respected*/ 663 UINT16 senseDisableTimer; /* the length of time when working in SENSE mode that the BT needs to be inactive in order to DISABLE the SG*/ 664 UINT16 protectiveRxTimeBeforeBtHp; 665 UINT16 protectiveTxTimeBeforeBtHp; 666 UINT16 protectiveRxTimeBeforeBtHpFastAp; /*new range: 10-20000 default: 1500*/ 667 UINT16 protectiveTxTimeBeforeBtHpFastAp; /*new range: 10-20000 default: 3000*/ 668 UINT16 protectiveWlanCycleTimeForFastAp; /*new range: 2000-65535 default: 8700*/ 669 UINT16 btAntiStarvationPeriod; /* 0 - 15000Msec */ 670 UINT16 timeoutNextBtLpPacket; 671 UINT16 wakeUpTimeBeforeBeacon; 672 UINT16 hpdmMaxGuardTime; /* 0-50000 */ 673 UINT16 timeoutNextWlanPacket; 674 UINT8 sgAntennaType; 675 UINT8 signalingType; 676 UINT8 afhLeverageOn; /* specifies whether to use the AFH information from the BT */ 677 UINT8 numberQuietCycle; 678 UINT8 maxNumCts; 679 UINT8 numberOfWlanPackets; 680 UINT8 numberOfBtPackets; 681 UINT8 numberOfMissedRxForAvalancheTrigger; /*new range: 1-255 default: 5*/ 682 UINT8 wlanElpHpSupport; /* new range: 0-1 default: 1*/ 683 UINT8 btAntiStarvationNumberOfCyclesWithinThePeriod; /* 0 - 15 Cycles */ 684 UINT8 ackModeDuringBtLpInDualAnt; 685 UINT8 allowPaSdToggleDuringBtActivityEnable; 686 UINT8 sgAutoModeNoCts; 687 UINT8 numOfBtHpRespectedReq; 688 689 ); /* Parameters directly to FW */ 690 691 692 PACKED_STRUCT( interogateCmdHdr_t, 693 694 UINT16 id; 695 UINT16 len; 696 ); 697 698 /* Struct for retrieving powerLevelTable_t with interrogate IE */ 699 typedef struct 700 { 701 interogateCmdHdr_t tPowerLevelResCmdHdr; 702 powerLevelTable_t tTable; 703 } powerLevelTableInterrogate_t; 704 705 typedef struct 706 { 707 interogateCmdHdr_t noiseHistResCmdHdr; 708 UINT32 counters[NUM_OF_NOISE_HISTOGRAM_COUNTERS]; 709 UINT32 numOfLostCycles; 710 UINT32 numOfTxHwGenLostCycles; 711 UINT32 numOfRxLostCycles; 712 } noiseHistogramResults_t; 713 /* 714 * interogateCmdCBParams_t: 715 * Note that this structure is used by the GWSI 716 * both for setting (writing to the device) and 717 * for retreiving (Reading from the device), 718 * while being called with a completion CB 719 */ 720 typedef struct 721 { 722 void* CB_Func; /* Completion CB function*/ 723 TI_HANDLE CB_handle; /* CB handle*/ 724 UINT8* CB_buf; /* Buffer contains the content to be written or the retrieved content*/ 725 } interogateCmdCBParams_t; 726 727 728 typedef struct 729 { 730 void* CB_Func; 731 TI_HANDLE CB_handle; 732 UINT8* CB_buf; 733 } configureCmdCBParams_t; 734 735 PACKED_STRUCT( securityKeys_t, 736 737 keyType_e keyType; /* key type (WEP, TKIP etc.) */ 738 739 UINT32 encLen; 740 UINT8 encKey[MAX_KEY_LEN]; 741 742 UINT8 micRxKey[MAX_KEY_LEN]; 743 UINT8 micTxKey[MAX_KEY_LEN]; 744 745 UINT32 keyIndex; /* id=0 is broadcast key */ 746 macAddress_t macAddress; 747 UINT8 keyRsc[KEY_RSC_LEN]; 748 ); 749 750 751 typedef struct 752 { 753 UINT8 queueID; 754 UINT8 channelType; 755 UINT8 tsid; 756 UINT32 dot11EDCATableMSDULifeTime; 757 UINT8 psScheme; 758 UINT8 ackPolicy; 759 UINT32 APSDConf[2]; 760 } queueTrafficParams_t; 761 762 typedef struct 763 { 764 UINT8 ac; 765 UINT8 cwMin; 766 UINT16 cwMax; 767 UINT8 aifsn; 768 UINT16 txopLimit; 769 }acQosParams_t; 770 771 PACKED_STRUCT( rxTimeOut_t, 772 UINT16 psPoll; 773 UINT16 UPSD; 774 ); 775 776 PACKED_STRUCT( QOS_AC_IE_ParametersRecord_t, 777 778 UINT8 ACI_AIFSN; 779 UINT8 ECWmin_ECWmax; 780 UINT16 TXOPLimit; 781 ); 782 783 PACKED_STRUCT( ACParameters_t, 784 785 QOS_AC_IE_ParametersRecord_t ACBEParametersRecord; 786 QOS_AC_IE_ParametersRecord_t ACBKParametersRecord; 787 QOS_AC_IE_ParametersRecord_t ACVIParametersRecord; 788 QOS_AC_IE_ParametersRecord_t ACVOParametersRecord; 789 ); 790 791 792 typedef struct{ 793 UINT8 PsMode; /* power save mode. */ 794 UINT16 TxQueueSize; 795 UINT8 QueueIndex; 796 qOvFlowPolicy_e QueueOvFlowPolicy; 797 UINT8 ackPolicy; 798 UINT32 MsduLifeTime; 799 }acTrfcCtrl_t; 800 801 typedef struct{ 802 headerConvetMode_e headerConverMode; /* header converting mode */ 803 BOOL convertTagZeroFrames; /* flag for converting zero tags */ 804 trafficAdmState_e admissionState; /* AC admission state */ 805 admissionState_e admissionRequired; /* AC admission is mandatory. */ 806 acTrfcType_e tag_ToAcClsfrTable[MAX_NUM_OF_802_1d_TAGS]; /* tag to AC classification */ 807 }qosParams_t; 808 809 typedef struct{ 810 acTrfcCtrl_t acTrfcCtrl; 811 qosParams_t qosParams; 812 UINT8 *tsrsArr; 813 UINT8 tsrsArrLen; 814 UINT8 acID; 815 }txDataQosParams_t; 816 817 typedef struct{ 818 UINT8 voiceTspecConfigure; 819 UINT8 videoTspecConfigure; 820 }TspecConfigure_t; 821 822 823 /*************************************/ 824 /* TNETW Driver init table. */ 825 /*************************************/ 826 827 PACKED_STRUCT(whalCtrl_tx_Queue_t, 828 UINT8 numDesc; 829 UINT8 priority; 830 ); 831 832 833 PACKED_STRUCT(whalCtrl_init_t, 834 UINT8 hwAccessMethod; 835 UINT8 maxSitesFragCollect; 836 UINT8 packetDetectionThreshold; 837 UINT32 blockSize; 838 UINT8 rxDescNum; 839 UINT8 txDescNum; 840 UINT32 nullTemplateSize; 841 UINT32 beaconTemplateSize; 842 UINT32 probeRequestTemplateSize; 843 UINT32 probeResponseTemplateSize; 844 UINT32 PsPollTemplateSize; 845 UINT32 qosNullDataTemplateSize; 846 UINT32 tddRadioCalTimout; 847 UINT32 CrtRadioCalTimout; 848 int UseMboxInterrupt; 849 int UseTxDataInterrupt; 850 UINT32 TraceBufferSize; 851 BOOLEAN bDoPrint; 852 UINT8 StaMacAddress[MAC_ADDR_LEN]; 853 UINT8 UsePlcpHeader; 854 UINT8 numTxQueues; 855 whalCtrl_tx_Queue_t tx_attrib_queue[MAX_NUM_OF_TX_QUEUES]; 856 BOOL TxFlashEnable; 857 UINT8 rxMemBlkNumber; 858 UINT8 txMinMemBlkNumber; 859 UINT16 txCompleteTimeout; 860 UINT8 txCompleteThreshold; 861 UINT8 TxBlocksHighPercentPerAc[MAX_NUM_OF_AC]; 862 UINT8 TxBlocksLowPercentPerAc[MAX_NUM_OF_AC]; 863 UINT16 BeaconRxTimeout; 864 UINT16 BroadcastRxTimeout; 865 UINT8 RxBroadcastInPs; 866 UINT8 ConsecutivePsPollDeliveryFailureThreshold; 867 ); 868 869 870 PACKED_STRUCT(halCtrlConfigParams_t, 871 UINT8 halCtrlCalibrationChannel2_4; 872 UINT8 halCtrlCalibrationChannel5_0; 873 UINT16 halCtrlRtsThreshold; 874 UINT16 halCtrlFragThreshold; 875 UINT32 halCtrlMaxTxMsduLifetime; 876 UINT32 halCtrlMaxRxMsduLifetime; 877 UINT8 halCtrlRateFallbackRetry; 878 UINT16 halCtrlListenInterval; 879 BOOL halCtrlEnable4x; 880 txAntenna_e halCtrlTxAntenna; 881 rxAntenna_e halCtrlRxAntenna; 882 UINT8 halCtrlMacClock; 883 UINT8 halCtrlArmClock; 884 BOOL halCtrlRxEnergyDetection; 885 BOOL halCtrlTxEnergyDetection; 886 BOOL halCtrlEepromLessEnable; 887 UINT16 halCtrlBcnRxTime; 888 BOOL halCtrlRxDisableBroadcast; 889 BOOL halCtrlRecoveryEnable; 890 BOOL halCtrlFirmwareDebug; 891 /* hardware ACI parameters */ 892 UINT8 halCtrlACIMode; 893 UINT8 halCtrlInputCCA; 894 UINT8 halCtrlQualifiedCCA; 895 UINT8 halCtrlStompForRx; 896 UINT8 halCtrlStompForTx; 897 UINT8 halCtrlTxCCA; 898 rxTimeOut_t rxTimeOut; 899 UINT8 halCtrlTxCompleteThreshold; 900 BOOL WiFiWmmPS; 901 902 ); 903 904 typedef struct 905 { 906 UINT16 gpioBitNumForRadioDisableFeature; 907 }radioDisableParams_t; 908 909 /* New Power*/ 910 PACKED_STRUCT(PowerSrvInitParams_t, 911 /* powerMgmtConfig IE */ 912 UINT8 numNullPktRetries; 913 UINT8 hangOverPeriod; 914 ); 915 916 PACKED_STRUCT( scanSrvInitParams_t, 917 UINT32 numberOfNoScanCompleteToRecovery; 918 UINT32 uTriggeredScanTimeOut; /* i.e. split scan */ 919 ); 920 921 PACKED_STRUCT(reportInitParams_t, 922 UINT8 SeverityTable[WLAN_MAX_SEVERITIES]; 923 UINT8 ModuleTable[WLAN_MAX_LOG_MODULES]; 924 ); 925 926 PACKED_STRUCT(beaconFilterParams_t, 927 UINT8 desiredState; 928 UINT8 currentState; 929 UINT8 numOfStored; 930 UINT8 IETable[BEACON_FILTER_IE_TABLE_MAX_SIZE]; 931 UINT8 numOfElements; 932 UINT8 IETableSize; 933 934 ); 935 936 PACKED_STRUCT(arpIpFilterParams_t, 937 UINT8 isFilterEnabled; 938 IpAddress_t arpIpInitParams; 939 ); 940 941 PACKED_STRUCT(macAddrFilterParams_t, 942 UINT8 isFilterEnabled; 943 UINT8 numOfMacAddresses; 944 macAddress_t macAddrTable[MAX_MULTICAST_GROUP_ADDRS]; 945 946 ); 947 948 PACKED_STRUCT(txXferInitParams_t, 949 /* Duration in which HW buffer is full until recovery is triggered */ 950 UINT32 timeToTxStuckMs; 951 ); 952 953 PACKED_STRUCT(macPreambleParams_t, 954 UINT8 earlyWakeUp; 955 ); 956 957 /* 958 * TnetwDrv_InitParams_t: 959 * This structure encapsulates the initialization data required by the TnetwDrv layer 960 */ 961 PACKED_STRUCT(TnetwDrv_InitParams_t, 962 whalCtrl_init_t whalCtrl_init; 963 halCtrlConfigParams_t halCtrlConfigParams; 964 reportInitParams_t reportParams; 965 PowerSrvInitParams_t PowerSrvInitParams; 966 scanSrvInitParams_t scanSrvInitParams; 967 arpIpFilterParams_t arpIpFilterParams; 968 macAddrFilterParams_t macAddrFilterParams; 969 beaconFilterParams_t beaconFilterParams; 970 txXferInitParams_t txXferInitParams; 971 macPreambleParams_t macPreambleParams; 972 ); 973 974 /* PLT*/ 975 typedef struct 976 { 977 UINT32 FCSErrorCount; /* increment when an FCS error is detected in a received MPDU*/ 978 UINT32 TotalFrameCount;/* increment for each packet.*/ 979 UINT32 PLCPErrorCount; /* increment when an PLCP error is detected in a received MPDU*/ 980 UINT32 SeqNumMissCount; /* Increment when an sequence number of arrived packet is not in order */ 981 UINT32 SeqNumMissCountRef; /* holds the reference value for seqNumMissCount test start */ 982 }PltRxPer_t; 983 984 typedef struct 985 { 986 UINT32 chID; /* Channel number */ 987 UINT32 rate; /* index of the transmit */ 988 UINT32 InterPacketDelay;/*(ms) */ 989 UINT32 NumOfFrames; 990 UINT32 aPacketLength; 991 UINT32 aSeqNumMode; /* fixed / incremented */ 992 macAddress_t aPeerMacAddr; 993 UINT8 preamble; /* {PREAMBLE_LONG | PREAMBLE_SHORT } */ 994 UINT8 band; /* {PBCC_MODULATION_MASK |OFDM_MODULATION_MASK } */ 995 UINT8 mode; /* {AUTO_SEQ_NUMBER | RANDOM_DATA | ZOZO_DATA} */ 996 UINT8 aPadding[3]; 997 }PltTxContinues_t; 998 999 /* ChannelBand_t - */ 1000 /* This structure holds the parameters for TX carrier test and radio tune*/ 1001 typedef struct 1002 { 1003 UINT32 channel; /* Channel number*/ 1004 UINT32 band; /* Band */ 1005 } ChannelBand_t; 1006 1007 1008 /* PLT - MIBs structures */ 1009 /* TMIB - */ 1010 /* Specifies the type of a MIB element */ 1011 typedef enum 1012 { 1013 PLT_MIB_dot11StationId = 0x1001, 1014 PLT_MIB_dot11MaxReceiveLifetime, 1015 PLT_MIB_dot11SlotTime, 1016 PLT_MIB_dot11GroupAddressesTable, 1017 PLT_MIB_dot11WepDefaultKeyId, 1018 PLT_MIB_dot11CurrentTxPowerLevel, 1019 PLT_MIB_dot11RTSThreshold, 1020 1021 PLT_MIB_ctsToSelf = 0x1101, 1022 PLT_MIB_arpIpAddressesTable, 1023 PLT_MIB_templateFrame, 1024 PLT_MIB_rxFilter, 1025 PLT_MIB_beaconFilterIETable, 1026 PLT_MIB_beaconFilterEnable, 1027 PLT_MIB_sleepMode, 1028 PLT_MIB_wlanWakeUpInterval, 1029 PLT_MIB_beaconLostCount, 1030 PLT_MIB_rcpiThreshold, 1031 PLT_MIB_statisticsTable, 1032 PLT_MIB_ibssPsConfig, 1033 PLT_MIB_txRatePolicy, 1034 PLT_MIB_countersTable, 1035 PLT_MIB_btCoexsitenceMode, 1036 PLT_MIB_btCoexistenceParameters 1037 } PLT_MIB_e; 1038 1039 1040 #define PLT_MAX_MULTICAST_GROUP_ADDRS 8 1041 1042 typedef struct 1043 { 1044 macAddress_t GroupTable[PLT_MAX_MULTICAST_GROUP_ADDRS]; 1045 tiUINT8 bFilteringEnable; 1046 tiUINT8 nNumberOfAddresses; 1047 }PLT_MIB_GroupAdressTable_t; 1048 1049 1050 typedef struct 1051 { 1052 tiUINT32 FilteringEnable; 1053 UCHAR addr[IP_V4_ADDR_LEN]; 1054 }PLT_MIB_ArpIpAddressesTable_t; 1055 1056 1057 /* TTemplateType - */ 1058 /* Specifies the type of a templateFrame */ 1059 typedef enum 1060 { /* Frame type: */ 1061 PLT_TEMPLATE_TYPE_BEACON, /* 0 for beacon template, */ 1062 PLT_TEMPLATE_TYPE_PROBE_REQUEST, /* 1 for probe request template,*/ 1063 PLT_TEMPLATE_TYPE_NULL_FRAME, /* 2 for NULL data frame */ 1064 PLT_TEMPLATE_TYPE_PROBE_RESPONSE, /* 3 for probe response frame */ 1065 PLT_TEMPLATE_TYPE_QOS_NULL_FRAME, /* 4 for QOS NULL data frame */ 1066 PLT_TEMPLATE_TYPE_PS_POLL, /* 5 for PS-Poll frame */ 1067 } PLT_MIB_TemplateType_t; 1068 1069 #define PLT_MIB_TEMPLATE_DATA_MAX_LEN 256 1070 typedef struct 1071 { 1072 PLT_MIB_TemplateType_t FrameType; 1073 tiUINT32 Rate; 1074 tiUINT16 Length; 1075 tiUINT8 Data[PLT_MIB_TEMPLATE_DATA_MAX_LEN]; 1076 }PLT_TemplateFrame_t; 1077 1078 typedef struct 1079 { 1080 tiUINT32 WakeUpInterval; 1081 tiUINT8 ListenInterval; /* Listen interval in unit of the beacon/DTIM */ 1082 }PLT_MIB_WlanWakeUpInterval_t; 1083 1084 1085 typedef struct 1086 { 1087 tiUINT32 PLCPErrorCount; 1088 tiUINT32 FCSErrorCount; 1089 }PLT_MIB_CounterTable_t; 1090 1091 1092 /*the max table sized is : ( number of 221 * 8 bytes ) + ( non-221 * 2 bytes ) 1093 Must be synchronized with the size of ACX defined in public_infoele.h interface 1094 with the FW 1095 */ 1096 #define PLT_MIB_MAX_SIZE_OF_IE_TABLE 112 1097 /* NOTE: struct is only meant to be used as a pointer reference to an actual*/ 1098 /* buffer. Table size is not a constant and is derived from the buffer*/ 1099 /* size given with the WriteMIB command or readMIBComplete event */ 1100 typedef struct 1101 { 1102 UINT8 iNumberOfIEs; /* number of information elements in table */ 1103 UINT8 iIETable[PLT_MIB_MAX_SIZE_OF_IE_TABLE]; 1104 }PLT_SBeaconFilterIETable_t; 1105 1106 typedef union 1107 { 1108 macAddress_t StationId; 1109 tiUINT32 MaxReceiveLifeTime; 1110 UINT32 SlotTime; 1111 PLT_MIB_GroupAdressTable_t GroupAddressTable; 1112 tiUINT8 WepDefaultKeyId; 1113 tiUINT8 PowerLevel; 1114 tiUINT16 RTSThreshold; 1115 tiUINT32 CTSToSelfEnable; 1116 PLT_MIB_ArpIpAddressesTable_t ArpIpAddressesTable; 1117 PLT_TemplateFrame_t TemplateFrame; 1118 tiUINT8 RxFilter; 1119 PLT_MIB_WlanWakeUpInterval_t WlanWakeUpInterval; 1120 PLT_MIB_CounterTable_t CounterTable; 1121 PLT_SBeaconFilterIETable_t BeaconFilter; 1122 txRatePolicy_t txRatePolicy; 1123 }PLT_MIB_data_u; 1124 1125 1126 typedef struct{ 1127 PLT_MIB_e aMib; 1128 UINT32 Length; 1129 PLT_MIB_data_u aData; 1130 }PLT_MIB_t; 1131 1132 1133 #endif /* __COMMON_TYPES_H__ */ 1134