PageRenderTime 30ms CodeModel.GetById 24ms RepoModel.GetById 0ms app.codeStats 0ms

/drivers/net/wireless/tiwlan1251/common/src/hal/FirmwareApi/public_commands.h

http://github.com/CyanogenMod/cm-kernel
C Header | 1527 lines | 488 code | 204 blank | 835 comment | 1 complexity | 88c78bfdca78d24d377bb19c4ddd227a MD5 | raw file
Possible License(s): AGPL-1.0, GPL-2.0, LGPL-2.0
  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. #ifndef PUBLIC_COMMANDS_H
  36. #define PUBLIC_COMMANDS_H
  37. #include "public_types.h"
  38. #include "public_radio.h"
  39. typedef enum
  40. {
  41. CMD_RESET = 0,
  42. CMD_INTERROGATE = 1, /*use this to read information elements*/
  43. CMD_CONFIGURE = 2, /*use this to write information elements*/
  44. CMD_ENABLE_RX = 3,
  45. CMD_ENABLE_TX = 4,
  46. CMD_DISABLE_RX = 5,
  47. CMD_DISABLE_TX = 6,
  48. CMD_SCAN = 8,
  49. CMD_STOP_SCAN = 9,
  50. CMD_VBM = 10,
  51. CMD_START_JOIN = 11,
  52. CMD_SET_KEYS = 12,
  53. CMD_READ_MEMORY = 13,
  54. CMD_WRITE_MEMORY = 14,
  55. CMD_BEACON = 19,
  56. CMD_PROBE_RESP = 20,
  57. CMD_NULL_DATA = 21,
  58. CMD_PROBE_REQ = 22,
  59. CMD_TEST = 23,
  60. CMD_RADIO_CALIBRATE = 25, /* OBSOLETE !!!*/
  61. CMD_ENABLE_RX_PATH = 27, /* OBSOLETE !!! (what is the difference from CMD_ENABLE_RX)*/
  62. CMD_NOISE_HIST = 28,
  63. CMD_RX_RESET = 29,
  64. CMD_PS_POLL = 30,
  65. CMD_QOS_NULL_DATA = 31,
  66. CMD_LNA_CONTROL = 32,
  67. CMD_SET_BCN_MODE = 33,
  68. CMD_MEASUREMENT = 34,
  69. CMD_STOP_MEASUREMENT = 35,
  70. CMD_DISCONNECT = 36,
  71. CMD_SET_PS_MODE = 37,
  72. CMD_CHANNEL_SWITCH = 38,
  73. CMD_STOP_CHANNEL_SWICTH = 39,
  74. CMD_AP_DISCOVERY = 40,
  75. CMD_STOP_AP_DISCOVERY = 41,
  76. CMD_SPS_SCAN = 42,
  77. CMD_STOP_SPS_SCAN = 43,
  78. CMD_HEALTH_CHECK = 45,
  79. CMD_DEBUG = 46,
  80. CMD_TRIGGER_SCAN_TO = 47,
  81. NUM_COMMANDS,
  82. MAX_COMMAND_ID = 0xFFFF
  83. } Command_enum;
  84. #ifdef HOST_COMPILE
  85. typedef uint16 Command_e;
  86. #else
  87. typedef Command_enum Command_e;
  88. #endif
  89. #ifdef HOST_COMPILE
  90. #define CMD_MAILBOX_IDLE 0
  91. #define CMD_STATUS_SUCCESS 1
  92. #define CMD_STATUS_UNKNOWN_CMD 2
  93. #define CMD_STATUS_UNKNOWN_IE 3
  94. #define CMD_STATUS_REJECT_MEAS_SG_ACTIVE 11
  95. #define CMD_STATUS_RX_BUSY 13
  96. #define CMD_STATUS_INVALID_PARAM 14
  97. #define CMD_STATUS_TEMPLATE_TOO_LARGE 15
  98. #define CMD_STATUS_OUT_OF_MEMORY 16
  99. #define CMD_STATUS_STA_TABLE_FULL 17
  100. #define CMD_STATUS_RADIO_ERROR 18
  101. #define CMD_STATUS_WRONG_NESTING 19
  102. #define CMD_STATUS_TIMEOUT 21 /* Driver internal use.*/
  103. #define CMD_STATUS_FW_RESET 22 /* Driver internal use.*/
  104. #define MAX_COMMAND_STATUS MAX_POSITIVE16
  105. #else
  106. typedef enum
  107. {
  108. CMD_MAILBOX_IDLE = 0,
  109. CMD_STATUS_SUCCESS = 1,
  110. CMD_STATUS_UNKNOWN_CMD = 2,
  111. CMD_STATUS_UNKNOWN_IE = 3,
  112. CMD_STATUS_REJECT_MEAS_SG_ACTIVE = 11,
  113. CMD_STATUS_RX_BUSY = 13,
  114. CMD_STATUS_INVALID_PARAM = 14,
  115. CMD_STATUS_TEMPLATE_TOO_LARGE = 15,
  116. CMD_STATUS_OUT_OF_MEMORY = 16,
  117. CMD_STATUS_STA_TABLE_FULL = 17,
  118. CMD_STATUS_RADIO_ERROR = 18,
  119. CMD_STATUS_WRONG_NESTING = 19,
  120. CMD_STATUS_TIMEOUT = 21, /* Driver internal use.*/
  121. CMD_STATUS_FW_RESET = 22, /* Driver internal use.*/
  122. MAX_COMMAND_STATUS = MAX_POSITIVE16
  123. } CommandStatus_enum;
  124. #endif
  125. #ifdef HOST_COMPILE
  126. typedef uint16 CommandStatus_e;
  127. #else
  128. typedef CommandStatus_enum CommandStatus_e;
  129. #endif
  130. #ifdef FW_RUNNING_AS_STA
  131. #define MAX_CMD_PARAMS 572
  132. #else
  133. #define MAX_CMD_PARAMS 384
  134. #endif
  135. #define DEBUG_INDICATOR 0x8000
  136. typedef struct
  137. {
  138. Command_e cmdID;
  139. CommandStatus_e cmdStatus;
  140. uint8 parameters[MAX_CMD_PARAMS];
  141. } Command_t;
  142. /******************************************************************************
  143. ID: CMD_RESET
  144. Desc: This command resets all state machines in the WiLink to their power
  145. up state and restarts the eCPU. This command has no parameters. After
  146. issuing this command, the host must reconfigure the adapter before
  147. normal operations resume.
  148. In general, the host should only use this command if the WiLink has
  149. stopped functioning properly.
  150. Params: None.
  151. Note: The WiLink does not return a response/status message for this command.
  152. ******************************************************************************/
  153. /******************************************************************************
  154. ID: CMD_INTERROGATE
  155. Desc: This command requests an information element from the WiLink. The
  156. interface for this command is somewhat different from other commands
  157. since the interface is bi-directional and asymmetric.
  158. The host structure consists of the Command ID, a Command Status
  159. (returned by WiLink) place holder, and the Information Element Heading
  160. (ID and expected length).
  161. The response to that command is a buffer of the information element's
  162. actual values returned by the WiLink just after the command is issued.
  163. The response to that command is a buffer of the information element's
  164. actual values returned by the WiLink just after the command is issued.
  165. Params: InfoElement_t - see below.
  166. ******************************************************************************/
  167. /*
  168. Description of InfoElement structure - defined in "public_infoele.h"
  169. offset length source description
  170. ====== ====== ====== ===========
  171. 0 2 host Information Element ID - contains the ID of the requested
  172. information element (refer to InfoElement_enum in
  173. pblic_infoele.h). In response to this command, the WiLink
  174. writes the requested information element to the response area
  175. for the command mailbox.
  176. 2 4 wilink Length - the length of the response (different for each IE
  177. according to definitions in public_infoele.h).
  178. 4 Length wilink IE payload according to definition in public_infoele.h.
  179. */
  180. /******************************************************************************
  181. ID: CMD_CONFIGURE
  182. Desc: This command configures an information element in the WiLink.
  183. Params: InfoElement_t - see below.
  184. ******************************************************************************/
  185. /*
  186. Description of InfoElement structure - defined in "public_infoele.h"
  187. offset length source description
  188. ====== ====== ====== ===========
  189. 0 2 host Information Element ID - contains the ID of the requested
  190. information element (refer to InfoElement_enum in
  191. pblic_infoele.h). In response to this command, the WiLink
  192. writes the requested information element to the response area
  193. for the command mailbox.
  194. 2 4 host Length - the length of the response (different for each IE
  195. according to definitions in public_infoele.h).
  196. 4 Length host IE payload according to definition in public_infoele.h.
  197. */
  198. /******************************************************************************
  199. ID: CMD_ENABLE_RX
  200. Desc: This command enables the normal reception of frames.
  201. Params: Channel Number - this field indicates the radio channel on which to
  202. receive data. This parameter also sets the channel on
  203. which to transmit. The last channel number used,
  204. regardless of the order in which the ENABLE_RX and
  205. ENABLE_TX commands are issued, is the channel number
  206. for both RX and TX. This command must be issued after
  207. the host has set all necessary configuration elements
  208. appropriately.
  209. ******************************************************************************/
  210. /******************************************************************************
  211. ID: CMD_ENABLE_TX
  212. Desc: This command enables the normal transmission of frames.
  213. Params: Channel Number - this field indicates the radio channel on which to
  214. transmit data. This parameter also sets the channel on
  215. which to receive. The last channel number used,
  216. regardless of the order in which the ENABLE_RX and
  217. ENABLE_TX commands are issued, is the channel number
  218. for both RX and TX. This command must be issued after
  219. the host has set all necessary configuration elements
  220. appropriately.
  221. ******************************************************************************/
  222. /******************************************************************************
  223. ID: CMD_DISABLE_RX
  224. Desc: This command disables the normal reception of packets over the
  225. Baseband interface.
  226. Params: None
  227. ******************************************************************************/
  228. /******************************************************************************
  229. ID: CMD_DISABLE_TX
  230. Desc: This command disables the normal transmission of frames.
  231. Params: None.
  232. ******************************************************************************/
  233. /******************************************************************************
  234. ID: CMD_SCAN
  235. Desc: This command instructs the WiLink to scan for BSS/IBSSs. The host
  236. may perform either an active scan or a passive scan. During an active
  237. scan, the WiLink transmits a probe request on the specified channel(s)
  238. and then listens for beacon/probe responses. During a passive scan, the
  239. WiLink monitors the specified channel(s) for beacons.
  240. The WiLink sends SCAN_COMPLETE event to notify the host when it has
  241. completed a scan.
  242. Params: ScanParameters_t - see below
  243. ******************************************************************************/
  244. /*
  245. Offset Length Definition
  246. 0 8 RX filters for Scan (refer to ACXRxConfigStruct)
  247. 8 2 Scan options (Band select, Voice mode and Scan type = Active/Passive)
  248. 10 1 NumChannels
  249. 11 1 Number of Probe requests (used for Active scan)
  250. 12 2 Probe request rate & modulation
  251. 14 1 AC trigger (for Voice mode only)
  252. 15 1 SSID length
  253. 16 32 SSID string (Null terminated)
  254. 48 2 Channel [0] ScanMinDuration
  255. 50 2 Channel [0] ScanMaxDuration
  256. 52 6 Channel [0] BSSID (4 bytes LOW and 2 bytes HIGH)
  257. 58 1 Channel [0].bit0-3: Early Termination count. Bit 4-5: Condition
  258. 59 1 Channel [0] TX power level for Scan (0 means do not change - other values:1-5)
  259. 60 1 Channel [0] Channel
  260. 61 3 Channel [0] Reserved
  261. 64-404 340 Optional Channel [1] - Channel [15] - same format as Channel [0] fields above.
  262. */
  263. /* Defines for Rx "ConfigOptions".*/
  264. /* Only bits 2-10 can be configured by the Driver".*/
  265. #define CFG_RX_SERIAL BIT_0 /* 0 = use parallel interface, 1 = use serial interface from ACX101- not valid.*/
  266. #define CFG_RX_RAW BIT_1 /* 1 = write all data from baseband to frame buffer including PHY header.*/
  267. #define CFG_RX_FCS BIT_2 /* 1 = write FCS to end of frame in memory, 0 = do not write FCS to memory.*/
  268. #define CFG_RX_ALL_GOOD BIT_3 /* promiscuous mode, receive all good frames.*/
  269. #define CFG_UNI_FILTER_EN BIT_4 /* local MAC address filter enable.*/
  270. #define CFG_BSSID_FILTER_EN BIT_5 /* BSSID filter enable.*/
  271. #define CFG_MC_FILTER_EN BIT_6 /* 0 = receive all multicast, 1 = use one or both multicast address filters.*/
  272. #define CFG_MC_ADDR0_EN BIT_7 /* 1 = receive frames from mc_addr0, 0 = do not use this filter.*/
  273. #define CFG_MC_ADDR1_EN BIT_8 /* 1 = receive frames from mc_addr1, 0 = do not use this filter .*/
  274. #define CFG_BC_REJECT_EN BIT_9 /* 0 = receive all broadcast, 1 = filter all broadcast.*/
  275. #define CFG_SSID_FILTER_EN BIT_10 /* SSID Filter Enable.*/
  276. #define CFG_RX_INT_FCS_ERROR BIT_11 /* 1 = give rx complete interrupt for FCS errors.*/
  277. #define CFG_RX_INT_ENCRYPTED BIT_12 /* 1 = only give rx header interrupt if frame is encrypted.*/
  278. #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.*/
  279. #define CFG_RX_FILTER_NULTI BIT_14 /* 1 = filter multicast/broadcast frame if SA matchs local MAC addr->.*/
  280. #define CFG_RX_RESERVE BIT_15 /* reserve.*/
  281. #define CFG_RX_TIMESTAMP_TSF BIT_16 /* 1 = sample frame's' arrival time in 32bits TSF, 0 = write it in MAC time stamp.*/
  282. /* Defines for Rx "FilterOptions".*/
  283. /* The rx filter enables control what type of receive frames will be rejected or received by the rx hardware*/
  284. /* 1 = frame is written to memory,*/
  285. /* 0 = not written to memory, rejected.*/
  286. #define CFG_RX_RSV_EN BIT_0 /* reserved types and subtypes.*/
  287. #define CFG_RX_RCTS_ACK BIT_1 /* rts, cts, ack frames.*/
  288. #define CFG_RX_PRSP_EN BIT_2 /* probe response.*/
  289. #define CFG_RX_PREQ_EN BIT_3 /* probe request.*/
  290. #define CFG_RX_MGMT_EN BIT_4 /* type = management.*/
  291. #define CFG_RX_FCS_ERROR BIT_5 /* frames with FCS errors.*/
  292. #define CFG_RX_DATA_EN BIT_6 /* type = data.*/
  293. #define CFG_RX_CTL_EN BIT_7 /* type = control.*/
  294. #define CFG_RX_CF_EN BIT_8 /* contention free frames.*/
  295. #define CFG_RX_BCN_EN BIT_9 /* beacons.*/
  296. #define CFG_RX_AUTH_EN BIT_10 /* authentication, deauthentication.*/
  297. #define CFG_RX_ASSOC_EN BIT_11 /* association related frames (all 5 subtypes – assoc req/resp,*/
  298. typedef struct
  299. {
  300. #ifdef FW_RUNNING_AS_AP
  301. uint16 ConfigOptions;
  302. uint16 FilterOptions;
  303. #else
  304. uint32 ConfigOptions;
  305. uint32 FilterOptions;
  306. #endif
  307. } ACXRxConfigStruct;
  308. /*
  309. TxdRateSet_t definition
  310. Bit Description
  311. === ===========
  312. 0-12 Every one of bits 0-12 specifies rate described in the column on left. Only
  313. one bit could be set for the command, all other should be zeroed.
  314. 0 1 MBPS
  315. 1 2 MBPS
  316. 2 5.5 MBPS
  317. 3 6 MBPS
  318. 4 9 MBPS
  319. 5 11 MBPS
  320. 6 12 MBPS
  321. 7 18 MBPS
  322. 8 22 MBPS
  323. 9 24 MBPS
  324. 10 36 MBPS
  325. 11 48 MBPS
  326. 12 54 MBPS
  327. 13 Unused (set to 0).
  328. 14 PBCC - When this bit is set, the WiLink transmits probe requests with PBCC
  329. modulation.
  330. Notes:
  331. Does not apply (set to 0) for rates 1 and 2 Mbps.
  332. Does not apply (set to 0) for RevG-OFDM rates.
  333. 15 Preamble - When this bit is set, the WiLink transmits probe requests with a
  334. short preamble. When this bit is clear, the WiLink transmits the
  335. frame with a long preamble.
  336. Notes:
  337. Must be LONG (0) for 1Mbps rate.
  338. Does not apply (set to 0) for RevG-OFDM rates.
  339. If neither the PBCC bit or OFDM rate are set, then the modulation format for probe
  340. requests is CCK for 5.5 or 11 Mbps or DBPSK/DQPSK for 1 and 2 Mbps.
  341. */
  342. /* ScanOptions bit mask field.*/
  343. #define SCAN_ACTIVE 0
  344. #define SCAN_PASSIVE 1 /* 1 = passive scan, 0 = active scan*/
  345. #define SCAN_5GHZ_BAND 2 /* 1 = scan channel list in 5 Ghz band, 0 = scan channel list in 2.4 Ghz band*/
  346. #define TRIGGERED_SCAN 4 /* 1 = Triggered scan, 0 = Normal scan*/
  347. #define SCAN_PRIORITY_HIGH 8 /* 1 = High priority scan, 0 = Low priority scan*/
  348. typedef uint8 TidTrigger_t;
  349. /* General scan parameters.*/
  350. typedef struct
  351. {
  352. ACXRxConfigStruct rxCfg; /* Rx filter to be used for each channel scan. */
  353. /* The BSSID filter enable will be set (by the */
  354. /* scan process) to ON for a specific channel if*/
  355. /* the BSSID of this channel is a unicast address.*/
  356. /* Otherwise it will be set to OFF (Refer to */
  357. /* ACXRxConfig IE in public_infoele.h).*/
  358. uint16 scanOptions; /* This bitwise field indicates the scan options. */
  359. /* Bits [3:15] are reserved. */
  360. /* Bits [0:2] are defined as follows: */
  361. /* Scan Type (bit 0) - When this bit is set, the */
  362. /* WiLink performs a passive scan. When this bit*/
  363. /* is cleared, the WiLink performs an active scan. */
  364. /* Band Select (bit 1) - When this bit is set, the*/
  365. /* WiLink scans the specified channels in the */
  366. /* 5GHz band. When this bit is cleared, the */
  367. /* WiLink scans the specified channels in the */
  368. /* 2.4GHz band. */
  369. /* Voice mode (bit 2) - When this bit is set, */
  370. /* the request is for a voice scan. When this bit*/
  371. /* is cleared, the request is for a normal scan. */
  372. /* Scan priority (bit 3) - When this bit is set, */
  373. /* the request is for a high priority scan. When*/
  374. /* this bit is cleared, the request is for a low*/
  375. /* priority scan.*/
  376. uint8 numChannels; /* Number of scan channels in the list (minimum is*/
  377. /* 1, maximum is 30).*/
  378. uint8 numOfProbRqst; /* This field indicates the number of probe */
  379. /* requests to send per channel, in active scan. */
  380. TxdRateSet_t txdRateSet; /* This bitwise field specifies the rate and */
  381. /* modulation to transmit the probe request during*/
  382. /* an active scan. The allowable values for this */
  383. /* field are listed in the above table (refer to */
  384. /* TxdRateSet). It is not used for passive scans.*/
  385. TidTrigger_t tidTrigger; /* used for TidTriggered scan only.*/
  386. uint8 ssidLength; /* This field specifies the size of the SSID, */
  387. /* which can be up to 32 bytes long. If this field*/
  388. /* equals to zero, SSID filter is not applied. */
  389. uint32 ssidStr[8]; /* This field specifies the SSID packets from that*/
  390. /* are relevant for the Scan result. The WiLink*/
  391. /* uses this information to filter beacon, probe*/
  392. /* response frames (if the SSID length field of */
  393. /* this command structure is not zero) */
  394. } BasicScanParameters_t;
  395. #define SCAN_ET_COND_MASK 0x30
  396. #define SCAN_ET_COUNT_MASK 0x0F
  397. #define SCAN_MAX_NUM_OF_CHANNELS 16
  398. /* Early Termination condition (bits 4-5) - This field can have one of the following */
  399. /* values (note that bits 0-3 indicates Early Termination count): */
  400. typedef enum
  401. {
  402. ET_COND_DISABLE = 0x00, /* Disable - No early termination condition.*/
  403. ET_COND_BEACON = 0x10, /* Beacon only. When this value is selected, the */
  404. /* Early Termination count field specifies the */
  405. /* maximum number of beacons to collect before */
  406. /* ending a scan. */
  407. ET_COND_PROBE_RESP = 0x20, /* Probe responses only. When this value is */
  408. /* selected, the Early Termination count field */
  409. /* specifies the maximum number of probe responses*/
  410. /* to collect before ending a scan. */
  411. ET_COND_BEACON_PROBE_RESP = 0x30,/* Beacon/probe response. When this value is */
  412. /* selected, the Early Termination count field */
  413. /* specifies the maximum number of beacons or probe*/
  414. /* responses to collect before ending a scan. */
  415. ET_COND_INVALID = 0xFF
  416. } ETCondition_enum;
  417. #ifdef HOST_COMPILE
  418. typedef uint8 ETCondition_e;
  419. #else
  420. typedef ETCondition_enum ETCondition_e;
  421. #endif
  422. typedef uint8 ETCondCount_t;
  423. #define PROCESS_SCAN_IS_HIGH(pScanParameters) ((pScanParameters)->basicScanParameters.scanOptions & SCAN_PRIORITY_HIGH)
  424. #define PROCESS_SCAN_IS_LOW(pScanParameters) ((PROCESS_SCAN_IS_HIGH(pScanParameters)) == 0)
  425. /* Per-Channel scan parameters.*/
  426. typedef struct
  427. {
  428. uint32 scanMinDuration; /* For active scans, this field specifies the */
  429. /* minimum amount of time, in time units (TUs), */
  430. /* to wait for a frame on a channel. This */
  431. /* parameter is not used for passive scans. The*/
  432. /* value can range from 0 to 65535 TUs */
  433. /* (67.1 seconds). */
  434. uint32 scanMaxDuration; /* For active scans, this field specifies the */
  435. /* maximum amount of time, in time units (TUs), */
  436. /* to wait for a probe response on a channel.*/
  437. /* For passive scans, this field specifies the */
  438. /* amount of time, in time units (TUs), to listen*/
  439. /* on a channel. The value can range from 0 to */
  440. /* 65535 TUs (67.1 seconds). */
  441. uint32 bssIdL; /* 32 LSBits of BSSID of the AP to scan for. */
  442. /* If scanning on this channel any BSSID, this */
  443. /* field shall be set to broadcast BSSID. */
  444. uint16 bssIdH; /* 16 MSBits of BSSID of the AP to scan for.*/
  445. ETCondCount_t ETCondCount; /* bit 0-3: Early Termination count - This field */
  446. /* defines the maximum number of beacons*/
  447. /* or probe responses or both (according*/
  448. /* to condition) to collect before ending*/
  449. /* a scan.*/
  450. /* Bit 4-5: Early Termination Condition (refer */
  451. /* to ETCondition_enum).*/
  452. uint8 txPowerAttenuation; /* TX power level to be used per channel scanned. */
  453. /* If 0, leave normal TX power level for this */
  454. /* channel. Range: 0 - 20 [dB].*/
  455. Channel_e channel; /* Channel number to scan, valid range 0-255 */
  456. /* (1-14 for 802.11b). */
  457. uint8 padding[3]; /* for alignment to 32 bits boundry*/
  458. } BasicScanChannelParameters_t;
  459. /* The Scan command structure.*/
  460. typedef struct
  461. {
  462. BasicScanParameters_t basicScanParameters; /* refer to BasicScanParameters_t */
  463. /* definition*/
  464. BasicScanChannelParameters_t basicScanChannelParameters[SCAN_MAX_NUM_OF_CHANNELS];
  465. } ScanParameters_t;
  466. /*****************************************************************************
  467. ID: CMD_TRIGGER_SCAN_TO
  468. Desc: This Command will configure the enhanced Trigger Scan Timeout
  469. information.
  470. To use legacy Trigger Scan, configure the parameter to 0
  471. Params: None
  472. ******************************************************************************/
  473. typedef struct
  474. {
  475. uint32 SlicedScanTimeOut; /* 0 - Split Scan Disable
  476. any other value will represent the timeout
  477. for each channel "mini scan" in uSec */
  478. }enhancedTriggerTO_t;
  479. /*****************************************************************************
  480. ID: CMD_STOP_SCAN
  481. Desc: This command instructs the WiLink to terminate any scan in progress.
  482. After processing this command, the WiLink returns to its previous state
  483. (the state before the scan was started) and generates the SCAN_COMPLETE
  484. information message.
  485. Params: None
  486. ******************************************************************************/
  487. /******************************************************************************
  488. ID: CMD_VBM
  489. Desc: This command specifies the contents of the beacon TIM template stored
  490. in the WiLink.
  491. Params: VBMUpdateRequest_t - see below.
  492. Note: Second part of Beacon template
  493. ******************************************************************************/
  494. typedef struct
  495. {
  496. uint8 identity; /* TIM IE ID*/
  497. uint8 length; /* TIM IE Length*/
  498. uint8 DTIM_count;
  499. uint8 DTIM_period;
  500. uint8 BitMap_ctrl;
  501. uint8 PVB_field[251]; /* Partial Virtual Bitmap*/
  502. } TIMStruct_t;
  503. typedef struct
  504. {
  505. uint16 len; /* length*/
  506. uint8 padding[2]; /* for alignment to 32 bits boundry*/
  507. TIMStruct_t tim;
  508. } VBMUpdateRequest_t;
  509. /******************************************************************************
  510. ID: CMD_START_JOIN
  511. Desc: This command instructs the WiLink to either join a BSS or IBSS, or
  512. start an IBSS. When the device has joined the BSS or IBSS the Join
  513. Complete event is raised to the host.
  514. Params: StartJoinRequest_t - see below.
  515. ******************************************************************************/
  516. #define JOIN_CMD_CTRL_TX_FLUSH 0x80 // When this bit is set, the firmware will flush all Tx
  517. // frames in the pipe and will not transmit them.
  518. #define JOIN_CMD_CTRL_EARLY_WAKEUP_ENABLE 0x01 // When this bit is set, the firmware will support
  519. // early wakeup time
  520. typedef enum
  521. {
  522. BSS_TYPE_IBSS = 0,
  523. BSS_TYPE_STA_BSS = 2,
  524. BSS_TYPE_AP_BSS = 3,
  525. MAX_BSS_TYPE = 0xFF
  526. } BssType_enum;
  527. #ifdef HOST_COMPILE
  528. typedef uint8 BSS_e;
  529. #else
  530. typedef BssType_enum BSS_e;
  531. #endif
  532. #define MAX_SSID_STR_LEN_BYTESX4 8
  533. /*
  534. BasicRateSet_t definition
  535. Bit Description
  536. === ===========
  537. 0 When this bit is set, 1 MBPS is a member of the basic rate set.
  538. 1 When this bit is set, 2 MBPS is a member of the basic rate set.
  539. 2 When this bit is set, 5.5 MBPS is a member of the basic rate set.
  540. 3 Must be set to 0.
  541. 4 Must be set to 0.
  542. 5 When this bit is set, 11 MBPS is a member of the basic rate set.
  543. 6 Must be set to 0.
  544. 7 Must be set to 0.
  545. 8 When this bit is set, 22 MBPS is a member of the basic rate set.
  546. 9-15 Must be set to 0.
  547. Note: For OFDM, the control response frame rates 6, 9, 12, 18, 24 and 36 Mbps are the
  548. default values and are not configurable. Contact your TI representative for
  549. information.
  550. */
  551. typedef struct
  552. {
  553. uint32 bssIdL; /* This field indicates the 32 LSBits of the MAC*/
  554. /* address of the BSS to join. */
  555. /* Note: To correctly generate beacon frames, the */
  556. /* byte order of the BSS ID field must be */
  557. /* reversed. for example, if the MAC address of */
  558. /* the AP is 00 7E 99 11 22 33, program the BSS */
  559. /* ID field as 33 22 11 99 7E 00.*/
  560. uint16 bssIdH; /* This field indicates the 16 MSBits of the MAC*/
  561. /* address of the BSS to join. */
  562. uint16 beaconInterval;/* This field specifies the time between target */
  563. /* beacon transmission times (TBTTs), in time */
  564. /* units (TUs). Valid values are 1 to 1024.*/
  565. #ifdef FW_RUNNING_AS_STA
  566. ACXRxConfigStruct rxFilter; /* This filed is the Rx filter configuration for*/
  567. /* the device while connected to the BSS or IBSS.*/
  568. /* This setting is overridden in case of a */
  569. /* measurement or a scan activity and is reset */
  570. /* after these activities end.*/
  571. #endif
  572. BasicRateSet_t basicRateSet; /* For 802.11b, this field specifies the control*/
  573. /* response frame rate for the BSS or IBSS (that*/
  574. /* is, the BSSBasicRateSet parameter in the */
  575. /* 802.11 Specification). The WiLink uses this */
  576. /* field to determine the rate at which to */
  577. /* transmit control frame responses (such as ACK */
  578. /* or CTS frames). The format of this field is */
  579. /* shown in the above table (refer to */
  580. /* BasicRateSet_t).*/
  581. uint8 dtimInterval; /* This field specifies the number of beacon */
  582. /* intervals between DTIM beacon frames. The host*/
  583. /* is only required to set this field when the */
  584. /* BSS Type is infrastructure BSS (STA) or AP. */
  585. /* For an independent BSS, the host should set */
  586. /* this field to 1.*/
  587. Rate_e txCtrlFrmRate; /* OBSOLETE (replaced by ACX_FW_GEN_FRAME_RATES)*/
  588. Mod_e txCtrlFrmMod; /* OBSOLETE (replaced by ACX_FW_GEN_FRAME_RATES)*/
  589. BSS_e bssType; /* bits 0-2: This bitwise field specifies the type */
  590. /* of BSS to start or join (Refer to BssType_enum). */
  591. /* bit 4: Band - The radio band in which to join*/
  592. /* or start.*/
  593. /* 0 - 2.4GHz band */
  594. /* 1 - 5GHz band*/
  595. /* bits 3, 5-7: Reserved*/
  596. Channel_e channelNumber; /* This field specifies the channel number of the*/
  597. /* BSS to join or start. Valid values are 1 to 14. */
  598. /* If the specified channel is not allowed in the*/
  599. /* regulatory domain, the command is rejected and*/
  600. /* the status code 0x0005 is returned in the */
  601. /* Command Status field.*/
  602. uint8 ssidLength; /* This field specifies the size of the SSID, which*/
  603. /* can be up to 32 bytes long.*/
  604. uint32 ssidStr[MAX_SSID_STR_LEN_BYTESX4];
  605. /* This field specifies the SSID of the BSS to */
  606. /* start or join. The WiLink uses this information*/
  607. /* to filter beacon, probe response and probe */
  608. /* request frames (if configured to do so in bit 10*/
  609. /* in the Receive Configuration field of the */
  610. /* ACXRxConfig information element). */
  611. /* It also uses this information to determine if a*/
  612. /* probe response should be transmitted in */
  613. /* response to a received probe request.*/
  614. uint8 ctrl; /* Join command control field (refer to */
  615. /* JoinCmdCtrl_enum).*/
  616. Rate_e txMgmtFrmRate; /* OBSOLETE (replaced by ACX_FW_GEN_FRAME_RATES)*/
  617. Mod_e txMgmtFrmMod; /* OBSOLETE (replaced by ACX_FW_GEN_FRAME_RATES)*/
  618. uint8 reserved1;
  619. } StartJoinRequest_t;
  620. /******************************************************************************
  621. ID: CMD_SET_KEYS
  622. Desc: The host issues this command to manage the WEP key cache in the WiLink.
  623. The host can issue this command during the configuration or operation
  624. phase.
  625. Params: SetKey_t - see below.
  626. ******************************************************************************/
  627. #define NUM_ACCESS_CATEGORIES_COPY 4
  628. #define MAX_KEY_SIZE 32
  629. typedef enum
  630. {
  631. KEY_ADD_OR_REPLACE = 1, /* Add or replace a key in the WEP cache*/
  632. KEY_REMOVE = 2, /* Remove a key from the WEP cache*/
  633. KEY_SET_ID = 3, /* Set Key ID*/
  634. MAX_KEY_ACTION = MAX_POSITIVE16 /* force this enum to be uint16*/
  635. } KeyAction_enum;
  636. #ifdef HOST_COMPILE
  637. typedef uint16 KeyAction_e;
  638. #else
  639. typedef KeyAction_enum KeyAction_e;
  640. #endif
  641. typedef enum
  642. {
  643. KEY_WEP_DEFAULT = 0,
  644. KEY_WEP_ADDR = 1,
  645. KEY_AES_GROUP = 4,
  646. KEY_AES_PAIRWISE = 5,
  647. KEY_WEP_GROUP = 6,
  648. KEY_TKIP_MIC_GROUP = 10,
  649. KEY_TKIP_MIC_PAIRWISE = 11
  650. } KeyType_enum;
  651. /*
  652. Key Size+Key Data table (valid value)
  653. KeyType_enum Key Type Valid Key Size Key Data Field Format
  654. ============ ======== ============== =====================
  655. 0x00 WEP default key 5, 13, 29 Key Size bytes of key data
  656. 0x01 WEP key mapping key 5, 13, 29 Key Size bytes of key data
  657. 0x04 AES Group Key 16 16 bytes of key data
  658. 0x05 AES Pairwise Key 16 16 bytes of key data
  659. 0x0A TKIP and MIC Group Key 32 16 bytes of TKIP key data
  660. 8 bytes of Rx MIC key data
  661. 8 bytes of Tx MIC key data
  662. 0x0B TKIP and MIC Pairwise Key 32 16 bytes of TKIP key data
  663. 8 bytes of Rx MIC key data
  664. 8 bytes of Tx MIC key data
  665. */
  666. #ifdef HOST_COMPILE
  667. typedef uint8 KeyType_e;
  668. #else
  669. typedef KeyType_enum KeyType_e;
  670. #endif
  671. typedef enum
  672. {
  673. NO_KEY = 0,
  674. KEY_SIZE_WEP_64 = 5,
  675. KEY_SIZE_WEP_128 = 13,
  676. KEY_SIZE_WEP_256 = 29,
  677. KEY_SIZE_TKIP = MAX_KEY_SIZE
  678. } KeySize_enum; /* WEP keysizes reflect 3 bytes appended from IV.*/
  679. #ifdef HOST_COMPILE
  680. typedef uint8 KeySize_e;
  681. #else
  682. typedef KeySize_enum KeySize_e;
  683. #endif
  684. typedef struct
  685. {
  686. uint8 addr[MAC_ADDR_SIZE]; /* This field specifies the MAC address of the station to*/
  687. /* add or remove from the WEP key cache. This field is */
  688. /* ignored if a WEP default key is being added or removed.*/
  689. KeyAction_e action; /* This field specifies the action to be performed.*/
  690. /* Refer to KeyAction_enum.*/
  691. uint16 reserved;
  692. KeySize_e keySize; /* This field indicates the size of the key in bytes */
  693. /* being added. Valid values are listed in the Valid Key */
  694. /* Size column in the above "Key Size+Key Data table". */
  695. KeyType_e type; /* This field indicates the type of key being added.*/
  696. /* Valid values are listed in the Value column in the*/
  697. /* KeyType_enum.*/
  698. uint8 ssidProfile; /* This field indicates the SSID profile for which the */
  699. /* key is set.*/
  700. uint8 id; /* Key ID - For TKIP and AES key types, this field */
  701. /* indicates the value that should be inserted into the*/
  702. /* KeyID field of frames transmitted using this key */
  703. /* entry. For WEP default key types, this field indicates*/
  704. /* the ID of the key to add or remove. */
  705. /* For WEP key mapping key types, this field is ignored.*/
  706. /* Valid values for this field are 0 to 3.*/
  707. uint8 reserved2[6];
  708. uint8 key[MAX_KEY_SIZE];
  709. /* This field holds the security key data to add to the*/
  710. /* STA table. The format of this field varies depending*/
  711. /* on the type field. The format of this field for each*/
  712. /* key type is described in the Key Data Field Format */
  713. /* column in the "Key Size+Key Data table", above.*/
  714. uint16 AcSeqNum16[NUM_ACCESS_CATEGORIES_COPY];
  715. /* This field indicates the lower part of the PN\IV */
  716. /* sequence number that is used, for the four Access*/
  717. /* Categories.*/
  718. uint32 AcSeqNum32[NUM_ACCESS_CATEGORIES_COPY];
  719. /* This field indicates the higher part of the PN\IV */
  720. /* sequence number that is used, for four Access */
  721. /* Categories.*/
  722. } SetKey_t;
  723. /******************************************************************************
  724. ID: CMD_READ_MEMORY
  725. Desc: The host issues this command to read the WiLink device
  726. memory/registers.
  727. Params: ReadWriteCommand_t - see below.
  728. Note: The Base Band address has special handling (16 bits registers and
  729. addresses). For more information, see the hardware specification.
  730. ******************************************************************************/
  731. /******************************************************************************
  732. ID: CMD_WRITE_MEMORY
  733. Desc: The host issues this command to write the WiLink device memory/registers.
  734. Params: ReadWriteCommand_t - see below.
  735. Note: The Base Band address has special handling (16 bits registers and
  736. addresses). For more information, see the hardware specification.
  737. ******************************************************************************/
  738. #define MAX_READ_SIZE 256
  739. typedef struct
  740. {
  741. uint32 addr; /* The address of the memory to read from or write to.*/
  742. uint32 size; /* The amount of data in bytes to read from or write */
  743. /* to the WiLink device.*/
  744. uint8 value[MAX_READ_SIZE]; /* The actual value read from or written to the Wilink.*/
  745. /* The source of this field is the Host in WRITE */
  746. /* command or the Wilink in READ command.*/
  747. } ReadWriteCommand_t;
  748. /******************************************************************************
  749. ID: CMD_BEACON
  750. Desc: This command specifies the contents of the beacon template stored in
  751. the WiLink.
  752. Params: PktTemplate_t - see below.
  753. ******************************************************************************/
  754. /******************************************************************************
  755. ID: CMD_PROBE_RESP
  756. Desc: This command specifies the contents of the probe response template
  757. stored in the WiLink.
  758. Params: PktTemplate_t - see below.
  759. ******************************************************************************/
  760. /******************************************************************************
  761. ID: CMD_NULL_DATA
  762. Desc: This command specifies the contents of the Null data template
  763. stored in the WiLink.
  764. Params: PktTemplate_t - see below.
  765. ******************************************************************************/
  766. /******************************************************************************
  767. ID: CMD_PROBE_REQ
  768. Desc: This command specifies the contents of the probe request template
  769. stored in the WiLink.
  770. Params: PktTemplate_t - see below.
  771. ******************************************************************************/
  772. /******************************************************************************
  773. ID: CMD_PS_POLL
  774. Desc: This command specifies the contents of the PS-poll template
  775. stored in the WiLink.
  776. Params: PktTemplate_t - see below.
  777. ******************************************************************************/
  778. /******************************************************************************
  779. ID: CMD_QOS_NULL_DATA
  780. Desc: This command specifies the contents of the QOS-Null template
  781. stored in the WiLink.
  782. Params: PktTemplate_t - see below.
  783. ******************************************************************************/
  784. /* Template command data structure.*/
  785. #define MAX_TEMPLATES_SIZE 300
  786. typedef struct
  787. {
  788. uint16 len;
  789. uint8 templateStart[MAX_TEMPLATES_SIZE];
  790. } PktTemplate_t;
  791. /******************************************************************************
  792. ID: CMD_TEST
  793. Desc: The TEST command can be issued immediately after the firmware has
  794. been downloaded, with no further configuration of the WiLink required.
  795. Full initialization of the WiLink is not required to invoke the TEST
  796. command and perform the radio test function.
  797. After testing, the system must be reset.
  798. Test parameters can be modified while a test is executing.
  799. For instance, the host program can change the channel without resetting
  800. the system.
  801. Params: TestCmd_t - see below.
  802. The returned values are copied to the cmd/sts MB replacing the command
  803. (similar to the interrogate mechanism).
  804. ******************************************************************************/
  805. typedef enum
  806. {
  807. TEST_CMD_FCC = 0x01,
  808. TEST_CMD_TELEC = 0x02,
  809. TEST_CMD_PLT_FCC_TELEC_TX_STOP = 0x04,
  810. TEST_CMD_PLT_GAIN_GET = 0x05,
  811. TEST_CMD_PLT_GAIN_ADJUST = 0x06,
  812. TEST_CMD_PLT_TXPOWER_CAL_START = 0x07,
  813. TEST_CMD_PLT_TXPOWER_CAL_STOP = 0x08,
  814. TEST_CMD_PLT_GET_NVS_UPDATE_BUFFER = 0x09,
  815. TEST_CMD_PLT_RX_CALIBRATION = 0x0a,
  816. TEST_CMD_RADIO_TUNE = 0x0b,
  817. TEST_CMD_RX_PER_START = 0x0c,
  818. TEST_CMD_RX_PER_STOP = 0x0d,
  819. MAX_TEST_CMD_ID = 0xFF
  820. } TestCmdID_enum;
  821. #ifdef HOST_COMPILE
  822. typedef uint8 TestCmdID_e;
  823. #else
  824. typedef TestCmdID_enum TestCmdID_e;
  825. #endif
  826. /******************************************************************************/
  827. typedef enum
  828. {
  829. TEST_MODE_HOST_ORIGINATED_DATA = 0x00,
  830. TEST_MODE_FIXED_SEQ_NUMBER = 0x00,
  831. TEST_MODE_FW_ORIGINATED_DATA = 0x01,
  832. TEST_MODE_RANDOM_DATA = 0x05,
  833. TEST_MODE_ZOZO_DATA = 0x09,
  834. TEST_MODE_FILLING_PATERN_MASK = 0x0F,
  835. TEST_MODE_DELAY_REQUIRED = 0x10,
  836. TEST_MODE_DISABLE_SRCRAMBLING_FLAG = 0x20
  837. }TestModeCtrlTypes_e;
  838. #ifdef HOST_COMPILE
  839. typedef uint8 FccTestType_e;
  840. #else
  841. typedef TestModeCtrlTypes_e FccTestType_e;
  842. #endif
  843. /******************************************************************************/
  844. #define TEST_SEQ_NUM_MODE_FIXED (0)
  845. #define TEST_SEQ_NUM_MODE_INCREMENTED (1)
  846. /******************************************************************************
  847. TestCmdId : TEST_CMD_FCC - Tx continuous test
  848. Description: Continuous transmit series of numbers with a valid MAC header
  849. as was received from driver.
  850. However there is no 802.11 air access compliance.
  851. Params: PERTxCfg_t fcc - see below.
  852. ******************************************************************************/
  853. #define NUM_OF_MAC_ADDR_ELEMENTS 6
  854. typedef struct PERTxCfg_t
  855. {
  856. /*input parameters*/
  857. uint32 numFrames; /* number of frams to transmit, 0 = endless*/
  858. uint32 interFrameGap; /* time gap in uSec */
  859. uint32 seqNumMode; /* Fixed / Incremented */
  860. uint32 frameBodySize; /* length of Mac Payload */
  861. uint8 channel; /*channel number*/
  862. uint8 dataRate; /* MBps 1,2,11,22,... 54 */
  863. uint8 modPreamble; /* CTL_PREAMBLE 0x01 */
  864. uint8 band; /* {BAND_SELECT_24GHZ 0x00 | BAND_SELECT_5GHZ 0x01} */
  865. uint8 modulation; /* {PBCC_MODULATION_MASK |OFDM_MODULATION_MASK }*/
  866. FccTestType_e testModeCtrl;
  867. uint8 dest[NUM_OF_MAC_ADDR_ELEMENTS]; /* set to hard codded default {0,0,0xde,0xad,0xbe,0xef}; */
  868. } PERTxCfg_t;
  869. /******************************************************************************
  870. TestCmdId : TEST_CMD_TELEC
  871. Description: Generate carrier wave in a specific channel and band
  872. Params: TestCmdChannelBand_t telec - see below.
  873. ******************************************************************************/
  874. typedef struct
  875. {
  876. /*input parameters*/
  877. Channel_e channel; /*Channel number*/
  878. RadioBand_e band; /* {BAND_SELECT_24GHZ 0x00 | BAND_SELECT_5GHZ 0x01} */
  879. uint8 padding[2]; /* padding to 32 bit */
  880. } TestCmdChannelBand_t;
  881. /******************************************************************************
  882. TestCmdId : TEST_CMD_PLT_GAIN_GET
  883. Description: Retrieves the TX chain gain settings.
  884. Params: PltGainGet_t gainGet - see public_radio.h
  885. ******************************************************************************/
  886. /******************************************************************************
  887. TestCmdId: TEST_CMD_PLT_GET_NVS_UPDATE_BUFFER
  888. Description: This PLT function provides the all information required by
  889. the upper driver in order to update the NVS image.
  890. It received a parameter defining the type of update
  891. information required and provides an array of elements
  892. defining the data bytes to be written to the NVS image
  893. and the byte offset in which they should be written.
  894. Params: PltNvsResultsBuffer_t nvsUpdateBuffer - see public_radio.h
  895. *****************************************************************************/
  896. /******************************************************************************
  897. TestCmdId : TEST_CMD_PLT_GAIN_ADJUST
  898. Description: retrieves the TX chain gain settings.
  899. Params: int32 txGainAdjust
  900. *****************************************************************************/
  901. /******************************************************************************
  902. TestCmdId : TEST_CMD_PLT_RX_CALIBRATION
  903. Description: Used as part of the RX calibration procedure, call this
  904. function for every calibration channel.
  905. The response for that function indicates only that command had been received by th FW,
  906. and not that the calibration procedure had been finished.
  907. The upper layer need to wait amount of ((numOfSamples*intervalBetweenSamplesUsec).
  908. To make sure that the RX calibration completed. before calling to the next command.
  909. Params: PltRxCalibrationRequest_t rxCalibration
  910. ******************************************************************************/
  911. typedef struct PltRxCalibrationRequest_t
  912. {
  913. int32 expectedRssi; /* The calibration generated signal power (db) */
  914. int32 intervalBetweenSamplesUsec; /* uSec - recommended value 100 */
  915. uint8 channel;
  916. RadioBand_e band;
  917. int16 numOfSamples; /* recommended value 1000*/
  918. }PltRxCalibrationRequest_t;
  919. /******************************************************************************
  920. TestCmdId : TEST_CMD_PLT_TXPOWER_CAL_START
  921. Description:
  922. Params: PltTxCalibrationRequest_t
  923. ******************************************************************************/
  924. typedef struct
  925. {
  926. uint8 refTxPower;
  927. uint8 padding[3];
  928. }PltTxCalibrationRequest_t;
  929. /******************************************************************************
  930. TestCmd_t - the main PLT structure
  931. *******************************************************************************/
  932. typedef struct TestCmd_t
  933. {
  934. union
  935. {
  936. PERTxCfg_t fcc;
  937. TestCmdChannelBand_t telec;
  938. PltGainGet_t gainGet;
  939. PltNvsResultsBuffer_t nvsUpdateBuffer;
  940. PltRxCalibrationRequest_t rxCalibration;
  941. uint32 txGainAdjust;
  942. TestCmdChannelBand_t radioTune;
  943. PltTxCalibrationRequest_t txCalibration;
  944. }testCmd_u;
  945. TestCmdID_e testCmdId;
  946. int8 padding[3];
  947. }TestCmd_t;
  948. /******************************************************************************
  949. ID: CMD_NOISE_HIST
  950. Desc: This command starts/stops the noise histogram measurements.
  951. Params: NoiseHistRequest_t - see below.
  952. ******************************************************************************/
  953. #define NOISE_HIST_LEN 8
  954. typedef enum
  955. {
  956. NOISE_HIST_STOP,
  957. NOISE_HIST_START,
  958. NOISE_HIST_INVALID = MAX_POSITIVE16 /* Force to be 16 bits enum*/
  959. } NoiseHistMode_enum;
  960. #ifdef HOST_COMPILE
  961. typedef uint16 NoiseHistMode_e;
  962. #else
  963. typedef NoiseHistMode_enum NoiseHistMode_e;
  964. #endif
  965. typedef struct
  966. {
  967. NoiseHistMode_e mode; /* Start or stop the FW engine. */
  968. /* Possible values are 1 (Start) and 0 (Stop).*/
  969. uint16 sampleIntervalUSec; /* The time interval in usec between measurements.*/
  970. /* Valid values are between 100us (default) and */
  971. /* 2ms (with 100us jumps). This parameter is */
  972. /* relevant only when Mode is Start (1).*/
  973. uint8 thresholds[NOISE_HIST_LEN];/* An array of eight 8 bit thresholds. The FW */
  974. /* takes noise measurements, once every */
  975. /* SampleIntervalUSec interval. If the measured */
  976. /* noise level is between the threshold[X] and */
  977. /* threshold[X 1], then the FW increments the */
  978. /* noise histogram counter[X]. */
  979. /* The counters are read via the */
  980. /* ACXNoiseHistogramResults IE. This parameter is */
  981. /* relevant only when Mode is Start (1).*/
  982. } NoiseHistRequest_t;
  983. /******************************************************************************
  984. ID: CMD_RX_RESET
  985. Desc: This command resets the MAC Rx path. After the command is issued,
  986. the MAC Rx path is reset the next time a frame is received (in the PHY
  987. Rx Header interrupt).
  988. Params: None.
  989. Note: This command is for TI internal use only.
  990. ******************************************************************************/
  991. /******************************************************************************
  992. ID: CMD_LNA_CONTROL
  993. Desc: This command controls the LNA state.
  994. Params: LNAControl_t - see below.
  995. ******************************************************************************/
  996. typedef enum
  997. {
  998. LNA_MODE_MANUAL, /* 0: The LNA is set to manual mode and is turned off.*/
  999. LNA_MODE_AUTO, /* 1: The LNA is set to automatic mode.*/
  1000. LNA_MODE_INVALID = 0xFF
  1001. } LnaMode_enum;
  1002. #ifdef HOST_COMPILE
  1003. typedef uint8 LnaMode_e;
  1004. #else
  1005. typedef LnaMode_enum LnaMode_e;
  1006. #endif
  1007. typedef struct
  1008. {
  1009. LnaMode_e LNAControlField; /* refer to LnaMode_enum*/
  1010. uint8 padding[3]; /* for alignment to 32 bits boundry*/
  1011. } LNAControl_t;
  1012. /******************************************************************************
  1013. ID: CMD_MEASUREMENT
  1014. Desc: This command instructs the WiLink device to begin a basic channel
  1015. load measurement on the specified channel. When the measurement
  1016. process actually starts running the WilLink device will raise the
  1017. Measurement Started event. When the measurement process completes as
  1018. a result of the end of the measurement duration or a STOP_MEASUREMENT
  1019. command, the WilLink device will raise a Measurement Complete event.
  1020. Params: MeasurementParameters_t - see below.
  1021. ******************************************************************************/
  1022. typedef struct
  1023. {
  1024. ACXRxConfigStruct rxFilter; /* This field is the Rx filter configuration for the */
  1025. /* device while the measurement process is running. */
  1026. /* When the process ends the previous Rx filter */
  1027. /* configuration is reset. The filter configuration is*/
  1028. /* composed of two 32 bit registers. When they are set*/
  1029. /* to 0xFFFFFFFF the Rx filter configuration is not*/
  1030. /* changed.*/
  1031. uint32 duration; /* Specifies the measurement process duration in */
  1032. /* microseconds. The value of 0 means infinite duration*/
  1033. /* in which only a STOP_MEASUREMENT command can*/
  1034. /* stop the measurement process.*/
  1035. Channel_e channel; /* Channel number on which the measurement is performed,*/
  1036. /* valid range 0-255 (1-14 for 802.11b).*/
  1037. RadioBand_e band; /* Specifies the band to which the channel belongs. */
  1038. /* 0 - 2.4GHz */
  1039. /* 1 - 5GHz , */
  1040. /* 0xFF - Current band.*/
  1041. uint8 padding[2]; /* for alignment to 32 bits boundry*/
  1042. } MeasurementParameters_t;
  1043. /******************************************************************************
  1044. ID: CMD_STOP_MEASUREMENT
  1045. Desc: This command instructs the WiLink to terminate any measurement in
  1046. progress. After processing this command, the WiLink returns to its
  1047. previous state (the state before the measurement was started) and
  1048. generates the Measurment Complete event.
  1049. Params: None.
  1050. ******************************************************************************/
  1051. /******************************************************************************
  1052. ID: CMD_DISCONNECT
  1053. Desc: This command instructs the WiLink device to stop all BSS or IBSS activity.
  1054. The device will cancel all of its TSF dependent events and activities.
  1055. Power Save dependent activities are an exception to this, therefore
  1056. the host must exit Power Save mode by issuing the SET_PS_MODE command
  1057. before calling this command. When this command is complete the Disconnect
  1058. Complete event is raised to the host and the WiLink device is allowed
  1059. to enter the configured low power state.
  1060. Params: DisconnectParameters_t - see below.
  1061. ******************************************************************************/
  1062. typedef struct
  1063. {
  1064. ACXRxConfigStruct rxFilter; /* This field is the Rx filter configuration for the*/
  1065. /* device that is set after the disconnection is */
  1066. /* complete. */
  1067. } DisconnectParameters_t;
  1068. /******************************************************************************
  1069. ID: CMD_SET_PS_MODE
  1070. Desc: This command turns ON/OFF Power save protocol on the WiLink.
  1071. After HW configuration, FW sends Null data packet to the AP with Power
  1072. Management bit set accordingly to the field "Mode" of this command
  1073. structure. After processing this command, the FW generates the
  1074. PS_COMPLETE event.
  1075. Params: PSModeParameters_t - see below.
  1076. ******************************************************************************/
  1077. typedef enum
  1078. {
  1079. STATION_ACTIVE_MODE,
  1080. STATION_POWER_SAVE_MODE
  1081. } StationPSMode_enum;
  1082. #ifdef HOST_COMPILE
  1083. typedef uint8 StationPowerSaveMode_e;
  1084. #else
  1085. typedef StationPSMode_enum StationPowerSaveMode_e;
  1086. #endif
  1087. /*
  1088. TxdRateSet_t definition
  1089. Bit Description
  1090. === ===========
  1091. 0-12 Every one of bits 0-12 specifies rate described in the column on left. Only
  1092. one bit could be set for the command, all other should be zeroed.
  1093. 0 1 MBPS
  1094. 1 2 MBPS
  1095. 2 5.5 MBPS
  1096. 3 6 MBPS
  1097. 4 9 MBPS
  1098. 5 11 MBPS
  1099. 6 12 MBPS
  1100. 7 18 MBPS
  1101. 8 22 MBPS
  1102. 9 24 MBPS
  1103. 10 36 MBPS
  1104. 11 48 MBPS
  1105. 12 54 MBPS
  1106. 13 Unused (set to 0).
  1107. 14 PBCC - When this bit is set, the WiLink transmits probe requests with PBCC
  1108. modulation.
  1109. 15 Preamble - When this bit is set, the WiLink transmits probe requests with a
  1110. short preamble. When this bit is clear, the WiLink transmits the
  1111. frame with a long preamble.
  1112. If neither the PBCC bit or OFDM rate are set, then the modulation format for probe
  1113. requests is CCK for 5.5 or 11 Mbps or DBPSK/DQPSK for 1 and 2 Mbps.
  1114. */
  1115. typedef struct
  1116. {
  1117. StationPowerSaveMode_e mode; /* This field specifies the future Power save*/
  1118. /* protocol mode of the system. */
  1119. /* When set, Power save protocol is enabled. */
  1120. /* When cleared, Power save protocol is */
  1121. /* disabled (refer to StationPSMode_enum).*/
  1122. uint8 needToSendNullData;
  1123. uint8 numberOfRetries; /* This field specifies the maximum allowed */
  1124. /* number of retries of the Null data packet */
  1125. /* that FW will send after switching the */
  1126. /* Power Save Protocol mode.*/
  1127. uint8 hangOverPeriod; /* This field specifies the hangover period, */
  1128. /* which is the time in TUs during which the */
  1129. /* WiLink remains awake after sending an MPDU */
  1130. /* with the Power Save bit set, indicating that*/
  1131. /* the station is to go into Power Save mode. */
  1132. /* Setting bit 0 does not affect the hangover */
  1133. /* period.*/
  1134. TxdRateSet_t rateToTransmitNullData; /* This bitwise field specifies the rate and */
  1135. /* modulation to transmit the Null data packet*/
  1136. /* to the AP. refer to above table */
  1137. /* (TxdRateSet_t). */
  1138. uint8 padding[2]; /* for alignment to 32 bits boundry*/
  1139. } PSModeParameters_t;
  1140. /******************************************************************************
  1141. ID: CMD_CHANNEL_SWITCH
  1142. Desc: This command instructs the WiLink to switch serving channel at the given
  1143. time. Once the channel switch is performed, the Channel Switch Complete
  1144. event is raised to the host.
  1145. Params: ChannelSwitchParameters_t - see below.
  1146. ******************************************************************************/
  1147. typedef struct
  1148. {
  1149. Channel_e channel; /* The new serving channel.*/
  1150. uint8 switchTime; /* Relative time of the serving channel switch in TBTT units.*/
  1151. Bool_e txSuspend; /* 1: Suspend TX till switch time; */
  1152. /* 0: Do not suspend TX*/
  1153. Bool_e flush; /* 1: Flush TX at switch time; */
  1154. /* 0: Do not flush*/
  1155. } ChannelSwitchParameters_t;
  1156. /******************************************************************************
  1157. ID: CMD_STOP_CHANNEL_SWICTH
  1158. Desc: This command instructs the WiLink device to cancel performing a
  1159. pending channel switch event command.
  1160. Params: None.
  1161. ******************************************************************************/
  1162. /******************************************************************************
  1163. ID: CMD_AP_DISCOVERY
  1164. Desc: This command instructs the WiLink device to perform an AP discovery
  1165. measurement on a single channel. This command can only be issued after
  1166. a measurement process has been started by the WiLink device as a result
  1167. of a previous Measurement command. The Measurement command specifies the
  1168. channel on which the AP discovery is performed. Once the "AP discovery"
  1169. measurement is completed either by a STOP_AP_DISCOVERY command or when
  1170. the duration has expired, it will send an "AP discovery complete event"
  1171. to the host.
  1172. Params: ApDiscoveryParameters_t - see below.
  1173. ******************************************************************************/
  1174. /*
  1175. TxdRateSet_t definition
  1176. Bit Description
  1177. === ===========
  1178. 0-12 Every one of bits 0-12 specifies rate described in the column on left. Only
  1179. one bit could be set for the command, all other should be zeroed.
  1180. 0 1 MBPS
  1181. 1 2 MBPS
  1182. 2 5.5 MBPS
  1183. 3 6 MBPS
  1184. 4 9 MBPS
  1185. 5 11 MBPS
  1186. 6 12 MBPS
  1187. 7 18 MBPS
  1188. 8 22 MBPS
  1189. 9 24 MBPS
  1190. 10 36 MBPS
  1191. 11 48 MBPS
  1192. 12 54 MBPS
  1193. 13 Unused (set to 0).
  1194. 14 PBCC - When this bit is set, the WiLink transmits probe requests with PBCC
  1195. modulation.
  1196. Notes:
  1197. Does not apply (set to 0) for rates 1 and 2 Mbps.
  1198. Does not apply (set to 0) for RevG-OFDM rates.
  1199. 15 Preamble - When this bit is set, the WiLink transmits probe requests with a
  1200. short preamble. When this bit is clear, the WiLink transmits the
  1201. frame with a long preamble.
  1202. Notes:
  1203. Must be LONG (0) for 1Mbps rate.
  1204. Does not apply (set to 0) for RevG-OFDM rates.
  1205. If neither the PBCC bit or OFDM rate are set, then the modulation format for probe
  1206. requests is CCK for 5.5 or 11 Mbps or DBPSK/DQPSK for 1 and 2 Mbps.
  1207. */
  1208. typedef struct
  1209. {
  1210. ACXRxConfigStruct rxFilter; /* This field is the Rx filter configuration for the */
  1211. /* device while the AP Discovery process is running. */
  1212. /* When the process ends the previous Rx filter */
  1213. /* configuration is reset. The filter configuration is*/
  1214. /* composed of two 32 bit registers. When they are set */
  1215. /* to 0xFFFFFFFF the Rx filter configuration is not */
  1216. /* changed.*/
  1217. uint32 scanDuration; /* This field specifies the amount of time, in time*/
  1218. /* units (TUs), to perform the AP discovery. The value*/
  1219. /* can range from 0 to 65535 TUs (67.1 seconds). */
  1220. uint16 scanOptions; /* This field specifies whether the AP