Home | History | Annotate | Download | only in FirmwareApi
      1 /****************************************************************************
      2 **+-----------------------------------------------------------------------+**
      3 **|                                                                       |**
      4 **| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved.      |**
      5 **| All rights reserved.                                                  |**
      6 **|                                                                       |**
      7 **| Redistribution and use in source and binary forms, with or without    |**
      8 **| modification, are permitted provided that the following conditions    |**
      9 **| are met:                                                              |**
     10 **|                                                                       |**
     11 **|  * Redistributions of source code must retain the above copyright     |**
     12 **|    notice, this list of conditions and the following disclaimer.      |**
     13 **|  * Redistributions in binary form must reproduce the above copyright  |**
     14 **|    notice, this list of conditions and the following disclaimer in    |**
     15 **|    the documentation and/or other materials provided with the         |**
     16 **|    distribution.                                                      |**
     17 **|  * Neither the name Texas Instruments nor the names of its            |**
     18 **|    contributors may be used to endorse or promote products derived    |**
     19 **|    from this software without specific prior written permission.      |**
     20 **|                                                                       |**
     21 **| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   |**
     22 **| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     |**
     23 **| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |**
     24 **| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  |**
     25 **| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |**
     26 **| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      |**
     27 **| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |**
     28 **| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |**
     29 **| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   |**
     30 **| (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |**
     31 **| OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  |**
     32 **|                                                                       |**
     33 **+-----------------------------------------------------------------------+**
     34 ****************************************************************************/
     35 
     36 #ifndef PUBLIC_COMMANDS_H
     37 #define PUBLIC_COMMANDS_H
     38 
     39 
     40 #include "public_types.h"
     41 #include "public_radio.h"
     42 
     43 typedef enum
     44 {
     45     CMD_RESET           = 0,
     46     CMD_INTERROGATE     = 1,    /*use this to read information elements*/
     47     CMD_CONFIGURE       = 2,    /*use this to write information elements*/
     48     CMD_ENABLE_RX       = 3,
     49     CMD_ENABLE_TX       = 4,
     50     CMD_DISABLE_RX      = 5,
     51     CMD_DISABLE_TX      = 6,
     52     CMD_SCAN            = 8,
     53     CMD_STOP_SCAN       = 9,
     54     CMD_VBM             = 10,
     55     CMD_START_JOIN      = 11,
     56     CMD_SET_KEYS        = 12,
     57     CMD_READ_MEMORY     = 13,
     58     CMD_WRITE_MEMORY    = 14,
     59 
     60     CMD_BEACON          = 19,
     61     CMD_PROBE_RESP      = 20,
     62     CMD_NULL_DATA       = 21,
     63     CMD_PROBE_REQ       = 22,
     64     CMD_TEST            = 23,
     65 
     66     CMD_RADIO_CALIBRATE     = 25,   /* OBSOLETE !!!*/
     67 
     68     CMD_ENABLE_RX_PATH      = 27,   /* OBSOLETE !!! (what is the difference from CMD_ENABLE_RX)*/
     69     CMD_NOISE_HIST      = 28,
     70     CMD_RX_RESET        = 29,
     71 
     72     CMD_PS_POLL         = 30,
     73     CMD_QOS_NULL_DATA   = 31,
     74 
     75     CMD_LNA_CONTROL     = 32,
     76     CMD_SET_BCN_MODE    = 33,
     77 
     78     CMD_MEASUREMENT      = 34,
     79     CMD_STOP_MEASUREMENT = 35,
     80     CMD_DISCONNECT       = 36,
     81     CMD_SET_PS_MODE      = 37,
     82 
     83     CMD_CHANNEL_SWITCH   = 38,
     84     CMD_STOP_CHANNEL_SWICTH = 39,
     85 
     86     CMD_AP_DISCOVERY     = 40,
     87     CMD_STOP_AP_DISCOVERY = 41,
     88 
     89     CMD_SPS_SCAN = 42,
     90     CMD_STOP_SPS_SCAN = 43,
     91 
     92     CMD_HEALTH_CHECK     = 45,
     93     CMD_DEBUG            = 46,
     94 	CMD_TRIGGER_SCAN_TO  = 47,
     95 
     96 NUM_COMMANDS,
     97     MAX_COMMAND_ID = 0xFFFF
     98 } Command_enum;
     99 
    100 #ifdef HOST_COMPILE
    101 typedef uint16 Command_e;
    102 #else
    103 typedef Command_enum Command_e;
    104 #endif
    105 
    106 
    107 #ifdef HOST_COMPILE
    108 
    109 #define 	CMD_MAILBOX_IDLE               		0
    110 #define     CMD_STATUS_SUCCESS             		1
    111 #define     CMD_STATUS_UNKNOWN_CMD         		2
    112 #define     CMD_STATUS_UNKNOWN_IE          		3
    113 #define		CMD_STATUS_REJECT_MEAS_SG_ACTIVE 	11
    114 #define     CMD_STATUS_RX_BUSY             		13
    115 #define     CMD_STATUS_INVALID_PARAM       		14
    116 #define     CMD_STATUS_TEMPLATE_TOO_LARGE  		15
    117 #define     CMD_STATUS_OUT_OF_MEMORY       		16
    118 #define     CMD_STATUS_STA_TABLE_FULL      		17
    119 #define     CMD_STATUS_RADIO_ERROR         		18
    120 #define     CMD_STATUS_WRONG_NESTING       		19
    121 #define     CMD_STATUS_TIMEOUT             		21 /* Driver internal use.*/
    122 #define     CMD_STATUS_FW_RESET            		22 /* Driver internal use.*/
    123 #define     MAX_COMMAND_STATUS             		MAX_POSITIVE16
    124 
    125 #else
    126 
    127 typedef enum
    128 {
    129 	CMD_MAILBOX_IDLE              		=  0,
    130     CMD_STATUS_SUCCESS            		=  1,
    131     CMD_STATUS_UNKNOWN_CMD        		=  2,
    132     CMD_STATUS_UNKNOWN_IE         		=  3,
    133 	CMD_STATUS_REJECT_MEAS_SG_ACTIVE 	= 11,
    134     CMD_STATUS_RX_BUSY            		= 13,
    135     CMD_STATUS_INVALID_PARAM      		= 14,
    136     CMD_STATUS_TEMPLATE_TOO_LARGE 		= 15,
    137     CMD_STATUS_OUT_OF_MEMORY      		= 16,
    138     CMD_STATUS_STA_TABLE_FULL     		= 17,
    139     CMD_STATUS_RADIO_ERROR        		= 18,
    140     CMD_STATUS_WRONG_NESTING      		= 19,
    141     CMD_STATUS_TIMEOUT            		= 21, /* Driver internal use.*/
    142     CMD_STATUS_FW_RESET           		= 22, /* Driver internal use.*/
    143     MAX_COMMAND_STATUS            		= MAX_POSITIVE16
    144 } CommandStatus_enum;
    145 
    146 #endif
    147 
    148 #ifdef HOST_COMPILE
    149 typedef uint16 CommandStatus_e;
    150 #else
    151 typedef CommandStatus_enum CommandStatus_e;
    152 #endif
    153 
    154 
    155 #ifdef FW_RUNNING_AS_STA
    156 #define MAX_CMD_PARAMS 572
    157 #else
    158 #define MAX_CMD_PARAMS 384
    159 #endif
    160 
    161 #define DEBUG_INDICATOR      0x8000
    162 
    163 typedef struct
    164 {
    165     Command_e cmdID;
    166     CommandStatus_e cmdStatus;
    167     uint8 parameters[MAX_CMD_PARAMS];
    168 } Command_t;
    169 
    170 
    171 /******************************************************************************
    172 
    173     ID:		  CMD_RESET
    174 	Desc:	  This command resets all state machines in the WiLink to their power
    175 	          up state and restarts the eCPU. This command has no parameters. After
    176 			  issuing this command, the host must reconfigure the adapter before
    177 			  normal operations resume.
    178 	          In general, the host should only use this command if the WiLink has
    179 			  stopped functioning properly.
    180     Params:	  None.
    181 	Note:     The WiLink does not return a response/status message for this command.
    182 
    183 ******************************************************************************/
    184 
    185 
    186 /******************************************************************************
    187 
    188     ID:		  CMD_INTERROGATE
    189 	Desc:	  This command requests an information element from the WiLink. The
    190 	          interface for this command is somewhat different from other commands
    191 			  since the interface is bi-directional and asymmetric.
    192 	          The host structure consists of the Command ID, a Command Status
    193 			  (returned by WiLink) place holder, and the Information Element Heading
    194 			  (ID and expected length).
    195 	          The response to that command is a buffer of the information element's
    196 			  actual values returned by the WiLink just after the command is issued.
    197 			  The response to that command is a buffer of the information element's
    198               actual values returned by the WiLink just after the command is issued.
    199 	Params:	  InfoElement_t - see below.
    200 
    201 
    202 ******************************************************************************/
    203 /*
    204 Description of InfoElement structure - defined in "public_infoele.h"
    205 offset	length	source	description
    206 ======	======	======	===========
    207 0		2		host	Information Element ID - contains the ID of the requested
    208                         information element (refer to InfoElement_enum in
    209 						pblic_infoele.h). In response to this command, the WiLink
    210 						writes the requested information element to the response area
    211 						for the command mailbox.
    212 2		4		wilink	Length - the length of the response (different for each IE
    213 						according to definitions in public_infoele.h).
    214 4       Length	wilink  IE payload according to definition in public_infoele.h.
    215 */
    216 
    217 
    218 
    219 /******************************************************************************
    220 
    221     ID:		  CMD_CONFIGURE
    222 	Desc:	  This command configures an information element in the WiLink.
    223     Params:	  InfoElement_t - see below.
    224 
    225 ******************************************************************************/
    226 /*
    227 Description of InfoElement structure - defined in "public_infoele.h"
    228 offset	length	source	description
    229 ======	======	======	===========
    230 0		2		host	Information Element ID - contains the ID of the requested
    231                         information element (refer to InfoElement_enum in
    232 						pblic_infoele.h). In response to this command, the WiLink
    233 						writes the requested information element to the response area
    234 						for the command mailbox.
    235 2		4		host	Length - the length of the response (different for each IE
    236 						according to definitions in public_infoele.h).
    237 4       Length	host    IE payload according to definition in public_infoele.h.
    238 */
    239 
    240 
    241 /******************************************************************************
    242 
    243     ID:		  CMD_ENABLE_RX
    244 	Desc:	  This command enables the normal reception of frames.
    245     Params:	  Channel Number - this field indicates the radio channel on which to
    246 	                           receive data. This parameter also sets the channel on
    247 							   which to transmit. The last channel number used,
    248 							   regardless of the order in which the ENABLE_RX and
    249 							   ENABLE_TX commands are issued, is the channel number
    250 							   for both RX and TX. This command must be issued after
    251 							   the host has set all necessary configuration elements
    252 							   appropriately.
    253 
    254 ******************************************************************************/
    255 
    256 
    257 
    258 /******************************************************************************
    259 
    260     ID:		  CMD_ENABLE_TX
    261 	Desc:	  This command enables the normal transmission of frames.
    262     Params:	  Channel Number - this field indicates the radio channel on which to
    263 	                           transmit data. This parameter also sets the channel on
    264 							   which to receive. The last channel number used,
    265 							   regardless of the order in which the ENABLE_RX and
    266 							   ENABLE_TX commands are issued, is the channel number
    267 							   for both RX and TX. This command must be issued after
    268 							   the host has set all necessary configuration elements
    269 							   appropriately.
    270 
    271 ******************************************************************************/
    272 
    273 /******************************************************************************
    274 
    275     ID:		  CMD_DISABLE_RX
    276 	Desc:	  This command disables the normal reception of packets over the
    277 	          Baseband interface.
    278     Params:	  None
    279 
    280 ******************************************************************************/
    281 
    282 /******************************************************************************
    283 
    284     ID:		  CMD_DISABLE_TX
    285 	Desc:	  This command disables the normal transmission of frames.
    286     Params:	  None.
    287 
    288 ******************************************************************************/
    289 
    290 /******************************************************************************
    291 
    292     ID:		  CMD_SCAN
    293 	Desc:	  This command instructs the WiLink to scan for BSS/IBSSs. The host
    294 			  may perform either an active scan or a passive scan. During an active
    295 			  scan, the WiLink transmits a probe request on the specified channel(s)
    296 			  and then listens for beacon/probe responses. During a passive scan, the
    297 			  WiLink monitors the specified channel(s) for beacons.
    298 	          The WiLink sends SCAN_COMPLETE event to notify the host when it has
    299 			  completed a scan.
    300 	Params:	  ScanParameters_t - see below
    301 
    302 ******************************************************************************/
    303 /*
    304 Offset	Length	Definition
    305 0		8		RX filters for Scan (refer to ACXRxConfigStruct)
    306 8		2		Scan options (Band select, Voice mode and Scan type = Active/Passive)
    307 10		1		NumChannels
    308 11		1		Number of Probe requests (used for Active scan)
    309 12		2		Probe request rate & modulation
    310 14		1		AC trigger (for Voice mode only)
    311 15		1		SSID length
    312 16		32		SSID string (Null terminated)
    313 48		2		Channel [0] ScanMinDuration
    314 50		2		Channel [0] ScanMaxDuration
    315 52		6		Channel [0] BSSID (4 bytes LOW and 2 bytes HIGH)
    316 58		1		Channel [0].bit0-3: Early Termination count. Bit 4-5: Condition
    317 59		1		Channel [0] TX power level for Scan (0 means do not change - other values:1-5)
    318 60		1		Channel [0] Channel
    319 61		3		Channel [0] Reserved
    320 64-404	340		Optional Channel [1] - Channel [15] - same format as Channel [0] fields above.
    321 */
    322 
    323 /* Defines for Rx "ConfigOptions".*/
    324 /* Only bits 2-10 can be configured by the Driver".*/
    325 #define CFG_RX_SERIAL           BIT_0    /* 0 = use parallel interface,         1 = use serial interface from ACX101- not valid.*/
    326 #define CFG_RX_RAW              BIT_1    /* 1 = write all data from baseband to frame buffer including PHY header.*/
    327 #define CFG_RX_FCS              BIT_2    /* 1 = write FCS to end of frame in memory, 0 = do not write FCS to memory.*/
    328 #define CFG_RX_ALL_GOOD         BIT_3    /* promiscuous mode, receive all good frames.*/
    329 #define CFG_UNI_FILTER_EN       BIT_4    /* local MAC address filter enable.*/
    330 #define CFG_BSSID_FILTER_EN     BIT_5    /* BSSID filter enable.*/
    331 #define CFG_MC_FILTER_EN        BIT_6    /* 0 = receive all multicast,          1 = use one or both multicast address filters.*/
    332 #define CFG_MC_ADDR0_EN         BIT_7    /* 1 = receive frames from mc_addr0,   0 = do not use this filter.*/
    333 #define CFG_MC_ADDR1_EN         BIT_8    /* 1 = receive frames from mc_addr1,   0 = do not use this filter .*/
    334 #define CFG_BC_REJECT_EN        BIT_9    /* 0 = receive all broadcast,          1 = filter all broadcast.*/
    335 #define CFG_SSID_FILTER_EN      BIT_10   /* SSID Filter Enable.*/
    336 #define CFG_RX_INT_FCS_ERROR    BIT_11   /* 1 = give rx complete interrupt for FCS errors.*/
    337 #define CFG_RX_INT_ENCRYPTED    BIT_12   /* 1 = only give rx header interrupt if frame is encrypted.*/
    338 #define CFG_RX_WR_RX_STATUS     BIT_13   /* 0 = do not write three status words, 1 = write three receive status words to top of rx'd MPDU.*/
    339 #define CFG_RX_FILTER_NULTI     BIT_14   /* 1 = filter multicast/broadcast frame if SA matchs local MAC addr->.*/
    340 #define CFG_RX_RESERVE          BIT_15   /* reserve.*/
    341 #define CFG_RX_TIMESTAMP_TSF    BIT_16   /* 1 = sample frame's' arrival time in 32bits TSF, 0 = write it in MAC time stamp.*/
    342 
    343 
    344 /* Defines for Rx "FilterOptions".*/
    345 /* The rx filter enables control what type of receive frames will be rejected or received by the rx hardware*/
    346 /* 1 = frame is written to memory,*/
    347 /* 0 = not written to memory, rejected.*/
    348 #define CFG_RX_RSV_EN       BIT_0  /* reserved types and subtypes.*/
    349 #define CFG_RX_RCTS_ACK     BIT_1  /* rts, cts, ack frames.*/
    350 #define CFG_RX_PRSP_EN      BIT_2  /* probe response.*/
    351 #define CFG_RX_PREQ_EN      BIT_3  /* probe request.*/
    352 #define CFG_RX_MGMT_EN      BIT_4  /* type = management.*/
    353 #define CFG_RX_FCS_ERROR    BIT_5  /* frames with FCS errors.*/
    354 #define CFG_RX_DATA_EN      BIT_6  /* type = data.*/
    355 #define CFG_RX_CTL_EN       BIT_7  /* type = control.*/
    356 #define CFG_RX_CF_EN        BIT_8  /* contention free frames.*/
    357 #define CFG_RX_BCN_EN       BIT_9  /* beacons.*/
    358 #define CFG_RX_AUTH_EN      BIT_10 /* authentication, deauthentication.*/
    359 #define CFG_RX_ASSOC_EN     BIT_11 /* association related frames (all 5 subtypes  assoc req/resp,*/
    360 
    361 
    362 typedef struct
    363 {
    364 #ifdef FW_RUNNING_AS_AP
    365     uint16          ConfigOptions;
    366     uint16          FilterOptions;
    367 #else
    368     uint32          ConfigOptions;
    369     uint32          FilterOptions;
    370 #endif
    371 } ACXRxConfigStruct;
    372 
    373 /*
    374 TxdRateSet_t definition
    375 Bit     Description
    376 ===     ===========
    377 0-12    Every one of bits 0-12 specifies rate described in the column on left. Only
    378         one bit could be set for the command, all other should be zeroed.
    379 0       1 MBPS
    380 1       2 MBPS
    381 2       5.5 MBPS
    382 3       6 MBPS
    383 4       9 MBPS
    384 5       11 MBPS
    385 6       12 MBPS
    386 7       18 MBPS
    387 8       22 MBPS
    388 9       24 MBPS
    389 10      36 MBPS
    390 11      48 MBPS
    391 12      54 MBPS
    392 13      Unused (set to 0).
    393 14      PBCC - When this bit is set, the WiLink transmits probe requests with PBCC
    394         modulation.
    395         Notes:
    396            Does not apply (set to 0) for rates 1 and 2 Mbps.
    397            Does not apply (set to 0) for RevG-OFDM rates.
    398 15      Preamble - When this bit is set, the WiLink transmits probe requests with a
    399                    short preamble. When this bit is clear, the WiLink transmits the
    400 				   frame with a long preamble.
    401                    Notes:
    402                      Must be LONG (0) for 1Mbps rate.
    403 				     Does not apply (set to 0) for RevG-OFDM rates.
    404 
    405 If neither the PBCC bit or OFDM rate are set, then the modulation format for probe
    406 requests is CCK for 5.5 or 11 Mbps or DBPSK/DQPSK for 1 and 2 Mbps.
    407 */
    408 
    409 /* ScanOptions bit mask field.*/
    410 #define SCAN_ACTIVE         0
    411 #define SCAN_PASSIVE        1   /* 1 = passive scan, 0 = active scan*/
    412 #define SCAN_5GHZ_BAND      2   /* 1 = scan channel list in 5 Ghz band, 0 = scan channel list in 2.4 Ghz band*/
    413 #define TRIGGERED_SCAN      4   /* 1 = Triggered scan, 0 = Normal scan*/
    414 #define SCAN_PRIORITY_HIGH  8   /* 1 = High priority scan, 0 = Low priority scan*/
    415 
    416 typedef uint8 TidTrigger_t;
    417 
    418 /* General scan parameters.*/
    419 typedef struct
    420 {
    421     ACXRxConfigStruct  rxCfg;         /* Rx filter to be used for each channel scan. */
    422                                       /* The BSSID filter enable will be set (by the */
    423 	                                  /* scan process) to ON for a specific channel if*/
    424 	                                  /* the BSSID of this channel is a unicast address.*/
    425 	                                  /* Otherwise it will be set to OFF (Refer to */
    426 	                                  /* ACXRxConfig IE in public_infoele.h).*/
    427 
    428     uint16             scanOptions;   /* This bitwise field indicates the scan options. */
    429 	                                  /* Bits [3:15] are reserved. */
    430 	                                  /* Bits [0:2] are defined as follows: */
    431                                       /* Scan Type (bit 0) - When this bit is set, the */
    432 	                                  /*  WiLink performs a passive scan. When this bit*/
    433 	                                  /*  is cleared, the WiLink performs an active scan. */
    434 		                              /* Band Select (bit 1) - When this bit is set, the*/
    435 	                                  /*  WiLink scans the specified channels in the */
    436 	                                  /*  5GHz band. When this bit is cleared, the */
    437 	                                  /*  WiLink scans the specified channels in the */
    438 	                                  /*  2.4GHz band. */
    439 		                              /* Voice mode (bit 2) - When this bit is set, */
    440 	                                  /*  the request is for a voice scan. When this bit*/
    441 	                                  /*  is cleared, the request is for a normal scan. */
    442 		                              /* Scan priority (bit 3) - When this bit is set, */
    443 	                                  /*  the request is for a high priority scan. When*/
    444 	                                  /*  this bit is cleared, the request is for a low*/
    445 	                                  /*  priority scan.*/
    446 
    447     uint8              numChannels;   /* Number of scan channels in the list (minimum is*/
    448 	                                  /* 1, maximum is 30).*/
    449 
    450     uint8              numOfProbRqst; /* This field indicates the number of probe */
    451 	                                  /* requests to send per channel, in active scan. */
    452 
    453     TxdRateSet_t       txdRateSet;    /* This bitwise field specifies the rate and */
    454 	                                  /* modulation to transmit the probe request during*/
    455 	                                  /* an active scan. The allowable values for this */
    456 	                                  /* field are listed in the above table (refer to */
    457 	                                  /* TxdRateSet). It is not used for passive scans.*/
    458 
    459     TidTrigger_t       tidTrigger;    /* used for TidTriggered scan only.*/
    460 
    461     uint8              ssidLength;    /* This field specifies the size of the SSID, */
    462 	                                  /* which can be up to 32 bytes long. If this field*/
    463 	                                  /* equals to zero, SSID filter is not applied. */
    464 
    465     uint32             ssidStr[8];    /* This field specifies the SSID packets from that*/
    466 	                                  /* are relevant for the Scan result. The WiLink*/
    467 	                                  /* uses this information to filter beacon, probe*/
    468 	                                  /* response frames (if the SSID length field of */
    469 	                                  /* this command structure is not zero) */
    470 } BasicScanParameters_t;
    471 
    472 
    473 
    474 #define SCAN_ET_COND_MASK  0x30
    475 #define SCAN_ET_COUNT_MASK 0x0F
    476 
    477 #define SCAN_MAX_NUM_OF_CHANNELS 16
    478 
    479 /* Early Termination condition (bits 4-5) - This field can have one of the following */
    480 /* values (note that bits 0-3 indicates Early Termination count): */
    481 typedef enum
    482 {
    483     ET_COND_DISABLE = 0x00,          /* Disable - No early termination condition.*/
    484 
    485 	ET_COND_BEACON  = 0x10,          /* Beacon only. When this value is selected, the */
    486 		                             /* Early Termination count field specifies the */
    487 									 /* maximum number of beacons to collect before */
    488 									 /* ending a scan. */
    489 
    490     ET_COND_PROBE_RESP = 0x20,       /* Probe responses only. When this value is */
    491 	                                 /* selected, the Early Termination count field */
    492 									 /* specifies the maximum number of probe responses*/
    493 									 /* to collect before ending a scan. */
    494 
    495     ET_COND_BEACON_PROBE_RESP = 0x30,/* Beacon/probe response. When this value is */
    496 	                                 /* selected, the Early Termination count field */
    497 									 /* specifies the maximum number of beacons or probe*/
    498 									 /* responses to collect before ending a scan. */
    499 
    500     ET_COND_INVALID = 0xFF
    501 } ETCondition_enum;
    502 
    503 #ifdef HOST_COMPILE
    504 typedef uint8 ETCondition_e;
    505 #else
    506 typedef ETCondition_enum ETCondition_e;
    507 #endif
    508 
    509 
    510 typedef uint8 ETCondCount_t;
    511 
    512 
    513 
    514 #define PROCESS_SCAN_IS_HIGH(pScanParameters) ((pScanParameters)->basicScanParameters.scanOptions & SCAN_PRIORITY_HIGH)
    515 #define PROCESS_SCAN_IS_LOW(pScanParameters) ((PROCESS_SCAN_IS_HIGH(pScanParameters)) == 0)
    516 
    517 
    518 /* Per-Channel scan parameters.*/
    519 typedef struct
    520 {
    521 
    522     uint32        scanMinDuration;    /* For active scans, this field specifies the */
    523                                       /* minimum amount of time, in time units (TUs), */
    524                                       /* to wait for a frame on a channel. This */
    525                                       /* parameter is not used for passive scans. The*/
    526                                       /*  value can range from 0 to 65535 TUs */
    527                                       /* (67.1 seconds). */
    528 
    529     uint32        scanMaxDuration;    /* For active scans, this field specifies the */
    530 	                                  /* maximum amount of time, in time units (TUs), */
    531 	                                  /* to wait for a probe response on a channel.*/
    532 	                                  /* For passive scans, this field specifies the */
    533 	                                  /* amount of time, in time units (TUs), to listen*/
    534 	                                  /* on a channel. The value can range from 0 to */
    535 	                                  /* 65535 TUs (67.1 seconds). */
    536 
    537 
    538     uint32        bssIdL;             /* 32 LSBits of BSSID of the AP to scan for. */
    539 	                                  /* If scanning on this channel any BSSID, this */
    540 	                                  /* field shall be set to broadcast BSSID. */
    541 
    542     uint16        bssIdH;             /* 16 MSBits of BSSID of the AP to scan for.*/
    543 
    544     ETCondCount_t ETCondCount;        /* bit 0-3: Early Termination count - This field */
    545 	                                  /*          defines the maximum number of beacons*/
    546 	                                  /*          or probe responses or both (according*/
    547 	                                  /*          to condition) to collect before ending*/
    548 	                                  /*          a scan.*/
    549 
    550 	                                  /* Bit 4-5: Early Termination Condition (refer */
    551 	                                  /*          to ETCondition_enum).*/
    552 
    553     uint8         txPowerAttenuation; /* TX power level to be used per channel scanned. */
    554 	                                  /* If 0, leave normal TX power level for this */
    555 	                                  /* channel. Range: 0 - 20 [dB].*/
    556 
    557     Channel_e     channel;            /* Channel number to scan, valid range 0-255 */
    558 	                                  /* (1-14 for 802.11b). */
    559     uint8		  padding[3];             /* for alignment to 32 bits boundry*/
    560 } BasicScanChannelParameters_t;
    561 
    562 /* The Scan command structure.*/
    563 typedef struct
    564 {
    565     BasicScanParameters_t basicScanParameters; /* refer to BasicScanParameters_t */
    566 	                                           /* definition*/
    567 
    568     BasicScanChannelParameters_t basicScanChannelParameters[SCAN_MAX_NUM_OF_CHANNELS];
    569 } ScanParameters_t;
    570 
    571 /*****************************************************************************
    572 
    573     ID:		  CMD_TRIGGER_SCAN_TO
    574 	Desc:	  This Command will configure the enhanced Trigger Scan Timeout
    575 				information.
    576 			  To use legacy Trigger Scan, configure the parameter to 0
    577     Params:	  None
    578 
    579 ******************************************************************************/
    580 typedef struct
    581 {
    582 	uint32	SlicedScanTimeOut;			/* 0 - Split Scan Disable
    583 										   any other value will represent the timeout
    584 										   for each channel "mini scan" in uSec */
    585 }enhancedTriggerTO_t;
    586 
    587 
    588 
    589 /*****************************************************************************
    590 
    591     ID:		  CMD_STOP_SCAN
    592 	Desc:	  This command instructs the WiLink to terminate any scan in progress.
    593 	          After processing this command, the WiLink returns to its previous state
    594 			  (the state before the scan was started) and generates the SCAN_COMPLETE
    595 			  information message.
    596     Params:	  None
    597 
    598 ******************************************************************************/
    599 
    600 
    601 
    602 /******************************************************************************
    603 
    604     ID:		  CMD_VBM
    605 	Desc:	  This command specifies the contents of the beacon TIM template stored
    606 	          in the WiLink.
    607     Params:	  VBMUpdateRequest_t - see below.
    608 	Note:     Second part of Beacon template
    609 
    610 ******************************************************************************/
    611 typedef struct
    612 {
    613     uint8 identity;       /* TIM IE ID*/
    614     uint8 length;         /* TIM IE Length*/
    615     uint8 DTIM_count;
    616     uint8 DTIM_period;
    617     uint8 BitMap_ctrl;
    618     uint8 PVB_field[251]; /* Partial Virtual Bitmap*/
    619 } TIMStruct_t;
    620 
    621 
    622 typedef struct
    623 {
    624     uint16 len;           /* length*/
    625     uint8  padding[2];    /* for alignment to 32 bits boundry*/
    626     TIMStruct_t tim;
    627 } VBMUpdateRequest_t;
    628 
    629 
    630 /******************************************************************************
    631 
    632     ID:		  CMD_START_JOIN
    633 	Desc:	  This command instructs the WiLink to either join a BSS or IBSS, or
    634 	          start an IBSS. When the device has joined the BSS or IBSS the Join
    635 			  Complete event is raised to the host.
    636     Params:	  StartJoinRequest_t - see below.
    637 
    638 ******************************************************************************/
    639 
    640 #define JOIN_CMD_CTRL_TX_FLUSH         0x80 // When this bit is set, the firmware will flush all Tx
    641 		                                    // frames in the pipe and will not transmit them.
    642 #define JOIN_CMD_CTRL_EARLY_WAKEUP_ENABLE  0x01 // When this bit is set, the firmware will support
    643 		                                        // early wakeup time
    644 
    645 typedef enum
    646 {
    647     BSS_TYPE_IBSS = 0,
    648     BSS_TYPE_STA_BSS = 2,
    649     BSS_TYPE_AP_BSS = 3,
    650     MAX_BSS_TYPE = 0xFF
    651 } BssType_enum;
    652 
    653 #ifdef HOST_COMPILE
    654 typedef uint8 BSS_e;
    655 #else
    656 typedef BssType_enum BSS_e;
    657 #endif
    658 
    659 #define MAX_SSID_STR_LEN_BYTESX4 8
    660 /*
    661 BasicRateSet_t definition
    662 Bit     Description
    663 ===     ===========
    664 0       When this bit is set, 1 MBPS is a member of the basic rate set.
    665 1       When this bit is set, 2 MBPS is a member of the basic rate set.
    666 2       When this bit is set, 5.5 MBPS is a member of the basic rate set.
    667 3       Must be set to 0.
    668 4       Must be set to 0.
    669 5       When this bit is set, 11 MBPS is a member of the basic rate set.
    670 6       Must be set to 0.
    671 7       Must be set to 0.
    672 8       When this bit is set, 22 MBPS is a member of the basic rate set.
    673 9-15    Must be set to 0.
    674 
    675 Note: For OFDM, the control response frame rates 6, 9, 12, 18, 24 and 36 Mbps are the
    676       default values and are not configurable. Contact your TI representative for
    677 	  information.
    678 */
    679 
    680 
    681 typedef struct
    682 {
    683     uint32            bssIdL;        /* This field indicates the 32 LSBits of the MAC*/
    684 	                                 /* address of the BSS to join. */
    685                                      /* Note: To correctly generate beacon frames, the */
    686 	                                 /* byte order of the BSS ID field must be */
    687 	                                 /* reversed. for example, if the MAC address of */
    688 	                                 /* the AP is 00 7E 99 11 22 33, program the BSS */
    689 	                                 /* ID field as 33 22 11 99 7E 00.*/
    690 
    691     uint16            bssIdH;        /* This field indicates the 16 MSBits of the MAC*/
    692 	                                 /* address of the BSS to join. */
    693 
    694     uint16            beaconInterval;/* This field specifies the time between target */
    695 	                                 /* beacon transmission times (TBTTs), in time */
    696 	                                 /* units (TUs). Valid values are 1 to 1024.*/
    697 
    698 #ifdef FW_RUNNING_AS_STA
    699     ACXRxConfigStruct rxFilter;      /* This filed is the Rx filter configuration for*/
    700 	                                 /* the device while connected to the BSS or IBSS.*/
    701 	                                 /* This setting is overridden in case of a */
    702 	                                 /* measurement or a scan activity and is reset */
    703 	                                 /* after these activities end.*/
    704 #endif
    705     BasicRateSet_t    basicRateSet;  /* For 802.11b, this field specifies the control*/
    706 	                                 /* response frame rate for the BSS or IBSS (that*/
    707 	                                 /* is, the BSSBasicRateSet parameter in the */
    708 	                                 /* 802.11 Specification). The WiLink uses this */
    709 	                                 /* field to determine the rate at which to */
    710 	                                 /* transmit control frame responses (such as ACK */
    711 	                                 /* or CTS frames). The format of this field is */
    712 	                                 /* shown in the above table (refer to */
    713 	                                 /* BasicRateSet_t).*/
    714 
    715     uint8             dtimInterval;  /* This field specifies the number of beacon */
    716 	                                 /* intervals between DTIM beacon frames. The host*/
    717 	                                 /* is only required to set this field when the */
    718 	                                 /* BSS Type is infrastructure BSS (STA) or AP. */
    719 	                                 /* For an independent BSS, the host should set */
    720 	                                 /* this field to 1.*/
    721 
    722     Rate_e            txCtrlFrmRate; /* OBSOLETE (replaced by ACX_FW_GEN_FRAME_RATES)*/
    723     Mod_e             txCtrlFrmMod;  /* OBSOLETE (replaced by ACX_FW_GEN_FRAME_RATES)*/
    724 
    725     BSS_e             bssType;       /* bits 0-2: This bitwise field specifies the type */
    726 	                                 /*  of BSS to start or join (Refer to BssType_enum). */
    727 	                                 /* bit 4: Band - The radio band in which to join*/
    728 	                                 /*  or start.*/
    729                                      /*  0 - 2.4GHz band	*/
    730 	                                 /*  1 - 5GHz band*/
    731 	                                 /* bits 3, 5-7: Reserved*/
    732 
    733     Channel_e         channelNumber; /* This field specifies the channel number of the*/
    734 	                                 /* BSS to join or start. Valid values are 1 to 14. */
    735 	                                 /* If the specified channel is not allowed in the*/
    736 	                                 /* regulatory domain, the command is rejected and*/
    737 	                                 /* the status code 0x0005 is returned in the */
    738 	                                 /* Command Status field.*/
    739 
    740     uint8             ssidLength;    /* This field specifies the size of the SSID, which*/
    741 	                                 /* can be up to 32 bytes long.*/
    742 
    743     uint32              ssidStr[MAX_SSID_STR_LEN_BYTESX4];
    744 	                                 /* This field specifies the SSID of the BSS to */
    745 	                                 /* start or join. The WiLink uses this information*/
    746 	                                 /* to filter beacon, probe response and probe */
    747 	                                 /* request frames (if configured to do so in bit 10*/
    748 	                                 /* in the Receive Configuration field of the */
    749 	                                 /* ACXRxConfig information element). */
    750 	                                 /* It also uses this information to determine if a*/
    751 	                                 /* probe response should be transmitted in */
    752 	                                 /* response to a received probe request.*/
    753 
    754     uint8             ctrl;          /* Join command control field (refer to */
    755 	                                 /* JoinCmdCtrl_enum).*/
    756 
    757     Rate_e            txMgmtFrmRate; /* OBSOLETE (replaced by ACX_FW_GEN_FRAME_RATES)*/
    758     Mod_e             txMgmtFrmMod;  /* OBSOLETE (replaced by ACX_FW_GEN_FRAME_RATES)*/
    759     uint8               reserved1;
    760 } StartJoinRequest_t;
    761 
    762 
    763 /******************************************************************************
    764 
    765     ID:		  CMD_SET_KEYS
    766 	Desc:	  The host issues this command to manage the WEP key cache in the WiLink.
    767 	          The host can issue this command during the configuration or operation
    768 			  phase.
    769     Params:	  SetKey_t - see below.
    770 
    771 ******************************************************************************/
    772 
    773 #define NUM_ACCESS_CATEGORIES_COPY 4
    774 
    775 #define MAX_KEY_SIZE 32
    776 
    777 typedef enum
    778 {
    779     KEY_ADD_OR_REPLACE = 1,             /* Add or replace a key in the WEP cache*/
    780 	KEY_REMOVE         = 2,             /* Remove a key from the WEP cache*/
    781 	KEY_SET_ID         = 3,             /* Set Key ID*/
    782     MAX_KEY_ACTION     = MAX_POSITIVE16 /* force this enum to be uint16*/
    783 } KeyAction_enum;
    784 
    785 #ifdef HOST_COMPILE
    786 typedef uint16 KeyAction_e;
    787 #else
    788 typedef KeyAction_enum KeyAction_e;
    789 #endif
    790 
    791 typedef enum
    792 {
    793     KEY_WEP_DEFAULT       = 0,
    794     KEY_WEP_ADDR          = 1,
    795     KEY_AES_GROUP         = 4,
    796     KEY_AES_PAIRWISE      = 5,
    797     KEY_WEP_GROUP         = 6,
    798     KEY_TKIP_MIC_GROUP    = 10,
    799     KEY_TKIP_MIC_PAIRWISE = 11
    800 } KeyType_enum;
    801 
    802 /*
    803 Key Size+Key Data table (valid value)
    804 KeyType_enum  Key Type	                  Valid Key Size	Key Data Field Format
    805 ============  ========	                  ==============    =====================
    806 0x00          WEP default key	          5, 13, 29	        Key Size bytes of key data
    807 
    808 0x01          WEP key mapping key	      5, 13, 29         Key Size bytes of key data
    809 
    810 0x04          AES Group Key	              16                16 bytes of key data
    811 
    812 0x05          AES Pairwise Key	          16                16 bytes of key data
    813 
    814 0x0A          TKIP and MIC Group Key      32                16 bytes of TKIP key data
    815                                                         8 bytes of Rx MIC key data
    816                                                         8 bytes of Tx MIC key data
    817 
    818 0x0B          TKIP and MIC Pairwise Key   32                16 bytes of TKIP key data
    819                                                         8 bytes of Rx MIC key data
    820                                                         8 bytes of Tx MIC key data
    821 */
    822 
    823 #ifdef HOST_COMPILE
    824 typedef uint8 KeyType_e;
    825 #else
    826 typedef KeyType_enum KeyType_e;
    827 #endif
    828 
    829 
    830 typedef enum
    831 {
    832     NO_KEY            =  0,
    833     KEY_SIZE_WEP_64   =  5,
    834     KEY_SIZE_WEP_128  = 13,
    835     KEY_SIZE_WEP_256  = 29,
    836     KEY_SIZE_TKIP     = MAX_KEY_SIZE
    837 } KeySize_enum;                      /* WEP keysizes reflect 3 bytes appended from IV.*/
    838 
    839 #ifdef HOST_COMPILE
    840 typedef uint8 KeySize_e;
    841 #else
    842 typedef KeySize_enum KeySize_e;
    843 #endif
    844 
    845 
    846 typedef struct
    847 {
    848     uint8 addr[MAC_ADDR_SIZE]; /* This field specifies the MAC address of the station to*/
    849 	                           /* add or remove from the WEP key cache. This field is */
    850 	                           /* ignored if a WEP default key is being added or removed.*/
    851 
    852     KeyAction_e action;        /* This field specifies the action to be performed.*/
    853 	                           /* Refer to KeyAction_enum.*/
    854 
    855     uint16      reserved;
    856     KeySize_e   keySize;       /* This field indicates the size of the key in bytes */
    857 	                           /* being added. Valid values are listed in the Valid Key */
    858 	                           /* Size column in the above "Key Size+Key Data table". */
    859 
    860     KeyType_e   type;          /* This field indicates the type of key being added.*/
    861 	                           /* Valid values are listed in the Value column in the*/
    862 	                           /* KeyType_enum.*/
    863 
    864     uint8       ssidProfile;   /* This field indicates the SSID profile for which the */
    865 	                           /* key is set.*/
    866     uint8       id;            /* Key ID - For TKIP and AES key types, this field */
    867 	                           /* indicates the value that should be inserted into the*/
    868 	                           /* KeyID field of frames transmitted using this key */
    869 	                           /* entry. For WEP default key types, this field indicates*/
    870 	                           /* the ID of the key to add or remove. */
    871 	                           /* For WEP key mapping key types, this field is ignored.*/
    872 	                           /* Valid values for this field are 0 to 3.*/
    873 
    874     uint8       reserved2[6];
    875     uint8       key[MAX_KEY_SIZE];
    876 	                           /* This field holds the security key data to add to the*/
    877 	                           /* STA table. The format of this field varies depending*/
    878 	                           /* on the type field. The format of this field for each*/
    879 	                           /* key type is described in the Key Data Field Format */
    880 	                           /* column in the "Key Size+Key Data table", above.*/
    881 
    882     uint16      AcSeqNum16[NUM_ACCESS_CATEGORIES_COPY];
    883 	                           /* This field indicates the lower part of the PN\IV */
    884 	                           /* sequence number that is used, for the four Access*/
    885 	                           /* Categories.*/
    886 
    887     uint32      AcSeqNum32[NUM_ACCESS_CATEGORIES_COPY];
    888 	                           /* This field indicates the higher part of the PN\IV */
    889 	                           /* sequence number that is used, for four Access */
    890 	                           /* Categories.*/
    891 
    892 } SetKey_t;
    893 
    894 
    895 /******************************************************************************
    896 
    897     ID:		  CMD_READ_MEMORY
    898 	Desc:	  The host issues this command to read the WiLink device
    899 	          memory/registers.
    900     Params:	  ReadWriteCommand_t - see below.
    901 	Note:     The Base Band address has special handling (16 bits registers and
    902 	          addresses). For more information, see the hardware specification.
    903 
    904 ******************************************************************************/
    905 /******************************************************************************
    906 
    907     ID:		  CMD_WRITE_MEMORY
    908 	Desc:	  The host issues this command to write the WiLink device memory/registers.
    909     Params:	  ReadWriteCommand_t - see below.
    910 	Note:     The Base Band address has special handling (16 bits registers and
    911 	          addresses). For more information, see the hardware specification.
    912 
    913 ******************************************************************************/
    914 
    915 #define MAX_READ_SIZE 256
    916 
    917 typedef struct
    918 {
    919     uint32 addr;                 /* The address of the memory to read from or write to.*/
    920     uint32 size;                 /* The amount of data in bytes to read from or write */
    921 	                             /* to the WiLink device.*/
    922     uint8  value[MAX_READ_SIZE]; /* The actual value read from or written to the Wilink.*/
    923 	                             /* The source of this field is the Host in WRITE */
    924 	                             /* command or the Wilink in READ command.*/
    925 } ReadWriteCommand_t;
    926 
    927 
    928 /******************************************************************************
    929 
    930     ID:		  CMD_BEACON
    931 	Desc:	  This command specifies the contents of the beacon template stored in
    932 	          the WiLink.
    933     Params:	  PktTemplate_t - see below.
    934 
    935 ******************************************************************************/
    936 
    937 /******************************************************************************
    938 
    939     ID:		  CMD_PROBE_RESP
    940 	Desc:	  This command specifies the contents of the probe response template
    941 	          stored in the WiLink.
    942     Params:	  PktTemplate_t - see below.
    943 
    944 ******************************************************************************/
    945 
    946 /******************************************************************************
    947 
    948     ID:		  CMD_NULL_DATA
    949 	Desc:	  This command specifies the contents of the Null data template
    950 	          stored in the WiLink.
    951     Params:	  PktTemplate_t - see below.
    952 
    953 ******************************************************************************/
    954 
    955 /******************************************************************************
    956 
    957     ID:		  CMD_PROBE_REQ
    958 	Desc:	  This command specifies the contents of the probe request template
    959 	          stored in the WiLink.
    960     Params:	  PktTemplate_t - see below.
    961 
    962 ******************************************************************************/
    963 
    964 /******************************************************************************
    965 
    966     ID:		  CMD_PS_POLL
    967 	Desc:	  This command specifies the contents of the PS-poll template
    968 	          stored in the WiLink.
    969     Params:	  PktTemplate_t - see below.
    970 
    971 ******************************************************************************/
    972 
    973 
    974 /******************************************************************************
    975 
    976     ID:		  CMD_QOS_NULL_DATA
    977 	Desc:	  This command specifies the contents of the QOS-Null template
    978 	          stored in the WiLink.
    979     Params:	  PktTemplate_t - see below.
    980 
    981 ******************************************************************************/
    982 /* Template command data structure.*/
    983 #define MAX_TEMPLATES_SIZE 300
    984 typedef struct
    985 {
    986 	uint16 len;
    987 	uint8  templateStart[MAX_TEMPLATES_SIZE];
    988 } PktTemplate_t;
    989 
    990 
    991 /******************************************************************************
    992 
    993       ID:	  CMD_TEST
    994 	Desc:	The TEST command can be issued immediately after the firmware has
    995 		  been downloaded, with no further configuration of the WiLink required.
    996 		  Full initialization of the WiLink is not required to invoke the TEST
    997 		  command and perform the radio test function.
    998 		  After testing, the system must be reset.
    999 		  Test parameters can be modified while a test is executing.
   1000 		  For instance, the host program can change the channel without resetting
   1001 		  the system.
   1002 
   1003       Params:	  TestCmd_t - see below.
   1004 		  The returned values are copied to the cmd/sts MB replacing  the command
   1005 		  (similar to the interrogate mechanism).
   1006 
   1007 ******************************************************************************/
   1008 typedef enum
   1009 {
   1010     TEST_CMD_FCC                            = 0x01,
   1011     TEST_CMD_TELEC							= 0x02,
   1012     TEST_CMD_PLT_FCC_TELEC_TX_STOP			= 0x04,
   1013     TEST_CMD_PLT_GAIN_GET                  	= 0x05,
   1014     TEST_CMD_PLT_GAIN_ADJUST				= 0x06,
   1015     TEST_CMD_PLT_TXPOWER_CAL_START			= 0x07,
   1016     TEST_CMD_PLT_TXPOWER_CAL_STOP			= 0x08,
   1017     TEST_CMD_PLT_GET_NVS_UPDATE_BUFFER     	= 0x09,
   1018 	TEST_CMD_PLT_RX_CALIBRATION			   	= 0x0a,
   1019     TEST_CMD_RADIO_TUNE			   	        = 0x0b,
   1020     TEST_CMD_RX_PER_START			   	    = 0x0c,
   1021     TEST_CMD_RX_PER_STOP			   	    = 0x0d,
   1022     MAX_TEST_CMD_ID							= 0xFF
   1023 } TestCmdID_enum;
   1024 
   1025 #ifdef HOST_COMPILE
   1026 typedef uint8 TestCmdID_e;
   1027 #else
   1028 typedef TestCmdID_enum TestCmdID_e;
   1029 #endif
   1030 
   1031 /******************************************************************************/
   1032 typedef enum
   1033 {
   1034  	TEST_MODE_HOST_ORIGINATED_DATA				= 0x00,
   1035 	TEST_MODE_FIXED_SEQ_NUMBER					= 0x00,
   1036 	TEST_MODE_FW_ORIGINATED_DATA					= 0x01,
   1037 	TEST_MODE_RANDOM_DATA							= 0x05,
   1038 	TEST_MODE_ZOZO_DATA							= 0x09,
   1039 	TEST_MODE_FILLING_PATERN_MASK					= 0x0F,
   1040 	TEST_MODE_DELAY_REQUIRED						= 0x10,
   1041 	TEST_MODE_DISABLE_SRCRAMBLING_FLAG			= 0x20
   1042 }TestModeCtrlTypes_e;
   1043 
   1044 #ifdef HOST_COMPILE
   1045 typedef uint8 FccTestType_e;
   1046 #else
   1047 typedef TestModeCtrlTypes_e FccTestType_e;
   1048 #endif
   1049 
   1050 /******************************************************************************/
   1051 #define 	TEST_SEQ_NUM_MODE_FIXED				(0)
   1052 #define     TEST_SEQ_NUM_MODE_INCREMENTED		(1)
   1053 
   1054 /******************************************************************************
   1055 
   1056   TestCmdId :	TEST_CMD_FCC - Tx continuous test
   1057 
   1058   Description:  Continuous transmit series of numbers with a valid MAC header
   1059                 as was received from driver.
   1060 				However there is no 802.11 air access compliance.
   1061 
   1062   Params:     	PERTxCfg_t fcc - see below.
   1063 
   1064 ******************************************************************************/
   1065 #define NUM_OF_MAC_ADDR_ELEMENTS 6
   1066 typedef struct PERTxCfg_t
   1067 {
   1068 			/*input parameters*/
   1069             uint32 numFrames;       /* number of frams to transmit, 0 = endless*/
   1070             uint32 interFrameGap;   /* time gap in uSec */
   1071             uint32 seqNumMode;      /* Fixed / Incremented */
   1072             uint32 frameBodySize;    /* length of Mac Payload */
   1073             uint8 channel;          /*channel number*/
   1074             uint8 dataRate;         /* MBps 1,2,11,22,... 54           */
   1075             uint8 modPreamble;		/* CTL_PREAMBLE 0x01 */
   1076             uint8 band;				/* {BAND_SELECT_24GHZ 0x00 | BAND_SELECT_5GHZ 0x01} */
   1077             uint8 modulation;		/* {PBCC_MODULATION_MASK |OFDM_MODULATION_MASK }*/
   1078             FccTestType_e testModeCtrl;
   1079             uint8 dest[NUM_OF_MAC_ADDR_ELEMENTS];          /* set to hard codded default {0,0,0xde,0xad,0xbe,0xef}; */
   1080 } PERTxCfg_t;
   1081 
   1082 /******************************************************************************
   1083    TestCmdId :		TEST_CMD_TELEC
   1084 
   1085    Description:  	Generate carrier wave in a specific channel and band
   1086 
   1087    Params:     	TestCmdChannelBand_t        telec  - see below.
   1088 
   1089 ******************************************************************************/
   1090 typedef struct
   1091 {
   1092 			/*input parameters*/
   1093            Channel_e    channel; 		 /*Channel number*/
   1094            RadioBand_e  band;           /* {BAND_SELECT_24GHZ 0x00 | BAND_SELECT_5GHZ 0x01} */
   1095            uint8        padding[2];     /* padding to 32 bit */
   1096 } TestCmdChannelBand_t;
   1097 
   1098 /******************************************************************************
   1099 
   1100   TestCmdId :		TEST_CMD_PLT_GAIN_GET
   1101 
   1102 	Description: Retrieves the TX chain gain settings.
   1103 
   1104   Params:    		PltGainGet_t       gainGet - see public_radio.h
   1105 
   1106 
   1107 ******************************************************************************/
   1108 
   1109 /******************************************************************************
   1110 
   1111 	TestCmdId:	TEST_CMD_PLT_GET_NVS_UPDATE_BUFFER
   1112 
   1113 	Description: This PLT function provides the all information required by
   1114 					the upper driver in order to update the NVS image.
   1115 					It received a parameter defining the type of update
   1116 					information required and provides an array of elements
   1117 					defining the data bytes to be written to the NVS image
   1118 					and the byte offset in which they should be written.
   1119  Params:     PltNvsResultsBuffer_t nvsUpdateBuffer  - see public_radio.h
   1120 
   1121 
   1122 *****************************************************************************/
   1123 
   1124 
   1125 /******************************************************************************
   1126 
   1127   TestCmdId :	TEST_CMD_PLT_GAIN_ADJUST
   1128 
   1129 	Description: retrieves the TX chain gain settings.
   1130 
   1131 	Params:     int32                txGainAdjust
   1132 
   1133 *****************************************************************************/
   1134 
   1135 /******************************************************************************
   1136 
   1137   TestCmdId :	TEST_CMD_PLT_RX_CALIBRATION
   1138 
   1139 	Description: Used as part of the  RX calibration procedure, call this
   1140 			function for every calibration channel.
   1141 			The response for that function indicates only that command had been received by th FW,
   1142 			and not that the calibration procedure had been finished.
   1143 			The upper layer need to wait amount of ((numOfSamples*intervalBetweenSamplesUsec).
   1144 			To make sure that the RX  calibration  completed. before calling to the next command.
   1145 
   1146 	Params:     PltRxCalibrationRequest_t	 rxCalibration
   1147 
   1148   ******************************************************************************/
   1149 typedef struct PltRxCalibrationRequest_t
   1150 {
   1151 	int32           expectedRssi;				/* The calibration generated signal power (db) */
   1152 	int32	        intervalBetweenSamplesUsec; /* uSec - recommended value 100 */
   1153     uint8	        channel;
   1154     RadioBand_e     band;
   1155     int16	        numOfSamples;				/* recommended value  1000*/
   1156 }PltRxCalibrationRequest_t;
   1157 
   1158 /******************************************************************************
   1159 
   1160 TestCmdId :	TEST_CMD_PLT_TXPOWER_CAL_START
   1161 
   1162 Description:
   1163 
   1164 Params:     PltTxCalibrationRequest_t
   1165 
   1166 ******************************************************************************/
   1167 typedef struct
   1168 {
   1169 	uint8			refTxPower;
   1170 	uint8			padding[3];
   1171 }PltTxCalibrationRequest_t;
   1172 
   1173 /******************************************************************************
   1174 	TestCmd_t - the main PLT structure
   1175 *******************************************************************************/
   1176 typedef struct TestCmd_t
   1177 {
   1178     union
   1179     {
   1180            PERTxCfg_t	         			fcc;
   1181            TestCmdChannelBand_t        			telec;
   1182            PltGainGet_t          			gainGet;
   1183            PltNvsResultsBuffer_t 			nvsUpdateBuffer;
   1184            PltRxCalibrationRequest_t	 	rxCalibration;
   1185            uint32               			txGainAdjust;
   1186            TestCmdChannelBand_t     		radioTune;
   1187 		   PltTxCalibrationRequest_t		txCalibration;
   1188     }testCmd_u;
   1189     TestCmdID_e		testCmdId;
   1190 	int8			padding[3];
   1191 }TestCmd_t;
   1192 
   1193 
   1194 
   1195 /******************************************************************************
   1196 
   1197     ID:		  CMD_NOISE_HIST
   1198 	Desc:	  This command starts/stops the noise histogram measurements.
   1199     Params:	  NoiseHistRequest_t - see below.
   1200 
   1201 ******************************************************************************/
   1202 #define NOISE_HIST_LEN 8
   1203 
   1204 typedef enum
   1205 {
   1206     NOISE_HIST_STOP,
   1207     NOISE_HIST_START,
   1208     NOISE_HIST_INVALID = MAX_POSITIVE16 /* Force to be 16 bits enum*/
   1209 } NoiseHistMode_enum;
   1210 
   1211 #ifdef HOST_COMPILE
   1212 typedef uint16 NoiseHistMode_e;
   1213 #else
   1214 typedef NoiseHistMode_enum NoiseHistMode_e;
   1215 #endif
   1216 
   1217 typedef struct
   1218 {
   1219     NoiseHistMode_e mode;             /* Start or stop the FW engine. */
   1220 	                                  /* Possible values are 1 (Start) and 0 (Stop).*/
   1221 
   1222     uint16 sampleIntervalUSec;        /* The time interval in usec between measurements.*/
   1223 	                                  /* Valid values are between 100us (default) and */
   1224 	                                  /* 2ms (with 100us jumps). This parameter is */
   1225 	                                  /* relevant only when Mode is Start (1).*/
   1226 
   1227     uint8  thresholds[NOISE_HIST_LEN];/* An array of eight 8 bit thresholds. The FW */
   1228 	                                  /* takes noise measurements, once every */
   1229 	                                  /* SampleIntervalUSec interval. If the measured */
   1230 	                                  /* noise level is between the threshold[X] and */
   1231 	                                  /* threshold[X 1], then the FW increments the */
   1232 	                                  /* noise histogram counter[X]. */
   1233 	                                  /* The counters are read via the */
   1234 	                                  /* ACXNoiseHistogramResults IE. This parameter is */
   1235 	                                  /* relevant only when Mode is Start (1).*/
   1236 } NoiseHistRequest_t;
   1237 
   1238 
   1239 /******************************************************************************
   1240 
   1241     ID:		  CMD_RX_RESET
   1242 	Desc:	  This command resets the MAC Rx path. After the command is issued,
   1243 	          the MAC Rx path is reset the next time a frame is received (in the PHY
   1244 			  Rx Header interrupt).
   1245     Params:	  None.
   1246 	Note:     This command is for TI internal use only.
   1247 
   1248 ******************************************************************************/
   1249 
   1250 
   1251 /******************************************************************************
   1252 
   1253     ID:		  CMD_LNA_CONTROL
   1254 	Desc:	  This command controls the LNA state.
   1255     Params:	  LNAControl_t - see below.
   1256 
   1257 ******************************************************************************/
   1258 
   1259 typedef enum
   1260 {
   1261     LNA_MODE_MANUAL,    /* 0: The LNA is set to manual mode and is turned off.*/
   1262 	LNA_MODE_AUTO,      /* 1: The LNA is set to automatic mode.*/
   1263     LNA_MODE_INVALID = 0xFF
   1264 } LnaMode_enum;
   1265 
   1266 #ifdef HOST_COMPILE
   1267 typedef uint8 LnaMode_e;
   1268 #else
   1269 typedef LnaMode_enum LnaMode_e;
   1270 #endif
   1271 
   1272 typedef struct
   1273 {
   1274 	LnaMode_e LNAControlField; /* refer to LnaMode_enum*/
   1275     uint8	  padding[3];      /* for alignment to 32 bits boundry*/
   1276 } LNAControl_t;
   1277 
   1278 
   1279 /******************************************************************************
   1280 
   1281     ID:		  CMD_MEASUREMENT
   1282 	Desc:	  This command instructs the WiLink device to begin a basic channel
   1283 	          load measurement on the specified channel. When the measurement
   1284 			  process actually starts running the WilLink device will raise the
   1285 			  Measurement Started event. When the measurement process completes as
   1286 			  a result of the end of the measurement duration or a STOP_MEASUREMENT
   1287 			  command, the WilLink device will raise a Measurement Complete event.
   1288     Params:	  MeasurementParameters_t - see below.
   1289 
   1290 ******************************************************************************/
   1291 typedef struct
   1292 {
   1293     ACXRxConfigStruct rxFilter; /* This field is the Rx filter configuration for the */
   1294 	                            /* device while the measurement process is running. */
   1295 	                            /* When the process ends the previous Rx filter */
   1296 	                            /* configuration is reset. The filter configuration is*/
   1297 	                            /* composed of two 32 bit registers. When they are set*/
   1298 	                            /* to 0xFFFFFFFF the Rx filter configuration is not*/
   1299 	                            /* changed.*/
   1300 
   1301     uint32 duration;            /* Specifies the measurement process duration in */
   1302 	                            /* microseconds. The value of 0 means infinite duration*/
   1303 	                            /* in which only a STOP_MEASUREMENT command can*/
   1304 	                            /* stop the measurement process.*/
   1305 
   1306     Channel_e channel;          /* Channel number on which the measurement is performed,*/
   1307 	                            /* valid range 0-255 (1-14 for 802.11b).*/
   1308 
   1309     RadioBand_e band;           /* Specifies the band to which the channel belongs. */
   1310 	                            /* 0 - 2.4GHz */
   1311 	                            /* 1 - 5GHz , */
   1312 	                            /* 0xFF - Current band.*/
   1313 
   1314     uint8 padding[2];           /* for alignment to 32 bits boundry*/
   1315 } MeasurementParameters_t;
   1316 
   1317 /******************************************************************************
   1318 
   1319     ID:		  CMD_STOP_MEASUREMENT
   1320 	Desc:	  This command instructs the WiLink to terminate any measurement in
   1321 	          progress. After processing this command, the WiLink returns to its
   1322 			  previous state (the state before the measurement was started) and
   1323 			  generates the Measurment Complete event.
   1324     Params:	  None.
   1325 
   1326 ******************************************************************************/
   1327 
   1328 /******************************************************************************
   1329 
   1330     ID:		  CMD_DISCONNECT
   1331 	Desc:	  This command instructs the WiLink device to stop all BSS or IBSS activity.
   1332 	          The device will cancel all of its TSF dependent events and activities.
   1333 			  Power Save dependent activities are an exception to this, therefore
   1334 			  the host must exit Power Save mode by issuing the SET_PS_MODE command
   1335 			  before calling this command. When this command is complete the Disconnect
   1336 			  Complete event is raised to the host and the WiLink device is allowed
   1337 			  to enter the configured low power state.
   1338     Params:	  DisconnectParameters_t - see below.
   1339 
   1340 ******************************************************************************/
   1341 typedef struct
   1342 {
   1343     ACXRxConfigStruct rxFilter; /* This field is the Rx filter configuration for the*/
   1344 	                            /* device that is set after the disconnection is */
   1345 	                            /* complete. */
   1346 
   1347 
   1348 } DisconnectParameters_t;
   1349 
   1350 
   1351 /******************************************************************************
   1352 
   1353     ID:		  CMD_SET_PS_MODE
   1354 	Desc:	  This command turns ON/OFF Power save protocol on the WiLink.
   1355 	          After HW configuration, FW sends Null data packet to the AP with Power
   1356 			  Management bit set accordingly to the field "Mode" of this command
   1357 			  structure. After processing this command, the FW generates the
   1358 			  PS_COMPLETE event.
   1359     Params:	  PSModeParameters_t - see below.
   1360 
   1361 ******************************************************************************/
   1362 
   1363 typedef enum
   1364 {
   1365     STATION_ACTIVE_MODE,
   1366     STATION_POWER_SAVE_MODE
   1367 } StationPSMode_enum;
   1368 
   1369 #ifdef HOST_COMPILE
   1370 typedef uint8 StationPowerSaveMode_e;
   1371 #else
   1372 typedef StationPSMode_enum StationPowerSaveMode_e;
   1373 #endif
   1374 
   1375 /*
   1376 TxdRateSet_t definition
   1377 Bit     Description
   1378 ===     ===========
   1379 0-12    Every one of bits 0-12 specifies rate described in the column on left. Only
   1380         one bit could be set for the command, all other should be zeroed.
   1381 0       1 MBPS
   1382 1       2 MBPS
   1383 2       5.5 MBPS
   1384 3       6 MBPS
   1385 4       9 MBPS
   1386 5       11 MBPS
   1387 6       12 MBPS
   1388 7       18 MBPS
   1389 8       22 MBPS
   1390 9       24 MBPS
   1391 10      36 MBPS
   1392 11      48 MBPS
   1393 12      54 MBPS
   1394 13      Unused (set to 0).
   1395 14      PBCC - When this bit is set, the WiLink transmits probe requests with PBCC
   1396         modulation.
   1397 15      Preamble - When this bit is set, the WiLink transmits probe requests with a
   1398                    short preamble. When this bit is clear, the WiLink transmits the
   1399 				   frame with a long preamble.
   1400 
   1401 If neither the PBCC bit or OFDM rate are set, then the modulation format for probe
   1402 requests is CCK for 5.5 or 11 Mbps or DBPSK/DQPSK for 1 and 2 Mbps.
   1403 */
   1404 
   1405 typedef struct
   1406 {
   1407     StationPowerSaveMode_e mode;         /* This field specifies the future Power save*/
   1408 	                                     /* protocol mode of the system. */
   1409 	                                     /* When set, Power save protocol is enabled. */
   1410 	                                     /* When cleared, Power save protocol is */
   1411 	                                     /* disabled (refer to StationPSMode_enum).*/
   1412 
   1413     uint8                  needToSendNullData;
   1414     uint8 numberOfRetries;               /* This field specifies the maximum allowed */
   1415 	                                     /* number of retries of the Null data packet */
   1416 	                                     /* that FW will send after switching the */
   1417 	                                     /* Power Save Protocol mode.*/
   1418 
   1419     uint8 hangOverPeriod;                /* This field specifies the hangover period, */
   1420 	                                     /* which is the time in TUs during which the */
   1421 	                                     /* WiLink remains awake after sending an MPDU */
   1422 	                                     /* with the Power Save bit set, indicating that*/
   1423 	                                     /* the station is to go into Power Save mode. */
   1424 	                                     /* Setting bit 0 does not affect the hangover */
   1425 	                                     /* period.*/
   1426 
   1427     TxdRateSet_t rateToTransmitNullData; /* This bitwise field specifies the rate and */
   1428 	                                     /* modulation to transmit the Null data packet*/
   1429 	                                     /* to the AP. refer to above table */
   1430 	                                     /* (TxdRateSet_t). */
   1431 
   1432     uint8 padding[2];                    /* for alignment to 32 bits boundry*/
   1433 } PSModeParameters_t;
   1434 
   1435 /******************************************************************************
   1436 
   1437     ID:		  CMD_CHANNEL_SWITCH
   1438 	Desc:	  This command instructs the WiLink to switch serving channel at the given
   1439 	          time. Once the channel switch is performed, the Channel Switch Complete
   1440 			  event is raised to the host.
   1441     Params:	  ChannelSwitchParameters_t - see below.
   1442 
   1443 ******************************************************************************/
   1444 typedef struct
   1445 {
   1446     Channel_e channel;  /* The new serving channel.*/
   1447     uint8 switchTime;   /* Relative time of the serving channel switch in TBTT units.*/
   1448     Bool_e txSuspend;   /* 1: Suspend TX till switch time; */
   1449 	                    /* 0: Do not suspend TX*/
   1450     Bool_e flush;       /* 1: Flush TX at switch time; */
   1451 	                    /* 0: Do not flush*/
   1452 
   1453 } ChannelSwitchParameters_t;
   1454 
   1455 /******************************************************************************
   1456 
   1457     ID:		  CMD_STOP_CHANNEL_SWICTH
   1458 	Desc:	  This command instructs the WiLink device to cancel performing a
   1459 	          pending channel switch event command.
   1460     Params:	  None.
   1461 
   1462 ******************************************************************************/
   1463 
   1464 /******************************************************************************
   1465 
   1466     ID:		  CMD_AP_DISCOVERY
   1467 	Desc:	  This command instructs the WiLink device to perform an AP discovery
   1468 	          measurement on a single channel. This command can only be issued after
   1469 	          a measurement process has been started by the WiLink device as a result
   1470 	          of a previous Measurement command. The Measurement command specifies the
   1471 	          channel on which the AP discovery is performed. Once the "AP discovery"
   1472 	          measurement is completed either by a STOP_AP_DISCOVERY command or when
   1473 	          the duration has expired, it will send an "AP discovery complete event"
   1474 	          to the host.
   1475     Params:	  ApDiscoveryParameters_t - see below.
   1476 
   1477 ******************************************************************************/
   1478 /*
   1479 TxdRateSet_t definition
   1480 Bit     Description
   1481 ===     ===========
   1482 0-12    Every one of bits 0-12 specifies rate described in the column on left. Only
   1483         one bit could be set for the command, all other should be zeroed.
   1484 0       1 MBPS
   1485 1       2 MBPS
   1486 2       5.5 MBPS
   1487 3       6 MBPS
   1488 4       9 MBPS
   1489 5       11 MBPS
   1490 6       12 MBPS
   1491 7       18 MBPS
   1492 8       22 MBPS
   1493 9       24 MBPS
   1494 10      36 MBPS
   1495 11      48 MBPS
   1496 12      54 MBPS
   1497 13      Unused (set to 0).
   1498 14      PBCC - When this bit is set, the WiLink transmits probe requests with PBCC
   1499         modulation.
   1500         Notes:
   1501            Does not apply (set to 0) for rates 1 and 2 Mbps.
   1502            Does not apply (set to 0) for RevG-OFDM rates.
   1503 15      Preamble - When this bit is set, the WiLink transmits probe requests with a
   1504                    short preamble. When this bit is clear, the WiLink transmits the
   1505 				   frame with a long preamble.
   1506                    Notes:
   1507                      Must be LONG (0) for 1Mbps rate.
   1508 				     Does not apply (set to 0) for RevG-OFDM rates.
   1509 
   1510 If neither the PBCC bit or OFDM rate are set, then the modulation format for probe
   1511 requests is CCK for 5.5 or 11 Mbps or DBPSK/DQPSK for 1 and 2 Mbps.
   1512 */
   1513 typedef struct
   1514 {
   1515     ACXRxConfigStruct rxFilter; /* This field is the Rx filter configuration for the */
   1516 	                            /* device while the AP Discovery process is running. */
   1517 	                            /* When the process ends the previous Rx filter */
   1518 	                            /* configuration is reset. The filter configuration is*/
   1519 	                            /* composed of two 32 bit registers. When they are set */
   1520 	                            /* to 0xFFFFFFFF the Rx filter configuration is not */
   1521 	                            /* changed.*/
   1522 
   1523     uint32 scanDuration;        /* This field specifies the amount of time, in time*/
   1524 	                            /* units (TUs), to perform the AP discovery. The value*/
   1525 	                            /* can range from 0 to 65535 TUs (67.1 seconds). */
   1526 
   1527     uint16 scanOptions;         /* This field specifies whether the AP discovery is */
   1528 	                            /* performed by an active scan or a passive scan. */
   1529 	                            /* 0 - ACTIVE, 1 - PASSIVE.*/
   1530 
   1531     uint8  numOfProbRqst;       /* This field indicates the number of probe requests to*/
   1532 	                            /* send per channel, when active scan is specified. */
   1533                                 /* Note: for EXC measurement this value should be set */
   1534 	                            /*       to 1.*/
   1535 
   1536     uint8 txPowerAttenuation;   /* TX power level to be used for sending probe requests*/
   1537 	                            /* when active scan is specified. */
   1538 	                            /* If 0, leave normal TX power level for this channel. */
   1539 
   1540     TxdRateSet_t txdRateSet;    /* This bitwise field specifies the rate and modulation*/
   1541 	                            /* to transmit the probe request when an active scan is*/
   1542 	                            /* specified. Refer to above descrption ob TxdRateSet.*/
   1543     uint8 padding[3];           /* for alignment to 32 bits boundry*/
   1544 } ApDiscoveryParameters_t;
   1545 
   1546 /******************************************************************************
   1547 
   1548     ID:		  CMD_STOP_AP_DISCOVERY
   1549 	Desc:	  This command instructs the WiLink to terminate the AP Discovery
   1550 	          measurement in progress. After processing this command, the WiLink
   1551 			  returns to its previous state  and generates the AP Discovery Complete
   1552 			  Event.
   1553     Params:	  None.
   1554 
   1555 ******************************************************************************/
   1556 
   1557 /******************************************************************************
   1558 
   1559     ID:		  CMD_SPS_SCAN
   1560 	Desc:	  This command instructs the WiLink to perform a scheduled passive
   1561 	          scan for BSS/IBSSs. The WiLink monitors the specified channel(s)
   1562 			  for beacons. The WiLink sends Scheduled Scan Complete event to notify
   1563 			  the host when it has completed a scan.
   1564     Params:	  InfoElement_t - see below.
   1565 
   1566 ******************************************************************************/
   1567 /* Scheduled - General scan parameters.*/
   1568 typedef struct
   1569 {
   1570     ACXRxConfigStruct rxCfg;         /* Rx filter to be used for each channel scan. */
   1571 	                                 /* The BSSID filter enable will be set (by the scan*/
   1572 	                                 /* process) to ON for a specific channel if the*/
   1573 	                                 /* BSSID of this channel is a unicast address. */
   1574 	                                 /* Otherwise it will be set to OFF (Refer to */
   1575 	                                 /* ACXRxConfigStruct).*/
   1576 
   1577     uint32            scanCmdTime_h; /* This filed is the latest 32 MSBits of TSF known*/
   1578 	                                 /* at the time the SPS command was issued. When the*/
   1579 	                                 /* scan process is about to begin, this value is */
   1580 	                                 /* used to determine if the AP has performed a */
   1581 	                                 /* recovery by comparing this value to the current*/
   1582 	                                 /* TSF. (An AP that has performed a recovery should*/
   1583 	                                 /* have a lower TSF then the one that was saved).*/
   1584 
   1585     uint32            scanCmdTime_l; /* This filed is the latest 32 LSBits of TSF known*/
   1586 	                                 /* at the time the SPS command was issued. */
   1587 
   1588     uint16            scanOptions;   /* This bitwise field indicates the scan options. */
   1589 	                                 /* Bits [0,2:15] are reserved. */
   1590 	                                 /* Bit 1 is defined as follows:*/
   1591 	                                 /*  Band Select - When this bit is set, the WiLink*/
   1592 	                                 /*                scans the specified channels in */
   1593 	                                 /*                the 5GHz band. */
   1594 	                                 /*                When this bit is cleared, the */
   1595 	                                 /*                WiLink scans the specified */
   1596 	                                 /*                channels in the 2.4GHz band. */
   1597 
   1598 
   1599     uint8             numChannels;   /* Number of scan channels in the list (minimum */
   1600 	                                 /* (minimumis 1, maximum is 30).*/
   1601 
   1602     uint8		      padding;       /* for alignment to 32 bits boundry*/
   1603 } ScheduledGeneralParameters_t;
   1604 
   1605 
   1606 /* Scheduled - Per-Channel scan parameters.*/
   1607 typedef struct
   1608 {
   1609     uint32 scanStartTime;      /* Duration in microseconds of the scan on this channel */
   1610 	                           /* (Scan could be aborted before this duration in case of*/
   1611 	                           /* early termination condition met on the channel). */
   1612 
   1613     uint32 scanMaxDuration;    /* Lower 4 bytes of TSF time in microseconds when the */
   1614 	                           /* scan should start listening on the desired channel. */
   1615 
   1616     uint32 bssIdL;             /* 32 LSBits of BSSID of the AP to scan for. If scanning */
   1617 	                           /* on this  channel any BSSID, this field shall be set */
   1618 	                           /* to broadcast BSSID. */
   1619 
   1620     uint16 bssIdH;             /* 16 MSBits of BSSID of the AP to scan for. */
   1621 
   1622     ETCondCount_t ETCondCount; /* bit 0-3: Early Termination count - This field */
   1623 	                           /*          defines the maximum number of beacons*/
   1624 	                           /*          or probe responses or both (according*/
   1625 	                           /*          to condition) to collect before ending*/
   1626 	                           /*          a scan.*/
   1627 
   1628 	                           /* Bit 4-5: Early Termination Condition (refer */
   1629 	                           /*          to ETCondition_enum).*/
   1630     Channel_e     channel;     /* Channel number to scan, valid range 0-255 */
   1631 	                           /* (1-14 for 802.11b).*/
   1632 } ScheduledChannelParameters_t;
   1633 
   1634 
   1635 /* The Scheduled Scan command structure.*/
   1636 typedef struct
   1637 {
   1638     ScheduledGeneralParameters_t scheduledGeneralParameters;
   1639     ScheduledChannelParameters_t scheduledChannelParameters[SCAN_MAX_NUM_OF_CHANNELS];
   1640 } ScheduledScanParameters_t;
   1641 
   1642 /******************************************************************************
   1643 
   1644     ID:		  CMD_STOP_SPS_SCAN
   1645 	Desc:	  This command instructs the WiLink to terminate a currently running
   1646 	          SPS or a pending SPS.. After processing this command, the WiLink
   1647 			  returns to its previous state and generates the Scheduled Scan
   1648 			  Complete Event.
   1649     Params:	  None.
   1650 
   1651 ******************************************************************************/
   1652 
   1653 /******************************************************************************
   1654 
   1655     ID:		  CMD_HEALTH_CHECK
   1656 	Desc:	  This command instructs the WiLink to raise a MAC status event
   1657 	          which contains the current FCS Error counter.
   1658     Params:	  None.
   1659 
   1660 ******************************************************************************/
   1661 
   1662 /******************************************************************************
   1663 
   1664     ID:		  CMD_DEBUG
   1665 	Desc:
   1666     Params:	  debugCommnad_t - see below.
   1667 
   1668 ******************************************************************************/
   1669 #define MAX_DEBUG_PARAMETERS 10
   1670 
   1671 typedef struct
   1672 {
   1673     uint32  id;
   1674     uint32  params[MAX_DEBUG_PARAMETERS];
   1675 } debugCommnad_t;
   1676 
   1677 /* PLT public definitions*/
   1678 #define TEST_CONTINUOUS 0x04       /* transmit frames contimuously */
   1679 
   1680 
   1681 /*This typedef corresponds to the Fig 1 Frame Format for PER test given in PER test doc.*/
   1682 #define PER_MODE_TX 1
   1683 #define PER_MODE_RX 2
   1684 #define INFRA   0x2         /* BSS is in Infrastructure mode */
   1685 #define LOCAL_MEM_LAST      0x02000000
   1686 #define PBCC_MODULATION_MASK 0x80
   1687 #define OFDM_MODULATION_MASK 0x40
   1688 #define BAND_SELECT_5GHZ     0x10
   1689 #define CTL_PREAMBLE         0x01
   1690 
   1691 
   1692 
   1693 #endif /* PUBLIC_COMMANDS_H*/
   1694