Home | History | Annotate | Download | only in TWDriver
      1 /*
      2  * TWDriver.h
      3  *
      4  * Copyright(c) 1998 - 2009 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 /** \file  TWDriver.h
     36  *  \brief TWDriver APIs
     37  *
     38  *  \see
     39  */
     40 
     41 /** @defgroup Control Control group
     42  * \brief The Control group includes the list of functions which perform TWD Control
     43  */
     44 /** @defgroup Measurement Measurement group
     45  * \brief The Measurement group includes the list of functions which gets measurements from FW / TWD
     46  */
     47 /** @defgroup Data_Path Data Path group
     48  * \brief The Data Path group includes the list of functions which perform the TWD Data Path
     49  */
     50 /**	@defgroup Power_Management Power Management group
     51  * \brief The Power Management group includes the list of functions which set the power management mode
     52  */
     53 /** @defgroup QoS Quality  Of Service group
     54  * \brief The Quality of Service group includes the list of functions which perform the TWD QoS
     55  */
     56 /** @defgroup Radio Radio (PHY) group
     57  * \brief The Radio group includes the list of functions which handle the Radio
     58  */
     59 /** @defgroup BSS BSS group
     60  * \brief The BSS group includes the list of functions which handle the Basic Service Set
     61  */
     62 /** @defgroup Misc Miscellaneous group
     63  * \brief The Miscellaneous group includes the list of functions which handle miscellaneous issues
     64  */
     65 #ifdef TI_DBG
     66 /**	@defgroup Test Debug Test group
     67  * \brief The Debug Test group includes the list of functions which Test the TWD and FW
     68  */
     69 #endif
     70 
     71 #ifndef TWDRIVER_H
     72 #define TWDRIVER_H
     73 
     74 #define MAX_NUM_OF_802_1d_TAGS          8
     75 
     76 #include "802_11Defs.h"
     77 #include "TWDriverMsr.h"
     78 #include "TWDriverScan.h"
     79 #include "TWDriverRate.h"
     80 #include "fwDebug_api.h"
     81 #include "TwIf.h"
     82 /*
     83  * original firmware h-files
     84  */
     85 #include "public_commands.h"
     86 #include "public_event_mbox.h"
     87 #include "public_infoele.h"
     88 #include "public_host_int.h"
     89 #include "public_descriptors.h"
     90 #include "public_radio.h"
     91 
     92 /*
     93  * Firmware types defintions
     94  */
     95 #ifndef uint8
     96 #define uint8   TI_UINT8
     97 #endif
     98 #ifndef uint16
     99 #define uint16  TI_UINT16
    100 #endif
    101 #ifndef uint32
    102 #define uint32  TI_UINT32
    103 #endif
    104 #ifndef int8
    105 #define int8    TI_INT8
    106 #endif
    107 #ifndef int16
    108 #define int16   TI_INT16
    109 #endif
    110 #ifndef int32
    111 #define int32   TI_INT32
    112 #endif
    113 
    114 
    115 
    116 /*
    117  * --------------------------------------------------------------
    118  *	Definitions
    119  * --------------------------------------------------------------
    120  */
    121 
    122 /* PALAU Group Address Default Values */
    123 #define NUM_GROUP_ADDRESS_VALUE_DEF     4
    124 #define NUM_GROUP_ADDRESS_VALUE_MIN     0
    125 #define NUM_GROUP_ADDRESS_VALUE_MAX     8
    126 
    127 /* Early Wakeup Default Values */
    128 #define EARLY_WAKEUP_ENABLE_MIN         (TI_FALSE)
    129 #define EARLY_WAKEUP_ENABLE_MAX         (TI_TRUE)
    130 #define EARLY_WAKEUP_ENABLE_DEF         (TI_TRUE)
    131 
    132 /* ARP IP Filter Default Values */
    133 #define MIN_FILTER_ENABLE_VALUE         0
    134 #define MAX_FILTER_ENABLE_VALUE         2
    135 #define DEF_FILTER_ENABLE_VALUE         0
    136 #define FILTER_ENABLE_FLAG_LEN          1
    137 
    138 /* Beacon filter Deafult Values */
    139 #define DEF_BEACON_FILTER_ENABLE_VALUE  1
    140 #define DEF_BEACON_FILTER_IE_TABLE_NUM  16
    141 #define MIN_BEACON_FILTER_ENABLE_VALUE  0
    142 #define MAX_BEACON_FILTER_ENABLE_VALUE  1
    143 #define BEACON_FILTER_IE_TABLE_DEF_SIZE 37
    144 #define BEACON_FILTER_IE_TABLE_MAX_SIZE 100
    145 #define BEACON_FILTER_IE_TABLE_MIN_SIZE 0
    146 #define BEACON_FILTER_IE_TABLE_MAX_NUM  (6+32)
    147 #define BEACON_FILTER_IE_TABLE_MIN_NUM  0
    148 
    149 /* CoexActivity Table Deafult Values */
    150 #define COEX_ACTIVITY_TABLE_DEF_NUM     0
    151 #define COEX_ACTIVITY_TABLE_MIN_NUM     0
    152 #define COEX_ACTIVITY_TABLE_MAX_NUM     24*2
    153 #define COEX_ACTIVITY_TABLE_SIZE        ((2+1)+(2+1)+(2+1)+(2+1)+(4+1)+(4+1)) /* includes spaces between bytes */
    154 
    155 #define DEF_NUM_STORED_FILTERS          1
    156 #define MIN_NUM_STORED_FILTERS          1
    157 #define MAX_NUM_STORED_FILTERS          8
    158 
    159 #define TWD_HW_ACCESS_METHOD_MIN   0
    160 #define TWD_HW_ACCESS_METHOD_MAX   2
    161 #define TWD_HW_ACCESS_METHOD_DEF   1
    162 
    163 #define TWD_SITE_FRAG_COLLECT_MIN  2
    164 #define TWD_SITE_FRAG_COLLECT_MAX  10
    165 #define TWD_SITE_FRAG_COLLECT_DEF  3
    166 
    167 #define TWD_RX_MEM_BLKS_NUM        64   /* The number of Rx memory blocks configured to FW */
    168 #define TWD_TX_MIN_MEM_BLKS_NUM    64   /* The MINIMUM number of Tx memory blocks configured to FW */
    169 
    170 #define TWD_RX_BLOCKS_RATIO_MIN    0
    171 #define TWD_RX_BLOCKS_RATIO_MAX    100
    172 #define TWD_RX_BLOCKS_RATIO_DEF    50
    173 
    174 #define TWD_TX_FLASH_ENABLE_MIN         TI_FALSE
    175 #define TWD_TX_FLASH_ENABLE_MAX         TI_TRUE
    176 #define TWD_TX_FLASH_ENABLE_DEF         TI_TRUE
    177 
    178 #define TWD_USE_INTR_TRHESHOLD_MIN 0
    179 #define TWD_USE_INTR_TRHESHOLD_MAX 1
    180 #define TWD_USE_INTR_TRHESHOLD_DEF 0
    181 
    182 #define TWD_USE_TX_DATA_INTR_MIN   0
    183 #define TWD_USE_TX_DATA_INTR_MAX   1
    184 
    185 #define NUM_OF_CHANNELS_24              14
    186 #define NUM_OF_CHANNELS_5               180
    187 
    188 #define TWD_CALIBRATION_CHANNEL_2_4_MIN 1
    189 #define TWD_CALIBRATION_CHANNEL_2_4_MAX NUM_OF_CHANNELS_24
    190 #define TWD_CALIBRATION_CHANNEL_2_4_DEF 1
    191 
    192 #define A_5G_BAND_MIN_CHANNEL       36
    193 #define A_5G_BAND_MAX_CHANNEL       180
    194 #define A_5G_BAND_NUM_CHANNELS  	(A_5G_BAND_MAX_CHANNEL-A_5G_BAND_MIN_CHANNEL+1)
    195 
    196 #define TWD_CALIBRATION_CHANNEL_5_0_MIN 34
    197 #define TWD_CALIBRATION_CHANNEL_5_0_MAX  A_5G_BAND_MAX_CHANNEL
    198 #define TWD_CALIBRATION_CHANNEL_5_0_DEF 36
    199 
    200 #define TWD_CALIBRATION_CHANNEL_4_9_MIN 8
    201 #define TWD_CALIBRATION_CHANNEL_4_9_MAX 16
    202 #define TWD_CALIBRATION_CHANNEL_4_9_DEF 12
    203 
    204 #define TWD_RTS_THRESHOLD_MIN           0
    205 #define TWD_RTS_THRESHOLD_MAX           4096
    206 #define TWD_RTS_THRESHOLD_DEF           4096
    207 
    208 #define TWD_BCN_RX_TIME_OUT_MIN         10      /* ms */
    209 #define TWD_BCN_RX_TIME_OUT_MAX         1000    /* ms */
    210 #define TWD_BCN_RX_TIME_OUT_DEF         10      /* ms */
    211 
    212 #define TWD_RX_DISABLE_BROADCAST_MIN    TI_FALSE
    213 #define TWD_RX_DISABLE_BROADCAST_MAX    TI_TRUE
    214 #define TWD_RX_DISABLE_BROADCAST_DEF    TI_FALSE
    215 
    216 /* Indicate if the recovery process is active or not */
    217 #define TWD_RECOVERY_ENABLE_MIN         TI_FALSE
    218 #define TWD_RECOVERY_ENABLE_MAX         TI_TRUE
    219 #define TWD_RECOVERY_ENABLE_DEF         TI_TRUE
    220 
    221 /* Indicate if working with Burst Mode or not */
    222 #define BURST_MODE_ENABLE_MIN         TI_FALSE
    223 #define BURST_MODE_ENABLE_MAX         TI_TRUE
    224 #define BURST_MODE_ENABLE_DEF         TI_FALSE
    225 
    226 #define SMART_REFLEX_STATE_MIN        TI_FALSE
    227 #define SMART_REFLEX_STATE_MAX        TI_TRUE
    228 #define SMART_REFLEX_STATE_DEF        TI_TRUE
    229 
    230 #define SMART_REFLEX_DEBUG_MIN        0
    231 #define SMART_REFLEX_DEBUG_MAX        0xFFFF
    232 #define SMART_REFLEX_DEBUG_DEF        0
    233 
    234 #define SMART_REFLEX_CONFIG_PARAMS_DEF_TABLE  "0,0,0,0,0,0,0,0,0,0,0,0,0,0"
    235 
    236 #define TWD_FRAG_THRESHOLD_MIN          256
    237 #define TWD_FRAG_THRESHOLD_MAX          4096
    238 #define TWD_FRAG_THRESHOLD_DEF          4096
    239 
    240 #define TWD_MAX_TX_MSDU_LIFETIME_MIN    0
    241 #define TWD_MAX_TX_MSDU_LIFETIME_MAX    3000
    242 #define TWD_MAX_TX_MSDU_LIFETIME_DEF    512
    243 
    244 #define TWD_MAX_RX_MSDU_LIFETIME_MIN    0
    245 #define TWD_MAX_RX_MSDU_LIFETIME_MAX    0xFFFFFFFF
    246 #define TWD_MAX_RX_MSDU_LIFETIME_DEF    512000
    247 
    248 
    249 #define TWD_LISTEN_INTERVAL_MIN         1
    250 #define TWD_LISTEN_INTERVAL_MAX         10
    251 #define TWD_LISTEN_INTERVAL_DEF         3
    252 
    253 /* This field indicates the number of transmit retries to attempt at
    254     the rate specified in the TNETW Tx descriptor before
    255     falling back to the next lowest rate.
    256     If this field is set to 0xff, then rate fallback is disabled.
    257     If this field is 0, then there will be 0 retries before starting fallback.*/
    258 #define TWD_RATE_FB_RETRY_LIMIT_MIN     0   /* => No retries before starting RateFallBack */
    259 #define TWD_RATE_FB_RETRY_LIMIT_MAX     255 /* =>0xff for disabling Rate fallback */
    260 #define TWD_RATE_FB_RETRY_LIMIT_DEF     0
    261 
    262 #define TWD_TX_ANTENNA_MIN              TX_ANTENNA_2
    263 #define TWD_TX_ANTENNA_MAX              TX_ANTENNA_1
    264 #define TWD_TX_ANTENNA_DEF              TX_ANTENNA_1
    265 
    266 #define TWD_RX_ANTENNA_MIN              RX_ANTENNA_1
    267 #define TWD_RX_ANTENNA_MAX              RX_ANTENNA_PARTIAL
    268 #define TWD_RX_ANTENNA_DEF              RX_ANTENNA_FULL
    269 
    270 /*
    271  * Tx and Rx interrupts pacing (threshold in packets, timeouts in milliseconds)
    272  */
    273 #define TWD_TX_CMPLT_THRESHOLD_DEF      4   /* 0 means no pacing so send interrupt on every event */
    274 #define TWD_TX_CMPLT_THRESHOLD_MIN      0
    275 #define TWD_TX_CMPLT_THRESHOLD_MAX      30
    276 
    277 #define TWD_TX_CMPLT_TIMEOUT_DEF        5
    278 #define TWD_TX_CMPLT_TIMEOUT_MIN        1
    279 #define TWD_TX_CMPLT_TIMEOUT_MAX        100
    280 
    281 #define TWD_RX_INTR_THRESHOLD_DEF       0   /* 0 means no pacing so send interrupt on every event */
    282 #define TWD_RX_INTR_THRESHOLD_MIN       0
    283 #define TWD_RX_INTR_THRESHOLD_MAX       30
    284 #define TWD_RX_INTR_THRESHOLD_DEF_WIFI_MODE  0 /* No Rx interrupt pacing so send interrupt on every event */
    285 
    286 #define TWD_RX_INTR_TIMEOUT_DEF         1
    287 #define TWD_RX_INTR_TIMEOUT_MIN         1
    288 #define TWD_RX_INTR_TIMEOUT_MAX         100
    289 
    290 /* Rx aggregation packets number limit (max packets in one aggregation) */
    291 #define TWD_RX_AGGREG_PKTS_LIMIT_DEF    4
    292 #define TWD_RX_AGGREG_PKTS_LIMIT_MIN    1
    293 #define TWD_RX_AGGREG_PKTS_LIMIT_MAX    4
    294 
    295 /*
    296  * Tx power level
    297  */
    298 #define DBM_TO_TX_POWER_FACTOR			10
    299 
    300 /* TX_POWER is in Dbm/10 units */
    301 #define MAX_TX_POWER					250
    302 #define MIN_TX_POWER					0
    303 #define DEF_TX_POWER					205
    304 
    305 
    306 #define MIN_DEFAULT_KEY_ID              0
    307 #define MAX_DEFAULT_KEY_ID              3
    308 
    309 #define KEY_RSC_LEN                     8
    310 #define MIN_KEY_LEN                     5
    311 #define MAX_KEY_LEN                     32
    312 
    313 #define TWD_RSSI_BEACON_WEIGHT_MIN       0
    314 #define TWD_RSSI_BEACON_WEIGHT_MAX     100
    315 #define TWD_RSSI_BEACON_WEIGHT_DEF      20
    316 
    317 #define TWD_RSSI_PACKET_WEIGHT_MIN       0
    318 #define TWD_RSSI_PACKET_WEIGHT_MAX     100
    319 #define TWD_RSSI_PACKET_WEIGHT_DEF      10
    320 
    321 #define TWD_SNR_BEACON_WEIGHT_MIN        0
    322 #define TWD_SNR_BEACON_WEIGHT_MAX      100
    323 #define TWD_SNR_BEACON_WEIGHT_DEF       20
    324 
    325 #define TWD_SNR_PACKET_WEIGHT_MIN        0
    326 #define TWD_SNR_PACKET_WEIGHT_MAX      100
    327 #define TWD_SNR_PACKET_WEIGHT_DEF       10
    328 
    329 
    330 
    331 
    332 #define MAX_NUM_OF_AC                   4
    333 
    334 /************************************/
    335 /*      Rates values                */
    336 /************************************/
    337 /* The next definitions are used to decide which encryption is used by the Rx flags */
    338 #define RX_FLAGS_NO_SECURITY                0
    339 #define RX_FLAGS_WEP                        1
    340 #define RX_FLAGS_TKIP                       2
    341 #define RX_FLAGS_AES                        3
    342 
    343 
    344 #define RX_DESC_FLAGS_ENCRYPTION            8
    345 #define RX_PACKET_FLAGS_ENCRYPTION_SHIFT    16
    346 #define RX_PACKET_FLAGS_ENCRYPTION_SHIFT_FROM_DESC      (RX_PACKET_FLAGS_ENCRYPTION_SHIFT - RX_DESC_FLAGS_ENCRYPTION)
    347 
    348 /* Tx packet Control-Block flags bit-mask. */
    349 #define TX_CTRL_FLAG_XFER_DONE_ISSUED      0x0001  /* Xfer-Done already issued to upper driver   - for WHA. */
    350 #define TX_CTRL_FLAG_TX_COMPLETE_ISSUED    0x0002  /* Tx-Complete already issued to upper driver - for WHA. */
    351 #define TX_CTRL_FLAG_LINK_TEST             0x0004  /* XCC link test packet */
    352 #define TX_CTRL_FLAG_SENT_TO_FW            0x0008  /* Set after the packet is allowed to be sent to FW (by TxHwQueue) */
    353 #define TX_CTRL_FLAG_PKT_IN_RAW_BUF        0x0010  /* The input packet is in a raw buffer (as opposed to OS packet) */
    354 #define TX_CTRL_FLAG_MULTICAST             0x0020  /* A multicast ethernet packet */
    355 #define TX_CTRL_FLAG_BROADCAST             0x0040  /* A broadcast ethernet packet */
    356 
    357 #define TX_PKT_TYPE_MGMT                   1   /* Management Packet						  */
    358 #define TX_PKT_TYPE_EAPOL                  2   /* EAPOL packet (Ethernet)				  */
    359 #define TX_PKT_TYPE_ETHER                  3   /* Data packet from the Network interface  */
    360 #define TX_PKT_TYPE_WLAN_DATA	           4   /* Driver generated WLAN Data Packet (currently used for IAPP packet) */
    361 
    362 
    363 #define ALIGN_4BYTE_MASK                   0x3 /* Masked LS bits for 4-bytes aligned addresses or lengths. */
    364 #define SHIFT_BETWEEN_TU_AND_USEC          10  /* Shift factor to convert between TU (1024 uSec) and uSec. */
    365 
    366 /* Packet header + extensions structure ranges between 24 and 48 bytes as follows:
    367  * ------------------------------------------------------------------------------
    368  * Alignment Padding:   0/2 bytes,      added for 4 bytes alignment of this structure.
    369  * Mac-Header:          24 bytes,       802.11 basic header.
    370  * Qos header:          0/2 bytes,      for QoS-data or QoS-Null the two QoS bytes are added.
    371  * Security Pad:        0/0/4/8 bytes,  for None/WEP/TKIP/AES.
    372  * LLC/SNAP:            0/8 bytes,      added only for data packets.
    373  * HT control:          0/4             added only for packte support QoS and HT
    374  */
    375 #define MAX_HEADER_SIZE                 48
    376 
    377 /* Data body max length */
    378 #define MAX_DATA_BODY_LENGTH            4096
    379 
    380 
    381 
    382 /* The weight in % of the new packet relative to the previous average value of RSSI */
    383 #define RSSI_DEFAULT_WEIGHT             20
    384 
    385 #define RSSI_DEFAULT_THRESHOLD          -80
    386 #define SNR_DEFAULT_THRESHOLD           0
    387 
    388 /*
    389  * 'No beacon' roaming trigger configuration
    390  * Number of consecutive beacons (or DTIM periods) missed before
    391  * 'Out of Sync' event is raised
    392  */
    393 #define OUT_OF_SYNC_DEFAULT_THRESHOLD   10
    394 /*
    395  * IBSS - Number of consecutive beacons (or DTIM periods) missed before
    396  * 'Out of Sync' event is raised
    397  */
    398 #define OUT_OF_SYNC_IBSS_THRESHOLD      200
    399 /* Period of time between 'Out of sync' and 'No beacon' events */
    400 #define NO_BEACON_DEFAULT_TIMEOUT       100 /* in tu-s*/
    401 
    402 /* Consecutive NACK roaming trigger configuration */
    403 #define NO_ACK_DEFAULT_THRESHOLD        20
    404 
    405 /* Low Rx rate roaming trigger configuration */
    406 #define LOW_RATE_DEFAULT_THRESHOLD      2
    407 
    408 #define MEASUREMENT_NOISE_HISTOGRAM_NUM_OF_RANGES       8
    409 #define MAX_CHANNELS_IN_REG_DOMAIN      40
    410 
    411 #define CTS_TO_SELF_DISABLE             0
    412 #define CTS_TO_SELF_ENABLE              1
    413 
    414 #define MAX_TEMPLATE_SIZE               256
    415 
    416 /* Scan constants */
    417 #define MAX_NUMBER_OF_CHANNELS_PER_SCAN                     16
    418 #define SCAN_MAX_NUM_OF_NORMAL_CHANNELS_PER_COMMAND         MAX_NUMBER_OF_CHANNELS_PER_SCAN
    419 #define SCAN_MAX_NUM_OF_SPS_CHANNELS_PER_COMMAND            16
    420 #define SCAN_DEFAULT_MIN_CHANNEL_DWELL_TIME                 30000
    421 #define SCAN_DEFAULT_MAX_CHANNEL_DWELL_TIME                 60000
    422 #define SCAN_DEFAULT_EARLY_TERMINATION_EVENT                SCAN_ET_COND_DISABLE
    423 #define SCAN_DEFAULT_EARLY_TERMINATION_NUM_OF_FRAMES        0
    424 
    425 #define NUM_OF_NOISE_HISTOGRAM_COUNTERS 8
    426 
    427 #define TX_DESCRIPTOR_SIZE             sizeof(TxIfDescriptor_t)
    428 
    429 #define CTRL_BLK_ENTRIES_NUM            128
    430 
    431 #define HT_CAP_AMPDU_PARAMETERS_FIELD_OFFSET   2
    432 #define HT_CAP_HT_EXTENDED_FIELD_OFFSET        19
    433 #define HT_CAP_AMPDU_MAX_RX_FACTOR_BITMASK     0x3
    434 #define HT_CAP_AMPDU_MIN_START_SPACING_BITMASK 0x7
    435 #define HT_CAP_GREENFIELD_FRAME_FORMAT_BITMASK 0x0010
    436 #define HT_CAP_SHORT_GI_FOR_20MHZ_BITMASK      0x0020
    437 #define HT_CAP_LSIG_TXOP_PROTECTION_BITMASK    0x8000
    438 #define HT_EXT_HT_CONTROL_FIELDS_BITMASK       0x0400
    439 #define HT_EXT_RD_INITIATION_BITMASK           0x0800
    440 #define HT_INF_RIFS_MOD_BITMASK                0x08
    441 #define HT_INF_OPERATION_MOD_BITMASK           0x03
    442 #define HT_INF_NON_GF_PRES_BITMASK             0x04
    443 #define HT_INF_TX_BURST_LIMIT_BITMASK          0x08
    444 #define HT_INF_DUAL_BEACON_BITMASK             0x40
    445 
    446 /*
    447  * TWD HT capabilities, physical capabilities of the STA.
    448  * The structure is defined like that in order to simplify the interface with WHA layer.
    449  */
    450 #define RX_TX_MCS_BITMASK_SIZE      10
    451 
    452 #define  DSSS_CCK_MODE         					1
    453 
    454 #define MCS_HIGHEST_SUPPORTED_RECEPTION_DATA_RATE_IN_MBIT_S 0x48
    455 
    456 #define IMPLICIT_TXBF_REC_CAPABLE             	1
    457 #define TRANSMIT_STAGGERED_SOUNDING_CAPABLE   	1
    458 
    459 /* Firmware version name length */
    460 #define FW_VERSION_LEN                  		20
    461 
    462 /*the max table sized is : ( number of 221 * 8 bytes ) + ( non-221 * 2 bytes )
    463   Must be synchronized with the size of ACX defined in public_infoele.h interface
    464   with the FW
    465 */
    466 #define MIB_MAX_SIZE_OF_IE_TABLE 				112
    467 #define MIB_TEMPLATE_DATA_MAX_LEN   			256
    468 #define MIB_MAX_MULTICAST_GROUP_ADDRS			8
    469 
    470 #define MAX_MULTICAST_GROUP_ADDRS				8
    471 
    472 /* Max numver of policies */
    473 #define MAX_NUM_OF_TX_RATE_CLASS_POLICIES   	8
    474 
    475 #define NUM_POWER_LEVELS                		4
    476 #define MAX_POWER_LEVEL                 		1
    477 #define MIN_POWER_LEVEL                 		NUM_POWER_LEVELS
    478 
    479 /*
    480  * --------------------------------------------------------------
    481  *	Enumerations
    482  * --------------------------------------------------------------
    483  */
    484 /** \enum EFileType
    485  * \brief TWD input/output files
    486  *
    487  * \par Description
    488  * Indicates which File (or part of file) to read or write
    489  *
    490  * \sa TFileInfo
    491  */
    492 typedef enum
    493 {
    494     FILE_TYPE_INI = 0, 	/**< */
    495     FILE_TYPE_NVS, 		/**< */
    496     FILE_TYPE_FW, 		/**< */
    497     FILE_TYPE_FW_NEXT 	/**< */
    498 } EFileType;
    499 
    500 /** \enum EKeepAliveTriggerType
    501  * \brief Keep Alive Trigger Types
    502  *
    503  * \par Description
    504  * Indicates when to trigger Keep Alive
    505  *
    506  * \sa TKeepAliveParams
    507  *
    508  */
    509 typedef enum
    510 {
    511     KEEP_ALIVE_TRIG_TYPE_NO_TX = 0,		/**< */
    512     KEEP_ALIVE_TRIG_TYPE_PERIOD_ONLY	/**< */
    513 
    514 } EKeepAliveTriggerType;
    515 
    516 /** \enum ESlotTime
    517  * \brief Radio (PHY) Slot Time Type
    518  *
    519  * \par Description
    520  * Used for configuring PHY Slot Time for FW
    521  *
    522  * \sa TWD_CfgPreamble
    523  */
    524 typedef enum
    525 {
    526 	PHY_SLOT_TIME_LONG		= 0,	/**< 	Long PHY Slot Time  */
    527     PHY_SLOT_TIME_SHORT     = 1		/**< 	Short PHY Slot Time  */
    528 
    529 } ESlotTime;
    530 
    531 /** \enum EMib
    532  * \brief MIB Element Type
    533  *
    534  * \par Description
    535  * Used for R/W MIB to FW
    536  *
    537  * \sa TMib
    538  */
    539 typedef enum
    540 {
    541 /*	0x00	*/	MIB_dot11MaxReceiveLifetime = 0,	/**< */
    542 /*	0x01	*/  MIB_dot11SlotTime,					/**< */
    543 /*	0x02	*/  MIB_dot11GroupAddressesTable,		/**< */
    544 /*	0x03	*/  MIB_dot11WepDefaultKeyId,			/**< */
    545 /*	0x04	*/  MIB_dot11CurrentTxPowerLevel,		/**< */
    546 /*	0x05	*/  MIB_dot11RTSThreshold,				/**< */
    547 /*	0x06	*/  MIB_ctsToSelf,						/**< */
    548 /*	0x07	*/  MIB_arpIpAddressesTable,			/**< */
    549 /*	0x08	*/  MIB_templateFrame,					/**< */
    550 /*	0x09	*/  MIB_rxFilter,						/**< */
    551 /*	0x0A	*/  MIB_beaconFilterIETable,			/**< */
    552 /*	0x0B	*/  MIB_beaconFilterEnable,				/**< */
    553 /*	0x0C	*/  MIB_sleepMode,						/**< */
    554 /*	0x0D	*/  MIB_wlanWakeUpInterval,				/**< */
    555 /*	0x0E	*/  MIB_beaconLostCount,				/**< */
    556 /*	0x0F	*/  MIB_rcpiThreshold,					/**< */
    557 /*	0x10	*/  MIB_statisticsTable,				/**< */
    558 /*	0x11	*/  MIB_ibssPsConfig,					/**< */
    559 /*	0x12	*/  MIB_txRatePolicy,					/**< */
    560 /*	0x13	*/  MIB_countersTable,					/**< */
    561 /*	0x14	*/  MIB_btCoexsitenceMode,				/**< */
    562 /*	0x15	*/  MIB_btCoexistenceParameters,		/**< */
    563 
    564 				/* must be last!!! */
    565 				MIB_lastElem	= 0xFFFF			/**< */
    566 
    567 } EMib;
    568 
    569 /** \enum ETwdParam
    570  * \brief TWD Control parameter ID
    571  *
    572  * \par Description
    573  * FW Parmaeter Information Identifier
    574  *
    575  * \sa TWD_SetParam, TWD_GetParam
    576  */
    577 typedef enum
    578 {
    579 /*	0x01	*/	TWD_RTS_THRESHOLD_PARAM_ID          = 0x01,		/**< */
    580 /*	0x02	*/  TWD_FRAG_THRESHOLD_PARAM_ID,					/**< */
    581 /*	0x03	*/  TWD_COUNTERS_PARAM_ID,							/**< */
    582 /*	0x04	*/  TWD_LISTEN_INTERVAL_PARAM_ID,					/**< */
    583 /*	0x05	*/  TWD_BEACON_INTERVAL_PARAM_ID,					/**< */
    584 /*	0x06	*/  TWD_TX_POWER_PARAM_ID,    						/**< */
    585 /*	0x07	*/  TWD_CLK_RUN_ENABLE_PARAM_ID,					/**< */
    586 /*	0x08	*/  TWD_QUEUES_PARAM_ID, 							/**< */
    587 /*	0x09	*/  TWD_TX_RATE_CLASS_PARAM_ID,						/**< */
    588 /*	0x0A	*/  TWD_MAX_TX_MSDU_LIFE_TIME_PARAM_ID,				/**< */
    589 /*	0x0B	*/  TWD_MAX_RX_MSDU_LIFE_TIME_PARAM_ID,				/**< */
    590 /*	0x0C	*/  TWD_CTS_TO_SELF_PARAM_ID,						/**< */
    591 /*	0x0D	*/  TWD_RX_TIME_OUT_PARAM_ID,						/**< */
    592 /*	0x0E	*/  TWD_BCN_BRC_OPTIONS_PARAM_ID,					/**< */
    593 /*	0x0F	*/	TWD_AID_PARAM_ID,								/**< */
    594 /*	0x10	*/  TWD_RSN_HW_ENC_DEC_ENABLE_PARAM_ID,  			/**< */
    595 /*	0x11	*/  TWD_RSN_KEY_ADD_PARAM_ID,						/**< */
    596 /*	0x12	*/  TWD_RSN_KEY_REMOVE_PARAM_ID,					/**< */
    597 /*	0x13	*/  TWD_RSN_DEFAULT_KEY_ID_PARAM_ID,				/**< */
    598 /*	0x14	*/  TWD_RSN_SECURITY_MODE_PARAM_ID,					/**< */
    599 /*	0x15	*/  TWD_RSN_SECURITY_ALARM_CB_SET_PARAM_ID,			/**< */
    600 /*	0x16	*/  TWD_ACX_STATISTICS_PARAM_ID,					/**< */
    601 /*	0x17	*/  TWD_MEDIUM_OCCUPANCY_PARAM_ID,					/**< */
    602 /*	0x18	*/  TWD_DISABLE_POWER_MANAGEMENT_AUTO_CONFIG_PARAM_ID,	/**< */
    603 /*	0x19	*/  TWD_ENABLE_POWER_MANAGEMENT_AUTO_CONFIG_PARAM_ID,	/**< */
    604 /*	0x1A	*/  TWD_SG_ENABLE_PARAM_ID,							/**< */
    605 /*	0x1B	*/  TWD_SG_CONFIG_PARAM_ID,							/**< */
    606 #ifdef XCC_MODULE_INCLUDED
    607 /*	0x1C	*/  TWD_RSN_XCC_SW_ENC_ENABLE_PARAM_ID,				/**< */
    608 /*	0x1D	*/  TWD_RSN_XCC_MIC_FIELD_ENABLE_PARAM_ID,			/**< */
    609 #endif /* XCC_MODULE_INCLUDED*/
    610 /*	0x1E	*/  TWD_TX_OP_LIMIT_PARAM_ID,						/**< */
    611 /*	0x1F	*/  TWD_NOISE_HISTOGRAM_PARAM_ID,					/**< */
    612 /*	0x20	*/  TWD_TSF_DTIM_MIB_PARAM_ID,						/**< */
    613 /*	0x21	*/  TWD_REVISION_PARAM_ID,							/**< */
    614 /*	0x22	*/  TWD_CURRENT_CHANNEL_PARAM_ID,					/**< */
    615 /*	0x23	*/	TWD_RADIO_TEST_PARAM_ID,						/**< */
    616 /*	0x24	*/	TWD_RSSI_LEVEL_PARAM_ID,						/**< */
    617 /*	0x25	*/	TWD_SNR_RATIO_PARAM_ID,							/**< */
    618 /*	0x26	*/	TWD_COEX_ACTIVITY_PARAM_ID,	    				/**< */
    619 /*	0x27	*/	TWD_FM_COEX_PARAM_ID,	    				    /**< */
    620 
    621 				/* must be last!!! */
    622 /*	0x28    */	TWD_LAST_PARAM_ID								/**< */
    623 } ETwdParam;
    624 
    625 /** \enum ETwdCallbackOwner
    626  * \brief TWD Callback Module owner ID
    627  *
    628  * \par Description
    629  * The Owner ID defines a specific TWD Module
    630  *
    631  * \sa ETwdEventId, TWD_RegisterCb
    632  */
    633 typedef enum
    634 {
    635     TWD_OWNER_DRIVER_TX_XFER            = 0x0100,	/**< 	TX Xfer Owner ID  		*/
    636     TWD_OWNER_RX_XFER                   = 0x0200,	/**< 	RX Xfer Owner ID  		*/
    637     TWD_OWNER_SELF                      = 0x0300,	/**< 	Self Owner ID  			*/
    638     TWD_OWNER_MAC_SERVICES              = 0x0400,	/**< 	MAC Services Owner ID  	*/
    639     TWD_OWNER_TX_RESULT                 = 0x0500,	/**< 	TX Result Owner ID  	*/
    640     TWD_OWNER_SELF_CONFIG               = 0x0600,	/**< 	Self configuration of Owner ID  	*/
    641     TWD_OWNER_RX_QUEUE                  = 0x0700,	/**< 	RX Queue Owner ID  		*/
    642     TWD_OWNER_TX_HW_QUEUE               = 0x0800	/**< 	TX HW Queue Owner ID  	*/
    643 
    644 } ETwdCallbackOwner;
    645 
    646 /** \enum ETwdIntCallbackId
    647  * \brief TWD Internal Callbacks ID
    648  *
    649  * \par Description
    650  * The Owner ID defines a specific TWD Internal CB
    651  *
    652  * \sa ETwdEventId
    653  */
    654 typedef enum
    655 {
    656     TWD_INT_SEND_PACKET_TRANSFER        =  0x00 ,	/**< 	Tx Data Path Send Callback  	*/
    657     TWD_INT_SEND_PACKET_COMPLETE                , 	/**< 	Tx Data Path Complete Callback 	*/
    658     TWD_INT_UPDATE_BUSY_MAP                     , 	/**< 	Tx Data Path Update-Busy-Map Callback 	*/
    659 
    660     /* Rx Data Path Callbacks */
    661     TWD_INT_RECEIVE_PACKET              =  0x10 ,	/**< 	Rx Data Path Receive Packet Callback 	   	*/
    662     TWD_INT_REQUEST_FOR_BUFFER                  , 	/**< 	Rx Data Path Request for buffer Callback  	*/
    663 
    664     /* TWD Callbacks */
    665     TWD_INT_COMMAND_COMPLETE            =  0x20 , 	/**< 	TWD internal Command Complete Callback  	*/
    666     TWD_INT_EVENT_FAILURE  							/**< 	TWD internal Event Failure handle Callback 	*/
    667 
    668 } ETwdIntCallbackId;
    669 
    670 /** \enum ETwdOwnEventId
    671  * \brief Event Mail Box ID
    672  *
    673  * \par Description
    674  * Clients That expects an event should register for it,
    675  * and Mask/UnMask Events with this ID
    676  *
    677  * \sa
    678  */
    679 /* Note: changes here should be reflected also in eventTable in eventMbox.c !!! */
    680 typedef enum
    681 {
    682 			/*Regular events*/
    683 /*	0	*/  TWD_OWN_EVENT_RSSI_SNR_TRIGGER_0 = 0,       /**< */
    684 /*	1	*/  TWD_OWN_EVENT_RSSI_SNR_TRIGGER_1,           /**< */
    685 /*	2	*/  TWD_OWN_EVENT_RSSI_SNR_TRIGGER_2,           /**< */
    686 /*	3	*/  TWD_OWN_EVENT_RSSI_SNR_TRIGGER_3,           /**< */
    687 /*	4	*/  TWD_OWN_EVENT_RSSI_SNR_TRIGGER_4,          	/**< */
    688 /*	5	*/  TWD_OWN_EVENT_RSSI_SNR_TRIGGER_5,           /**< */
    689 /*	6	*/  TWD_OWN_EVENT_RSSI_SNR_TRIGGER_6,           /**< */
    690 /*	7	*/  TWD_OWN_EVENT_RSSI_SNR_TRIGGER_7,           /**< */
    691 /*	8	*/	TWD_OWN_EVENT_MEASUREMENT_START,            /**< */
    692 /*	9	*/  TWD_OWN_EVENT_MEASUREMENT_COMPLETE,         /**< */
    693 /*	10	*/	TWD_OWN_EVENT_SCAN_CMPLT,                   /**< */
    694 /*	11	*/  TWD_OWN_EVENT_SPS_SCAN_CMPLT,               /**< */
    695 /*	12	*/  TWD_OWN_EVENT_AP_DISCOVERY_COMPLETE,        /**< */
    696 /*	13	*/  TWD_OWN_EVENT_PS_REPORT,                    /**< */
    697 /*	14	*/	TWD_OWN_EVENT_PSPOLL_DELIVERY_FAILURE, 		/**< */
    698 /*	15	*/  TWD_OWN_EVENT_DISCONNECT_COMPLETE,          /**< */
    699 /*	16	*/  TWD_OWN_EVENT_JOIN_CMPLT,                   /**< */
    700 /*	17	*/  TWD_OWN_EVENT_SWITCH_CHANNEL_CMPLT,         /**< */
    701 /*	18	*/  TWD_OWN_EVENT_BSS_LOSE,                     /**< */
    702 /*	19	*/  TWD_OWN_EVENT_BSS_REGAIN,                   /**< */
    703 /*	20	*/  TWD_OWN_EVENT_MAX_TX_RETRY,                 /**< */
    704 /*  21  */  RESERVED21,									/**< */
    705 /*	22	*/  TWD_OWN_EVENT_SOFT_GEMINI_SENSE,            /**< */
    706 /*	23	*/  TWD_OWN_EVENT_SOFT_GEMINI_PREDIC,           /**< */
    707 /*	24	*/  TWD_OWN_EVENT_SOFT_GEMINI_AVALANCHE,        /**< */
    708 /*	25	*/  TWD_OWN_EVENT_PLT_RX_CALIBRATION_COMPLETE,  /**< */
    709 /*  26  */  TWD_DBG_EVENT,								/**< */
    710 /*  27  */  TWD_HEALTH_CHECK_REPLY_EVENT,				/**< */
    711 /*	28	*/  TWD_OWN_EVENT_PERIODIC_SCAN_COMPLETE,       /**< */
    712 /*	29	*/  TWD_OWN_EVENT_PERIODIC_SCAN_REPORT,         /**< */
    713 /*  30  */  TWD_BA_SESSION_TEAR_DOWN_EVENT,				/**< */
    714 /*	31	*/  TWD_OWN_EVENT_ALL,                          /**< */
    715 /*	32	*/  TWD_OWN_EVENT_MAX                          	/**< */
    716 
    717 } ETwdOwnEventId;
    718 
    719 /** \enum ETwdEventId
    720  * \brief TNETW Driver Event ID
    721  *
    722  * \par Description
    723  * The TWD Event ID is used by user for registering a TWD Internal CB
    724  * which will handle a TWD Event.
    725  * Each field in this enum is an ID of TWD Event, and is combined of two IDs:
    726  * TWD CB Owner (Module) ID and TWD Internal CB ID. Therefore, the CB is registered accordeing to
    727  * Module (Owner) and Internal CB Id.
    728  *
    729  * \sa TWD_RegisterCb, ETwdCallbackOwner, ETwdIntCallbackId
    730  */
    731 typedef enum
    732 {
    733     /* Internal Failure Event Callbacks */
    734     TWD_EVENT_FAILURE                   	=  TWD_OWNER_SELF | TWD_INT_EVENT_FAILURE, 					/**< 	Failure Internal Event ID 			*/
    735     TWD_EVENT_COMMAND_COMPLETE          	=  TWD_OWNER_SELF | TWD_INT_COMMAND_COMPLETE,  				/**< 	Command Complete Internal Event ID */
    736 
    737     /* Tx Data Path Callbacks */
    738     TWD_EVENT_TX_XFER_SEND_PKT_TRANSFER 	=  TWD_OWNER_DRIVER_TX_XFER | TWD_INT_SEND_PACKET_TRANSFER,	/**< 	TX Data Path Send Packet Event ID 			*/
    739     TWD_EVENT_TX_RESULT_SEND_PKT_COMPLETE	=  TWD_OWNER_TX_RESULT | TWD_INT_SEND_PACKET_COMPLETE,      /**< 	TX Data Path Send Packet Complete Event ID 	*/
    740     TWD_EVENT_TX_HW_QUEUE_UPDATE_BUSY_MAP   =  TWD_OWNER_TX_HW_QUEUE | TWD_INT_UPDATE_BUSY_MAP,         /**< 	TX Data Path Update-Busy-Map Event ID 	*/
    741 
    742     /* Rx Data Path Callbacks */
    743     TWD_EVENT_RX_REQUEST_FOR_BUFFER     	=  TWD_OWNER_RX_XFER | TWD_INT_REQUEST_FOR_BUFFER,         	/**< 	RX Data Path Request for Buffer Internal Event ID 	*/
    744     TWD_EVENT_RX_RECEIVE_PACKET         	=  TWD_OWNER_RX_QUEUE | TWD_INT_RECEIVE_PACKET             	/**< 	RX Data Path Receive Packet Internal Event ID  	*/
    745 
    746 } ETwdEventId;
    747 
    748 #ifdef TI_DBG
    749 /** \enum ETwdPrintInfoType
    750  * \brief TWD print functions codes
    751  *
    752  * \par Description
    753  * Used for Debug - determines which Tx Info to print
    754  *
    755  * \sa TWD_PrintTxInfo
    756  */
    757 typedef enum
    758 {
    759 /*	0	*/	TWD_PRINT_TX_CTRL_BLK_TBL = 0,	/**< 	Print TX Control Block Information	*/
    760 /*	1	*/  TWD_PRINT_TX_HW_QUEUE_INFO,		/**< 	Print TX HW Queue Information 		*/
    761 /*	2	*/  TWD_PRINT_TX_XFER_INFO,			/**< 	Print TX XFER Information 			*/
    762 /*	3	*/  TWD_PRINT_TX_RESULT_INFO,		/**< 	Print TX Result Information 		*/
    763 /*	4	*/  TWD_CLEAR_TX_RESULT_INFO		/**< 	Clear TX Result Information			*/
    764 
    765 } ETwdPrintInfoType;
    766 #endif
    767 
    768 /** \enum EIpVer
    769  * \brief IP Version
    770  *
    771  * \par Description
    772  *
    773  * \sa TWD_PrintTxInfo
    774  */
    775 typedef enum
    776 {
    777 /*	0	*/	IP_VER_4 = 0, 	/**< */
    778 /*	1	*/  IP_VER_6	 	/**< */
    779 
    780 } EIpVer;
    781 
    782 /** \enum EKeyType
    783  * \brief Key Type
    784  *
    785  * \par Description
    786  * Security Key Type
    787  *
    788  * \sa TSecurityKeys
    789  */
    790 typedef enum
    791 {
    792 /*	0	*/  KEY_NULL = 0,	/**< */
    793 /*	1	*/  KEY_WEP,		/**< */
    794 /*	2	*/  KEY_TKIP,		/**< */
    795 /*	3	*/  KEY_AES,		/**< */
    796 /*	4	*/  KEY_XCC,    	/**< */
    797 #ifdef GEM_SUPPORTED
    798     /*  5   */  KEY_GEM
    799 #endif
    800 
    801 } EKeyType;
    802 
    803 /** \enum ERegistryTxRate
    804  * \brief TX Rate Type
    805  *
    806  * \par Description
    807  *
    808  * \sa
    809  */
    810 /* Make it same as "rate_e" */
    811 typedef enum
    812 {
    813 /* This value is reserved if this enum is used for MgmtCtrlTxRate - the auto mode is only valid for data packets */
    814 /*	0	*/	REG_RATE_AUTO_BIT = 0, 		/**< */
    815 /*	1	*/	REG_RATE_1M_BIT,			/**< */
    816 /*	2	*/	REG_RATE_2M_BIT,			/**< */
    817 /*	3	*/	REG_RATE_5_5M_CCK_BIT,		/**< */
    818 /*	4	*/	REG_RATE_11M_CCK_BIT,		/**< */
    819 /*	5	*/	REG_RATE_22M_PBCC_BIT,		/**< */
    820 /*	6	*/	REG_RATE_6M_OFDM_BIT,		/**< */
    821 /*	7	*/	REG_RATE_9M_OFDM_BIT,		/**< */
    822 /*	8	*/	REG_RATE_12M_OFDM_BIT,		/**< */
    823 /*	9	*/	REG_RATE_18M_OFDM_BIT,		/**< */
    824 /*	10	*/	REG_RATE_24M_OFDM_BIT,		/**< */
    825 /*	11	*/	REG_RATE_36M_OFDM_BIT,		/**< */
    826 /*	12	*/	REG_RATE_48M_OFDM_BIT,		/**< */
    827 /*	13	*/	REG_RATE_54M_OFDM_BIT,		/**< */
    828 /*	14	*/	REG_RATE_MCS0_OFDM_BIT,		/**< */
    829 /*	15	*/	REG_RATE_MCS1_OFDM_BIT,		/**< */
    830 /*	16	*/	REG_RATE_MCS2_OFDM_BIT,		/**< */
    831 /*	17	*/	REG_RATE_MCS3_OFDM_BIT,		/**< */
    832 /*	18	*/	REG_RATE_MCS4_OFDM_BIT,		/**< */
    833 /*	19	*/	REG_RATE_MCS5_OFDM_BIT,		/**< */
    834 /*	20	*/	REG_RATE_MCS6_OFDM_BIT,		/**< */
    835 /*	21	*/	REG_RATE_MCS7_OFDM_BIT		/**< */
    836 
    837 } ERegistryTxRate;
    838 
    839 /** \enum EFailureEvent
    840  * \brief Failure Event
    841  *
    842  * \par Description
    843  * Used as a parameter for Failure Event CB -
    844  * Inicates Failure Event ID, according which the Failure
    845  * Event's data is driven
    846  *
    847  * \sa TWD_RegisterOwnCb, TFailureEventCb
    848  */
    849 typedef enum
    850 {
    851 /*	-1	*/	NO_FAILURE = -1,				/**< 	No Failure Event					*/
    852 /*	0	*/	NO_SCAN_COMPLETE_FAILURE = 0,	/**< 	No Scan Complete Failure Event		*/
    853 /*	1	*/	MBOX_FAILURE,					/**< 	Mail Box Failure Event				*/
    854 /*	2	*/	HW_AWAKE_FAILURE,				/**< 	HW Awake Failure Event				*/
    855 /*	3	*/	TX_STUCK,						/**< 	TX STUCK Failure Event				*/
    856 /*	4	*/	DISCONNECT_TIMEOUT,				/**< 	Disconnect Timeout Failure Event	*/
    857 /*	5	*/	POWER_SAVE_FAILURE,				/**< 	Power Save Failure Event			*/
    858 /*	6	*/	MEASUREMENT_FAILURE,			/**< 	Measurement Failure Event			*/
    859 /*	7	*/	BUS_FAILURE,					/**< 	Bus Failure Event					*/
    860 /*	8	*/	HW_WD_EXPIRE,					/**< 	HW Watchdog Expire Event			*/
    861 /*	9	*/	RX_XFER_FAILURE,			    /**< 	Rx pkt xfer failure                 */
    862 
    863 /* must be last!!! */
    864 /* 10	*/	MAX_FAILURE_EVENTS				/**< 	Maximum number of Failure Events	*/
    865 
    866 } EFailureEvent;
    867 
    868 /** \enum ETemplateType
    869  * \brief Template Type
    870  *
    871  * \par Description
    872  * Used for setting/Getting a Template to/from FW
    873  *
    874  * \sa TWD_CmdTemplate, TWD_WriteMibTemplateFrame, TSetTemplate TWD_GetTemplate
    875  */
    876 typedef enum
    877 {
    878 /*	0	*/	NULL_DATA_TEMPLATE = 0,		/**< NULL Data Template						*/
    879 /*	1	*/	BEACON_TEMPLATE,        	/**< Beacon Template						*/
    880 /*	2	*/	PROBE_REQUEST_TEMPLATE,     /**< PROBE Request Template					*/
    881 /*	3	*/	PROBE_RESPONSE_TEMPLATE,	/**< PROBE Response Template				*/
    882 /*	4	*/	QOS_NULL_DATA_TEMPLATE,		/**< Quality Of Service NULL Data Template	*/
    883 /*	5	*/	PS_POLL_TEMPLATE,			/**< Power Save Poll Template				*/
    884 /*	6	*/	KEEP_ALIVE_TEMPLATE,		/**< Keep Alive Template 					*/
    885 /*	7	*/	DISCONN_TEMPLATE			/**< Disconn (Deauth/Disassoc) Template		*/
    886 } ETemplateType;
    887 
    888 
    889 
    890 
    891 typedef enum
    892 {
    893     KEY_WEP_DEFAULT       = 0,
    894     KEY_WEP_ADDR          = 1,
    895     KEY_AES_GROUP         = 4,
    896     KEY_AES_PAIRWISE      = 5,
    897     KEY_WEP_GROUP         = 6,
    898     KEY_TKIP_MIC_GROUP    = 10,
    899     KEY_TKIP_MIC_PAIRWISE = 11
    900 } KeyType_enum;
    901 
    902 
    903 /** \enum ECipherSuite
    904  * \brief CHIPHER Suite
    905  *
    906  * \par Description
    907  * Available cipher suites for admission control
    908  *
    909  * \sa
    910  */
    911 typedef enum
    912 {
    913 /*	0	*/	TWD_CIPHER_NONE = 0,			/**< no cipher suite 		*/
    914 /*	1	*/	TWD_CIPHER_WEP,        			/**< WEP-40 cipher suite 	*/
    915 /*	2	*/	TWD_CIPHER_TKIP,        		/**< TKIP cipher suite      */
    916 /*	3	*/	TWD_CIPHER_AES_WRAP,    		/**< AES WRAP cipher suite  */
    917 /*	4	*/	TWD_CIPHER_AES_CCMP,    		/**< AES CCMP cipher suite  */
    918 /*	5	*/	TWD_CIPHER_WEP104,      		/**< WEP-104 cipher suite 	*/
    919 /*	6	*/	TWD_CIPHER_CKIP,        		/**< CKIP cipher suite      */
    920 #ifdef GEM_SUPPORTED
    921     /*	7	*/	TWD_CIPHER_GEM,         		/**< GEM cipher suite       */
    922 #endif
    923             TWD_CIPHER_MAX,
    924 
    925 			TWD_CIPHER_UNKNOWN	= 255       /**< UNKNOWN chpiher suite 	*/
    926 
    927 } ECipherSuite;
    928 
    929 /** \enum E80211PsMode
    930  * \brief 802.11 Power Save Mode
    931  *
    932  * \par Description
    933  *
    934  * \sa TWD_Scan, TWD_SetPsMode
    935  */
    936 typedef enum
    937 {
    938 /*	0	*/	POWER_SAVE_OFF = 0,		/**< 	power save 802.11 OFF   		*/
    939 /*	1	*/	POWER_SAVE_ON,			/**< 	power save 802.11 ON  			*/
    940 /*	2	*/	POWER_SAVE_KEEP_CURRENT	/**< 	power save 802.11 don't change 	*/
    941 
    942 } E80211PsMode;
    943 
    944 /** \enum E80211PsStatus
    945  * \brief Set Power Save mode status
    946  *
    947  * \par Description
    948  *
    949  * \sa
    950  */
    951 typedef enum
    952 {
    953 /*	1	*/	POWER_SAVE_802_11_SUCCESS = 1,	/**< 	power save mode Success   	*/
    954 /*	2	*/	POWER_SAVE_802_11_FAIL,			/**< 	power save mode Fail    	*/
    955 /*	3	*/	POWER_SAVE_802_11_NOT_ALLOWED,	/**< 	power save mode Not Allowed	*/
    956 /*	4	*/	POWER_SAVE_802_11_PENDING,		/**< 	power save mode Pending    	*/
    957 /*	5	*/	POWER_SAVE_802_11_IS_CURRENT	/**< 	power save mode Is Current 	*/
    958 
    959 } E80211PsStatus;
    960 
    961 /** \enum EElpCtrlMode
    962  * \brief ELP Control Mode
    963  *
    964  * \par Description
    965  *
    966  * \sa
    967  */
    968 typedef enum
    969 {
    970 /*	0	*/	ELPCTRL_MODE_NORMAL = 0,	/**< ALP Control mode Normal   		*/
    971 /*	1	*/	ELPCTRL_MODE_KEEP_AWAKE		/**< ALP Control mode Keep Awake   	*/
    972 
    973 } EElpCtrlMode;
    974 
    975 /** \enum EPreamble
    976  * \brief Preamble Type
    977  *
    978  * \par Description
    979  *
    980  * \sa TWD_CfgPreamble
    981  */
    982 typedef enum
    983 {
    984     PREAMBLE_LONG       	= 0,	/**< Preamble type Long   			*/
    985     PREAMBLE_SHORT          = 1,	/**< Preamble type Short   			*/
    986 
    987     PREAMBLE_UNSPECIFIED    = 0xFF	/**< Preamble type Not Specified   	*/
    988 
    989 } EPreamble;
    990 
    991 /** \enum ENoiseHistogramCmd
    992  * \brief Noise Histogram Type
    993  *
    994  * \par Description
    995  *
    996  * \sa TNoiseHistogram, TWD_CmdNoiseHistogram
    997  */
    998 typedef enum
    999 {
   1000      STOP_NOISE_HIST                    = 0,	/**< Stop Noise Histogram	*/
   1001      START_NOISE_HIST                   = 1		/**< Start Noise Histogram	*/
   1002 
   1003 } ENoiseHistogramCmd;
   1004 
   1005 /** \enum ETnetWakeOn
   1006  * \brief ACX Wake Up Condition
   1007  *
   1008  * \par Description
   1009  *
   1010  * \sa TPowerMgmtConfig, TWD_CfgWakeUpCondition
   1011  */
   1012 typedef enum
   1013 {
   1014 
   1015 /*	0	*/	TNET_WAKE_ON_BEACON = 0,       	/**< Indicate the wake on event of the HW - beacon.
   1016 											* In this event the HW configure to be awake on every beacon.
   1017 											*/
   1018 
   1019 /*	1	*/	TNET_WAKE_ON_DTIM,             /**< Indicate the wake on event of the HW - DTIM. In this event
   1020 											* the HW configure to be awake on every DITM (configure by the AP).
   1021 											*/
   1022 
   1023 /*	2	*/	TNET_WAKE_ON_N_BEACON,          /**< Indicate the wake on event of the HW - listen interval.
   1024 											* In this event the HW configure to be awake on every
   1025 											* configured number of beacons.
   1026 											*/
   1027 
   1028 /*	3	*/	TNET_WAKE_ON_N_DTIM,            /**< Indicate the wake on event of the HW - listen interval.
   1029 											* In this event the HW configure to be awake on every
   1030 											* configured number of beacons.
   1031 											*/
   1032 
   1033 /*	4	*/	TNET_WAKE_ON_HOST              /**< Indicate the wake on event of the HW - Host access only
   1034 											*/
   1035 
   1036 } ETnetWakeOn;
   1037 
   1038 /** \enum ETxAntenna
   1039  * \brief TX Antenna Types
   1040  *
   1041  * \par Description
   1042  *
   1043  * \sa TGeneralInitParams, TTwdParamContents
   1044  */
   1045 typedef enum
   1046 {
   1047     TX_ANTENNA_2	= 0, 	/**< */
   1048     TX_ANTENNA_1    = 1		/**< */
   1049 
   1050 } ETxAntenna;
   1051 
   1052 /** \enum ERxAntenna
   1053  * \brief RX Antenna Types
   1054  *
   1055  * \par Description
   1056  *
   1057  * \sa TGeneralInitParams, TTwdParamContents
   1058  */
   1059 typedef enum
   1060 {
   1061 /*	0	*/	RX_ANTENNA_1 = 0,	/**< */
   1062 /*	1	*/	RX_ANTENNA_2,		/**< */
   1063 /*	2	*/	RX_ANTENNA_FULL,	/**< */
   1064 /*	3	*/	RX_ANTENNA_PARTIAL	/**< */
   1065 
   1066 } ERxAntenna;
   1067 
   1068 /** \enum EPowerPolicy
   1069  * \brief Save Power Level Policy
   1070  *
   1071  * \par Description
   1072  *
   1073  * \sa TWD_CfgSleepAuth
   1074  */
   1075 typedef enum
   1076 {
   1077 /*	0	*/	POWERAUTHO_POLICY_ELP = 0,	/**< */
   1078 /*	1	*/	POWERAUTHO_POLICY_PD,		/**< */
   1079 /*	2	*/	POWERAUTHO_POLICY_AWAKE,	/**< */
   1080 /*	3	*/	POWERAUTHO_POLICY_NUM		/**< */
   1081 
   1082 } EPowerPolicy;
   1083 
   1084 /** \enum ESoftGeminiEnableModes
   1085  * \brief Soft-Gemini Enable Modes
   1086  *
   1087  * \par Description
   1088  *
   1089  * \sa
   1090  */
   1091 typedef enum
   1092 {
   1093 /*	0	*/	SG_DISABLE = 0,			/**< */
   1094 /*	1	*/	SG_PROTECTIVE,			    /**< */
   1095 /*	2	*/	SG_OPPORTUNISTIC,	/**< */
   1096 
   1097 
   1098 } ESoftGeminiEnableModes;
   1099 /** \enum ESoftGeminiEnableProfile
   1100  * \brief Soft-Gemini Profile Modes for S60 configuration
   1101  *
   1102  * \par Description
   1103  *
   1104  * \sa
   1105  */
   1106 typedef enum
   1107 {
   1108     BtCoexProfData = 0,
   1109     BtCoexProfDataLowLatency,
   1110     BtCoexProfA2DP
   1111 }ESoftGeminiEnableProfile;
   1112 
   1113 
   1114 /** \enum EMibTemplateType
   1115  * \brief MIB Template type
   1116  *
   1117  * \par Description
   1118  *
   1119  * \sa
   1120  */
   1121 typedef enum
   1122 {
   1123 /*	0	*/ 	TEMPLATE_TYPE_BEACON = 0,           /**< 	BEACON template 			*/
   1124 /*	1	*/  TEMPLATE_TYPE_PROBE_REQUEST,        /**< 	PROB template 				*/
   1125 /*	2	*/  TEMPLATE_TYPE_NULL_FRAME,           /**< 	NULL FRAM template 			*/
   1126 /*	3	*/  TEMPLATE_TYPE_PROBE_RESPONSE,       /**< 	PROB Response template 		*/
   1127 /*	4	*/  TEMPLATE_TYPE_QOS_NULL_FRAME,       /**< 	QOS Null Frame template 	*/
   1128 /*	5	*/  TEMPLATE_TYPE_PS_POLL               /**< 	Power Save Poll template	*/
   1129 
   1130 } EMibTemplateType;
   1131 
   1132 
   1133 /** \enum ERxFailure
   1134  * \brief RX Failure/Error
   1135  *
   1136  * \par Description
   1137  *
   1138  * \sa
   1139  */
   1140 typedef enum
   1141 {
   1142 /*	0	*/	RX_FAILURE_NONE = 0,		/**< No Failure		*/
   1143 /*	1	*/	RX_FAILURE_DECRYPT,         /**< DeCrypt Failure	*/
   1144 /*	2	*/	RX_FAILURE_MIC_ERROR,		/**< MIC Error		*/
   1145 } ERxFailure;
   1146 
   1147 /** \enum ETwdChannelWidth
   1148  * \brief TWD Channel Width
   1149  *
   1150  * \par Description
   1151  * Used for Configure HT Capabilities Settings
   1152  *
   1153  * \sa TWD_SetDefaults, TTwdHtCapabilities
   1154  */
   1155 typedef enum
   1156 {
   1157 /*	0	*/	CHANNEL_WIDTH_20MHZ = 0,		/**< 20MHZ Channel Width	*/
   1158 /*	1	*/  CHANNEL_WIDTH_40MHZ_20MHZ		/**< 40-20MHZ Channel Width	*/
   1159 } ETwdChannelWidth;
   1160 
   1161 /** \enum ETwdRxSTBC
   1162  * \brief RX STBC Spatial Stream Supported
   1163  *
   1164  * \par Description
   1165  * Indicates how many RX STBC Spatial Stream are Supported
   1166  * Used for Configure HT Capabilities Settings
   1167  *
   1168  * \sa TWD_SetDefaults, TTwdHtCapabilities
   1169  */
   1170 typedef enum
   1171 {
   1172 /*	0	*/	RXSTBC_NOT_SUPPORTED  =   0,							/**< No Spatial Stream Supported					*/
   1173 /*	1	*/  RXSTBC_SUPPORTED_ONE_SPATIAL_STREAM, 					/**< One Spatial Stream Supported					*/
   1174 /*	2	*/  RXSTBC_SUPPORTED_ONE_AND_TWO_SPATIAL_STREAMS,			/**< One and Two Spatial Stream Supported			*/
   1175 /*	3	*/  RXSTBC_SUPPORTED_ONE_TWO_AND_THREE_SPATIAL_STREAMS	/**< One, Two and Three Spatial Stream Supported	*/
   1176 
   1177 } ETwdRxSTBC;
   1178 
   1179 /** \enum ETwdMaxAMSDU
   1180  * \brief Maximum MSDU Octets
   1181  *
   1182  * \par Description
   1183  * Used for Configure HT Capabilities Settings
   1184  *
   1185  * \sa TWD_SetDefaults, TTwdHtCapabilities
   1186  */
   1187 typedef enum
   1188 {
   1189 /*	0	*/	MAX_MSDU_3839_OCTETS = 0,	/**< Maximum MSDU Octets Number: 3839	*/
   1190 /*	1	*/  MAX_MSDU_7935_OCTETS		/**< Maximum MSDU Octets Number: 7935	*/
   1191 
   1192 } ETwdMaxAMSDU;
   1193 
   1194 /** \enum ETwdMaxAMPDU
   1195  * \brief Maximum MPDU Octets
   1196  *
   1197  * \par Description
   1198  * Indicates What is the Maximum MPDU Octets Number
   1199  * Used for Configure HT Capabilities Settings
   1200  *
   1201  * \sa TWD_SetDefaults, TTwdHtCapabilities
   1202  */
   1203 typedef enum
   1204 {
   1205 /*	0	*/	MAX_MPDU_8191_OCTETS = 0,	/**< Maximum MPDU Octets Number: 8191	*/
   1206 /*	1	*/  MAX_MPDU_16383_OCTETS,		/**< Maximum MPDU Octets Number: 16383	*/
   1207 /*	2	*/  MAX_MPDU_32767_OCTETS,		/**< Maximum MPDU Octets Number: 32767	*/
   1208 /*	3	*/  MAX_MPDU_65535_OCTETS		/**< Maximum MPDU Octets Number: 65535	*/
   1209 
   1210 } ETwdMaxAMPDU;
   1211 
   1212 /** \enum ETwdAMPDUSpacing
   1213  * \brief TWD AMPDU Spacing
   1214  *
   1215  * \par Description
   1216  * Indicates What is the Time Spacing of AMPDU
   1217  * Used for Configure HT Capabilities Settings
   1218  *
   1219  * \sa TWD_SetDefaults, TTwdHtCapabilities
   1220  */
   1221 typedef enum
   1222 {
   1223 /*	0	*/	AMPDU_SPC_NO_RESTRCITION =  0,	/**< No Restriction on AMPDU Time Spacing	*/
   1224 /*	1	*/	AMPDU_SPC_1_4_MICROSECONDS, 	/**< 1/4 Microsecond AMPDU Time Spacing   	*/
   1225 /*	2	*/	AMPDU_SPC_1_2_MICROSECONDS, 	/**< 1/2 Microsecond AMPDU Time Spacing   	*/
   1226 /*	3	*/	AMPDU_SPC_1_MICROSECOND,  		/**< 1 Microsecond AMPDU Time Spacing   	*/
   1227 /*	4	*/	AMPDU_SPC_2_MICROSECONDS,		/**< 2 Microsecond AMPDU Time Spacing   	*/
   1228 /*	5	*/	AMPDU_SPC_4_MICROSECONDS,		/**< 4 Microsecond AMPDU Time Spacing   	*/
   1229 /*	6	*/	AMPDU_SPC_8_MICROSECONDS,		/**< 8 Microsecond AMPDU Time Spacing   	*/
   1230 /*	7	*/	AMPDU_SPC_16_MICROSECONDS 		/**< 16 Microsecond AMPDU Time Spacing   	*/
   1231 
   1232 } ETwdAMPDUSpacing;
   1233 
   1234 /** \enum ETwdMcsSupport
   1235  * \brief TWD MCS Support
   1236  *
   1237  * \par Description
   1238  * BIT Mapp which Indicates What is the Tx/rx MCS Support Enabled
   1239  * Used for Configure HT Capabilities Settings
   1240  *
   1241  * \sa TWD_SetDefaults, TTwdHtCapabilities
   1242  */
   1243 typedef enum
   1244 {
   1245 /*	1	*/	MCS_SUPPORT_MCS_0   =  BIT_0,	/**< BIT 0	*/
   1246 /*	2	*/	MCS_SUPPORT_MCS_1   =  BIT_1,	/**< BIT 1	*/
   1247 /*	3	*/	MCS_SUPPORT_MCS_2   =  BIT_2,	/**< BIT 2	*/
   1248 /*	4	*/	MCS_SUPPORT_MCS_3   =  BIT_3,	/**< BIT 3	*/
   1249 /*	5	*/	MCS_SUPPORT_MCS_4   =  BIT_4,	/**< BIT 4	*/
   1250 /*	6	*/	MCS_SUPPORT_MCS_5   =  BIT_5,	/**< BIT 5	*/
   1251 /*	7	*/	MCS_SUPPORT_MCS_6   =  BIT_6,	/**< BIT 6	*/
   1252 /*	8	*/	MCS_SUPPORT_MCS_7   =  BIT_7	/**< BIT 7	*/
   1253 
   1254 } ETwdMcsSupport;
   1255 
   1256 /** \enum ETwdPCOTransTime
   1257  * \brief TWD PCO Transition Time
   1258  *
   1259  * \par Description
   1260  * Indicates What is the PCO Transition Time
   1261  * Used for Configure HT Capabilities Settings
   1262  *
   1263  * \sa TWD_SetDefaults, TTwdHtCapabilities
   1264  */
   1265 typedef enum
   1266 {
   1267 /*	0	*/	PCO_TRANS_TIME_NO_TRANSITION = 0, 	/**< No PCO Transition Time					*/
   1268 /*	1	*/	PCO_TRANS_TIME_400_MICROSECONDS, 	/**< PCO Transition Time: 400 Microsecond	*/
   1269 /*	2	*/	PCO_TRANS_TIME_1_5_MILLISECONDS, 	/**< PCO Transition Time: 1.5 Millisecond	*/
   1270 /*	3	*/	PCO_TRANS_TIME_5_MILLISECONDS		/**< PCO Transition Time: 5 Millisecond		*/
   1271 
   1272 } ETwdPCOTransTime;
   1273 
   1274 /** \enum ETwdHTCapabilitiesBitMask
   1275  * \brief TWD HT Capabilities Bit Mask Mapping
   1276  *
   1277  * \par Description
   1278  * Mapps the Bit Mask which are used for Making (Enabling/Disabling)
   1279  * HT Capabilities
   1280  *
   1281  * \sa TWD_SetDefaults, TTwdHtCapabilities
   1282  */
   1283 typedef enum
   1284 {
   1285 /*	1	*/	CAP_BIT_MASK_GREENFIELD_FRAME_FORMAT           =  BIT_0,	/**< BIT 0	*/
   1286 /*	2	*/	CAP_BIT_MASK_SHORT_GI_FOR_20MHZ_PACKETS        =  BIT_1,	/**< BIT 1	*/
   1287 /*	3	*/	CAP_BIT_MASK_SHORT_GI_FOR_40MHZ_PACKETS        =  BIT_2,	/**< BIT 2	*/
   1288 /*	4	*/	CAP_BIT_MASK_SUPPORT_FOR_STBC_IN_TRANSMISSION  =  BIT_3,	/**< BIT 3	*/
   1289 /*	5	*/	CAP_BIT_MASK_DELAYED_BLOCK_ACK                 =  BIT_4,	/**< BIT 4	*/
   1290 /*	6	*/	CAP_BIT_MASK_DSSS_CCK_IN_40_MHZ                =  BIT_5,	/**< BIT 5	*/
   1291 /*	7	*/	CAP_BIT_MASK_LSIG_TXOP_PROTECTION              =  BIT_6,	/**< BIT 6	*/
   1292 /*	8	*/	CAP_BIT_MASK_PCO                               =  BIT_7,	/**< BIT 7	*/
   1293 /*	9	*/	CAP_BIT_MASK_LDPC_CODING                       =  BIT_8		/**< BIT 8	*/
   1294 
   1295 } ETwdHTCapabilitiesBitMask;
   1296 
   1297 /** \enum ETwdMCSFeedback
   1298  * \brief TWD MCS FeedBack
   1299  *
   1300  * \par Description
   1301  * Indicates what is the MCS FeedBack Policy
   1302  * Used for Configure HT Capabilities Settings
   1303  *
   1304  * \sa TWD_SetDefaults, TTwdHtCapabilities
   1305  */
   1306 typedef enum
   1307 {
   1308 /*	0	*/	MCS_FEEDBACK_NO = 0,						/**< */
   1309 /*	1	*/	MCS_FEEDBACK_RESERVED,						/**< */
   1310 /*	2	*/	MCS_FEEDBACK_UNSOLICTED_ONLY,				/**< */
   1311 /*	3	*/	MCS_FEEDBACK_BOTH_SOLICTED_AND_UNSOLICTED	/**< */
   1312 } ETwdMCSFeedback;
   1313 
   1314 /** \enum ETwdTxMcsSet
   1315  * \brief TWD TX MCS Set
   1316  *
   1317  * \par Description
   1318  * Indicates Whether to set Tx MCS
   1319  *
   1320  * \sa
   1321  */
   1322 typedef enum
   1323 {
   1324     TX_MCS_SET_NO   =   0, 	/**< Don't Set Tx MCS	*/
   1325     TX_MCS_SET_YES  =   1	/**< Set Tx MCS			*/
   1326 } ETwdTxMcsSet;
   1327 
   1328 /** \enum ETwdTxRxNotEqual
   1329  * \brief TWD TX RX Not Equal
   1330  *
   1331  * \par Description
   1332  * Indicates Whether the TX and RX channels are equal
   1333  *
   1334  * \sa
   1335  */
   1336 typedef enum
   1337 {
   1338     TX_RX_NOT_EQUAL_NO   =   0,	/**< TX and RX Channels are not equal	*/
   1339     TX_RX_NOT_EQUAL_YES  =   1	/**< TX and RX Channels are equal		*/
   1340 } ETwdTxRxNotEqual;
   1341 
   1342 /** \enum ETwdHtcSupport
   1343  * \brief TWD HTc Support
   1344  *
   1345  * \par Description
   1346  * Indicates Whether the HT Capability is Supported
   1347  *
   1348  * \sa
   1349  */
   1350 typedef enum
   1351 {
   1352     HTC_SUPPORT_NO   =   0,	/**< HT Capability is not Supported		*/
   1353     HTC_SUPPORT_YES  =   1	/**< HT Capability is Supported			*/
   1354 } ETwdHtcSupport;
   1355 
   1356 /** \enum ESendCompleteStatus
   1357  * \brief Send complete status
   1358  *
   1359  * \par Description
   1360  * Indicates the current Success/Failure Status of Completion of Send Operation
   1361  *
   1362  * \sa
   1363  */
   1364 typedef enum
   1365 {
   1366 /*	0	*/	SEND_COMPLETE_SUCCESS = 0,			/**< Send Complete Success: Completion of Send Operation is OK
   1367 												*/
   1368 /*	1	*/	SEND_COMPLETE_RETRY_EXCEEDED,		/**< Send Complete Retry Exceeded:
   1369 												* Completion of Send Operation filed because it Exceeded Allowed retries Number
   1370 												*/
   1371 /*	2	*/	SEND_COMPLETE_LIFETIME_EXCEEDED,	/**< Send Complete Lifetiem Exceeded:
   1372 												* Completion of Send Operation failed because it Exceeded Allowed Lifetime
   1373 												*/
   1374 /*	3	*/	SEND_COMPLETE_NO_LINK,				/**< Send Complete No Link:
   1375 												* Completion of Send Operation failed because No Link was found
   1376 												*/
   1377 /*	4	*/	SEND_COMPLETE_MAC_CRASHED			/**< Send Complete MAC Crashed:
   1378 												* Completion of Send Operation failed because MAC Crashed
   1379 												*/
   1380 } ESendCompleteStatus;
   1381 
   1382 /** \enum EPacketType
   1383  * \brief Packet type
   1384  *
   1385  * \par Description
   1386  *
   1387  * \sa
   1388  */
   1389 typedef enum
   1390 {
   1391 /*	0	*/	PACKET_DATA = 0, 	/**< */
   1392 /*	1	*/	PACKET_CTRL, 		/**< */
   1393 /*	2	*/	PACKET_MGMT 		/**< */
   1394 
   1395 } EPacketType;
   1396 
   1397 /** \enum ETxHwQueStatus
   1398  * \brief Status returned by txHwQueue_AllocResources
   1399  *
   1400  * \par Description
   1401  *
   1402  * \sa
   1403  */
   1404 typedef enum
   1405 {
   1406     TX_HW_QUE_STATUS_SUCCESS,       /* Resources available on current queue */
   1407     TX_HW_QUE_STATUS_STOP_CURRENT,  /* No resources, stop current queue and requeue the packet */
   1408     TX_HW_QUE_STATUS_STOP_NEXT      /* Resources available for this packet but not for another one,
   1409                                           so just stop the current queue */
   1410 } ETxHwQueStatus;
   1411 
   1412 /** \enum ERxBufferStatus
   1413  * \brief Status returned by TRequestForBufferCb
   1414  *
   1415  * \par Description
   1416  *
   1417  * \sa
   1418  */
   1419 typedef enum
   1420 {
   1421     RX_BUF_ALLOC_PENDING,
   1422     RX_BUF_ALLOC_COMPLETE,
   1423     RX_BUF_ALLOC_OUT_OF_MEM
   1424 
   1425 }ERxBufferStatus;
   1426 
   1427 
   1428 /*
   1429  * --------------------------------------------------------------
   1430  *	Structures
   1431  * --------------------------------------------------------------
   1432  */
   1433 /**
   1434  * \brief Get File Callback
   1435  *
   1436  * \param  hCbHndl	- Handle to CB Object
   1437  * \return void
   1438  *
   1439  * \par Description
   1440  * The callback function type for GetFile users
   1441  *
   1442  * \sa 	TFileInfo
   1443  */
   1444 typedef void (*TGetFileCbFunc)(TI_HANDLE hCbHndl);
   1445 
   1446 /** \struct TFileInfo
   1447  * \brief File Information
   1448  *
   1449  * \par Description
   1450  * Contains all needed information and structures for Getting file
   1451  *
   1452  * \sa	TWD_InitFw
   1453  */
   1454 typedef struct
   1455 {
   1456     EFileType   	eFileType;  		/**< Requested file type */
   1457     TI_UINT8   		*pBuffer;    		/**< Pointer to Buffer into the file (or file portion) is copied from user space */
   1458     TI_UINT32   	uLength;    		/**< Length of data currently held in pBuffer */
   1459     TI_UINT32   	uOffset;    		/**< Offset in File of data currently held in pBuffer */
   1460     TI_UINT32   	uAddress;    		/**< Offset in File of data currently held in pBuffer */
   1461     TI_BOOL     	bLast;      		/**< TRUE indicates that we reached end of file */
   1462     void       		*hOsFileDesc;		/**< OAL file-descriptor handle for repeated access to same file (FW) */
   1463     TGetFileCbFunc  fCbFunc;			/**< CB function to call if file read is finished in a later context (future option) */
   1464     TI_HANDLE       hCbHndl;			/**< Handle to provide when calling fCbFunc */
   1465     TI_UINT32		uChunksLeft;		/**< Chunks Left to read from File (used if file is read in chunks) */
   1466     TI_UINT32		uChunkBytesLeft;	/**< Number of bytes of Last read chunk, which were not yet handled  */
   1467     TI_UINT32		uCrcCalc;			/**< Current Calculated CRC  */
   1468 } TFileInfo;
   1469 
   1470 /** \struct T80211Header
   1471  * \brief 802.11 MAC header
   1472  *
   1473  * \par Description
   1474  *
   1475  * \sa
   1476  */
   1477 typedef struct
   1478 {
   1479     TI_UINT16                           fc;			/**< */
   1480     TI_UINT16                           dur;		/**< */
   1481     TMacAddr                            address1;	/**< */
   1482     TMacAddr                            address2;	/**< */
   1483     TMacAddr                            address3;	/**< */
   1484     TI_UINT16                           seq;		/**< */
   1485     TI_UINT16                           qos;		/**< */
   1486 
   1487 }  T80211Header;
   1488 
   1489 /** \struct TKeepAliveParams
   1490  * \brief Keep Alive Parameters
   1491  *
   1492  * \par Description
   1493  *
   1494  * \sa	TWD_CfgKeepAlive
   1495  */
   1496 typedef struct
   1497 {
   1498     TI_UINT8                index;		/**< */
   1499     TI_UINT8                enaDisFlag;	/**< */
   1500     TI_UINT32               interval;	/**< */
   1501     EKeepAliveTriggerType   trigType;	/**< */
   1502 
   1503 } TKeepAliveParams;
   1504 
   1505 /** \struct TPsRxStreaming
   1506  * \brief Power Save RX Streaming
   1507  *
   1508  * \par Description
   1509  * The configuration of Rx streaming delivery in PS mode per TID
   1510  *
   1511  * \sa	TWD_CfgKeepAlive
   1512  */
   1513 typedef struct
   1514 {
   1515     TI_UINT32               uTid;           /**< The configured TID (0-7) */
   1516     TI_UINT32               uStreamPeriod;  /**< The expected period between two packets of the delivered stream */
   1517     TI_UINT32               uTxTimeout;     /**< Start sending triggers if no Tx traffic triggers arrive for this priod */
   1518     TI_BOOL                 bEnabled;       /**< If TRUE enable this TID streaming, if FALSE disable it. */
   1519 
   1520 } TPsRxStreaming;
   1521 
   1522 /** \struct TDmaParams
   1523  * \brief DMA Parameters
   1524  *
   1525  * \par Description
   1526  * Struct which holds DMA Rx/Tx Queues and Bufffers params
   1527  *
   1528  * \sa
   1529  */
   1530 typedef struct
   1531 {
   1532     TI_UINT32                           NumRxBlocks;				/**< Allocated RX memory blocks number 	    */
   1533     TI_UINT32                           NumTxBlocks;				/**< Allocated TX memory blocks number      */
   1534     TI_UINT8                            NumStations;				/**< Number of Stations						*/
   1535     void                                *fwTxResultInterface;		/**< RX minimum Memory block number 		*/
   1536     TI_UINT8                            *fwRxCBufPtr;				/**< Pointer to FW RX Control Buffer		*/
   1537     TI_UINT8                            *fwTxCBufPtr;				/**< Pointer to FW TX Control Buffer		*/
   1538 	void                                *fwRxControlPtr;			/**< Pointer to FW TX Control 				*/
   1539 	void                                *fwTxControlPtr;			/**< Pointer to FW RX Control 				*/
   1540     TI_UINT32                           PacketMemoryPoolStart;      /**< RX Memory block offset 				*/
   1541 } TDmaParams;
   1542 
   1543 /** \struct TSecurityKeys
   1544  * \brief Security Key
   1545  *
   1546  * \par Description
   1547  * Struct which holds Security Key Parameters
   1548  * Used for handling DMA
   1549  *
   1550  * \sa
   1551  */
   1552 typedef struct
   1553 {
   1554     EKeyType                            keyType; 				/**< Security Key Type (WEP, TKIP etc.)			*/
   1555     TI_UINT32                           encLen;					/**< Security Key length in bytes				*/
   1556     TI_UINT8                            encKey[MAX_KEY_LEN];	/**< Security Key Encoding						*/
   1557     TI_UINT8                            micRxKey[MAX_KEY_LEN];	/**< MIC RX Security Key 						*/
   1558     TI_UINT8                            micTxKey[MAX_KEY_LEN];	/**< MIC TX Security Key						*/
   1559     TI_UINT32                           keyIndex;     			/**< Security Key Index (id=0 is broadcast key)	*/
   1560     TMacAddr                            macAddress;				/**< Security Key MAC Address					*/
   1561     TI_UINT8                            keyRsc[KEY_RSC_LEN];	/**< Security Key RSC							*/
   1562 
   1563 } TSecurityKeys;
   1564 
   1565 /** \struct TxPktParams_t
   1566  * \brief TX Packet Parameters
   1567  *
   1568  * \par Description
   1569  * Tx Control-Block Packet parameters that are not included in the Tx-descriptor
   1570  *
   1571  * \sa
   1572  */
   1573 typedef struct
   1574 {
   1575     void *         pInputPkt;       /**< The input packet to the Tx path, either OS packet or raw buffer (see RAW_BUF_PKT flag) */
   1576     TI_UINT32      uInputPktLen;    /**< The input packet length in bytes (for freeing it in case of raw buffer)  */
   1577     TI_UINT32      uDriverDelay;    /**< The time in uSec the pkt was delayed in the driver until Xfer 			  */
   1578     TI_UINT8       uPktType;        /**< See TX_PKT_TYPE_xxxx above                                               */
   1579     TI_UINT8       uHeadroomSize;   /**< Only for WHA - headroom in bytes before the payload in the packet buffer */
   1580     TI_UINT16      uFlags;          /**< See TX_CTRL_FLAG__xxxx above 										      */
   1581 
   1582 } TTxPktParams;
   1583 
   1584 
   1585 /** \struct TTxCtrlBlk
   1586  * \brief TX Control Block Entry
   1587  *
   1588  * \par Description
   1589  * Contains the Tx packet parameters required for the Tx process, including
   1590  * the Tx descriptor and the attributes required for HW-queue calculations.
   1591  * TX Control Block Entry is allocated for each packet sent from the upper
   1592  * driver and freed upon Tx-complete.
   1593  * The entry index is the descriptor-ID. It is written in the descriptor and
   1594  * copied back into the tx-complete results
   1595  *
   1596  * \sa	SendPacketTranferCB_t, SendPacketDebugCB_t, TWD_txCtrlBlk_alloc, TWD_txCtrlBlk_free, TWD_txCtrlBlk_GetPointer, TWD_txXfer_sendPacket
   1597  */
   1598 typedef struct _TTxCtrlBlk
   1599 {
   1600     TTxnStruct          tTxnStruct;               /**< The transaction structure for packet queueing and transaction via the bus driver */
   1601     TxIfDescriptor_t    tTxDescriptor;            /**< The packet descriptor copied to the FW  */
   1602     TI_UINT8            aPktHdr[MAX_HEADER_SIZE]; /**< The packet header + extensions (see description of MAX_HEADER_SIZE above) */
   1603     TTxPktParams        tTxPktParams;             /**< Per packet parameters not included in the descriptor */
   1604     struct _TTxCtrlBlk  *pNextFreeEntry;          /**< Pointer to the next free entry */
   1605 
   1606 } TTxCtrlBlk;
   1607 
   1608 
   1609 /** \struct TTemplateParams
   1610  * \brief Template Parameters
   1611  *
   1612  * \par Description
   1613  *
   1614  * \sa	TWD_GetTemplate
   1615  */
   1616 typedef struct
   1617 {
   1618     TI_UINT32            Size;		   				/**< Template size					*/
   1619     TI_UINT32            uRateMask;                 /**< The rates bitmap for the frame */
   1620     TI_UINT8             Buffer[MAX_TEMPLATE_SIZE];	/**< Buffer which holds Template	*/
   1621 
   1622 } TTemplateParams;
   1623 
   1624 /** \struct TFwInfo
   1625  * \brief FW Information
   1626  *
   1627  * \par Description
   1628  *
   1629  * \sa	TWD_GetFWInfo
   1630  */
   1631 typedef struct
   1632 {
   1633     TI_UINT8                            fwVer[FW_VERSION_LEN];  /**< Firmware version - null terminated string 	*/
   1634     TMacAddr                            macAddress;				/**< MAC Address								*/
   1635     TI_UINT8                            txPowerTable[NUMBER_OF_SUB_BANDS_E][NUM_OF_POWER_LEVEL]; /**< Maximun Dbm in Dbm/10 units */
   1636     TI_UINT32                           uHardWareVersion;		/**< HW Version									*/
   1637 
   1638 } TFwInfo;
   1639 
   1640 /** \struct TJoinBss
   1641  * \brief Join BSS Parameters
   1642  *
   1643  * \par Description
   1644  *
   1645  * \sa	TWD_CmdJoinBss
   1646  */
   1647 typedef struct
   1648 {
   1649     ScanBssType_e                       bssType;			/**< */
   1650     TI_UINT16                           beaconInterval;		/**< */
   1651     TI_UINT16                           dtimInterval;		/**< */
   1652     TI_UINT8                            channel;			/**< */
   1653     TI_UINT8*                           pBSSID;				/**< */
   1654     TI_UINT8*                           pSSID;				/**< */
   1655     TI_UINT8                            ssidLength;			/**< */
   1656     TI_UINT32                           basicRateSet;      	/**< */
   1657     ERadioBand                          radioBand;			/**< */
   1658     /* Current Tx-Session index as configured to FW in last Join command */
   1659     TI_UINT16                           txSessionCount;    	/**< */
   1660 
   1661 } TJoinBss;
   1662 
   1663 /** \struct TSetTemplate
   1664  * \brief Set Template Parameters
   1665  *
   1666  * \par Description
   1667  *
   1668  * \sa	TWD_CmdTemplate, TWD_WriteMibTemplateFrame
   1669  */
   1670 typedef struct
   1671 {
   1672     ETemplateType                       type;	/**< Template Type							*/
   1673     TI_UINT8                            index;  /**< only valid for keep-alive templates	*/
   1674     TI_UINT8*                           ptr;	/**< Pointer to Template Data		  		*/
   1675     TI_UINT32                           len;	/**< Pointer to Template Length		  		*/
   1676     ERadioBand                          eBand; 	/**< only valid for probe request templates	*/
   1677     TI_UINT32                           uRateMask;/**< The rate mask to use for this frame  */
   1678 
   1679 } TSetTemplate;
   1680 
   1681 /** \struct TNoiseHistogram
   1682  * \brief Noise Histogram Parameters
   1683  *
   1684  * \par Description
   1685  *
   1686  * \sa	TWD_CmdNoiseHistogram
   1687  */
   1688 typedef struct
   1689 {
   1690     ENoiseHistogramCmd                  cmd;												/**< Noise Histogram Command (Start/Atop)	*/
   1691     TI_UINT16                           sampleInterval;										/**< Sample Interval (in microsec)			*/
   1692     TI_UINT8                            ranges [MEASUREMENT_NOISE_HISTOGRAM_NUM_OF_RANGES];	/**< Noise Histogram Ranges					*/
   1693 
   1694 } TNoiseHistogram;
   1695 
   1696 /** \struct TInterogateCmdHdr
   1697  * \brief Interrogate Command Header
   1698  *
   1699  * \par Description
   1700  *
   1701  * \sa	TNoiseHistogramResults, TMediumOccupancy, TTsfDtim
   1702  */
   1703 typedef struct
   1704 {
   1705     TI_UINT16                           id;		/**< */
   1706     TI_UINT16                           len;	/**< */
   1707 
   1708 } TInterogateCmdHdr;
   1709 
   1710 /** \struct TNoiseHistogramResults
   1711  * \brief Noise Histogram Results
   1712  *
   1713  * \par Description
   1714  * Used for Getting Noise Histogram Parameters from FW
   1715  *
   1716  * \sa
   1717  */
   1718 typedef struct
   1719 {
   1720     TInterogateCmdHdr                   noiseHistResCmdHdr;							/**< Results Header						*/
   1721     TI_UINT32                           counters[NUM_OF_NOISE_HISTOGRAM_COUNTERS];	/**< Counters							*/
   1722     TI_UINT32                           numOfLostCycles;							/**< Number of Lost Cycles				*/
   1723     TI_UINT32                           numOfTxHwGenLostCycles;						/**< Number of Tx Hw Gen Lost Cycles	*/
   1724     TI_UINT32                           numOfRxLostCycles;							/**< Number of RX Hw Gen Lost Cycles	*/
   1725 
   1726 } TNoiseHistogramResults;
   1727 
   1728 /** \struct TMediumOccupancy
   1729  * \brief Medium Occupancy Parameters
   1730  *
   1731  * \par Description
   1732  * Used for Getting Medium Occupancy (Channal Load) from FW
   1733  * or print Medium Occupancy (Channal Load) Debug Information
   1734  *
   1735  * \sa
   1736  */
   1737 typedef struct
   1738 {
   1739     TInterogateCmdHdr                   mediumOccupCmdHdr;	/**< Command Header						*/
   1740     TI_UINT32                           MediumUsage;		/**< Medium Occupancy Usage Time		*/
   1741     TI_UINT32                           Period;				/**< Medium Occupancy Period Time		*/
   1742 
   1743 } TMediumOccupancy;
   1744 
   1745 /** \struct TTsfDtim
   1746  * \brief Beacon TSF and DTIM count
   1747  *
   1748  * \par Description
   1749  * Used for Getting updated current TSF and last Beacon TSF and DTIM Count from FW
   1750  * for Scan Purposes
   1751  *
   1752  * \sa
   1753  */
   1754 typedef struct
   1755 {
   1756     TInterogateCmdHdr                   tsf_dtim_mibCmdHdr;	/**< Command Header						*/
   1757     TI_UINT32                           CurrentTSFHigh;		/**< Current TSF High (of INT64) Value	*/
   1758     TI_UINT32                           CurrentTSFLow;		/**< Current TSF Low (of INT64) Value	*/
   1759     TI_UINT32                           lastTBTTHigh;		/**< Last TBTT High (of INT64) Value	*/
   1760     TI_UINT32                           lastTBTTLow;		/**< Last TBTT Low (of INT64) Value		*/
   1761     TI_UINT8                            LastDTIMCount;		/**< Last DTIM Count			      	*/
   1762     TI_UINT8                            Reserved[3];		/**< Reserved							*/
   1763 
   1764 } TTsfDtim;
   1765 
   1766 /** \struct TBcnBrcOptions
   1767  * \brief Beacon broadcast options
   1768  *
   1769  * \par Description
   1770  * Used for Getting/Configuring updated Beacon broadcast options from/to FW
   1771  *
   1772  * \sa	TWD_SetDefaults
   1773  */
   1774 typedef struct
   1775 {
   1776     TI_UINT16                           BeaconRxTimeout;		/**< Beacon RX Timeout			*/
   1777     TI_UINT16                           BroadcastRxTimeout;		/**< Broadcast RX Timeout		*/
   1778     TI_UINT8                            RxBroadcastInPs;		/**< RX Broadcast In Power Save	*/
   1779 
   1780 } TBcnBrcOptions;
   1781 
   1782 /** \struct TBeaconFilterIeTable
   1783  * \brief Beacon Filter Information Elements Table
   1784  *
   1785  * \par Description
   1786  * Used for Getting/Configuring Beacon Filter IE Table From/To FW
   1787  *
   1788  * \sa	TWD_SetDefaults
   1789  */
   1790 typedef struct
   1791 {
   1792     TI_UINT8                            numberOfIEs;							/**< Number of IE Tables 			*/
   1793     TI_UINT8                            IETable[BEACON_FILTER_TABLE_MAX_SIZE];	/**< The IE table					*/
   1794     TI_UINT8                            IETableSize;							/**< number of elements in IE table	*/
   1795 
   1796 } TBeaconFilterIeTable;
   1797 
   1798 /** \struct TBeaconFilterInitParams
   1799  * \brief Beacon Filter Init Parameters
   1800  *
   1801  * \par Description
   1802  * Used for Init Beacon Filter IE Table in FW
   1803  *
   1804  * \sa
   1805  */
   1806 typedef struct
   1807 {
   1808     TI_UINT8                            desiredState;								/**< Desigred state (required/not required)			*/
   1809     TI_UINT8                            numOfStored;								/**< Number of desigred Beacon Filters stored in FW	*/
   1810     TI_UINT8                            numOfElements;								/**< Number of Beacon Filter Elements stored in FW	*/
   1811     TI_UINT8                            IETableSize;								/**< The IE Table size								*/
   1812     TI_UINT8                            reserve[3];									/**< Reserved										*/
   1813     TI_UINT8                            IETable[BEACON_FILTER_IE_TABLE_MAX_SIZE]; 	/**< The IE table							   		*/
   1814 
   1815 } TBeaconFilterInitParams;
   1816 
   1817 /** \struct TPowerMgmtConfig
   1818  * \brief Power Management Configuration Parameters
   1819  *
   1820  * \par Description
   1821  * Used for Configuring Wake-Up Conditions or Beacon Broadcast Options to FW
   1822  *
   1823  * \sa	TWD_CfgWakeUpCondition, TWD_CfgBcnBrcOptions
   1824  */
   1825 typedef struct
   1826 {
   1827 	/* power management options */
   1828     TI_UINT8                            beaconListenInterval;		/**< Beacon Listen Interavl:
   1829 																	* specify how often the TNET wakes up to listen to beacon frames.
   1830 																	* the value is expressed in units of "beacon interval"
   1831 																	*/
   1832     TI_UINT8                            beaconFiltering;			/**< Beacon Filtering Desigred state (required/not required)			*/
   1833     TI_UINT8                            DTIMListenInterval;			/**< DTIM Listen Interavl:
   1834 																	* specify how often the TNET wakes up to listen to DTIM frames. the value
   1835 																	* is expressed in units of "dtim interval"
   1836 																	*/
   1837     TI_UINT8                            NConsecutiveBeaconMiss;		/**< Consecutive Beacon Miss											*/
   1838     TI_UINT8                            hangoverPeriod;				/**< Hang Over Period													*/
   1839     TI_UINT8                            HwPsPollResponseTimeout;	/**< Power-Save Polling Response Time Out								*/
   1840     TI_UINT32                           BaseBandWakeUpTime;			/**< Base Band Wakeup Time												*/
   1841     TI_UINT32                           beaconReceiveTime;			/**< Beacon Receive Time												*/
   1842     TI_BOOL                             beaconMissInterruptEnable;	/**< Enable/Disable Beacon Miss Interrupt   							*/
   1843     TI_BOOL                             rxBroadcast;				/**< Enable/Disable receive of broadcast packets in Power-Save mode   	*/
   1844     TI_BOOL                             hwPsPoll;					/**< Enable/Disable Power-Save Polling								   	*/
   1845     /* Power Management Configuration IE */
   1846     TI_BOOL                             ps802_11Enable;				/**< Enable/Disable 802.11 Power-Save 									*/
   1847     TI_UINT8                            needToSendNullData;  		/**< Indicates if need to send NULL data								*/
   1848     TI_UINT8                            numNullPktRetries; 			/**< Number of NULL Packets allowed retries 							*/
   1849     TI_UINT8                            hangOverPeriod;				/**< HangOver period:
   1850 																	* Indicates what is the time in TUs during which the WiLink remains awake
   1851 																	* after sending an MPDU with the Power Save bit set (indicating that the
   1852 																	* station is to go into Power Save mode). Setting bit 0 does not affect
   1853 																	* the hangover period
   1854 																	*/
   1855     TI_UINT16                           NullPktRateModulation; 		/**< Null Packet Rate Modulation										*/
   1856     /* PMConfigStruct */
   1857     TI_BOOL                             ELPEnable;					/**< Enable/Disable ELP				 									*/
   1858     TI_UINT32                           BBWakeUpTime;				/**< Base Band Wakeup Time				 								*/
   1859     TI_UINT32                           PLLlockTime;				/**< PLL Lock Time						 								*/
   1860     /* AcxBcnBrcOptions */
   1861     TBcnBrcOptions                      BcnBrcOptions;				/**< Beacon broadcast options	 		 								*/
   1862     /* ACXWakeUpCondition */
   1863     ETnetWakeOn                         tnetWakeupOn;  				/**< ACX Wake Up Condition		 		 								*/
   1864     TI_UINT8                            listenInterval;				/**< ACX Listen Interval		 		 								*/
   1865 	/* No answer after Ps-Poll work-around */
   1866     TI_UINT8  							ConsecutivePsPollDeliveryFailureThreshold;	/**< Power-Save Polling Delivery Failure Threshold		*/
   1867 
   1868 } TPowerMgmtConfig;
   1869 
   1870 /** \struct TPowerSaveParams
   1871  * \brief Power Save Parameters
   1872  *
   1873  * \par Description
   1874  *
   1875  * \sa
   1876  */
   1877 typedef struct
   1878 {
   1879     /* powerMgmtConfig IE */
   1880     TI_BOOL                             ps802_11Enable;			/**< Enable/Disable 802.11 Power-Save 									*/
   1881     TI_UINT8                            needToSendNullData;  	/**< Indicates if need to send NULL data								*/
   1882     TI_UINT8                            numNullPktRetries; 		/**< Number of NULL Packets allowed retries 							*/
   1883     TI_UINT8                            hangOverPeriod;			/**< HangOver period:
   1884 																* Indicates what is the time in TUs during which the WiLink remains awake
   1885 																* after sending an MPDU with the Power Save bit set (indicating that the
   1886 																* station is to go into Power Save mode). Setting bit 0 does not affect
   1887 																* the hangover period
   1888 																*/
   1889     EHwRateBitFiled                     NullPktRateModulation;	/**< Null Packet Rate Modulation										*/
   1890 
   1891 } TPowerSaveParams;
   1892 
   1893 /** \struct TAcQosParams
   1894  * \brief AC QoS Parameters
   1895  *
   1896  * \par Description
   1897  * Used for Configuring AC Parameters (For Quality Of Service) to FW
   1898  *
   1899  * \sa	TWD_CfgAcParams
   1900  */
   1901 typedef struct
   1902 {
   1903     TI_UINT8                            ac;			/**< Access Category - The TX queue's access category	*/
   1904     TI_UINT8                            cwMin;		/**< The contention window minimum size (in slots) 		*/
   1905     TI_UINT16                           cwMax;		/**< The contention window maximum size (in slots)		*/
   1906     TI_UINT8                            aifsn;		/**< The AIF value (in slots)							*/
   1907     TI_UINT16                           txopLimit;	/**< The TX Op Limit (in microseconds)					*/
   1908 
   1909 } TAcQosParams;
   1910 
   1911 /** \struct TMeasurementParams
   1912  * \brief AC Queues Parameters
   1913  *
   1914  * \par Description
   1915  * Used When Send Start Measurment Command to FW
   1916  *
   1917  * \sa	TWD_CmdMeasurement
   1918  */
   1919 typedef struct
   1920 {
   1921     TI_UINT32                           ConfigOptions;	/**< RX Filter Configuration Options													*/
   1922     TI_UINT32                           FilterOptions;	/**< RX Filter Options																	*/
   1923     TI_UINT32                           duration;		/**< Specifies the measurement process duration in microseconds. The value of 0 means
   1924 														* infinite duration in which only a STOP_MEASUREMENT command can stop the measurement
   1925 														* process
   1926 														*/
   1927     Channel_e                           channel;		/**< Channel number on which the measurement is performed								*/
   1928     RadioBand_e                         band;			/**< Specifies the band to which the channel belongs									*/
   1929     EScanResultTag                      eTag;			/**< Scan Result Tag																	*/
   1930 
   1931 } TMeasurementParams;
   1932 
   1933 /** \struct TApDiscoveryParams
   1934  * \brief AP Discovery Parameters
   1935  *
   1936  * \par Description
   1937  * Used When Performing AP Discovery
   1938  *
   1939  * \sa	TWD_CmdApDiscovery
   1940  */
   1941 typedef struct
   1942 {
   1943     TI_UINT32                           ConfigOptions;	/**< RX Configuration Options for measurement														*/
   1944     TI_UINT32                           FilterOptions;	/**< RX Filter Configuration Options for measurement												*/
   1945     TI_UINT32                           scanDuration;	/**< This field specifies the amount of time, in time units (TUs), to perform the AP discovery		*/
   1946     TI_UINT16                           scanOptions;	/**< This field specifies whether the AP discovery is performed by an active scan or a passive scan
   1947 														* 0 - ACTIVE, 1 - PASSIVE
   1948 														*/
   1949     TI_UINT8                            numOfProbRqst;	/**< This field indicates the number of probe requests to send per channel, when active scan is specified
   1950 														* Note: for XCC measurement this value should be set to 1
   1951 														*/
   1952     TI_UINT8                            txPowerDbm;    	/**< TX power level to be used for sending probe requests when active scan is specified.
   1953 														* If 0, leave normal TX power level for this channel
   1954 														*/
   1955     EHwRateBitFiled                     txdRateSet;		/**< This EHwBitRate format field specifies the rate and modulation to transmit the probe request when
   1956 														* an active scan is specifie
   1957 														*/
   1958     ERadioBand                          eBand;			/**< Specifies the band to which the channel belongs												*/
   1959 } TApDiscoveryParams;
   1960 
   1961 /** \struct TRroamingTriggerParams
   1962  * \brief Roaming Trigger Parameters
   1963  *
   1964  * \par Description
   1965  *
   1966  * \sa	TWD_CfgMaxTxRetry, TWD_CfgConnMonitParams
   1967  */
   1968 typedef struct
   1969 {
   1970     /* ACXConsNackTriggerParameters */
   1971     TI_UINT8                            maxTxRetry;			/**< The number of frames transmission failures before issuing the "Max Tx Retry" event			*/
   1972 
   1973     /* ACXBssLossTsfSynchronize */
   1974     TI_UINT16                           TsfMissThreshold;	/**< The number of consecutive beacons that can be lost before the WiLink raises the
   1975 															* SYNCHRONIZATION_TIMEOUT event
   1976 															*/
   1977     TI_UINT16                           BssLossTimeout;		/**< The delay (in time units) between the time at which the device issues the SYNCHRONIZATION_TIMEOUT
   1978 															* event until, if no probe response or beacon is received a BSS_LOSS event is issued
   1979 															*/
   1980 } TRroamingTriggerParams;
   1981 
   1982 /** \struct TSwitchChannelParams
   1983  * \brief Switch Channel Parameters
   1984  *
   1985  * \par Description
   1986  * Used for Switch channel Command
   1987  *
   1988  * \sa	TWD_CmdSwitchChannel
   1989  */
   1990 typedef struct
   1991 {
   1992     TI_UINT8                            channelNumber;		/**< The new serving channel										*/
   1993     TI_UINT8                            switchTime;			/**< Relative time of the serving channel switch in TBTT units   	*/
   1994     TI_UINT8                            txFlag;				/**< 1: Suspend TX till switch time; 0: Do not suspend TX			*/
   1995     TI_UINT8                            flush;				/**< 1: Flush TX at switch time; 0: Do not flush  					*/
   1996 
   1997 } TSwitchChannelParams;
   1998 
   1999 /** \struct TRxCounters
   2000  * \brief RX Counters
   2001  *
   2002  * \par Description
   2003  * Used for Getting RX Counters from FW
   2004  *
   2005  * \sa
   2006  */
   2007 typedef struct
   2008 {
   2009     TI_UINT32                           RecvError; 			/**< Number of frames that a NIC receives but does not indicate to the protocols due to errors 	*/
   2010     TI_UINT32                           RecvNoBuffer;   	/**< Number of frames that the NIC cannot receive due to lack of NIC receive buffer space 		*/
   2011     TI_UINT32                           FragmentsRecv;    	/**< Number of Fragments Received 																*/
   2012     TI_UINT32                           FrameDuplicates;	/**< Number of Farme Duplicates																	*/
   2013     TI_UINT32                           FcsErrors;			/**< Number of frames that a NIC receives but does not indicate to the protocols due to errors	*/
   2014 
   2015 } TRxCounters;
   2016 
   2017 /** \struct TApPowerConstraint
   2018  * \brief AP Power Constraint
   2019  *
   2020  * \par Description
   2021  *
   2022  * \sa
   2023  */
   2024 typedef struct
   2025 {
   2026     INFO_ELE_HDR												/**< Information Element Header		*/
   2027     int8                      			powerConstraintOnBss;	/**< The attenuation from the regulatory power constraint as declared by the AP
   2028 																* Units: dBm	;	Range: -20 - 30
   2029 																*/
   2030 } TApPowerConstraint;
   2031 
   2032 /*
   2033  * TConfigCmdCbParams, TInterrogateCmdCbParams:
   2034  * Note that this structure is used by the GWSI
   2035  * both for setting (writing to the device) and
   2036  * for retreiving (Reading from the device),
   2037  * while being called with a completion CB
   2038  */
   2039 /** \struct TConfigCmdCbParams
   2040  * \brief Config Command CB Parameters
   2041  *
   2042  * \par Description
   2043  * The CB Parameters (Completino CB, Handle to CB Parameters and buffer of Input/Output Parameters)
   2044  * are used for Setting Parameters
   2045  *
   2046  * \sa	TWD_SetParam
   2047  */
   2048 typedef struct
   2049 {
   2050     void*                               fCb;	/**< Completion CB function													*/
   2051     TI_HANDLE                           hCb;	/**< CB handle																*/
   2052     void*                               pCb;	/**< CBuffer contains the content to be written or the retrieved content	*/
   2053 
   2054 } TConfigCmdCbParams;
   2055 
   2056 /** \struct TInterrogateCmdCbParams
   2057  * \brief Interrogate Command Parameters
   2058  *
   2059  * \par Description
   2060  * Interrogate Command Parameters are the same as configuration Command CB Parameters
   2061  *
   2062  * \sa	TWD_SetParam
   2063  */
   2064 typedef TConfigCmdCbParams TInterrogateCmdCbParams;
   2065 
   2066 /** \struct TRxTimeOut
   2067  * \brief RX Time Out
   2068  *
   2069  * \par Description
   2070  *
   2071  * \sa
   2072  */
   2073 typedef struct
   2074 {
   2075     TI_UINT16                           psPoll;		/**< The maximum time that the device will wait to receive traffic from the AP after transmission of PS-poll	*/
   2076     TI_UINT16                           UPSD;		/**< The maximum time that the device will wait to receive traffic from the AP after transmission from UPSD
   2077 													* enabled queue
   2078 													*/
   2079 } TRxTimeOut;
   2080 
   2081 /** \struct TQueueTrafficParams
   2082  * \brief RX Time Out
   2083  *
   2084  * \par Description
   2085  *
   2086  * \sa
   2087  */
   2088 typedef struct
   2089 {
   2090     TI_UINT8                            queueID;					/**< The TX queue ID number (0-7)											*/
   2091     TI_UINT8                            channelType;				/**< Channel access type for the queue Refer to ChannelType_enum			*/
   2092     TI_UINT8                            tsid;						/**< for EDCA - the AC Index (0-3, refer to AccessCategory_enum).
   2093 																	* For HCCA - HCCA Traffic Stream ID (TSID) of the queue (8-15)
   2094 																	*/
   2095     TI_UINT32                           dot11EDCATableMSDULifeTime;	/**< 802.11 EDCA Table MSDU Life Time 										*/
   2096     TI_UINT8                            psScheme;					/**< The power save scheme of the specified queue. Refer to PSScheme_enum	*/
   2097     TI_UINT8                            ackPolicy;					/**< ACK policy per AC 														*/
   2098     TI_UINT32                           APSDConf[2];				/**< APSD Configuration 													*/
   2099 
   2100 } TQueueTrafficParams;
   2101 
   2102 
   2103 
   2104 /** \struct TFmCoexParams
   2105  * \brief FM Coexistence Parameters
   2106  *
   2107  * \par Description
   2108  * Used for Setting/Printing FM Coexistence Parameters
   2109  *
   2110  * \sa
   2111  */
   2112 typedef struct
   2113 {
   2114     TI_UINT8   uEnable;                 /* enable(1) / disable(0) the FM Coex feature */
   2115 
   2116     TI_UINT8   uSwallowPeriod;          /* Swallow period used in COEX PLL swallowing mechanism,
   2117                                            Range: 0-0xFF,  0xFF = use FW default
   2118                                         */
   2119 
   2120     TI_UINT8   uNDividerFrefSet1;       /* The N divider used in COEX PLL swallowing mechanism for Fref of 38.4/19.2 Mhz.
   2121                                            Range: 0-0xFF,  0xFF = use FW default
   2122                                         */
   2123 
   2124     TI_UINT8   uNDividerFrefSet2;       /* The N divider used in COEX PLL swallowing mechanism for Fref of 26/52 Mhz.
   2125                                            Range: 0-0xFF,  0xFF = use FW default
   2126                                         */
   2127 
   2128     TI_UINT16  uMDividerFrefSet1;       /* The M divider used in COEX PLL swallowing mechanism for Fref of 38.4/19.2 Mhz.
   2129                                            Range: 0-0x1FF,  0xFFFF = use FW default
   2130                                         */
   2131 
   2132     TI_UINT16  uMDividerFrefSet2;       /* The M divider used in COEX PLL swallowing mechanism for Fref of 26/52 Mhz.
   2133                                            Range: 0-0x1FF,  0xFFFF = use FW default
   2134                                         */
   2135 
   2136     TI_UINT32  uCoexPllStabilizationTime;/* The time duration in uSec required for COEX PLL to stabilize.
   2137                                            0xFFFFFFFF = use FW default
   2138                                         */
   2139 
   2140     TI_UINT16  uLdoStabilizationTime;   /* The time duration in uSec required for LDO to stabilize.
   2141                                            0xFFFFFFFF = use FW default
   2142                                         */
   2143 
   2144     TI_UINT8   uFmDisturbedBandMargin;  /* The disturbed frequency band margin around the disturbed
   2145                                              frequency center (single sided).
   2146                                            For example, if 2 is configured, the following channels
   2147                                              will be considered disturbed channel:
   2148                                              80 +- 0.1 MHz, 91 +- 0.1 MHz, 98 +- 0.1 MHz, 102 +- 0.1 MHz
   2149                                            0xFF = use FW default
   2150                                         */
   2151 
   2152 	TI_UINT8   uSwallowClkDif;          /* The swallow clock difference of the swallowing mechanism.
   2153                                            0xFF = use FW default
   2154                                         */
   2155 
   2156 } TFmCoexParams;
   2157 
   2158 
   2159 /** \struct TMibBeaconFilterIeTable
   2160  * \brief MIB Beacon Filter IE table
   2161  *
   2162  * \par Description
   2163  * Used for Read/Write the MIB/IE Beacon Filter
   2164  * NOTE: This struct is only meant to be used as a pointer reference to an actual buffer.
   2165  * Table size is not a constant and is derived from the buffer size given with the
   2166  * user command
   2167  *
   2168  * \sa	TWD_WriteMibBeaconFilterIETable
   2169  */
   2170 typedef struct
   2171 {
   2172     /* Number of information elements in table  */
   2173     TI_UINT8                            iNumberOfIEs;   					/**< Input Number of IE Tables	*/
   2174     TI_UINT8                            iIETable[MIB_MAX_SIZE_OF_IE_TABLE]; /**< Input IE Table				*/
   2175 
   2176 } TMibBeaconFilterIeTable;
   2177 
   2178 /** \struct TMibCounterTable
   2179  * \brief MIB Counter Table
   2180  *
   2181  * \par Description
   2182  * Used for Getting Counters of MIB Table
   2183  *
   2184  * \sa
   2185  */
   2186 typedef struct
   2187 {
   2188     TI_UINT32                           PLCPErrorCount;	  	/**< The number of PLCP errors since the last time this information element was interrogated.
   2189 															* This field is automatically cleared when it is interrogated
   2190 															*/
   2191     TI_UINT32                           FCSErrorCount;		/**< The number of FCS errors since the last time this information element was interrogated.
   2192 															* This field is automatically cleared when it is interrogated
   2193 															*/
   2194     TI_UINT32                           SeqNumMissCount;	/**< The number of missed sequence numbers in the squentially values of frames seq numbers	*/
   2195 } TMibCounterTable;
   2196 
   2197 /** \struct TMibWlanWakeUpInterval
   2198  * \brief MIB WLAN Wake-Up Interval
   2199  *
   2200  * \par Description
   2201  *
   2202  * \sa
   2203  */
   2204 typedef struct
   2205 {
   2206     TI_UINT32                           WakeUpInterval;		/**< Wake Up Interval 								*/
   2207     TI_UINT8                            ListenInterval; 	/**< Listen interval in unit of the beacon/DTIM 	*/
   2208 
   2209 } TMibWlanWakeUpInterval;
   2210 
   2211 /** \struct TMibTemplateFrame
   2212  * \brief MIB Template Frame
   2213  *
   2214  * \par Description
   2215  * Used for Writing MIB Frame Template to FW
   2216  *
   2217  * \sa	TWD_WriteMibTemplateFrame
   2218  */
   2219 typedef struct
   2220 {
   2221     EMibTemplateType                 	FrameType;							/**< MIB Farme Template type	*/
   2222     TI_UINT32                           Rate;								/**< Frame Rate					*/
   2223     TI_UINT16                           Length;								/**< Frame Length				*/
   2224     TI_UINT8                            Data [MIB_TEMPLATE_DATA_MAX_LEN];	/**< Frame Template Data		*/
   2225 
   2226 } TMibTemplateFrame;
   2227 
   2228 /** \struct TMibArpIpAddressesTable
   2229  * \brief MIB ARP Address Table
   2230  *
   2231  * \par Description
   2232  * Used for Writing MIB ARP Table Template to FW
   2233  *
   2234  * \sa	TWD_WriteMib
   2235  */
   2236 typedef struct
   2237 {
   2238     TI_UINT32                           FilteringEnable;	/**< Enable/Disable Filtering	*/
   2239     TIpAddr                             addr;				/**< IP Address Table			*/
   2240 
   2241 } TMibArpIpAddressesTable;
   2242 
   2243 /** \struct TMibGroupAdressTable
   2244  * \brief MIB Group Address Table
   2245  *
   2246  * \par Description
   2247  * Used for Writing MIB Group Table Template to FW
   2248  *
   2249  * \sa	TWD_WriteMib
   2250  */
   2251 typedef struct
   2252 {
   2253     TMacAddr                            aGroupTable[MIB_MAX_MULTICAST_GROUP_ADDRS]; 	/**< Table of Multicast Group Addresses */
   2254     TI_UINT8                            bFilteringEnable;								/**< Enable/Disable Filtering			*/
   2255     TI_UINT8                            nNumberOfAddresses;								/**< Number of Multicast Addresses		*/
   2256 
   2257 } TMibGroupAdressTable;
   2258 
   2259 /** \struct TTxRateClass
   2260  * \brief TX Rate Class
   2261  *
   2262  * \par Description
   2263  * Used for Set/Get TX Rate Policy Class to/from FW
   2264  *
   2265  * \sa
   2266  */
   2267 typedef struct
   2268 {
   2269     TI_UINT32                           txEnabledRates;			/**< A Bit Mask which indicates which Rates are enabled */
   2270     TI_UINT8                            shortRetryLimit;		/**< */
   2271     TI_UINT8                            longRetryLimit;			/**< */
   2272     TI_UINT8                            flags;					/**< */
   2273     TI_UINT8                            reserved;				/**< for alignment with the FW API */
   2274 
   2275 } TTxRateClass;
   2276 
   2277 /** \struct TTxRatePolicy
   2278  * \brief TX Rate Policy
   2279  *
   2280  * \par Description
   2281  * Used for Set/Get TX Rate Policy to/from FW
   2282  *
   2283  * \sa
   2284  */
   2285 typedef struct
   2286 {
   2287     TI_UINT32                           numOfRateClasses;								/**< */
   2288     TTxRateClass                        rateClass[MAX_NUM_OF_TX_RATE_CLASS_POLICIES];	/**< */
   2289 
   2290 } TTxRatePolicy;
   2291 
   2292 /** \struct TCoexActivity
   2293  * \brief CoexActivity Parameters
   2294  *
   2295  * \par Description
   2296  *
   2297  * \sa
   2298  */
   2299 typedef struct {
   2300     uint8  coexIp;           /* 0-BT, 1-WLAN (according to CoexIp_e in FW) */
   2301     uint8  activityId;       /* According to BT/WLAN activity numbering in FW */
   2302     uint8  defaultPriority;  /* 0-255, activity default priority */
   2303     uint8  raisedPriority;   /* 0-255, activity raised priority */
   2304     uint16 minService;       /* 0-65535, The minimum service requested either in
   2305                                 requests or in milliseconds depending on activity ID */
   2306     uint16 maxService;       /* 0-65535, The maximum service allowed either in
   2307                             requests or in milliseconds depending on activity ID */
   2308 } TCoexActivity;
   2309 
   2310 /** \struct THalCoexActivityTable
   2311  * \brief CoexActivity Table Initialization Parameters
   2312  *
   2313  * \par Description
   2314  *
   2315  * \sa
   2316  */
   2317 typedef struct
   2318 {
   2319     uint32 numOfElements;
   2320     TCoexActivity entry[COEX_ACTIVITY_TABLE_MAX_NUM];
   2321 
   2322 } THalCoexActivityTable;
   2323 
   2324 /** \union TMibData
   2325  * \brief MIB Data
   2326  *
   2327  * \par Description
   2328  * Union which defines all MIB Data types
   2329  * Used for write MIB Configuration to FW
   2330  *
   2331  * \sa	TWD_WriteMib
   2332  */
   2333 typedef union
   2334 {
   2335     TMacAddr                            StationId;				/**< Station ID MAC Address								*/
   2336     TI_UINT32                           MaxReceiveLifeTime;		/**< HAl Control Max Rx MSDU Life Time, in TUs Units	*/
   2337     TI_UINT32                           SlotTime;				/**< Radio (PHY) Slot Time Type							*/
   2338     TMibGroupAdressTable             	GroupAddressTable;		/**< MIB Group Address Table							*/
   2339     TI_UINT8                            WepDefaultKeyId;		/**< WEP Defualt Security Key ID						*/
   2340     TI_UINT8                            PowerLevel;				/**< */
   2341     TI_UINT16                           RTSThreshold;			/**< */
   2342     TI_UINT32                           CTSToSelfEnable;		/**< Enable/Disable CTS to Self							*/
   2343     TMibArpIpAddressesTable          	ArpIpAddressesTable;	/**< MIB ARP Address Table								*/
   2344     TMibTemplateFrame                	TemplateFrame;			/**< MIB Template Frame		 							*/
   2345     TI_UINT8                            RxFilter;				/**< */
   2346     TMibWlanWakeUpInterval           	WlanWakeUpInterval;		/**< MIB WLAN Wake-Up Interval							*/
   2347     TMibCounterTable                 	CounterTable;			/**< MIB Counter Table									*/
   2348     TMibBeaconFilterIeTable          	BeaconFilter;			/**< MIB Beacon Filter IE table				   			*/
   2349     TTxRatePolicy                       txRatePolicy;			/**< TX Rate Policy			   		 					*/
   2350 
   2351 } TMibData;
   2352 
   2353 /** \struct TMib
   2354  * \brief MIB Structure
   2355  *
   2356  * \par Description
   2357  * Used for writing MIB Configuration to FW
   2358  *
   2359  * \sa	TWD_WriteMib, TWD_WriteMibTemplateFrame, TWD_WriteMibBeaconFilterIETable, TWD_WriteMibTxRatePolicy
   2360  */
   2361 typedef struct
   2362 {
   2363     EMib			aMib;  		/**< MIB Element Type	*/
   2364     TI_UINT16       Length;		/**< MIB Data Length	*/
   2365     TMibData     	aData; 		/**< MIB Data			*/
   2366 
   2367 } TMib;
   2368 
   2369 /** \union TTwdParamContents
   2370  * \brief TWD Parameters Content
   2371  *
   2372  * \par Description
   2373  * All FW Parameters contents
   2374  *
   2375  * \sa	TWD_SetParam
   2376  */
   2377 typedef union
   2378 {
   2379     TI_UINT16                           halCtrlRtsThreshold;			/**< */
   2380     TI_UINT8                            halCtrlCtsToSelf;				/**< */
   2381     TRxTimeOut                          halCtrlRxTimeOut;				/**< */
   2382     TI_UINT16                           halCtrlFragThreshold;			/**< */
   2383     TI_UINT16                           halCtrlListenInterval;			/**< */
   2384     TI_UINT16                           halCtrlCurrentBeaconInterval;	/**< */
   2385     TI_UINT8                            halCtrlTxPowerDbm;				/**< */
   2386     ETxAntenna                          halCtrlTxAntenna;				/**< */
   2387     ERxAntenna                          halCtrlRxAntenna;				/**< */
   2388     TI_UINT8                            halCtrlAifs;					/**< */
   2389     TI_BOOL                             halCtrlTxMemPoolQosAlgo;		/**< */
   2390     TI_BOOL                             halCtrlClkRunEnable;			/**< */
   2391     TRxCounters                         halCtrlCounters;				/**< */
   2392 
   2393     TMib*          		                pMib;							/**< */
   2394     TI_UINT8                            halCtrlCurrentChannel;			/**< */
   2395 
   2396     /* AC Qos parameters */
   2397     TQueueTrafficParams                 *pQueueTrafficParams;			/**< */
   2398 
   2399     /* Security related parameters */
   2400 #ifdef XCC_MODULE_INCLUDED
   2401     TI_BOOL                             rsnXCCSwEncFlag;				/**< */
   2402     TI_BOOL                             rsnXCCMicFieldFlag;				/**< */
   2403 #endif
   2404     ECipherSuite                        rsnEncryptionStatus;			/**< */
   2405     TI_UINT8                            rsnHwEncDecrEnable; 			/**< 0- disable, 1- enable */
   2406     TSecurityKeys                       *pRsnKey;						/**< */
   2407     TI_UINT8                            rsnDefaultKeyID;				/**< */
   2408 
   2409     /* Measurements section */
   2410     TMediumOccupancy                    mediumOccupancy;				/**< */
   2411     TI_BOOL                             halTxOpContinuation;			/**< */
   2412 
   2413     TTsfDtim                            fwTsfDtimInfo;					/**< */
   2414 
   2415     TInterrogateCmdCbParams             interogateCmdCBParams;			/**< */
   2416     TConfigCmdCbParams                  configureCmdCBParams;			/**< */
   2417 
   2418     TTxRatePolicy                       *pTxRatePlicy;					/**< */
   2419 
   2420     /* WARNING!!! This section is used to set/get internal params only. */
   2421     TI_UINT16                           halCtrlAid;						/**< */
   2422 
   2423     ESoftGeminiEnableModes              SoftGeminiEnable;				/**< */
   2424     TSoftGeminiParams                   SoftGeminiParam;				/**< */
   2425 
   2426     TFmCoexParams                       tFmCoexParams;                  /**< */
   2427 
   2428     TI_UINT32                           halCtrlMaxRxMsduLifetime;		/**< */
   2429 
   2430     /* Beacon Broadcast options */
   2431     TBcnBrcOptions                      BcnBrcOptions;					/**< */
   2432 
   2433 	/* PLT tests */
   2434 	TI_STATUS             				PltRxCalibrationStatus;			/**< */
   2435 
   2436 	/* CoexActivity */
   2437 	TCoexActivity                       tTwdParamsCoexActivity;         /**< */
   2438 } TTwdParamContents;
   2439 
   2440 /** \struct TTwdParamInfo
   2441  * \brief TWD Parameters Information
   2442  *
   2443  * \par Description
   2444  *
   2445  * \sa	TWD_SetParam
   2446  */
   2447 typedef struct
   2448 {
   2449     TI_UINT32                           paramType;					/**< FW Parameter Information Identifier	*/
   2450     TI_UINT32                           paramLength;				/**< FW Parameter Length					*/
   2451     TTwdParamContents                   content;					/**< FW Parameter content					*/
   2452 
   2453 } TTwdParamInfo;
   2454 
   2455 /** \struct TRxXferReserved
   2456  * \brief RX Xfer Reserved
   2457  *
   2458  * \par Description
   2459  *
   2460  * \sa
   2461  */
   2462 typedef struct
   2463 {
   2464     ProcessIDTag_e                      packetType;		/**< */
   2465     TI_UINT8                            rxLevel;		/**< */
   2466     TI_INT8                             rssi;			/**< */
   2467     TI_UINT8                            SNR;			/**< */
   2468     TI_UINT8                            band;			/**< */
   2469     TI_UINT32                           TimeStamp;		/**< */
   2470     EScanResultTag                      eScanTag;		/**< */
   2471 
   2472 } TRxXferReserved;
   2473 
   2474 /** \struct TRxAttr
   2475  * \brief RX Attributes
   2476  *
   2477  * \par Description
   2478  *
   2479  * \sa
   2480  */
   2481 typedef struct
   2482 {
   2483     PacketClassTag_enum                 ePacketType;    /**< */
   2484     TI_STATUS                           status;			/**< */
   2485     ERate                               Rate;   		/**< */
   2486     TI_UINT8                            SNR;			/**< */
   2487     TI_INT8                             Rssi;   		/**< */
   2488     TI_UINT8                            channel;		/**< */
   2489     TI_UINT32                           packetInfo;		/**< */
   2490     ERadioBand                          band;			/**< */
   2491     TI_UINT32                           TimeStamp;		/**< */
   2492     EScanResultTag                      eScanTag;		/**< */
   2493 
   2494 } TRxAttr;
   2495 
   2496 
   2497 /** \struct TGeneralInitParams
   2498  * \brief General Initialization Parameters
   2499  *
   2500  * \par Description
   2501  *
   2502  * \sa
   2503  */
   2504 typedef struct
   2505 {
   2506     TI_UINT16                           halCtrlListenInterval;				/**< */
   2507     TI_UINT8                            halCtrlCalibrationChannel2_4;		/**< */
   2508     TI_UINT8                            halCtrlCalibrationChannel5_0;	  	/**< */
   2509     TI_UINT16                           halCtrlRtsThreshold;				/**< */
   2510     TI_UINT16                           halCtrlFragThreshold;				/**< */
   2511     TI_UINT32                           halCtrlMaxTxMsduLifetime;			/**< */
   2512     TI_UINT32                           halCtrlMaxRxMsduLifetime;			/**< */
   2513     ETxAntenna                          halCtrlTxAntenna;					/**< */
   2514     ERxAntenna                          halCtrlRxAntenna;					/**< */
   2515     TI_UINT8                            halCtrlMacClock;					/**< */
   2516     TI_UINT8                            halCtrlArmClock;					/**< */
   2517     TI_UINT16                           halCtrlBcnRxTime;					/**< */
   2518     TI_BOOL                             halCtrlRxEnergyDetection;    		/**< */
   2519     TI_BOOL                             halCtrlTxEnergyDetection;			/**< */
   2520     TI_BOOL                             halCtrlEepromLessEnable;			/**< */
   2521     TI_BOOL                             halCtrlRxDisableBroadcast;			/**< */
   2522     TI_BOOL                             halCtrlRecoveryEnable;				/**< */
   2523     TI_BOOL                             halCtrlFirmwareDebug;				/**< */
   2524     TI_BOOL                             WiFiWmmPS;							/**< */
   2525     TRxTimeOut                          rxTimeOut;							/**< */
   2526     TI_UINT8                            halCtrlRateFallbackRetry;			/**< */
   2527     TI_BOOL                             b11nEnable;							/**< */
   2528 
   2529     TI_UINT16                           TxCompletePacingThreshold;			/**< */
   2530     TI_UINT16                           TxCompletePacingTimeout;			/**< */
   2531     TI_UINT16                           RxIntrPacingThreshold;			    /**< */
   2532     TI_UINT16                           RxIntrPacingTimeout;			    /**< */
   2533 
   2534     TI_UINT32                           uRxAggregPktsLimit;					/**< */
   2535     TI_UINT8                            hwAccessMethod;						/**< */
   2536     TI_UINT8                            maxSitesFragCollect;				/**< */
   2537     TI_UINT8                            packetDetectionThreshold;			/**< */
   2538     TI_UINT32                           nullTemplateSize;					/**< */
   2539     TI_UINT32                           disconnTemplateSize;				/**< */
   2540     TI_UINT32                           beaconTemplateSize;					/**< */
   2541     TI_UINT32                           probeRequestTemplateSize;			/**< */
   2542     TI_UINT32                           probeResponseTemplateSize;			/**< */
   2543     TI_UINT32                           PsPollTemplateSize;				   	/**< */
   2544     TI_UINT32                           qosNullDataTemplateSize;			/**< */
   2545     TI_UINT32                           tddRadioCalTimout;					/**< */
   2546     TI_UINT32                           CrtRadioCalTimout;					/**< */
   2547     TI_UINT32                           UseMboxInterrupt;					/**< */
   2548     TI_UINT32                           TraceBufferSize;					/**< */
   2549     TI_BOOL                             bDoPrint;							/**< */
   2550     TI_UINT8                            StaMacAddress[MAC_ADDR_LEN];		/**< */
   2551     TI_BOOL                             TxFlashEnable;						/**< */
   2552     TI_UINT8                            RxBroadcastInPs;					/**< */
   2553 	TI_UINT8       						ConsecutivePsPollDeliveryFailureThreshold;	/**< */
   2554     TI_UINT8                            TxBlocksThresholdPerAc[MAX_NUM_OF_AC];/**< */
   2555     TI_UINT16                           BeaconRxTimeout;					/**< */
   2556     TI_UINT16                           BroadcastRxTimeout;					/**< */
   2557 
   2558     TI_UINT8                            uRssiBeaconAverageWeight;			/**< */
   2559     TI_UINT8                            uRssiPacketAverageWeight;			/**< */
   2560     TI_UINT8                            uSnrBeaconAverageWeight;			/**< */
   2561     TI_UINT8                            uSnrPacketAverageWeight;			/**< */
   2562 
   2563     TI_UINT32                           uHostClkSettlingTime;				/**< */
   2564     TI_UINT8                            uHostFastWakeupSupport;             /**< */
   2565     THalCoexActivityTable               halCoexActivityTable;               /**< */
   2566     TFmCoexParams                       tFmCoexParams;                      /**< */
   2567 
   2568 } TGeneralInitParams;
   2569 
   2570 /** \struct TPowerSrvInitParams
   2571  * \brief Power Service Init Parameters
   2572  *
   2573  * \par Description
   2574  *
   2575  * \sa
   2576  */
   2577 typedef struct
   2578 {
   2579     TI_UINT8                            numNullPktRetries; 			/**< */
   2580     TI_UINT8                            hangOverPeriod;				/**< */
   2581     TI_UINT16                           reserve;					/**< */
   2582 
   2583 } TPowerSrvInitParams;
   2584 
   2585 /** \struct TScanSrvInitParams
   2586  * \brief Scan Service Init Parameters
   2587  *
   2588  * \par Description
   2589  *
   2590  * \sa
   2591  */
   2592 typedef struct
   2593 {
   2594     TI_UINT32                           numberOfNoScanCompleteToRecovery;	/**< The number of consecutive no scan complete that will trigger a recovery notification 	*/
   2595     TI_UINT32                      		uTriggeredScanTimeOut; 				/**< i.e. split scan. Time out for starting triggered scan between 2 channels 				*/
   2596 
   2597 } TScanSrvInitParams;
   2598 
   2599 /** \struct TArpIpFilterInitParams
   2600  * \brief ARP IP Filter Init Parameters
   2601  *
   2602  * \par Description
   2603  *
   2604  * \sa
   2605  */
   2606 typedef struct
   2607 {
   2608     TI_UINT32                           isFilterEnabled;	/**< */
   2609     TIpAddr                             addr;    			/**< */
   2610 
   2611 } TArpIpFilterInitParams;
   2612 
   2613 /** \struct TMacAddrFilterInitParams
   2614  * \brief AMC Address Filter Init Parameters
   2615  *
   2616  * \par Description
   2617  *
   2618  * \sa
   2619  */
   2620 typedef struct
   2621 {
   2622     TI_UINT8                            isFilterEnabled;							/**< */
   2623     TI_UINT8                            numOfMacAddresses;							/**< */
   2624     TI_UINT16                           reserve;									/**< */
   2625     TMacAddr                            macAddrTable[MAX_MULTICAST_GROUP_ADDRS];	/**< */
   2626 
   2627 } TMacAddrFilterInitParams;
   2628 
   2629 /** \struct RateMangeParams_t
   2630  * \brief Rate Maangement params structure
   2631  *
   2632  * \par Description
   2633  *
   2634  * \sa
   2635  */
   2636 typedef struct
   2637 {
   2638 	rateAdaptParam_e paramIndex;
   2639 	uint16 RateRetryScore;
   2640 	uint16 PerAdd;
   2641 	uint16 PerTh1;
   2642 	uint16 PerTh2;
   2643 	uint16 MaxPer;
   2644 	uint8 InverseCuriosityFactor;
   2645 	uint8 TxFailLowTh;
   2646 	uint8 TxFailHighTh;
   2647 	uint8 PerAlphaShift;
   2648 	uint8 PerAddShift;
   2649 	uint8 PerBeta1Shift;
   2650 	uint8 PerBeta2Shift;
   2651 	uint8 RateCheckUp;
   2652 	uint8 RateCheckDown;
   2653 	uint8 RateRetryPolicy[13];
   2654 }RateMangeParams_t;
   2655 
   2656 /*
   2657  * IMPORTANT NOTE:
   2658  * ===============
   2659  * This structure encapsulates the initialization data required by the TnetwDrv layer.
   2660  * All structures in it are arranged so no padding will be added by the compiler!!
   2661  * This is required to avoid missalignment when compiled by customers using GWSI API!!
   2662  */
   2663 /** \struct TTwdInitParams
   2664  * \brief TWD Init Parameters
   2665  *
   2666  * \par Description
   2667  * All TWD Initialization Parameters
   2668  *
   2669  * \sa	TWD_SetDefaults
   2670  */
   2671 typedef struct
   2672 {
   2673     TGeneralInitParams                  tGeneral;			 /**< General Initialization Parameters			*/
   2674     TPowerSrvInitParams                 tPowerSrv;			 /**< Power Service Initialization Parameters	*/
   2675     TScanSrvInitParams                  tScanSrv;			 /**< Scan Service Initialization Parameters    */
   2676     TArpIpFilterInitParams              tArpIpFilter;		 /**< ARP IP filter Initialization Parameters	*/
   2677     TMacAddrFilterInitParams            tMacAddrFilter;		 /**< MAC Address Initialization Parameters		*/
   2678     IniFileRadioParam                   tIniFileRadioParams; /**< Radio Initialization Parameters   		*/
   2679     IniFileGeneralParam                 tPlatformGenParams; /**< Radio Initialization Parameters   	        */
   2680     ACXSmartReflexConfigParams_t        tSmartReflexParams;       /**< Smart Refelx Parameters   	            */
   2681     ACXSmartReflexDebugParams_t         tSmartReflexDebugParams;  /**< Smart Refelx Debug Parameters   	        */
   2682     ACXSmartReflexState_t               tSmartReflexState;        /**< Smart Refelx state   	                */
   2683 	RateMangeParams_t					tRateMngParams;
   2684 
   2685 } TTwdInitParams;
   2686 
   2687 /** \struct TTwdHtCapabilities
   2688  * \brief TWD HT Capabilities
   2689  *
   2690  * \par Description
   2691  *
   2692  * \sa	TWD_SetDefaults, TWD_GetTwdHtCapabilities
   2693  */
   2694 typedef struct
   2695 {
   2696     TI_BOOL     b11nEnable;       					/**< Enable/Disable 802.11n flag	*/
   2697     TI_UINT8    uChannelWidth;						/**< */
   2698     TI_UINT8    uRxSTBC;							/**< */
   2699     TI_UINT8    uMaxAMSDU;						  	/**< */
   2700     TI_UINT8    uMaxAMPDU;							/**< */
   2701 	TI_UINT8    uAMPDUSpacing;					   	/**< */
   2702 	TI_UINT8    aRxMCS[RX_TX_MCS_BITMASK_SIZE];		/**< */
   2703 	TI_UINT8    aTxMCS[RX_TX_MCS_BITMASK_SIZE];		/**< */
   2704 	TI_UINT16   uRxMaxDataRate;						/**< */
   2705 	TI_UINT8    uPCOTransTime;						/**< */
   2706 	TI_UINT32   uHTCapabilitiesBitMask;				/**< */
   2707 	TI_UINT8    uMCSFeedback;						/**< */
   2708 } TTwdHtCapabilities;
   2709 
   2710 typedef struct
   2711 {
   2712     int32  SNRCorrectionHighLimit;
   2713     int32  SNRCorrectionLowLimit;
   2714     int32  PERErrorTH;
   2715     int32  attemptEvaluateTH;
   2716     int32  goodAttemptTH;
   2717     int32  curveCorrectionStep;
   2718 
   2719  }RateMangeReadParams_t;
   2720 
   2721 
   2722 /*
   2723  * --------------------------------------------------------------
   2724  *	APIs
   2725  * --------------------------------------------------------------
   2726  */
   2727 /** @ingroup Control
   2728  * \brief Send Packet Transfer CB
   2729  *
   2730  * \param  CBObj        - object handle
   2731  * \param  pPktCtrlBlk  - Pointer to Input Packet Control Block
   2732  * \return void
   2733  *
   2734  * \par Description
   2735  * The Transfer-Done callback
   2736  * User registers the CB for Send Packet Transfer done
   2737  *
   2738  * \sa	TWD_RegisterCb
   2739  */
   2740 typedef void (* TSendPacketTranferCb)(TI_HANDLE CBObj, TTxCtrlBlk *pPktCtrlBlk);
   2741 /** @ingroup Control
   2742  * \brief Send Packet Debug CB
   2743  *
   2744  * \param  CBObj        - object handle
   2745  * \param  pPktCtrlBlk  - Pointer to Input Packet Control Block
   2746  * uDebugInfo			- Debug Information
   2747  * \return void
   2748  *
   2749  * \par Description
   2750  * The Transfer-Done Debug callback
   2751  *
   2752  * \sa
   2753  */
   2754 typedef void (* TSendPacketDebugCb)  (TI_HANDLE CBObj, TTxCtrlBlk *pPktCtrlBlk, TI_UINT32 uDebugInfo);
   2755 /** @ingroup Control
   2756  * \brief Send Packet Debug CB
   2757  *
   2758  * \param  CBObj        - object handle
   2759  * \param  pPktCtrlBlk  - Pointer to Input Packet Control Block
   2760  * uDebugInfo			- Debug Information
   2761  * \return void
   2762  *
   2763  * \par Description
   2764  *
   2765  * \sa	TWD_RegisterCb
   2766  */
   2767 typedef ERxBufferStatus (*TRequestForBufferCb) (TI_HANDLE hObj, void **pRxBuffer, TI_UINT16 aLength, TI_UINT32 uEncryptionFlag, PacketClassTag_e ePacketClassTag);
   2768 /** @ingroup Control
   2769  * \brief Send Packet Debug CB
   2770  *
   2771  * \param  hObj        	- object handle
   2772  * \param  pBuffer	    - Pointer to Received buffer frame
   2773  * \return void
   2774  *
   2775  * \par Description
   2776  * This function CB will be called when Received packet from RX Queue
   2777  * User registers the CB for RX Buffer Request
   2778  *
   2779  * \sa	TWD_RegisterCb
   2780  */
   2781 typedef void (*TPacketReceiveCb) (TI_HANDLE 	hObj,
   2782                                   const void 	*pBuffer);
   2783 /** @ingroup Control
   2784  * \brief Failure Event CB
   2785  *
   2786  * \param  handle        	- object handle
   2787  * \param  eFailureEvent  	- Failure Event Type
   2788  * \return void
   2789  *
   2790  * \par Description
   2791  * Callback clled for Failure event
   2792  * User registers the CB for Health-Moitoring
   2793  *
   2794  * \sa	TWD_RegisterCb
   2795  */
   2796 typedef void (*TFailureEventCb)  (TI_HANDLE handle, EFailureEvent eFailureEvent);
   2797 
   2798 /** \union TTwdCB
   2799  * \brief TWD Callback
   2800  *
   2801  * \par Description
   2802  * Union which holds all TWD Internal Callbacks which are registered by user
   2803  * per Module and Event IDs
   2804  *
   2805  * \sa	TWD_RegisterCb
   2806  */
   2807 typedef union
   2808 {
   2809 	TSendPacketTranferCb	sendPacketCB;		/**< Transfer-Done callback			*/
   2810 	TSendPacketDebugCb		sendPacketDbgCB;	/**< Transfer-Done Debug callback	*/
   2811 	TRequestForBufferCb		requestBufferCB;	/**< Transfer-Done Debug callback	*/
   2812 	TPacketReceiveCb		recvPacketCB;		/**< RX Buffer Request callback		*/
   2813 	TFailureEventCb			failureEventCB;		/**< Failure Event callback			*/
   2814 }TTwdCB;
   2815 
   2816 
   2817 /** @ingroup Control
   2818  * \brief Scan Service complete CB
   2819  *
   2820  * \param  hCb        	- handle to the scan object
   2821  * \param  eTag  		- the scan results type tag
   2822  * \param  uResultCount - number of results received during this scan
   2823  * \param  SPSStatus  	- bitmap indicating which channels were attempted (if this is an SPS scan)
   2824  * \param  TSFError  	- whether a TSF error occurred (if this is an SPS scan)
   2825  * \param  ScanStatus  	- scan SRV status (OK / NOK)
   2826  * \param  PSMode		- Power Save Mode
   2827  * \return void
   2828  *
   2829  * \par Description
   2830  * This function CB will be called when Scan Service is complete
   2831  * User registers the Scan Service Complete CB
   2832  *
   2833  * \sa	TWD_RegisterScanCompleteCb
   2834  */
   2835 typedef void (*TScanSrvCompleteCb) (TI_HANDLE 		hCb,
   2836 									EScanResultTag 	eTag,
   2837 									TI_UINT32 		uResultCount,
   2838                                     TI_UINT16 		SPSStatus,
   2839 									TI_BOOL 		TSFError,
   2840 									TI_STATUS 		ScanStatus,
   2841                                     TI_STATUS 		PSMode);
   2842 /** @ingroup Control
   2843  * \brief TWD Callback
   2844  *
   2845  * \param  hCb        	- handle to object
   2846  * \param  status  		- completion status
   2847  * \return void
   2848  *
   2849  * \par Description
   2850  * Initialising Complete Callaback (exapmle: Init HW/FW CB etc.)
   2851  * User can use its own Complete CB which will be called when
   2852  * the suitable module id & event number will arrive
   2853  *
   2854  * \sa	TWD_Init
   2855  */
   2856 typedef void (*TTwdCallback) (TI_HANDLE hCb, TI_STATUS status);
   2857 /** @ingroup Control
   2858  * \brief TWD Callback
   2859  *
   2860  * \param  hCb        	- handle to object
   2861  * \param  msrReply  	- Pointer to input measurement (which ended) Reply
   2862  * \return void
   2863  *
   2864  * \par Description
   2865  * The function prototype for the measurement complete callback
   2866  * User can use its own measurement complete CB
   2867  * which will be called when measurement end
   2868  *
   2869  * \sa	TWD_StartMeasurement
   2870  */
   2871 typedef void (*TMeasurementSrvCompleteCb) (TI_HANDLE hCb, TMeasurementReply* msrReply);
   2872 /** @ingroup Control
   2873  * \brief Command Response Callback
   2874  *
   2875  * \param  hCb        	- handle to object
   2876  * \param  status  		- status of Command ended
   2877  * \return void
   2878  *
   2879  * \par Description
   2880  * The function prototype for the Command Response CB
   2881  * Enables user to implement and use its own Response CB
   2882  * which will be called when TWD Command end
   2883  *
   2884  * \sa	TWD_StartMeasurement, TWD_StopMeasurement, TWD_Scan, TWD_StopScan, TWD_StartPeriodicScan, TWD_StopPeriodicScan
   2885  */
   2886 typedef void (*TCmdResponseCb) (TI_HANDLE hCb, TI_UINT16 status);
   2887 /** @ingroup Control
   2888  * \brief Command Response Callback
   2889  *
   2890  * \param  hCb        	- handle to object
   2891  * \param  status  		- status of Command ended
   2892  * \return void
   2893  *
   2894  * \par Description
   2895  * The function prototype for the Power Save Set Response CB
   2896  * Enables user to implement and use its own Response CB which
   2897  * will be called when Power Save Set Command end
   2898  *
   2899  * \sa	TWD_SetPsMode
   2900  */
   2901 typedef void (*TPowerSaveResponseCb)(TI_HANDLE hCb, TI_UINT8 status);
   2902 /** @ingroup Control
   2903  * \brief Command Complete Callback
   2904  *
   2905  * \param  hCb        	- handle to object
   2906  * \param  PsMode		- Power Save Mode
   2907  * \param  status  		- status of Command ended
   2908  * \return void
   2909  *
   2910  * \par Description
   2911  * The function prototype for the Power Save Set Complete CB
   2912  * Enables user to implement and use its own Complete CB which
   2913  * will be called when Power Save Set Command end (for success/faild notification)
   2914  *
   2915  * \sa	TWD_SetPsMode
   2916  */
   2917 typedef void (*TPowerSaveCompleteCb )(TI_HANDLE hCb, TI_UINT8 PsMode, TI_UINT8 status);
   2918 /** @ingroup Control
   2919  * \brief  Create TWD Module
   2920  *
   2921  * \param  hOs   	- OS module object handle
   2922  * \return TWD Module object handle on success or NULL on failure
   2923  *
   2924  * \par Description
   2925  * Calling this function Creates a TWD object and all its sub-modules.
   2926  *
   2927  * \sa     TWD_Destroy, TWD_Init
   2928  */
   2929 TI_HANDLE TWD_Create (TI_HANDLE hOs);
   2930 /** @ingroup Control
   2931  * \brief  Destroy TWD Module
   2932  *
   2933  * \param  hTWD   	- hTWD module object handle
   2934  * \return TI_OK on success or TI_NOK on failure
   2935  *
   2936  * \par Description
   2937  * Calling this function Destroys TWD object and all its sub-modules.
   2938  *
   2939  * \sa     TWD_Create
   2940  */
   2941 TI_STATUS TWD_Destroy (TI_HANDLE hTWD);
   2942 /** Control
   2943  * \brief  Init TWD module
   2944  *
   2945  * \param  hTWD         - TWD module object handle
   2946  * \param  hReport      - Report module object handle
   2947  * \param  hUser        - Master (User) module object handle
   2948  * \param  hTimer       - Timer module object handle
   2949  * \param  hContext     - context-engine module object handle
   2950  * \param  hTxnQ        - TxnQueue module object handle
   2951  * \param  fInitHwCb    - Init HW callback called when init HW phase is done
   2952  * \param  fInitFwCb    - Init FW callback called when init FW phase is done
   2953  * \param  fConfigFwCb  - Configuration FW callback called when configuring FW phase is done
   2954  * \param  fStopCb      - Stop callback called when TWD is stopped
   2955  * \param  fInitFailCb  - Fail callback called when TWD is Failed
   2956  * \return void
   2957  *
   2958  * \par Description
   2959  * Start hardware Init and Config process.
   2960  * This is the first function that must be called after TWD_Create.
   2961  *
   2962  * \sa     TWD_Create, TWD_Stop
   2963  */
   2964 void TWD_Init (TI_HANDLE    hTWD,
   2965 			   TI_HANDLE 	hReport,
   2966                TI_HANDLE 	hUser,
   2967 			   TI_HANDLE 	hTimer,
   2968 			   TI_HANDLE 	hContext,
   2969 			   TI_HANDLE 	hTxnQ,
   2970                TTwdCallback fInitHwCb,
   2971                TTwdCallback fInitFwCb,
   2972                TTwdCallback fConfigFwCb,
   2973 			   TTwdCallback	fStopCb,
   2974 			   TTwdCallback fInitFailCb);
   2975 /** @ingroup Control
   2976  * \brief  Init HW module
   2977  *
   2978  * \param  hTWD         - TWD module object handle
   2979  * \param  pbuf         - Pointer to Input NVS Buffer
   2980  * \param  length       - Length of NVS Buffer
   2981  * \return TI_OK on success or TI_NOK on failure
   2982  *
   2983  * \par Description
   2984  * Performs the HW init process.
   2985  *
   2986  * \sa
   2987  */
   2988 TI_STATUS TWD_InitHw (TI_HANDLE hTWD, TI_UINT8 *pbuf, TI_UINT32 length);
   2989 /** @ingroup Control
   2990  * \brief Set Defults to TWD Init Params
   2991  *
   2992  * \param  hTWD         - TWD module object handle
   2993  * \param  pInitParams  - Pointer to Input init default parameters
   2994  * \return TI_OK on success or TI_NOK on failure
   2995  *
   2996  * \par Description
   2997  *
   2998  * \sa
   2999  */
   3000 TI_STATUS TWD_SetDefaults (TI_HANDLE hTWD, TTwdInitParams *pInitParams);
   3001 /** @ingroup Control
   3002  * \brief  Init FW
   3003  *
   3004  * \param  hTWD         - TWD module object handle
   3005  * \param  pFileInfo    - Pointer to Input Buffer contains part of FW Image to Download
   3006  * 							The Following Field should be filled:
   3007  * 							pFileInfo->pBuffer
   3008  * 							pFileInfo->uLength
   3009  * 							pFileInfo->uAddress
   3010  * 							pFileInfo->bLast
   3011  * \return TI_OK on success or TI_NOK on failure
   3012  *
   3013  * \par Description
   3014  * Performs FW Download, and Run FW
   3015  *
   3016  * \sa
   3017  */
   3018 TI_STATUS TWD_InitFw (TI_HANDLE hTWD, TFileInfo *pFileInfo);
   3019 /** @ingroup Control
   3020  * \brief  Open UART Bus Txn
   3021  *
   3022  * \param  hTWD         - TWD module object handle
   3023  * \param  pParams      - Pointer to Input parameters
   3024  * \return TI_OK on success or TI_NOK on failure
   3025  *
   3026  * \par Description
   3027  *
   3028  * \sa
   3029  */
   3030 TI_STATUS TWD_BusOpen (TI_HANDLE hTWD, void* pParams);
   3031 /** @ingroup Control
   3032  * \brief  Close UART Bus Txn
   3033  *
   3034  * \param  hTWD         - TWD module object handle
   3035  * \return TI_OK on success or TI_NOK on failure
   3036  *
   3037  * \par Description
   3038  *
   3039  * \sa
   3040  */
   3041 TI_STATUS TWD_BusClose (TI_HANDLE hTWD);
   3042 /** @ingroup Control
   3043  * \brief Halt firmware
   3044  *
   3045  * \param  hTWD         - TWD module object handle
   3046  * \return TI_OK on success or TI_NOK on failure
   3047  *
   3048  * \par Description
   3049  *
   3050  * \sa
   3051  */
   3052 TI_STATUS TWD_Stop (TI_HANDLE hTWD);
   3053 /** @ingroup Control
   3054  * \brief Enable external events from FW
   3055  *
   3056  * \param  hTWD         - TWD module object handle
   3057  * \return void
   3058  *
   3059  * \par Description
   3060  * Enable external events from FW upon driver start or recovery completion
   3061  *
   3062  * \sa
   3063  */
   3064 void TWD_EnableExternalEvents (TI_HANDLE hTWD);
   3065 /** @ingroup Control
   3066  * \brief Registers TWD internal callback function
   3067  *
   3068  * \param  hTWD         - TWD module object handle
   3069  * \param  event        - event on which the registrated CB will be called
   3070  * \param  fCb 	        - Pointer to Registered CB function
   3071  * \param  pData 	    - Pointer to Registered CB data
   3072  * \return TI_OK on success or TI_NOK on failure
   3073  *
   3074  * \par Description
   3075  * This CB enables user to register TWD Internal CB functions of different Modules,
   3076  * with their data.
   3077  * The function identifies which TWD Module owns the Registered CB, and what the specific Registered CB
   3078  * according to event input parameter.
   3079  * Once the Module and specific CB function are identified, the CB is registerd in the TWD Module
   3080  * by calling suitable registration CB function
   3081  *
   3082  * \sa
   3083  */
   3084 TI_STATUS TWD_RegisterCb (TI_HANDLE hTWD, TI_UINT32 event, TTwdCB *fCb, void *pData);
   3085 /** @ingroup Control
   3086  * \brief Exit from init mode
   3087  *
   3088  * \param  hTWD         - TWD module object handle
   3089  * \return TI_OK on success or TI_NOK on failure
   3090  *
   3091  * \par Description
   3092  * Exit From Init Mode enable sending command to the MboxQueue (which store a command),
   3093  * while the interrupts are masked.
   3094  * The interrupt would be enable at the end of the init process
   3095  *
   3096  * \sa
   3097  */
   3098 TI_STATUS TWD_ExitFromInitMode (TI_HANDLE hTWD);
   3099 /** @ingroup Control
   3100  * \brief Finalize FW init and download
   3101  *
   3102  * \param  hTWD         - TWD module object handle
   3103  * \return void
   3104  *
   3105  * \par Description
   3106  * Init all the remaining initialization after the FW download has finished
   3107  *
   3108  * \sa
   3109  */
   3110 void TWD_FinalizeDownload (TI_HANDLE hTWD);
   3111 /** @ingroup Control
   3112  * \brief Finalize of faulty FW init and download
   3113  *
   3114  * \param  hTWD         - TWD module object handle
   3115  * \return void
   3116  *
   3117  * \par Description
   3118  * Call the upper layer failure callback after Init or FW download has finished with failure.
   3119  *
   3120  * \sa
   3121  */
   3122 void TWD_FinalizeOnFailure (TI_HANDLE hTWD);
   3123 /** @ingroup Control
   3124  * \brief Perform FW Configuration
   3125  *
   3126  * \param  hTWD         - TWD module object handle
   3127  * \return TI_OK on success or TI_NOK on failure
   3128  *
   3129  * \par Description
   3130  * Configure the FW from the TWD DB - after configuring all HW objects
   3131  *
   3132  * \sa
   3133  */
   3134 TI_STATUS TWD_ConfigFw (TI_HANDLE hTWD);
   3135 /** @ingroup Control
   3136  * \brief Handle FW interrupt from ISR context
   3137  *
   3138  * \param  hTWD         - TWD module object handle
   3139  * \return TI_OK on success or TI_NOK on failure
   3140  *
   3141  * \par Description
   3142  * This is the FW-interrupt ISR context. The driver task is scheduled to hadnle FW-Events
   3143  *
   3144  * \sa
   3145  */
   3146 TI_STATUS TWD_InterruptRequest (TI_HANDLE hTWD);
   3147 /** @ingroup Control
   3148  * \brief Enable Recovery
   3149  *
   3150  * \param  hTWD         - TWD module object handle
   3151  * \return TRUE if recovery Enables, FALSE otherwise
   3152  *
   3153  * \par Description
   3154  * Return Recovery E/D status
   3155  *
   3156  * \sa
   3157  */
   3158 TI_BOOL TWD_RecoveryEnabled (TI_HANDLE hTWD);
   3159 /** @ingroup Measurement
   3160  * \brief Starts a measurement
   3161  *
   3162  * \param  hTWD         			- TWD module object handle
   3163  * \param  pMsrRequest         		- Pointer to Input structure which contains the measurement parameters
   3164  * \param  uTimeToRequestExpiryMs   - The time (in milliseconds) the measurement SRV has to start the request
   3165  * \param  fResponseCb         		- The Command response CB Function
   3166  * \param  hResponseCb         		- Handle to Command response CB Function Obj
   3167  * \param  fCompleteCb         		- The Command Complete CB Function
   3168  * \param  hCompleteCb         		- Handle to Command Complete CB Function Obj
   3169  * \return TI_OK on success or TI_NOK on failure
   3170  *
   3171  * \par Description
   3172  * Starts a measurement operation
   3173  *
   3174  * \sa
   3175  */
   3176 TI_STATUS TWD_StartMeasurement (TI_HANDLE hTWD,
   3177 								TMeasurementRequest *pMsrRequest,
   3178 								TI_UINT32 uTimeToRequestExpiryMs,
   3179 								TCmdResponseCb fResponseCb,
   3180 								TI_HANDLE hResponseCb,
   3181 								TMeasurementSrvCompleteCb fCompleteCb,
   3182 								TI_HANDLE hCompleteCb);
   3183 /** @ingroup Measurement
   3184  * \brief Stops a measurement
   3185  *
   3186  * \param  hTWD         			- TWD module object handle
   3187  * \param  bSendNullData         	- Indicates whether to send NULL data when exiting driver mode
   3188  * \param  fResponseCb         		- Pointer to Command response CB function
   3189  * \param  hResponseCb         		- Handle to Command response CB parameters
   3190  * \return TI_OK on success or TI_NOK on failure
   3191  *
   3192  * \par Description
   3193  * Stops a measurement operation in progress
   3194  *
   3195  * \sa
   3196  */
   3197 TI_STATUS TWD_StopMeasurement (TI_HANDLE hTWD,
   3198 							   TI_BOOL bSendNullData,
   3199 							   TCmdResponseCb fResponseCb,
   3200 							   TI_HANDLE hResponseCb);
   3201 /** @ingroup Measurement
   3202  * \brief Start scan
   3203  *
   3204  * \param hTWD                		- TWD module object handle
   3205  * \param pScanParams            	- Pointer to Input Scan specific parameters
   3206  * \param eScanTag               	- Scan tag, used for result and scan complete tracking
   3207  * \param bHighPriority          	- Indicates whether to perform a high priority (overlaps DTIM) scan
   3208  * \param bDriverMode            	- Indicates whether to try to enter driver mode (with PS on) before issuing the scan command
   3209  * \param bScanOnDriverModeError 	- Indicates whether to proceed with the scan if requested to enter driver mode and failed
   3210  * \param ePsRequest             	- Parameter sent to PowerSaveServer.
   3211  * 										Should indicates PS ON or "keep current" only when driver mode is requested,
   3212  * 										Otherwise should indicate OFF
   3213  * \param bSendNullData          	- Indicates whether to send Null data when exiting driver mode on scan complete
   3214  * \param fResponseCb            	- The Response CB Function which called after downloading the command
   3215  * \param hResponseCb            	- Handle to the Response CB Function Obj (Notice : last 2 params are NULL in Legacy run)
   3216  * \return TI_OK on success or TI_NOK on failure
   3217  *
   3218  * \par Description
   3219  * Start scan. enter driver mode (PS) only if station is connected
   3220  *
   3221  * \sa
   3222  */
   3223 TI_STATUS TWD_Scan (TI_HANDLE hTWD,
   3224 					TScanParams *pScanParams,
   3225 					EScanResultTag eScanTag,
   3226 					TI_BOOL bHighPriority,
   3227 					TI_BOOL bDriverMode,
   3228 					TI_BOOL bScanOnDriverModeError,
   3229 					E80211PsMode ePsRequest,
   3230 					TI_BOOL bSendNullData,
   3231 					TCmdResponseCb fResponseCb,
   3232 					TI_HANDLE hResponseCb);
   3233 /** @ingroup Measurement
   3234  * \brief Stop scan
   3235  *
   3236  * \param hTWD                		- TWD module object handle
   3237  * \param eScanTag               	- Scan tag, used to track scan complete and result
   3238  * \param bSendNullData          	- Indicates whether to send Null data when exiting driver mode
   3239  * \param fScanCommandResponseCb 	- The Response CB Function which called after downloading the command
   3240  * \param hCb                    	- Handle to the Response CB Function Obj (Notice : last 2 params are NULL in Legacy run)
   3241  * \return TI_OK on success or TI_NOK on failure
   3242  *
   3243  * \par Description
   3244  * Sends a Stop Scan command to FW, no matter if we are in scan progress or not
   3245  *
   3246  * \sa
   3247  */
   3248 TI_STATUS TWD_StopScan (TI_HANDLE hTWD,
   3249 						EScanResultTag eScanTag,
   3250 						TI_BOOL bSendNullData,
   3251 						TCmdResponseCb fScanCommandResponseCb,
   3252 						TI_HANDLE hCb);
   3253 /** @ingroup Measurement
   3254  * \brief Stop Scan on FW Reset
   3255  *
   3256  * \param hTWD		- TWD module object handle
   3257  * \return TI_OK on success or TI_NOK on failure
   3258  *
   3259  * \par Description
   3260  * Stop scan operation when a FW reset (recovery) situation is detected (by all processes
   3261  * other than scan)
   3262  *
   3263  * \sa
   3264  */
   3265 TI_STATUS TWD_StopScanOnFWReset (TI_HANDLE hTWD);
   3266 /** @ingroup Measurement
   3267  * \brief Start Connection Periodic Scan operation
   3268  *
   3269  * \param hTWD                			- TWD module object handle
   3270  * \param  pPeriodicScanParams    		- Pointer to Input Parameters Structures for the Periodic Scan operation
   3271  * \param  eScanTag               		- Scan tag, used for scan complete and result tracking
   3272  * \param  uPassiveScanDfsDwellTimeMs 	- Passive dwell time for DFS channels (in milli-secs)
   3273  * \param  fResponseCb            		- Response CB Function which is called after downloading the command
   3274  * \param  hResponseCb            		- Handle to Response CB Function Obj (Notice : last 2 params are NULL in Legacy run)
   3275  * \return TI_OK on success or TI_NOK on failure
   3276  *
   3277  * \par Description
   3278  * Perform Connection Scan periodically
   3279  *
   3280  * \sa
   3281  */
   3282 TI_STATUS TWD_StartConnectionScan (TI_HANDLE hTWD,
   3283 								 TPeriodicScanParams *pPeriodicScanParams,
   3284 								 EScanResultTag eScanTag,
   3285 								 TI_UINT32 uPassiveScanDfsDwellTimeMs,
   3286 								 TCmdResponseCb fResponseCb,
   3287 								 TI_HANDLE hResponseCb);
   3288 /** @ingroup Measurement
   3289  * \brief Stop Periodic Scan operation
   3290  *
   3291  * \param hTWD 					- TWD module object handle
   3292  * \param eScanTag              - scan tag, used for scan complete and result tracking
   3293  * \param  fResponseCb          - Response CB Function which is called after downloading the command
   3294  * \param  hResponseCb          - Handle to Response CB Function Obj (Notice : last 2 params are NULL in Legacy run)
   3295  * \return TI_OK on success or TI_NOK on failure
   3296  *
   3297  * \par Description
   3298  * Stop Periodic Connection Scan
   3299  *
   3300  * \sa
   3301  */
   3302 TI_STATUS TWD_StopPeriodicScan (TI_HANDLE hTWD,
   3303 								EScanResultTag eScanTag,
   3304 								TCmdResponseCb fResponseCb,
   3305 								TI_HANDLE hResponseCb);
   3306 /** @ingroup Measurement
   3307  * \brief Register CB for Scan Complete
   3308  *
   3309  * \param  hTWD         		- TWD module object handle
   3310  * \param  fScanCompleteCb     	- The Complete CB Function
   3311  * \param  hScanCompleteCb   	- Handle to the Complete CB Function Obj
   3312  * \return TI_OK on success or TI_NOK on failure
   3313  *
   3314  * \par Description
   3315  * Registers a Complete CB Function for Scan Complete notifications
   3316  *
   3317  * \sa
   3318  */
   3319 TI_STATUS TWD_RegisterScanCompleteCb (TI_HANDLE hTWD,
   3320 									  TScanSrvCompleteCb fScanCompleteCb,
   3321 									  TI_HANDLE hScanCompleteCb);
   3322 /** @ingroup Misc
   3323  * \brief  Set Parameters in FW
   3324  *
   3325  * \param hTWD 			- TWD module object handle
   3326  * \param  pParamInfo   - Pointer to Input TWD Parameters Information Structure
   3327  * \return TI_OK on success or TI_NOK on failure
   3328  *
   3329  * \par Description
   3330  *  Set/Configure Parameters Information in FW via Mail BOX
   3331  *
   3332  * \sa	TTwdParamInfo
   3333  */
   3334 TI_STATUS TWD_SetParam (TI_HANDLE hTWD, TTwdParamInfo *pParamInfo);
   3335 /** @ingroup Misc
   3336  * \brief  Get Parameters from FW
   3337  *
   3338  * \param hTWD 			- TWD module object handle
   3339  * \param  pParamInfo   - Pointer to Input TWD Parameters Information Structure
   3340  * \return TI_OK on success or TI_NOK on failure
   3341  *
   3342  * \par Description
   3343  *  Get Parameters Information from FW  via Mail BOX
   3344  *
   3345  * \sa
   3346  */
   3347 TI_STATUS TWD_GetParam (TI_HANDLE hTWD, TTwdParamInfo *pParamInfo);
   3348 /** @ingroup Control
   3349  * \brief Callback which Checks MBOX
   3350  *
   3351  * \param  hTWD         - TWD module object handle
   3352  * \param  uMboxStatus  - Mailbox status
   3353  * \param  pItrParamBuf - Pointer to Interrogate parameters buffer
   3354  * \return TI_OK on success or TI_NOK on failure
   3355  *
   3356  * \par Description
   3357  * Perform FW validation by calling CB function which is used for handling MBOX error.
   3358  * If command MBOX queue identify MBOX error or timeout, it will call
   3359  * a failure-callback with MBOX_FAILURE type (FW failed)
   3360  *
   3361  * \sa
   3362  */
   3363 TI_STATUS TWD_CheckMailboxCb (TI_HANDLE hTWD, TI_UINT16 uMboxStatus, void *pItrParamBuf);
   3364 /** @ingroup Control
   3365  * \brief Write MIB
   3366  *
   3367  * \param hTWD 		- TWD module object handle
   3368  * \param pMib      - Pointer to Input MIB Structure
   3369  * \return TI_OK on success or TI_NOK on failure
   3370  *
   3371  * \par Description
   3372  * Write configuration information to FW
   3373  *
   3374  * \sa TWD_ReadMib
   3375  */
   3376 TI_STATUS   TWD_WriteMib (TI_HANDLE hTWD, TMib* pMib);
   3377 /** @ingroup Control
   3378  * \brief Read MIB
   3379  *
   3380  * \param hTWD 			- TWD module object handle
   3381  * \param  hCb          - Handle to Request MIB CB Function Obj
   3382  * \param  fCb          - Pinter to Request MIB CB Function
   3383  * \param  pCb          - Pointer to read parameters
   3384  * \return TI_OK on success or TI_NOK on failure
   3385  *
   3386  * \par Description
   3387  * Read configuration information from FW
   3388  *
   3389  * \sa TWD_WriteMib
   3390  */
   3391 TI_STATUS   TWD_ReadMib                 (TI_HANDLE hTWD, TI_HANDLE hCb, void* fCb, void* pCb);
   3392 /** @ingroup Control
   3393  * \brief TWD Debug
   3394  *
   3395  * \param hTWD 			- TWD module object handle
   3396  * \param  funcType    	- TWD Function Debuged
   3397  * \param  pParam     	- Pointer to Input parameters of Debug function
   3398  * \return TI_OK on success or TI_NOK on failure
   3399  *
   3400  * \par Description
   3401  * Use for Debug TWD
   3402  *
   3403  * \sa
   3404  */
   3405 TI_STATUS TWD_Debug (TI_HANDLE hTWD, TI_UINT32 funcType, void *pParam);
   3406 /** @ingroup Control
   3407  * \brief Register event
   3408  *
   3409  * \param  hTWD         - TWD module object handle
   3410  * \param  event        - Event ID
   3411  * \param  fCb          - Event Callback function pointer
   3412  * \param  hCb          - Event Callback object handle
   3413  * \return TI_OK on success or TI_NOK on failure
   3414  *
   3415  * \par Description
   3416  * Register FW event callback function
   3417  *
   3418  * \sa
   3419  */
   3420 TI_STATUS TWD_RegisterEvent (TI_HANDLE hTWD, TI_UINT32 event, void *fCb, TI_HANDLE hCb);
   3421 /** @ingroup Control
   3422  * \brief Disable event
   3423  *
   3424  * \param  hTWD         - TWD module object handle
   3425  * \param  event        - Event ID
   3426  * \return TI_OK on success or TI_NOK on failure
   3427  *
   3428  * \par Description
   3429  * Disable specific FW event
   3430  * Note: Currently not in use
   3431  *
   3432  * \sa
   3433  */
   3434 TI_STATUS TWD_DisableEvent (TI_HANDLE hTWD, TI_UINT32 event);
   3435 /** @ingroup Control
   3436  * \brief Enable event
   3437  *
   3438  * \param  hTWD         - TWD module object handle
   3439  * \param  event        - Event ID
   3440  * \return TI_OK on success or TI_NOK on failure
   3441  *
   3442  * \par Description
   3443  * Enable specific FW event
   3444  *
   3445  * \sa
   3446  */
   3447 TI_STATUS TWD_EnableEvent (TI_HANDLE hTWD, TI_UINT32 event);
   3448 /** @ingroup Control
   3449  * \brief Convert RSSI to RX Level
   3450  *
   3451  * \param hTWD 			- TWD module object handle
   3452  * \param  iRssiVal     - RSSI Input Value
   3453  * \return TI_OK on success or TI_NOK on failure
   3454  *
   3455  * \par Description
   3456  * Note: Currently not in use!
   3457  *
   3458  * \sa
   3459  */
   3460 TI_INT8 TWD_ConvertRSSIToRxLevel (TI_HANDLE hTWD, TI_INT32 iRssiVal);
   3461 /** @ingroup Control
   3462  * \brief Complete TWD Stop
   3463  *
   3464  * \param  hTWD	- TWD module object handle
   3465  * \return void
   3466  *
   3467  * \par Description
   3468  *
   3469  * \sa TWD_Stop, TWD_Init
   3470  */
   3471 void TWD_StopComplete (TI_HANDLE hTWD);
   3472 /** @ingroup Control
   3473  * \brief Disable Interrupts
   3474  *
   3475  * \param hTWD	- TWD module object handle
   3476  * \return void
   3477  *
   3478  * \par Description
   3479  * Disable the FW Event client of the context thread handler
   3480  *
   3481  * \sa
   3482  */
   3483 void TWD_DisableInterrupts (TI_HANDLE hTWD);
   3484 /** @ingroup Control
   3485  * \brief Enable Interrupts
   3486  *
   3487  * \param hTWD 		- TWD module object handle
   3488  * \return void
   3489  *
   3490  * \par Description
   3491  * Enable the FW Event client of the context thread handler
   3492  *
   3493  * \sa
   3494  */
   3495 void TWD_EnableInterrupts (TI_HANDLE hTWD);
   3496 /** @ingroup Control
   3497  * \brief	Translate host to FW time (Usec)
   3498  *
   3499  * \param  hTWD 	 - TWD module object handle
   3500  * \param  uHostTime - The host time in MS to translate
   3501  *
   3502  * \return FW Time in Usec
   3503  *
   3504  * \par Description
   3505  *
   3506  * \sa
   3507  */
   3508 TI_UINT32 TWD_TranslateToFwTime (TI_HANDLE hTWD, TI_UINT32 uHostTime);
   3509 /** @ingroup BSS
   3510  * \brief Get TWD HT Capabilities
   3511  *
   3512  * \param hTWD 					- TWD module object handle
   3513  * \param  pTwdHtCapabilities  	- Pointer read structure Output
   3514  * \return TI_OK
   3515  *
   3516  * \par Description
   3517  *
   3518  *
   3519  * \sa
   3520  */
   3521 void TWD_GetTwdHtCapabilities (TI_HANDLE hTWD, TTwdHtCapabilities **pTwdHtCapabilities);
   3522 #ifdef TI_DBG
   3523 /** @ingroup Measurement
   3524  * \brief Prints Scan Server Debug status
   3525  *
   3526  * \param  hTWD         - TWD module object handle
   3527  * \return TI_OK on success or TI_NOK on failure
   3528  *
   3529  * \par Description
   3530  *
   3531  * \sa
   3532  */
   3533 TI_STATUS TWD_PrintMacServDebugStatus (TI_HANDLE hTWD);
   3534 
   3535 /** @ingroup Test
   3536  * \brief Prints Tx Info
   3537  *
   3538  * \param  hTWD         - TWD module object handle
   3539  * \param  ePrintInfo   - Information type
   3540  * \return TI_OK on success or TI_NOK on failure
   3541  *
   3542  * \par Description
   3543  * Call the requested print function - used for Debug Test
   3544  *
   3545  * \sa
   3546  */
   3547 TI_STATUS TWD_PrintTxInfo (TI_HANDLE hTWD, ETwdPrintInfoType ePrintInfo);
   3548 #endif
   3549 
   3550 /*-----*/
   3551 /* Get */
   3552 /*-----*/
   3553 
   3554 /** @ingroup Control
   3555  * \brief Get number of Commands in CMD Queue
   3556  *
   3557  * \param  hTWD         - TWD module object handle
   3558  * \return Maximum Number of Commands currently in CMD Queue
   3559  *
   3560  * \par Description
   3561  *
   3562  * \sa
   3563  */
   3564 TI_UINT32 TWD_GetMaxNumberOfCommandsInQueue (TI_HANDLE hTWD);
   3565 /** @ingroup Power_Management
   3566  * \brief Get Power Save Status
   3567  *
   3568  * \param  hTWD         		- TWD module object handle
   3569  * \return TI_OK on success or TI_NOK on failure
   3570  *
   3571  * \par Description
   3572  *
   3573  * \sa
   3574  */
   3575 TI_BOOL TWD_GetPsStatus (TI_HANDLE hTWD);
   3576 
   3577 
   3578 /** @ingroup Control
   3579  * \brief  Get FW Information
   3580  *
   3581  * \param  hTWD    	- TWD module object handle
   3582  * \return TFwInfo 	- Pointer to Output FW Information Structure
   3583  *
   3584  * \par Description
   3585  * Gets the TFwInfo pointer
   3586  *
   3587  * \sa TFwInfo
   3588  */
   3589 TFwInfo* TWD_GetFWInfo (TI_HANDLE hTWD);
   3590 /** @ingroup BSS
   3591  * \brief	Get Group Address Table
   3592  *
   3593  * \param  hTWD    			- TWD module object handle
   3594  * \param  pEnabled  		- Pointer to Output Indicatore if MAC Address Filter is Enabled
   3595  * \param  pNumGroupAddrs   - Pointer to Output Number of Group Address
   3596  * \param  pGroupAddr   	- Pointer to Output Group Address Table
   3597  * \return TI_OK on success or TI_NOK on failure
   3598  *
   3599  * \par Description
   3600  *
   3601  * \sa TWD_WriteMib, TMacAddr
   3602  */
   3603 TI_STATUS TWD_GetGroupAddressTable (TI_HANDLE hTWD, TI_UINT8* pEnabled, TI_UINT8* pNumGroupAddrs, TMacAddr *pGroupAddr);
   3604 /** @ingroup Control
   3605  * \brief Read Memory
   3606  *
   3607  * \param hTWD 			- TWD module object handle
   3608  * \param pMemDebug     - Pointer to read Output
   3609  * \param fCb			- Pointer to function Callback
   3610  * \param hCb			- Handle to function Callback Parameters
   3611  * \return TI_OK on success or TI_NOK on failure
   3612  *
   3613  * \par Description
   3614  *
   3615  * \sa
   3616  */
   3617 TI_STATUS TWD_readMem (TI_HANDLE hTWD, TFwDebugParams* pMemDebug, void* fCb, TI_HANDLE hCb);
   3618 /** @ingroup Control
   3619  * \brief Write Memory
   3620  *
   3621  * \param hTWD 			- TWD module object handle
   3622  * \param pMemDebug     - Pointer to write Input
   3623  * \param fCb			- Pointer to function Callback
   3624  * \param hCb			- Handle to function Callback Parameters
   3625  * \return TI_OK on success or TI_NOK on failure
   3626  *
   3627  * \par Description
   3628  *
   3629  * \sa
   3630  */
   3631 TI_STATUS TWD_writeMem (TI_HANDLE hTWD, TFwDebugParams* pMemDebug, void* fCb, TI_HANDLE hCb);
   3632 
   3633 /** @ingroup Control
   3634  * \brief Check if addr is a valid memory address
   3635  *
   3636  * \param hTWD 			- TWD module object handle
   3637  * \param pMemDebug     - Pointer to addr & length
   3638  * \return TI_TRUE on success or TI_FALSE on failure
   3639  *
   3640  * \par Description
   3641  *
   3642  * \sa
   3643  */
   3644 TI_BOOL TWD_isValidMemoryAddr (TI_HANDLE hTWD, TFwDebugParams* pMemDebug);
   3645 
   3646 /** @ingroup Control
   3647  * \brief Check if addr is a valid register address
   3648  *
   3649  * \param hTWD 			- TWD module object handle
   3650  * \param pMemDebug     - Pointer to addr & length
   3651  * \return TI_TRUE on success or TI_FALSE on failure
   3652  *
   3653  * \par Description
   3654  *
   3655  * \sa
   3656  */
   3657 TI_BOOL TWD_isValidRegAddr (TI_HANDLE hTWD, TFwDebugParams* pMemDebug);
   3658 
   3659 /*-----*/
   3660 /* Set */
   3661 /*-----*/
   3662 
   3663 /** @ingroup Power_Management
   3664  * \brief Set Power Save Mode
   3665  *
   3666  * \param  hTWD         		- TWD module object handle
   3667  * \param  ePsMode       		- Power Save Mode
   3668  * \param  bSendNullDataOnExit  - Indicates whether to send NULL data when exiting driver mode
   3669  * \param  hPowerSaveCompleteCb - Handle to PS Complete CB Parameters Obj
   3670  * \param  fPowerSaveCompleteCb - The PS Complete CB function
   3671  * \param  fPowerSaveResponseCb - The PS Response CB function
   3672  * \return TI_OK on success or TI_NOK on failure
   3673  *
   3674  * \par Description
   3675  *
   3676  * \sa
   3677  */
   3678 TI_STATUS TWD_SetPsMode (TI_HANDLE hTWD,
   3679 						 E80211PsMode ePsMode,
   3680 						 TI_BOOL bSendNullDataOnExit,
   3681 						 TI_HANDLE hPowerSaveCompleteCb,
   3682 						 TPowerSaveCompleteCb fPowerSaveCompleteCb,
   3683 						 TPowerSaveResponseCb fPowerSaveResponseCb);
   3684 /** @ingroup Radio
   3685  * \brief Set Rate Modulation
   3686  *
   3687  * \param  hTWD         - TWD module object handle
   3688  * \param  rate         - Rate Modulation Value
   3689  * \return TRUE if Power Service State is Pwer Save, FALSE otherwise
   3690  *
   3691  * \par Description
   3692  *
   3693  * \sa
   3694  */
   3695 TI_STATUS TWD_SetNullRateModulation (TI_HANDLE hTWD, TI_UINT16 rate);
   3696 /** @ingroup Radio
   3697  * \brief	Set Radio Band
   3698  *
   3699  * \param  hTWD    			- TWD module object handle
   3700  * \param  eRadioBand  		- Radio Band Type
   3701  * \return TI_OK on success or TI_NOK on failure
   3702  *
   3703  * \par Description
   3704  *
   3705  * \sa
   3706  */
   3707 TI_STATUS TWD_SetRadioBand (TI_HANDLE hTWD, ERadioBand eRadioBand);
   3708 /** @ingroup Data_Path
   3709  * \brief	Set Security Sequance Number
   3710  *
   3711  * \param  hTWD    				- TWD module object handle
   3712  * \param  securitySeqNumLsByte - LS Byte of Security Sequance Number
   3713  * \return TI_OK on success or TI_NOK on failure
   3714  *
   3715  * \par Description
   3716  * Update the TKIP/AES sequence-number according to the Tx data packet security-sequance-number
   3717  * Note: The FW always provides the last used sequance-number so no need to check if the current
   3718  * packet is data and WEP is on
   3719  *
   3720  * \sa
   3721  */
   3722 TI_STATUS TWD_SetSecuritySeqNum (TI_HANDLE hTWD, TI_UINT8 securitySeqNumLsByte);
   3723 /** @ingroup BSS
   3724  * \brief Update DTIM & TBTT
   3725  *
   3726  * \param  hTWD         	- TWD module object handle
   3727  * \param  uDtimPeriod     	- DTIM period in number of beacons
   3728  * \param  uBeaconInterval 	- Beacon perios in TUs (1024 msec)
   3729  * \return void
   3730  *
   3731  * \par Description
   3732  * Update DTIM and Beacon periods for scan timeout calculations
   3733  *
   3734  * \sa
   3735  */
   3736 void TWD_UpdateDtimTbtt (TI_HANDLE hTWD, TI_UINT8 uDtimPeriod, TI_UINT16 uBeaconInterval);
   3737 
   3738 /*---------*/
   3739 /* Command */
   3740 /*---------*/
   3741 
   3742 
   3743 /** @ingroup Measurement
   3744  * \brief  Set Split scan time out
   3745  *
   3746  * \param hTWD 			- TWD module object handle
   3747  * \param  uTimeOut   	- Scan Time Out
   3748  * \return TI_OK on success or TI_NOK on failure
   3749  *
   3750  * \par Description
   3751  * Set Triggered scan time out per channel
   3752  *
   3753  * \sa
   3754  */
   3755 TI_STATUS TWD_CmdSetSplitScanTimeOut (TI_HANDLE hTWD, TI_UINT32 uTimeOut);
   3756 /** @ingroup BSS
   3757  * \brief  Join BSS
   3758  *
   3759  * \param hTWD 				- TWD module object handle
   3760  * \param  pJoinBssParams   - Pointer to Join BSS Input parameters structure
   3761  * \return TI_OK on success or TI_NOK on failure
   3762  *
   3763  * \par Description
   3764  *
   3765  * \sa
   3766  */
   3767 TI_STATUS TWD_CmdJoinBss (TI_HANDLE hTWD, TJoinBss *pJoinBssParams);
   3768 /** @ingroup Control
   3769  * \brief  Command Template
   3770  *
   3771  * \param hTWD 				- TWD module object handle
   3772  * \param  pTemplateParams  - Pointer to Input Template Parameters Structure
   3773  * \param  fCb  			- Pointer to Command Callback Function
   3774  * \param  hCb  			- Handle to Command Callback Function Obj. Parameters
   3775  * \return TI_OK on success or TI_NOK on failure
   3776  *
   3777  * \par Description
   3778  * Sets a template to the FW
   3779  *
   3780  * \sa
   3781  */
   3782 /* 6.1.08 - for future WHA measurement command */
   3783 TI_STATUS TWD_CmdTemplate (TI_HANDLE hTWD, TSetTemplate *pTemplateParams, void *fCb, TI_HANDLE hCb);
   3784 /** @ingroup Data_Path
   3785  * \brief  Enable Tx path
   3786  *
   3787  * \param  hTWD     	- TWD module object handle
   3788  * \param  channel     	- Channel Number
   3789  * \return TI_OK on success or TI_NOK on failure
   3790  *
   3791  * \par Description
   3792  * Enable tx path on the hardware
   3793  *
   3794  * \sa
   3795  */
   3796 TI_STATUS TWD_CmdEnableTx (TI_HANDLE hTWD, TI_UINT8 channel);
   3797 /** @ingroup Data_Path
   3798  * \brief  Disable Tx path
   3799  *
   3800  * \param  hTWD     	- TWD module object handle
   3801  * \return TI_OK on success or TI_NOK on failure
   3802  *
   3803  * \par Description
   3804  *
   3805  * \sa
   3806  */
   3807 TI_STATUS TWD_CmdDisableTx (TI_HANDLE hTWD);
   3808 /** @ingroup Measurement
   3809  * \brief  Command Noise Histogram
   3810  *
   3811  * \param  hTWD     		- TWD module object handle
   3812  * \param  pNoiseHistParams - Pointer Input Noise Histogram Parameters:
   3813  * 							  holds Start/Stop Noise Histogram Measure Indication,
   3814  * 							  Sample Interval & Sample Ranges
   3815  * \return TI_OK on success or TI_NOK on failure
   3816  *
   3817  * \par Description
   3818  * Send a Start/Stop Noise Histogram Measure Command to the FW with measure parameters
   3819  *
   3820  * \sa	TNoiseHistogram
   3821  */
   3822 TI_STATUS TWD_CmdNoiseHistogram (TI_HANDLE hTWD, TNoiseHistogram *pNoiseHistParams);
   3823 
   3824 /** @ingroup Radio
   3825  * \brief  Command Switch Channel
   3826  *
   3827  * \param  hTWD    				- TWD module object handle
   3828  * \param  pSwitchChannelCmd    - Pointer to Switch Channel Parameters Structure
   3829  * \return TI_OK on success or TI_NOK on failure
   3830  *
   3831  * \par Description
   3832  *
   3833  * \sa TSwitchChannelParams
   3834  */
   3835 TI_STATUS TWD_CmdSwitchChannel (TI_HANDLE hTWD, TSwitchChannelParams *pSwitchChannelCmd);
   3836 /** @ingroup Radio
   3837  * \brief  Command Switch Channel Cancel
   3838  *
   3839  * \param  hTWD    		- TWD module object handle
   3840  * \param  channel    	- Channek Number
   3841  * \return TI_OK on success or TI_NOK on failure
   3842  *
   3843  * \par Description
   3844  *
   3845  * \sa
   3846  */
   3847 TI_STATUS TWD_CmdSwitchChannelCancel (TI_HANDLE hTWD, TI_UINT8 channel);
   3848 /** @ingroup Control
   3849  * \brief  FW Disconnect
   3850  *
   3851  * \param  hTWD    	- TWD module object handle
   3852  * \return TI_OK on success or TI_NOK on failure
   3853  *
   3854  * \par Description
   3855  *
   3856  * \sa
   3857  */
   3858 TI_STATUS TWD_CmdFwDisconnect (TI_HANDLE hTWD, DisconnectType_e uDisconType, TI_UINT16 uDisconReason);
   3859 /** @ingroup Measurement
   3860  * \brief  Start Measurement Command
   3861  *
   3862  * \param  hTWD    				- TWD module object handle
   3863  * \param  uDisconReason		- 2 bytes of disconnect reason to be use in deauth/disassoc frmaes
   3864  * \param  uDisconType    		- Immediate (dont send frames) or send Deauth or send Disassoc frmae
   3865  * \return TI_OK on success or TI_NOK on failure
   3866  *
   3867  * \par Description
   3868  * send Command for start measurement to FW
   3869  *
   3870  * \sa TMeasurementParams
   3871  */
   3872 TI_STATUS TWD_CmdMeasurement (TI_HANDLE hTWD,
   3873 							  TMeasurementParams *pMeasurementParams,
   3874 							  void *fCommandResponseCb,
   3875 							  TI_HANDLE hCb);
   3876 /** @ingroup Measurement
   3877  * \brief  Stop Measurement Command
   3878  *
   3879  * \param  hTWD    	- TWD module object handle
   3880  * \param  fCb  	- Pointer to Callback Function
   3881  * \param  hCb    	- Handle to Callback Function Object Parameters
   3882  * \return TI_OK on success or TI_NOK on failure
   3883  *
   3884  * \par Description
   3885  * send Command for stop measurement to FW
   3886  *
   3887  * \sa
   3888  */
   3889 TI_STATUS TWD_CmdMeasurementStop (TI_HANDLE hTWD, void* fCb, TI_HANDLE hCb);
   3890 /** @ingroup UnKnown
   3891  * \brief  AP Discovery
   3892  *
   3893  * \param  hTWD    				- TWD module object handle
   3894  * \param  pApDiscoveryParams  	- Pointer to Input AP Discovery Parameters Structure
   3895  * \return TI_OK on success or TI_NOK on failure
   3896  *
   3897  * \par Description
   3898  *
   3899  * \sa
   3900  */
   3901 TI_STATUS TWD_CmdApDiscovery (TI_HANDLE hTWD, TApDiscoveryParams *pApDiscoveryParams);
   3902 /** @ingroup UnKnown
   3903  * \brief	AP Discovery Stop
   3904  *
   3905  * \param  hTWD    				- TWD module object handle
   3906  * \return TI_OK on success or TI_NOK on failure
   3907  *
   3908  * \par Description
   3909  *
   3910  * \sa
   3911  */
   3912 TI_STATUS TWD_CmdApDiscoveryStop (TI_HANDLE hTWD);
   3913 
   3914 /** @ingroup Control
   3915  * \brief	Helth Check
   3916  *
   3917  * \param  hTWD    			- TWD module object handle
   3918  * \return TI_OK on success or TI_NOK on failure
   3919  *
   3920  * \par Description
   3921  * Trigger the FW health test command and wait for results
   3922  *
   3923  * \sa
   3924  */
   3925 TI_STATUS TWD_CmdHealthCheck (TI_HANDLE hTWD);
   3926 /** @ingroup UnKnown
   3927  * \brief  AP Discovery
   3928  *
   3929  * \param  hTWD    		- TWD module object handle
   3930  * \param  staState  	- stat of the station (CONNECTED)
   3931  * \return TI_OK on success or TI_NOK on failure
   3932  *
   3933  * \par Description
   3934  *
   3935  * \sa
   3936  */
   3937 TI_STATUS TWD_CmdSetStaState (TI_HANDLE hTWD, TI_UINT8 staState, void *fCb, TI_HANDLE hCb);
   3938 
   3939 /*-----------*/
   3940 /* Configure */
   3941 /*-----------*/
   3942 
   3943 /** @ingroup UnKnown
   3944  * \brief  Configure ARP table
   3945  *
   3946  * \param hTWD 			- TWD module object handle
   3947  * \param  tIpAddr   	- IP Address Input Buffer
   3948  * \param  bEnabled   	- Indicates if ARP filtering is Enabled (1) or Disabled (0)
   3949  * \param  eIpVer   	- IP Version
   3950  * \return TI_OK on success or TI_NOK on failure
   3951  *
   3952  * \par Description
   3953  * Configure ARP IP Address table
   3954  *
   3955  * \sa
   3956  */
   3957 TI_STATUS TWD_CfgArpIpAddrTable (TI_HANDLE hTWD,
   3958 								 TIpAddr tIpAddr,
   3959 								 TI_BOOL bEnabled,
   3960 								 EIpVer eIpVer);
   3961 /** @ingroup BSS
   3962  * \brief	Configure Group Address Table
   3963  *
   3964  * \param  hTWD    			- TWD module object handle
   3965  * \param  uNumGroupAddrs  	- Number of Group Address
   3966  * \param  pGroupAddr   	- Pointer to Input Group Address Table
   3967  * \param  bEnabled    		- Indicates if MAC Address Filter is Enabled
   3968  * \return TI_OK on success or TI_NOK on failure
   3969  *
   3970  * \par Description
   3971  *
   3972  * \sa TWD_WriteMib
   3973  */
   3974 TI_STATUS TWD_CfgGroupAddressTable (TI_HANDLE hTWD,
   3975 									TI_UINT8 uNumGroupAddrs,
   3976 									TMacAddr *pGroupAddr,
   3977 									TI_BOOL bEnabled);
   3978 /** @ingroup Data_Path
   3979  * \brief  Configure RX Filters
   3980  *
   3981  * \param hTWD 				- TWD module object handle
   3982  * \param  uRxConfigOption  - RX Configuration Option
   3983  * \param  uRxFilterOption 	- RX Filter Option
   3984  * \return TI_OK on success or TI_NOK on failure
   3985  *
   3986  * \par Description
   3987  *
   3988  * \sa	TWD_WriteMib
   3989  */
   3990 TI_STATUS TWD_CfgRx (TI_HANDLE hTWD, TI_UINT32 uRxConfigOption, TI_UINT32 uRxFilterOption);
   3991 /** @ingroup UnKnown
   3992  * \brief  Configure Packet Detection Threshold
   3993  *
   3994  * \param hTWD 			- TWD module object handle
   3995  * \param  threshold 	- Threshold Value
   3996  * \return TI_OK on success or TI_NOK on failure
   3997  *
   3998  * \par Description
   3999  *
   4000  * \sa ERate
   4001  */
   4002 TI_STATUS TWD_CfgPacketDetectionThreshold (TI_HANDLE hTWD, TI_UINT32 threshold);
   4003 /** @ingroup Radio
   4004  * \brief  Configure Slot Time
   4005  *
   4006  * \param hTWD 				- TWD module object handle
   4007  * \param  eSlotTimeVal 	- Slot Time Value
   4008  * \return TI_OK on success or TI_NOK on failure
   4009  *
   4010  * \par Description
   4011  *
   4012  * \sa
   4013  */
   4014 TI_STATUS TWD_CfgSlotTime (TI_HANDLE hTWD, ESlotTime eSlotTimeVal);
   4015 /** @ingroup Radio
   4016  * \brief  Configure Preamble
   4017  *
   4018  * \param hTWD 			- TWD module object handle
   4019  * \param  ePreamble 	- Preamble Value
   4020  * \return TI_OK on success or TI_NOK on failure
   4021  *
   4022  * \par Description
   4023  *
   4024  * \sa
   4025  */
   4026 TI_STATUS TWD_CfgPreamble (TI_HANDLE hTWD, EPreamble ePreamble);
   4027 /** @ingroup Power_Management
   4028  * \brief  Configure Beacon Filter State
   4029  *
   4030  * \param  hTWD     				- TWD module object handle
   4031  * \param  uBeaconFilteringStatus   - Beacon Filtering Status. Indicates whether the filter is enabled:
   4032  * 									  1 - enabled, 0 - disabled
   4033  * \param  uNumOfBeaconsToBuffer 	- Determines the number of beacons without the unicast TIM bit set,
   4034  * 									  that the firmware buffers before signaling the host about ready frames.
   4035  *									  When thi snumber is set to 0 and the filter is enabled, beacons without
   4036  *									  the unicast TIM bit set are dropped.
   4037  * \return TI_OK on success or TI_NOK on failure
   4038  *
   4039  * \par Description
   4040  * Configure Beacon Filter State to the FW
   4041  *
   4042  * \sa
   4043  */
   4044 TI_STATUS TWD_CfgBeaconFilterOpt (TI_HANDLE hTWD, TI_UINT8 uBeaconFilteringStatus, TI_UINT8 uNumOfBeaconsToBuffer);
   4045 /** @ingroup Power_Management
   4046  * \brief  Configure Beacon Filter Table
   4047  *
   4048  * \param  hTWD     	- TWD module object handle
   4049  * \param  uNumOfIe   	- The number of IE's in the table
   4050  * \param  pIeTable 	- Pointer to Input IE Table
   4051  * \param  uIeTableSize - Size of Input IE Table
   4052  * \return TI_OK on success or TI_NOK on failure
   4053  *
   4054  * \par Description
   4055  * Configure Beacon Filter Table to the FW
   4056  *
   4057  * \sa
   4058  */
   4059 TI_STATUS TWD_CfgBeaconFilterTable (TI_HANDLE hTWD, TI_UINT8 uNumOfIe, TI_UINT8 *pIeTable, TI_UINT8 uIeTableSize);
   4060 /** @ingroup Power_Management
   4061  * \brief  Configure Wake Up Condition
   4062  *
   4063  * \param  hTWD     		- TWD module object handle
   4064  * \param  pPowerMgmtConfig	- Pointer to Input Power Management Configuration Parameters
   4065  * \return TI_OK on success or TI_NOK on failure
   4066  *
   4067  * \par Description
   4068  * Configure Power Manager's Wake Up Condition
   4069  *
   4070  * \sa
   4071  */
   4072 TI_STATUS TWD_CfgWakeUpCondition (TI_HANDLE hTWD, TPowerMgmtConfig *pPowerMgmtConfig);
   4073 /** @ingroup UnKnown
   4074  * \brief  Configure Beacon Broadcast Options
   4075  *
   4076  * \param  hTWD     		- TWD module object handle
   4077  * \param  pPowerMgmtConfig	- Pointer to Input Power Management Configuration Parameters Structure
   4078  * 							  The Following Field should be filled:
   4079  * 							  pPowerMgmtConfig->BcnBrcOptions.BeaconRxTimeout
   4080  * 							  pPowerMgmtConfig->BcnBrcOptions.BroadcastRxTimeout
   4081  * 							  pPowerMgmtConfig->BcnBrcOptions.RxBroadcastInPs - if set, enables receive of broadcast packets in Power-Save mode
   4082  * 							  pPowerMgmtConfig->ConsecutivePsPollDeliveryFailureThreshold - No answer after Ps-Poll work-around
   4083  * \return TI_OK on success or TI_NOK on failure
   4084  *
   4085  * \par Description
   4086  * Configure Power Manager's Beacon Broadcast Options:
   4087  * Beacon RX time Out, Broadcast RX Timeout, RX Broadcast In Power Save,
   4088  * Consecutive Power Save Poll Delivery Failure Threshold
   4089  *
   4090  *
   4091  * \sa TPowerMgmtConfig, TBcnBrcOptions
   4092  */
   4093 TI_STATUS TWD_CfgBcnBrcOptions (TI_HANDLE hTWD, TPowerMgmtConfig *pPowerMgmtConfig);
   4094 
   4095 /** @ingroup BSS
   4096  * \brief  Configure Max TX Retry
   4097  *
   4098  * \param  hTWD    				- TWD module object handle
   4099  * \param  pRoamingTriggerCmd   - Pointer to Input Configuration Parameters Structure
   4100  * 							  	  The Following Field should be filled:
   4101  * 								  pRoamingTriggerCmd->maxTxRetry
   4102  * \return TI_OK on success or TI_NOK on failure
   4103  *
   4104  * \par Description
   4105  * Configure the Max Tx Retry parameters
   4106  *
   4107  * \sa
   4108  */
   4109 TI_STATUS TWD_CfgMaxTxRetry (TI_HANDLE hTWD, TRroamingTriggerParams *pRoamingTriggerCmd);
   4110 /** @ingroup BSS
   4111  * \brief  Configure Connection Monitoring
   4112  *
   4113  * \param  hTWD    				- TWD module object handle
   4114  * \param  pRoamingTriggerCmd   - Pointer to Input Configuration Parameters Structure
   4115  * 							  	  The Following Field should be filled:
   4116  * 								  pRoamingTriggerCmd->BssLossTimeout
   4117  * 								  pRoamingTriggerCmd->TsfMissThreshold
   4118  * \return TI_OK on success or TI_NOK on failure
   4119  *
   4120  * \par Description
   4121  * Configure the Bss Lost Timeout & TSF miss threshold Parameters
   4122  *
   4123  * \sa
   4124  */
   4125 TI_STATUS TWD_CfgConnMonitParams (TI_HANDLE hTWD, TRroamingTriggerParams *pRoamingTriggerCmd);
   4126 /** @ingroup Power_Management
   4127  * \brief	Configure Sleep Auth
   4128  *
   4129  * \param  hTWD    			- TWD module object handle
   4130  * \param  eMinPowerPolicy  - Minimum Power Policy Type
   4131  * \return TI_OK on success or TI_NOK on failure
   4132  *
   4133  * \par Description
   4134  * Configure the minimum power policy to the FW
   4135  *
   4136  * \sa EPowerPolicy
   4137  */
   4138 TI_STATUS TWD_CfgSleepAuth (TI_HANDLE hTWD, EPowerPolicy eMinPowerPolicy);
   4139 /** @ingroup Control
   4140  * \brief	Configure MAC Clock
   4141  *
   4142  * \param  hTWD    		- TWD module object handle
   4143  * \param  uMacClock    - MAC Clock value
   4144  * \return TI_OK on success or TI_NOK on failure
   4145  *
   4146  * \par Description
   4147  *
   4148  * \sa
   4149  */
   4150 TI_STATUS TWD_CfgMacClock (TI_HANDLE hTWD, TI_UINT32 uMacClock);
   4151 /** @ingroup Control
   4152  * \brief	Configure ARM Clock
   4153  *
   4154  * \param  hTWD    		- TWD module object handle
   4155  * \param  uArmClock    - ARM Clock value
   4156  * \return TI_OK on success or TI_NOK on failure
   4157  *
   4158  * \par Description
   4159  *
   4160  * \sa
   4161  */
   4162 TI_STATUS TWD_CfgArmClock (TI_HANDLE hTWD, TI_UINT32 uArmClock);
   4163 /** @ingroup Data_Path
   4164  * \brief	Configure RX Data Filter
   4165  *
   4166  * \param  hTWD    				- TWD module object handle
   4167  * \param  index    			- Index of the Rx Data filter
   4168  * \param  command    			- Command: Add/remove the filter
   4169  * \param  eAction    			- Action to take when packets match the pattern
   4170  * \param  uNumFieldPatterns   	- Number of field patterns in the filter
   4171  * \param  uLenFieldPatterns    - Length of the field pattern series
   4172  * \param  pFieldPatterns    	- Series of field patterns
   4173  * \return TI_OK on success or TI_NOK on failure
   4174  *
   4175  * \par Description
   4176  * Add/remove Rx Data filter information element
   4177  *
   4178  * \sa
   4179  */
   4180 TI_STATUS TWD_CfgRxDataFilter (TI_HANDLE hTWD,
   4181 							   TI_UINT8 index,
   4182 							   TI_UINT8 command,
   4183 							   filter_e eAction,
   4184 							   TI_UINT8 uNumFieldPatterns,
   4185 							   TI_UINT8 uLenFieldPatterns,
   4186 							   TI_UINT8 *pFieldPatterns);
   4187 /** @ingroup Data_Path
   4188  * \brief	Configure Enable RX Data Filter
   4189  *
   4190  * \param  hTWD    			- TWD module object handle
   4191  * \param  bEnabled      	- Indicates if Rx data filtering is enabled or Disabled
   4192  * 							  (0: data filtering disabled, Otherwise: enabled)
   4193  * \param  eDefaultAction   - The default action taken on non-matching packets
   4194  * \return TI_OK on success or TI_NOK on failure
   4195  *
   4196  * \par Description
   4197  * Configure Enable/Disable RX Data Filter, and which default action to perform if it is enabled
   4198  *
   4199  * \sa
   4200  */
   4201 TI_STATUS TWD_CfgEnableRxDataFilter (TI_HANDLE hTWD, TI_BOOL bEnabled, filter_e eDefaultAction);
   4202 /** @ingroup BSS
   4203  * \brief	Configure RRSSI/SNR Trigger parameters
   4204  *
   4205  * \param  hTWD    			- TWD module object handle
   4206  * \param  pRssiSnrTrigger  - Pointer to RRSSI/SNR Input parameter Structure
   4207  * \return TI_OK on success or TI_NOK on failure
   4208  *
   4209  * \par Description
   4210  *
   4211  * \sa
   4212  */
   4213 TI_STATUS TWD_CfgRssiSnrTrigger (TI_HANDLE hTWD, RssiSnrTriggerCfg_t* pRssiSnrTrigger);
   4214 /** @ingroup QoS
   4215  * \brief	Configure AC parameters
   4216  *
   4217  * \param  hTWD    			- TWD module object handle
   4218  * \param  pAcQosParams  	- Pointer to Input AC Quality Of Service Parameters Structure
   4219  * 								Fields that should be filled:
   4220  * 								pAcQosParams->ac
   4221  * 								pAcQosParams->aifsn
   4222  * 								pAcQosParams->cwMax
   4223  * 								pAcQosParams->cwMin
   4224  * 								pAcQosParams->txopLimit
   4225  * \param  fCb      		- Pointer to Command CB Function
   4226  * \param  hCb      		- Handle to Command CB Function Obj Parameters
   4227  * \return TI_OK on success or TI_NOK on failure
   4228  *
   4229  * \par Description
   4230  *
   4231  * \sa
   4232  */
   4233 TI_STATUS TWD_CfgAcParams (TI_HANDLE hTWD, TAcQosParams *pAcQosParams, void *fCb, TI_HANDLE hCb);
   4234 /** @ingroup QoS
   4235  * \brief	Configure Power Save RX Streaming
   4236  *
   4237  * \param  hTWD    			- TWD module object handle
   4238  * \param  pPsRxStreaming  	- Pointer to Input Power Save RX Straeming Parameters Structure
   4239  * 								Fields that should be filled:
   4240  * 								pPsRxStreaming->uTid
   4241  * 								pPsRxStreaming->bEnabled
   4242  * 								pPsRxStreaming->uStreamPeriod
   4243  * 								pPsRxStreaming->uTxTimeout
   4244  * \param  fCb      		- Pointer to Command CB Function
   4245  * \param  hCb      		- Handle to Command CB Function Obj Parameters
   4246  * \return TI_OK on success or TI_NOK on failure
   4247  *
   4248  * \par Description
   4249  *
   4250  * \sa TPsRxStreaming
   4251  */
   4252 TI_STATUS TWD_CfgPsRxStreaming (TI_HANDLE hTWD, TPsRxStreaming *pPsRxStreaming, void *fCb, TI_HANDLE hCb);
   4253 /** @ingroup Power_Management
   4254  * \brief	Configure BET
   4255  *
   4256  * \param  hTWD    				- TWD module object handle
   4257  * \param  Enable    			- 0: disable BET, Otherwirs: Enable BET
   4258  * \param  MaximumConsecutiveET - Max number of consecutive beacons that may be early terminated
   4259  * \return TI_OK on success or TI_NOK on failure
   4260  *
   4261  * \par Description
   4262  *
   4263  * \sa
   4264  */
   4265 TI_STATUS TWD_CfgBet (TI_HANDLE hTWD, TI_UINT8 Enable, TI_UINT8 MaximumConsecutiveET);
   4266 /** @ingroup UnKnown
   4267  * \brief  Configure Keep Alive
   4268  *
   4269  * \param hTWD 				- TWD module object handle
   4270  * \param  pKeepAliveParams - Pointer to Keep Alive parameters structure
   4271  * \return TI_OK on success or TI_NOK on failure
   4272  *
   4273  * \par Description
   4274  * Configures the keep-alive paramters
   4275  *
   4276  * \sa
   4277  */
   4278 TI_STATUS TWD_CfgKeepAlive (TI_HANDLE hTWD, TKeepAliveParams *pKeepAliveParams);
   4279 /** @ingroup Power_Management
   4280  * \brief  Configure Keep Alive Enable/Disable flag
   4281  *
   4282  * \param hTWD 			- TWD module object handle
   4283  * \param  enaDisFlag  	- Indicates whether to Enable (TI_TRUE) or Disable Keep Alive
   4284  * \return TI_OK on success or TI_NOK on failure
   4285  *
   4286  * \par Description
   4287  *
   4288  * \sa
   4289  */
   4290 TI_STATUS TWD_CfgKeepAliveEnaDis (TI_HANDLE hTWD, TI_UINT8 enaDisFlag);
   4291 /** @ingroup Data_Path
   4292  * \brief	Configure Set BA Initiator
   4293  *
   4294  * \param  hTWD    				- TWD module object handle
   4295  * \param  uTid 				- TID number
   4296  * \param  uState 				- Policy : Enable / Disable
   4297  * \param  tRa 					- Mac address of: SA as receiver / RA as initiator
   4298  * \param  uWinSize 			- windows size in number of packet
   4299  * \param  uInactivityTimeout 	- as initiator inactivity timeout in time units(TU) of 1024us / as receiver reserved
   4300  * \return TI_OK on success or TI_NOK on failure
   4301  *
   4302  * \par Description
   4303  * configure BA session initiator parameters setting in the FW
   4304  * called after join in order to init the parameters for negotiating BA sessions as initiator.
   4305  * Parameters initialized: RA, TID, WinSize, Inactivity Timeout and state = Enable/Disable.
   4306  * In case the host sends a broadcast address as RA the FW is allowed to Set or Deleted BA sessions
   4307  * to any receiver for that TID.
   4308  * In case of disassociate the FW allowed to establish BA session just after get that command.
   4309  * That command will not need any respond from the FW. In case DELBA send to STA or from the
   4310  * STA as initiator the FW doesn't send event to the host
   4311  *
   4312  * \sa
   4313  */
   4314 TI_STATUS TWD_CfgSetBaInitiator (TI_HANDLE hTWD,
   4315 								 TI_UINT8 uTid,
   4316 								 TI_UINT8 uState,
   4317 								 TMacAddr tRa,
   4318 								 TI_UINT16 uWinSize,
   4319 								 TI_UINT16 uInactivityTimeout);
   4320 /** @ingroup Data_Path
   4321  * \brief	Configure Set BA Receiver
   4322  *
   4323  * \param  hTWD    				- TWD module object handle
   4324  * \param  uTid 				- TID number
   4325  * \param  uState 				- Policy : Enable / Disable
   4326  * \param  tRa 					- Mac address of: SA as receiver / RA as initiator
   4327  * \param  uWinSize 			- windows size in number of packet
   4328  * \return TI_OK on success or TI_NOK on failure
   4329  *
   4330  * \par Description
   4331  * configure BA session receiver parameters setting in the FW
   4332  * called after join in order to init the parameters for incoming BA session, as a responder.
   4333  * Parameters initialized: SA, TID, winSize and state = Enable/Disable.
   4334  * In case the host sends a broadcast address as SA the FW is allowed to Set/Deleted BA sessions
   4335  * to any sender for that TID.
   4336  * In case of disassociate the FW allowed to establish BA session just after get that command.
   4337  * The events of that command will respond via the RX path from the FW: ADDBA, DELBA, BAR packets.
   4338  *
   4339  * \sa
   4340  */
   4341 TI_STATUS TWD_CfgSetBaReceiver (TI_HANDLE hTWD,
   4342 								TI_UINT8 uTid,
   4343 								TI_UINT8 uState,
   4344 								TMacAddr tRa,
   4345 								TI_UINT16 uWinSize);
   4346 
   4347 /** @ingroup Data_Path
   4348  * \brief	Close all BA receiver sessions
   4349  *
   4350  * \param  hTWD    				- TWD module object handle
   4351  * \return None
   4352  *
   4353  * \par Description
   4354  * Close all BA receiver sessions and pass all packets in the TID queue to upper layer.
   4355  *
   4356  * \sa
   4357  */
   4358 void TWD_CloseAllBaSessions(TI_HANDLE hTWD);
   4359 
   4360 /** @ingroup BSS
   4361  * \brief	Set FW HT Capabilities
   4362  *
   4363  * \param  hTWD    				- TWD module object handle
   4364  * \param  pHtCapabilitiesIe 	- Pointer to string of HT capability IE unparsed
   4365  * \param  bAllowHtOperation 	- TI_TRUE: HT operation allowed, Otherwise: HT operation NOT allowed
   4366  * \return TI_OK on success or TI_NOK on failure
   4367  *
   4368  * \par Description
   4369  * Parse HT capability IE and set the current AP HT Capabilities to the FW
   4370  *
   4371  * \sa
   4372  */
   4373 TI_STATUS TWD_CfgSetFwHtCapabilities (TI_HANDLE hTWD,
   4374 									  Tdot11HtCapabilitiesUnparse *pHtCapabilitiesIe,
   4375 									  TI_BOOL bAllowHtOperation);
   4376 /** @ingroup BSS
   4377  * \brief Set FW HT Information
   4378  *
   4379  * \param  hTWD    				- TWD module object handle
   4380  * \param  pHtInformationIe 	- Pointer to string of HT information IE unparsed
   4381  * \return TI_OK on success or TI_NOK on failure
   4382  *
   4383  * \par Description
   4384  * Parse HT Information IE and set the current AP HT Information to the FW
   4385  *
   4386  * \sa
   4387  */
   4388 TI_STATUS TWD_CfgSetFwHtInformation (TI_HANDLE hTWD, Tdot11HtInformationUnparse *pHtInformationIe);
   4389 
   4390 
   4391 /** @ingroup UnKnown
   4392  * \brief Enable/Disabel burst mode
   4393  *
   4394  * \param  hTWD    				- TWD module object handle
   4395  * \param  bEnabled 	        - burst mode: Enable/Disable
   4396  * \return TI_OK
   4397  *
   4398  * \par Description
   4399  *
   4400  * \sa
   4401  */
   4402 TI_STATUS TWD_CfgBurstMode (TI_HANDLE hTWD, TI_BOOL bEnabled);
   4403 
   4404 /*-------------*/
   4405 /* Interrogate */
   4406 /*-------------*/
   4407 
   4408 /** @ingroup UnKnown
   4409  * \brief  Interrogate Roamming Statistics
   4410  *
   4411  * \param  hTWD     	- TWD module object handle
   4412  * \param  fCb          - Pointer to Command CB Function
   4413  * \param  hCb          - Handle to Command CB Function Obj Parameters
   4414  * \param  pCb          - Pointer to read parameters
   4415  * \return TI_OK on success or TI_NOK on failure
   4416  *
   4417  * \par Description
   4418  * Interrogate ACX Roamming Statistics
   4419  *
   4420  * \sa
   4421  */
   4422 TI_STATUS TWD_ItrRoammingStatisitics (TI_HANDLE hTWD, void *fCb, TI_HANDLE hCb, void *pCb);
   4423 /** @ingroup UnKnown
   4424  * \brief  Configure/Interrogate RSSI
   4425  *
   4426  * \param  hTWD    	- TWD module object handle
   4427  * \param  fCb      - Pointer to Command CB Function
   4428  * \param  hCb      - Handle to Command CB Function Obj Parameters
   4429  * \param  pCb      - Pointer to read parameters
   4430  * \return TI_OK on success or TI_NOK on failure
   4431  *
   4432  * \par Description
   4433  * Configure/Interrogate StationId information element to/from FW
   4434  * This information element specifies the MAC Address assigned to the STATION or AP.
   4435  * The RSSI is Configed to default value which is the permanent MAC address which
   4436  * is stored in the adaptor's non-volatile memory.
   4437  *
   4438  * \sa
   4439  */
   4440 TI_STATUS TWD_ItrRSSI (TI_HANDLE hTWD, void *fCb, TI_HANDLE hCb, void *pCb);
   4441 /** @ingroup UnKnown
   4442  * \brief	Interrogate Memory Map
   4443  *
   4444  * \param  hTWD    	- TWD module object handle
   4445  * \param  pMap    	- Pointer to Output Memory Map
   4446  * \param  fCb    	- Pointer to Callback Function
   4447  * \param  hCb    	- Handle to Callback Function Parameters Object
   4448  * \return TI_OK on success or TI_NOK on failure
   4449  *
   4450  * \par Description
   4451  * Interrogate Memory Map from FW
   4452  *
   4453  * \sa MemoryMap_t
   4454  */TI_STATUS TWD_ItrMemoryMap (TI_HANDLE hTWD, MemoryMap_t *pMap, void *fCb, TI_HANDLE hCb);
   4455 /** @ingroup UnKnown
   4456  * \brief	Interrogate Statistics
   4457  *
   4458  * \param  hTWD    	- TWD module object handle
   4459  * \param  fCb      - Pointer to Command CB Function
   4460  * \param  hCb      - Handle to Command CB Function Obj Parameters
   4461  * \param  pCb      - Pointer to read parameters
   4462  * \return TI_OK on success or TI_NOK on failure
   4463  *
   4464  * \par Description
   4465  *
   4466  * \sa
   4467  */
   4468 TI_STATUS TWD_ItrStatistics (TI_HANDLE hTWD, void *fCb, TI_HANDLE hCb, void *pCb);
   4469 /** @ingroup Data_Path
   4470  * \brief	Interrogate Data Filter Statistics
   4471  *
   4472  * \param  hTWD    	- TWD module object handle
   4473  * \param  fCb      - Pointer to Command CB Function
   4474  * \param  hCb      - Handle to Command CB Function Obj Parameters
   4475  * \param  pCb      - Pointer to read parameters
   4476  * \return TI_OK on success or TI_NOK on failure
   4477  *
   4478  * \par Description
   4479  *
   4480  * \sa
   4481  */TI_STATUS TWD_ItrDataFilterStatistics (TI_HANDLE hTWD, void *fCb, TI_HANDLE hCb, void *pCb);
   4482 
   4483 /*
   4484  * --------------------------------------------------------------
   4485  *	TNETW-Driver  Tx  API  Functions
   4486  * --------------------------------------------------------------
   4487  */
   4488 
   4489 /** @ingroup Data_Path
   4490  * \brief  TWD TX Control Block Allocation
   4491  *
   4492  * \param  hTWD   	- TWD module object handle
   4493  * \return Pointer to Control Block Entry on success or NULL on failure
   4494  *
   4495  * \par Description
   4496  * Use this function for Allocate a Control-Block for the packet Tx parameters and descriptor
   4497  *
   4498  * \sa
   4499  */
   4500 TTxCtrlBlk *TWD_txCtrlBlk_Alloc (TI_HANDLE hTWD);
   4501 /** @ingroup Data_Path
   4502  * \brief  TWD TX Control Block Free
   4503  *
   4504  * \param  hTWD   			- TWD module object handle
   4505  * \param  pCurrentEntry   	- Pointer to TX Control Block Entry to Free
   4506  * \return void
   4507  *
   4508  * \par Description
   4509  * Use this function for Free a Control-Block of packet Tx parameters and descriptor
   4510  *
   4511  * \sa
   4512  */
   4513 void TWD_txCtrlBlk_Free (TI_HANDLE hTWD, TTxCtrlBlk *pCurrentEntry);
   4514 /** @ingroup Data_Path
   4515  * \brief  TWD TX Control Get Pointer
   4516  *
   4517  * \param  hTWD   	- TWD module object handle
   4518  * \param  descId  	- Id of TX Control Block Descriptor
   4519  * \return Pointer to Control Block Entry on success or NULL on failure
   4520  *
   4521  * \par Description
   4522  * Use this function for Get a Pointer to a Control-Block of packet Tx parameters and descriptor
   4523  *
   4524  * \sa
   4525  */
   4526 TTxCtrlBlk *TWD_txCtrlBlk_GetPointer (TI_HANDLE hTWD, TI_UINT8 descId);
   4527 
   4528 /** @ingroup Data_Path
   4529  * \brief  Allocate Resources for TX HW Queue
   4530  *
   4531  * \param  hTWD   			- TWD module object handle
   4532  * \param  pTxCtrlBlk  		- The Tx packet control block
   4533  * \return see - ETxHwQueStatus
   4534  *
   4535  * \par Description
   4536  * Allocates Resources (HW-blocks number required) for TX HW Queue
   4537  *
   4538  * \sa
   4539  */
   4540 ETxHwQueStatus TWD_txHwQueue_AllocResources (TI_HANDLE hTWD, TTxCtrlBlk *pTxCtrlBlk);
   4541 
   4542 /** @ingroup Data_Path
   4543  * \brief  TX Xfer Send Packet
   4544  *
   4545  * \param  hTWD   			- TWD module object handle
   4546  * \param  pPktCtrlBlk   	- Pointer to TX Control Block Entry to Free
   4547  * \return see ETxnStatus
   4548  *
   4549  * \par Description
   4550  * Send Packet via TX Xfer
   4551  *
   4552  * \sa
   4553  */
   4554 ETxnStatus TWD_txXfer_SendPacket (TI_HANDLE hTWD, TTxCtrlBlk *pPktCtrlBlk);
   4555 /** @ingroup Control
   4556  * \brief  Watch Dog Expire Event
   4557  *
   4558  * \param  hTWD   			- TWD module object handle
   4559  * \return TI_OK on success or TI_NOK on failure
   4560  *
   4561  * \par Description
   4562  * This function handles the Event of Watch Dog Expire (FW stopped)
   4563  *
   4564  * \sa
   4565  */
   4566 TI_STATUS TWD_WdExpireEvent (TI_HANDLE hTWD);
   4567 /*
   4568  * --------------------------------------------------------------
   4569  *	BIT API Functions
   4570  * --------------------------------------------------------------
   4571  */
   4572 /** @ingroup Control
   4573  * \brief TWD Test Command Complete CB
   4574  *
   4575  * \param  Handle        	- handle to object
   4576  * \param  eStatus			- Status of Driver Test Performed
   4577  * \param  pTestCmdParams  	- Pointer to Output of Test Command Parameters
   4578  * \return void
   4579  *
   4580  * \par Description
   4581  * The function prototype for the BIT Test Command Complete CB
   4582  * Enables user to implement and use its own BIT Test Command Complete CB
   4583  * which will be called when Driver Test end
   4584  *
   4585  * \sa	TWDriverTest
   4586  */
   4587 typedef void (*TTestCmdCB)(TI_HANDLE Handle,
   4588 						   TI_STATUS eStatus,
   4589 						   TI_HANDLE pTestCmdParams);
   4590 /** @ingroup Control
   4591  * \brief TWD Test Command Complete CB
   4592  *
   4593  * \param  Handle        	- handle to object
   4594  * \param  eStatus			- Status of Driver Test Performed (Complete/Pending/Error)
   4595  * \param  pTestCmdParams  	- Pointer to Output of Test Command Parameters
   4596  * \return void
   4597  *
   4598  * \par Description
   4599  * The function implementation for the BIT Test Command Complete CB
   4600  *
   4601  * \sa
   4602  */
   4603 void TWDriverTestCB(TI_HANDLE Handle,
   4604 					TI_STATUS eStatus,
   4605 					TI_HANDLE pTestCmdParams);
   4606 /** @ingroup Control
   4607  * \brief TWD Driver Test
   4608  *
   4609  * \param  hTWD        		- handle to TWD object
   4610  * \param  eTestCmd			- Identifier of test Command to Perform
   4611  * \param  pTestCmdParams  	- Pointer to Input/Output Test Command Parameters
   4612  * \param  fCb  			- Test Command Complete CB
   4613  * \param  hCb	  			- Handle to Test Command Complete CB Parameters
   4614  * \return TI_OK on success or TI_NOK on failure
   4615  *
   4616  * \par Description
   4617  * The implementation of the BIT Test Command
   4618  *
   4619  * \sa
   4620  */
   4621 TI_STATUS TWDriverTest(TI_HANDLE hTWD,
   4622 					   TestCmdID_enum eTestCmd,
   4623 					   void* pTestCmdParams,
   4624 					   TTestCmdCB fCb,
   4625 					   TI_HANDLE hCb);
   4626 
   4627 
   4628 
   4629 /**
   4630  *  \brief TWD get FEM type
   4631  *  *
   4632  * \param  Handle        	- handle to object
   4633  * \return uint8
   4634  *
   4635  * \par Description
   4636  * The function return the Front end module that was read frm FW register *
   4637  * \sa
   4638  */
   4639 
   4640 TI_UINT8 TWD_GetFEMType (TI_HANDLE hTWD);
   4641 
   4642 
   4643 /**
   4644  *  \brief TWD end function of read radio state machine
   4645  *  *  *
   4646  * \param  Handle        	- handle to object
   4647  * \return void
   4648  *
   4649  * \par Description
   4650  * The function calling to HwInit call back function, after finish reading FEM registers *
   4651  * \sa
   4652  */
   4653 
   4654 void TWD_FinalizeFEMRead(TI_HANDLE hTWD);
   4655 void TWD_FinalizePolarityRead(TI_HANDLE hTWD);
   4656 
   4657 /** @ingroup Data_Path
   4658  * \brief  TWD_CfgBurstMode
   4659  *
   4660  * \param  hTWD   	- TWD module object handle
   4661  * \param  bEnabled  - is Burst mode enabled
   4662  * \return TI_OK
   4663  *
   4664  * \par Description
   4665  * Use this function to enable/disbale the burst mode
   4666  *
   4667  * \sa
   4668  */
   4669 TI_STATUS TWD_CfgBurstMode (TI_HANDLE hTWD, TI_BOOL bEnabled);
   4670 TI_STATUS TWD_SetRateMngDebug(TI_HANDLE hTWD, RateMangeParams_t *pRateMngParams);
   4671 TI_STATUS TWD_GetRateMngDebug(TI_HANDLE hTWD, RateMangeReadParams_t  *pParamInfo);
   4672 
   4673 #endif  /* TWDRIVER_H */
   4674