Advertisement
Guest User

Untitled

a guest
Dec 15th, 2017
797
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 797.01 KB | None | 0 0
  1. /*
  2. * Copyright (c) 2010-2017 The Linux Foundation. All rights reserved.
  3. *
  4. * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  5. *
  6. *
  7. * Permission to use, copy, modify, and/or distribute this software for
  8. * any purpose with or without fee is hereby granted, provided that the
  9. * above copyright notice and this permission notice appear in all
  10. * copies.
  11. *
  12. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  13. * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  14. * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
  15. * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  16. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  17. * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  18. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  19. * PERFORMANCE OF THIS SOFTWARE.
  20. */
  21.  
  22. /*
  23. * This file was originally distributed by Qualcomm Atheros, Inc.
  24. * under proprietary terms before Copyright ownership was assigned
  25. * to the Linux Foundation.
  26. */
  27.  
  28. /**
  29. * @addtogroup WMIAPI
  30. *@{
  31. */
  32.  
  33. /** @file
  34. * This file specifies the WMI interface for the Software Architecture.
  35. *
  36. * It includes definitions of all the commands and events. Commands are messages
  37. * from the host to the target. Events and Replies are messages from the target
  38. * to the host.
  39. *
  40. * Ownership of correctness in regards to WMI commands
  41. * belongs to the host driver and the target is not required to validate
  42. * parameters for value, proper range, or any other checking.
  43. *
  44. * Guidelines for extending this interface are below.
  45. *
  46. * 1. Add new WMI commands ONLY within the specified range - 0x9000 - 0x9fff
  47. * 2. Use ONLY A_UINT32 type for defining member variables within WMI command/event
  48. * structures. Do not use A_UINT8, A_UINT16, A_BOOL or enum types within these structures.
  49. * 3. DO NOT define bit fields within structures. Implement bit fields using masks
  50. * if necessary. Do not use the programming language's bit field definition.
  51. * 4. Define macros for encode/decode of A_UINT8, A_UINT16 fields within the A_UINT32
  52. * variables. Use these macros for set/get of these fields. Try to use this to
  53. * optimize the structure without bloating it with A_UINT32 variables for every lower
  54. * sized field.
  55. * 5. Do not use PACK/UNPACK attributes for the structures as each member variable is
  56. * already 4-byte aligned by virtue of being a A_UINT32 type.
  57. * 6. Comment each parameter part of the WMI command/event structure by using the
  58. * 2 stars at the begining of C comment instead of one star to enable HTML document
  59. * generation using Doxygen.
  60. *
  61. */
  62.  
  63. #ifndef _WMI_UNIFIED_H_
  64. #define _WMI_UNIFIED_H_
  65.  
  66.  
  67. #ifdef __cplusplus
  68. extern "C" {
  69. #endif
  70.  
  71. #include <wlan_defs.h>
  72. #include <wmi_services.h>
  73.  
  74. #define ATH_MAC_LEN 6 /**< length of MAC in bytes */
  75. #define WMI_EVENT_STATUS_SUCCESS 0 /* Success return status to host */
  76. #define WMI_EVENT_STATUS_FAILURE 1 /* Failure return status to host */
  77.  
  78. #define MAX_TX_RATE_VALUES 10 /*Max Tx Rates*/
  79. #define MAX_RSSI_VALUES 10 /*Max Rssi values*/
  80. #define WMI_MAX_CHAINS 8
  81.  
  82. /* The WLAN_MAX_AC macro cannot be changed without breaking
  83. WMI compatibility. */
  84. /* The maximum value of access category */
  85. #define WLAN_MAX_AC 4
  86.  
  87. /*
  88. * These don't necessarily belong here; but as the MS/SM macros require
  89. * ar6000_internal.h to be included, it may not be defined as yet.
  90. */
  91. #define WMI_F_MS(_v, _f) \
  92. (((_v) & (_f)) >> (_f##_S))
  93.  
  94. /*
  95. * This breaks the "good macro practice" of only referencing each
  96. * macro field once (to avoid things like field++ from causing issues.)
  97. */
  98. #define WMI_F_RMW(_var, _v, _f) \
  99. do { \
  100. (_var) &= ~(_f); \
  101. (_var) |= (((_v) << (_f##_S)) & (_f)); \
  102. } while (0)
  103.  
  104. #define WMI_GET_BITS(_val,_index,_num_bits) \
  105. (((_val) >> (_index)) & ((1 << (_num_bits)) - 1))
  106.  
  107. #define WMI_SET_BITS(_var,_index,_num_bits,_val) do { \
  108. (_var) &= ~(((1 << (_num_bits)) - 1) << (_index)); \
  109. (_var) |= (((_val) & ((1 << (_num_bits)) - 1)) << (_index)); \
  110. } while (0)
  111.  
  112. /**
  113. * A packed array is an array where each entry in the array is less than
  114. * or equal to 16 bits, and the entries are stuffed into an A_UINT32 array.
  115. * For example, if each entry in the array is 11 bits, then you can stuff
  116. * an array of 4 11-bit values into an array of 2 A_UINT32 values.
  117. * The first 2 11-bit values will be stored in the first A_UINT32,
  118. * and the last 2 11-bit values will be stored in the second A_UINT32.
  119. */
  120. #define WMI_PACKED_ARR_SIZE(num_entries,bits_per_entry) \
  121. (((num_entries) / (32 / (bits_per_entry))) + \
  122. (((num_entries) % (32 / (bits_per_entry))) ? 1 : 0))
  123.  
  124. #define WMI_RETURN_STRING(str) case ((str)): return (uint8_t *)(# str);
  125.  
  126. static INLINE A_UINT32 wmi_packed_arr_get_bits(A_UINT32 *arr,
  127. A_UINT32 entry_index, A_UINT32 bits_per_entry)
  128. {
  129. A_UINT32 entries_per_uint = (32 / bits_per_entry);
  130. A_UINT32 uint_index = (entry_index / entries_per_uint);
  131. A_UINT32 num_entries_in_prev_uints = (uint_index * entries_per_uint);
  132. A_UINT32 index_in_uint = (entry_index - num_entries_in_prev_uints);
  133. A_UINT32 start_bit_in_uint = (index_in_uint * bits_per_entry);
  134. return (arr[uint_index] >> start_bit_in_uint) &
  135. ((1 << bits_per_entry) - 1);
  136. }
  137.  
  138. static INLINE void wmi_packed_arr_set_bits(A_UINT32 *arr, A_UINT32 entry_index,
  139. A_UINT32 bits_per_entry, A_UINT32 val)
  140. {
  141. A_UINT32 entries_per_uint = (32 / bits_per_entry);
  142. A_UINT32 uint_index = (entry_index / entries_per_uint);
  143. A_UINT32 num_entries_in_prev_uints = (uint_index * entries_per_uint);
  144. A_UINT32 index_in_uint = (entry_index - num_entries_in_prev_uints);
  145. A_UINT32 start_bit_in_uint = (index_in_uint * bits_per_entry);
  146.  
  147. arr[uint_index] &= ~(((1 << bits_per_entry) - 1) << start_bit_in_uint);
  148. arr[uint_index] |=
  149. ((val & ((1 << bits_per_entry) - 1)) << start_bit_in_uint);
  150. }
  151.  
  152. /** 2 word representation of MAC addr */
  153. typedef struct {
  154. /** upper 4 bytes of MAC address */
  155. A_UINT32 mac_addr31to0;
  156. /** lower 2 bytes of MAC address */
  157. A_UINT32 mac_addr47to32;
  158. } wmi_mac_addr;
  159.  
  160. /** macro to convert MAC address from WMI word format to char array */
  161. #define WMI_MAC_ADDR_TO_CHAR_ARRAY(pwmi_mac_addr,c_macaddr) do { \
  162. (c_macaddr)[0] = (((pwmi_mac_addr)->mac_addr31to0) >> 0) & 0xff; \
  163. (c_macaddr)[1] = (((pwmi_mac_addr)->mac_addr31to0) >> 8) & 0xff; \
  164. (c_macaddr)[2] = (((pwmi_mac_addr)->mac_addr31to0) >> 16) & 0xff; \
  165. (c_macaddr)[3] = (((pwmi_mac_addr)->mac_addr31to0) >> 24) & 0xff; \
  166. (c_macaddr)[4] = (((pwmi_mac_addr)->mac_addr47to32) >> 0) & 0xff; \
  167. (c_macaddr)[5] = (((pwmi_mac_addr)->mac_addr47to32) >> 8) & 0xff; \
  168. } while (0)
  169.  
  170. /** macro to convert MAC address from char array to WMI word format */
  171. #define WMI_CHAR_ARRAY_TO_MAC_ADDR(c_macaddr,pwmi_mac_addr) do { \
  172. (pwmi_mac_addr)->mac_addr31to0 = \
  173. (((c_macaddr)[0] << 0) | \
  174. ((c_macaddr)[1] << 8) | \
  175. ((c_macaddr)[2] << 16) | \
  176. ((c_macaddr)[3] << 24)); \
  177. (pwmi_mac_addr)->mac_addr47to32 = ((c_macaddr)[4] | ((c_macaddr)[5] << 8));\
  178. } while (0)
  179.  
  180. /*
  181. * wmi command groups.
  182. */
  183. typedef enum {
  184. /* 0 to 2 are reserved */
  185. WMI_GRP_START = 0x3,
  186. WMI_GRP_SCAN = WMI_GRP_START, /* 0x3 */
  187. WMI_GRP_PDEV, /* 0x4 */
  188. WMI_GRP_VDEV, /* 0x5 */
  189. WMI_GRP_PEER, /* 0x6 */
  190. WMI_GRP_MGMT, /* 0x7 */
  191. WMI_GRP_BA_NEG, /* 0x8 */
  192. WMI_GRP_STA_PS, /* 0x9 */
  193. WMI_GRP_DFS, /* 0xa */
  194. WMI_GRP_ROAM, /* 0xb */
  195. WMI_GRP_OFL_SCAN, /* 0xc */
  196. WMI_GRP_P2P, /* 0xd */
  197. WMI_GRP_AP_PS, /* 0xe */
  198. WMI_GRP_RATE_CTRL, /* 0xf */
  199. WMI_GRP_PROFILE, /* 0x10 */
  200. WMI_GRP_SUSPEND, /* 0x11 */
  201. WMI_GRP_BCN_FILTER, /* 0x12 */
  202. WMI_GRP_WOW, /* 0x13 */
  203. WMI_GRP_RTT, /* 0x14 */
  204. WMI_GRP_SPECTRAL, /* 0x15 */
  205. WMI_GRP_STATS, /* 0x16 */
  206. WMI_GRP_ARP_NS_OFL, /* 0x17 */
  207. WMI_GRP_NLO_OFL, /* 0x18 */
  208. WMI_GRP_GTK_OFL, /* 0x19 */
  209. WMI_GRP_CSA_OFL, /* 0x1a */
  210. WMI_GRP_CHATTER, /* 0x1b */
  211. WMI_GRP_TID_ADDBA, /* 0x1c */
  212. WMI_GRP_MISC, /* 0x1d */
  213. WMI_GRP_GPIO, /* 0x1e */
  214. WMI_GRP_FWTEST, /* 0x1f */
  215. WMI_GRP_TDLS, /* 0x20 */
  216. WMI_GRP_RESMGR, /* 0x21 */
  217. WMI_GRP_STA_SMPS, /* 0x22 */
  218. WMI_GRP_WLAN_HB, /* 0x23 */
  219. WMI_GRP_RMC, /* 0x24 */
  220. WMI_GRP_MHF_OFL, /* 0x25 */
  221. WMI_GRP_LOCATION_SCAN, /* 0x26 */
  222. WMI_GRP_OEM, /* 0x27 */
  223. WMI_GRP_NAN, /* 0x28 */
  224. WMI_GRP_COEX, /* 0x29 */
  225. WMI_GRP_OBSS_OFL, /* 0x2a */
  226. WMI_GRP_LPI, /* 0x2b */
  227. WMI_GRP_EXTSCAN, /* 0x2c */
  228. WMI_GRP_DHCP_OFL, /* 0x2d */
  229. WMI_GRP_IPA, /* 0x2e */
  230. WMI_GRP_MDNS_OFL, /* 0x2f */
  231. WMI_GRP_SAP_OFL, /* 0x30 */
  232. WMI_GRP_OCB, /* 0x31 */
  233. WMI_GRP_SOC, /* 0x32 */
  234. WMI_GRP_PKT_FILTER, /* 0x33 */
  235. WMI_GRP_MAWC, /* 0x34 */
  236. WMI_GRP_PMF_OFFLOAD, /* 0x35 */
  237. WMI_GRP_BPF_OFFLOAD, /* 0x36 Berkeley Packet Filter */
  238. WMI_GRP_NAN_DATA, /* 0x37 */
  239. WMI_GRP_PROTOTYPE, /* 0x38 */
  240. WMI_GRP_MONITOR, /* 0x39 */
  241. WMI_GRP_REGULATORY, /* 0x3a */
  242. WMI_GRP_HW_DATA_FILTER, /* 0x3b */
  243. } WMI_GRP_ID;
  244.  
  245. #define WMI_CMD_GRP_START_ID(grp_id) (((grp_id) << 12) | 0x1)
  246. #define WMI_EVT_GRP_START_ID(grp_id) (((grp_id) << 12) | 0x1)
  247.  
  248. /**
  249. * Command IDs and commange events
  250. */
  251. typedef enum {
  252. /** initialize the wlan sub system */
  253. WMI_INIT_CMDID = 0x1,
  254.  
  255. /* Scan specific commands */
  256.  
  257. /** start scan request to FW */
  258. WMI_START_SCAN_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SCAN),
  259. /** stop scan request to FW */
  260. WMI_STOP_SCAN_CMDID,
  261. /** full list of channels as defined by the regulatory that will be used by scanner */
  262. WMI_SCAN_CHAN_LIST_CMDID,
  263. /** overwrite default priority table in scan scheduler */
  264. WMI_SCAN_SCH_PRIO_TBL_CMDID,
  265. /** This command to adjust the priority and min.max_rest_time
  266. * of an on ongoing scan request.
  267. */
  268. WMI_SCAN_UPDATE_REQUEST_CMDID,
  269.  
  270. /** set OUI to be used in probe request if enabled */
  271. WMI_SCAN_PROB_REQ_OUI_CMDID,
  272. /** config adaptive dwell scan */
  273. WMI_SCAN_ADAPTIVE_DWELL_CONFIG_CMDID,
  274. /** Only applicable to DBS capable product */
  275. WMI_SET_SCAN_DBS_DUTY_CYCLE_CMDID,
  276.  
  277. /* PDEV(physical device) specific commands */
  278. /** set regulatorty ctl id used by FW to determine the exact ctl power limits */
  279. WMI_PDEV_SET_REGDOMAIN_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PDEV),
  280. /** set channel. mainly used for supporting monitor mode */
  281. WMI_PDEV_SET_CHANNEL_CMDID,
  282. /** set pdev specific parameters */
  283. WMI_PDEV_SET_PARAM_CMDID,
  284. /** enable packet log */
  285. WMI_PDEV_PKTLOG_ENABLE_CMDID,
  286. /** disable packet log*/
  287. WMI_PDEV_PKTLOG_DISABLE_CMDID,
  288. /** set wmm parameters */
  289. WMI_PDEV_SET_WMM_PARAMS_CMDID,
  290. /** set HT cap ie that needs to be carried probe requests HT/VHT channels */
  291. WMI_PDEV_SET_HT_CAP_IE_CMDID,
  292. /** set VHT cap ie that needs to be carried on probe requests on VHT channels */
  293. WMI_PDEV_SET_VHT_CAP_IE_CMDID,
  294.  
  295. /** Command to send the DSCP-to-TID map to the target */
  296. WMI_PDEV_SET_DSCP_TID_MAP_CMDID,
  297. /** set quiet ie parameters. primarily used in AP mode */
  298. WMI_PDEV_SET_QUIET_MODE_CMDID,
  299. /** Enable/Disable Green AP Power Save */
  300. WMI_PDEV_GREEN_AP_PS_ENABLE_CMDID,
  301. /** get TPC config for the current operating channel */
  302. WMI_PDEV_GET_TPC_CONFIG_CMDID,
  303.  
  304. /** set the base MAC address for the physical device before a VDEV is created.
  305. * For firmware that doesn't support this feature and this command, the pdev
  306. * MAC address will not be changed. */
  307. WMI_PDEV_SET_BASE_MACADDR_CMDID,
  308.  
  309. /* eeprom content dump , the same to bdboard data */
  310. WMI_PDEV_DUMP_CMDID,
  311. /* set LED configuration */
  312. WMI_PDEV_SET_LED_CONFIG_CMDID,
  313. /* Get Current temprature of chip in Celcius degree*/
  314. WMI_PDEV_GET_TEMPERATURE_CMDID,
  315. /* Set LED flashing behavior */
  316. WMI_PDEV_SET_LED_FLASHING_CMDID,
  317. /** Enable/Disable Smart Antenna */
  318. WMI_PDEV_SMART_ANT_ENABLE_CMDID,
  319. /** Set Smart Antenna RX antenna*/
  320. WMI_PDEV_SMART_ANT_SET_RX_ANTENNA_CMDID,
  321. /** Override the antenna switch table */
  322. WMI_PDEV_SET_ANTENNA_SWITCH_TABLE_CMDID,
  323. /** Override the CTL table */
  324. WMI_PDEV_SET_CTL_TABLE_CMDID,
  325. /** Override the array gain table */
  326. WMI_PDEV_SET_MIMOGAIN_TABLE_CMDID,
  327. /** FIPS test mode command */
  328. WMI_PDEV_FIPS_CMDID,
  329. /** get CCK ANI level */
  330. WMI_PDEV_GET_ANI_CCK_CONFIG_CMDID,
  331. /** get OFDM ANI level */
  332. WMI_PDEV_GET_ANI_OFDM_CONFIG_CMDID,
  333. /** NF Cal Power dBr/dBm */
  334. WMI_PDEV_GET_NFCAL_POWER_CMDID,
  335. /** TxPPDU TPC */
  336. WMI_PDEV_GET_TPC_CMDID,
  337. /** Set to enable MIB stats collection */
  338. WMI_MIB_STATS_ENABLE_CMDID,
  339. /** Set preferred channel list for DBS Mgr */
  340. WMI_PDEV_SET_PCL_CMDID,
  341. /** Set HW mode. Eg: single MAC, DBS & SBS, see soc_hw_mode_t for values */
  342. WMI_PDEV_SET_HW_MODE_CMDID,
  343. /** Set DFS, SCAN modes and other FW configurations */
  344. WMI_PDEV_SET_MAC_CONFIG_CMDID,
  345. /** Set per band and per pdev antenna chains */
  346. WMI_PDEV_SET_ANTENNA_MODE_CMDID,
  347. /** Periodic channel stats request command */
  348. WMI_SET_PERIODIC_CHANNEL_STATS_CONFIG_CMDID,
  349. /** WMI command for power debug framework */
  350. WMI_PDEV_WAL_POWER_DEBUG_CMDID,
  351. /** set per-AC rx reorder timeouts */
  352. WMI_PDEV_SET_REORDER_TIMEOUT_VAL_CMDID,
  353. /** WMI command for WOW gpio and type */
  354. WMI_PDEV_SET_WAKEUP_CONFIG_CMDID,
  355. /* Get current ANT's per chain's RSSI info */
  356. WMI_PDEV_GET_ANTDIV_STATUS_CMDID,
  357. /** WMI command for getting Chip Power Stats */
  358. WMI_PDEV_GET_CHIP_POWER_STATS_CMDID,
  359. /** set stats reporting thresholds - see WMI_REPORT_STATS_EVENTID */
  360. WMI_PDEV_SET_STATS_THRESHOLD_CMDID,
  361. /** vdev restart request for multiple vdevs */
  362. WMI_PDEV_MULTIPLE_VDEV_RESTART_REQUEST_CMDID,
  363. /** Pdev update packet routing command */
  364. WMI_PDEV_UPDATE_PKT_ROUTING_CMDID,
  365. /** Get Calibration data version details */
  366. WMI_PDEV_CHECK_CAL_VERSION_CMDID,
  367. /** Set Diversity Gain */
  368. WMI_PDEV_SET_DIVERSITY_GAIN_CMDID,
  369. /** Get chain RSSI and antena index command */
  370. WMI_PDEV_DIV_GET_RSSI_ANTID_CMDID,
  371. /* get bss chan info */
  372. WMI_PDEV_BSS_CHAN_INFO_REQUEST_CMDID,
  373.  
  374. /* VDEV (virtual device) specific commands */
  375. /** vdev create */
  376. WMI_VDEV_CREATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_VDEV),
  377. /** vdev delete */
  378. WMI_VDEV_DELETE_CMDID,
  379. /** vdev start request */
  380. WMI_VDEV_START_REQUEST_CMDID,
  381. /** vdev restart request (RX only, NO TX, used for CAC period)*/
  382. WMI_VDEV_RESTART_REQUEST_CMDID,
  383. /** vdev up request */
  384. WMI_VDEV_UP_CMDID,
  385. /** vdev stop request */
  386. WMI_VDEV_STOP_CMDID,
  387. /** vdev down request */
  388. WMI_VDEV_DOWN_CMDID,
  389. /* set a vdev param */
  390. WMI_VDEV_SET_PARAM_CMDID,
  391. /* set a key (used for setting per peer unicast and per vdev multicast) */
  392. WMI_VDEV_INSTALL_KEY_CMDID,
  393.  
  394. /* wnm sleep mode command */
  395. WMI_VDEV_WNM_SLEEPMODE_CMDID,
  396. WMI_VDEV_WMM_ADDTS_CMDID,
  397. WMI_VDEV_WMM_DELTS_CMDID,
  398. WMI_VDEV_SET_WMM_PARAMS_CMDID,
  399. WMI_VDEV_SET_GTX_PARAMS_CMDID,
  400. WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMDID,
  401.  
  402. WMI_VDEV_PLMREQ_START_CMDID,
  403. WMI_VDEV_PLMREQ_STOP_CMDID,
  404. /* TSF timestamp action for specified vdev */
  405. WMI_VDEV_TSF_TSTAMP_ACTION_CMDID,
  406. /** set the additional IEs in probe requests for scan or
  407. * assoc req etc for frames FW locally generates */
  408. WMI_VDEV_SET_IE_CMDID,
  409.  
  410. WMI_VDEV_RATEMASK_CMDID,
  411. /** ATF VDEV REQUEST commands. */
  412. WMI_VDEV_ATF_REQUEST_CMDID,
  413. /** Command to send the DSCP-to-TID map to the target for VAP */
  414. WMI_VDEV_SET_DSCP_TID_MAP_CMDID,
  415. /* Configure filter for Neighbor Rx Pkt (smart mesh selective listening) */
  416. WMI_VDEV_FILTER_NEIGHBOR_RX_PACKETS_CMDID,
  417. /** set quiet ie parameters. primarily used in AP mode */
  418. WMI_VDEV_SET_QUIET_MODE_CMDID,
  419. /** To set custom aggregation size for per vdev */
  420. WMI_VDEV_SET_CUSTOM_AGGR_SIZE_CMDID,
  421.  
  422. /* DISA feature: Encrypt-decrypt data request */
  423. WMI_VDEV_ENCRYPT_DECRYPT_DATA_REQ_CMDID,
  424.  
  425. /** Command to enable mac randomizaton **/
  426. WMI_VDEV_ADD_MAC_ADDR_TO_RX_FILTER_CMDID,
  427.  
  428. /** WMI commands related to dbg arp stats */
  429. WMI_VDEV_SET_ARP_STAT_CMDID,
  430. WMI_VDEV_GET_ARP_STAT_CMDID,
  431.  
  432. /** get tx power for the current vdev */
  433. WMI_VDEV_GET_TX_POWER_CMDID,
  434. /* limit STA offchannel activity */
  435. WMI_VDEV_LIMIT_OFFCHAN_CMDID,
  436.  
  437. /* peer specific commands */
  438.  
  439. /** create a peer */
  440. WMI_PEER_CREATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PEER),
  441. /** delete a peer */
  442. WMI_PEER_DELETE_CMDID,
  443. /** flush specific tid queues of a peer */
  444. WMI_PEER_FLUSH_TIDS_CMDID,
  445. /** set a parameter of a peer */
  446. WMI_PEER_SET_PARAM_CMDID,
  447. /** set peer to associated state. will cary all parameters determined during assocication time */
  448. WMI_PEER_ASSOC_CMDID,
  449. /**add a wds (4 address) entry. used only for testing WDS feature on AP products */
  450. WMI_PEER_ADD_WDS_ENTRY_CMDID,
  451. /**remove wds (4 address) entry. used only for testing WDS feature on AP products */
  452. WMI_PEER_REMOVE_WDS_ENTRY_CMDID,
  453. /** set up mcast group infor for multicast to unicast conversion */
  454. WMI_PEER_MCAST_GROUP_CMDID,
  455. /** request peer info from FW. FW shall respond with PEER_INFO_EVENTID */
  456. WMI_PEER_INFO_REQ_CMDID,
  457. /** request the estimated link speed for the peer. FW shall respond with
  458. * WMI_PEER_ESTIMATED_LINKSPEED_EVENTID.
  459. */
  460. WMI_PEER_GET_ESTIMATED_LINKSPEED_CMDID,
  461. /** Set the conditions to report peer justified rate to driver
  462. * The justified rate means the the user-rate is justified by PER.
  463. */
  464. WMI_PEER_SET_RATE_REPORT_CONDITION_CMDID,
  465.  
  466. /** update a wds (4 address) entry */
  467. WMI_PEER_UPDATE_WDS_ENTRY_CMDID,
  468. /** add a proxy sta entry */
  469. WMI_PEER_ADD_PROXY_STA_ENTRY_CMDID,
  470. /** Set Smart Antenna TX antenna */
  471. WMI_PEER_SMART_ANT_SET_TX_ANTENNA_CMDID,
  472. /** Set Smart Antenna TX train info */
  473. WMI_PEER_SMART_ANT_SET_TRAIN_INFO_CMDID,
  474. /** Set SA node config options */
  475. WMI_PEER_SMART_ANT_SET_NODE_CONFIG_OPS_CMDID,
  476. /** ATF PEER REQUEST commands */
  477. WMI_PEER_ATF_REQUEST_CMDID,
  478. /** bandwidth fairness (BWF) peer configuration request command */
  479. WMI_PEER_BWF_REQUEST_CMDID,
  480. /** rx reorder queue setup for peer/tid */
  481. WMI_PEER_REORDER_QUEUE_SETUP_CMDID,
  482. /** rx reorder queue remove for peer/tid */
  483. WMI_PEER_REORDER_QUEUE_REMOVE_CMDID,
  484. /** specify a limit for rx A-MPDU block size */
  485. WMI_PEER_SET_RX_BLOCKSIZE_CMDID,
  486. /** request peer antdiv info from FW. FW shall respond with PEER_ANTDIV_INFO_EVENTID */
  487. WMI_PEER_ANTDIV_INFO_REQ_CMDID,
  488. /** Peer operating mode change indication sent to host to update stats */
  489. WMI_PEER_OPER_MODE_CHANGE_EVENTID,
  490.  
  491. /* beacon/management specific commands */
  492.  
  493. /** transmit beacon by reference . used for transmitting beacon on low latency interface like pcie */
  494. WMI_BCN_TX_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MGMT),
  495. /** transmit beacon by value */
  496. WMI_PDEV_SEND_BCN_CMDID,
  497. /** set the beacon template. used in beacon offload mode to setup the
  498. * the common beacon template with the FW to be used by FW to generate beacons */
  499. WMI_BCN_TMPL_CMDID,
  500. /** set beacon filter with FW */
  501. WMI_BCN_FILTER_RX_CMDID,
  502. /* enable/disable filtering of probe requests in the firmware */
  503. WMI_PRB_REQ_FILTER_RX_CMDID,
  504. /** transmit management frame by value. will be deprecated */
  505. WMI_MGMT_TX_CMDID,
  506. /** set the probe response template. used in beacon offload mode to setup the
  507. * the common probe response template with the FW to be used by FW to generate
  508. * probe responses */
  509. WMI_PRB_TMPL_CMDID,
  510. /** Transmit Mgmt frame by reference */
  511. WMI_MGMT_TX_SEND_CMDID,
  512. /** Transmit data frame by reference */
  513. WMI_OFFCHAN_DATA_TX_SEND_CMDID,
  514.  
  515. /** commands to directly control ba negotiation directly from host. only used in test mode */
  516.  
  517. /** turn off FW Auto addba mode and let host control addba */
  518. WMI_ADDBA_CLEAR_RESP_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_BA_NEG),
  519. /** send add ba request */
  520. WMI_ADDBA_SEND_CMDID,
  521. WMI_ADDBA_STATUS_CMDID,
  522. /** send del ba */
  523. WMI_DELBA_SEND_CMDID,
  524. /** set add ba response will be used by FW to generate addba response*/
  525. WMI_ADDBA_SET_RESP_CMDID,
  526. /** send single VHT MPDU with AMSDU */
  527. WMI_SEND_SINGLEAMSDU_CMDID,
  528.  
  529. /** Station power save specific config */
  530. /** enable/disable station powersave */
  531. WMI_STA_POWERSAVE_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_STA_PS),
  532. /** set station power save specific parameter */
  533. WMI_STA_POWERSAVE_PARAM_CMDID,
  534. /** set station mimo powersave mode */
  535. WMI_STA_MIMO_PS_MODE_CMDID,
  536.  
  537.  
  538. /** DFS-specific commands */
  539. /** enable DFS (radar detection)*/
  540. WMI_PDEV_DFS_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_DFS),
  541. /** disable DFS (radar detection)*/
  542. WMI_PDEV_DFS_DISABLE_CMDID,
  543. /** enable DFS phyerr/parse filter offload */
  544. WMI_DFS_PHYERR_FILTER_ENA_CMDID,
  545. /** enable DFS phyerr/parse filter offload */
  546. WMI_DFS_PHYERR_FILTER_DIS_CMDID,
  547. /** enable DFS phyerr processing offload */
  548. WMI_PDEV_DFS_PHYERR_OFFLOAD_ENABLE_CMDID,
  549. /** disable DFS phyerr processing offload */
  550. WMI_PDEV_DFS_PHYERR_OFFLOAD_DISABLE_CMDID,
  551. /** set ADFS channel config */
  552. WMI_VDEV_ADFS_CH_CFG_CMDID,
  553. /** abort ADFS off-channel-availability-check currently in progress */
  554. WMI_VDEV_ADFS_OCAC_ABORT_CMDID,
  555.  
  556. /* Roaming specific commands */
  557. /** set roam scan mode */
  558. WMI_ROAM_SCAN_MODE = WMI_CMD_GRP_START_ID(WMI_GRP_ROAM),
  559. /** set roam scan rssi threshold below which roam scan is enabled */
  560. WMI_ROAM_SCAN_RSSI_THRESHOLD,
  561. /** set roam scan period for periodic roam scan mode */
  562. WMI_ROAM_SCAN_PERIOD,
  563. /** set roam scan trigger rssi change threshold */
  564. WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD,
  565. /** set roam AP profile */
  566. WMI_ROAM_AP_PROFILE,
  567. /** set channel list for roam scans */
  568. WMI_ROAM_CHAN_LIST,
  569. /** Stop scan command */
  570. WMI_ROAM_SCAN_CMD,
  571. /** roaming sme offload sync complete */
  572. WMI_ROAM_SYNCH_COMPLETE,
  573. /** set ric request element for 11r roaming */
  574. WMI_ROAM_SET_RIC_REQUEST_CMDID,
  575. /** Invoke roaming forcefully */
  576. WMI_ROAM_INVOKE_CMDID,
  577. /** roaming filter cmd to allow further filtering of roaming candidate */
  578. WMI_ROAM_FILTER_CMDID,
  579. /** set gateway ip, mac and retries for subnet change detection */
  580. WMI_ROAM_SUBNET_CHANGE_CONFIG_CMDID,
  581. /** configure thresholds for MAWC */
  582. WMI_ROAM_CONFIGURE_MAWC_CMDID,
  583. /** configure MultiBand Operation(refer WFA MBO spec) parameter */
  584. WMI_ROAM_SET_MBO_PARAM_CMDID, /* DEPRECATED */
  585. /** configure packet error rate threshold for triggering roaming */
  586. WMI_ROAM_PER_CONFIG_CMDID,
  587.  
  588. /** offload scan specific commands */
  589. /** set offload scan AP profile */
  590. WMI_OFL_SCAN_ADD_AP_PROFILE = WMI_CMD_GRP_START_ID(WMI_GRP_OFL_SCAN),
  591. /** remove offload scan AP profile */
  592. WMI_OFL_SCAN_REMOVE_AP_PROFILE,
  593. /** set offload scan period */
  594. WMI_OFL_SCAN_PERIOD,
  595.  
  596. /* P2P specific commands */
  597. /**set P2P device info. FW will used by FW to create P2P IE to be carried in probe response
  598. * generated during p2p listen and for p2p discoverability */
  599. WMI_P2P_DEV_SET_DEVICE_INFO = WMI_CMD_GRP_START_ID(WMI_GRP_P2P),
  600. /** enable/disable p2p discoverability on STA/AP VDEVs */
  601. WMI_P2P_DEV_SET_DISCOVERABILITY,
  602. /** set p2p ie to be carried in beacons generated by FW for GO */
  603. WMI_P2P_GO_SET_BEACON_IE,
  604. /** set p2p ie to be carried in probe response frames generated by FW for GO */
  605. WMI_P2P_GO_SET_PROBE_RESP_IE,
  606. /** set the vendor specific p2p ie data. FW will use this to parse the P2P NoA
  607. * attribute in the beacons/probe responses received.
  608. * Note: This command is currently used only for Apple P2P implementation.
  609. */
  610. WMI_P2P_SET_VENDOR_IE_DATA_CMDID,
  611. /** set the configure of p2p find offload */
  612. WMI_P2P_DISC_OFFLOAD_CONFIG_CMDID,
  613. /** set the vendor specific p2p ie data for p2p find offload using */
  614. WMI_P2P_DISC_OFFLOAD_APPIE_CMDID,
  615. /** set the BSSID/device name pattern of p2p find offload */
  616. WMI_P2P_DISC_OFFLOAD_PATTERN_CMDID,
  617. /** set OppPS related parameters **/
  618. WMI_P2P_SET_OPPPS_PARAM_CMDID,
  619. /** set listen offload start related parameters */
  620. WMI_P2P_LISTEN_OFFLOAD_START_CMDID,
  621. /** set listen offload stop related parameters */
  622. WMI_P2P_LISTEN_OFFLOAD_STOP_CMDID,
  623.  
  624. /** AP power save specific config */
  625. /** set AP power save specific param */
  626. WMI_AP_PS_PEER_PARAM_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_AP_PS),
  627. /** set AP UAPSD coex pecific param */
  628. WMI_AP_PS_PEER_UAPSD_COEX_CMDID,
  629. /** set Enhanced Green AP param */
  630. WMI_AP_PS_EGAP_PARAM_CMDID,
  631.  
  632. /** Rate-control specific commands */
  633. WMI_PEER_RATE_RETRY_SCHED_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_RATE_CTRL),
  634.  
  635. /** WLAN Profiling commands. */
  636. WMI_WLAN_PROFILE_TRIGGER_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PROFILE),
  637. WMI_WLAN_PROFILE_SET_HIST_INTVL_CMDID,
  638. WMI_WLAN_PROFILE_GET_PROFILE_DATA_CMDID,
  639. WMI_WLAN_PROFILE_ENABLE_PROFILE_ID_CMDID,
  640. WMI_WLAN_PROFILE_LIST_PROFILE_ID_CMDID,
  641.  
  642. /** Suspend resume command Ids */
  643. WMI_PDEV_SUSPEND_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SUSPEND),
  644. WMI_PDEV_RESUME_CMDID,
  645.  
  646. /* Beacon filter commands */
  647. /** add a beacon filter */
  648. WMI_ADD_BCN_FILTER_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_BCN_FILTER),
  649. /** remove a beacon filter */
  650. WMI_RMV_BCN_FILTER_CMDID,
  651.  
  652. /* WOW Specific WMI commands*/
  653. /** add pattern for awake */
  654. WMI_WOW_ADD_WAKE_PATTERN_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_WOW),
  655. /** deleta a wake pattern */
  656. WMI_WOW_DEL_WAKE_PATTERN_CMDID,
  657. /** enable/deisable wake event */
  658. WMI_WOW_ENABLE_DISABLE_WAKE_EVENT_CMDID,
  659. /** enable WOW */
  660. WMI_WOW_ENABLE_CMDID,
  661. /** host woke up from sleep event to FW. Generated in response to WOW Hardware event */
  662. WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID,
  663. /* IOAC add keep alive cmd. */
  664. WMI_WOW_IOAC_ADD_KEEPALIVE_CMDID,
  665. /* IOAC del keep alive cmd. */
  666. WMI_WOW_IOAC_DEL_KEEPALIVE_CMDID,
  667. /* IOAC add pattern for awake */
  668. WMI_WOW_IOAC_ADD_WAKE_PATTERN_CMDID,
  669. /* IOAC deleta a wake pattern */
  670. WMI_WOW_IOAC_DEL_WAKE_PATTERN_CMDID,
  671. /* D0-WOW enable or disable cmd */
  672. WMI_D0_WOW_ENABLE_DISABLE_CMDID,
  673. /* enable extend WoW */
  674. WMI_EXTWOW_ENABLE_CMDID,
  675. /* Extend WoW command to configure app type1 parameter */
  676. WMI_EXTWOW_SET_APP_TYPE1_PARAMS_CMDID,
  677. /* Extend WoW command to configure app type2 parameter */
  678. WMI_EXTWOW_SET_APP_TYPE2_PARAMS_CMDID,
  679. /* enable ICMPv6 Network advertisement filtering */
  680. WMI_WOW_ENABLE_ICMPV6_NA_FLT_CMDID,
  681. /*
  682. * Set a pattern to match UDP packet in WOW mode.
  683. * If match, construct a tx frame in a local buffer
  684. * to send through the peer AP to the entity in the
  685. * IP network that sent the UDP packet to this STA.
  686. */
  687. WMI_WOW_UDP_SVC_OFLD_CMDID,
  688. /* configure WOW host wakeup PIN pattern */
  689. WMI_WOW_HOSTWAKEUP_GPIO_PIN_PATTERN_CONFIG_CMDID,
  690.  
  691. /* Set which action category should wake the host from suspend */
  692. WMI_WOW_SET_ACTION_WAKE_UP_CMDID,
  693.  
  694. /* RTT measurement related cmd */
  695. /** request to make an RTT measurement */
  696. WMI_RTT_MEASREQ_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_RTT),
  697. /** request to report a tsf measurement */
  698. WMI_RTT_TSF_CMDID,
  699.  
  700. /** spectral scan command */
  701. /** configure spectral scan */
  702. WMI_VDEV_SPECTRAL_SCAN_CONFIGURE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SPECTRAL),
  703. /** enable/disable spectral scan and trigger */
  704. WMI_VDEV_SPECTRAL_SCAN_ENABLE_CMDID,
  705.  
  706. /* F/W stats */
  707. /** one time request for stats */
  708. WMI_REQUEST_STATS_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_STATS),
  709. /** Push MCC Adaptive Scheduler Stats to Firmware */
  710. WMI_MCC_SCHED_TRAFFIC_STATS_CMDID,
  711. /** one time request for txrx stats */
  712. WMI_REQUEST_STATS_EXT_CMDID,
  713. /* Link Layer stats */
  714. /** Request for link layer stats */
  715. WMI_REQUEST_LINK_STATS_CMDID,
  716. /** Request for setting params to link layer stats */
  717. WMI_START_LINK_STATS_CMDID,
  718. /** Request to clear stats*/
  719. WMI_CLEAR_LINK_STATS_CMDID,
  720.  
  721. /** Request for getting the Firmware Memory Dump */
  722. WMI_GET_FW_MEM_DUMP_CMDID,
  723.  
  724. /** Request to flush of the buffered debug messages */
  725. WMI_DEBUG_MESG_FLUSH_CMDID,
  726.  
  727. /** Cmd to configure the verbose level */
  728. WMI_DIAG_EVENT_LOG_CONFIG_CMDID,
  729.  
  730. /** One time request for wlan stats */
  731. WMI_REQUEST_WLAN_STATS_CMDID,
  732.  
  733. /** Request for getting RCPI of peer */
  734. WMI_REQUEST_RCPI_CMDID,
  735.  
  736. /** One time request for peer stats info */
  737. WMI_REQUEST_PEER_STATS_INFO_CMDID,
  738.  
  739. /** One time request for radio channel stats */
  740. WMI_REQUEST_RADIO_CHAN_STATS_CMDID,
  741.  
  742. /** ARP OFFLOAD REQUEST*/
  743. WMI_SET_ARP_NS_OFFLOAD_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_ARP_NS_OFL),
  744.  
  745. /** Proactive ARP Response Add Pattern Command*/
  746. WMI_ADD_PROACTIVE_ARP_RSP_PATTERN_CMDID,
  747.  
  748. /** Proactive ARP Response Del Pattern Command*/
  749. WMI_DEL_PROACTIVE_ARP_RSP_PATTERN_CMDID,
  750.  
  751. /** NS offload confid*/
  752. WMI_NETWORK_LIST_OFFLOAD_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_NLO_OFL),
  753.  
  754. /** APFIND Config */
  755. WMI_APFIND_CMDID,
  756.  
  757. /** Passpoint list config */
  758. WMI_PASSPOINT_LIST_CONFIG_CMDID,
  759.  
  760. /** configure supprssing parameters for MAWC */
  761. WMI_NLO_CONFIGURE_MAWC_CMDID,
  762.  
  763. /* GTK offload Specific WMI commands*/
  764. WMI_GTK_OFFLOAD_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_GTK_OFL),
  765.  
  766. /* CSA offload Specific WMI commands*/
  767. /** csa offload enable */
  768. WMI_CSA_OFFLOAD_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_CSA_OFL),
  769. /** chan switch command */
  770. WMI_CSA_OFFLOAD_CHANSWITCH_CMDID,
  771.  
  772. /* Chatter commands*/
  773. /* Change chatter mode of operation */
  774. WMI_CHATTER_SET_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_CHATTER),
  775. /** chatter add coalescing filter command */
  776. WMI_CHATTER_ADD_COALESCING_FILTER_CMDID,
  777. /** chatter delete coalescing filter command */
  778. WMI_CHATTER_DELETE_COALESCING_FILTER_CMDID,
  779. /** chatter coalecing query command */
  780. WMI_CHATTER_COALESCING_QUERY_CMDID,
  781.  
  782. /**addba specific commands */
  783. /** start the aggregation on this TID */
  784. WMI_PEER_TID_ADDBA_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_TID_ADDBA),
  785. /** stop the aggregation on this TID */
  786. WMI_PEER_TID_DELBA_CMDID,
  787.  
  788. /** set station mimo powersave method */
  789. WMI_STA_DTIM_PS_METHOD_CMDID,
  790. /** Configure the Station UAPSD AC Auto Trigger Parameters */
  791. WMI_STA_UAPSD_AUTO_TRIG_CMDID,
  792. /** Configure the Keep Alive Parameters */
  793. WMI_STA_KEEPALIVE_CMDID,
  794.  
  795. /* Request ssn from target for a sta/tid pair */
  796. WMI_BA_REQ_SSN_CMDID,
  797.  
  798.  
  799. /* misc command group */
  800. /** echo command mainly used for testing */
  801. WMI_ECHO_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MISC),
  802.  
  803. /* !!IMPORTANT!!
  804. * If you need to add a new WMI command to the WMI_GRP_MISC sub-group,
  805. * please make sure you add it BEHIND WMI_PDEV_UTF_CMDID,
  806. * as we MUST have a fixed value here to maintain compatibility between
  807. * UTF and the ART2 driver
  808. */
  809. /** UTF WMI commands */
  810. WMI_PDEV_UTF_CMDID,
  811.  
  812. /** set debug log config */
  813. WMI_DBGLOG_CFG_CMDID,
  814. /* QVIT specific command id */
  815. WMI_PDEV_QVIT_CMDID,
  816. /* Factory Testing Mode request command
  817. * used for integrated chipsets */
  818. WMI_PDEV_FTM_INTG_CMDID,
  819. /* set and get keepalive parameters command */
  820. WMI_VDEV_SET_KEEPALIVE_CMDID,
  821. WMI_VDEV_GET_KEEPALIVE_CMDID,
  822. /* For fw recovery test command */
  823. WMI_FORCE_FW_HANG_CMDID,
  824. /* Set Mcast/Bdcast filter */
  825. WMI_SET_MCASTBCAST_FILTER_CMDID,
  826. /** set thermal management params **/
  827. WMI_THERMAL_MGMT_CMDID,
  828. /** set host auto shutdown params **/
  829. WMI_HOST_AUTO_SHUTDOWN_CFG_CMDID,
  830. /** set tpc chainmask config command */
  831. WMI_TPC_CHAINMASK_CONFIG_CMDID,
  832. /** set Antenna diversity command */
  833. WMI_SET_ANTENNA_DIVERSITY_CMDID,
  834. /** Set OCB Sched Request, deprecated */
  835. WMI_OCB_SET_SCHED_CMDID,
  836. /** Set rssi monitoring config command */
  837. WMI_RSSI_BREACH_MONITOR_CONFIG_CMDID,
  838. /** Enable/disable Large Receive Offload processing; provide cfg params */
  839. WMI_LRO_CONFIG_CMDID,
  840. /** transfer data from host to firmware to write flash */
  841. WMI_TRANSFER_DATA_TO_FLASH_CMDID,
  842. /** Command to enable/disable filtering of multicast IP with unicast mac */
  843. WMI_CONFIG_ENHANCED_MCAST_FILTER_CMDID,
  844. /** Command to control WISA mode */
  845. WMI_VDEV_WISA_CMDID,
  846. /** set debug log time stamp sync up with host */
  847. WMI_DBGLOG_TIME_STAMP_SYNC_CMDID,
  848. /** Command for host to set/delete multiple mcast filters */
  849. WMI_SET_MULTIPLE_MCAST_FILTER_CMDID,
  850. /** upload a requested section of data from firmware flash to host */
  851. WMI_READ_DATA_FROM_FLASH_CMDID,
  852. /* Thermal Throttling SET CONF commands */
  853. WMI_THERM_THROT_SET_CONF_CMDID,
  854.  
  855. /* GPIO Configuration */
  856. WMI_GPIO_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_GPIO),
  857. WMI_GPIO_OUTPUT_CMDID,
  858.  
  859. /* Txbf configuration command */
  860. WMI_TXBF_CMDID,
  861.  
  862. /* FWTEST Commands */
  863. WMI_FWTEST_VDEV_MCC_SET_TBTT_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_FWTEST),
  864. /** set NoA descs **/
  865. WMI_FWTEST_P2P_SET_NOA_PARAM_CMDID,
  866. /* UNIT Tests */
  867. WMI_UNIT_TEST_CMDID,
  868. /* set debug and tuning parameters */
  869. WMI_FWTEST_CMDID,
  870. /* Q-Boost configuration test commands */
  871. WMI_QBOOST_CFG_CMDID,
  872.  
  873. /** TDLS Configuration */
  874. /** enable/disable TDLS */
  875. WMI_TDLS_SET_STATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_TDLS),
  876. /** set tdls peer state */
  877. WMI_TDLS_PEER_UPDATE_CMDID,
  878. /** TDLS Offchannel control */
  879. WMI_TDLS_SET_OFFCHAN_MODE_CMDID,
  880.  
  881. /** Resmgr Configuration */
  882. /** Adaptive OCS is enabled by default in the FW. This command is used to
  883. * disable FW based adaptive OCS.
  884. */
  885. WMI_RESMGR_ADAPTIVE_OCS_ENABLE_DISABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_RESMGR),
  886. /** set the requested channel time quota for the home channels */
  887. WMI_RESMGR_SET_CHAN_TIME_QUOTA_CMDID,
  888. /** set the requested latency for the home channels */
  889. WMI_RESMGR_SET_CHAN_LATENCY_CMDID,
  890.  
  891. /** STA SMPS Configuration */
  892. /** force SMPS mode */
  893. WMI_STA_SMPS_FORCE_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_STA_SMPS),
  894. /** set SMPS parameters */
  895. WMI_STA_SMPS_PARAM_CMDID,
  896.  
  897. /* Wlan HB commands*/
  898. /* enalbe/disable wlan HB */
  899. WMI_HB_SET_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_WLAN_HB),
  900. /* set tcp parameters for wlan HB */
  901. WMI_HB_SET_TCP_PARAMS_CMDID,
  902. /* set tcp pkt filter for wlan HB */
  903. WMI_HB_SET_TCP_PKT_FILTER_CMDID,
  904. /* set udp parameters for wlan HB */
  905. WMI_HB_SET_UDP_PARAMS_CMDID,
  906. /* set udp pkt filter for wlan HB */
  907. WMI_HB_SET_UDP_PKT_FILTER_CMDID,
  908.  
  909. /** Wlan RMC commands*/
  910. /** enable/disable RMC */
  911. WMI_RMC_SET_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_RMC),
  912. /** configure action frame period */
  913. WMI_RMC_SET_ACTION_PERIOD_CMDID,
  914. /** For debug/future enhancement purposes only,
  915. * configures/finetunes RMC algorithms */
  916. WMI_RMC_CONFIG_CMDID,
  917. /** select manual leader */
  918. WMI_RMC_SET_MANUAL_LEADER_CMDID,
  919.  
  920. /** WLAN MHF offload commands */
  921. /** enable/disable MHF offload */
  922. WMI_MHF_OFFLOAD_SET_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MHF_OFL),
  923. /** Plumb routing table for MHF offload */
  924. WMI_MHF_OFFLOAD_PLUMB_ROUTING_TBL_CMDID,
  925.  
  926. /*location scan commands*/
  927. /*start batch scan*/
  928. WMI_BATCH_SCAN_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_LOCATION_SCAN),
  929. /*stop batch scan*/
  930. WMI_BATCH_SCAN_DISABLE_CMDID,
  931. /*get batch scan result*/
  932. WMI_BATCH_SCAN_TRIGGER_RESULT_CMDID,
  933. /* OEM related cmd */
  934. WMI_OEM_REQ_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_OEM),
  935. WMI_OEM_REQUEST_CMDID, /* UNUSED */
  936. /* OEM related cmd used for Low Power ranging */
  937. WMI_LPI_OEM_REQ_CMDID,
  938. WMI_OEM_DMA_RING_CFG_REQ_CMDID,
  939.  
  940. /** Nan Request */
  941. WMI_NAN_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_NAN),
  942.  
  943. /** Modem power state command */
  944. WMI_MODEM_POWER_STATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_COEX),
  945. WMI_CHAN_AVOID_UPDATE_CMDID,
  946. WMI_COEX_CONFIG_CMDID,
  947. WMI_CHAN_AVOID_RPT_ALLOW_CMDID,
  948. WMI_COEX_GET_ANTENNA_ISOLATION_CMDID,
  949. WMI_SAR_LIMITS_CMDID,
  950.  
  951. /**
  952. * OBSS scan offload enable/disable commands
  953. * OBSS scan enable CMD will send to FW after VDEV UP, if these conditions are true:
  954. * 1. WMI_SERVICE_OBSS_SCAN is reported by FW in service ready,
  955. * 2. STA connect to a 2.4Ghz ht20/ht40 AP,
  956. * 3. AP enable 20/40 coexistence (OBSS_IE-74 can be found in beacon or association response)
  957. * If OBSS parameters from beacon changed, also use enable CMD to update parameters.
  958. * OBSS scan disable CMD will send to FW if have enabled when tearing down connection.
  959. */
  960. WMI_OBSS_SCAN_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_OBSS_OFL),
  961. WMI_OBSS_SCAN_DISABLE_CMDID,
  962.  
  963. /**LPI commands*/
  964. /**LPI mgmt snooping config command*/
  965. WMI_LPI_MGMT_SNOOPING_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_LPI),
  966. /**LPI scan start command*/
  967. WMI_LPI_START_SCAN_CMDID,
  968. /**LPI scan stop command*/
  969. WMI_LPI_STOP_SCAN_CMDID,
  970.  
  971. /** ExtScan commands */
  972. WMI_EXTSCAN_START_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_EXTSCAN),
  973. WMI_EXTSCAN_STOP_CMDID,
  974. WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID,
  975. WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID,
  976. WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID,
  977. WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID,
  978. WMI_EXTSCAN_SET_CAPABILITIES_CMDID,
  979. WMI_EXTSCAN_GET_CAPABILITIES_CMDID,
  980. WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID,
  981. WMI_EXTSCAN_CONFIGURE_MAWC_CMDID,
  982.  
  983. /** DHCP server offload commands */
  984. WMI_SET_DHCP_SERVER_OFFLOAD_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_DHCP_OFL),
  985.  
  986. /** IPA Offload features related commands */
  987. WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_IPA),
  988.  
  989. /** mDNS responder offload commands */
  990. WMI_MDNS_OFFLOAD_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MDNS_OFL),
  991. WMI_MDNS_SET_FQDN_CMDID,
  992. WMI_MDNS_SET_RESPONSE_CMDID,
  993. WMI_MDNS_GET_STATS_CMDID,
  994.  
  995. /* enable/disable AP Authentication offload */
  996. WMI_SAP_OFL_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SAP_OFL),
  997. WMI_SAP_SET_BLACKLIST_PARAM_CMDID,
  998.  
  999. /** Out-of-context-of-BSS (OCB) commands */
  1000. WMI_OCB_SET_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_OCB),
  1001. WMI_OCB_SET_UTC_TIME_CMDID,
  1002. WMI_OCB_START_TIMING_ADVERT_CMDID,
  1003. WMI_OCB_STOP_TIMING_ADVERT_CMDID,
  1004. WMI_OCB_GET_TSF_TIMER_CMDID,
  1005. WMI_DCC_GET_STATS_CMDID,
  1006. WMI_DCC_CLEAR_STATS_CMDID,
  1007. WMI_DCC_UPDATE_NDL_CMDID,
  1008.  
  1009. /* System-On-Chip commands */
  1010. WMI_SOC_SET_PCL_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SOC),
  1011. WMI_SOC_SET_HW_MODE_CMDID,
  1012. WMI_SOC_SET_DUAL_MAC_CONFIG_CMDID,
  1013. WMI_SOC_SET_ANTENNA_MODE_CMDID,
  1014.  
  1015. /* packet filter commands */
  1016. WMI_PACKET_FILTER_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PKT_FILTER),
  1017. WMI_PACKET_FILTER_ENABLE_CMDID,
  1018.  
  1019. /** Motion Aided WiFi Connectivity (MAWC) commands */
  1020. WMI_MAWC_SENSOR_REPORT_IND_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MAWC),
  1021.  
  1022. /** WMI commands related to PMF 11w Offload */
  1023. WMI_PMF_OFFLOAD_SET_SA_QUERY_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PMF_OFFLOAD),
  1024.  
  1025. /** WMI commands related to pkt filter (BPF) offload */
  1026. WMI_BPF_GET_CAPABILITY_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_BPF_OFFLOAD),
  1027. WMI_BPF_GET_VDEV_STATS_CMDID,
  1028. WMI_BPF_SET_VDEV_INSTRUCTIONS_CMDID,
  1029. WMI_BPF_DEL_VDEV_INSTRUCTIONS_CMDID,
  1030. WMI_BPF_SET_VDEV_ACTIVE_MODE_CMDID,
  1031.  
  1032. /** WMI commands related to monitor mode. */
  1033. WMI_MNT_FILTER_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MONITOR),
  1034.  
  1035. /** WMI commands related to regulatory offload */
  1036. WMI_SET_CURRENT_COUNTRY_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_REGULATORY),
  1037. WMI_11D_SCAN_START_CMDID,
  1038. WMI_11D_SCAN_STOP_CMDID,
  1039. WMI_SET_INIT_COUNTRY_CMDID,
  1040.  
  1041. /**
  1042. * Nan Data commands
  1043. * NDI - NAN Data Interface
  1044. * NDP - NAN Data Path
  1045. */
  1046. /* Commands in prototyping phase */
  1047. WMI_NDI_GET_CAP_REQ_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PROTOTYPE),
  1048. WMI_NDP_INITIATOR_REQ_CMDID,
  1049. WMI_NDP_RESPONDER_REQ_CMDID,
  1050. WMI_NDP_END_REQ_CMDID,
  1051.  
  1052. /** WMI commands related to HW data filtering **/
  1053. WMI_HW_DATA_FILTER_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_HW_DATA_FILTER),
  1054.  
  1055. } WMI_CMD_ID;
  1056.  
  1057. typedef enum {
  1058. /** WMI service is ready; after this event WMI messages can be sent/received */
  1059. WMI_SERVICE_READY_EVENTID = 0x1,
  1060. /** WMI is ready; after this event the wlan subsystem is initialized and can process commands. */
  1061. WMI_READY_EVENTID,
  1062.  
  1063. /** Specify what WMI services the target supports (for services beyond
  1064. * what fits in the WMI_SERVICE_READY_EVENT message's wmi_service_bitmap)
  1065. */
  1066. WMI_SERVICE_AVAILABLE_EVENTID,
  1067.  
  1068. /** Scan specific events */
  1069. WMI_SCAN_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SCAN),
  1070.  
  1071. /* PDEV specific events */
  1072. /** TPC config for the current operating channel */
  1073. WMI_PDEV_TPC_CONFIG_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_PDEV),
  1074. /** Channel stats event */
  1075. WMI_CHAN_INFO_EVENTID,
  1076.  
  1077. /** PHY Error specific WMI event */
  1078. WMI_PHYERR_EVENTID,
  1079.  
  1080. /** eeprom dump event */
  1081. WMI_PDEV_DUMP_EVENTID,
  1082.  
  1083. /** traffic pause event */
  1084. WMI_TX_PAUSE_EVENTID,
  1085.  
  1086. /** DFS radar event */
  1087. WMI_DFS_RADAR_EVENTID,
  1088.  
  1089. /** track L1SS entry and residency event */
  1090. WMI_PDEV_L1SS_TRACK_EVENTID,
  1091.  
  1092. /** Report current temprature of the chip in Celcius degree */
  1093. WMI_PDEV_TEMPERATURE_EVENTID,
  1094.  
  1095. /** Extension of WMI_SERVICE_READY msg with extra target capability info */
  1096. WMI_SERVICE_READY_EXT_EVENTID,
  1097.  
  1098. /** FIPS test mode event */
  1099. WMI_PDEV_FIPS_EVENTID,
  1100.  
  1101. /** Channel hopping avoidance */
  1102. WMI_PDEV_CHANNEL_HOPPING_EVENTID,
  1103.  
  1104. /** CCK ANI level event */
  1105. WMI_PDEV_ANI_CCK_LEVEL_EVENTID,
  1106.  
  1107. /** OFDM ANI level event */
  1108. WMI_PDEV_ANI_OFDM_LEVEL_EVENTID,
  1109.  
  1110. /** Tx PPDU params */
  1111. WMI_PDEV_TPC_EVENTID,
  1112.  
  1113. /** NF Cal Power in DBR/DBM for all channels */
  1114. WMI_PDEV_NFCAL_POWER_ALL_CHANNELS_EVENTID,
  1115.  
  1116. /** SOC/PDEV events */
  1117. WMI_PDEV_SET_HW_MODE_RESP_EVENTID,
  1118. WMI_PDEV_HW_MODE_TRANSITION_EVENTID,
  1119. WMI_PDEV_SET_MAC_CONFIG_RESP_EVENTID,
  1120. /** Report ANT DIV feature's status */
  1121. WMI_PDEV_ANTDIV_STATUS_EVENTID,
  1122. /** Chip level Power stats */
  1123. WMI_PDEV_CHIP_POWER_STATS_EVENTID,
  1124. /** Power Save Failure Detected */
  1125. WMI_PDEV_CHIP_POWER_SAVE_FAILURE_DETECTED_EVENTID,
  1126.  
  1127. /* Event to report the switch count in csa of one or more VDEVs */
  1128. WMI_PDEV_CSA_SWITCH_COUNT_STATUS_EVENTID,
  1129.  
  1130. /** Report the caldata version to host */
  1131. WMI_PDEV_CHECK_CAL_VERSION_EVENTID,
  1132.  
  1133. /** Report chain RSSI and antenna index to host */
  1134. WMI_PDEV_DIV_RSSI_ANTID_EVENTID,
  1135.  
  1136. /** provide noise floor and cycle counts for a channel */
  1137. WMI_PDEV_BSS_CHAN_INFO_EVENTID,
  1138.  
  1139. /* VDEV specific events */
  1140. /** VDEV started event in response to VDEV_START request */
  1141. WMI_VDEV_START_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_VDEV),
  1142. /** vdev stopped event , generated in response to VDEV_STOP request */
  1143. WMI_VDEV_STOPPED_EVENTID,
  1144. /* Indicate the set key (used for setting per
  1145. * peer unicast and per vdev multicast)
  1146. * operation has completed */
  1147. WMI_VDEV_INSTALL_KEY_COMPLETE_EVENTID,
  1148. /* NOTE: WMI_VDEV_MCC_BCN_INTERVAL_CHANGE_REQ_EVENTID would be deprecated. Please
  1149. don't use this for any new implementations */
  1150. /* Firmware requests dynamic change to a specific beacon interval for a specific vdev ID in MCC scenario.
  1151. This request is valid only for vdevs operating in soft AP or P2P GO mode */
  1152. WMI_VDEV_MCC_BCN_INTERVAL_CHANGE_REQ_EVENTID,
  1153.  
  1154. /* Return the TSF timestamp of specified vdev */
  1155. WMI_VDEV_TSF_REPORT_EVENTID,
  1156.  
  1157. /* FW response to Host for vdev delete cmdid */
  1158. WMI_VDEV_DELETE_RESP_EVENTID,
  1159.  
  1160. /* DISA feature: FW response to Host with encrypted/decrypted 802.11 DISA frame */
  1161. WMI_VDEV_ENCRYPT_DECRYPT_DATA_RESP_EVENTID,
  1162.  
  1163. /** event to report mac randomization success **/
  1164. WMI_VDEV_ADD_MAC_ADDR_TO_RX_FILTER_STATUS_EVENTID,
  1165.  
  1166. /* event for ARP stats collection */
  1167. WMI_VDEV_GET_ARP_STAT_EVENTID,
  1168.  
  1169. /** get tx power event in response to VDEV_GET_TX_POWER request */
  1170. WMI_VDEV_GET_TX_POWER_EVENTID,
  1171.  
  1172. /* peer specific events */
  1173. /** FW reauet to kick out the station for reasons like inactivity,lack of response ..etc */
  1174. WMI_PEER_STA_KICKOUT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_PEER),
  1175.  
  1176. /** Peer Info Event with data_rate, rssi, tx_fail_cnt etc */
  1177. WMI_PEER_INFO_EVENTID,
  1178.  
  1179. /** Event indicating that TX fail count reaching threshold */
  1180. WMI_PEER_TX_FAIL_CNT_THR_EVENTID,
  1181.  
  1182. /* Return the estimate link speed for the Peer specified in the
  1183. * WMI_PEER_GET_ESTIMATED_LINKSPEED_CMDID command.
  1184. */
  1185. WMI_PEER_ESTIMATED_LINKSPEED_EVENTID,
  1186. /* Return the peer state
  1187. * WMI_PEER_SET_PARAM_CMDID, WMI_PEER_AUTHORIZE
  1188. */
  1189. WMI_PEER_STATE_EVENTID,
  1190.  
  1191. /* Peer Assoc Conf event to confirm fw had received PEER_ASSOC_CMD.
  1192. * After that, host will send Mx message.
  1193. * Otherwise, host will pause any Mx(STA:M2/M4) message
  1194. */
  1195. WMI_PEER_ASSOC_CONF_EVENTID,
  1196.  
  1197. /* FW response to Host for peer delete cmdid */
  1198. WMI_PEER_DELETE_RESP_EVENTID,
  1199.  
  1200. /** Valid rate code list for peer */
  1201. WMI_PEER_RATECODE_LIST_EVENTID,
  1202. WMI_WDS_PEER_EVENTID,
  1203. WMI_PEER_STA_PS_STATECHG_EVENTID,
  1204. /** Peer Ant Div Info Event with rssi per chain, etc */
  1205. WMI_PEER_ANTDIV_INFO_EVENTID,
  1206.  
  1207. /* beacon/mgmt specific events */
  1208. /** RX management frame. the entire frame is carried along with the event. */
  1209. WMI_MGMT_RX_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MGMT),
  1210. /** software beacon alert event to Host requesting host to Queue a beacon for transmission
  1211. use only in host beacon mode */
  1212. WMI_HOST_SWBA_EVENTID,
  1213. /** beacon tbtt offset event indicating the tsf offset of the tbtt from the theritical value.
  1214. tbtt offset is normally 0 and will be non zero if there are multiple VDEVs operating in
  1215. staggered beacon transmission mode */
  1216. WMI_TBTTOFFSET_UPDATE_EVENTID,
  1217.  
  1218. /** event after the first beacon is transmitted following
  1219. a change in the template.*/
  1220. WMI_OFFLOAD_BCN_TX_STATUS_EVENTID,
  1221. /** event after the first probe response is transmitted following
  1222. a change in the template.*/
  1223. WMI_OFFLOAD_PROB_RESP_TX_STATUS_EVENTID,
  1224. /** Event for Mgmt TX completion event */
  1225. WMI_MGMT_TX_COMPLETION_EVENTID,
  1226. /** Event for Mgmt TX bundle completion event */
  1227. WMI_MGMT_TX_BUNDLE_COMPLETION_EVENTID,
  1228. /** vdev_map used in WMI_TBTTOFFSET_UPDATE_EVENTID supports max 32 vdevs.
  1229. * Use this event if number of vdevs > 32.
  1230. */
  1231. WMI_TBTTOFFSET_EXT_UPDATE_EVENTID,
  1232. /** Event for offchan data TX completion event */
  1233. WMI_OFFCHAN_DATA_TX_COMPLETION_EVENTID,
  1234.  
  1235. /* ADDBA Related WMI Events*/
  1236. /** Indication the completion of the prior
  1237. WMI_PEER_TID_DELBA_CMDID(initiator) */
  1238. WMI_TX_DELBA_COMPLETE_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_BA_NEG),
  1239. /** Indication the completion of the prior
  1240. *WMI_PEER_TID_ADDBA_CMDID(initiator) */
  1241. WMI_TX_ADDBA_COMPLETE_EVENTID,
  1242.  
  1243. /* Seq num returned from hw for a sta/tid pair */
  1244. WMI_BA_RSP_SSN_EVENTID,
  1245.  
  1246. /* Aggregation state requested by BTC */
  1247. WMI_AGGR_STATE_TRIG_EVENTID,
  1248.  
  1249. /** Roam event to trigger roaming on host */
  1250. WMI_ROAM_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_ROAM),
  1251.  
  1252. /** matching AP found from list of profiles */
  1253. WMI_PROFILE_MATCH,
  1254. /** roam synch event */
  1255. WMI_ROAM_SYNCH_EVENTID,
  1256.  
  1257. /** P2P disc found */
  1258. WMI_P2P_DISC_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_P2P),
  1259. /** send noa info to host when noa is changed for beacon tx offload enable */
  1260. WMI_P2P_NOA_EVENTID,
  1261. /** send p2p listen offload stopped event with different reason */
  1262. WMI_P2P_LISTEN_OFFLOAD_STOPPED_EVENTID,
  1263.  
  1264. /** Send EGAP Info to host */
  1265. WMI_AP_PS_EGAP_INFO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_AP_PS),
  1266.  
  1267. /* send pdev resume event to host after pdev resume. */
  1268. WMI_PDEV_RESUME_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SUSPEND),
  1269.  
  1270. /** WOW wake up host event.generated in response to WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID.
  1271. will cary wake reason */
  1272. WMI_WOW_WAKEUP_HOST_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_WOW),
  1273. WMI_D0_WOW_DISABLE_ACK_EVENTID,
  1274. WMI_WOW_INITIAL_WAKEUP_EVENTID,
  1275.  
  1276. /*RTT related event ID*/
  1277. /** RTT measurement report */
  1278. WMI_RTT_MEASUREMENT_REPORT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_RTT),
  1279. /** TSF measurement report */
  1280. WMI_TSF_MEASUREMENT_REPORT_EVENTID,
  1281. /** RTT error report */
  1282. WMI_RTT_ERROR_REPORT_EVENTID,
  1283.  
  1284. /*STATS specific events*/
  1285. /** txrx stats event requested by host */
  1286. WMI_STATS_EXT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_STATS),
  1287. /** FW iface link stats Event */
  1288. WMI_IFACE_LINK_STATS_EVENTID,
  1289. /** FW iface peer link stats Event */
  1290. WMI_PEER_LINK_STATS_EVENTID,
  1291. /** FW Update radio stats Event */
  1292. WMI_RADIO_LINK_STATS_EVENTID,
  1293.  
  1294. /** Firmware memory dump Complete event*/
  1295. WMI_UPDATE_FW_MEM_DUMP_EVENTID,
  1296.  
  1297. /** Event indicating the DIAG logs/events supported by FW */
  1298. WMI_DIAG_EVENT_LOG_SUPPORTED_EVENTID,
  1299.  
  1300. /** Instantaneous RSSI event */
  1301. WMI_INST_RSSI_STATS_EVENTID,
  1302.  
  1303. /** FW update tx power levels event */
  1304. WMI_RADIO_TX_POWER_LEVEL_STATS_EVENTID,
  1305.  
  1306. /** This event is used to report wlan stats to host.
  1307. * It is triggered under 3 conditions:
  1308. * (a) Periodic timer timed out, based on the period specified
  1309. * by WMI_PDEV_PARAM_STATS_OBSERVATION_PERIOD
  1310. * (b) Whenever any of the (enabled) stats thresholds specified
  1311. * in the WMI_PDEV_SET_STATS_THRESHOLD_CMD message is exceeded
  1312. * within the current stats period.
  1313. * (c) In response to the one-time wlan stats request of
  1314. * WMI_REQUEST_WLAN_STATS_CMDID from host.
  1315. *
  1316. * If this event is triggered by condition a or b,
  1317. * the stats counters are cleared at the start of each period.
  1318. * But if it is triggered by condition c, stats counters won't be cleared.
  1319. */
  1320. WMI_REPORT_STATS_EVENTID,
  1321.  
  1322. /** Event indicating RCPI of the peer requested by host in the WMI_REQUEST_RCPI_CMDID */
  1323. WMI_UPDATE_RCPI_EVENTID,
  1324.  
  1325. /** This event is used to respond to WMI_REQUEST_PEER_STATS_INFO_CMDID
  1326. * and report peer stats info to host */
  1327. WMI_PEER_STATS_INFO_EVENTID,
  1328.  
  1329. /** This event is used to respond to WMI_REQUEST_RADIO_CHAN_STATS_CMDID
  1330. * and report radio channel stats to host */
  1331. WMI_RADIO_CHAN_STATS_EVENTID,
  1332.  
  1333. /* NLO specific events */
  1334. /** NLO match event after the first match */
  1335. WMI_NLO_MATCH_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_NLO_OFL),
  1336.  
  1337. /** NLO scan complete event */
  1338. WMI_NLO_SCAN_COMPLETE_EVENTID,
  1339.  
  1340. /** APFIND specific events */
  1341. WMI_APFIND_EVENTID,
  1342.  
  1343. /** passpoint network match event */
  1344. WMI_PASSPOINT_MATCH_EVENTID,
  1345.  
  1346. /** GTK offload stautus event requested by host */
  1347. WMI_GTK_OFFLOAD_STATUS_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_GTK_OFL),
  1348.  
  1349. /** GTK offload failed to rekey event */
  1350. WMI_GTK_REKEY_FAIL_EVENTID,
  1351. /* CSA IE received event */
  1352. WMI_CSA_HANDLING_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_CSA_OFL),
  1353.  
  1354. /*chatter query reply event*/
  1355. WMI_CHATTER_PC_QUERY_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_CHATTER),
  1356.  
  1357. /** DFS related events */
  1358. WMI_PDEV_DFS_RADAR_DETECTION_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_DFS),
  1359. /** Indicate channel-availability-check completion event to host */
  1360. WMI_VDEV_DFS_CAC_COMPLETE_EVENTID,
  1361. /** Indicate off-channel-availability-check completion event to host */
  1362. WMI_VDEV_ADFS_OCAC_COMPLETE_EVENTID,
  1363.  
  1364. /** echo event in response to echo command */
  1365. WMI_ECHO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MISC),
  1366.  
  1367. /* !!IMPORTANT!!
  1368. * If you need to add a new WMI event ID to the WMI_GRP_MISC sub-group,
  1369. * please make sure you add it BEHIND WMI_PDEV_UTF_EVENTID,
  1370. * as we MUST have a fixed value here to maintain compatibility between
  1371. * UTF and the ART2 driver
  1372. */
  1373. /** UTF specific WMI event */
  1374. WMI_PDEV_UTF_EVENTID,
  1375.  
  1376. /** event carries buffered debug messages */
  1377. WMI_DEBUG_MESG_EVENTID,
  1378. /** FW stats(periodic or on shot) */
  1379. WMI_UPDATE_STATS_EVENTID,
  1380. /** debug print message used for tracing FW code while debugging */
  1381. WMI_DEBUG_PRINT_EVENTID,
  1382. /** DCS wlan or non-wlan interference event
  1383. */
  1384. WMI_DCS_INTERFERENCE_EVENTID,
  1385. /** VI spoecific event */
  1386. WMI_PDEV_QVIT_EVENTID,
  1387. /** FW code profile data in response to profile request */
  1388. WMI_WLAN_PROFILE_DATA_EVENTID,
  1389. /* Factory Testing Mode request event
  1390. * used for integrated chipsets */
  1391. WMI_PDEV_FTM_INTG_EVENTID,
  1392. /* avoid list of frequencies .
  1393. */
  1394. WMI_WLAN_FREQ_AVOID_EVENTID,
  1395. /* Indicate the keepalive parameters */
  1396. WMI_VDEV_GET_KEEPALIVE_EVENTID,
  1397. /*Thermal Management event*/
  1398. WMI_THERMAL_MGMT_EVENTID,
  1399.  
  1400. /* Container for DIAG event and log data */
  1401. WMI_DIAG_DATA_CONTAINER_EVENTID,
  1402.  
  1403. /* host auto shutdown event */
  1404. WMI_HOST_AUTO_SHUTDOWN_EVENTID,
  1405.  
  1406. /*update mib counters together with WMI_UPDATE_STATS_EVENTID*/
  1407. WMI_UPDATE_WHAL_MIB_STATS_EVENTID,
  1408.  
  1409. /*update ht/vht info based on vdev (rx and tx NSS and preamble)*/
  1410. WMI_UPDATE_VDEV_RATE_STATS_EVENTID,
  1411.  
  1412. WMI_DIAG_EVENTID,
  1413.  
  1414. /** Set OCB Sched Response, deprecated */
  1415. WMI_OCB_SET_SCHED_EVENTID,
  1416.  
  1417. /** event to indicate the flush of the buffered debug messages is complete*/
  1418. WMI_DEBUG_MESG_FLUSH_COMPLETE_EVENTID,
  1419.  
  1420. /** event to report mix/max RSSI breach events */
  1421. WMI_RSSI_BREACH_EVENTID,
  1422.  
  1423. /** event to report completion of data storage into flash memory */
  1424. WMI_TRANSFER_DATA_TO_FLASH_COMPLETE_EVENTID,
  1425.  
  1426. /** event to report SCPC calibrated data to host */
  1427. WMI_PDEV_UTF_SCPC_EVENTID,
  1428.  
  1429. /** event to provide requested data from the target's flash memory */
  1430. WMI_READ_DATA_FROM_FLASH_EVENTID,
  1431.  
  1432. /** event to report rx aggregation failure frame information */
  1433. WMI_REPORT_RX_AGGR_FAILURE_EVENTID,
  1434.  
  1435. /** event to upload a PKGID to host to identify chip for various products */
  1436. WMI_PKGID_EVENTID,
  1437.  
  1438. /* Thermal Throttling stats event id for every pdev and zones, etc */
  1439. WMI_THERM_THROT_STATS_EVENTID,
  1440.  
  1441. /* GPIO Event */
  1442. WMI_GPIO_INPUT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_GPIO),
  1443. /** upload H_CV info WMI event
  1444. * to indicate uploaded H_CV info to host
  1445. */
  1446. WMI_UPLOADH_EVENTID,
  1447.  
  1448. /** capture H info WMI event
  1449. * to indicate captured H info to host
  1450. */
  1451. WMI_CAPTUREH_EVENTID,
  1452. /* hw RFkill */
  1453. WMI_RFKILL_STATE_CHANGE_EVENTID,
  1454.  
  1455. /* TDLS Event */
  1456. WMI_TDLS_PEER_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_TDLS),
  1457.  
  1458. /** STA SMPS Event */
  1459. /** force SMPS mode */
  1460. WMI_STA_SMPS_FORCE_MODE_COMPLETE_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_STA_SMPS),
  1461.  
  1462. /*location scan event*/
  1463. /*report the firmware's capability of batch scan*/
  1464. WMI_BATCH_SCAN_ENABLED_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_LOCATION_SCAN),
  1465. /*batch scan result*/
  1466. WMI_BATCH_SCAN_RESULT_EVENTID,
  1467. /* OEM Event */
  1468. WMI_OEM_CAPABILITY_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_OEM), /*DEPRECATED*/
  1469. WMI_OEM_MEASUREMENT_REPORT_EVENTID, /* DEPRECATED */
  1470. WMI_OEM_ERROR_REPORT_EVENTID, /* DEPRECATED */
  1471. WMI_OEM_RESPONSE_EVENTID,
  1472. WMI_OEM_DMA_RING_CFG_RSP_EVENTID,
  1473. WMI_OEM_DMA_BUF_RELEASE_EVENTID,
  1474.  
  1475. /* NAN Event */
  1476. WMI_NAN_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_NAN),
  1477. WMI_NAN_DISC_IFACE_CREATED_EVENTID,
  1478. WMI_NAN_DISC_IFACE_DELETED_EVENTID,
  1479. WMI_NAN_STARTED_CLUSTER_EVENTID,
  1480. WMI_NAN_JOINED_CLUSTER_EVENTID,
  1481.  
  1482. /* Coex Event */
  1483. WMI_COEX_REPORT_ANTENNA_ISOLATION_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_COEX),
  1484.  
  1485. /* LPI Event */
  1486. WMI_LPI_RESULT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_LPI),
  1487. WMI_LPI_STATUS_EVENTID,
  1488. WMI_LPI_HANDOFF_EVENTID,
  1489.  
  1490. /* ExtScan events */
  1491. WMI_EXTSCAN_START_STOP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_EXTSCAN),
  1492. WMI_EXTSCAN_OPERATION_EVENTID,
  1493. WMI_EXTSCAN_TABLE_USAGE_EVENTID,
  1494. WMI_EXTSCAN_CACHED_RESULTS_EVENTID,
  1495. WMI_EXTSCAN_WLAN_CHANGE_RESULTS_EVENTID,
  1496. WMI_EXTSCAN_HOTLIST_MATCH_EVENTID,
  1497. WMI_EXTSCAN_CAPABILITIES_EVENTID,
  1498. WMI_EXTSCAN_HOTLIST_SSID_MATCH_EVENTID,
  1499.  
  1500. /* mDNS offload events */
  1501. WMI_MDNS_STATS_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MDNS_OFL),
  1502.  
  1503. /* SAP Authentication offload events */
  1504. WMI_SAP_OFL_ADD_STA_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SAP_OFL),
  1505. WMI_SAP_OFL_DEL_STA_EVENTID,
  1506.  
  1507. /** Out-of-context-of-bss (OCB) events */
  1508. WMI_OCB_SET_CONFIG_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_OCB),
  1509. WMI_OCB_GET_TSF_TIMER_RESP_EVENTID,
  1510. WMI_DCC_GET_STATS_RESP_EVENTID,
  1511. WMI_DCC_UPDATE_NDL_RESP_EVENTID,
  1512. WMI_DCC_STATS_EVENTID,
  1513.  
  1514. /* System-On-Chip events */
  1515. WMI_SOC_SET_HW_MODE_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SOC),
  1516. WMI_SOC_HW_MODE_TRANSITION_EVENTID,
  1517. WMI_SOC_SET_DUAL_MAC_CONFIG_RESP_EVENTID,
  1518.  
  1519. /** Motion Aided WiFi Connectivity (MAWC) events */
  1520. WMI_MAWC_ENABLE_SENSOR_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MAWC),
  1521.  
  1522. /** pkt filter (BPF) offload relevant events */
  1523. WMI_BPF_CAPABILIY_INFO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_BPF_OFFLOAD),
  1524. WMI_BPF_VDEV_STATS_INFO_EVENTID,
  1525.  
  1526.  
  1527. /* RMC specific event */
  1528. /* RMC manual leader selected event */
  1529. WMI_RMC_NEW_LEADER_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_RMC),
  1530.  
  1531. /** WMI events related to regulatory offload */
  1532. WMI_REG_CHAN_LIST_CC_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_REGULATORY),
  1533. WMI_11D_NEW_COUNTRY_EVENTID,
  1534.  
  1535. /** Events in Prototyping phase */
  1536. WMI_NDI_CAP_RSP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_PROTOTYPE),
  1537. WMI_NDP_INITIATOR_RSP_EVENTID,
  1538. WMI_NDP_RESPONDER_RSP_EVENTID,
  1539. WMI_NDP_END_RSP_EVENTID,
  1540. WMI_NDP_INDICATION_EVENTID,
  1541. WMI_NDP_CONFIRM_EVENTID,
  1542. WMI_NDP_END_INDICATION_EVENTID,
  1543. WMI_WLAN_COEX_BT_ACTIVITY_EVENTID,
  1544. } WMI_EVT_ID;
  1545.  
  1546. /* defines for OEM message sub-types */
  1547. #define WMI_OEM_CAPABILITY_REQ 0x01
  1548. #define WMI_OEM_CAPABILITY_RSP 0x02
  1549. #define WMI_OEM_MEASUREMENT_REQ 0x03
  1550. #define WMI_OEM_MEASUREMENT_RSP 0x04
  1551. #define WMI_OEM_ERROR_REPORT_RSP 0x05
  1552. #define WMI_OEM_NAN_MEAS_REQ 0x06
  1553. #define WMI_OEM_NAN_MEAS_RSP 0x07
  1554. #define WMI_OEM_NAN_PEER_INFO 0x08
  1555. #define WMI_OEM_CONFIGURE_LCR 0x09
  1556. #define WMI_OEM_CONFIGURE_LCI 0x0A
  1557.  
  1558.  
  1559. #define WMI_CHAN_LIST_TAG 0x1
  1560. #define WMI_SSID_LIST_TAG 0x2
  1561. #define WMI_BSSID_LIST_TAG 0x3
  1562. #define WMI_IE_TAG 0x4
  1563.  
  1564. typedef struct {
  1565. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_channel */
  1566. /** primary 20 MHz channel frequency in mhz */
  1567. A_UINT32 mhz;
  1568. /** Center frequency 1 in MHz*/
  1569. A_UINT32 band_center_freq1;
  1570. /** Center frequency 2 in MHz - valid only for 11acvht 80plus80 mode*/
  1571. A_UINT32 band_center_freq2;
  1572. /** channel info described below */
  1573. A_UINT32 info;
  1574. /** contains min power, max power, reg power and reg class id. */
  1575. A_UINT32 reg_info_1;
  1576. /** contains antennamax */
  1577. A_UINT32 reg_info_2;
  1578. } wmi_channel;
  1579.  
  1580. typedef enum {
  1581. WMI_CHANNEL_CHANGE_CAUSE_NONE = 0,
  1582. WMI_CHANNEL_CHANGE_CAUSE_CSA,
  1583. } wmi_channel_change_cause;
  1584.  
  1585. /** channel info consists of 6 bits of channel mode */
  1586.  
  1587. #define WMI_SET_CHANNEL_MODE(pwmi_channel,val) do { \
  1588. (pwmi_channel)->info &= 0xffffffc0; \
  1589. (pwmi_channel)->info |= (val); \
  1590. } while (0)
  1591.  
  1592. #define WMI_GET_CHANNEL_MODE(pwmi_channel) ((pwmi_channel)->info & 0x0000003f)
  1593.  
  1594. #define WMI_CHAN_FLAG_HT40_PLUS 6
  1595. #define WMI_CHAN_FLAG_PASSIVE 7
  1596. #define WMI_CHAN_ADHOC_ALLOWED 8
  1597. #define WMI_CHAN_AP_DISABLED 9
  1598. #define WMI_CHAN_FLAG_DFS 10
  1599. #define WMI_CHAN_FLAG_ALLOW_HT 11 /* HT is allowed on this channel */
  1600. #define WMI_CHAN_FLAG_ALLOW_VHT 12 /* VHT is allowed on this channel */
  1601. #define WMI_CHANNEL_CHANGE_CAUSE_CSA 13 /*Indicate reason for channel switch */
  1602. #define WMI_CHAN_FLAG_HALF_RATE 14 /* Indicates half rate channel */
  1603. #define WMI_CHAN_FLAG_QUARTER_RATE 15 /* Indicates quarter rate channel */
  1604. #define WMI_CHAN_FLAG_DFS_CFREQ2 16 /* Enable radar event reporting for sec80 in VHT80p80 */
  1605. #define WMI_CHAN_FLAG_ALLOW_HE 17 /* HE (11ax) is allowed on this channel */
  1606.  
  1607. #define WMI_SET_CHANNEL_FLAG(pwmi_channel,flag) do { \
  1608. (pwmi_channel)->info |= (1 << flag); \
  1609. } while (0)
  1610.  
  1611. #define WMI_GET_CHANNEL_FLAG(pwmi_channel,flag) \
  1612. (((pwmi_channel)->info & (1 << flag)) >> flag)
  1613.  
  1614. #define WMI_SET_CHANNEL_MIN_POWER(pwmi_channel,val) do { \
  1615. (pwmi_channel)->reg_info_1 &= 0xffffff00; \
  1616. (pwmi_channel)->reg_info_1 |= (val & 0xff); \
  1617. } while (0)
  1618. #define WMI_GET_CHANNEL_MIN_POWER(pwmi_channel) ((pwmi_channel)->reg_info_1 & 0xff)
  1619.  
  1620. #define WMI_SET_CHANNEL_MAX_POWER(pwmi_channel,val) do { \
  1621. (pwmi_channel)->reg_info_1 &= 0xffff00ff; \
  1622. (pwmi_channel)->reg_info_1 |= ((val & 0xff) << 8); \
  1623. } while (0)
  1624. #define WMI_GET_CHANNEL_MAX_POWER(pwmi_channel) ((((pwmi_channel)->reg_info_1) >> 8) & 0xff)
  1625.  
  1626. #define WMI_SET_CHANNEL_REG_POWER(pwmi_channel,val) do { \
  1627. (pwmi_channel)->reg_info_1 &= 0xff00ffff; \
  1628. (pwmi_channel)->reg_info_1 |= ((val & 0xff) << 16); \
  1629. } while (0)
  1630. #define WMI_GET_CHANNEL_REG_POWER(pwmi_channel) ((((pwmi_channel)->reg_info_1) >> 16) & 0xff)
  1631. #define WMI_SET_CHANNEL_REG_CLASSID(pwmi_channel,val) do { \
  1632. (pwmi_channel)->reg_info_1 &= 0x00ffffff; \
  1633. (pwmi_channel)->reg_info_1 |= ((val & 0xff) << 24); \
  1634. } while (0)
  1635. #define WMI_GET_CHANNEL_REG_CLASSID(pwmi_channel) ((((pwmi_channel)->reg_info_1) >> 24) & 0xff)
  1636.  
  1637. #define WMI_SET_CHANNEL_ANTENNA_MAX(pwmi_channel,val) do { \
  1638. (pwmi_channel)->reg_info_2 &= 0xffffff00; \
  1639. (pwmi_channel)->reg_info_2 |= (val & 0xff); \
  1640. } while (0)
  1641. #define WMI_GET_CHANNEL_ANTENNA_MAX(pwmi_channel) ((pwmi_channel)->reg_info_2 & 0xff)
  1642.  
  1643. /* max tx power is in 1 dBm units */
  1644. #define WMI_SET_CHANNEL_MAX_TX_POWER(pwmi_channel,val) do { \
  1645. (pwmi_channel)->reg_info_2 &= 0xffff00ff; \
  1646. (pwmi_channel)->reg_info_2 |= ((val & 0xff) << 8); \
  1647. } while (0)
  1648. #define WMI_GET_CHANNEL_MAX_TX_POWER(pwmi_channel) ((((pwmi_channel)->reg_info_2)>>8) & 0xff)
  1649.  
  1650.  
  1651. /** HT Capabilities*/
  1652. #define WMI_HT_CAP_ENABLED 0x0001 /* HT Enabled/ disabled */
  1653. #define WMI_HT_CAP_HT20_SGI 0x0002 /* Short Guard Interval with HT20 */
  1654. #define WMI_HT_CAP_DYNAMIC_SMPS 0x0004 /* Dynamic MIMO powersave */
  1655. #define WMI_HT_CAP_TX_STBC 0x0008 /* B3 TX STBC */
  1656. #define WMI_HT_CAP_TX_STBC_MASK_SHIFT 3
  1657. #define WMI_HT_CAP_RX_STBC 0x0030 /* B4-B5 RX STBC */
  1658. #define WMI_HT_CAP_RX_STBC_MASK_SHIFT 4
  1659. #define WMI_HT_CAP_LDPC 0x0040 /* LDPC supported */
  1660. #define WMI_HT_CAP_L_SIG_TXOP_PROT 0x0080 /* L-SIG TXOP Protection */
  1661. #define WMI_HT_CAP_MPDU_DENSITY 0x0700 /* MPDU Density */
  1662. #define WMI_HT_CAP_MPDU_DENSITY_MASK_SHIFT 8
  1663. #define WMI_HT_CAP_HT40_SGI 0x0800
  1664. #define WMI_HT_CAP_RX_LDPC 0x1000 /* LDPC RX support */
  1665. #define WMI_HT_CAP_TX_LDPC 0x2000 /* LDPC TX support */
  1666.  
  1667.  
  1668. /* These macros should be used when we wish to advertise STBC support for
  1669. * only 1SS or 2SS or 3SS. */
  1670. #define WMI_HT_CAP_RX_STBC_1SS 0x0010 /* B4-B5 RX STBC */
  1671. #define WMI_HT_CAP_RX_STBC_2SS 0x0020 /* B4-B5 RX STBC */
  1672. #define WMI_HT_CAP_RX_STBC_3SS 0x0030 /* B4-B5 RX STBC */
  1673.  
  1674.  
  1675. #define WMI_HT_CAP_DEFAULT_ALL (WMI_HT_CAP_ENABLED | \
  1676. WMI_HT_CAP_HT20_SGI | \
  1677. WMI_HT_CAP_HT40_SGI | \
  1678. WMI_HT_CAP_TX_STBC | \
  1679. WMI_HT_CAP_RX_STBC | \
  1680. WMI_HT_CAP_LDPC | \
  1681. WMI_HT_CAP_TX_LDPC | \
  1682. WMI_HT_CAP_RX_LDPC)
  1683.  
  1684. /* WMI_VHT_CAP_* these maps to ieee 802.11ac vht capability information
  1685. field. The fields not defined here are not supported, or reserved.
  1686. Do not change these masks and if you have to add new one follow the
  1687. bitmask as specified by 802.11ac draft.
  1688. */
  1689.  
  1690.  
  1691. #define WMI_VHT_CAP_MAX_MPDU_LEN_7935 0x00000001
  1692. #define WMI_VHT_CAP_MAX_MPDU_LEN_11454 0x00000002
  1693. #define WMI_VHT_CAP_MAX_MPDU_LEN_MASK 0x00000003
  1694. #define WMI_VHT_CAP_CH_WIDTH_160MHZ 0x00000004
  1695. #define WMI_VHT_CAP_CH_WIDTH_80P80_160MHZ 0x00000008
  1696. #define WMI_VHT_CAP_RX_LDPC 0x00000010
  1697. #define WMI_VHT_CAP_SGI_80MHZ 0x00000020
  1698. #define WMI_VHT_CAP_SGI_160MHZ 0x00000040
  1699. #define WMI_VHT_CAP_TX_STBC 0x00000080
  1700. #define WMI_VHT_CAP_RX_STBC_MASK 0x00000300
  1701. #define WMI_VHT_CAP_RX_STBC_MASK_SHIFT 8
  1702. #define WMI_VHT_CAP_SU_BFORMER 0x00000800
  1703. #define WMI_VHT_CAP_SU_BFORMEE 0x00001000
  1704. #define WMI_VHT_CAP_MAX_CS_ANT_MASK 0x0000E000
  1705. #define WMI_VHT_CAP_MAX_CS_ANT_MASK_SHIFT 13
  1706. #define WMI_VHT_CAP_MAX_SND_DIM_MASK 0x00070000
  1707. #define WMI_VHT_CAP_MAX_SND_DIM_MASK_SHIFT 16
  1708. #define WMI_VHT_CAP_MU_BFORMER 0x00080000
  1709. #define WMI_VHT_CAP_MU_BFORMEE 0x00100000
  1710. #define WMI_VHT_CAP_TXOP_PS 0x00200000
  1711. #define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP 0x03800000
  1712. #define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIFT 23
  1713. #define WMI_VHT_CAP_RX_FIXED_ANT 0x10000000
  1714. #define WMI_VHT_CAP_TX_FIXED_ANT 0x20000000
  1715. #define WMI_VHT_CAP_TX_LDPC 0x40000000
  1716.  
  1717.  
  1718. /* TEMPORARY:
  1719. * Preserve the incorrect old name as an alias for the correct new name
  1720. * until all references to the old name have been removed from all hosts
  1721. * and targets.
  1722. */
  1723. #define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIT WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIFT
  1724.  
  1725.  
  1726. /* These macros should be used when we wish to advertise STBC support for
  1727. * only 1SS or 2SS or 3SS. */
  1728. #define WMI_VHT_CAP_RX_STBC_1SS 0x00000100
  1729. #define WMI_VHT_CAP_RX_STBC_2SS 0x00000200
  1730. #define WMI_VHT_CAP_RX_STBC_3SS 0x00000300
  1731.  
  1732. /* TEMPORARY:
  1733. * Preserve the incorrect old name as an alias for the correct new name
  1734. * until all references to the old name have been removed from all hosts
  1735. * and targets.
  1736. */
  1737. #define WMI_vHT_CAP_RX_STBC_3SS WMI_VHT_CAP_RX_STBC_3SS
  1738.  
  1739. #define WMI_VHT_CAP_DEFAULT_ALL (WMI_VHT_CAP_MAX_MPDU_LEN_11454 | \
  1740. WMI_VHT_CAP_SGI_80MHZ | \
  1741. WMI_VHT_CAP_TX_STBC | \
  1742. WMI_VHT_CAP_RX_STBC_MASK | \
  1743. WMI_VHT_CAP_RX_LDPC | \
  1744. WMI_VHT_CAP_TX_LDPC | \
  1745. WMI_VHT_CAP_MAX_AMPDU_LEN_EXP | \
  1746. WMI_VHT_CAP_RX_FIXED_ANT | \
  1747. WMI_VHT_CAP_TX_FIXED_ANT)
  1748.  
  1749. /* Interested readers refer to Rx/Tx MCS Map definition as defined in
  1750. 802.11ac
  1751. */
  1752. #define WMI_VHT_MAX_MCS_4_SS_MASK(r,ss) ((3 & (r)) << (((ss) - 1) << 1))
  1753. #define WMI_VHT_MAX_SUPP_RATE_MASK 0x1fff0000
  1754. #define WMI_VHT_MAX_SUPP_RATE_MASK_SHIFT 16
  1755.  
  1756. /** 11ax capabilities */
  1757. #define WMI_HE_CAP_PPE_PRESENT 0x00000001
  1758. #define WMI_HE_CAP_TWT_RESPONDER_SUPPORT 0x00000002
  1759. #define WMI_HE_CAP_TWT_REQUESTER_SUPPORT 0x00000004
  1760. #define WMI_HE_FRAG_SUPPORT_MASK 0x00000018
  1761. #define WMI_HE_FRAG_SUPPORT_SHIFT 3
  1762.  
  1763. /* Interested readers refer to Rx/Tx MCS Map definition as defined in 802.11ax
  1764. */
  1765. #define WMI_HE_MAX_MCS_4_SS_MASK(r,ss) ((7 & (r)) << ((((ss) - 1) << 1)+((ss) - 1)))
  1766. #define WMI_HE_MAX_SUPP_RATE_MASK 0x1f000000
  1767. #define WMI_HE_MAX_SUPP_RATE_MASK_SHIFT 24
  1768.  
  1769. /* fragmentation support field value */
  1770. enum {
  1771. WMI_HE_FRAG_SUPPORT_LEVEL0, /* No Fragmentation support */
  1772. WMI_HE_FRAG_SUPPORT_LEVEL1, /* support for fragments within a VHT single MPDU, no support for fragments within AMPDU */
  1773. WMI_HE_FRAG_SUPPORT_LEVEL2, /* support for up to 1 fragment per MSDU within a single A-MPDU */
  1774. WMI_HE_FRAG_SUPPORT_LEVEL3, /* support for multiple fragments per MSDU within an A-MPDU */
  1775. };
  1776.  
  1777. /** NOTE: This defs cannot be changed in the future without breaking WMI compatibility */
  1778. #define WMI_MAX_NUM_SS MAX_HE_NSS
  1779. #define WMI_MAX_NUM_RU MAX_HE_RU
  1780.  
  1781. /*
  1782. * Figure 8 554ae: -PPE Threshold Info field format
  1783. * we pack PPET16 and PPT8 for four RU's in one element of array.
  1784. *
  1785. * ppet16_ppet8_ru3_ru0 array element 0 holds:
  1786. * | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 |
  1787. *rsvd |NSS1,RU4|NSS1,RU4|NSS1,RU3|NSS1,RU3|NSS1,RU2|NSS1,RU2|NSS1,RU1|NSS1,RU1|
  1788. *31:23| 22:20 | 19:17 | 17:15 | 14:12 | 11:9 | 8:6 | 5:3 | 2:0 |
  1789. *
  1790. * ppet16_ppet8_ru3_ru0 array element 1 holds:
  1791. * | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 |
  1792. *rsvd |NSS2,RU4|NSS2,RU4|NSS2,RU3|NSS2,RU3|NSS2,RU2|NSS2,RU2|NSS2,RU1|NSS2,RU1|
  1793. *31:23| 22:20 | 19:17 | 17:15 | 14:12 | 11:9 | 8:6 | 5:3 | 2:0 |
  1794. *
  1795. * etc.
  1796. */
  1797.  
  1798. /*
  1799. * Note that in these macros, "ru" is one-based, not zero-based, while
  1800. * nssm1 is zero-based.
  1801. */
  1802. #define WMI_SET_PPET16(ppet16_ppet8_ru3_ru0, ru, nssm1, ppet) \
  1803. do { \
  1804. ppet16_ppet8_ru3_ru0[nssm1] &= ~(7 << (((ru-1) & 3) * 6)); \
  1805. ppet16_ppet8_ru3_ru0[nssm1] |= ((ppet & 7) << (((ru-1) & 3) * 6)); \
  1806. } while (0)
  1807.  
  1808. #define WMI_GET_PPET16(ppet16_ppet8_ru3_ru0, ru, nssm1) \
  1809. ((ppet16_ppet8_ru3_ru0[nssm1] >> (((ru-1) & 3) * 6)) & 7)
  1810.  
  1811. #define WMI_SET_PPET8(ppet16_ppet8_ru3_ru0, ru, nssm1, ppet) \
  1812. do { \
  1813. ppet16_ppet8_ru3_ru0[nssm1] &= ~(7 << (((ru-1) & 3) * 6 + 3)); \
  1814. ppet16_ppet8_ru3_ru0[nssm1] |= ((ppet&7) << (((ru-1) & 3) * 6 + 3)); \
  1815. } while (0)
  1816.  
  1817. #define WMI_GET_PPET8(ppet16_ppet8_ru3_ru0, ru, nssm1) \
  1818. ((ppet16_ppet8_ru3_ru0[nssm1] >> (((ru-1) & 3) * 6 + 3)) & 7)
  1819.  
  1820. typedef struct _wmi_ppe_threshold {
  1821. A_UINT32 numss_m1; /** NSS - 1*/
  1822. union {
  1823. A_UINT32 ru_count; /** RU COUNT OBSOLETE to be removed after few versions */
  1824. A_UINT32 ru_mask; /** RU index mask */
  1825. };
  1826. A_UINT32 ppet16_ppet8_ru3_ru0[WMI_MAX_NUM_SS]; /** ppet8 and ppet16 for max num ss */
  1827. } wmi_ppe_threshold;
  1828.  
  1829. /* WMI_SYS_CAPS_* refer to the capabilities that system support
  1830. */
  1831. #define WMI_SYS_CAP_ENABLE 0x00000001
  1832. #define WMI_SYS_CAP_TXPOWER 0x00000002
  1833.  
  1834. /*
  1835. * WMI Dual Band Simultaneous (DBS) hardware mode list bit-mask definitions.
  1836. * Bits 5:0 are reserved
  1837. */
  1838. #define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS (28)
  1839. #define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS (24)
  1840. #define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS (20)
  1841. #define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS (16)
  1842. #define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS (12)
  1843. #define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS (8)
  1844. #define WMI_DBS_HW_MODE_DBS_MODE_BITPOS (7)
  1845. #define WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS (6)
  1846.  
  1847. #define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS)
  1848. #define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS)
  1849. #define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS)
  1850. #define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS)
  1851. #define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_MASK (0xf << WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS)
  1852. #define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_MASK (0xf << WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS)
  1853. #define WMI_DBS_HW_MODE_DBS_MODE_MASK (0x1 << WMI_DBS_HW_MODE_DBS_MODE_BITPOS)
  1854. #define WMI_DBS_HW_MODE_AGILE_DFS_MODE_MASK (0x1 << WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS)
  1855.  
  1856. #define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_SET(hw_mode, value) \
  1857. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS, 4, value)
  1858. #define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_SET(hw_mode, value) \
  1859. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS, 4, value)
  1860. #define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_SET(hw_mode, value) \
  1861. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS, 4, value)
  1862. #define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_SET(hw_mode, value) \
  1863. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS, 4, value)
  1864. #define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_SET(hw_mode, value) \
  1865. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS, 4, value)
  1866. #define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_SET(hw_mode, value) \
  1867. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS, 4, value)
  1868. #define WMI_DBS_HW_MODE_DBS_MODE_SET(hw_mode, value) \
  1869. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_DBS_MODE_BITPOS, 1, value)
  1870. #define WMI_DBS_HW_MODE_AGILE_DFS_SET(hw_mode, value) \
  1871. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS, 1, value)
  1872.  
  1873. #define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_GET(hw_mode) \
  1874. ((hw_mode & WMI_DBS_HW_MODE_MAC0_TX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS)
  1875. #define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_GET(hw_mode) \
  1876. ((hw_mode & WMI_DBS_HW_MODE_MAC0_RX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS)
  1877. #define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_GET(hw_mode) \
  1878. ((hw_mode & WMI_DBS_HW_MODE_MAC1_TX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS)
  1879. #define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_GET(hw_mode) \
  1880. ((hw_mode & WMI_DBS_HW_MODE_MAC1_RX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS)
  1881. #define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_GET(hw_mode) \
  1882. ((hw_mode & WMI_DBS_HW_MODE_MAC0_BANDWIDTH_MASK) >> WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS)
  1883. #define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_GET(hw_mode) \
  1884. ((hw_mode & WMI_DBS_HW_MODE_MAC1_BANDWIDTH_MASK) >> WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS)
  1885. #define WMI_DBS_HW_MODE_DBS_MODE_GET(hw_mode) \
  1886. ((hw_mode & WMI_DBS_HW_MODE_DBS_MODE_MASK) >> WMI_DBS_HW_MODE_DBS_MODE_BITPOS)
  1887. #define WMI_DBS_HW_MODE_AGILE_DFS_GET(hw_mode) \
  1888. ((hw_mode & WMI_DBS_HW_MODE_AGILE_DFS_MODE_MASK) >> WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS)
  1889.  
  1890. #define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS (31)
  1891. #define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS (30)
  1892. #define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS (29)
  1893. #define WMI_DBS_CONC_SCAN_CFG_ASYNC_DBS_SCAN_BITPOS (28)
  1894. #define WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_BITPOS (27)
  1895.  
  1896. #define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS)
  1897. #define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS)
  1898. #define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS)
  1899. #define WMI_DBS_CONC_SCAN_CFG_ASYC_DBS_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_ASYNC_DBS_SCAN_BITPOS)
  1900. #define WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_BITPOS)
  1901.  
  1902. #define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_SET(scan_cfg, value) \
  1903. WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS, 1, value)
  1904. #define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_SET(scan_cfg, value) \
  1905. WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS, 1, value)
  1906. #define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_SET(scan_cfg, value) \
  1907. WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS, 1, value)
  1908. #define WMI_DBS_CONC_SCAN_CFG_ASYNC_DBS_SCAN_SET(scan_cfg, value) \
  1909. WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_ASYNC_DBS_SCAN_BITPOS, 1, value)
  1910. #define WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_SET(scan_cfg, value) \
  1911. WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_BITPOS, 1, value)
  1912.  
  1913. #define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_GET(scan_cfg) \
  1914. ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS)
  1915. #define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_GET(scan_cfg) \
  1916. ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS)
  1917. #define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_GET(scan_cfg) \
  1918. ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS)
  1919. #define WMI_DBS_CONC_SCAN_CFG_ASYNC_DBS_SCAN_GET(scan_cfg) \
  1920. ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_ASYC_DBS_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_ASYNC_DBS_SCAN_BITPOS)
  1921. #define WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_GET(scan_cfg) \
  1922. ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_BITPOS)
  1923.  
  1924. #define WMI_DBS_FW_MODE_CFG_DBS_BITPOS (31)
  1925. #define WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS (30)
  1926. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_BITPOS (29)
  1927.  
  1928. #define WMI_DBS_FW_MODE_CFG_DBS_MASK (0x1 << WMI_DBS_FW_MODE_CFG_DBS_BITPOS)
  1929. #define WMI_DBS_FW_MODE_CFG_AGILE_DFS_MASK (0x1 << WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS)
  1930. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_DFS_MASK (0x1 << WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_BITPOS)
  1931.  
  1932. #define WMI_DBS_FW_MODE_CFG_DBS_SET(fw_mode, value) \
  1933. WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_DBS_BITPOS, 1, value)
  1934. #define WMI_DBS_FW_MODE_CFG_AGILE_DFS_SET(fw_mode, value) \
  1935. WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS, 1, value)
  1936. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_SET(fw_mode, value) \
  1937. WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_BITPOS, 1, value)
  1938.  
  1939. #define WMI_DBS_FW_MODE_CFG_DBS_GET(fw_mode) \
  1940. ((fw_mode & WMI_DBS_FW_MODE_CFG_DBS_MASK) >> WMI_DBS_FW_MODE_CFG_DBS_BITPOS)
  1941. #define WMI_DBS_FW_MODE_CFG_AGILE_DFS_GET(fw_mode) \
  1942. ((fw_mode & WMI_DBS_FW_MODE_CFG_AGILE_DFS_MASK) >> WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS)
  1943. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_GET(fw_mode) \
  1944. ((fw_mode & WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_DFS_MASK) >> WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_BITPOS)
  1945.  
  1946.  
  1947. /** NOTE: This structure cannot be extended in the future without breaking WMI compatibility */
  1948. typedef struct _wmi_abi_version {
  1949. A_UINT32 abi_version_0; /** WMI Major and Minor versions */
  1950. A_UINT32 abi_version_1; /** WMI change revision */
  1951. A_UINT32 abi_version_ns_0; /** ABI version namespace first four dwords */
  1952. A_UINT32 abi_version_ns_1; /** ABI version namespace second four dwords */
  1953. A_UINT32 abi_version_ns_2; /** ABI version namespace third four dwords */
  1954. A_UINT32 abi_version_ns_3; /** ABI version namespace fourth four dwords */
  1955. } wmi_abi_version;
  1956.  
  1957. /*
  1958. * maximum number of memroy requests allowed from FW.
  1959. */
  1960. #define WMI_MAX_MEM_REQS 16
  1961.  
  1962. /* !!NOTE!!:
  1963. * This HW_BD_INFO_SIZE cannot be changed without breaking compatibility.
  1964. * Please don't change it.
  1965. */
  1966. #define HW_BD_INFO_SIZE 5
  1967.  
  1968. /**
  1969. * PDEV ID to identify the physical device,
  1970. * value 0 reserved for SOC level commands/event
  1971. */
  1972. #define WMI_PDEV_ID_SOC 0 /* SOC level, applicable to all PDEVs */
  1973. #define WMI_PDEV_ID_1ST 1 /* first pdev (pdev 0) */
  1974. #define WMI_PDEV_ID_2ND 2 /* second pdev (pdev 1) */
  1975. #define WMI_PDEV_ID_3RD 3 /* third pdev (pdev 2) */
  1976.  
  1977. /**
  1978. * The following struct holds optional payload for
  1979. * wmi_service_ready_event_fixed_param,e.g., 11ac pass some of the
  1980. * device capability to the host.
  1981. */
  1982. typedef struct {
  1983. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SERVICE_READY_EVENT */
  1984. A_UINT32 fw_build_vers; /* firmware build number */
  1985. wmi_abi_version fw_abi_vers;
  1986. A_UINT32 phy_capability; /* WMI_PHY_CAPABILITY */
  1987. A_UINT32 max_frag_entry; /* Maximum number of frag table entries that SW will populate less 1 */
  1988. A_UINT32 num_rf_chains;
  1989. /* The following field is only valid for service type WMI_SERVICE_11AC */
  1990. A_UINT32 ht_cap_info; /* WMI HT Capability */
  1991. A_UINT32 vht_cap_info; /* VHT capability info field of 802.11ac */
  1992. A_UINT32 vht_supp_mcs; /* VHT Supported MCS Set field Rx/Tx same */
  1993. A_UINT32 hw_min_tx_power;
  1994. A_UINT32 hw_max_tx_power;
  1995. A_UINT32 sys_cap_info;
  1996. A_UINT32 min_pkt_size_enable; /* Enterprise mode short pkt enable */
  1997. /** Max beacon and Probe Response IE offload size (includes
  1998. * optional P2P IEs) */
  1999. A_UINT32 max_bcn_ie_size;
  2000. /*
  2001. * request to host to allocate a chuck of memory and pss it down to FW via WM_INIT.
  2002. * FW uses this as FW extesnsion memory for saving its data structures. Only valid
  2003. * for low latency interfaces like PCIE where FW can access this memory directly (or)
  2004. * by DMA.
  2005. */
  2006. A_UINT32 num_mem_reqs;
  2007. /* Max No. scan channels target can support
  2008. * If FW is too old and doesn't indicate this number, host side value will default to
  2009. * 0, and host will take the original compatible value (62) for future scan channel
  2010. * setup.
  2011. */
  2012. A_UINT32 max_num_scan_channels;
  2013.  
  2014. /* Hardware board specific ID. Values defined in enum WMI_HWBOARD_ID.
  2015. * Default 0 means tha hw_bd_info[] is invalid(legacy board).
  2016. */
  2017. A_UINT32 hw_bd_id;
  2018. A_UINT32 hw_bd_info[HW_BD_INFO_SIZE]; /* Board specific information. Invalid if hw_hd_id is zero. */
  2019.  
  2020. /*
  2021. * Number of MACs supported, i.e. a DBS-capable device will return 2
  2022. */
  2023. A_UINT32 max_supported_macs;
  2024.  
  2025. /*
  2026. * FW sub-feature capabilities to be used in concurrence with wmi_service_bitmap
  2027. */
  2028. A_UINT32 wmi_fw_sub_feat_caps; /* values from enum WMI_FW_SUB_FEAT_CAPS */
  2029.  
  2030. /*
  2031. * Number of Dual Band Simultaneous (DBS) hardware modes
  2032. */
  2033. A_UINT32 num_dbs_hw_modes;
  2034.  
  2035. /*
  2036. * txrx_chainmask
  2037. * [7:0] - 2G band tx chain mask
  2038. * [15:8] - 2G band rx chain mask
  2039. * [23:16] - 5G band tx chain mask
  2040. * [31:24] - 5G band rx chain mask
  2041. *
  2042. */
  2043. A_UINT32 txrx_chainmask;
  2044.  
  2045. /*
  2046. * default Dual Band Simultaneous (DBS) hardware mode
  2047. */
  2048. A_UINT32 default_dbs_hw_mode_index;
  2049.  
  2050. /*
  2051. * Number of msdu descriptors target would use
  2052. */
  2053. A_UINT32 num_msdu_desc;
  2054.  
  2055. /* The TLVs for hal_reg_capabilities, wmi_service_bitmap and mem_reqs[] will follow this TLV.
  2056. * HAL_REG_CAPABILITIES hal_reg_capabilities;
  2057. * A_UINT32 wmi_service_bitmap[WMI_SERVICE_BM_SIZE];
  2058. * wlan_host_mem_req mem_reqs[];
  2059. * wlan_dbs_hw_mode_list[];
  2060. */
  2061. } wmi_service_ready_event_fixed_param;
  2062.  
  2063. #define WMI_SERVICE_SEGMENT_BM_SIZE32 4 /* 4x A_UINT32 = 128 bits */
  2064. typedef struct {
  2065. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_service_available_event_fixed_param */
  2066. /*
  2067. * The wmi_service_segment offset field specifies the position within the
  2068. * logical bitmap of WMI service flags at which the WMI service flags
  2069. * specified within this message begin.
  2070. * Since the first 128 WMI service flags are specified within the
  2071. * wmi_service_bitmap field of the WMI_SERVICE_READY_EVENT message,
  2072. * the wmi_service_segment_offset value is expected to be 128 or more.
  2073. */
  2074. A_UINT32 wmi_service_segment_offset;
  2075. A_UINT32 wmi_service_segment_bitmap[WMI_SERVICE_SEGMENT_BM_SIZE32];
  2076. } wmi_service_available_event_fixed_param;
  2077.  
  2078. typedef struct {
  2079. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SERVICE_EXT_READY_EVENT */
  2080. /* which WMI_DBS_CONC_SCAN_CFG setting the FW is initialized with */
  2081. A_UINT32 default_conc_scan_config_bits;
  2082. /* which WMI_DBS_FW_MODE_CFG setting the FW is initialized with */
  2083. A_UINT32 default_fw_config_bits;
  2084. wmi_ppe_threshold ppet;
  2085. A_UINT32 he_cap_info; /* see section 8.4.2.213 from draft r8 of 802.11ax; see WMI_HE_FRAG_SUPPORT enum */
  2086. /*
  2087. * An HT STA shall not allow transmission of more than one MPDU start
  2088. * within the time limit described in the MPDU maximum density field.
  2089. */
  2090. A_UINT32 mpdu_density; /* units are microseconds */
  2091. /*
  2092. * Maximum no of BSSID based RX filters host can program
  2093. * Value 0 means FW hasn't given any limit to host.
  2094. */
  2095. A_UINT32 max_bssid_rx_filters;
  2096. /*
  2097. * Extended FW build version information:
  2098. * bits 27:0 -> reserved
  2099. * bits 31:28 -> CRM sub ID
  2100. */
  2101. A_UINT32 fw_build_vers_ext;
  2102. } wmi_service_ready_ext_event_fixed_param;
  2103.  
  2104. typedef enum {
  2105. WMI_FW_STA_RTT_INITR = 0x00000001,
  2106. WMI_FW_STA_RTT_RESPR = 0x00000002,
  2107. WMI_FW_P2P_CLI_RTT_INITR = 0x00000004,
  2108. WMI_FW_P2P_CLI_RTT_RESPR = 0x00000008,
  2109. WMI_FW_P2P_GO_RTT_INITR = 0x00000010,
  2110. WMI_FW_P2P_GO_RTT_RESPR = 0x00000020,
  2111. WMI_FW_AP_RTT_INITR = 0x00000040,
  2112. WMI_FW_AP_RTT_RESPR = 0x00000080,
  2113. WMI_FW_NAN_RTT_INITR = 0x00000100,
  2114. WMI_FW_NAN_RTT_RESPR = 0x00000200,
  2115. WMI_FW_SCAN_DBS_POLICY = 0x00000400,
  2116. /*
  2117. * New fw sub feature capabilites before
  2118. * WMI_FW_MAX_SUB_FEAT_CAP
  2119. */
  2120. WMI_FW_MAX_SUB_FEAT_CAP = 0x80000000,
  2121. } WMI_FW_SUB_FEAT_CAPS;
  2122.  
  2123. typedef enum {
  2124. WMI_HWBD_NONE = 0, /* No hw board information is given */
  2125. WMI_HWBD_QCA6174 = 1, /* Rome(AR6320) */
  2126. WMI_HWBD_QCA2582 = 2, /* Killer 1525*/
  2127. } WMI_HWBD_ID;
  2128.  
  2129. #define ATH_BD_DATA_REV_MASK 0x000000FF
  2130. #define ATH_BD_DATA_REV_SHIFT 0
  2131.  
  2132. #define ATH_BD_DATA_PROJ_ID_MASK 0x0000FF00
  2133. #define ATH_BD_DATA_PROJ_ID_SHIFT 8
  2134.  
  2135. #define ATH_BD_DATA_CUST_ID_MASK 0x00FF0000
  2136. #define ATH_BD_DATA_CUST_ID_SHIFT 16
  2137.  
  2138. #define ATH_BD_DATA_REF_DESIGN_ID_MASK 0xFF000000
  2139. #define ATH_BD_DATA_REF_DESIGN_ID_SHIFT 24
  2140.  
  2141. #define SET_BD_DATA_REV(bd_data_ver, value) \
  2142. ((bd_data_ver) &= ~ATH_BD_DATA_REV_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_REV_SHIFT))
  2143.  
  2144. #define GET_BD_DATA_REV(bd_data_ver) \
  2145. (((bd_data_ver) & ATH_BD_DATA_REV_MASK) >> ATH_BD_DATA_REV_SHIFT)
  2146.  
  2147. #define SET_BD_DATA_PROJ_ID(bd_data_ver, value) \
  2148. ((bd_data_ver) &= ~ATH_BD_DATA_PROJ_ID_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_PROJ_ID_SHIFT))
  2149.  
  2150. #define GET_BD_DATA_PROJ_ID(bd_data_ver) \
  2151. (((bd_data_ver) & ATH_BD_DATA_PROJ_ID_MASK) >> ATH_BD_DATA_PROJ_ID_SHIFT)
  2152.  
  2153. #define SET_BD_DATA_CUST_ID(bd_data_ver, value) \
  2154. ((bd_data_ver) &= ~ATH_BD_DATA_CUST_ID_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_CUST_ID_SHIFT))
  2155.  
  2156. #define GET_BD_DATA_CUST_ID(bd_data_ver) \
  2157. (((bd_data_ver) & ATH_BD_DATA_CUST_ID_MASK) >> ATH_BD_DATA_CUST_ID_SHIFT)
  2158.  
  2159. #define SET_BD_DATA_REF_DESIGN_ID(bd_data_ver, value) \
  2160. ((bd_data_ver) &= ~ATH_BD_DATA_REF_DESIGN_ID_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_REF_DESIGN_ID_SHIFT))
  2161.  
  2162. #define GET_BD_DATA_REF_DESIGN_ID(bd_data_ver) \
  2163. (((bd_data_ver) & ATH_BD_DATA_REF_DESIGN_ID_MASK) >> ATH_BD_DATA_REF_DESIGN_ID_SHIFT)
  2164.  
  2165.  
  2166. #ifdef ROME_LTE_COEX_FREQ_AVOID
  2167. typedef struct {
  2168. A_UINT32 start_freq; /* start frequency, not channel center freq */
  2169. A_UINT32 end_freq; /* end frequency */
  2170. } avoid_freq_range_desc;
  2171.  
  2172. typedef struct {
  2173. /* bad channel range count, multi range is allowed, 0 means all channel clear */
  2174. A_UINT32 num_freq_ranges;
  2175. /* multi range with num_freq_ranges, LTE advance multi carrier, CDMA,etc */
  2176. avoid_freq_range_desc avd_freq_range[0];
  2177. } wmi_wlan_avoid_freq_ranges_event;
  2178. #endif
  2179.  
  2180. /** status consists of upper 16 bits fo A_STATUS status and lower 16 bits of module ID that retuned status */
  2181. #define WLAN_INIT_STATUS_SUCCESS 0x0
  2182. #define WLAN_INIT_STATUS_GEN_FAILED 0x1
  2183. #define WLAN_GET_INIT_STATUS_REASON(status) ((status) & 0xffff)
  2184. #define WLAN_GET_INIT_STATUS_MODULE_ID(status) (((status) >> 16) & 0xffff)
  2185.  
  2186. typedef A_UINT32 WLAN_INIT_STATUS;
  2187.  
  2188. typedef struct {
  2189. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ready_event_fixed_param */
  2190. wmi_abi_version fw_abi_vers;
  2191. wmi_mac_addr mac_addr;
  2192. A_UINT32 status;
  2193. A_UINT32 num_dscp_table;
  2194. } wmi_ready_event_fixed_param;
  2195.  
  2196. typedef struct {
  2197. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resource_config */
  2198. /**
  2199. * @brief num_vdev - number of virtual devices (VAPs) to support
  2200. */
  2201. A_UINT32 num_vdevs;
  2202. /**
  2203. * @brief num_peers - number of peer nodes to support
  2204. */
  2205. A_UINT32 num_peers;
  2206. /*
  2207. * @brief In offload mode target supports features like WOW, chatter and other
  2208. * protocol offloads. In order to support them some functionalities like
  2209. * reorder buffering, PN checking need to be done in target. This determines
  2210. * maximum number of peers suported by target in offload mode
  2211. */
  2212. A_UINT32 num_offload_peers;
  2213. /* @brief Number of reorder buffers available for doing target based reorder
  2214. * Rx reorder buffering
  2215. */
  2216. A_UINT32 num_offload_reorder_buffs;
  2217. /**
  2218. * @brief num_peer_keys - number of keys per peer
  2219. */
  2220. A_UINT32 num_peer_keys;
  2221. /**
  2222. * @brief num_peer_tids - number of TIDs to provide storage for per peer.
  2223. */
  2224. A_UINT32 num_tids;
  2225. /**
  2226. * @brief ast_skid_limit - max skid for resolving hash collisions
  2227. * @details
  2228. * The address search table is sparse, so that if two MAC addresses
  2229. * result in the same hash value, the second of these conflicting
  2230. * entries can slide to the next index in the address search table,
  2231. * and use it, if it is unoccupied. This ast_skid_limit parameter
  2232. * specifies the upper bound on how many subsequent indices to search
  2233. * over to find an unoccupied space.
  2234. */
  2235. A_UINT32 ast_skid_limit;
  2236. /**
  2237. * @brief tx_chain_mask - the nominal chain mask for transmit
  2238. * @details
  2239. * The chain mask may be modified dynamically, e.g. to operate AP tx with
  2240. * a reduced number of chains if no clients are associated.
  2241. * This configuration parameter specifies the nominal chain-mask that
  2242. * should be used when not operating with a reduced set of tx chains.
  2243. */
  2244. A_UINT32 tx_chain_mask;
  2245. /**
  2246. * @brief rx_chain_mask - the nominal chain mask for receive
  2247. * @details
  2248. * The chain mask may be modified dynamically, e.g. for a client to use
  2249. * a reduced number of chains for receive if the traffic to the client
  2250. * is low enough that it doesn't require downlink MIMO or antenna
  2251. * diversity.
  2252. * This configuration parameter specifies the nominal chain-mask that
  2253. * should be used when not operating with a reduced set of rx chains.
  2254. */
  2255. A_UINT32 rx_chain_mask;
  2256. /**
  2257. * @brief rx_timeout_pri - what rx reorder timeout (ms) to use for the AC
  2258. * @details
  2259. * Each WMM access class (voice, video, best-effort, background) will
  2260. * have its own timeout value to dictate how long to wait for missing
  2261. * rx MPDUs to arrive before flushing subsequent MPDUs that have already
  2262. * been received.
  2263. * This parameter specifies the timeout in milliseconds for each class .
  2264. * NOTE: the number of class (defined as 4) cannot be
  2265. * changed in the future without breaking WMI compatibility.
  2266. */
  2267. A_UINT32 rx_timeout_pri[4];
  2268. /**
  2269. * @brief rx_decap mode - what mode the rx should decap packets to
  2270. * @details
  2271. * MAC can decap to RAW (no decap), native wifi or Ethernet types
  2272. * THis setting also determines the default TX behavior, however TX
  2273. * behavior can be modified on a per VAP basis during VAP init
  2274. */
  2275. A_UINT32 rx_decap_mode;
  2276. /**
  2277. * @brief scan_max_pending_req - what is the maximum scan requests than can be queued
  2278. */
  2279. A_UINT32 scan_max_pending_req;
  2280.  
  2281. /**
  2282. * @brief maximum VDEV that could use BMISS offload
  2283. */
  2284. A_UINT32 bmiss_offload_max_vdev;
  2285.  
  2286. /**
  2287. * @brief maximum VDEV that could use offload roaming
  2288. */
  2289. A_UINT32 roam_offload_max_vdev;
  2290.  
  2291. /**
  2292. * @brief maximum AP profiles that would push to offload roaming
  2293. */
  2294. A_UINT32 roam_offload_max_ap_profiles;
  2295.  
  2296. /**
  2297. * @brief num_mcast_groups - how many groups to use for mcast->ucast conversion
  2298. * @details
  2299. * The target's WAL maintains a table to hold information regarding which
  2300. * peers belong to a given multicast group, so that if multicast->unicast
  2301. * conversion is enabled, the target can convert multicast tx frames to a
  2302. * series of unicast tx frames, to each peer within the multicast group.
  2303. * This num_mcast_groups configuration parameter tells the target how
  2304. * many multicast groups to provide storage for within its multicast
  2305. * group membership table.
  2306. */
  2307. A_UINT32 num_mcast_groups;
  2308.  
  2309. /**
  2310. * @brief num_mcast_table_elems - size to alloc for the mcast membership table
  2311. * @details
  2312. * This num_mcast_table_elems configuration parameter tells the target
  2313. * how many peer elements it needs to provide storage for in its
  2314. * multicast group membership table.
  2315. * These multicast group membership table elements are shared by the
  2316. * multicast groups stored within the table.
  2317. */
  2318. A_UINT32 num_mcast_table_elems;
  2319.  
  2320. /**
  2321. * @brief mcast2ucast_mode - whether/how to do multicast->unicast conversion
  2322. * @details
  2323. * This configuration parameter specifies whether the target should
  2324. * perform multicast --> unicast conversion on transmit, and if so,
  2325. * what to do if it finds no entries in its multicast group membership
  2326. * table for the multicast IP address in the tx frame.
  2327. * Configuration value:
  2328. * 0 -> Do not perform multicast to unicast conversion.
  2329. * 1 -> Convert multicast frames to unicast, if the IP multicast address
  2330. * from the tx frame is found in the multicast group membership
  2331. * table. If the IP multicast address is not found, drop the frame.
  2332. * 2 -> Convert multicast frames to unicast, if the IP multicast address
  2333. * from the tx frame is found in the multicast group membership
  2334. * table. If the IP multicast address is not found, transmit the
  2335. * frame as multicast.
  2336. */
  2337. A_UINT32 mcast2ucast_mode;
  2338.  
  2339.  
  2340. /**
  2341. * @brief tx_dbg_log_size - how much memory to allocate for a tx PPDU dbg log
  2342. * @details
  2343. * This parameter controls how much memory the target will allocate to
  2344. * store a log of tx PPDU meta-information (how large the PPDU was,
  2345. * when it was sent, whether it was successful, etc.)
  2346. */
  2347. A_UINT32 tx_dbg_log_size;
  2348.  
  2349. /**
  2350. * @brief num_wds_entries - how many AST entries to be allocated for WDS
  2351. */
  2352. A_UINT32 num_wds_entries;
  2353.  
  2354. /**
  2355. * @brief dma_burst_size - MAC DMA burst size, e.g., on Peregrine on PCI
  2356. * this limit can be 0 -default, 1 256B
  2357. */
  2358. A_UINT32 dma_burst_size;
  2359.  
  2360. /**
  2361. * @brief mac_aggr_delim - Fixed delimiters to be inserted after every MPDU
  2362. * to account for interface latency to avoid underrun.
  2363. */
  2364. A_UINT32 mac_aggr_delim;
  2365. /**
  2366. * @brief rx_skip_defrag_timeout_dup_detection_check
  2367. * @details
  2368. * determine whether target is responsible for detecting duplicate
  2369. * non-aggregate MPDU and timing out stale fragments.
  2370. *
  2371. * A-MPDU reordering is always performed on the target.
  2372. *
  2373. * 0: target responsible for frag timeout and dup checking
  2374. * 1: host responsible for frag timeout and dup checking
  2375. */
  2376. A_UINT32 rx_skip_defrag_timeout_dup_detection_check;
  2377.  
  2378. /**
  2379. * @brief vow_config - Configuration for VoW : No of Video Nodes to be supported
  2380. * and Max no of descriptors for each Video link (node).
  2381. */
  2382. A_UINT32 vow_config;
  2383.  
  2384. /**
  2385. * @brief maximum VDEV that could use GTK offload
  2386. */
  2387. A_UINT32 gtk_offload_max_vdev;
  2388.  
  2389. /**
  2390. * @brief num_msdu_desc - Number of msdu descriptors target should use
  2391. */
  2392. A_UINT32 num_msdu_desc; /* Number of msdu desc */
  2393. /**
  2394. * @brief max_frag_entry - Max. number of Tx fragments per MSDU
  2395. * @details
  2396. * This parameter controls the max number of Tx fragments per MSDU.
  2397. * This is sent by the target as part of the WMI_SERVICE_READY event
  2398. * and is overriden by the OS shim as required.
  2399. */
  2400. A_UINT32 max_frag_entries;
  2401.  
  2402. /**
  2403. * @brief num_tdls_vdevs - Max. number of vdevs that can support TDLS
  2404. * @brief num_msdu_desc - Number of vdev that can support beacon offload
  2405. */
  2406.  
  2407. A_UINT32 num_tdls_vdevs; /* number of vdevs allowed to do tdls */
  2408.  
  2409. /**
  2410. * @brief num_tdls_conn_table_entries - Number of peers tracked by tdls vdev
  2411. * @details
  2412. * Each TDLS enabled vdev can track outgoing transmits/rssi/rates to/of
  2413. * peers in a connection tracking table for possible TDLS link creation
  2414. * or deletion. This controls the number of tracked peers per vdev.
  2415. */
  2416. A_UINT32 num_tdls_conn_table_entries; /* number of peers to track per TDLS vdev */
  2417. A_UINT32 beacon_tx_offload_max_vdev;
  2418. A_UINT32 num_multicast_filter_entries;
  2419. A_UINT32 num_wow_filters; /*host can configure the number of wow filters*/
  2420.  
  2421. /**
  2422. * @brief num_keep_alive_pattern - Num of keep alive patterns configured
  2423. * from host.
  2424. */
  2425. A_UINT32 num_keep_alive_pattern;
  2426. /**
  2427. * @brief keep_alive_pattern_size - keep alive pattern size.
  2428. */
  2429. A_UINT32 keep_alive_pattern_size;
  2430. /**
  2431. * @brief max_tdls_concurrent_sleep_sta - Number of tdls sleep sta supported
  2432. * @details
  2433. * Each TDLS STA can become a sleep STA independently. This parameter
  2434. * mentions how many such sleep STAs can be supported concurrently.
  2435. */
  2436. A_UINT32 max_tdls_concurrent_sleep_sta;
  2437.  
  2438. /**
  2439. * @brief max_tdls_concurrent_buffer_sta - Number of tdls buffer sta supported
  2440. * @details
  2441. * Each TDLS STA can become a buffer STA independently. This parameter
  2442. * mentions how many such buffer STAs can be supported concurrently.
  2443. */
  2444. A_UINT32 max_tdls_concurrent_buffer_sta;
  2445.  
  2446. /**
  2447. * @brief wmi_send_separate - host configures fw to send the wmi separately
  2448. */
  2449. A_UINT32 wmi_send_separate;
  2450.  
  2451. /**
  2452. * @brief num_ocb_vdevs - Number of vdevs used for OCB support
  2453. */
  2454. A_UINT32 num_ocb_vdevs;
  2455.  
  2456. /**
  2457. * @brief num_ocb_channels - The supported number of simultaneous OCB channels
  2458. */
  2459. A_UINT32 num_ocb_channels;
  2460.  
  2461. /**
  2462. * @brief num_ocb_schedules - The supported number of OCB schedule segments
  2463. */
  2464. A_UINT32 num_ocb_schedules;
  2465.  
  2466. /**
  2467. * @brief specific configuration from host, such as per platform configuration
  2468. */
  2469. #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_S 0
  2470. #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_M 0x1
  2471.  
  2472. #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_S 1
  2473. #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_M 0x2
  2474.  
  2475. #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_S 2
  2476. #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_M 0x4
  2477.  
  2478. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_S 3
  2479. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_M 0x8
  2480.  
  2481. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_S 4
  2482. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_M 0x10
  2483.  
  2484. #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_S 5
  2485. #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_M 0x20
  2486.  
  2487. #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_S 6
  2488. #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_M 0x40
  2489.  
  2490. #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_S 7
  2491. #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_M 0x80
  2492.  
  2493. #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_S 8
  2494. #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_M 0x100
  2495.  
  2496. #define WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_S 9
  2497. #define WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_M 0x200
  2498.  
  2499. #define WMI_RSRC_CFG_FLAG_TX_MSDU_ID_NEW_PARTITION_SUPPORT_S 10
  2500. #define WMI_RSRC_CFG_FLAG_TX_MSDU_ID_NEW_PARTITION_SUPPORT_M 0x400
  2501.  
  2502. #define WMI_RSRC_CFG_FLAG_TX_PPDU_STATS_ENABLE_S 11
  2503. #define WMI_RSRC_CFG_FLAG_TX_PPDU_STATS_ENABLE_M 0x800
  2504.  
  2505. A_UINT32 flag1;
  2506.  
  2507. /** @brief smart_ant_cap - Smart Antenna capabilities information
  2508. * @details
  2509. * 1 - Smart antenna is enabled.
  2510. * 0 - Smart antenna is disabled.
  2511. * In future this can contain smart antenna specifc capabilities.
  2512. */
  2513. A_UINT32 smart_ant_cap;
  2514.  
  2515. /**
  2516. * User can configure the buffers allocated for each AC (BE, BK, VI, VO)
  2517. * during init
  2518. */
  2519. A_UINT32 BK_Minfree;
  2520. A_UINT32 BE_Minfree;
  2521. A_UINT32 VI_Minfree;
  2522. A_UINT32 VO_Minfree;
  2523.  
  2524. /**
  2525. * @brief alloc_frag_desc_for_data_pkt . Controls data packet fragment
  2526. * descriptor memory allocation.
  2527. * 1 - Allocate fragment descriptor memory for data packet in firmware.
  2528. * If host wants to transmit data packet at its desired rate,
  2529. * this field must be set.
  2530. * 0 - Don't allocate fragment descriptor for data packet.
  2531. */
  2532. A_UINT32 alloc_frag_desc_for_data_pkt;
  2533.  
  2534. /** how much space to allocate for NDP NS (neighbor solicitation) specs */
  2535. A_UINT32 num_ns_ext_tuples_cfg;
  2536.  
  2537. /**
  2538. * size (in bytes) of the buffer the FW shall allocate to store
  2539. * packet filtering instructions
  2540. */
  2541. A_UINT32 bpf_instruction_size;
  2542.  
  2543. /**
  2544. * Maximum no of BSSID based RX filters host would program
  2545. * Value 0 means host doesn't given any limit to FW.
  2546. */
  2547. A_UINT32 max_bssid_rx_filters;
  2548. /**
  2549. * Use PDEV ID instead of MAC ID, added for backward compatibility with older host
  2550. * which is using MAC ID. 1 means PDEV ID, 0 means MAC ID.
  2551. */
  2552. A_UINT32 use_pdev_id;
  2553.  
  2554. /** Maximum number of scan clients whose DBS scan duty cycle can be configured */
  2555. A_UINT32 max_num_dbs_scan_duty_cycle;
  2556. } wmi_resource_config;
  2557.  
  2558. #define WMI_RSRC_CFG_FLAG_SET(word32, flag, value) \
  2559. do { \
  2560. (word32) &= ~WMI_RSRC_CFG_FLAG_ ## flag ## _M; \
  2561. (word32) |= ((value) << WMI_RSRC_CFG_FLAG_ ## flag ## _S) & \
  2562. WMI_RSRC_CFG_FLAG_ ## flag ## _M; \
  2563. } while (0)
  2564. #define WMI_RSRC_CFG_FLAG_GET(word32, flag) \
  2565. (((word32) & WMI_RSRC_CFG_FLAG_ ## flag ## _M) >> \
  2566. WMI_RSRC_CFG_FLAG_ ## flag ## _S)
  2567.  
  2568. #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_SET(word32, value) \
  2569. WMI_RSRC_CFG_FLAG_SET((word32), WOW_IGN_PCIE_RST, (value))
  2570. #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_GET(word32) \
  2571. WMI_RSRC_CFG_FLAG_GET((word32), WOW_IGN_PCIE_RST)
  2572.  
  2573. #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_SET(word32, value) \
  2574. WMI_RSRC_CFG_FLAG_SET((word32), LTEU_SUPPORT, (value))
  2575. #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_GET(word32) \
  2576. WMI_RSRC_CFG_FLAG_GET((word32), LTEU_SUPPORT)
  2577.  
  2578. #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_SET(word32, value) \
  2579. WMI_RSRC_CFG_FLAG_SET((word32), COEX_GPIO_SUPPORT, (value))
  2580. #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_GET(word32) \
  2581. WMI_RSRC_CFG_FLAG_GET((word32), COEX_GPIO_SUPPORT)
  2582.  
  2583. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_SET(word32, value) \
  2584. WMI_RSRC_CFG_FLAG_SET((word32), AUX_RADIO_SPECTRAL_INTF, (value))
  2585. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_GET(word32) \
  2586. WMI_RSRC_CFG_FLAG_GET((word32), AUX_RADIO_SPECTRAL_INTF)
  2587.  
  2588. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_SET(word32, value) \
  2589. WMI_RSRC_CFG_FLAG_SET((word32), AUX_RADIO_CHAN_LOAD_INTF, (value))
  2590. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_GET(word32) \
  2591. WMI_RSRC_CFG_FLAG_GET((word32), AUX_RADIO_CHAN_LOAD_INTF)
  2592.  
  2593. #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_SET(word32, value) \
  2594. WMI_RSRC_CFG_FLAG_SET((word32), BSS_CHANNEL_INFO_64, (value))
  2595. #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_GET(word32) \
  2596. WMI_RSRC_CFG_FLAG_GET((word32), BSS_CHANNEL_INFO_64)
  2597.  
  2598. #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_SET(word32, value) \
  2599. WMI_RSRC_CFG_FLAG_SET((word32), ATF_CONFIG_ENABLE, (value))
  2600. #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_GET(word32) \
  2601. WMI_RSRC_CFG_FLAG_GET((word32), ATF_CONFIG_ENABLE)
  2602.  
  2603. #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_SET(word32, value) \
  2604. WMI_RSRC_CFG_FLAG_SET((word32), IPHR_PAD_CONFIG_ENABLE, (value))
  2605. #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_GET(word32) \
  2606. WMI_RSRC_CFG_FLAG_GET((word32), IPHR_PAD_CONFIG_ENABLE)
  2607.  
  2608. #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_SET(word32, value) \
  2609. WMI_RSRC_CFG_FLAG_SET((word32), QWRAP_MODE_ENABLE, (value))
  2610. #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_GET(word32) \
  2611. WMI_RSRC_CFG_FLAG_GET((word32), QWRAP_MODE_ENABLE)
  2612.  
  2613. #define WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_SET(word32, value) \
  2614. WMI_RSRC_CFG_FLAG_SET((word32), MGMT_COMP_EVT_BUNDLE_SUPPORT, (value))
  2615. #define WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_GET(word32) \
  2616. WMI_RSRC_CFG_FLAG_GET((word32), MGMT_COMP_EVT_BUNDLE_SUPPORT)
  2617.  
  2618. #define WMI_RSRC_CFG_FLAG_TX_MSDU_ID_NEW_PARTITION_SUPPORT_SET(word32, value) \
  2619. WMI_RSRC_CFG_FLAG_SET((word32), TX_MSDU_ID_NEW_PARTITION_SUPPORT, (value))
  2620. #define WMI_RSRC_CFG_FLAG_TX_MSDU_ID_NEW_PARTITION_SUPPORT_GET(word32) \
  2621. WMI_RSRC_CFG_FLAG_GET((word32), TX_MSDU_ID_NEW_PARTITION_SUPPORT)
  2622.  
  2623. typedef struct {
  2624. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_init_cmd_fixed_param */
  2625.  
  2626. /** The following indicate the WMI versions to be supported by
  2627. * the host driver. Note that the host driver decide to
  2628. * "downgrade" its WMI version support and this may not be the
  2629. * native version of the host driver. */
  2630. wmi_abi_version host_abi_vers;
  2631.  
  2632. A_UINT32 num_host_mem_chunks; /** size of array host_mem_chunks[] */
  2633. /* The TLVs for resource_config, host_mem_chunks[], and hw_mode_config will follow.
  2634. * wmi_resource_config resource_config;
  2635. * wlan_host_memory_chunk host_mem_chunks[];
  2636. * wmi_pdev_set_hw_mode_cmd_fixed_param hw_mode_config;
  2637. * Note that the hw_mode_config, in spite of its "pdev" name,
  2638. * applies to the entire target rather than for a single pdev
  2639. * within the target.
  2640. * To avoid specifying a HW mode for the target, the host should
  2641. * fill hw_mode_config's fields with 0x0.
  2642. */
  2643.  
  2644. } wmi_init_cmd_fixed_param;
  2645.  
  2646. /**
  2647. * TLV for channel list
  2648. */
  2649. typedef struct {
  2650. /** WMI_CHAN_LIST_TAG */
  2651. A_UINT32 tag;
  2652. /** # of channels to scan */
  2653. A_UINT32 num_chan;
  2654. /** channels in Mhz */
  2655. A_UINT32 channel_list[1];
  2656. } wmi_chan_list;
  2657.  
  2658. /**
  2659. * TLV for bssid list
  2660. */
  2661. typedef struct {
  2662. /** WMI_BSSID_LIST_TAG */
  2663. A_UINT32 tag;
  2664. /** number of bssids */
  2665. A_UINT32 num_bssid;
  2666. /** bssid list */
  2667. wmi_mac_addr bssid_list[1];
  2668. } wmi_bssid_list;
  2669.  
  2670. /**
  2671. * TLV for ie data.
  2672. */
  2673. typedef struct {
  2674. /** WMI_IE_TAG */
  2675. A_UINT32 tag;
  2676. /** number of bytes in ie data */
  2677. A_UINT32 ie_len;
  2678. /** ie data array (ie_len adjusted to number of words (ie_len + 4)/4) */
  2679. A_UINT32 ie_data[1];
  2680. } wmi_ie_data;
  2681.  
  2682. /**
  2683. * TLV used for length/buffer
  2684. */
  2685. typedef struct {
  2686. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tlv_buf_len_param */
  2687. A_UINT32 buf_len; /** Length of buf */
  2688. /**
  2689. * Following this structure is the TLV byte stream of buf of length buf_len:
  2690. * A_UINT8 buf[];
  2691. *
  2692. */
  2693. } wmi_tlv_buf_len_param;
  2694.  
  2695. typedef struct {
  2696. /** Len of the SSID */
  2697. A_UINT32 ssid_len;
  2698. /** SSID */
  2699. A_UINT32 ssid[8];
  2700. } wmi_ssid;
  2701.  
  2702. typedef struct {
  2703. /** WMI_SSID_LIST_TAG */
  2704. A_UINT32 tag;
  2705. A_UINT32 num_ssids;
  2706. wmi_ssid ssids[1];
  2707. } wmi_ssid_list;
  2708.  
  2709. /* prefix used by scan requestor ids on the host */
  2710. #define WMI_HOST_SCAN_REQUESTOR_ID_PREFIX 0xA000
  2711. /* prefix used by scan request ids generated on the host */
  2712. /* host cycles through the lower 12 bits to generate ids */
  2713. #define WMI_HOST_SCAN_REQ_ID_PREFIX 0xA000
  2714.  
  2715. #define WLAN_SCAN_PARAMS_MAX_SSID 16
  2716. #define WLAN_SCAN_PARAMS_MAX_BSSID 4
  2717. #define WLAN_SCAN_PARAMS_MAX_IE_LEN 512
  2718.  
  2719. /* NOTE: This constant cannot be changed without breaking WMI compatibility */
  2720. #define WMI_IE_BITMAP_SIZE 8
  2721.  
  2722. typedef struct {
  2723. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_start_scan_cmd_fixed_param */
  2724. /** Scan ID */
  2725. A_UINT32 scan_id;
  2726. /** Scan requestor ID */
  2727. A_UINT32 scan_req_id;
  2728. /** VDEV id(interface) that is requesting scan */
  2729. A_UINT32 vdev_id;
  2730. /** Scan Priority, input to scan scheduler */
  2731. A_UINT32 scan_priority;
  2732. /** Scan events subscription */
  2733. A_UINT32 notify_scan_events;
  2734. /** dwell time in msec on active channels */
  2735. A_UINT32 dwell_time_active;
  2736. /** dwell time in msec on passive channels */
  2737. A_UINT32 dwell_time_passive;
  2738. /** min time in msec on the BSS channel,only valid if atleast one VDEV is active*/
  2739. A_UINT32 min_rest_time;
  2740. /** max rest time in msec on the BSS channel,only valid if at least one VDEV is active*/
  2741. /** the scanner will rest on the bss channel at least min_rest_time. after min_rest_time the scanner
  2742. * will start checking for tx/rx activity on all VDEVs. if there is no activity the scanner will
  2743. * switch to off channel. if there is activity the scanner will let the radio on the bss channel
  2744. * until max_rest_time expires.at max_rest_time scanner will switch to off channel
  2745. * irrespective of activity. activity is determined by the idle_time parameter.
  2746. */
  2747. A_UINT32 max_rest_time;
  2748. /** time before sending next set of probe requests.
  2749. * The scanner keeps repeating probe requests transmission with period specified by repeat_probe_time.
  2750. * The number of probe requests specified depends on the ssid_list and bssid_list
  2751. */
  2752. A_UINT32 repeat_probe_time;
  2753. /** time in msec between 2 consequetive probe requests with in a set. */
  2754. A_UINT32 probe_spacing_time;
  2755. /** data inactivity time in msec on bss channel that will be used by scanner for measuring the inactivity */
  2756. A_UINT32 idle_time;
  2757. /** maximum time in msec allowed for scan */
  2758. A_UINT32 max_scan_time;
  2759. /** delay in msec before sending first probe request after switching to a channel */
  2760. A_UINT32 probe_delay;
  2761. /** Scan control flags */
  2762. A_UINT32 scan_ctrl_flags;
  2763. /** Burst duration time in msec*/
  2764. A_UINT32 burst_duration;
  2765.  
  2766. /** # if channels to scan. In the TLV channel_list[] */
  2767. A_UINT32 num_chan;
  2768. /** number of bssids. In the TLV bssid_list[] */
  2769. A_UINT32 num_bssid;
  2770. /** number of ssid. In the TLV ssid_list[] */
  2771. A_UINT32 num_ssids;
  2772. /** number of bytes in ie data. In the TLV ie_data[]. Max len is defined by WLAN_SCAN_PARAMS_MAX_IE_LEN */
  2773. A_UINT32 ie_len;
  2774. /** Max number of probes to be sent */
  2775. A_UINT32 n_probes;
  2776. /** MAC Address to use in Probe Req as SA **/
  2777. wmi_mac_addr mac_addr;
  2778. /** Mask on which MAC has to be randomized **/
  2779. wmi_mac_addr mac_mask;
  2780. /** ie bitmap to use in probe req **/
  2781. A_UINT32 ie_bitmap[WMI_IE_BITMAP_SIZE];
  2782. /** Number of vendor OUIs. In the TLV vendor_oui[] **/
  2783. A_UINT32 num_vendor_oui;
  2784. /** Scan control flags extended **/
  2785. A_UINT32 scan_ctrl_flags_ext;
  2786.  
  2787. /**
  2788. * TLV (tag length value) parameters follow the scan_cmd
  2789. * structure. The TLV's are:
  2790. * A_UINT32 channel_list[];
  2791. * wmi_ssid ssid_list[];
  2792. * wmi_mac_addr bssid_list[];
  2793. * A_UINT8 ie_data[];
  2794. * wmi_vendor_oui vendor_oui[];
  2795. */
  2796. } wmi_start_scan_cmd_fixed_param;
  2797.  
  2798. /**
  2799. * scan control flags.
  2800. */
  2801.  
  2802. /** passively scan all channels including active channels */
  2803. #define WMI_SCAN_FLAG_PASSIVE 0x1
  2804. /** add wild card ssid probe request even though ssid_list is specified. */
  2805. #define WMI_SCAN_ADD_BCAST_PROBE_REQ 0x2
  2806. /** add cck rates to rates/xrate ie for the generated probe request */
  2807. #define WMI_SCAN_ADD_CCK_RATES 0x4
  2808. /** add ofdm rates to rates/xrate ie for the generated probe request */
  2809. #define WMI_SCAN_ADD_OFDM_RATES 0x8
  2810. /** To enable indication of Chan load and Noise floor to host */
  2811. #define WMI_SCAN_CHAN_STAT_EVENT 0x10
  2812. /** Filter Probe request frames */
  2813. #define WMI_SCAN_FILTER_PROBE_REQ 0x20
  2814. /**When set, not to scan DFS channels*/
  2815. #define WMI_SCAN_BYPASS_DFS_CHN 0x40
  2816. /**When set, certain errors are ignored and scan continues.
  2817. * Different FW scan engine may use its own logic to decide what errors to ignore*/
  2818. #define WMI_SCAN_CONTINUE_ON_ERROR 0x80
  2819. /** Enable promiscous mode for CCXv4 */
  2820. #define WMI_SCAN_FILTER_PROMISCOUS 0x100
  2821. /** allow to send probe req on DFS channel */
  2822. #define WMI_SCAN_FLAG_FORCE_ACTIVE_ON_DFS 0x200
  2823. /** add TPC content in probe req frame */
  2824. #define WMI_SCAN_ADD_TPC_IE_IN_PROBE_REQ 0x400
  2825. /** add DS content in probe req frame */
  2826. #define WMI_SCAN_ADD_DS_IE_IN_PROBE_REQ 0x800
  2827. /** use random mac address for TA for probe request frame and add
  2828. * oui specified by WMI_SCAN_PROB_REQ_OUI_CMDID to the probe req frame.
  2829. * if oui is not set by WMI_SCAN_PROB_REQ_OUI_CMDID then the flag is ignored*/
  2830. #define WMI_SCAN_ADD_SPOOFED_MAC_IN_PROBE_REQ 0x1000
  2831. /** allow mgmt transmission during off channel scan */
  2832. #define WMI_SCAN_OFFCHAN_MGMT_TX 0x2000
  2833. /** allow data transmission during off channel scan */
  2834. #define WMI_SCAN_OFFCHAN_DATA_TX 0x4000
  2835. /** allow capture ppdu with phy errrors */
  2836. #define WMI_SCAN_CAPTURE_PHY_ERROR 0x8000
  2837. /** always do passive scan on passive channels */
  2838. #define WMI_SCAN_FLAG_STRICT_PASSIVE_ON_PCHN 0x10000
  2839. /** set HALF (10MHz) rate support */
  2840. #define WMI_SCAN_FLAG_HALF_RATE_SUPPORT 0x20000
  2841. /** set Quarter (5MHz) rate support */
  2842. #define WMI_SCAN_FLAG_QUARTER_RATE_SUPPORT 0x40000
  2843. #define WMI_SCAN_RANDOM_SEQ_NO_IN_PROBE_REQ 0x80000
  2844. #define WMI_SCAN_ENABLE_IE_WHTELIST_IN_PROBE_REQ 0x100000
  2845.  
  2846. /** for adaptive scan mode using 3 bits (21 - 23 bits) */
  2847. #define WMI_SCAN_DWELL_MODE_MASK 0x00E00000
  2848. #define WMI_SCAN_DWELL_MODE_SHIFT 21
  2849.  
  2850. typedef enum {
  2851. WMI_SCAN_DWELL_MODE_DEFAULT = 0,
  2852. WMI_SCAN_DWELL_MODE_CONSERVATIVE = 1,
  2853. WMI_SCAN_DWELL_MODE_MODERATE = 2,
  2854. WMI_SCAN_DWELL_MODE_AGGRESSIVE = 3,
  2855. WMI_SCAN_DWELL_MODE_STATIC = 4,
  2856. } WMI_SCAN_DWELL_MODE;
  2857.  
  2858. #define WMI_SCAN_SET_DWELL_MODE(flag, mode) \
  2859. do { \
  2860. (flag) |= (((mode) << WMI_SCAN_DWELL_MODE_SHIFT) & \
  2861. WMI_SCAN_DWELL_MODE_MASK); \
  2862. } while (0)
  2863.  
  2864. #define WMI_SCAN_GET_DWELL_MODE(flag) \
  2865. (((flag) & WMI_SCAN_DWELL_MODE_MASK) >> WMI_SCAN_DWELL_MODE_SHIFT)
  2866.  
  2867. /** WMI_SCAN_CLASS_MASK must be the same value as IEEE80211_SCAN_CLASS_MASK */
  2868. #define WMI_SCAN_CLASS_MASK 0xFF000000
  2869.  
  2870. /*
  2871. * Masks identifying types/ID of scans
  2872. * Scan_Stop macros should be the same value as below defined in UMAC
  2873. * #define IEEE80211_SPECIFIC_SCAN 0x00000000
  2874. * #define IEEE80211_VAP_SCAN 0x01000000
  2875. * #define IEEE80211_ALL_SCANS 0x04000000
  2876. */
  2877. #define WMI_SCAN_STOP_ONE 0x00000000
  2878. #define WMI_SCN_STOP_VAP_ALL 0x01000000
  2879. #define WMI_SCAN_STOP_ALL 0x04000000
  2880.  
  2881. /** extended Scan ctrl flags **/
  2882. #define WMI_SCAN_FLAG_EXT_DBS_SCAN_POLICY_MASK 0x00000003 /* Bit 0-1 reserved for DBS scan selection policy.*/
  2883.  
  2884. #define WMI_SCAN_DBS_POLICY_DEFAULT 0x0 /** Select duty cycle if configured, else fall back to whatever
  2885. policy scan manager computes */
  2886. #define WMI_SCAN_DBS_POLICY_FORCE_NONDBS 0x1 /** Force to select Non-DBS scan */
  2887. #define WMI_SCAN_DBS_POLICY_IGNORE_DUTY 0x2 /** Ignore duty cycle even if configured and fall back to whatever
  2888. policy scan manager computes*/
  2889. #define WMI_SCAN_DBS_POLICY_RESERVED 0x3
  2890. #define WMI_SCAN_DBS_POLICY_MAX 0x3
  2891.  
  2892. typedef struct {
  2893. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stop_scan_cmd_fixed_param */
  2894. /** requestor requesting cancel */
  2895. A_UINT32 requestor;
  2896. /** Scan ID */
  2897. A_UINT32 scan_id;
  2898. /**
  2899. * Req Type
  2900. * req_type should be WMI_SCAN_STOP_ONE, WMI_SCN_STOP_VAP_ALL or WMI_SCAN_STOP_ALL
  2901. * WMI_SCAN_STOP_ONE indicates to stop a specific scan with scan_id (on a specific pdev in DBDC)
  2902. * WMI_SCN_STOP_VAP_ALL indicates to stop all scan requests on a specific vDev with vdev_id
  2903. * WMI_SCAN_STOP_ALL indicates to stop all scan requests in both Scheduler's queue and Scan Engine (on a specific pdev in DBDC)
  2904. */
  2905. A_UINT32 req_type;
  2906. /**
  2907. * vDev ID
  2908. * used when req_type equals to WMI_SCN_STOP_VAP_ALL, it indexed the vDev on which to stop the scan
  2909. */
  2910. A_UINT32 vdev_id;
  2911. /** pdev_id for identifying the MAC
  2912. * See macros starting with WMI_PDEV_ID_ for values.
  2913. * In non-DBDC case host should set it to 0
  2914. */
  2915. A_UINT32 pdev_id;
  2916. } wmi_stop_scan_cmd_fixed_param;
  2917.  
  2918.  
  2919. #define MAX_NUM_CHAN_PER_WMI_CMD 58 /* each WMI cmd can hold 58 channel entries at most */
  2920. #define APPEND_TO_EXISTING_CHAN_LIST 1
  2921.  
  2922. typedef struct {
  2923. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_chan_list_cmd_fixed_param */
  2924. A_UINT32 num_scan_chans; /** no of elements in chan_info[] */
  2925. A_UINT32 flags; /* Flags used to control the behavior of channel list update on target side */
  2926. A_UINT32 pdev_id; /** pdev_id for identifying the MAC. See macros starting with WMI_PDEV_ID_ for values. In non-DBDC case host should set it to 0. */
  2927. /** Followed by the variable length TLV chan_info:
  2928. * wmi_channel chan_info[] */
  2929. } wmi_scan_chan_list_cmd_fixed_param;
  2930.  
  2931. /*
  2932. * Priority numbers must be sequential, starting with 0.
  2933. */
  2934. /* NOTE: WLAN SCAN_PRIORITY_COUNT can't be changed without breaking the compatibility */
  2935. typedef enum {
  2936. WMI_SCAN_PRIORITY_VERY_LOW = 0,
  2937. WMI_SCAN_PRIORITY_LOW,
  2938. WMI_SCAN_PRIORITY_MEDIUM,
  2939. WMI_SCAN_PRIORITY_HIGH,
  2940. WMI_SCAN_PRIORITY_VERY_HIGH,
  2941.  
  2942. WMI_SCAN_PRIORITY_COUNT /* number of priorities supported */
  2943. } wmi_scan_priority;
  2944.  
  2945. /* Five Levels for Requested Priority */
  2946. /* VERY_LOW LOW MEDIUM HIGH VERY_HIGH */
  2947. typedef A_UINT32 WLAN_PRIORITY_MAPPING[WMI_SCAN_PRIORITY_COUNT];
  2948.  
  2949. /**
  2950. * to keep align with UMAC implementation, we pass only vdev_type but not vdev_subtype when we overwrite an entry for a specific vdev_subtype
  2951. * ex. if we need overwrite P2P Client prority entry, we will overwrite the whole table for WLAN_M_STA
  2952. * we will generate the new WLAN_M_STA table with modified P2P Client Entry but keep STA entry intact
  2953. */
  2954. typedef struct {
  2955. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_sch_priority_table_cmd_fixed_param */
  2956. /**
  2957. * used as an index to find the proper table for a specific vdev type in default_scan_priority_mapping_table
  2958. * vdev_type should be one of enum in WLAN_OPMODE which inculdes WLAN_M_IBSS, WLAN_M_STA, WLAN_M_AP and WLAN_M_MONITOR currently
  2959. */
  2960. A_UINT32 vdev_type;
  2961. /**
  2962. * number of rows in mapping_table for a specific vdev
  2963. * for WLAN_M_STA type, there are 3 entries in the table (refer to default_scan_priority_mapping_table definition)
  2964. */
  2965. A_UINT32 number_rows;
  2966. /**
  2967. * pdev_id for identifying the MAC. See macros starting with WMI_PDEV_ID_ for values.
  2968. * In non-DBDC case host should set it to 0
  2969. */
  2970. A_UINT32 pdev_id;
  2971. /** mapping_table for a specific vdev follows this TLV
  2972. * WLAN_PRIORITY_MAPPING mapping_table[]; */
  2973. } wmi_scan_sch_priority_table_cmd_fixed_param;
  2974.  
  2975. /** update flags */
  2976. #define WMI_SCAN_UPDATE_SCAN_PRIORITY 0x1
  2977. #define WMI_SCAN_UPDATE_SCAN_MIN_REST_TIME 0x2
  2978. #define WMI_SCAN_UPDATE_SCAN_MAX_REST_TIME 0x4
  2979.  
  2980. typedef struct {
  2981. A_UINT32 tlv_header;
  2982. /** requestor requesting update scan request */
  2983. A_UINT32 requestor;
  2984. /** Scan ID of the scan request that need to be update */
  2985. A_UINT32 scan_id;
  2986. /** update flags, indicating which of the following fields are valid and need to be updated*/
  2987. A_UINT32 scan_update_flags;
  2988. /** scan priority. Only valid if WMI_SCAN_UPDATE_SCAN_PRIORITY flag is set in scan_update_flag */
  2989. A_UINT32 scan_priority;
  2990. /** min rest time. Only valid if WMI_SCAN_UPDATE_MIN_REST_TIME flag is set in scan_update_flag */
  2991. A_UINT32 min_rest_time;
  2992. /** min rest time. Only valid if WMI_SCAN_UPDATE_MAX_REST_TIME flag is set in scan_update_flag */
  2993. A_UINT32 max_rest_time;
  2994. /** pdev_id for identifying the MAC. See macros starting with WMI_PDEV_ID_ for values. In non-DBDC case host should set it to 0 */
  2995. A_UINT32 pdev_id;
  2996. } wmi_scan_update_request_cmd_fixed_param;
  2997.  
  2998. #define WMI_SCAN_PROBE_OUI_SPOOFED_MAC_IN_PROBE_REQ 0x1
  2999. #define WMI_SCAN_PROBE_OUI_RANDOM_SEQ_NO_IN_PROBE_REQ 0x2
  3000. #define WMI_SCAN_PROBE_OUI_ENABLE_IE_WHITELIST_IN_PROBE_REQ 0x4
  3001.  
  3002. typedef struct _wmi_vendor_oui {
  3003. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vendor_oui */
  3004. A_UINT32 oui_type_subtype; /** Vendor OUI type and subtype, lower 3 bytes is type and highest byte is subtype**/
  3005. }wmi_vendor_oui;
  3006.  
  3007. typedef struct {
  3008. A_UINT32 tlv_header;
  3009. /** oui to be used in probe request frame when random mac addresss is
  3010. * requested part of scan parameters. this is applied to both FW internal scans and
  3011. * host initated scans. host can request for random mac address with
  3012. * WMI_SCAN_ADD_SPOOFED_MAC_IN_PROBE_REQ flag. */
  3013. A_UINT32 prob_req_oui;
  3014. A_UINT32 vdev_id;
  3015. /** Control Flags **/
  3016. A_UINT32 flags;
  3017. /** ie bitmap to use in probe req **/
  3018. A_UINT32 ie_bitmap[WMI_IE_BITMAP_SIZE];
  3019. /** Number of vendor OUIs. In the TLV vendor_oui[] **/
  3020. A_UINT32 num_vendor_oui;
  3021. /** pdev_id for identifying the MAC. See macros starting with WMI_PDEV_ID_ for values. In non-DBDC case host should set it to 0 */
  3022. A_UINT32 pdev_id;
  3023. /* Following this tlv, there comes an array of structure of type wmi_vendor_oui
  3024. wmi_vendor_oui vendor_oui[];*/
  3025. } wmi_scan_prob_req_oui_cmd_fixed_param;
  3026.  
  3027.  
  3028. enum wmi_scan_event_type {
  3029. WMI_SCAN_EVENT_STARTED = 0x1,
  3030. WMI_SCAN_EVENT_COMPLETED = 0x2,
  3031. WMI_SCAN_EVENT_BSS_CHANNEL = 0x4,
  3032. WMI_SCAN_EVENT_FOREIGN_CHANNEL = 0x8,
  3033. WMI_SCAN_EVENT_DEQUEUED = 0x10, /* scan request got dequeued */
  3034. WMI_SCAN_EVENT_PREEMPTED = 0x20, /* preempted by other high priority scan */
  3035. WMI_SCAN_EVENT_START_FAILED = 0x40, /* scan start failed */
  3036. WMI_SCAN_EVENT_RESTARTED = 0x80, /* scan restarted */
  3037. WMI_SCAN_EVENT_FOREIGN_CHANNEL_EXIT = 0x100,
  3038. WMI_SCAN_EVENT_SUSPENDED = 0x200, /* scan request is suspended */
  3039. WMI_SCAN_EVENT_RESUMED = 0x400, /* scan request is resumed */
  3040. WMI_SCAN_EVENT_MAX = 0x8000
  3041. };
  3042.  
  3043. enum wmi_scan_completion_reason {
  3044. /** scan related events */
  3045. WMI_SCAN_REASON_NONE = 0xFF,
  3046. WMI_SCAN_REASON_COMPLETED = 0,
  3047. WMI_SCAN_REASON_CANCELLED = 1,
  3048. WMI_SCAN_REASON_PREEMPTED = 2,
  3049. WMI_SCAN_REASON_TIMEDOUT = 3,
  3050. WMI_SCAN_REASON_INTERNAL_FAILURE = 4, /* This reason indication failures when performaing scan */
  3051. WMI_SCAN_REASON_SUSPENDED = 5,
  3052. WMI_SCAN_REASON_MAX,
  3053. };
  3054.  
  3055. typedef struct {
  3056. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_event_fixed_param */
  3057. /** scan event (wmi_scan_event_type) */
  3058. A_UINT32 event;
  3059. /** status of the scan completion event */
  3060. A_UINT32 reason;
  3061. /** channel freq , only valid for FOREIGN channel event*/
  3062. A_UINT32 channel_freq;
  3063. /**id of the requestor whose scan is in progress */
  3064. A_UINT32 requestor;
  3065. /**id of the scan that is in progress */
  3066. A_UINT32 scan_id;
  3067. /**id of VDEV that requested the scan */
  3068. A_UINT32 vdev_id;
  3069. } wmi_scan_event_fixed_param;
  3070.  
  3071. /* WMI Diag event */
  3072. typedef struct {
  3073. A_UINT32 tlv_header; /* TLV tag and len; tag is WMITLV_TAG_STRUC_wmi_diag_event_fixed_param */
  3074. A_UINT32 time_stamp; /* Reference timestamp. diag frame contains diff value */
  3075. A_UINT32 count; /* Number of diag frames added to current event */
  3076. A_UINT32 dropped;
  3077. /* followed by WMITLV_TAG_ARRAY_BYTE */
  3078. } wmi_diag_event_fixed_param;
  3079.  
  3080. /*
  3081. * If FW has multiple active channels due to MCC(multi channel concurrency),
  3082. * then these stats are combined stats for all the active channels.
  3083. */
  3084. typedef struct {
  3085. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_update_whal_mib_stats_event_fixed_param */
  3086. /** ack count, it is an incremental number, not accumulated number */
  3087. A_UINT32 ackRcvBad;
  3088. /** bad rts count, it is an incremental number, not accumulated number */
  3089. A_UINT32 rtsBad;
  3090. /** good rts, it is an incremental number, not accumulated number */
  3091. A_UINT32 rtsGood;
  3092. /** fcs count, it is an incremental number, not accumulated number */
  3093. A_UINT32 fcsBad;
  3094. /** beacon count, it is an incremental number, not accumulated number */
  3095. A_UINT32 noBeacons;
  3096. } wmi_update_whal_mib_stats_event_fixed_param;
  3097.  
  3098. /*
  3099. * This defines how much headroom is kept in the
  3100. * receive frame between the descriptor and the
  3101. * payload, in order for the WMI PHY error and
  3102. * management handler to insert header contents.
  3103. *
  3104. * This is in bytes.
  3105. */
  3106. #define WMI_MGMT_RX_HDR_HEADROOM (sizeof(wmi_comb_phyerr_rx_hdr) + WMI_TLV_HDR_SIZE + sizeof(wmi_single_phyerr_rx_hdr))
  3107.  
  3108. /** This event will be used for sending scan results
  3109. * as well as rx mgmt frames to the host. The rx buffer
  3110. * will be sent as part of this WMI event. It would be a
  3111. * good idea to pass all the fields in the RX status
  3112. * descriptor up to the host.
  3113. */
  3114. /* ATH_MAX_ANTENNA value (4) can't be changed without breaking the compatibility */
  3115. #define ATH_MAX_ANTENNA 4 /* To support beelinear, which is up to 4 chains */
  3116.  
  3117. /** flag indicating that the the mgmt frame (probe req/beacon) is received in the context of extscan performed by FW */
  3118. #define WMI_MGMT_RX_HDR_EXTSCAN 0x01
  3119. /** flag indicating that the the mgmt frame (probe req/beacon) is received in the context of matched network by FW ENLO */
  3120. #define WMI_MGMT_RX_HDR_ENLO 0x02
  3121.  
  3122. #define MAX_ANTENNA_EIGHT 8
  3123.  
  3124. typedef struct {
  3125. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_rx_hdr */
  3126. /** channel on which this frame is received. */
  3127. A_UINT32 channel;
  3128. /** snr information used to cal rssi */
  3129. A_UINT32 snr;
  3130. /** Rate kbps */
  3131. A_UINT32 rate;
  3132. /** rx phy mode WLAN_PHY_MODE */
  3133. A_UINT32 phy_mode;
  3134. /** length of the frame */
  3135. A_UINT32 buf_len;
  3136. /** rx status */
  3137. A_UINT32 status;
  3138. /** RSSI of PRI 20MHz for each chain. */
  3139. A_UINT32 rssi_ctl[ATH_MAX_ANTENNA];
  3140. /** information about the management frame e.g. can give a scan source for a scan result mgmt frame */
  3141. A_UINT32 flags;
  3142. /** combined RSSI, i.e. the sum of the snr + noise floor (dBm units) */
  3143. A_INT32 rssi;
  3144. /** delta between local TSF(TSF timestamp when frame was RXd)
  3145. * and remote TSF(TSF timestamp in the IE for mgmt frame -
  3146. * beacon,proberesp for e.g). If remote TSF is not available,
  3147. * delta set to 0.
  3148. * Although tsf_delta is stored as A_UINT32, it can be negative,
  3149. * and thus would need to be sign-extended if added to a value
  3150. * larger than 32 bits.
  3151. */
  3152. A_UINT32 tsf_delta;
  3153.  
  3154. /* The lower 32 bits of the TSF (rx_tsf_l32) is copied by FW from
  3155. * TSF timestamp in the RX MAC descriptor provided by HW.
  3156. */
  3157. A_UINT32 rx_tsf_l32;
  3158.  
  3159. /* The Upper 32 bits (rx_tsf_u32) is filled by reading the TSF register
  3160. * after the packet is received.
  3161. */
  3162. A_UINT32 rx_tsf_u32;
  3163.  
  3164. /** pdev_id for identifying the MAC the rx mgmt frame was received by
  3165. * See macros starting with WMI_PDEV_ID_ for values.
  3166. */
  3167. A_UINT32 pdev_id;
  3168.  
  3169. /* This TLV is followed by array of bytes:
  3170. * A_UINT8 bufp[]; <-- management frame buffer
  3171. */
  3172. /* This TLV is optionally followed by array of struct:
  3173. * wmi_rssi_ctl_ext rssi_ctl_ext;
  3174. */
  3175. } wmi_mgmt_rx_hdr;
  3176.  
  3177. /*
  3178. * Instead of universally increasing the RX_HDR_HEADROOM size which may cause problems for older targets,
  3179. * this new ext_hdr can be used for extending the header and will be only applicable for new targets.
  3180. */
  3181. typedef struct
  3182. {
  3183. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_rssi_ctl_ext */
  3184. /** RSSI of PRI 20MHz for each chain, in dB w.r.t. noise floor */
  3185. A_UINT32 rssi_ctl_ext[MAX_ANTENNA_EIGHT - ATH_MAX_ANTENNA];
  3186. } wmi_rssi_ctl_ext;
  3187.  
  3188. typedef struct {
  3189. /** TSF timestamp */
  3190. A_UINT32 tsf_timestamp;
  3191.  
  3192. /**
  3193. * Current freq1, freq2
  3194. *
  3195. * [7:0]: freq1[lo]
  3196. * [15:8] : freq1[hi]
  3197. * [23:16]: freq2[lo]
  3198. * [31:24]: freq2[hi]
  3199. */
  3200. A_UINT32 freq_info_1;
  3201.  
  3202. /**
  3203. * Combined RSSI over all chains and channel width for this PHY error
  3204. *
  3205. * [7:0]: RSSI combined
  3206. * [15:8]: Channel width (MHz)
  3207. * [23:16]: PHY error code
  3208. * [24:16]: reserved (future use)
  3209. */
  3210. A_UINT32 freq_info_2;
  3211.  
  3212. /**
  3213. * RSSI on chain 0 through 3
  3214. *
  3215. * This is formatted the same as the PPDU_START RX descriptor
  3216. * field:
  3217. *
  3218. * [7:0]: pri20
  3219. * [15:8]: sec20
  3220. * [23:16]: sec40
  3221. * [31:24]: sec80
  3222. */
  3223. A_UINT32 rssi_chain0;
  3224. A_UINT32 rssi_chain1;
  3225. A_UINT32 rssi_chain2;
  3226. A_UINT32 rssi_chain3;
  3227.  
  3228. /**
  3229. * Last calibrated NF value for chain 0 through 3
  3230. *
  3231. * nf_list_1:
  3232. *
  3233. * + [15:0] - chain 0
  3234. * + [31:16] - chain 1
  3235. *
  3236. * nf_list_2:
  3237. *
  3238. * + [15:0] - chain 2
  3239. * + [31:16] - chain 3
  3240. */
  3241. A_UINT32 nf_list_1;
  3242. A_UINT32 nf_list_2;
  3243.  
  3244. /** Length of the frame */
  3245. A_UINT32 buf_len;
  3246. } wmi_single_phyerr_rx_hdr;
  3247.  
  3248. typedef struct {
  3249. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_single_phyerr_ext_rx_hdr */
  3250. /**
  3251. * RSSI on chain 4 through 7 in dB w.r.t noise floor.
  3252. *
  3253. * This is formatted the same as the PPDU_START RX descriptor
  3254. * field:
  3255. *
  3256. * [7:0]: pri20
  3257. * [15:8]: sec20
  3258. * [23:16]: sec40
  3259. * [31:24]: sec80
  3260. */
  3261. A_UINT32 rssi_chain4;
  3262. A_UINT32 rssi_chain5;
  3263. A_UINT32 rssi_chain6;
  3264. A_UINT32 rssi_chain7;
  3265. /**
  3266. * Last calibrated NF value for chain 4 through 7 in dbm
  3267. *
  3268. * nf_list_3:
  3269. * + [15:0] - chain 4
  3270. * + [31:16] - chain 5
  3271. *
  3272. * nf_list_4:
  3273. * + [15:0] - chain 6
  3274. * + [31:16] - chain 7
  3275. *
  3276. * Each chain's noise floor is stored as a sign-extended (negative)
  3277. * value in dBm units.
  3278. */
  3279. A_UINT32 nf_list_3;
  3280. A_UINT32 nf_list_4;
  3281. } wmi_single_phyerr_ext_rx_hdr;
  3282.  
  3283. #define WMI_UNIFIED_FREQINFO_1_LO 0x000000ff
  3284. #define WMI_UNIFIED_FREQINFO_1_LO_S 0
  3285. #define WMI_UNIFIED_FREQINFO_1_HI 0x0000ff00
  3286. #define WMI_UNIFIED_FREQINFO_1_HI_S 8
  3287. #define WMI_UNIFIED_FREQINFO_2_LO 0x00ff0000
  3288. #define WMI_UNIFIED_FREQINFO_2_LO_S 16
  3289. #define WMI_UNIFIED_FREQINFO_2_HI 0xff000000
  3290. #define WMI_UNIFIED_FREQINFO_2_HI_S 24
  3291.  
  3292. /*
  3293. * Please keep in mind that these _SET macros break macro side effect
  3294. * assumptions; don't be clever with them.
  3295. */
  3296. #define WMI_UNIFIED_FREQ_INFO_GET(hdr, f) \
  3297. (WMI_F_MS((hdr)->freq_info_1, \
  3298. WMI_UNIFIED_FREQINFO_##f##_LO) \
  3299. | (WMI_F_MS((hdr)->freq_info_1, \
  3300. WMI_UNIFIED_FREQINFO_##f##_HI) << 8))
  3301.  
  3302. #define WMI_UNIFIED_FREQ_INFO_SET(hdr, f, v) \
  3303. do { \
  3304. WMI_F_RMW((hdr)->freq_info_1, (v) & 0xff, \
  3305. WMI_UNIFIED_FREQINFO_##f##_LO); \
  3306. WMI_F_RMW((hdr)->freq_info_1, ((v) >> 8) & 0xff, \
  3307. WMI_UNIFIED_FREQINFO_##f##_HI); \
  3308. } while (0)
  3309.  
  3310. #define WMI_UNIFIED_FREQINFO_2_RSSI_COMB 0x000000ff
  3311. #define WMI_UNIFIED_FREQINFO_2_RSSI_COMB_S 0
  3312. #define WMI_UNIFIED_FREQINFO_2_CHWIDTH 0x0000ff00
  3313. #define WMI_UNIFIED_FREQINFO_2_CHWIDTH_S 8
  3314. #define WMI_UNIFIED_FREQINFO_2_PHYERRCODE 0x00ff0000
  3315. #define WMI_UNIFIED_FREQINFO_2_PHYERRCODE_S 16
  3316.  
  3317. #define WMI_UNIFIED_RSSI_COMB_GET(hdr) \
  3318. ((int8_t) (WMI_F_MS((hdr)->freq_info_2, \
  3319. WMI_UNIFIED_FREQINFO_2_RSSI_COMB)))
  3320.  
  3321. #define WMI_UNIFIED_RSSI_COMB_SET(hdr, v) \
  3322. WMI_F_RMW((hdr)->freq_info_2, (v) & 0xff, \
  3323. WMI_UNIFIED_FREQINFO_2_RSSI_COMB);
  3324.  
  3325. #define WMI_UNIFIED_CHWIDTH_GET(hdr) \
  3326. WMI_F_MS((hdr)->freq_info_2, WMI_UNIFIED_FREQINFO_2_CHWIDTH)
  3327.  
  3328. #define WMI_UNIFIED_CHWIDTH_SET(hdr, v) \
  3329. WMI_F_RMW((hdr)->freq_info_2, (v) & 0xff, \
  3330. WMI_UNIFIED_FREQINFO_2_CHWIDTH);
  3331.  
  3332. #define WMI_UNIFIED_PHYERRCODE_GET(hdr) \
  3333. WMI_F_MS((hdr)->freq_info_2, WMI_UNIFIED_FREQINFO_2_PHYERRCODE)
  3334.  
  3335. #define WMI_UNIFIED_PHYERRCODE_SET(hdr, v) \
  3336. WMI_F_RMW((hdr)->freq_info_2, (v) & 0xff, \
  3337. WMI_UNIFIED_FREQINFO_2_PHYERRCODE);
  3338.  
  3339. #define WMI_UNIFIED_CHAIN_0 0x0000ffff
  3340. #define WMI_UNIFIED_CHAIN_0_S 0
  3341. #define WMI_UNIFIED_CHAIN_1 0xffff0000
  3342. #define WMI_UNIFIED_CHAIN_1_S 16
  3343. #define WMI_UNIFIED_CHAIN_2 0x0000ffff
  3344. #define WMI_UNIFIED_CHAIN_2_S 0
  3345. #define WMI_UNIFIED_CHAIN_3 0xffff0000
  3346. #define WMI_UNIFIED_CHAIN_3_S 16
  3347.  
  3348. #define WMI_UNIFIED_CHAIN_4 0x0000ffff
  3349. #define WMI_UNIFIED_CHAIN_4_S 0
  3350. #define WMI_UNIFIED_CHAIN_5 0xffff0000
  3351. #define WMI_UNIFIED_CHAIN_5_S 16
  3352. #define WMI_UNIFIED_CHAIN_6 0x0000ffff
  3353. #define WMI_UNIFIED_CHAIN_6_S 0
  3354. #define WMI_UNIFIED_CHAIN_7 0xffff0000
  3355. #define WMI_UNIFIED_CHAIN_7_S 16
  3356.  
  3357. #define WMI_UNIFIED_CHAIN_0_FIELD nf_list_1
  3358. #define WMI_UNIFIED_CHAIN_1_FIELD nf_list_1
  3359. #define WMI_UNIFIED_CHAIN_2_FIELD nf_list_2
  3360. #define WMI_UNIFIED_CHAIN_3_FIELD nf_list_2
  3361. #define WMI_UNIFIED_CHAIN_4_FIELD nf_list_3
  3362. #define WMI_UNIFIED_CHAIN_5_FIELD nf_list_3
  3363. #define WMI_UNIFIED_CHAIN_6_FIELD nf_list_4
  3364. #define WMI_UNIFIED_CHAIN_7_FIELD nf_list_4
  3365.  
  3366. #define WMI_UNIFIED_NF_CHAIN_GET(hdr, c) \
  3367. ((int16_t) (WMI_F_MS((hdr)->WMI_UNIFIED_CHAIN_##c##_FIELD, \
  3368. WMI_UNIFIED_CHAIN_##c)))
  3369.  
  3370. #define WMI_UNIFIED_NF_CHAIN_SET(hdr, c, nf) \
  3371. WMI_F_RMW((hdr)->WMI_UNIFIED_CHAIN_##c##_FIELD, (nf) & 0xffff, \
  3372. WMI_UNIFIED_CHAIN_##c);
  3373.  
  3374. /*
  3375. * For now, this matches what the underlying hardware is doing.
  3376. * Update ar6000ProcRxDesc() to use these macros when populating
  3377. * the rx descriptor and then we can just copy the field over
  3378. * to the WMI PHY notification without worrying about breaking
  3379. * things.
  3380. */
  3381. #define WMI_UNIFIED_RSSI_CHAN_PRI20 0x000000ff
  3382. #define WMI_UNIFIED_RSSI_CHAN_PRI20_S 0
  3383. #define WMI_UNIFIED_RSSI_CHAN_SEC20 0x0000ff00
  3384. #define WMI_UNIFIED_RSSI_CHAN_SEC20_S 8
  3385. #define WMI_UNIFIED_RSSI_CHAN_SEC40 0x00ff0000
  3386. #define WMI_UNIFIED_RSSI_CHAN_SEC40_S 16
  3387. #define WMI_UNIFIED_RSSI_CHAN_SEC80 0xff000000
  3388. #define WMI_UNIFIED_RSSI_CHAN_SEC80_S 24
  3389.  
  3390. #define WMI_UNIFIED_RSSI_CHAN_SET(hdr, c, ch, rssi) \
  3391. WMI_F_RMW((hdr)->rssi_chain##c, (rssi) & 0xff, \
  3392. WMI_UNIFIED_RSSI_CHAN_##ch);
  3393.  
  3394. #define WMI_UNIFIED_RSSI_CHAN_GET(hdr, c, ch) \
  3395. ((int8_t) (WMI_F_MS((hdr)->rssi_chain##c, \
  3396. WMI_UNIFIED_RSSI_CHAN_##ch)))
  3397.  
  3398. typedef struct {
  3399. /** Phy error event header */
  3400. wmi_single_phyerr_rx_hdr hdr;
  3401. /** frame buffer */
  3402. A_UINT8 bufp[1];
  3403. } wmi_single_phyerr_rx_event;
  3404.  
  3405. /* PHY ERROR MASK 0 */
  3406. /* bits 1:0 defined but not published */
  3407. #define WMI_PHY_ERROR_MASK0_RADAR (1 << 2)
  3408. /* bits 23:3 defined but not published */
  3409. #define WMI_PHY_ERROR_MASK0_FALSE_RADAR_EXT (1 << 24)
  3410. /* bits 25:24 defined but not published */
  3411. #define WMI_PHY_ERROR_MASK0_SPECTRAL_SCAN (1 << 26)
  3412. /* bits 31:27 defined but not published */
  3413.  
  3414. /* PHY ERROR MASK 1 */
  3415. /* bits 13:0 defined but not published */
  3416. /* bits 31:14 reserved */
  3417.  
  3418. /* PHY ERROR MASK 2 */
  3419. /* bits 31:0 reserved */
  3420.  
  3421. typedef struct {
  3422. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_comb_phyerr_rx_hdr */
  3423. /** Phy error phy error count */
  3424. A_UINT32 num_phyerr_events;
  3425. A_UINT32 tsf_l32;
  3426. A_UINT32 tsf_u32;
  3427. A_UINT32 buf_len;
  3428. union {
  3429. A_UINT32 pmac_id; /* OBSOLETE - will be removed once all refs are gone */
  3430. /** pdev_id for identifying the MAC
  3431. * See macros starting with WMI_PDEV_ID_ for values.
  3432. */
  3433. A_UINT32 pdev_id;
  3434. };
  3435. A_UINT32 rsPhyErrMask0; /* see WMI_PHY_ERROR_MASK0 */
  3436. A_UINT32 rsPhyErrMask1; /* see WMI_PHY_ERROR_MASK1 */
  3437. A_UINT32 rsPhyErrMask2; /* see WMI_PHY_ERROR_MASK2 */
  3438. /* This TLV is followed by array of bytes:
  3439. * frame buffer - contains multiple payloads in the order:
  3440. * header - payload, header - payload...
  3441. * (The header is of type: wmi_single_phyerr_rx_hdr)
  3442. * A_UINT8 bufp[];
  3443. * The extension hdr will repeat num_phyerr_events of times
  3444. * and will have 1:1 mapping with above header. i.e the 1st
  3445. * ext_rx_hdr will belong to 1st phyerr_rx_hdr and so on.
  3446. * wmi_single_phyerr_ext_rx_hdr single_phyerr_ext;
  3447. */
  3448. } wmi_comb_phyerr_rx_hdr;
  3449.  
  3450. /* WMI MGMT TX */
  3451. typedef struct {
  3452. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_tx_hdr */
  3453. /** unique id identifying the VDEV, generated by the caller */
  3454. A_UINT32 vdev_id;
  3455. /** peer MAC address */
  3456. wmi_mac_addr peer_macaddr;
  3457. /** xmit rate */
  3458. A_UINT32 tx_rate;
  3459. /** xmit power */
  3460. A_UINT32 tx_power;
  3461. /** Buffer length in bytes */
  3462. A_UINT32 buf_len;
  3463. /* This TLV is followed by array of bytes:
  3464. * A_UINT8 bufp[]; <-- management frame buffer
  3465. */
  3466. } wmi_mgmt_tx_hdr;
  3467.  
  3468. #define WMI_TX_SEND_PARAM_PWR_GET(tx_param_dword0) WMI_GET_BITS(tx_param_dword0, 0, 8)
  3469. #define WMI_TX_SEND_PARAM_PWR_SET(tx_param_dword0, value) WMI_SET_BITS(tx_param_dword0, 0, 8, value)
  3470.  
  3471. #define WMI_TX_SEND_PARAM_MCS_MASK_GET(tx_param_dword0) WMI_GET_BITS(tx_param_dword0, 8, 12)
  3472. #define WMI_TX_SEND_PARAM_MCS_MASK_SET(tx_param_dword0, value) WMI_SET_BITS(tx_param_dword0, 8, 12, value)
  3473.  
  3474. #define WMI_TX_SEND_PARAM_NSS_MASK_GET(tx_param_dword0) WMI_GET_BITS(tx_param_dword0, 20, 8)
  3475. #define WMI_TX_SEND_PARAM_NSS_MASK_SET(tx_param_dword0, value) WMI_SET_BITS(tx_param_dword0, 20, 8, value)
  3476.  
  3477. #define WMI_TX_SEND_PARAM_RETRY_LIMIT_GET(tx_param_dword0) WMI_GET_BITS(tx_param_dword0, 28, 4)
  3478. #define WMI_TX_SEND_PARAM_RETRY_LIMIT_SET(tx_param_dword0, value) WMI_SET_BITS(tx_param_dword0, 28, 4, value)
  3479.  
  3480. #define WMI_TX_SEND_PARAM_CHAIN_MASK_GET(tx_param_dword1) WMI_GET_BITS(tx_param_dword1, 0, 8)
  3481. #define WMI_TX_SEND_PARAM_CHAIN_MASK_SET(tx_param_dword1, value) WMI_SET_BITS(tx_param_dword1, 0, 8, value)
  3482.  
  3483. #define WMI_TX_SEND_PARAM_BW_MASK_GET(tx_param_dword1) WMI_GET_BITS(tx_param_dword1, 8, 7)
  3484. #define WMI_TX_SEND_PARAM_BW_MASK_SET(tx_param_dword1, value) WMI_SET_BITS(tx_param_dword1, 8, 7, value)
  3485.  
  3486. #define WMI_TX_SEND_PARAM_PREAMBLE_GET(tx_param_dword1) WMI_GET_BITS(tx_param_dword1, 15, 5)
  3487. #define WMI_TX_SEND_PARAM_PREAMBLE_SET(tx_param_dword1, value) WMI_SET_BITS(tx_param_dword1, 15, 5, value)
  3488.  
  3489. #define WMI_TX_SEND_PARAM_FRAME_TYPE_GET(tx_param_dword1) WMI_GET_BITS(tx_param_dword1, 20, 1)
  3490. #define WMI_TX_SEND_PARAM_FRAME_TYPE_SET(tx_param_dword1, value) WMI_SET_BITS(tx_param_dword1, 20, 1, value)
  3491.  
  3492. typedef struct {
  3493. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_send_params */
  3494.  
  3495. union {
  3496. struct {
  3497. /* DWORD 0: tx power, tx rate, retry_limit */
  3498. A_UINT32
  3499. /* pwr -
  3500. * Specify what power the tx frame needs to be transmitted at.
  3501. * The power a signed (two's complement) value is in units of 0.5 dBm.
  3502. * The value needs to be appropriately sign-extended when extracting
  3503. * the value from the message and storing it in a variable that is
  3504. * larger than A_INT8. (fw automatically handles this sign-extension.)
  3505. * If the transmission uses multiple tx chains, this power spec is
  3506. * the total transmit power, assuming incoherent combination of
  3507. * per-chain power to produce the total power.
  3508. */
  3509. pwr: 8,
  3510.  
  3511. /* mcs_mask -
  3512. * Specify the allowable values for MCS index (modulation and coding)
  3513. * to use for transmitting the frame.
  3514. *
  3515. * For HT / VHT preamble types, this mask directly corresponds to
  3516. * the HT or VHT MCS indices that are allowed. For each bit N set
  3517. * within the mask, MCS index N is allowed for transmitting the frame.
  3518. * For legacy CCK and OFDM rates, separate bits are provided for CCK
  3519. * rates versus OFDM rates, so the host has the option of specifying
  3520. * that the target must transmit the frame with CCK or OFDM rates
  3521. * (not HT or VHT), but leaving the decision to the target whether
  3522. * to use CCK or OFDM.
  3523. *
  3524. * For CCK and OFDM, the bits within this mask are interpreted as
  3525. * follows:
  3526. * bit 0 -> CCK 1 Mbps rate is allowed
  3527. * bit 1 -> CCK 2 Mbps rate is allowed
  3528. * bit 2 -> CCK 5.5 Mbps rate is allowed
  3529. * bit 3 -> CCK 11 Mbps rate is allowed
  3530. * bit 4 -> OFDM BPSK modulation, 1/2 coding rate is allowed
  3531. * bit 5 -> OFDM BPSK modulation, 3/4 coding rate is allowed
  3532. * bit 6 -> OFDM QPSK modulation, 1/2 coding rate is allowed
  3533. * bit 7 -> OFDM QPSK modulation, 3/4 coding rate is allowed
  3534. * bit 8 -> OFDM 16-QAM modulation, 1/2 coding rate is allowed
  3535. * bit 9 -> OFDM 16-QAM modulation, 3/4 coding rate is allowed
  3536. * bit 10 -> OFDM 64-QAM modulation, 2/3 coding rate is allowed
  3537. * bit 11 -> OFDM 64-QAM modulation, 3/4 coding rate is allowed
  3538. *
  3539. * The MCS index specification needs to be compatible with the
  3540. * bandwidth mask specification. For example, a MCS index == 9
  3541. * specification is inconsistent with a preamble type == VHT,
  3542. * Nss == 1, and channel bandwidth == 20 MHz.
  3543. *
  3544. * Furthermore, the host has only a limited ability to specify to
  3545. * the target to select from HT + legacy rates, or VHT + legacy rates,
  3546. * since this mcs_mask can specify either HT/VHT rates or legacy rates.
  3547. * If no bits are set, target can choose what MCS type to use.
  3548. */
  3549. mcs_mask: 12,
  3550.  
  3551. /* nss_mask -
  3552. * Specify which numbers of spatial streams (MIMO factor) are permitted.
  3553. * Each bit in this mask corresponds to a Nss value:
  3554. * bit 0: if set, Nss = 1 (non-MIMO) is permitted
  3555. * bit 1: if set, Nss = 2 (2x2 MIMO) is permitted
  3556. * bit 2: if set, Nss = 3 (3x3 MIMO) is permitted
  3557. * bit 3: if set, Nss = 4 (4x4 MIMO) is permitted
  3558. * bit 4: if set, Nss = 5 (5x5 MIMO) is permitted
  3559. * bit 5: if set, Nss = 6 (6x6 MIMO) is permitted
  3560. * bit 6: if set, Nss = 7 (7x7 MIMO) is permitted
  3561. * bit 7: if set, Nss = 8 (8x8 MIMO) is permitted
  3562. * The values in the Nss mask must be suitable for the recipient, e.g.
  3563. * a value of 0x4 (Nss = 3) cannot be specified for a tx frame to a
  3564. * recipient which only supports 2x2 MIMO.
  3565. * If no bits are set, target can choose what NSS type to use.
  3566. */
  3567. nss_mask: 8,
  3568.  
  3569. /* retry_limit -
  3570. * Specify the maximum number of transmissions, including the
  3571. * initial transmission, to attempt before giving up if no ack
  3572. * is received.
  3573. * If the tx rate is specified, then all retries shall use the
  3574. * same rate as the initial transmission.
  3575. * If no tx rate is specified, the target can choose whether to
  3576. * retain the original rate during the retransmissions, or to
  3577. * fall back to a more robust rate.
  3578. */
  3579. retry_limit: 4;
  3580.  
  3581. };
  3582. A_UINT32 tx_param_dword0;
  3583. };
  3584.  
  3585. union {
  3586. struct {
  3587. /* DWORD 1: tx chain mask, preamble_type, tx BW */
  3588. A_UINT32
  3589. /* chain_mask - specify which chains to transmit from
  3590. * If not set, target will choose what chain_mask to use.
  3591. */
  3592. chain_mask: 8,
  3593.  
  3594. /* The bits in this mask correspond to the values as below
  3595. * bit 0 -> 5MHz
  3596. * bit 1 -> 10MHz
  3597. * bit 2 -> 20MHz
  3598. * bit 3 -> 40MHz
  3599. * bit 4 -> 80MHz
  3600. * bit 5 -> 160MHz
  3601. * bit 6 -> 80_80MHz
  3602. * If no bits are set, target can choose what BW to use.
  3603. */
  3604. bw_mask: 7,
  3605.  
  3606. /* preamble_type_mask -
  3607. * Specify which preamble types (CCK, OFDM, HT, VHT) the target
  3608. * may choose from for transmitting this frame.
  3609. * Each bit in this mask corresponds to a preamble_type value:
  3610. * bit 0: if set, OFDM
  3611. * bit 1: if set, CCK
  3612. * bit 2: if set, HT
  3613. * bit 3: if set, VHT
  3614. * bit 4: if set, HE
  3615. * If no bits are set, target can choose what preamble type to use.
  3616. */
  3617. preamble_type: 5,
  3618.  
  3619. /* Data:1 Mgmt:0
  3620. */
  3621. frame_type: 1,
  3622.  
  3623. reserved1_31_21: 11;
  3624. };
  3625. A_UINT32 tx_param_dword1;
  3626. };
  3627. } wmi_tx_send_params;
  3628.  
  3629. typedef struct {
  3630. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_tx_send_cmd_fixed_param */
  3631. A_UINT32 vdev_id;
  3632. A_UINT32 desc_id; /* echoed in tx_compl_event */
  3633. A_UINT32 chanfreq; /* MHz units */
  3634. A_UINT32 paddr_lo;
  3635. A_UINT32 paddr_hi;
  3636. A_UINT32 frame_len;
  3637. A_UINT32 buf_len; /** Buffer length in bytes */
  3638. /*
  3639. * The frame which will have tx_params_valid set will be always be RAW
  3640. * frame, as it will be tx'ed on non-pause tid
  3641. */
  3642. A_UINT32 tx_params_valid;
  3643. /* This TLV is followed by array of bytes: First 64 bytes of management frame
  3644. * A_UINT8 bufp[];
  3645. */
  3646. /* This TLV is followed by wmi_tx_send_params
  3647. * wmi_tx_send_params tx_send_params;
  3648. */
  3649. } wmi_mgmt_tx_send_cmd_fixed_param;
  3650.  
  3651. typedef struct {
  3652. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offchan_data_tx_send_cmd_fixed_param */
  3653. A_UINT32 vdev_id;
  3654. A_UINT32 desc_id; /* echoed in tx_compl_event */
  3655. A_UINT32 chanfreq; /* MHz units */
  3656. A_UINT32 paddr_lo;
  3657. A_UINT32 paddr_hi;
  3658. A_UINT32 frame_len;
  3659. A_UINT32 buf_len; /** Buffer length in bytes */
  3660. /* The frame which will have tx_params_valid set will be always be RAW
  3661. * frame, as it will be tx'ed on non-pause tid
  3662. */
  3663. A_UINT32 tx_params_valid;
  3664.  
  3665. /* This TLV is followed by array of bytes: First 64 bytes of frame
  3666. * A_UINT8 bufp[];
  3667. */
  3668. /* This TLV is followed by wmi_tx_send_params
  3669. * wmi_tx_send_params tx_send_params;
  3670. */
  3671. } wmi_offchan_data_tx_send_cmd_fixed_param;
  3672.  
  3673. typedef struct {
  3674. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_echo_event_fixed_param */
  3675. A_UINT32 value;
  3676. } wmi_echo_event_fixed_param;
  3677.  
  3678. typedef struct {
  3679. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_echo_cmd_fixed_param */
  3680. A_UINT32 value;
  3681. } wmi_echo_cmd_fixed_param;
  3682.  
  3683.  
  3684. typedef struct {
  3685. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_regdomain_cmd_fixed_param */
  3686.  
  3687. /** pdev_id for identifying the MAC
  3688. * See macros starting with WMI_PDEV_ID_ for values.
  3689. */
  3690. A_UINT32 pdev_id;
  3691. /** reg domain code */
  3692. A_UINT32 reg_domain;
  3693. A_UINT32 reg_domain_2G;
  3694. A_UINT32 reg_domain_5G;
  3695. A_UINT32 conformance_test_limit_2G;
  3696. A_UINT32 conformance_test_limit_5G;
  3697. A_UINT32 dfs_domain;
  3698. } wmi_pdev_set_regdomain_cmd_fixed_param;
  3699.  
  3700. typedef struct {
  3701. /** TRUE for scan start and flase for scan end */
  3702. A_UINT32 scan_start;
  3703. } wmi_pdev_scan_cmd;
  3704.  
  3705. /* WMI support for setting ratemask in target */
  3706.  
  3707. typedef struct {
  3708. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_config_ratemask_fixed_param */
  3709. A_UINT32 vdev_id;
  3710. /* 0 - cck/ofdm
  3711. * 1 - HT
  3712. * 2 - VHT */
  3713. A_UINT32 type;
  3714.  
  3715. A_UINT32 mask_lower32;
  3716. A_UINT32 mask_higher32;
  3717. } wmi_vdev_config_ratemask_cmd_fixed_param;
  3718.  
  3719. /* nrp action - Filter Neighbor Rx Packets - add/remove filter */
  3720. enum {
  3721. WMI_FILTER_NRP_ACTION_ADD = 0x1,
  3722. WMI_FILTER_NRP_ACTION_REMOVE = 0x2,
  3723. WMI_FILTER_NRP_ACTION_GET_LIST = 0x3,
  3724. }; /* nrp - Neighbor Rx Packets */
  3725.  
  3726. /* nrp type - Filter Neighbor Rx Packets - ap/client addr */
  3727. enum {
  3728. WMI_FILTER_NRP_TYPE_AP_BSSID = 0x1,
  3729. WMI_FILTER_NRP_TYPE_STA_MACADDR = 0x2,
  3730. };
  3731.  
  3732. /* nrp flag - Filter Neighbor Rx Packets
  3733. * (capture flag, 2 & 3 not initially supported)
  3734. */
  3735. enum {
  3736. WMI_FILTER_NRP_CAPTURE_ONLY_RX_PACKETS = 0x1,
  3737. WMI_FILTER_NRP_CAPTURE_ONLY_TX_PACKETS = 0x2,
  3738. WMI_FILTER_NRP_CAPTURE_BOTH_TXRX_PACKETS = 0x3,
  3739. };
  3740.  
  3741. typedef struct {
  3742. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_filter_nrp_config_cmd_fixed_param */
  3743. A_UINT32 vdev_id;
  3744. /* AP Bssid or Client Mac-addr */
  3745. wmi_mac_addr addr;
  3746. /* Add/Remove NRF Filter */
  3747. A_UINT32 action; /* WMI_FILTER_NRP_ACTION enum */
  3748. /* client/ap filter */
  3749. A_UINT32 type; /* WMI_FILTER_NRP_TYPE enum */
  3750. /* optional - tx/rx capture */
  3751. A_UINT32 flag; /* WMI_FILTER_NRP_CAPTURE enum */
  3752. /* BSSID index - index of the BSSID register */
  3753. A_UINT32 bssid_idx;
  3754. } wmi_vdev_filter_nrp_config_cmd_fixed_param; /* Filter for Neighbor Rx Packets */
  3755.  
  3756.  
  3757. /*Command to set/unset chip in quiet mode*/
  3758. typedef struct {
  3759. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_quiet_cmd_fixed_param */
  3760. A_UINT32 pdev_id; /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
  3761. A_UINT32 period; /*period in TUs*/
  3762. A_UINT32 duration; /*duration in TUs*/
  3763. A_UINT32 next_start; /*offset in TUs*/
  3764. A_UINT32 enabled; /*enable/disable*/
  3765. } wmi_pdev_set_quiet_cmd_fixed_param;
  3766.  
  3767. typedef struct {
  3768. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_quiet_cmd_fixed_param */
  3769. A_UINT32 vdev_id; /* Virtual interface ID */
  3770. A_UINT32 period; /* period in TUs */
  3771. A_UINT32 duration; /* duration in TUs */
  3772. A_UINT32 next_start; /* offset in TUs */
  3773. A_UINT32 enabled; /* enable/disable */
  3774. } wmi_vdev_set_quiet_cmd_fixed_param;
  3775.  
  3776. typedef struct {
  3777. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_custom_aggr_size_cmd_fixed_param */
  3778. A_UINT32 vdev_id; /* vdev id indicating to which the vdev custom aggregation size will be applied. */
  3779. A_UINT32 tx_aggr_size; /* Size for tx aggregation (max MPDUs per A-MPDU) for the vdev mentioned in vdev id */
  3780. A_UINT32 rx_aggr_size; /* Size for rx aggregation (block ack window size limit) for the vdev mentioned in vdev id*/
  3781. } wmi_vdev_set_custom_aggr_size_cmd_fixed_param;
  3782.  
  3783. /*
  3784. * Command to enable/disable Green AP Power Save.
  3785. * This helps conserve power during AP operation. When the AP has no
  3786. * stations associated with it, the host can enable Green AP Power Save
  3787. * to request the firmware to shut down all but one transmit and receive
  3788. * chains.
  3789. */
  3790. typedef struct {
  3791. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_green_ap_ps_enable_cmd_fixed_param */
  3792. /** pdev_id for identifying the MAC
  3793. * See macros starting with WMI_PDEV_ID_ for values.
  3794. */
  3795. A_UINT32 pdev_id;
  3796. A_UINT32 enable; /*1:enable, 0:disable*/
  3797. } wmi_pdev_green_ap_ps_enable_cmd_fixed_param;
  3798.  
  3799.  
  3800. #define MAX_HT_IE_LEN 32
  3801. /* DEPRECATED */
  3802. typedef struct {
  3803. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_ht_ie_cmd_fixed_param */
  3804. A_UINT32 reserved0; /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
  3805. A_UINT32 ie_len; /*length of the ht ie in the TLV ie_data[] */
  3806. A_UINT32 tx_streams; /* Tx streams supported for this HT IE */
  3807. A_UINT32 rx_streams; /* Rx streams supported for this HT IE */
  3808. /** The TLV for the HT IE follows:
  3809. * A_UINT32 ie_data[];
  3810. */
  3811. } wmi_pdev_set_ht_ie_cmd_fixed_param;
  3812.  
  3813. #define MAX_VHT_IE_LEN 32
  3814. /* DEPRECATED */
  3815. typedef struct {
  3816. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_vht_ie_cmd_fixed_param */
  3817. A_UINT32 reserved0; /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
  3818. A_UINT32 ie_len; /*length of the vht ie in the TLV ie_data[] */
  3819. A_UINT32 tx_streams; /* Tx streams supported for this HT IE */
  3820. A_UINT32 rx_streams; /* Rx streams supported for this HT IE */
  3821. /** The TLV for the VHT IE follows:
  3822. * A_UINT32 ie_data[];
  3823. */
  3824. } wmi_pdev_set_vht_ie_cmd_fixed_param;
  3825.  
  3826. typedef struct {
  3827. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_base_macaddr_cmd_fixed_param */
  3828. /** pdev_id for identifying the MAC
  3829. * See macros starting with WMI_PDEV_ID_ for values.
  3830. */
  3831. A_UINT32 pdev_id;
  3832. wmi_mac_addr base_macaddr;
  3833. } wmi_pdev_set_base_macaddr_cmd_fixed_param;
  3834.  
  3835. /*
  3836. * For now, the spectral configuration is global rather than
  3837. * per-vdev. The vdev is a placeholder and will be ignored
  3838. * by the firmware.
  3839. */
  3840. typedef struct {
  3841. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_spectral_configure_cmd_fixed_param */
  3842. A_UINT32 vdev_id;
  3843. A_UINT32 spectral_scan_count;
  3844. A_UINT32 spectral_scan_period;
  3845. A_UINT32 spectral_scan_priority;
  3846. A_UINT32 spectral_scan_fft_size;
  3847. A_UINT32 spectral_scan_gc_ena;
  3848. A_UINT32 spectral_scan_restart_ena;
  3849. A_UINT32 spectral_scan_noise_floor_ref;
  3850. A_UINT32 spectral_scan_init_delay;
  3851. A_UINT32 spectral_scan_nb_tone_thr;
  3852. A_UINT32 spectral_scan_str_bin_thr;
  3853. A_UINT32 spectral_scan_wb_rpt_mode;
  3854. A_UINT32 spectral_scan_rssi_rpt_mode;
  3855. A_UINT32 spectral_scan_rssi_thr;
  3856. A_UINT32 spectral_scan_pwr_format;
  3857. A_UINT32 spectral_scan_rpt_mode;
  3858. A_UINT32 spectral_scan_bin_scale;
  3859. A_UINT32 spectral_scan_dBm_adj;
  3860. A_UINT32 spectral_scan_chn_mask;
  3861. } wmi_vdev_spectral_configure_cmd_fixed_param;
  3862.  
  3863. /*
  3864. * Enabling, disabling and triggering the spectral scan
  3865. * is a per-vdev operation. That is, it will set channel
  3866. * flags per vdev rather than globally; so concurrent scan/run
  3867. * and multiple STA (eg p2p, tdls, multi-band STA) is possible.
  3868. */
  3869. typedef struct {
  3870. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_spectral_enable_cmd_fixed_param */
  3871. A_UINT32 vdev_id;
  3872. /* 0 - ignore; 1 - trigger, 2 - clear trigger */
  3873. A_UINT32 trigger_cmd;
  3874. /* 0 - ignore; 1 - enable, 2 - disable */
  3875. A_UINT32 enable_cmd;
  3876. } wmi_vdev_spectral_enable_cmd_fixed_param;
  3877.  
  3878. typedef struct {
  3879. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_tx_power_cmd_fixed_param */
  3880. A_UINT32 vdev_id;
  3881. } wmi_vdev_get_tx_power_cmd_fixed_param;
  3882.  
  3883. /** common structure used for wmi_vedv_get_tx_power_event */
  3884. typedef struct {
  3885. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_tx_power_event_fixed_param */
  3886. A_UINT32 tx_power; /** units: 0.5 dBm, per-chain tx power */
  3887. A_UINT32 vdev_id; /** unique id identifying the VDEV, generated by the caller */
  3888. } wmi_vdev_get_tx_power_event_fixed_param;
  3889.  
  3890. typedef enum {
  3891. /** Limit the offchannel duration */
  3892. WMI_VDEV_LIMIT_OFFCHAN_ENABLE = 0x1,
  3893. /** Skip DFS channels from Scan channel list.
  3894. * valid for both host scans and FW scans */
  3895. WMI_VDEV_LIMIT_OFFCHAN_SKIP_DFS = 0x2,
  3896. } wmi_vdev_limit_offchan_flags;
  3897.  
  3898. typedef struct {
  3899. A_UINT32 tlv_header; /* WMITLV_TAG_STRUC_wmi_vdev_limit_offchan_cmd_fixed_param */
  3900. /** Limit the duration of offchannel events requested by the vdev corresponding to the specified vdev_id */
  3901. A_UINT32 vdev_id;
  3902. /** see enum wmi_vdev_limit_offchan_flags */
  3903. A_UINT32 flags;
  3904. /** max offchannel time allowed in msec when WMI_VDEV_LIMIT_OFFCHAN_ENABLE flag is set */
  3905. A_UINT32 max_offchan_time;
  3906. /** rest time in msec on the BSS channel */
  3907. A_UINT32 rest_time;
  3908. } wmi_vdev_limit_offchan_cmd_fixed_param;
  3909.  
  3910. #define WMI_CSA_EVENT_QSBW_ISE_ID_MASK 0x000000FF /* information sub element id for QSBW, expected value is 0x02 */
  3911. #define WMI_CSA_EVENT_QSBW_ISE_LEN_MASK 0x0000FF00 /* length of QSBW ISE data, expected value is 0x02 */
  3912. #define WMI_CSA_EVENT_QSBW_ISE_CAP_MASK 0x00FF0000 /* capabilities, 0x01 for 5MHz, 0x02 for 10MHz, 0x01|0x2 for both (see WMI_CSA_EVENT_QSBW_ISE bitmask defs) */
  3913. #define WMI_CSA_EVENT_QSBW_ISE_NOTIF_MASK 0xFF000000 /* notification from AP, 0x01 for 5MHz, 0x02 for 10MHz (see WMI_CSA_EVENT_QSBW_ISE bitmask defs) */
  3914.  
  3915. #define WMI_CSA_EVENT_QSBW_ISE_ID 0x02
  3916. #define WMI_CSA_EVENT_QSBW_ISE_LEN 0x02
  3917.  
  3918. #define WMI_CSA_EVENT_QSBW_ISE_5M_BITMASK 0x01
  3919. #define WMI_CSA_EVENT_QSBW_ISE_10M_BITMASK 0x02
  3920.  
  3921. #define WMI_CSA_EVENT_QSBW_ISE_CAP_5M(qsbw_ise) \
  3922. (((qsbw_ise) >> 16) & WMI_CSA_EVENT_QSBW_ISE_5M_BITMASK)
  3923. #define WMI_CSA_EVENT_QSBW_ISE_CAP_10M(qsbw_ise) \
  3924. (((qsbw_ise) >> 16) & WMI_CSA_EVENT_QSBW_ISE_10M_BITMASK)
  3925. #define WMI_CSA_EVENT_QSBW_ISE_NOTIF_5M(qsbw_ise) \
  3926. (((qsbw_ise) >> 24) & WMI_CSA_EVENT_QSBW_ISE_5M_BITMASK)
  3927. #define WMI_CSA_EVENT_QSBW_ISE_NOTIF_10M(qsbw_ise) \
  3928. (((qsbw_ise) >> 24) & WMI_CSA_EVENT_QSBW_ISE_10M_BITMASK)
  3929.  
  3930. typedef enum {
  3931. WMI_CSA_IE_PRESENT = 0x00000001,
  3932. WMI_XCSA_IE_PRESENT = 0x00000002,
  3933. WMI_WBW_IE_PRESENT = 0x00000004,
  3934. WMI_CSWARP_IE_PRESENT = 0x00000008,
  3935. WMI_QSBW_ISE_PRESENT = 0x00000010,
  3936. } WMI_CSA_EVENT_IES_PRESENT_FLAG;
  3937.  
  3938. /* wmi CSA receive event from beacon frame */
  3939. typedef struct {
  3940. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csa_event_fixed_param */
  3941. A_UINT32 i_fc_dur; /* Bit 0-15: FC, Bit 16-31: DUR */
  3942. wmi_mac_addr i_addr1;
  3943. wmi_mac_addr i_addr2;
  3944. /* NOTE: size of array of csa_ie[], xcsa_ie[], and wb_ie[] cannot be
  3945. * changed in the future without breaking WMI compatibility */
  3946. A_UINT32 csa_ie[2];
  3947. A_UINT32 xcsa_ie[2];
  3948. A_UINT32 wb_ie[2];
  3949. A_UINT32 cswarp_ie;
  3950. A_UINT32 ies_present_flag; /* WMI_CSA_EVENT_IES_PRESENT_FLAG */
  3951. A_UINT32 qsbw_ise;
  3952. } wmi_csa_event_fixed_param;
  3953.  
  3954. typedef enum {
  3955. WAL_PEER_MCAST2UCAST_DISABLED = 0,
  3956. WAL_PEER_MCAST2UCAST_DROP_EMPTY = 1, /* Drop the frames if match is not found */
  3957. WAL_PEER_MCAST2UCAST_MCAST_EMPTY = 2, /* Send as mcast if match is not found */
  3958. } WMI_PEER_MCAST2UCAST_MODE;
  3959.  
  3960. typedef enum {
  3961. PKT_PWR_SAVE_NAP_ENABLE = 0x00000001,
  3962. PKT_PWR_SAVE_LS_ENABLE = 0x00000002,
  3963. PKT_PWR_SAVE_DS_ENABLE = 0x00000004,
  3964.  
  3965. PKT_PWR_SAVE_BTCOEX_ENABLE = 0x00000008,
  3966.  
  3967. PKT_PWR_SAVE_FSM_ENABLE = 0x80000000,
  3968. } WMI_PDEV_PKT_PWR_SAVE_LEVEL;
  3969.  
  3970. typedef enum {
  3971. /** TX chain mask */
  3972. WMI_PDEV_PARAM_TX_CHAIN_MASK = 0x1,
  3973. /** RX chain mask */
  3974. WMI_PDEV_PARAM_RX_CHAIN_MASK,
  3975. /** TX power limit for 2G Radio */
  3976. WMI_PDEV_PARAM_TXPOWER_LIMIT2G,
  3977. /** TX power limit for 5G Radio */
  3978. WMI_PDEV_PARAM_TXPOWER_LIMIT5G,
  3979. /** TX power scale */
  3980. WMI_PDEV_PARAM_TXPOWER_SCALE,
  3981. /** Beacon generation mode . 0: host, 1: target */
  3982. WMI_PDEV_PARAM_BEACON_GEN_MODE,
  3983. /** Beacon generation mode . 0: staggered 1: bursted */
  3984. WMI_PDEV_PARAM_BEACON_TX_MODE,
  3985. /** Resource manager off chan mode .
  3986. * 0: turn off off chan mode. 1: turn on offchan mode
  3987. */
  3988. WMI_PDEV_PARAM_RESMGR_OFFCHAN_MODE,
  3989. /** Protection mode 0: no protection 1:use CTS-to-self 2: use RTS/CTS */
  3990. WMI_PDEV_PARAM_PROTECTION_MODE,
  3991. /** Dynamic bandwidth 0: disable 1: enable */
  3992. WMI_PDEV_PARAM_DYNAMIC_BW,
  3993. /** Non aggregrate/ 11g sw retry threshold.0-disable */
  3994. WMI_PDEV_PARAM_NON_AGG_SW_RETRY_TH,
  3995. /** aggregrate sw retry threshold. 0-disable*/
  3996. WMI_PDEV_PARAM_AGG_SW_RETRY_TH,
  3997. /** Station kickout threshold (non of consecutive failures).0-disable */
  3998. WMI_PDEV_PARAM_STA_KICKOUT_TH,
  3999. /** Aggerate size scaling configuration per AC */
  4000. WMI_PDEV_PARAM_AC_AGGRSIZE_SCALING,
  4001. /** LTR enable */
  4002. WMI_PDEV_PARAM_LTR_ENABLE,
  4003. /** LTR latency for BE, in us */
  4004. WMI_PDEV_PARAM_LTR_AC_LATENCY_BE,
  4005. /** LTR latency for BK, in us */
  4006. WMI_PDEV_PARAM_LTR_AC_LATENCY_BK,
  4007. /** LTR latency for VI, in us */
  4008. WMI_PDEV_PARAM_LTR_AC_LATENCY_VI,
  4009. /** LTR latency for VO, in us */
  4010. WMI_PDEV_PARAM_LTR_AC_LATENCY_VO,
  4011. /** LTR AC latency timeout, in ms */
  4012. WMI_PDEV_PARAM_LTR_AC_LATENCY_TIMEOUT,
  4013. /** LTR platform latency override, in us */
  4014. WMI_PDEV_PARAM_LTR_SLEEP_OVERRIDE,
  4015. /** LTR-M override, in us */
  4016. WMI_PDEV_PARAM_LTR_RX_OVERRIDE,
  4017. /** Tx activity timeout for LTR, in us */
  4018. WMI_PDEV_PARAM_LTR_TX_ACTIVITY_TIMEOUT,
  4019. /** L1SS state machine enable */
  4020. WMI_PDEV_PARAM_L1SS_ENABLE,
  4021. /** Deep sleep state machine enable */
  4022. WMI_PDEV_PARAM_DSLEEP_ENABLE,
  4023. /** RX buffering flush enable */
  4024. WMI_PDEV_PARAM_PCIELP_TXBUF_FLUSH,
  4025. /** RX buffering matermark */
  4026. WMI_PDEV_PARAM_PCIELP_TXBUF_WATERMARK,
  4027. /** RX buffering timeout enable */
  4028. WMI_PDEV_PARAM_PCIELP_TXBUF_TMO_EN,
  4029. /** RX buffering timeout value */
  4030. WMI_PDEV_PARAM_PCIELP_TXBUF_TMO_VALUE,
  4031. /** pdev level stats update period in ms */
  4032. WMI_PDEV_PARAM_PDEV_STATS_UPDATE_PERIOD,
  4033. /** vdev level stats update period in ms */
  4034. WMI_PDEV_PARAM_VDEV_STATS_UPDATE_PERIOD,
  4035. /** peer level stats update period in ms */
  4036. WMI_PDEV_PARAM_PEER_STATS_UPDATE_PERIOD,
  4037. /** beacon filter status update period */
  4038. WMI_PDEV_PARAM_BCNFLT_STATS_UPDATE_PERIOD,
  4039. /** QOS Mgmt frame protection MFP/PMF 0: disable, 1: enable */
  4040. WMI_PDEV_PARAM_PMF_QOS,
  4041. /** Access category on which ARP frames are sent */
  4042. WMI_PDEV_PARAM_ARP_AC_OVERRIDE,
  4043. /** DCS configuration */
  4044. WMI_PDEV_PARAM_DCS,
  4045. /** Enable/Disable ANI on target */
  4046. WMI_PDEV_PARAM_ANI_ENABLE,
  4047. /** configure the ANI polling period */
  4048. WMI_PDEV_PARAM_ANI_POLL_PERIOD,
  4049. /** configure the ANI listening period */
  4050. WMI_PDEV_PARAM_ANI_LISTEN_PERIOD,
  4051. /** configure OFDM immunity level */
  4052. WMI_PDEV_PARAM_ANI_OFDM_LEVEL,
  4053. /** configure CCK immunity level */
  4054. WMI_PDEV_PARAM_ANI_CCK_LEVEL,
  4055. /** Enable/Disable CDD for 1x1 STAs in rate control module */
  4056. WMI_PDEV_PARAM_DYNTXCHAIN,
  4057. /** Enable/Disable proxy STA */
  4058. WMI_PDEV_PARAM_PROXY_STA,
  4059. /** Enable/Disable low power state when all VDEVs are inactive/idle. */
  4060. WMI_PDEV_PARAM_IDLE_PS_CONFIG,
  4061. /** Enable/Disable power gating sleep */
  4062. WMI_PDEV_PARAM_POWER_GATING_SLEEP,
  4063. /** Enable/Disable Rfkill */
  4064. WMI_PDEV_PARAM_RFKILL_ENABLE,
  4065. /** Set Bursting DUR */
  4066. WMI_PDEV_PARAM_BURST_DUR,
  4067. /** Set Bursting ENABLE */
  4068. WMI_PDEV_PARAM_BURST_ENABLE,
  4069. /** HW rfkill config */
  4070. WMI_PDEV_PARAM_HW_RFKILL_CONFIG,
  4071. /** Enable radio low power features */
  4072. WMI_PDEV_PARAM_LOW_POWER_RF_ENABLE,
  4073. /** L1SS entry and residency time track */
  4074. WMI_PDEV_PARAM_L1SS_TRACK,
  4075. /** set hyst at runtime, requirement from SS */
  4076. WMI_PDEV_PARAM_HYST_EN,
  4077. /** Enable/ Disable POWER COLLAPSE */
  4078. WMI_PDEV_PARAM_POWER_COLLAPSE_ENABLE,
  4079. /** configure LED system state */
  4080. WMI_PDEV_PARAM_LED_SYS_STATE,
  4081. /** Enable/Disable LED */
  4082. WMI_PDEV_PARAM_LED_ENABLE,
  4083. /** set DIRECT AUDIO time latency */
  4084. WMI_PDEV_PARAM_AUDIO_OVER_WLAN_LATENCY, /* DEPRECATED */
  4085. /** set DIRECT AUDIO Feature ENABLE */
  4086. WMI_PDEV_PARAM_AUDIO_OVER_WLAN_ENABLE, /* DEPRECATED */
  4087. /** pdev level whal mib stats update enable */
  4088. WMI_PDEV_PARAM_WHAL_MIB_STATS_UPDATE_ENABLE,
  4089. /** ht/vht info based on vdev */
  4090. WMI_PDEV_PARAM_VDEV_RATE_STATS_UPDATE_PERIOD,
  4091. /** Set CTS channel BW for dynamic BW adjustment feature */
  4092. WMI_PDEV_PARAM_CTS_CBW,
  4093. /** Set GPIO pin info used by WNTS */
  4094. WMI_PDEV_PARAM_WNTS_CONFIG,
  4095. /** Enable/Disable hardware adaptive early rx feature */
  4096. WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_ENABLE,
  4097. /** The minimum early rx duration, to ensure early rx duration is non-zero */
  4098. WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_MIN_SLEEP_SLOP,
  4099. /** Increasing/decreasing step used by hardware */
  4100. WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_INC_DEC_STEP,
  4101. /** The fixed early rx duration when adaptive early rx is disabled */
  4102. WMI_PDEV_PARAM_EARLY_RX_FIX_SLEEP_SLOP,
  4103. /** Enable/Disable bmiss based adaptive beacon timeout feature */
  4104. WMI_PDEV_PARAM_BMISS_BASED_ADAPTIVE_BTO_ENABLE,
  4105. /** The minimum beacon timeout duration, to ensure beacon timeout duration is non-zero */
  4106. WMI_PDEV_PARAM_BMISS_BTO_MIN_BCN_TIMEOUT,
  4107. /** Increasing/decreasing step used by hardware */
  4108. WMI_PDEV_PARAM_BMISS_BTO_INC_DEC_STEP,
  4109. /** The fixed beacon timeout duration when bmiss based adaptive beacon timeout is disabled */
  4110. WMI_PDEV_PARAM_BTO_FIX_BCN_TIMEOUT,
  4111. /** Enable/Disable Congestion Estimator based adaptive beacon timeout feature */
  4112. WMI_PDEV_PARAM_CE_BASED_ADAPTIVE_BTO_ENABLE,
  4113. /** combo value of ce_id, ce_threshold, ce_time, refer to WMI_CE_BTO_CE_ID_MASK */
  4114. WMI_PDEV_PARAM_CE_BTO_COMBO_CE_VALUE,
  4115. /** 2G TX chain mask */
  4116. WMI_PDEV_PARAM_TX_CHAIN_MASK_2G,
  4117. /** 2G RX chain mask */
  4118. WMI_PDEV_PARAM_RX_CHAIN_MASK_2G,
  4119. /** 5G TX chain mask */
  4120. WMI_PDEV_PARAM_TX_CHAIN_MASK_5G,
  4121. /** 5G RX chain mask */
  4122. WMI_PDEV_PARAM_RX_CHAIN_MASK_5G,
  4123. /* Set tx chain mask for CCK rates */
  4124. WMI_PDEV_PARAM_TX_CHAIN_MASK_CCK,
  4125. /* Set tx chain mask for 1SS stream */
  4126. WMI_PDEV_PARAM_TX_CHAIN_MASK_1SS,
  4127. /* Enable/Disable CTS2Self for P2P GO when Non-P2P Client is connected */
  4128. WMI_PDEV_PARAM_CTS2SELF_FOR_P2P_GO_CONFIG,
  4129. /** TX power backoff in dB: tx power -= param value
  4130. * Host passes values(DB) to Halphy, Halphy reduces the power table by
  4131. * the values. Safety check will happen in Halphy
  4132. */
  4133. WMI_PDEV_PARAM_TXPOWER_DECR_DB,
  4134. /** enable and disable aggregate burst along with duration */
  4135. WMI_PDEV_PARAM_AGGR_BURST,
  4136. /** Set the global RX decap mode */
  4137. WMI_PDEV_PARAM_RX_DECAP_MODE,
  4138. /** Enable/Disable Fast channel reset */
  4139. WMI_PDEV_PARAM_FAST_CHANNEL_RESET,
  4140. /** Default antenna for Smart antenna */
  4141. WMI_PDEV_PARAM_SMART_ANTENNA_DEFAULT_ANTENNA,
  4142. /** Set the user-specified antenna gain */
  4143. WMI_PDEV_PARAM_ANTENNA_GAIN,
  4144. /** Set the user-specified RX filter */
  4145. WMI_PDEV_PARAM_RX_FILTER,
  4146. /** configure the user-specified MCAST tid for managed mcast feature
  4147. * 0-15 is the valid range. 0xff will clear the tid setting */
  4148. WMI_PDEV_SET_MCAST_TO_UCAST_TID,
  4149. /** Enable/Disable Proxy sta mode */
  4150. WMI_PDEV_PARAM_PROXY_STA_MODE,
  4151. /** configure the mcast2ucast mode for the pdev->peer_mcast.
  4152. * See WMI_PEER_MCAST2UCAST_MODE for possible values */
  4153. WMI_PDEV_PARAM_SET_MCAST2UCAST_MODE,
  4154. /** Sets the Mcast buffers for cloning, to support Mcast enhancement */
  4155. WMI_PDEV_PARAM_SET_MCAST2UCAST_BUFFER,
  4156. /** Remove the Mcast buffers added by host */
  4157. WMI_PDEV_PARAM_REMOVE_MCAST2UCAST_BUFFER,
  4158. /** En/disable station power save state indication */
  4159. WMI_PDEV_PEER_STA_PS_STATECHG_ENABLE,
  4160. /** Access category on which ARP frames are sent */
  4161. WMI_PDEV_PARAM_IGMPMLD_AC_OVERRIDE,
  4162. /** allow or disallow interbss frame forwarding */
  4163. WMI_PDEV_PARAM_BLOCK_INTERBSS,
  4164. /** Enable/Disable reset */
  4165. WMI_PDEV_PARAM_SET_DISABLE_RESET_CMDID,
  4166. /** Enable/Disable/Set MSDU_TTL in milliseconds. */
  4167. WMI_PDEV_PARAM_SET_MSDU_TTL_CMDID,
  4168. /** Set global PPDU duration limit (usec). */
  4169. WMI_PDEV_PARAM_SET_PPDU_DURATION_CMDID,
  4170. /** set txbf sounding period of vap in milliseconds */
  4171. WMI_PDEV_PARAM_TXBF_SOUND_PERIOD_CMDID,
  4172. /** Set promiscuous mode */
  4173. WMI_PDEV_PARAM_SET_PROMISC_MODE_CMDID,
  4174. /** Set burst mode */
  4175. WMI_PDEV_PARAM_SET_BURST_MODE_CMDID,
  4176. /** enable enhanced stats */
  4177. WMI_PDEV_PARAM_EN_STATS,
  4178. /** Set mu-grouping policy */
  4179. WMI_PDEV_PARAM_MU_GROUP_POLICY,
  4180. /** Channel Hopping Enable */
  4181. WMI_PDEV_PARAM_NOISE_DETECTION,
  4182. /** Set Channel Hopping NF threshold in dBm */
  4183. WMI_PDEV_PARAM_NOISE_THRESHOLD,
  4184. /** Set PAPRD policy */
  4185. WMI_PDEV_PARAM_DPD_ENABLE,
  4186. /** Enable/disable mcast/bcast echo, used by ProxySTA */
  4187. WMI_PDEV_PARAM_SET_MCAST_BCAST_ECHO,
  4188. /** ATF enable/disable strict schedule */
  4189. WMI_PDEV_PARAM_ATF_STRICT_SCH,
  4190. /** ATF set access category duration, B0-B29 duration, B30-B31: AC */
  4191. WMI_PDEV_PARAM_ATF_SCHED_DURATION,
  4192. /** Default antenna polarization */
  4193. WMI_PDEV_PARAM_ANT_PLZN,
  4194. /** Set mgmt retry limit */
  4195. WMI_PDEV_PARAM_MGMT_RETRY_LIMIT,
  4196. /** Set CCA sensitivity level in dBm */
  4197. WMI_PDEV_PARAM_SENSITIVITY_LEVEL,
  4198. /** Set 2G positive and negative Tx power in 0.5dBm units */
  4199. WMI_PDEV_PARAM_SIGNED_TXPOWER_2G,
  4200. /** Set 5G positive and negative Tx power in 0.5dBm
  4201. * units */
  4202. WMI_PDEV_PARAM_SIGNED_TXPOWER_5G,
  4203. /** Enable/disble AMSDU for tids */
  4204. WMI_PDEV_PARAM_ENABLE_PER_TID_AMSDU,
  4205. /** Enable/disable AMPDU for tids */
  4206. WMI_PDEV_PARAM_ENABLE_PER_TID_AMPDU,
  4207. /** Set CCA threshold in dBm */
  4208. WMI_PDEV_PARAM_CCA_THRESHOLD,
  4209. /** RTS Fixed rate setting */
  4210. WMI_PDEV_PARAM_RTS_FIXED_RATE,
  4211. /** Pdev reset */
  4212. WMI_PDEV_PARAM_PDEV_RESET,
  4213. /** wapi mbssid offset **/
  4214. WMI_PDEV_PARAM_WAPI_MBSSID_OFFSET,
  4215. /** ARP DEBUG source address*/
  4216. WMI_PDEV_PARAM_ARP_DBG_SRCADDR,
  4217. /** ARP DEBUG destination address*/
  4218. WMI_PDEV_PARAM_ARP_DBG_DSTADDR,
  4219. /** ATF enable/disable obss noise scheduling */
  4220. WMI_PDEV_PARAM_ATF_OBSS_NOISE_SCH,
  4221. /** ATF obss noise scaling factor */
  4222. WMI_PDEV_PARAM_ATF_OBSS_NOISE_SCALING_FACTOR,
  4223. /**
  4224. * TX power reduction scaling exponent - final tx power is the
  4225. * nominal tx power (A_MIN(reg_pow,ctl,etc..)) divided by
  4226. * 2^(scale exponent). For example:
  4227. * If this scale exponent is 0, the power is unchanged (divided by 2^0)
  4228. * If this factor is 1, the power is scaled down by 2^1, i.e. 3 dB
  4229. * If this factor is 2, the power is scaled down by 2^2, i.e. 6 dB
  4230. * If this factor is 3, the power is scaled down by 2^3, i.e. 9 dB
  4231. */
  4232. WMI_PDEV_PARAM_CUST_TXPOWER_SCALE,
  4233. /** ATF enabe/disabe dynamically */
  4234. WMI_PDEV_PARAM_ATF_DYNAMIC_ENABLE,
  4235. /** Set tx retry limit for control frames. 0 = disable, 31 = max */
  4236. WMI_PDEV_PARAM_CTRL_RETRY_LIMIT,
  4237. /** Set propagation delay for 2G / 5G band.
  4238. * The propagation delay is fundamentally a per-peer property, but
  4239. * the target may not support per-peer settings for ack timeouts.
  4240. * This pdev parameter allows the MAC-level ack timeout to be set to
  4241. * a value suitable for the worst-case propagation delay of any peer
  4242. * within that pdev.
  4243. * Units are microseconds.
  4244. */
  4245. WMI_PDEV_PARAM_PROPAGATION_DELAY,
  4246. /**
  4247. * Host can enable/disable ANT DIV feature
  4248. * if it's been enabled in BDF
  4249. */
  4250. WMI_PDEV_PARAM_ENA_ANT_DIV,
  4251. /** Host can force one chain to select a specific ANT */
  4252. WMI_PDEV_PARAM_FORCE_CHAIN_ANT,
  4253. /**
  4254. * Start a cycle ANT self test periodically.
  4255. * In the test, the FW would select each ANT pair
  4256. * one by one, the cycle time could be configured
  4257. * via WMI_PDEV_PARAM_ANT_DIV_SELFTEST_INTVL
  4258. */
  4259. WMI_PDEV_PARAM_ANT_DIV_SELFTEST,
  4260. /**
  4261. * Configure the cycle time of ANT self test,
  4262. * the unit is micro second. Per the timer
  4263. * limitation, too small value could be not so
  4264. * accurate.
  4265. */
  4266. WMI_PDEV_PARAM_ANT_DIV_SELFTEST_INTVL,
  4267. /**
  4268. * wlan stats observation period, the unit is millisecond.
  4269. * The value of 0 is used to turn off periodic stats report.
  4270. */
  4271. WMI_PDEV_PARAM_STATS_OBSERVATION_PERIOD,
  4272. /**
  4273. * Set tx_ppdu_delay[] bin size to specify how many
  4274. * milliseconds each bin of the wmi_tx_stats.tx_ppdu_delay[]
  4275. * histogram represents.
  4276. */
  4277. WMI_PDEV_PARAM_TX_PPDU_DELAY_BIN_SIZE_MS,
  4278. /** set wmi_tx_stats.tx_ppdu_delay[] array length */
  4279. WMI_PDEV_PARAM_TX_PPDU_DELAY_ARRAY_LEN,
  4280. /** set wmi_tx_stats.tx_mpdu_aggr[] array length */
  4281. WMI_PDEV_PARAM_TX_MPDU_AGGR_ARRAY_LEN,
  4282. /** set wmi_rx_stats.rx_mpdu_aggr[] array length */
  4283. WMI_PDEV_PARAM_RX_MPDU_AGGR_ARRAY_LEN,
  4284. /** Set TX delay value in TX sch module, unit is microseconds */
  4285. WMI_PDEV_PARAM_TX_SCH_DELAY,
  4286. /** Set RTS enable for SIFS bursting */
  4287. WMI_PDEV_PARAM_ENABLE_RTS_SIFS_BURSTING,
  4288. /** Set Maximum number of MPDUs in an AMPDU*/
  4289. WMI_PDEV_PARAM_MAX_MPDUS_IN_AMPDU,
  4290.  
  4291. /** Enable/disable peer stats info mechanism
  4292. * A zero value disables; a non-zero value enables.
  4293. */
  4294. WMI_PDEV_PARAM_PEER_STATS_INFO_ENABLE,
  4295.  
  4296. /** Configure Fast PWR Transition mode
  4297. * 0x0 -> inidcates Fast PWR transition disabled
  4298. * 0x1 -> indicates Static mode enabled
  4299. * 0x2 -> indicates Dynamic mode enabled
  4300. */
  4301. WMI_PDEV_PARAM_FAST_PWR_TRANSITION,
  4302.  
  4303. /** Enable/disable radio channel stats mechanism
  4304. * A zero value disables; a non-zero value enables.
  4305. */
  4306. WMI_PDEV_PARAM_RADIO_CHAN_STATS_ENABLE,
  4307. /** Enable/disable radio diagnosis feature
  4308. * which allows retrieving the status of radio.
  4309. * A zero value disables; a non-zero value enables.
  4310. */
  4311. WMI_PDEV_PARAM_RADIO_DIAGNOSIS_ENABLE,
  4312. /** Enable/Disable mesh mcast traffic
  4313. * 1 - Allow mesh mcast traffic
  4314. * 0 - Disallow mesh mcast traffic
  4315. */
  4316. WMI_PDEV_PARAM_MESH_MCAST_ENABLE,
  4317. /** Enable/Disable smart chainmask scheme
  4318. * 1 - Enable smart chainmask scheme
  4319. * 0 - Disable smart chainmask scheme
  4320. */
  4321. WMI_PDEV_PARAM_SMART_CHAINMASK_SCHEME,
  4322. /** Enable/Disable alternate chainmask scheme
  4323. * 1 - Enable alternate chainmask scheme
  4324. * 0 - Disable alternate chainmask scheme
  4325. */
  4326. WMI_PDEV_PARAM_ALTERNATIVE_CHAINMASK_SCHEME,
  4327. /** User configured parameters for antenna diversity algorithm
  4328. * BIT[25..13]: Probe period (milliseconds units)
  4329. * BIT[12..0]: Stay period (milliseconds units)
  4330. */
  4331. WMI_PDEV_PARAM_ANT_DIV_USRCFG,
  4332. /** pdev packet power save levels,
  4333. * refer to WMI_PDEV_PKT_PWR_SAVE_LEVEL
  4334. */
  4335. WMI_PDEV_PARAM_PACKET_POWER_SAVE_LEVEL,
  4336. /** Define IOT pattern to be enabled/disabled
  4337. * bit values: 0 - disable, 1 - enable
  4338. * BIT[0..31]: each bit represents an IOT pattern
  4339. * -----
  4340. * Bit 0 - avoid SMPS with certain APs
  4341. * Bits 31:1 - reserved
  4342. */
  4343. WMI_PDEV_PARAM_SET_IOT_PATTERN,
  4344. /** ACK timeout - change wireless packet ack timeout configuration,
  4345. * units are microseconds
  4346. */
  4347. WMI_PDEV_PARAM_ACK_TIMEOUT,
  4348. /** Number of TX chains to use for a/b/g rates.
  4349. * bit 0~15 : 11b mode TX chain number.
  4350. * bit 16~31 : 11ag mode TX chain number.
  4351. */
  4352. WMI_PDEV_PARAM_ABG_MODE_TX_CHAIN_NUM,
  4353. /** Enable/Disable cck txfir override
  4354. * bit 0 - enable (1) or disable (0) CCK tx FIR
  4355. * bits 31:1 - unused / reserved (set to 0)
  4356. */
  4357. WMI_PDEV_PARAM_ENABLE_CCK_TXFIR_OVERRIDE,
  4358. } WMI_PDEV_PARAM;
  4359.  
  4360. typedef struct {
  4361. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_param_cmd_fixed_param */
  4362. /** pdev_id for identifying the MAC
  4363. * See macros starting with WMI_PDEV_ID_ for values.
  4364. */
  4365. A_UINT32 pdev_id;
  4366. /** parameter id */
  4367. A_UINT32 param_id; /* WMI_PDEV_PARAM */
  4368. /** parameter value */
  4369. A_UINT32 param_value;
  4370. } wmi_pdev_set_param_cmd_fixed_param;
  4371.  
  4372. /** MACRO define to set / get 11b and 11ag mode TX chain number:
  4373. * bit 0~15 : 11b mode TX chain number.
  4374. * bit 16~31: 11ag mode TX chain number.
  4375. */
  4376. #define WMI_PDEV_PARAM_11B_TX_CHAIN_NUM_S 0
  4377. #define WMI_PDEV_PARAM_11B_TX_CHAIN_NUM 0x0000FFFF
  4378. #define WMI_PDEV_PARAM_11AG_TX_CHAIN_NUM_S 16
  4379. #define WMI_PDEV_PARAM_11AG_TX_CHAIN_NUM 0xFFFF0000
  4380.  
  4381. #define WMI_PDEV_PARAM_GET_11B_TX_CHAIN_NUM(word32) WMI_F_MS(word32, WMI_PDEV_PARAM_11B_TX_CHAIN_NUM)
  4382. #define WMI_PDEV_PARAM_SET_11B_TX_CHAIN_NUM(word32, value) WMI_F_RMW(word32,value,WMI_PDEV_PARAM_11B_TX_CHAIN_NUM)
  4383.  
  4384. #define WMI_PDEV_PARAM_GET_11AG_TX_CHAIN_NUM(word32) WMI_F_MS(word32, WMI_PDEV_PARAM_11AG_TX_CHAIN_NUM)
  4385. #define WMI_PDEV_PARAM_SET_11AG_TX_CHAIN_NUM(word32, value) WMI_F_RMW(word32,value,WMI_PDEV_PARAM_11AG_TX_CHAIN_NUM)
  4386.  
  4387. /* param_value for param_id WMI_PDEV_PARAM_CTS_CBW */
  4388. typedef enum {
  4389. WMI_CTS_CBW_INVALID = 0,
  4390. WMI_CTS_CBW_20,
  4391. WMI_CTS_CBW_40,
  4392. WMI_CTS_CBW_80,
  4393. WMI_CTS_CBW_80_80,
  4394. WMI_CTS_CBW_160,
  4395. } WMI_CTS_CBW;
  4396.  
  4397. typedef struct {
  4398. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_tpc_config_cmd_fixed_param */
  4399. /** pdev_id for identifying the MAC
  4400. * See macros starting with WMI_PDEV_ID_ for values.
  4401. */
  4402. A_UINT32 pdev_id;
  4403. /** parameter */
  4404. A_UINT32 param;
  4405. } wmi_pdev_get_tpc_config_cmd_fixed_param;
  4406.  
  4407. typedef struct {
  4408. A_UINT32 tlv_header; /* WMITLV_TAG_STRUC_wmi_pdev_div_get_rssi_antid_fixed_param */
  4409. /** pdev_id for identifying the MAC */
  4410. A_UINT32 pdev_id;
  4411. /** RSSI (rssi_chain_x_pri20) on each chain (units: dB above noise floor) */
  4412. A_UINT32 chain_rssi[WMI_MAX_CHAINS];
  4413. /** index of the last-used antenna for each chain */
  4414. A_UINT32 ant_id[WMI_MAX_CHAINS];
  4415. /** mac address of diversity peer */
  4416. wmi_mac_addr macaddr;
  4417. } wmi_pdev_div_get_rssi_antid_fixed_param;
  4418.  
  4419. typedef struct {
  4420. A_UINT32 tlv_header; /* WMITLV_TAG_STRUC_wmi_pdev_bss_chan_info_request_fixed_param */
  4421. A_UINT32 param; /* 1 = read only, 2= read and clear */
  4422. } wmi_pdev_bss_chan_info_request_fixed_param;
  4423.  
  4424. #define WMI_FAST_DIVERSITY_BIT_OFFSET 0
  4425. #define WMI_SLOW_DIVERSITY_BIT_OFFSET 1
  4426.  
  4427. #define WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT 2
  4428. #define WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK (0xf << WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT)
  4429. #define WMI_SLOW_DIVERSITY_CH0_WEIGHT_GET_BITS(word32) \
  4430. (((word32) & WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK) >> WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT)
  4431. #define WMI_SLOW_DIVERSITY_CH0_WEIGHT_SET_BITS(word32, value) \
  4432. do { \
  4433. (word32) &= ~WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK; \
  4434. (word32) |= ((value) << WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT) & \
  4435. WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK; \
  4436. } while (0)
  4437.  
  4438. #define WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT 6
  4439. #define WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK (0xf << WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT)
  4440. #define WMI_SLOW_DIVERSITY_CH1_WEIGHT_GET_BITS(word32) \
  4441. (((word32) & WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK) >> WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT)
  4442. #define WMI_SLOW_DIVERSITY_CH1_WEIGHT_SET_BITS(word32, value) \
  4443. do { \
  4444. (word32) &= ~WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK; \
  4445. (word32) |= ((value) << WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT) & \
  4446. WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK; \
  4447. } while (0)
  4448.  
  4449. typedef struct {
  4450. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_antenna_diversity_cmd_fixed_param */
  4451. union {
  4452. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  4453. /** pdev_id for identifying the MAC
  4454. * See macros starting with WMI_PDEV_ID_ for values.
  4455. */
  4456. A_UINT32 pdev_id;
  4457. };
  4458. /**
  4459. * The following "value" field is divided into bit fields as follows:
  4460. * bits | purpose
  4461. * -----+---------------------------------------
  4462. * 0 | enable/disable FAST diversity
  4463. * 1 | enable/disable SLOW diversity
  4464. * 5:2 | chain0 slow-diversity weighting factor
  4465. * 9:6 | chain1 slow-diversity weighting factor
  4466. * 31:10| currenty unused (set to 0x0)
  4467. * Refer to the above WMI_[FAST/SLOW]_DIVERSITY constants.
  4468. */
  4469. A_UINT32 value;
  4470. } wmi_pdev_set_antenna_diversity_cmd_fixed_param;
  4471.  
  4472. #define WMI_MAX_RSSI_THRESHOLD_SUPPORTED 3
  4473.  
  4474. typedef struct {
  4475. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rssi_breach_monitor_config_cmd_fixed_param */
  4476. A_UINT32 vdev_id; /* vdev_id, where RSSI monitoring will take place */
  4477. A_UINT32 request_id; /* host will configure request_id and firmware echo this id in RSSI_BREACH_EVENT */
  4478. A_UINT32 enabled_bitmap; /* bit [0-2] = low_rssi_breach_enabled[0-2] enabled, bit [3-5] = hi_rssi_breach_enabled[0-2] */
  4479. A_UINT32 low_rssi_breach_threshold[WMI_MAX_RSSI_THRESHOLD_SUPPORTED]; /* unit dBm. host driver to make sure [0] > [1] > [2] */
  4480. A_UINT32 hi_rssi_breach_threshold[WMI_MAX_RSSI_THRESHOLD_SUPPORTED]; /* unit dBm. host driver to make sure [0] < [1] < [2] */
  4481. A_UINT32 lo_rssi_reenable_hysteresis; /* unit dBm. once low rssi[] breached, same event bitmap will be generated only after signal gets better than this level. This value is adopted for all low_rssi_breach_threshold[3] */
  4482. A_UINT32 hi_rssi_reenable_histeresis;/* unit dBm. once hi rssi[] breached, same event bitmap will be generated only after signal gets worse than this level. This value is adopted for all hi_rssi_breach_threshold[3] */
  4483. A_UINT32 min_report_interval; /* After last event is generated, we wait until this interval to generate next event */
  4484. A_UINT32 max_num_report; /* this is to suppress number of event to be generated */
  4485. } wmi_rssi_breach_monitor_config_fixed_param;
  4486.  
  4487. typedef struct {
  4488. /** parameter */
  4489. A_UINT32 param;
  4490. } wmi_pdev_dump_cmd;
  4491.  
  4492. typedef enum {
  4493. PAUSE_TYPE_CHOP = 0x1, /** for MCC (switch channel), only vdev_map is valid */
  4494. PAUSE_TYPE_PS = 0x2, /** for peer station sleep in sap mode, only peer_id is valid */
  4495. PAUSE_TYPE_UAPSD = 0x3, /** for uapsd, only peer_id and tid_map are valid. */
  4496. PAUSE_TYPE_P2P_CLIENT_NOA = 0x4, /** only vdev_map is valid, actually only one vdev id is set at one time */
  4497. PAUSE_TYPE_P2P_GO_PS = 0x5, /** only vdev_map is valid, actually only one vdev id is set at one time */
  4498. PAUSE_TYPE_STA_ADD_BA = 0x6, /** only peer_id and tid_map are valid, actually only one tid is set at one time */
  4499. PAUSE_TYPE_AP_PS = 0x7, /** for pausing AP vdev when all the connected clients are in PS. only vdev_map is valid */
  4500. PAUSE_TYPE_IBSS_PS = 0x8, /** for pausing IBSS vdev when all the peers are in PS. only vdev_map is valid */
  4501. PAUSE_TYPE_CHOP_TDLS_OFFCHAN = 0x9, /** for TDLS offchannel MCC (switch channel), only vdev_map is valid, TDLS connection tracker needs to be notified */
  4502.  
  4503. PAUSE_TYPE_HOST = 0x15, /* host is requesting vdev pause */
  4504. } wmi_tx_pause_type;
  4505.  
  4506. typedef enum {
  4507. ACTION_PAUSE = 0x0,
  4508. ACTION_UNPAUSE = 0x1,
  4509. } wmi_tx_pause_action;
  4510.  
  4511. typedef struct {
  4512. A_UINT32 tlv_header;
  4513. A_UINT32 pause_type;
  4514. A_UINT32 action;
  4515. A_UINT32 vdev_map;
  4516. A_UINT32 peer_id;
  4517. A_UINT32 tid_map;
  4518. } wmi_tx_pause_event_fixed_param;
  4519.  
  4520. typedef enum {
  4521. WMI_MGMT_TX_COMP_TYPE_COMPLETE_OK = 0,
  4522. WMI_MGMT_TX_COMP_TYPE_DISCARD,
  4523. WMI_MGMT_TX_COMP_TYPE_INSPECT,
  4524. WMI_MGMT_TX_COMP_TYPE_COMPLETE_NO_ACK,
  4525. WMI_MGMT_TX_COMP_TYPE_MAX,
  4526. } WMI_MGMT_TX_COMP_STATUS_TYPE;
  4527.  
  4528. typedef struct {
  4529. A_UINT32 tlv_header;
  4530. A_UINT32 desc_id; /* from tx_send_cmd */
  4531. A_UINT32 status; /* WMI_MGMT_TX_COMP_STATUS_TYPE */
  4532. /** pdev_id for identifying the MAC that transmitted the mgmt frame
  4533. * See macros starting with WMI_PDEV_ID_ for values.
  4534. */
  4535. A_UINT32 pdev_id;
  4536. } wmi_mgmt_tx_compl_event_fixed_param;
  4537.  
  4538. typedef struct {
  4539. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offchan_data_tx_compl_event_fixed_param */
  4540. A_UINT32 desc_id; /* from tx_send_cmd */
  4541. A_UINT32 status; /* same status as WMI_MGMT_TX_COMP_STATUS_TYPE */
  4542. /** pdev_id for identifying the MAC that transmitted the mgmt frame
  4543. * See macros starting with WMI_PDEV_ID_ for values.
  4544. */
  4545. A_UINT32 pdev_id;
  4546. } wmi_offchan_data_tx_compl_event_fixed_param;
  4547.  
  4548. typedef struct {
  4549. A_UINT32 tlv_header;
  4550. A_UINT32 num_reports;
  4551. /* tlv for completion
  4552. * A_UINT32 desc_ids[num_reports]; <- from tx_send_cmd
  4553. * A_UINT32 status[num_reports]; <- WMI_MGMT_TX_COMP_STATUS_TYPE
  4554. */
  4555. } wmi_mgmt_tx_compl_bundle_event_fixed_param;
  4556.  
  4557. #define WMI_TPC_RATE_MAX 160
  4558. /* WMI_TPC_TX_NUM_CHAIN macro can't be changed without breaking the WMI compatibility */
  4559. #define WMI_TPC_TX_NUM_CHAIN 4
  4560.  
  4561. typedef enum {
  4562. WMI_TPC_CONFIG_EVENT_FLAG_TABLE_CDD = 0x1,
  4563. WMI_TPC_CONFIG_EVENT_FLAG_TABLE_STBC = 0x2,
  4564. WMI_TPC_CONFIG_EVENT_FLAG_TABLE_TXBF = 0x4,
  4565. } WMI_TPC_CONFIG_EVENT_FLAG;
  4566.  
  4567. typedef struct {
  4568. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_tpc_config_event_fixed_param */
  4569. A_UINT32 regDomain;
  4570. A_UINT32 chanFreq;
  4571. A_UINT32 phyMode;
  4572. A_UINT32 twiceAntennaReduction;
  4573. A_UINT32 twiceMaxRDPower;
  4574. A_INT32 twiceAntennaGain;
  4575. A_UINT32 powerLimit;
  4576. A_UINT32 rateMax;
  4577. A_UINT32 numTxChain;
  4578. A_UINT32 ctl;
  4579. A_UINT32 flags;
  4580. /* WMI_TPC_TX_NUM_CHAIN macro can't be changed without breaking the WMI compatibility */
  4581. A_INT8 maxRegAllowedPower[WMI_TPC_TX_NUM_CHAIN];
  4582. A_INT8 maxRegAllowedPowerAGCDD[WMI_TPC_TX_NUM_CHAIN][WMI_TPC_TX_NUM_CHAIN];
  4583. A_INT8 maxRegAllowedPowerAGSTBC[WMI_TPC_TX_NUM_CHAIN][WMI_TPC_TX_NUM_CHAIN];
  4584. A_INT8 maxRegAllowedPowerAGTXBF[WMI_TPC_TX_NUM_CHAIN][WMI_TPC_TX_NUM_CHAIN];
  4585. /** pdev_id for identifying the MAC
  4586. * See macros starting with WMI_PDEV_ID_ for values.
  4587. */
  4588. A_UINT32 pdev_id;
  4589. /* This TLV is followed by a byte array:
  4590. * A_UINT8 ratesArray[];
  4591. */
  4592. } wmi_pdev_tpc_config_event_fixed_param;
  4593.  
  4594. typedef struct {
  4595. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_div_rssi_antid_event_fixed_param */
  4596. A_UINT32 tlv_header;
  4597. /** how many elements in the MAX_CHAINS arrays below contain valid info */
  4598. A_UINT32 num_chains_valid;
  4599. /** RSSI (rssi_chain_x_pri20) on each chain (units: dB above noise floor) */
  4600. A_UINT32 chain_rssi[WMI_MAX_CHAINS];
  4601. /** index of the last-used antenna for each chain */
  4602. A_UINT32 ant_id[WMI_MAX_CHAINS];
  4603. /** mac address of diversity peer */
  4604. wmi_mac_addr macaddr;
  4605. } wmi_pdev_div_rssi_antid_event_fixed_param;
  4606.  
  4607. typedef struct {
  4608. A_UINT32 tlv_header; /* WMITLV_TAG_STRUC_wmi_pdev_bss_chan_info_event_fixed_param */
  4609. A_UINT32 freq; /* Units in MHz */
  4610. A_INT32 noise_floor; /* units are dBm */
  4611.  
  4612. /* rx clear - how often the channel was unused */
  4613. A_UINT32 rx_clear_count_low; /* low 31 bits of rx_clear cnt in 64bits format */
  4614. A_UINT32 rx_clear_count_high; /* high 31 bits of rx_clear cnt in 64bits format */
  4615.  
  4616. /* cycle count - elapsed time during the measured period, in clock ticks */
  4617. A_UINT32 cycle_count_low; /* low 31 bits of cycle cnt in 64bits format */
  4618. A_UINT32 cycle_count_high; /* high 31 bits of cycle cnt in 64bits format */
  4619.  
  4620. /* tx cycle count - elapsed time spent in tx, in clock ticks */
  4621. A_UINT32 tx_cycle_count_low; /* low 31 bits of tx_cycle cnt in 64bits format */
  4622. A_UINT32 tx_cycle_count_high; /* high 31 bits of tx_cycle cnt in 64bits format */
  4623.  
  4624. /* rx cycle count - elapsed time spent in rx, in clock ticks */
  4625. A_UINT32 rx_cycle_count_low; /* low 31 bits of rx_cycle cnt in 64bits format */
  4626. A_UINT32 rx_cycle_count_high; /* high 31 bits of rx_cycle cnt in 64bits format */
  4627.  
  4628. A_UINT32 rx_bss_cycle_count_low; /* low 31 bits of rx cycle cnt for my bss in 64bits format */
  4629. A_UINT32 rx_bss_cycle_count_high; /* high 31 bits of rx_cycle cnt for my bss in 64bits format */
  4630. } wmi_pdev_bss_chan_info_event_fixed_param;
  4631.  
  4632. typedef struct {
  4633. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_l1ss_track_event_fixed_param */
  4634. A_UINT32 periodCnt;
  4635. A_UINT32 L1Cnt;
  4636. A_UINT32 L11Cnt;
  4637. A_UINT32 L12Cnt;
  4638. A_UINT32 L1Entry;
  4639. A_UINT32 L11Entry;
  4640. A_UINT32 L12Entry;
  4641. /** pdev_id for identifying the MAC
  4642. * See macros starting with WMI_PDEV_ID_ for values.
  4643. */
  4644. A_UINT32 pdev_id;
  4645. } wmi_pdev_l1ss_track_event_fixed_param;
  4646.  
  4647. typedef struct {
  4648. A_UINT32 len;
  4649. A_UINT32 msgref;
  4650. A_UINT32 segmentInfo;
  4651. } wmi_pdev_seg_hdr_info;
  4652.  
  4653.  
  4654. /*
  4655. * Transmit power scale factor.
  4656. *
  4657. */
  4658. typedef enum {
  4659. WMI_TP_SCALE_MAX = 0, /* no scaling (default) */
  4660. WMI_TP_SCALE_50 = 1, /* 50% of max (-3 dBm) */
  4661. WMI_TP_SCALE_25 = 2, /* 25% of max (-6 dBm) */
  4662. WMI_TP_SCALE_12 = 3, /* 12% of max (-9 dBm) */
  4663. WMI_TP_SCALE_MIN = 4, /* min, but still on */
  4664. WMI_TP_SCALE_SIZE = 5, /* max num of enum */
  4665. } WMI_TP_SCALE;
  4666.  
  4667. #define WMI_MAX_DEBUG_MESG (sizeof(A_UINT32) * 32)
  4668.  
  4669. typedef struct {
  4670. /** message buffer, NULL terminated */
  4671. char bufp[WMI_MAX_DEBUG_MESG];
  4672. } wmi_debug_mesg_event;
  4673.  
  4674. enum {
  4675. /** P2P device */
  4676. VDEV_SUBTYPE_P2PDEV = 0,
  4677. /** P2P client */
  4678. VDEV_SUBTYPE_P2PCLI,
  4679. /** P2P GO */
  4680. VDEV_SUBTYPE_P2PGO,
  4681. /** BT3.0 HS */
  4682. VDEV_SUBTYPE_BT,
  4683. };
  4684.  
  4685. typedef struct {
  4686. /** idnore power , only use flags , mode and freq */
  4687. wmi_channel chan;
  4688. } wmi_pdev_set_channel_cmd;
  4689.  
  4690. typedef enum {
  4691. WMI_PKTLOG_EVENT_RX = 0x1,
  4692. WMI_PKTLOG_EVENT_TX = 0x2,
  4693. WMI_PKTLOG_EVENT_RCF = 0x4, /* Rate Control Find */
  4694. WMI_PKTLOG_EVENT_RCU = 0x8, /* Rate Control Update */
  4695. /* 0x10 used by deprecated DBG_PRINT */
  4696. WMI_PKTLOG_EVENT_SMART_ANTENNA = 0x20, /* To support Smart Antenna */
  4697. WMI_PKTLOG_EVENT_SW = 0x40, /* To support SW defined events */
  4698. } WMI_PKTLOG_EVENT;
  4699.  
  4700. typedef enum {
  4701. WMI_PKTLOG_ENABLE_AUTO = 0, /* (default) FW will decide under what conditions to enable pktlog */
  4702. WMI_PKTLOG_ENABLE_FORCE = 1, /* pktlog unconditionally enabled */
  4703. } WMI_PKTLOG_ENABLE;
  4704.  
  4705. typedef struct {
  4706. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_pktlog_enable_cmd_fixed_param */
  4707. /** pdev_id for identifying the MAC
  4708. * See macros starting with WMI_PDEV_ID_ for values.
  4709. */
  4710. A_UINT32 pdev_id;
  4711. A_UINT32 evlist; /* WMI_PKTLOG_EVENT */
  4712. A_UINT32 enable; /* WMI_PKTLOG_ENABLE */
  4713. } wmi_pdev_pktlog_enable_cmd_fixed_param;
  4714.  
  4715. typedef struct {
  4716. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_pktlog_disable_cmd_fixed_param */
  4717. /** pdev_id for identifying the MAC
  4718. * See macros starting with WMI_PDEV_ID_ for values.
  4719. */
  4720. A_UINT32 pdev_id;
  4721. } wmi_pdev_pktlog_disable_cmd_fixed_param;
  4722.  
  4723. typedef struct {
  4724. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mib_stats_enable_cmd_fixed_param */
  4725. /** pdev_id for identifying the MAC
  4726. * See macros starting with WMI_PDEV_ID_ for values.
  4727. */
  4728. A_UINT32 pdev_id;
  4729. A_UINT32 enable_Mib; /** enable for mib stats collection. Stats are delivered to host in wmi_mib_stats structure.
  4730. * If enable_Mib=1, stats collection is enabled. If enable_Mib=0, stats collection does not happen */
  4731. } wmi_mib_stats_enable_cmd_fixed_param;
  4732.  
  4733. /** Customize the DSCP (bit) to TID (0-7) mapping for QOS.
  4734. * NOTE: This constant cannot be changed without breaking
  4735. * WMI Compatibility. */
  4736.  
  4737. #define WMI_DSCP_MAP_MAX (64)
  4738. /*
  4739. * @brief dscp_tid_map_cmdid - command to send the dscp to tid map to the target
  4740. * @details
  4741. * Create an API for sending the custom DSCP-to-TID map to the target
  4742. * If this is a request from the user space or from above the UMAC
  4743. * then the best place to implement this is in the umac_if_offload of the OL path.
  4744. * Provide a place holder for this API in the ieee80211com (ic).
  4745. *
  4746. * This API will be a function pointer in the ieee80211com (ic). Any user space calls for manually setting the DSCP-to-TID mapping
  4747. * in the target should be directed to the function pointer in the ic.
  4748. *
  4749. * Implementation details of the API to send the map to the target are as described-
  4750. *
  4751. * 1. The function will have 2 arguments- struct ieee80211com, DSCP-to-TID map.
  4752. * DSCP-to-TID map is a one dimensional u_int32_t array of length 64 to accomodate
  4753. * 64 TID values for 2^6 (64) DSCP ids.
  4754. * Example:
  4755. * A_UINT32 dscp_tid_map[WMI_DSCP_MAP_MAX] = {
  4756. * 0, 0, 0, 0, 0, 0, 0, 0,
  4757. * 1, 1, 1, 1, 1, 1, 1, 1,
  4758. * 2, 2, 2, 2, 2, 2, 2, 2,
  4759. * 3, 3, 3, 3, 3, 3, 3, 3,
  4760. * 4, 4, 4, 4, 4, 4, 4, 4,
  4761. * 5, 5, 5, 5, 5, 5, 5, 5,
  4762. * 6, 6, 6, 6, 6, 6, 6, 6,
  4763. * 7, 7, 7, 7, 7, 7, 7, 7,
  4764. * };
  4765. *
  4766. * 2. Request for the WMI buffer of size equal to the size of the DSCP-to-TID map.
  4767. *
  4768. * 3. Copy the DSCP-to-TID map into the WMI buffer.
  4769. *
  4770. * 4. Invoke the wmi_unified_cmd_send to send the cmd buffer to the target with the
  4771. * WMI_PDEV_SET_DSCP_TID_MAP_CMDID. Arguments to the wmi send cmd API
  4772. * (wmi_unified_send_cmd) are wmi handle, cmd buffer, length of the cmd buffer and
  4773. * the WMI_PDEV_SET_DSCP_TID_MAP_CMDID id.
  4774. *
  4775. */
  4776. /* DEPRECATED - use VDEV level command instead
  4777. * (wmi_vdev_set_dscp_tid_map_cmd_fixed_param)
  4778. */
  4779. typedef struct {
  4780. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_dscp_tid_map_cmd_fixed_param */
  4781. A_UINT32 reserved0; /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
  4782. /* map indicating DSCP to TID conversion */
  4783. A_UINT32 dscp_to_tid_map[WMI_DSCP_MAP_MAX];
  4784. } wmi_pdev_set_dscp_tid_map_cmd_fixed_param;
  4785.  
  4786. typedef struct {
  4787. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_dscp_tid_map_cmd_fixed_param */
  4788. A_UINT32 vdev_id;
  4789. /** map indicating DSCP to TID conversion */
  4790. A_UINT32 dscp_to_tid_map[WMI_DSCP_MAP_MAX];
  4791. A_UINT32 enable_override;
  4792. } wmi_vdev_set_dscp_tid_map_cmd_fixed_param;
  4793.  
  4794. enum WMI_WAKE_GPIO_TYPE {
  4795. WMI_WAKE_GPIO_LOW = 1,
  4796. WMI_WAKE_GPIO_HIGH = 2,
  4797. WMI_WAKE_GPIO_RISING_EDGE = 3,
  4798. WMI_WAKE_GPIO_FALLING_EDGE = 4,
  4799. };
  4800.  
  4801. /**
  4802. * Set GPIO numbers used to wakeup host and wakeup target.
  4803. */
  4804. typedef struct {
  4805. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_PDEV_SET_WAKEUP_CONFIG_CMDID_fixed_param */
  4806. A_UINT32 host_wakeup_gpio; /* gpio num used to wakeup host, 0xff disable wakeup gpio */
  4807. A_UINT32 host_wakeup_type; /* refer to WMI_WAKE_GPIO_TYPE */
  4808. A_UINT32 target_wakeup_gpio; /* gpio num used to wakeup target, 0xff disable wakeup gpio */
  4809. A_UINT32 target_wakeup_type; /* refer to WMI_WAKE_GPIO_TYPE */
  4810. } WMI_PDEV_SET_WAKEUP_CONFIG_CMDID_fixed_param;
  4811.  
  4812. /** Fixed rate (rate-code) for broadcast/ multicast data frames */
  4813. /* @brief bcast_mcast_data_rate - set the rates for the bcast/ mcast frames
  4814. * @details
  4815. * Create an API for setting the custom rate for the MCAST and BCAST frames
  4816. * in the target. If this is a request from the user space or from above the UMAC
  4817. * then the best place to implement this is in the umac_if_offload of the OL path.
  4818. * Provide a place holder for this API in the ieee80211com (ic).
  4819. *
  4820. * Implementation details of the API to set custom rates for MCAST and BCAST in
  4821. * the target are as described-
  4822. *
  4823. * 1. The function will have 3 arguments-
  4824. * vap structure,
  4825. * MCAST/ BCAST identifier code,
  4826. * 8 bit rate code
  4827. *
  4828. * The rate-code is a 1-byte field in which:for given rate, nss and preamble
  4829. * b'7-b-6 indicate the preamble (0 OFDM, 1 CCK, 2, HT, 3 VHT)
  4830. * b'5-b'4 indicate the NSS (0 - 1x1, 1 - 2x2, 2 - 3x3)
  4831. * b'3-b'0 indicate the rate, which is indicated as follows:
  4832. * OFDM : 0: OFDM 48 Mbps
  4833. * 1: OFDM 24 Mbps
  4834. * 2: OFDM 12 Mbps
  4835. * 3: OFDM 6 Mbps
  4836. * 4: OFDM 54 Mbps
  4837. * 5: OFDM 36 Mbps
  4838. * 6: OFDM 18 Mbps
  4839. * 7: OFDM 9 Mbps
  4840. * CCK (pream == 1)
  4841. * 0: CCK 11 Mbps Long
  4842. * 1: CCK 5.5 Mbps Long
  4843. * 2: CCK 2 Mbps Long
  4844. * 3: CCK 1 Mbps Long
  4845. * 4: CCK 11 Mbps Short
  4846. * 5: CCK 5.5 Mbps Short
  4847. * 6: CCK 2 Mbps Short
  4848. * HT/VHT (pream == 2/3)
  4849. * 0..7: MCS0..MCS7 (HT)
  4850. * 0..9: MCS0..MCS9 (VHT)
  4851. *
  4852. * 2. Invoke the wmi_unified_vdev_set_param_send to send the rate value
  4853. * to the target.
  4854. * Arguments to the API are-
  4855. * wmi handle,
  4856. * VAP interface id (av_if_id) defined in ol_ath_vap_net80211,
  4857. * WMI_VDEV_PARAM_BCAST_DATA_RATE/ WMI_VDEV_PARAM_MCAST_DATA_RATE,
  4858. * rate value.
  4859. */
  4860. typedef enum {
  4861. WMI_SET_MCAST_RATE,
  4862. WMI_SET_BCAST_RATE
  4863. } MCAST_BCAST_RATE_ID;
  4864.  
  4865. typedef struct {
  4866. MCAST_BCAST_RATE_ID rate_id;
  4867. A_UINT32 rate;
  4868. } mcast_bcast_rate;
  4869.  
  4870. typedef struct {
  4871. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wmm_params */
  4872. A_UINT32 cwmin;
  4873. A_UINT32 cwmax;
  4874. A_UINT32 aifs;
  4875. A_UINT32 txoplimit;
  4876. A_UINT32 acm;
  4877. A_UINT32 no_ack;
  4878. } wmi_wmm_params;
  4879.  
  4880. /* DEPRECATED - use VDEV level command instead
  4881. * (wmi_vdev_set_wmm_params_cmd_fixed_param)
  4882. */
  4883. typedef struct {
  4884. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_wmm_params_cmd_fixed_param */
  4885. A_UINT32 reserved0; /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
  4886. A_UINT32 dg_type;
  4887.  
  4888. /* The TLVs for the 4 AC follows:
  4889. * wmi_wmm_params wmm_params_ac_be;
  4890. * wmi_wmm_params wmm_params_ac_bk;
  4891. * wmi_wmm_params wmm_params_ac_vi;
  4892. * wmi_wmm_params wmm_params_ac_vo;
  4893. */
  4894. } wmi_pdev_set_wmm_params_cmd_fixed_param;
  4895.  
  4896. typedef enum {
  4897. WMI_REQUEST_PEER_STAT = 0x01,
  4898. WMI_REQUEST_AP_STAT = 0x02,
  4899. WMI_REQUEST_PDEV_STAT = 0x04,
  4900. WMI_REQUEST_VDEV_STAT = 0x08,
  4901. WMI_REQUEST_BCNFLT_STAT = 0x10,
  4902. WMI_REQUEST_VDEV_RATE_STAT = 0x20,
  4903. WMI_REQUEST_INST_STAT = 0x40,
  4904. WMI_REQUEST_MIB_STAT = 0x80,
  4905. WMI_REQUEST_RSSI_PER_CHAIN_STAT = 0x100,
  4906. WMI_REQUEST_CONGESTION_STAT = 0x200,
  4907. WMI_REQUEST_PEER_EXTD_STAT = 0x400,
  4908. } wmi_stats_id;
  4909.  
  4910. /*
  4911. * cfg_retry_count is set to max number of times the AP should try sending
  4912. * QoS Null frames to the STA for measuring the instantaneous RSSI
  4913. *
  4914. * retry_count is used to maintain the number of times the AP has tried sending
  4915. * QoS Null frames to the STA for measuring the instantaneous RSSI
  4916. */
  4917. typedef struct {
  4918. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_stats_cmd_sub_struc_param */
  4919. A_UINT32 cfg_retry_count;
  4920. A_UINT32 retry_count;
  4921. } wmi_inst_rssi_stats_params;
  4922.  
  4923. typedef struct {
  4924. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_stats_cmd_fixed_param */
  4925. wmi_stats_id stats_id;
  4926. /** unique id identifying the VDEV, generated by the caller */
  4927. A_UINT32 vdev_id;
  4928. /** peer MAC address */
  4929. wmi_mac_addr peer_macaddr;
  4930. /*
  4931. * This TLV is (optionally) followed by other TLVs:
  4932. * wmi_inst_rssi_stats_params inst_rssi_params;
  4933. */
  4934. } wmi_request_stats_cmd_fixed_param;
  4935.  
  4936. /* stats type bitmap */
  4937. #define WMI_LINK_STATS_RADIO 0x00000001
  4938. #define WMI_LINK_STATS_IFACE 0x00000002
  4939. #define WMI_LINK_STATS_ALL_PEER 0x00000004
  4940. #define WMI_LINK_STATS_PER_PEER 0x00000008
  4941.  
  4942.  
  4943. /* wifi clear statistics bitmap */
  4944. #define WIFI_STATS_RADIO 0x00000001 /** all radio statistics */
  4945. #define WIFI_STATS_RADIO_CCA 0x00000002 /** cca_busy_time (within radio statistics) */
  4946. #define WIFI_STATS_RADIO_CHANNELS 0x00000004 /** all channel statistics (within radio statistics) */
  4947. #define WIFI_STATS_RADIO_SCAN 0x00000008 /** all scan statistics (within radio statistics) */
  4948. #define WIFI_STATS_IFACE 0x00000010 /** all interface statistics */
  4949. #define WIFI_STATS_IFACE_TXRATE 0x00000020 /** all tx rate statistics (within interface statistics) */
  4950. #define WIFI_STATS_IFACE_AC 0x00000040 /** all ac statistics (within interface statistics) */
  4951. #define WIFI_STATS_IFACE_CONTENTION 0x00000080 /** all contention (min, max, avg) statistics (within ac statisctics) */
  4952. #define WMI_STATS_IFACE_ALL_PEER 0x00000100 /** All peer stats on this interface */
  4953. #define WMI_STATS_IFACE_PER_PEER 0x00000200 /** Clear particular peer stats depending on the peer_mac */
  4954.  
  4955. /** Default value for stats if the stats collection has not started */
  4956. #define WMI_STATS_VALUE_INVALID 0xffffffff
  4957.  
  4958. #define WMI_DIAG_ID_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 0, 16)
  4959. #define WMI_DIAG_ID_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 0, 16, value)
  4960. #define WMI_DIAG_TYPE_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 16, 1)
  4961. #define WMI_DIAG_TYPE_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 16, 1, value)
  4962. #define WMI_DIAG_ID_ENABLED_DISABLED_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 17, 1)
  4963. #define WMI_DIAG_ID_ENABLED_DISABLED_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 17, 1, value)
  4964.  
  4965. typedef struct {
  4966. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_diag_event_log_config_fixed_param */
  4967. A_UINT32 num_of_diag_events_logs;
  4968. /* The TLVs will follow.
  4969. * A_UINT32 diag_events_logs_list[]; 0-15 Bits Diag EVENT/LOG ID,
  4970. * Bit 16 - DIAG type EVENT/LOG, 0 - Event, 1 - LOG
  4971. * Bit 17 Indicate if the DIAG type is Enabled/Disabled.
  4972. */
  4973. } wmi_diag_event_log_config_fixed_param;
  4974.  
  4975. #define WMI_DIAG_FREQUENCY_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 17, 1)
  4976. #define WMI_DIAG_FREQUENCY_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 17, 1, value)
  4977. #define WMI_DIAG_EXT_FEATURE_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 18, 1)
  4978. #define WMI_DIAG_EXT_FEATURE_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 18, 1, value)
  4979.  
  4980. typedef struct {
  4981. A_UINT32 tlv_header;
  4982. A_UINT32 num_of_diag_events_logs;
  4983. /* The TLVs will follow.
  4984. * A_UINT32 diag_events_logs_list[]; 0-15 Bits Diag EVENT/LOG ID,
  4985. * Bit 16 - DIAG type EVENT/LOG, 0 - Event, 1 - LOG
  4986. * Bit 17 - Frequncy of the DIAG EVENT/LOG High Frequency -1, Low Frequency - 0
  4987. * Bit 18 - Set if the EVENTS/LOGs are used for EXT DEBUG Framework
  4988. */
  4989. } wmi_diag_event_log_supported_event_fixed_params;
  4990.  
  4991. typedef struct {
  4992. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_debug_mesg_flush_fixed_param*/
  4993. A_UINT32 reserved0; /** placeholder for future */
  4994. } wmi_debug_mesg_flush_fixed_param;
  4995.  
  4996. typedef struct {
  4997. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_debug_mesg_flush_complete_fixed_param*/
  4998. A_UINT32 reserved0; /** placeholder for future */
  4999. } wmi_debug_mesg_flush_complete_fixed_param;
  5000.  
  5001. typedef struct {
  5002. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rssi_breach_fixed_param */
  5003. /* vdev_id, where RSSI breach event occurred */
  5004. A_UINT32 vdev_id;
  5005. /* request id */
  5006. A_UINT32 request_id;
  5007. /* bitmap[0-2] is corresponding to low_rssi[0-2]. bitmap[3-5] is corresponding to hi_rssi[0-2]*/
  5008. A_UINT32 event_bitmap;
  5009. /* rssi at the time of RSSI breach. Unit dBm */
  5010. A_UINT32 rssi;
  5011. /* bssid of the monitored AP's */
  5012. wmi_mac_addr bssid;
  5013. } wmi_rssi_breach_event_fixed_param;
  5014.  
  5015. typedef struct {
  5016. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_fw_mem_dump */
  5017. /** unique id identifying the segment */
  5018. A_UINT32 seg_id;
  5019. /** Start address of the segment to be read */
  5020. A_UINT32 seg_start_addr_lo;
  5021. A_UINT32 seg_start_addr_hi;
  5022. /** Length of the segment to be read */
  5023. A_UINT32 seg_length;
  5024. /** Host bufeer address to which the segment will be read and dumped */
  5025. A_UINT32 dest_addr_lo;
  5026. A_UINT32 dest_addr_hi;
  5027. } wmi_fw_mem_dump;
  5028.  
  5029. /* Command to get firmware memory dump*/
  5030. typedef struct {
  5031. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_get_fw_mem_dump_fixed_param */
  5032. /** unique id identifying the request */
  5033. A_UINT32 request_id;
  5034. /** number of memory dump segments */
  5035. A_UINT32 num_fw_mem_dump_segs;
  5036. /**
  5037. * This TLV is followed by another TLV
  5038. * wmi_fw_mem_dump fw_mem_dump[];
  5039. */
  5040. } wmi_get_fw_mem_dump_fixed_param;
  5041.  
  5042. /** Event to indicate the completion of fw mem dump */
  5043. typedef struct {
  5044. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_update_fw_mem_dump_fixed_param */
  5045. /** unique id identifying the request, given in the request stats command */
  5046. A_UINT32 request_id;
  5047. /*In case of Firmware memory dump */
  5048. A_UINT32 fw_mem_dump_complete;
  5049. } wmi_update_fw_mem_dump_fixed_param;
  5050.  
  5051.  
  5052. typedef enum {
  5053. WMI_ROAMING_IDLE = 0,
  5054. WMI_ROAMING_ACTIVE = 1,
  5055. } wmi_roam_state;
  5056.  
  5057. /* access categories */
  5058. typedef enum {
  5059. WMI_AC_VO = 0,
  5060. WMI_AC_VI = 1,
  5061. WMI_AC_BE = 2,
  5062. WMI_AC_BK = 3,
  5063. WMI_AC_MAX = 4,
  5064. } wmi_traffic_ac;
  5065.  
  5066. typedef enum {
  5067. WMI_STA_STATS = 0,
  5068. WMI_SOFTAP_STATS = 1,
  5069. WMI_IBSS_STATS = 2,
  5070. WMI_P2P_CLIENT_STATS = 3,
  5071. WMI_P2P_GO_STATS = 4,
  5072. WMI_NAN_STATS = 5,
  5073. WMI_MESH_STATS = 6,
  5074. } wmi_link_iface_type;
  5075.  
  5076. /* channel operating width */
  5077. typedef enum {
  5078. WMI_CHAN_WIDTH_20 = 0,
  5079. WMI_CHAN_WIDTH_40 = 1,
  5080. WMI_CHAN_WIDTH_80 = 2,
  5081. WMI_CHAN_WIDTH_160 = 3,
  5082. WMI_CHAN_WIDTH_80P80 = 4,
  5083. WMI_CHAN_WIDTH_5 = 5,
  5084. WMI_CHAN_WIDTH_10 = 6,
  5085. } wmi_channel_width;
  5086.  
  5087. /*Clear stats*/
  5088. typedef struct {
  5089. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_clear_link_stats_cmd_fixed_param */
  5090. /** unique id identifying the VDEV, generated by the caller */
  5091. A_UINT32 vdev_id;
  5092. /** stop_stats_collection_req = 1 will imply stop the statistics collection */
  5093. A_UINT32 stop_stats_collection_req;
  5094. /** identifies what stats to be cleared */
  5095. A_UINT32 stats_clear_req_mask;
  5096. /** identifies which peer stats to be cleared. Valid only while clearing PER_REER */
  5097. wmi_mac_addr peer_macaddr;
  5098. } wmi_clear_link_stats_cmd_fixed_param;
  5099.  
  5100. /* Link Stats configuration params. Trigger the link layer statistics collection*/
  5101. typedef struct {
  5102. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_start_link_stats_cmd_fixed_param */
  5103. /** threshold to classify the pkts as short or long */
  5104. A_UINT32 mpdu_size_threshold;
  5105. /** set for field debug mode. Driver should collect all statistics regardless of performance impact.*/
  5106. A_UINT32 aggressive_statistics_gathering;
  5107. } wmi_start_link_stats_cmd_fixed_param;
  5108.  
  5109. typedef struct {
  5110. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_link_stats_cmd_fixed_param */
  5111. /** Type of stats required. This is a bitmask WMI_LINK_STATS_RADIO, WMI_LINK_STATS_IFACE */
  5112. A_UINT32 stats_type;
  5113. /** unique id identifying the VDEV, generated by the caller */
  5114. A_UINT32 vdev_id;
  5115. /** unique id identifying the request, generated by the caller */
  5116. A_UINT32 request_id;
  5117. /** peer MAC address */
  5118. wmi_mac_addr peer_macaddr;
  5119. } wmi_request_link_stats_cmd_fixed_param;
  5120.  
  5121. /* channel statistics */
  5122. typedef struct {
  5123. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_channel_stats */
  5124. /** Channel width (20, 40, 80, 80+80, 160) enum wmi_channel_width*/
  5125. A_UINT32 channel_width;
  5126. /** Primary 20 MHz channel */
  5127. A_UINT32 center_freq;
  5128. /** center frequency (MHz) first segment */
  5129. A_UINT32 center_freq0;
  5130. /** center frequency (MHz) second segment */
  5131. A_UINT32 center_freq1;
  5132. /** msecs the radio is awake (32 bits number accruing over time) */
  5133. A_UINT32 radio_awake_time;
  5134. /** msecs the CCA register is busy (32 bits number accruing over time) */
  5135. A_UINT32 cca_busy_time;
  5136. } wmi_channel_stats;
  5137.  
  5138. /*
  5139. * Each step represents 0.5 dB. The starting value is 0 dBm.
  5140. * Thus the TPC levels cover 0 dBm to 31.5 dBm inclusive in 0.5 dB steps.
  5141. */
  5142. #define MAX_TPC_LEVELS 64
  5143.  
  5144. /* radio statistics */
  5145. typedef struct {
  5146. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_radio_link_stats */
  5147. /** Wifi radio (if multiple radio supported) */
  5148. A_UINT32 radio_id;
  5149. /** msecs the radio is awake (32 bits number accruing over time) */
  5150. A_UINT32 on_time;
  5151. /** msecs the radio is transmitting (32 bits number accruing over time) */
  5152. A_UINT32 tx_time;
  5153. /** msecs the radio is in active receive (32 bits number accruing over time) */
  5154. A_UINT32 rx_time;
  5155. /** msecs the radio is awake due to all scan (32 bits number accruing over time) */
  5156. A_UINT32 on_time_scan;
  5157. /** msecs the radio is awake due to NAN (32 bits number accruing over time) */
  5158. A_UINT32 on_time_nbd;
  5159. /** msecs the radio is awake due to G?scan (32 bits number accruing over time) */
  5160. A_UINT32 on_time_gscan;
  5161. /** msecs the radio is awake due to roam?scan (32 bits number accruing over time) */
  5162. A_UINT32 on_time_roam_scan;
  5163. /** msecs the radio is awake due to PNO scan (32 bits number accruing over time) */
  5164. A_UINT32 on_time_pno_scan;
  5165. /** msecs the radio is awake due to HS2.0 scans and GAS exchange (32 bits number accruing over time) */
  5166. A_UINT32 on_time_hs20;
  5167. /** number of channels */
  5168. A_UINT32 num_channels;
  5169. /** tx time per TPC level - DEPRECATED
  5170. * This field is deprecated.
  5171. * It is superseded by the WMI_RADIO_TX_POWER_LEVEL_STATS_EVENTID message.
  5172. */
  5173. A_UINT32 tx_time_per_tpc[MAX_TPC_LEVELS];
  5174. /** msecs the radio is awake due to Host initiated scan (accruing over time) */
  5175. A_UINT32 on_time_host_scan;
  5176. /** msecs the radio is awake due to LPI scan (accruing over time) */
  5177. A_UINT32 on_time_lpi_scan;
  5178. } wmi_radio_link_stats;
  5179.  
  5180. /** tx time per power level statistics */
  5181. typedef struct {
  5182. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_power_level_stats_evt_fixed_param */
  5183. /** total number of tx power levels */
  5184. A_UINT32 total_num_tx_power_levels;
  5185. /** number of tx power levels that are carried in this event */
  5186. A_UINT32 num_tx_power_levels;
  5187. /** offset of current stats
  5188. * If ((num_tx_power_levels + power_level_offset)) ==
  5189. * total_num_tx_power_levels)
  5190. * this message completes the report of tx time per power levels.
  5191. * Otherwise, additional WMI_RADIO_TX_POWER_LEVEL_STATS_EVENTID messages
  5192. * will be sent by the target to deliver the remainder of the tx time
  5193. * per power level stats.
  5194. */
  5195. A_UINT32 power_level_offset;
  5196. /* radio id for this tx time per power level statistics (if multiple radio supported) */
  5197. A_UINT32 radio_id;
  5198. /*
  5199. * This TLV will be followed by a TLV containing a variable-length array of
  5200. * A_UINT32 with tx time per power level data
  5201. * A_UINT32 tx_time_per_power_level[num_tx_power_levels]
  5202. * The tx time is in units of milliseconds.
  5203. * The power levels are board-specific values; a board-specific translation
  5204. * has to be applied to determine what actual power corresponds to each
  5205. * power level.
  5206. * Just as the host has a BDF file available, the host should also have
  5207. * a data file available that provides the power level to power translations.
  5208. */
  5209. } wmi_tx_power_level_stats_evt_fixed_param;
  5210.  
  5211.  
  5212. /** Radio statistics (once started) do not stop or get reset unless wifi_clear_link_stats is invoked */
  5213. typedef struct {
  5214. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats_event_fixed_param */
  5215. /** unique id identifying the request, given in the request stats command */
  5216. A_UINT32 request_id;
  5217. /** Number of radios*/
  5218. A_UINT32 num_radio;
  5219. /** more_data will be set depending on the number of radios */
  5220. A_UINT32 more_radio_events;
  5221. /*
  5222. * This TLV is followed by another TLV of array of bytes
  5223. * size of(struct wmi_radio_link_stats);
  5224. *
  5225. * This TLV is followed by another TLV of array of bytes
  5226. * num_channels * size of(struct wmi_channel_stats)
  5227. */
  5228.  
  5229. } wmi_radio_link_stats_event_fixed_param;
  5230.  
  5231. /* per rate statistics */
  5232. typedef struct {
  5233. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rate_stats */
  5234. /** rate information
  5235. * The rate-code is a 1-byte field in which:for given rate, nss and preamble
  5236. * b'7-b-6 indicate the preamble (0 OFDM, 1 CCK, 2, HT, 3 VHT)
  5237. * b'5-b'4 indicate the NSS (0 - 1x1, 1 - 2x2, 2 - 3x3)
  5238. * b'3-b'0 indicate the rate, which is indicated as follows:
  5239. * OFDM : 0: OFDM 48 Mbps
  5240. * 1: OFDM 24 Mbps
  5241. * 2: OFDM 12 Mbps
  5242. * 3: OFDM 6 Mbps
  5243. * 4: OFDM 54 Mbps
  5244. * 5: OFDM 36 Mbps
  5245. * 6: OFDM 18 Mbps
  5246. * 7: OFDM 9 Mbps
  5247. * CCK (pream == 1)
  5248. * 0: CCK 11 Mbps Long
  5249. * 1: CCK 5.5 Mbps Long
  5250. * 2: CCK 2 Mbps Long
  5251. * 3: CCK 1 Mbps Long
  5252. * 4: CCK 11 Mbps Short
  5253. * 5: CCK 5.5 Mbps Short
  5254. * 6: CCK 2 Mbps Short
  5255. * HT/VHT (pream == 2/3)
  5256. * 0..7: MCS0..MCS7 (HT)
  5257. * 0..9: MCS0..MCS9 (VHT)
  5258. */
  5259. A_UINT32 rate;
  5260. /** units of 100 Kbps */
  5261. A_UINT32 bitrate;
  5262. /** number of successfully transmitted data pkts (ACK rcvd) */
  5263. A_UINT32 tx_mpdu;
  5264. /** number of received data pkts */
  5265. A_UINT32 rx_mpdu;
  5266. /** number of data packet losses (no ACK) */
  5267. A_UINT32 mpdu_lost;
  5268. /** total number of data pkt retries */
  5269. A_UINT32 retries;
  5270. /** number of short data pkt retries */
  5271. A_UINT32 retries_short;
  5272. /** number of long data pkt retries */
  5273. A_UINT32 retries_long;
  5274. } wmi_rate_stats;
  5275.  
  5276. typedef struct {
  5277. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_link_stats */
  5278. /** peer type (AP, TDLS, GO etc.) enum wmi_peer_type*/
  5279. A_UINT32 peer_type;
  5280. /** mac address */
  5281. wmi_mac_addr peer_mac_address;
  5282. /** peer wmi_CAPABILITY_XXX */
  5283. A_UINT32 capabilities;
  5284. /** number of rates */
  5285. A_UINT32 num_rates;
  5286. } wmi_peer_link_stats;
  5287.  
  5288. /** PEER statistics (once started) reset and start afresh after each connection */
  5289. typedef struct {
  5290. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_stats_event_fixed_param */
  5291. /** unique id identifying the request, given in the request stats command */
  5292. A_UINT32 request_id;
  5293. /** number of peers accomidated in this particular event */
  5294. A_UINT32 num_peers;
  5295. /** Indicates the fragment number */
  5296. A_UINT32 peer_event_number;
  5297. /** Indicates if there are more peers which will be sent as seperate peer_stats event */
  5298. A_UINT32 more_data;
  5299.  
  5300. /**
  5301. * This TLV is followed by another TLV
  5302. * num_peers * size of(struct wmi_peer_stats)
  5303. * num_rates * size of(struct wmi_rate_stats). num_rates is the sum of the rates of all the peers.
  5304. */
  5305. } wmi_peer_stats_event_fixed_param;
  5306.  
  5307. /* per access category statistics */
  5308. typedef struct {
  5309. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wmm_ac_stats */
  5310. /** access category (VI, VO, BE, BK) enum wmi_traffic_ac*/
  5311. A_UINT32 ac_type;
  5312. /** number of successfully transmitted unicast data pkts (ACK rcvd) */
  5313. A_UINT32 tx_mpdu;
  5314. /** number of received unicast mpdus */
  5315. A_UINT32 rx_mpdu;
  5316. /** number of succesfully transmitted multicast data packets */
  5317. /** STA case: implies ACK received from AP for the unicast packet in which mcast pkt was sent */
  5318. A_UINT32 tx_mcast;
  5319. /** number of received multicast data packets */
  5320. A_UINT32 rx_mcast;
  5321. /** number of received unicast a-mpdus */
  5322. A_UINT32 rx_ampdu;
  5323. /** number of transmitted unicast a-mpdus */
  5324. A_UINT32 tx_ampdu;
  5325. /** number of data pkt losses (no ACK) */
  5326. A_UINT32 mpdu_lost;
  5327. /** total number of data pkt retries */
  5328. A_UINT32 retries;
  5329. /** number of short data pkt retries */
  5330. A_UINT32 retries_short;
  5331. /** number of long data pkt retries */
  5332. A_UINT32 retries_long;
  5333. /** data pkt min contention time (usecs) */
  5334. A_UINT32 contention_time_min;
  5335. /** data pkt max contention time (usecs) */
  5336. A_UINT32 contention_time_max;
  5337. /** data pkt avg contention time (usecs) */
  5338. A_UINT32 contention_time_avg;
  5339. /** num of data pkts used for contention statistics */
  5340. A_UINT32 contention_num_samples;
  5341. } wmi_wmm_ac_stats;
  5342.  
  5343. /* interface statistics */
  5344. typedef struct {
  5345. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_iface_link_stats */
  5346. /** access point beacon received count from connected AP */
  5347. A_UINT32 beacon_rx;
  5348. /** access point mgmt frames received count from connected AP (including Beacon) */
  5349. A_UINT32 mgmt_rx;
  5350. /** action frames received count */
  5351. A_UINT32 mgmt_action_rx;
  5352. /** action frames transmit count */
  5353. A_UINT32 mgmt_action_tx;
  5354. /** access Point Beacon and Management frames RSSI (averaged) */
  5355. A_UINT32 rssi_mgmt;
  5356. /** access Point Data Frames RSSI (averaged) from connected AP */
  5357. A_UINT32 rssi_data;
  5358. /** access Point ACK RSSI (averaged) from connected AP */
  5359. A_UINT32 rssi_ack;
  5360. /** number of peers */
  5361. A_UINT32 num_peers;
  5362. /** Indicates how many peer_stats events will be sent depending on the num_peers. */
  5363. A_UINT32 num_peer_events;
  5364. /** number of ac */
  5365. A_UINT32 num_ac;
  5366. /** Roaming Stat */
  5367. A_UINT32 roam_state;
  5368. /** Average Beacon spread offset is the averaged time delay between TBTT and beacon TSF */
  5369. /** Upper 32 bits of averaged 64 bit beacon spread offset */
  5370. A_UINT32 avg_bcn_spread_offset_high;
  5371. /** Lower 32 bits of averaged 64 bit beacon spread offset */
  5372. A_UINT32 avg_bcn_spread_offset_low;
  5373. /** Takes value of 1 if AP leaks packets after sending an ACK for PM=1 otherwise 0 */
  5374. A_UINT32 is_leaky_ap;
  5375. /** Average number of frames received from AP after receiving the ACK for a frame with PM=1 */
  5376. A_UINT32 avg_rx_frms_leaked;
  5377. /** Rx leak watch window currently in force to minimize data loss because of leaky AP. Rx leak window is the
  5378. time driver waits before shutting down the radio or switching the channel and after receiving an ACK for
  5379. a data frame with PM bit set) */
  5380. A_UINT32 rx_leak_window;
  5381. A_UINT32 tx_rts_succ_cnt;
  5382. A_UINT32 tx_rts_fail_cnt;
  5383. A_UINT32 tx_ppdu_succ_cnt;
  5384. A_UINT32 tx_ppdu_fail_cnt;
  5385. /** msecs the interface is in Connected state (accruing over time) */
  5386. A_UINT32 connected_duration;
  5387. /** msecs the interface is in DisConnected state (accruing over time) */
  5388. A_UINT32 disconnected_duration;
  5389. /** msecs the interface is doing RTT ranging (accruing over time) */
  5390. A_UINT32 rtt_ranging_duration;
  5391. /** msecs the interface is in RTT responder mode (accruing over time) */
  5392. A_UINT32 rtt_responder_duration;
  5393. /** Number of Probes (Tx) sent on the interface (accruing over time) */
  5394. A_UINT32 num_probes_tx;
  5395. /** Number of Beacon misses on this interface (accruing over time) */
  5396. A_UINT32 num_beacon_miss;
  5397. } wmi_iface_link_stats;
  5398.  
  5399. typedef enum {
  5400. WMI_OFFLOAD_STATS_TYPE_SOC_BCAST = 0,
  5401. WMI_OFFLOAD_STATS_TYPE_SOC_MCAST = 1,
  5402. WMI_OFFLOAD_STATS_TYPE_SOC_UCAST = 2,
  5403. WMI_OFFLOAD_STATS_TYPE_ARP = 3,
  5404. WMI_OFFLOAD_STATS_TYPE_NS = 4,
  5405. WMI_OFFLOAD_STATS_TYPE_APF_BCAST = 5,
  5406. WMI_OFFLOAD_STATS_TYPE_APF_MCAST = 6,
  5407. WMI_OFFLOAD_STATS_TYPE_APF_UCAST = 7,
  5408. /* Add New offload stat type here */
  5409. WMI_OFFLOAD_STATS_TYPE_MAX,
  5410. } wmi_offload_stats_type;
  5411.  
  5412. typedef struct {
  5413. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_iface_offload_stats */
  5414. /** Type of offload stat. enum wmi_offload_stats_type **/
  5415. A_UINT32 type;
  5416. /** Number of (MSDUs) frames Received **/
  5417. A_UINT32 rx_count;
  5418. /** Number of frames Dropped **/
  5419. A_UINT32 drp_count;
  5420. /** Number of frames for which FW Responded (Valid for ARP and NS only). (or)
  5421. * Number of frames forwarded to Host (Valid for stats type except ARP and NS). **/
  5422. A_UINT32 fwd_count;
  5423. } wmi_iface_offload_stats;
  5424.  
  5425. /** Interface statistics (once started) reset and start afresh after each connection */
  5426. typedef struct {
  5427. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_iface_link_stats_event_fixed_param */
  5428. /** unique id identifying the request, given in the request stats command */
  5429. A_UINT32 request_id;
  5430. /** unique id identifying the VDEV, generated by the caller */
  5431. A_UINT32 vdev_id;
  5432. /** Number of offload stats **/
  5433. A_UINT32 num_offload_stats;
  5434. /*
  5435. * This TLV is followed by other TLVs:
  5436. * wmi_iface_link_stats iface_link_stats;
  5437. * num_ac * size of(struct wmi_wmm_ac_stats)
  5438. * wmi_iface_offload_stats iface_offload_stats[num_offload_stats]
  5439. */
  5440. } wmi_iface_link_stats_event_fixed_param;
  5441.  
  5442. /** Suspend option */
  5443. enum {
  5444. WMI_PDEV_SUSPEND, /* suspend */
  5445. WMI_PDEV_SUSPEND_AND_DISABLE_INTR, /* suspend and disable all interrupts */
  5446. };
  5447.  
  5448. typedef struct {
  5449. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_suspend_cmd_fixed_param */
  5450. /* suspend option sent to target */
  5451. A_UINT32 pdev_id; /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
  5452. A_UINT32 suspend_opt;
  5453. } wmi_pdev_suspend_cmd_fixed_param;
  5454.  
  5455. typedef struct {
  5456. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_resume_cmd_fixed_param */
  5457. A_UINT32 pdev_id; /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
  5458. } wmi_pdev_resume_cmd_fixed_param;
  5459.  
  5460. typedef struct {
  5461. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_rate_stats_event_fixed_param, */
  5462. A_UINT32 num_vdev_stats; /* number of vdevs */
  5463. } wmi_vdev_rate_stats_event_fixed_param;
  5464.  
  5465. typedef struct {
  5466. A_UINT32 tlv_header; /* TLV tag and len, tag equals WMITLV_TAG_STRUC_wmi_vdev_rate_ht_info*/
  5467. A_UINT32 vdevid; /* Id of the wlan vdev*/
  5468. A_UINT32 tx_nss; /* Bit 28 of tx_rate_kbps has this info - based on last data packet transmitted*/
  5469. A_UINT32 rx_nss; /* Bit 24 of rx_rate_kbps - same as above*/
  5470. A_UINT32 tx_preamble; /* Bits 30-29 from tx_rate_kbps */
  5471. A_UINT32 rx_preamble; /* Bits 26-25 from rx_rate_kbps */
  5472. } wmi_vdev_rate_ht_info;
  5473.  
  5474. typedef struct {
  5475. A_UINT32 tlv_header; /* TLV tag and len, tag equals WMITLV_TAG_STRUC_wmi_rx_aggr_failure_event_fixed_param */
  5476. A_UINT32 num_failure_info; /* How many holes on rx aggregation */
  5477. } wmi_rx_aggr_failure_event_fixed_param;
  5478.  
  5479. typedef struct {
  5480. A_UINT32 tlv_header; /* TLV tag and len, tag equals WMITLV_wmi_rx_aggr_failure_info */
  5481. A_UINT32 start_seq; /* start sequence number of the hole */
  5482. A_UINT32 end_seq; /* end sequence number of the hole */
  5483. } wmi_rx_aggr_failure_info;
  5484.  
  5485. typedef struct {
  5486. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats_event_fixed_param */
  5487. wmi_stats_id stats_id;
  5488. /** number of pdev stats event structures (wmi_pdev_stats) 0 or 1 */
  5489. A_UINT32 num_pdev_stats;
  5490. /** number of vdev stats event structures (wmi_vdev_stats) 0 or max vdevs */
  5491. A_UINT32 num_vdev_stats;
  5492. /** number of peer stats event structures (wmi_peer_stats) 0 or max peers */
  5493. A_UINT32 num_peer_stats;
  5494. A_UINT32 num_bcnflt_stats;
  5495. /** number of chan stats event structures (wmi_chan_stats) 0 to MAX MCC CHANS */
  5496. A_UINT32 num_chan_stats;
  5497. /** number of MIB stats event structures (wmi_mib_stats) */
  5498. A_UINT32 num_mib_stats;
  5499. /* This TLV is followed by another TLV of array of bytes
  5500. * A_UINT8 data[];
  5501. * This data array contains
  5502. * num_pdev_stats * size of(struct wmi_pdev_stats)
  5503. * num_vdev_stats * size of(struct wmi_vdev_stats)
  5504. * num_peer_stats * size of(struct wmi_peer_stats)
  5505. * num_bcnflt_stats * size_of()
  5506. * num_chan_stats * size of(struct wmi_chan_stats)
  5507. * num_mib_stats * size of(struct wmi_mib_stats)
  5508. */
  5509. /* If WMI_REQUEST_PEER_EXTD_STAT is set in stats_id,
  5510. * the data[] array also contains num_peer_stats * size of wmi_peer_extd_stats
  5511. * following the information elements listed above.
  5512. */
  5513. } wmi_stats_event_fixed_param;
  5514.  
  5515. /* WLAN channel CCA stats bitmap */
  5516. #define WLAN_STATS_IDLE_TIME_SHIFT 0
  5517. #define WLAN_STATS_IDLE_TIME_TIME 0x00000001
  5518.  
  5519. #define WLAN_STATS_TX_TIME_SHIFT 1
  5520. #define WLAN_STATS_TX_TIME_MASK 0x00000002
  5521.  
  5522. #define WLAN_STATS_RX_IN_BSS_TIME_SHIFT 2
  5523. #define WLAN_STATS_RX_IN_BSS_TIME_MASK 0x00000004
  5524.  
  5525. #define WLAN_STATS_RX_OUT_BSS_TIME_SHIFT 3
  5526. #define WLAN_STATS_RX_OUT_BSS_TIME_MASK 0x00000008
  5527.  
  5528. #define WLAN_STATS_RX_BUSY_TIME_SHIFT 4
  5529. #define WLAN_STATS_RX_BUSY_TIME_MASK 0x00000010
  5530.  
  5531. #define WLAN_STATS_RX_IN_BAD_COND_TIME_SHIFT 5
  5532. #define WLAN_STATS_RX_IN_BAD_COND_TIME_MASK 0x00000020
  5533.  
  5534. #define WLAN_STATS_TX_IN_BAD_COND_TIME_SHIFT 6
  5535. #define WLAN_STATS_TX_IN_BAD_COND_TIME_MASK 0x00000040
  5536.  
  5537. #define WLAN_STATS_WLAN_NOT_AVAIL_TIME_SHIFT 7
  5538. #define WLAN_STATS_WLAN_NOT_AVAIL_TIME_MASK 0x00000080
  5539.  
  5540. /* WLAN peer signal stats bitmap */
  5541. #define WLAN_STATS_PER_CHAIN_SNR_SHIFT 0
  5542. #define WLAN_STATS_PER_CHAIN_SNR_MASK 0x00000001
  5543.  
  5544. #define WLAN_STATS_PER_CHAIN_NF_SHIFT 1
  5545. #define WLAN_STATS_PER_CHAIN_NF_MASK 0x00000002
  5546.  
  5547. /* WLAN TX stats bitmap */
  5548. #define WLAN_STATS_TX_MSDU_CNT_SHIFT 0
  5549. #define WLAN_STATS_TX_MSDU_CNT_MASK 0x00000001
  5550.  
  5551. #define WLAN_STATS_TX_MPDU_CNT_SHIFT 1
  5552. #define WLAN_STATS_TX_MPDU_CNT_MASK 0x00000002
  5553.  
  5554. #define WLAN_STATS_TX_PPDU_CNT_SHIFT 2
  5555. #define WLAN_STATS_TX_PPDU_CNT_MASK 0x00000004
  5556.  
  5557. #define WLAN_STATS_TX_BYTES_SHIFT 3
  5558. #define WLAN_STATS_TX_BYTES_MASK 0x00000008
  5559.  
  5560. #define WLAN_STATS_TX_MSDU_DROP_CNT_SHIFT 4
  5561. #define WLAN_STATS_TX_MSDU_DROP_CNT_MASK 0x00000010
  5562.  
  5563. #define WLAN_STATS_TX_DROP_BYTES_SHIFT 5
  5564. #define WLAN_STATS_TX_DROP_BYTES_MASK 0x00000020
  5565.  
  5566. #define WLAN_STATS_TX_MPDU_RETRY_CNT_SHIFT 6
  5567. #define WLAN_STATS_TX_MPDU_RETRY_CNT_MASK 0x00000040
  5568.  
  5569. #define WLAN_STATS_TX_MPDU_FAIL_CNT_SHIFT 7
  5570. #define WLAN_STATS_TX_MPDU_FAIL_CNT_MASK 0x00000080
  5571.  
  5572. #define WLAN_STATS_TX_PPDU_FAIL_CNT_SHIFT 8
  5573. #define WLAN_STATS_TX_PPDU_FAIL_CNT_MASK 0x00000100
  5574.  
  5575. #define WLAN_STATS_TX_MPDU_AGGR_SHIFT 9
  5576. #define WLAN_STATS_TX_MPDU_AGGR_MASK 0x00000200
  5577.  
  5578. #define WLAN_STATS_TX_SUCC_MCS_SHIFT 10
  5579. #define WLAN_STATS_TX_SUCC_MCS_MASK 0x00000400
  5580.  
  5581. #define WLAN_STATS_TX_FAIL_MCS_SHIFT 11
  5582. #define WLAN_STATS_TX_FAIL_MCS_MASK 0x00000800
  5583.  
  5584. #define WLAN_STATS_TX_PPDU_DELAY_SHIFT 12
  5585. #define WLAN_STATS_TX_PPDU_DELAY_MASK 0x00001000
  5586.  
  5587. /* WLAN RX stats bitmap */
  5588. #define WLAN_STATS_MAC_RX_MPDU_CNT_SHIFT 0
  5589. #define WLAN_STATS_MAC_RX_MPDU_CNT_MASK 0x00000001
  5590.  
  5591. #define WLAN_STATS_MAC_RX_BYTES_SHIFT 1
  5592. #define WLAN_STATS_MAC_RX_BYTES_MASK 0x00000002
  5593.  
  5594. #define WLAN_STATS_PHY_RX_PPDU_CNT_SHIFT 2
  5595. #define WLAN_STATS_PHY_RX_PPDU_CNT_MASK 0x00000004
  5596.  
  5597. #define WLAN_STATS_PHY_RX_BYTES_SHIFT 3
  5598. #define WLAN_STATS_PHY_RX_BYTES_MASK 0x00000008
  5599.  
  5600. #define WLAN_STATS_RX_DISORDER_CNT_SHIFT 4
  5601. #define WLAN_STATS_RX_DISORDER_CNT_MASK 0x00000010
  5602.  
  5603. #define WLAN_STATS_RX_MPDU_RETRY_CNT_SHIFT 5
  5604. #define WLAN_STATS_RX_MPDU_RETRY_CNT_MASK 0x00000020
  5605.  
  5606. #define WLAN_STATS_RX_MPDU_DUP_CNT_SHIFT 6
  5607. #define WLAN_STATS_RX_MPDU_DUP_CNT_MASK 0x00000040
  5608.  
  5609. #define WLAN_STATS_RX_MPDU_DISCARD_CNT_SHIFT 7
  5610. #define WLAN_STATS_RX_MPDU_DISCARD_CNT_MASK 0x00000080
  5611.  
  5612. #define WLAN_STATS_RX_MPDU_AGGR_SHIFT 8
  5613. #define WLAN_STATS_RX_MPDU_AGGR_MASK 0x00000100
  5614.  
  5615. #define WLAN_STATS_RX_MCS_SHIFT 9
  5616. #define WLAN_STATS_RX_MCS_MASK 0x00000200
  5617.  
  5618. #define WLAN_STATS_STA_PS_INDS_SHIFT 10
  5619. #define WLAN_STATS_STA_PS_INDS_MASK 0x00000400
  5620.  
  5621. #define WLAN_STATS_STA_PS_DURS_SHIFT 11
  5622. #define WLAN_STATS_STA_PS_DURS_MASK 0x00000800
  5623.  
  5624. #define WLAN_STATS_RX_PROBE_REQS_SHIFT 12
  5625. #define WLAN_STATS_RX_PROBE_REQS_MASK 0x00001000
  5626.  
  5627. #define WLAN_STATS_RX_OTH_MGMTS_SHIFT 13
  5628. #define WLAN_STATS_RX_OTH_MGMTS_MASK 0x00002000
  5629.  
  5630. typedef struct
  5631. {
  5632. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chan_cca_stats */
  5633. A_UINT32 vdev_id;
  5634. /** Percentage of idle time, no TX, no RX, no interference */
  5635. A_UINT32 idle_time;
  5636. /** Percentage of time transmitting packets */
  5637. A_UINT32 tx_time;
  5638. /** Percentage of time receiving packets in current BSSs */
  5639. A_UINT32 rx_in_bss_time;
  5640. /** Percentage of time receiving packets not in current BSSs */
  5641. A_UINT32 rx_out_bss_time;
  5642. /** Percentage of time interference detected. */
  5643. A_UINT32 rx_busy_time;
  5644. /** Percentage of time receiving packets with errors
  5645. * or packets flagged as retransmission or seqnum discontinued. */
  5646. A_UINT32 rx_in_bad_cond_time;
  5647. /** Percentage of time the device transmitted packets that haven't been ACKed. */
  5648. A_UINT32 tx_in_bad_cond_time;
  5649. /** Percentage of time the chip is unable to work in normal conditions. */
  5650. A_UINT32 wlan_not_avail_time;
  5651. } wmi_chan_cca_stats;
  5652.  
  5653. /** Thresholds of cca stats, stands for percentages of stats variation.
  5654. * Check wmi_chan_cca_stats for each stats's meaning.
  5655. */
  5656. typedef struct
  5657. {
  5658. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chan_cca_stats_thresh */
  5659. A_UINT32 idle_time; /* units = percent */
  5660. A_UINT32 tx_time; /* units = percent */
  5661. A_UINT32 rx_in_bss_time; /* units = percent */
  5662. A_UINT32 rx_out_bss_time; /* units = percent */
  5663. A_UINT32 rx_busy_time; /* units = percent */
  5664. A_UINT32 rx_in_bad_cond_time; /* units = percent */
  5665. A_UINT32 tx_in_bad_cond_time; /* units = percent */
  5666. A_UINT32 wlan_not_avail_time; /* units = percent */
  5667. } wmi_chan_cca_stats_thresh;
  5668.  
  5669. typedef struct
  5670. {
  5671. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_signal_stats */
  5672. A_UINT32 vdev_id;
  5673. A_UINT32 peer_id;
  5674. /** per chain SNR in current bss, units are dB */
  5675. A_INT32 per_chain_snr[WMI_MAX_CHAINS];
  5676. /** per chain background noise, units are dBm */
  5677. A_INT32 per_chain_nf[WMI_MAX_CHAINS];
  5678. /** per antenna rx MPDUs */
  5679. A_UINT32 per_antenna_rx_mpdus[WMI_MAX_CHAINS];
  5680. /** per antenna tx MPDUs */
  5681. A_UINT32 per_antenna_tx_mpdus[WMI_MAX_CHAINS];
  5682. /** num of valid chains for per antenna rx/tx MPDU cnts*/
  5683. A_UINT32 num_chains_valid;
  5684. } wmi_peer_signal_stats;
  5685.  
  5686. /** Thresholds of signal stats, stand for percentage of stats variation.
  5687. * Check wmi_peer_signal_stats for each stats's meaning.
  5688. */
  5689. typedef struct
  5690. {
  5691. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_signal_stats_thresh */
  5692. A_UINT32 per_chain_snr; /* units = dB */
  5693. A_UINT32 per_chain_nf; /* units = dBm */
  5694. } wmi_peer_signal_stats_thresh;
  5695.  
  5696. typedef struct
  5697. {
  5698. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_stats */
  5699. /** Number of total TX MSDUs on MAC layer in the period */
  5700. A_UINT32 tx_msdu_cnt;
  5701. /** Number of total TX MPDUs on MAC layer in the period */
  5702. A_UINT32 tx_mpdu_cnt;
  5703. /** Number of total TX PPDUs on MAC layer in the period */
  5704. A_UINT32 tx_ppdu_cnt;
  5705. /** Bytes of tx data on MAC layer in the period */
  5706. A_UINT32 tx_bytes;
  5707. /** Number of TX MSDUs cancelled due to any reason in the period,
  5708. * such as WMM limitation/bandwidth limitation/radio congestion */
  5709. A_UINT32 tx_msdu_drop_cnt;
  5710. /** Bytes of dropped TX packets in the period */
  5711. A_UINT32 tx_drop_bytes;
  5712. /** Number of unacked transmissions of MPDUs */
  5713. A_UINT32 tx_mpdu_retry_cnt;
  5714. /** Number of MPDUs have not been ACKed despite retried */
  5715. A_UINT32 tx_mpdu_fail_cnt;
  5716. /** Number of PPDUs which received no block ack */
  5717. A_UINT32 tx_ppdu_fail_cnt;
  5718. /* This TLV is followed by TLVs below: :
  5719. * A_UINT32 tx_mpdu_aggr[tx_mpdu_aggr_array_len];
  5720. * A_UINT32 tx_succ_mcs[tx_succ_mcs_array_len];
  5721. * A_UINT32 tx_fail_mcs[tx_fail_mcs_array_len];
  5722. * A_UINT32 tx_ppdu_delay[tx_ppdu_delay_array_len];
  5723. */
  5724. } wmi_tx_stats;
  5725.  
  5726. /** Thresholds of tx stats, stand for percentage of stats variation.
  5727. * Check wmi_tx_stats for each stats's meaning.
  5728. */
  5729. typedef struct
  5730. {
  5731. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_stats_thresh */
  5732. A_UINT32 tx_msdu_cnt;
  5733. A_UINT32 tx_mpdu_cnt;
  5734. A_UINT32 tx_ppdu_cnt;
  5735. A_UINT32 tx_bytes;
  5736. A_UINT32 tx_msdu_drop_cnt;
  5737. A_UINT32 tx_drop_bytes;
  5738. A_UINT32 tx_mpdu_retry_cnt;
  5739. A_UINT32 tx_mpdu_fail_cnt;
  5740. A_UINT32 tx_ppdu_fail_cnt;
  5741. A_UINT32 tx_mpdu_aggr;
  5742. A_UINT32 tx_succ_mcs;
  5743. A_UINT32 tx_fail_mcs;
  5744. A_UINT32 tx_ppdu_delay;
  5745. } wmi_tx_stats_thresh;
  5746.  
  5747. typedef struct
  5748. {
  5749. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_ac_tx_stats */
  5750. A_UINT32 vdev_id;
  5751. A_UINT32 peer_id;
  5752. /* The TLVs for the 4 AC follows:
  5753. * wmi_tx_stats tx_stats[]; wmi_tx_stats for BE/BK/VI/VO
  5754. */
  5755. } wmi_peer_ac_tx_stats;
  5756.  
  5757. typedef struct
  5758. {
  5759. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rx_stats */
  5760. /** Number of RX MPDUs on MAC layer */
  5761. A_UINT32 mac_rx_mpdu_cnt;
  5762. /** Bytes of RX packets on MAC layer */
  5763. A_UINT32 mac_rx_bytes;
  5764. /** Number of RX PPDU on PHY layer */
  5765. A_UINT32 phy_rx_ppdu_cnt;
  5766. /** Bytes of RX packets on PHY layer */
  5767. A_UINT32 phy_rx_bytes;
  5768. /** Number of discontinuity in seqnum */
  5769. A_UINT32 rx_disorder_cnt;
  5770. /** Number of RX MPDUs flagged as retransmissions */
  5771. A_UINT32 rx_mpdu_retry_cnt;
  5772. /** Number of RX MPDUs identified as duplicates */
  5773. A_UINT32 rx_mpdu_dup_cnt;
  5774. /** Number of RX MPDUs discarded */
  5775. A_UINT32 rx_mpdu_discard_cnt;
  5776. /* This TLV is followed by TLVs below:
  5777. * A_UINT32 rx_mpdu_aggr[rx_mpdu_aggr_array_len];
  5778. * A_UINT32 rx_mcs[rx_mcs_array_len];
  5779. */
  5780. } wmi_rx_stats;
  5781.  
  5782. /** Thresholds of rx stats, stands for percentage of stats variation.
  5783. * Check wmi_rx_stats for each stats's meaning.
  5784. */
  5785. typedef struct
  5786. {
  5787. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rx_stats_thresh */
  5788. A_UINT32 mac_rx_mpdu_cnt;
  5789. A_UINT32 mac_rx_bytes;
  5790. A_UINT32 phy_rx_ppdu_cnt;
  5791. A_UINT32 phy_rx_bytes;
  5792. A_UINT32 rx_disorder_cnt;
  5793. A_UINT32 rx_mpdu_retry_cnt;
  5794. A_UINT32 rx_mpdu_dup_cnt;
  5795. A_UINT32 rx_mpdu_discard_cnt;
  5796. A_UINT32 rx_mpdu_aggr;
  5797. A_UINT32 rx_mcs;
  5798. A_UINT32 sta_ps_inds;
  5799. A_UINT32 sta_ps_durs;
  5800. A_UINT32 rx_probe_reqs;
  5801. A_UINT32 rx_oth_mgmts;
  5802. } wmi_rx_stats_thresh;
  5803.  
  5804. typedef struct
  5805. {
  5806. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_ac_rx_stats */
  5807. A_UINT32 vdev_id;
  5808. A_UINT32 peer_id;
  5809. /** How many times STAs go to sleep */
  5810. A_UINT32 sta_ps_inds;
  5811. /** Total sleep time of STAs, milliseconds units */
  5812. A_UINT32 sta_ps_durs;
  5813. /** Number of probe requests received */
  5814. A_UINT32 rx_probe_reqs;
  5815. /** Number of other management frames received, not including probe requests */
  5816. A_UINT32 rx_oth_mgmts;
  5817. /* The TLVs for the 4 AC follows:
  5818. * wmi_rx_stats rx_stats[]; wmi_rx_stats for BE/BK/VI/VO
  5819. */
  5820. } wmi_peer_ac_rx_stats;
  5821.  
  5822. typedef enum {
  5823. /** Periodic timer timed out, based on the period specified
  5824. * by WMI_PDEV_PARAM_STATS_OBSERVATION_PERIOD
  5825. */
  5826. TRIGGER_COND_ID_TIMER_TIMED_OUT = 0x1,
  5827. /** Any of the (enabled) stats thresholds specified
  5828. * in the WMI_PDEV_SET_STATS_THRESHOLD_CMD message is exceeded
  5829. * within the current stats period.
  5830. */
  5831. TRIGGER_COND_ID_THRESH_EXCEEDED = 0x2,
  5832. /** In Response to the one-time wlan stats request of
  5833. * WMI_REQUEST_WLAN_STATS_CMDID from host.
  5834. */
  5835. TRIGGER_COND_ID_ONE_TIME_REQUEST = 0x3,
  5836. } wmi_report_stats_event_trigger_cond_id;
  5837.  
  5838. typedef struct {
  5839. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_report_stats_event_fixed_param */
  5840. /** Indicate what triggered this event, check wmi_report_stats_event_trigger_cond_id for details */
  5841. A_UINT32 trigger_cond_id;
  5842. /** Bitmap to indicate changed channel CCA stats which exceeded the thresholds */
  5843. A_UINT32 cca_chgd_bitmap;
  5844. /** Bitmap to indicate changed peer signal stats which exceeded the thresholds */
  5845. A_UINT32 sig_chgd_bitmap;
  5846. /** Bitmap to indicate changed TX counters which exceeded the thresholds */
  5847. A_UINT32 tx_chgd_bitmap;
  5848. /** Bitmap to indicate changed RX counters which exceeded the thresholds */
  5849. A_UINT32 rx_chgd_bitmap;
  5850. /** number of per channel CCA stats structures (wmi_chan_cca_stats), 0 to max vdevs*/
  5851. A_UINT32 num_chan_cca_stats;
  5852. /** number of per peer signal stats structures (wmi_peer_signal_stats), 0 to max peers*/
  5853. A_UINT32 num_peer_signal_stats;
  5854. /** number of per peer ac TX stats structures (wmi_peer_ac_tx_stats), 0 to max peers*/
  5855. A_UINT32 num_peer_ac_tx_stats;
  5856. /** Array length of tx_mpdu_aggr[] which is histogram of MPDU aggregation size(1 to 7 and 8+).
  5857. * The array indicates number of MPDUs sent on specified aggregation size
  5858. * (per number of MPDUs per AMPDUs / 1 to 7 and 8+).
  5859. * Array length can be set per WMI_PDEV_PARAM_TX_MPDU_AGGR_ARRAY_LEN */
  5860. A_UINT32 tx_mpdu_aggr_array_len;
  5861. /** Array length of tx_succ_mcs[] which is histogram of encoding rate.
  5862. * The array indicates number of acked PPDUs sent at a specific rate */
  5863. A_UINT32 tx_succ_mcs_array_len;
  5864. /** Array length of tx_fail_mcs[] which is histogram of encoding rate.
  5865. * The array indicates number of unacked PPDUs sent at a specific rate */
  5866. A_UINT32 tx_fail_mcs_array_len;
  5867. /** tx_ppdu_delay[]is a histogram of delays on MAC layer.
  5868. * The array counts numbers of PPDUs encountering different TX time delays.
  5869. * TX delay here means time interval between the time a PPDU is queued
  5870. * to the MAC HW for transmission and the time the lower layers of
  5871. * tx FW return a tx status.
  5872. *
  5873. * The bin size tx_ppdu_delay_bin_size_ms specifies how many milliseconds
  5874. * each bin of the tx_ppdu_delay histogram represents.
  5875. * By default the bin size is 10ms.
  5876. * tx_ppdu_delay[0] -> delays between 0-9 ms
  5877. * tx_ppdu_delay[1] -> delays between 10-19 ms
  5878. * ...
  5879. * tx_ppdu_delay[9] -> delays between 90-99 ms
  5880. * tx_ppdu_delay[10] -> delays >= 100 ms
  5881. * Bin size can be set per WMI_PDEV_PARAM_TX_PPDU_DELAY_BIN_SIZE_MS.
  5882. */
  5883. A_UINT32 tx_ppdu_delay_bin_size_ms;
  5884. /** Array length of tx_ppdu_delay[]. It can be set per WMI_PDEV_PARAM_TX_PPDU_DELAY_ARRAY_LEN */
  5885. A_UINT32 tx_ppdu_delay_array_len;
  5886. /** number of per peer ac RX stats structures (wmi_peer_ac_rx_stats), 0 to max peers*/
  5887. A_UINT32 num_peer_ac_rx_stats;
  5888. /** Array length of rx_mpdu_aggr[] which is histogram of MPDU aggregation size(1 to 7 and 8+).
  5889. * It can be set per WMI_PDEV_PARAM_RX_MPDU_AGGR_ARRAY_LEN */
  5890. A_UINT32 rx_mpdu_aggr_array_len;
  5891. /** Array size of rx_mcs[] which is histogram of encoding rate.
  5892. * The array indicates number of PPDUs received at a specific rate */
  5893. A_UINT32 rx_mcs_array_len;
  5894.  
  5895. /**
  5896. * This TLV is followed by TLVs below:
  5897. * wmi_chan_cca_stats chan_cca_stats[]; Array length is specified by num_chan_cca_stats
  5898. * wmi_peer_signal_stats peer_signal_stats[]; Array length is specified by num_peer_signal_stats
  5899. * wmi_peer_ac_tx_stats peer_ac_tx_stats[]; Array length is specified by num_peer_ac_tx_stats
  5900. * wmi_tx_stats tx_stats[][]; Array length is num_peer_ac_tx_stats * WLAN_MAX_AC, array index is (peer_index * WLAN_MAX_AC + ac_index)
  5901. * A_UINT32 tx_mpdu_aggr[][][]; Array length is num_peer_ac_tx_stats * WLAN_MAX_AC * tx_mpdu_aggr_array_len,
  5902. * array index is (peer_index * WLAN_MAX_AC + ac_index) * tx_mpdu_aggr_array_len + A-MPDU aggregation index
  5903. * A_UINT32 tx_succ_mcs[][][]; Array length is num_peer_ac_tx_stats * WLAN_MAX_AC * tx_succ_mcs_array_len,
  5904. * array index is (peer_index * WLAN_MAX_AC + ac_index) * tx_succ_mcs_array_len + MCS index
  5905. * A_UINT32 tx_fail_mcs[][][]; Array length is num_peer_ac_tx_stats * WLAN_MAX_AC * tx_fail_mcs_array_len,
  5906. * array index is (peer_index * WLAN_MAX_AC + ac_index) * tx_fail_mcs_array_len + MCS index
  5907. * A_UINT32 tx_ppdu_delay[][][]; Array length is num_peer_ac_tx_stats * WLAN_MAX_AC * tx_ppdu_delay_array_len,
  5908. * array index is (peer_index * WLAN_MAX_AC + ac_index) * tx_ppdu_delay_array_len + tx delay index
  5909. * wmi_peer_ac_rx_stats peer_ac_rx_stats[]; Array length is specified by num_peer_ac_rx_stats
  5910. * wmi_rx_stats rx_stats[][]; Array length is num_peer_ac_rx_stats * WLAN_MAX_AC, array index is (peer_index * WLAN_MAX_AC + ac_index)
  5911. * A_UINT32 rx_mpdu_aggr[][][]; Array length is num_peer_ac_rx_stats * WLAN_MAX_AC * rx_mpdu_aggr_array_len,
  5912. * array index is (peer_index * WLAN_MAX_AC + ac_index) * rx_mpdu_aggr_array_len + A-MPDU aggregation index
  5913. * A_UINT32 rx_mcs[][][]; Array length is (num_peer_ac_rx_stats * WLAN_MAX_AC) * rx_mcs_array_len,
  5914. * array index is (peer_index * WLAN_MAX_AC + ac_index) * rx_mcs_array_len + MCS index
  5915. **/
  5916. } wmi_report_stats_event_fixed_param;
  5917.  
  5918. typedef struct {
  5919. /** TLV tag and len; tag equals
  5920. * WMITLV_TAG_STRUC_wmi_peer_stats_info */
  5921. A_UINT32 tlv_header;
  5922. /** peer MAC address */
  5923. wmi_mac_addr peer_macaddr;
  5924. /** bytes (size of MPDUs) transmitted to this peer */
  5925. struct {
  5926. /* lower 32 bits of the tx_bytes value */
  5927. A_UINT32 low_32;
  5928. /* upper 32 bits of the tx_bytes value */
  5929. A_UINT32 high_32;
  5930. } tx_bytes;
  5931. /** packets (MSDUs) transmitted to this peer */
  5932. struct {
  5933. /* lower 32 bits of the tx_packets value */
  5934. A_UINT32 low_32;
  5935. /* upper 32 bits of the tx_packets value */
  5936. A_UINT32 high_32;
  5937. } tx_packets;
  5938. /** bytes (size of MPDUs) received from this peer */
  5939. struct {
  5940. /* lower 32 bits of the rx_bytes value */
  5941. A_UINT32 low_32;
  5942. /* upper 32 bits of the rx_bytes value */
  5943. A_UINT32 high_32;
  5944. } rx_bytes;
  5945. /** packets (MSDUs) received from this peer */
  5946. struct {
  5947. /* lower 32 bits of the rx_packets value */
  5948. A_UINT32 low_32;
  5949. /* upper 32 bits of the rx_packets value */
  5950. A_UINT32 high_32;
  5951. } rx_packets;
  5952. /** cumulative retry counts (MPDUs) */
  5953. A_UINT32 tx_retries;
  5954. /** number of failed transmissions (MPDUs) (retries exceeded, no ACK) */
  5955. A_UINT32 tx_failed;
  5956. /** rate information, it is output of WMI_ASSEMBLE_RATECODE_V1
  5957. * (in format of 0x1000RRRR)
  5958. * The rate-code is a 4-bytes field in which,
  5959. * for given rate, nss and preamble
  5960. *
  5961. * b'31-b'29 unused / reserved
  5962. * b'28 indicate the version of rate-code (1 = RATECODE_V1)
  5963. * b'27-b'11 unused / reserved
  5964. * b'10-b'8 indicate the preamble (0 OFDM, 1 CCK, 2 HT, 3 VHT)
  5965. * b'7-b'5 indicate the NSS (0 - 1x1, 1 - 2x2, 2 - 3x3, 3 - 4x4)
  5966. * b'4-b'0 indicate the rate, which is indicated as follows:
  5967. * OFDM : 0: OFDM 48 Mbps
  5968. * 1: OFDM 24 Mbps
  5969. * 2: OFDM 12 Mbps
  5970. * 3: OFDM 6 Mbps
  5971. * 4: OFDM 54 Mbps
  5972. * 5: OFDM 36 Mbps
  5973. * 6: OFDM 18 Mbps
  5974. * 7: OFDM 9 Mbps
  5975. * CCK (pream == 1)
  5976. * 0: CCK 11 Mbps Long
  5977. * 1: CCK 5.5 Mbps Long
  5978. * 2: CCK 2 Mbps Long
  5979. * 3: CCK 1 Mbps Long
  5980. * 4: CCK 11 Mbps Short
  5981. * 5: CCK 5.5 Mbps Short
  5982. * 6: CCK 2 Mbps Short
  5983. * HT/VHT (pream == 2/3)
  5984. * 0..7: MCS0..MCS7 (HT)
  5985. * 0..9: MCS0..MCS9 (11AC VHT)
  5986. * 0..11: MCS0..MCS11 (11AX VHT)
  5987. */
  5988. /** rate-code of the last transmission */
  5989. A_UINT32 last_tx_rate_code;
  5990. /** rate-code of the last received PPDU */
  5991. A_UINT32 last_rx_rate_code;
  5992. /** bitrate of the last transmission, in units of kbps */
  5993. A_UINT32 last_tx_bitrate_kbps;
  5994. /** bitrate of the last received PPDU, in units of kbps */
  5995. A_UINT32 last_rx_bitrate_kbps;
  5996. /** combined RSSI of the last received PPDU, in unit of dBm */
  5997. A_INT32 peer_rssi;
  5998. } wmi_peer_stats_info;
  5999.  
  6000. typedef struct {
  6001. /** TLV tag and len; tag equals
  6002. * WMITLV_TAG_STRUC_wmi_peer_stats_info_event_fixed_param */
  6003. A_UINT32 tlv_header;
  6004. /** VDEV to which the peers belong to */
  6005. A_UINT32 vdev_id;
  6006. /** number of peers in peer_stats_info[] */
  6007. A_UINT32 num_peers;
  6008. /** flag to indicate if there are more peers which will
  6009. * be sent a following seperate peer_stats_info event */
  6010. A_UINT32 more_data;
  6011. /* This TLV is followed by another TLV of array of structs
  6012. * wmi_peer_stats_info peer_stats_info[];
  6013. */
  6014. } wmi_peer_stats_info_event_fixed_param;
  6015.  
  6016. typedef struct {
  6017. /** TLV tag and len; tag equals
  6018. * WMITLV_TAG_STRUC_wmi_radio_chan_stats */
  6019. A_UINT32 tlv_header;
  6020. /** primary channel freq of the channel whose stats is sent */
  6021. A_UINT32 chan_mhz;
  6022. /** accumulation of time the radio is tuned to this channel,
  6023. * in units of microseconds */
  6024. A_UINT32 on_chan_us;
  6025. /** accumulation of the TX PPDU duration over the measurement period,
  6026. * in units of microseconds */
  6027. A_UINT32 tx_duration_us;
  6028. /** accumulation of the RX PPDU duration over the measurement period,
  6029. * in units of microseconds */
  6030. A_UINT32 rx_duration_us;
  6031. /** ratio of channel busy time to on_chan_us, in units of percent */
  6032. A_UINT32 chan_busy_ratio;
  6033. /** ratio of on_chan_us to the measurement period, in units of percent */
  6034. A_UINT32 on_chan_ratio;
  6035. /** measurement period, in units of microseconds */
  6036. A_UINT32 measurement_period_us;
  6037. /** MPDUs transmitted on this channel */
  6038. A_UINT32 tx_mpdus;
  6039. /** MSDUs transmitted on this channel */
  6040. A_UINT32 tx_msdus;
  6041. /** MPDUS successfully received on this channel */
  6042. A_UINT32 rx_succ_mpdus;
  6043. /** Failed MPDUs (CRC failures) received on this channel */
  6044. A_UINT32 rx_fail_mpdus;
  6045. } wmi_radio_chan_stats;
  6046.  
  6047. typedef struct {
  6048. /** TLV tag and len; tag equals
  6049. * WMITLV_TAG_STRUC_wmi_radio_chan_stats_event_fixed_param */
  6050. A_UINT32 tlv_header;
  6051. /** number of channel stats in radio_chan_stats[] */
  6052. A_UINT32 num_chans;
  6053. /* This TLV is followed by another TLV of array of structs
  6054. * wmi_radio_chan_stats radio_chan_stats[];
  6055. */
  6056. } wmi_radio_chan_stats_event_fixed_param;
  6057.  
  6058. /**
  6059. * PDEV statistics
  6060. * @todo
  6061. * add all PDEV stats here
  6062. */
  6063. typedef struct {
  6064. /** Channel noise floor */
  6065. A_INT32 chan_nf;
  6066. /** TX frame count */
  6067. A_UINT32 tx_frame_count;
  6068. /** RX frame count */
  6069. A_UINT32 rx_frame_count;
  6070. /** rx clear count */
  6071. A_UINT32 rx_clear_count;
  6072. /** cycle count */
  6073. A_UINT32 cycle_count;
  6074. /** Phy error count */
  6075. A_UINT32 phy_err_count;
  6076. /** Channel Tx Power */
  6077. A_UINT32 chan_tx_pwr;
  6078. /** WAL dbg stats */
  6079. struct wlan_dbg_stats pdev_stats;
  6080.  
  6081. } wmi_pdev_stats;
  6082.  
  6083. /**
  6084. * VDEV statistics
  6085. * @todo
  6086. * add all VDEV stats here
  6087. */
  6088.  
  6089. typedef struct {
  6090. A_INT32 bcn_snr;
  6091. A_INT32 dat_snr;
  6092. } wmi_snr_info;
  6093.  
  6094. typedef struct {
  6095. /** unique id identifying the VDEV, generated by the caller */
  6096. A_UINT32 vdev_id;
  6097. wmi_snr_info vdev_snr;
  6098. A_UINT32 tx_frm_cnt[WLAN_MAX_AC];/* Total number of packets(per AC) that were successfully transmitted(with and without retries, including multi-cast, broadcast) */
  6099. A_UINT32 rx_frm_cnt;/* Total number of packets that were successfully received (after appropriate filter rules including multi-cast, broadcast)*/
  6100. A_UINT32 multiple_retry_cnt[WLAN_MAX_AC];/*The number of MSDU packets and MMPDU frames per AC
  6101. that the 802.11 station successfully transmitted after more than one retransmission attempt*/
  6102. A_UINT32 fail_cnt[WLAN_MAX_AC]; /*Total number packets(per AC) failed to transmit */
  6103. A_UINT32 rts_fail_cnt;/*Total number of RTS/CTS sequence failures for transmission of a packet*/
  6104. A_UINT32 rts_succ_cnt;/*Total number of RTS/CTS sequence success for transmission of a packet*/
  6105. A_UINT32 rx_err_cnt;/*The receive error count. HAL will provide the RxP FCS error global */
  6106. A_UINT32 rx_discard_cnt;/* The sum of the receive error count and dropped-receive-buffer error count. (FCS error)*/
  6107. A_UINT32 ack_fail_cnt;/*Total number packets failed transmit because of no ACK from the remote entity*/
  6108. A_UINT32 tx_rate_history[MAX_TX_RATE_VALUES];/*History of last ten transmit rate, in units of 500 kbit/sec*/
  6109. A_UINT32 bcn_rssi_history[MAX_RSSI_VALUES];/*History of last ten Beacon rssi of the connected Bss*/
  6110. } wmi_vdev_stats;
  6111.  
  6112. /**
  6113. * peer statistics.
  6114. */
  6115. typedef struct {
  6116. /** peer MAC address */
  6117. wmi_mac_addr peer_macaddr;
  6118. /** rssi */
  6119. A_UINT32 peer_rssi;
  6120. /** last tx data rate used for peer */
  6121. A_UINT32 peer_tx_rate;
  6122. /** last rx data rate used for peer */
  6123. A_UINT32 peer_rx_rate;
  6124. } wmi_peer_stats;
  6125.  
  6126. /**
  6127. * Peer extension statistics
  6128. */
  6129. typedef struct {
  6130. /** peer MAC address */
  6131. wmi_mac_addr peer_macaddr;
  6132. /* rx duration in microseconds*/
  6133. A_UINT32 rx_duration;
  6134. /** Total TX bytes (including dot11 header) sent to peer */
  6135. A_UINT32 peer_tx_bytes;
  6136. /** Total RX bytes (including dot11 header) received from peer */
  6137. A_UINT32 peer_rx_bytes;
  6138. /** last TX ratecode */
  6139. A_UINT32 last_tx_rate_code;
  6140. /** TX power used by peer - units are 0.5 dBm */
  6141. A_INT32 last_tx_power;
  6142. A_UINT32 reserved[4]; /** for future use - add new peer stats here */
  6143. } wmi_peer_extd_stats;
  6144.  
  6145. typedef struct {
  6146. /** Primary channel freq of the channel for which stats are sent */
  6147. A_UINT32 chan_mhz;
  6148. /** Time spent on the channel */
  6149. A_UINT32 sampling_period_us;
  6150. /** Aggregate duration over a sampling period for which channel activity was observed */
  6151. A_UINT32 rx_clear_count;
  6152. /** Accumalation of the TX PPDU duration over a sampling period */
  6153. A_UINT32 tx_duration_us;
  6154. /** Accumalation of the RX PPDU duration over a sampling period */
  6155. A_UINT32 rx_duration_us;
  6156. } wmi_chan_stats;
  6157.  
  6158. typedef struct {
  6159. A_UINT32 tx_mpdu_grp_frag_cnt; /*dot11TransmittedFragmentCount */
  6160. A_UINT32 tx_msdu_grp_frm_cnt; /*dot11GroupTransmittedFrameCount */
  6161. A_UINT32 tx_msdu_fail_cnt; /*dot11FailedCount*/
  6162. A_UINT32 rx_mpdu_frag_cnt; /*dot11ReceivedFragmentCount*/
  6163. A_UINT32 rx_msdu_grp_frm_cnt; /*dot11GroupReceivedFrameCount*/
  6164. A_UINT32 rx_mpdu_fcs_err; /*dot11FCSErrorCount*/
  6165. A_UINT32 tx_msdu_frm_cnt; /*dot11TransmittedFrameCount*/
  6166. A_UINT32 tx_msdu_retry_cnt; /*dot11RetryCount*/
  6167. A_UINT32 rx_frm_dup_cnt; /*dot11FrameDuplicateCount */
  6168. A_UINT32 tx_rts_success_cnt; /*dot11RTSSuccessCount*/
  6169. A_UINT32 tx_rts_fail_cnt; /*dot11RTSFailureCount*/
  6170. A_UINT32 tx_Qos_mpdu_grp_frag_cnt; /*dot11QosTransmittedFragmentCount */
  6171. A_UINT32 tx_Qos_msdu_fail_UP; /*dot11QosFailedCount */
  6172. A_UINT32 tx_Qos_msdu_retry_UP; /*dot11QosRetryCount */
  6173. A_UINT32 rx_Qos_frm_dup_cnt_UP; /*dot11QosFrameDuplicateCount*/
  6174. A_UINT32 tx_Qos_rts_success_cnt_UP; /*dot11QosRTSSuccessCount*/
  6175. A_UINT32 tx_Qos_rts_fail_cnt_UP; /*dot11QosRTSFailureCount*/
  6176. A_UINT32 rx_Qos_mpdu_frag_cnt_UP; /*dot11QosReceivedFragmentCount*/
  6177. A_UINT32 tx_Qos_msdu_frm_cnt_UP; /*dot11QosTransmittedFrameCount*/
  6178. A_UINT32 rx_Qos_msdu_discard_cnt_UP; /*dot11QosDiscardedFrameCount*/
  6179. A_UINT32 rx_Qos_mpdu_cnt; /*dot11QosMPDUsReceivedCount*/
  6180. A_UINT32 rx_Qos_mpdu_retryBit_cnt; /*dot11QosRetriesReceivedCount*/
  6181. A_UINT32 rsna_Mgmt_discard_CCMP_replay_err_cnt; /*dot11RSNAStatsRobustMgmtCCMPReplays*/
  6182. A_UINT32 rsna_TKIP_icv_err_cnt; /*dot11RSNAStatsTKIPICVErrors*/
  6183. A_UINT32 rsna_TKIP_replay_err_cnt; /*dot11RSNAStatsTKIPReplays*/
  6184. A_UINT32 rsna_CCMP_decrypt_err_cnt; /*dot11RSNAStatsCCMPDecryptErrors*/
  6185. A_UINT32 rsna_CCMP_replay_err_cnt; /*dot11RSNAStatsCCMPReplays*/
  6186. A_UINT32 tx_ampdu_cnt; /*dot11TransmittedAMPDUCount*/
  6187. A_UINT32 tx_mpdu_cnt_in_ampdu; /*dot11TransmittedMPDUsInAMPDUCount*/
  6188. union {
  6189. A_UINT64 counter; /* for use by target only */
  6190. struct {
  6191. A_UINT32 low;
  6192. A_UINT32 high;
  6193. } upload; /* for use by host */
  6194. } tx_octets_in_ampdu; /*dot11TransmittedOctetsInAMPDUCount*/
  6195. A_UINT32 rx_ampdu_cnt; /*dot11AMPDUReceivedCount*/
  6196. A_UINT32 rx_mpdu_cnt_in_ampdu; /*dot11MPDUInReceivedAMPDUCount*/
  6197. union {
  6198. A_UINT64 counter; /* for use by target only */
  6199. struct {
  6200. A_UINT32 rx_octets_in_ampdu_low;
  6201. A_UINT32 rx_octets_in_ampdu_high;
  6202. } upload; /* for use by host */
  6203. } rx_octets_in_ampdu; /*dot11ReceivedOctetsInAMPDUCount*/
  6204. A_UINT32 reserved_1;
  6205. A_UINT32 reserved_2;
  6206. A_UINT32 reserved_3;
  6207. A_UINT32 reserved_4;
  6208. } wmi_mib_stats;
  6209.  
  6210. typedef struct {
  6211. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rssi_stats */
  6212. A_UINT32 vdev_id;
  6213. A_INT32 rssi_avg_beacon[WMI_MAX_CHAINS];
  6214. A_INT32 rssi_avg_data[WMI_MAX_CHAINS];
  6215. wmi_mac_addr peer_macaddr;
  6216. } wmi_rssi_stats;
  6217.  
  6218. typedef struct {
  6219. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_congestion_stats */
  6220. A_UINT32 vdev_id;
  6221. /* congestion -
  6222. * This field holds the congestion percentage = (busy_time/total_time)*100
  6223. * for the interval from when the vdev was started to the current time
  6224. * (or the time at which the vdev was stopped).
  6225. */
  6226. A_UINT32 congestion;
  6227. } wmi_congestion_stats;
  6228.  
  6229. typedef struct {
  6230. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_per_chain_rssi_stats */
  6231. A_UINT32 num_per_chain_rssi_stats;
  6232. /* This TLV is followed by another TLV of array of structs:
  6233. * wmi_rssi_stats rssi_stats[num_per_chain_rssi_stats];
  6234. */
  6235. } wmi_per_chain_rssi_stats;
  6236.  
  6237. typedef struct {
  6238. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_create_cmd_fixed_param */
  6239. /** unique id identifying the VDEV, generated by the caller */
  6240. A_UINT32 vdev_id;
  6241. /** VDEV type (AP,STA,IBSS,MONITOR) */
  6242. A_UINT32 vdev_type;
  6243. /** VDEV subtype (P2PDEV, P2PCLI, P2PGO, BT3.0)*/
  6244. A_UINT32 vdev_subtype;
  6245. /** VDEV MAC address */
  6246. wmi_mac_addr vdev_macaddr;
  6247. /** Number of configured txrx streams */
  6248. A_UINT32 num_cfg_txrx_streams;
  6249. /**
  6250. * pdev_id for identifying the MAC,
  6251. * See macros starting with WMI_PDEV_ID_ for values.
  6252. */
  6253. A_UINT32 pdev_id;
  6254. /* This TLV is followed by another TLV of array of structures
  6255. * wmi_vdev_txrx_streams cfg_txrx_streams[];
  6256. */
  6257. } wmi_vdev_create_cmd_fixed_param;
  6258.  
  6259. typedef struct {
  6260. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_txrx_streams */
  6261. /* band - Should take values from wmi_channel_band_mask */
  6262. A_UINT32 band;
  6263. /* max supported tx streams per given band for this vdev */
  6264. A_UINT32 supported_tx_streams;
  6265. /* max supported rx streams per given band for this vdev */
  6266. A_UINT32 supported_rx_streams;
  6267. } wmi_vdev_txrx_streams;
  6268.  
  6269. /* wmi_p2p_noa_descriptor structure can't be modified without breaking the compatibility for WMI_HOST_SWBA_EVENTID */
  6270. typedef struct {
  6271. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_descriptor */
  6272. A_UINT32 type_count; /** 255: continuous schedule, 0: reserved */
  6273. A_UINT32 duration; /** Absent period duration in micro seconds */
  6274. A_UINT32 interval; /** Absent period interval in micro seconds */
  6275. A_UINT32 start_time; /** 32 bit tsf time when in starts */
  6276. } wmi_p2p_noa_descriptor;
  6277.  
  6278. /** values for vdev_type */
  6279. #define WMI_VDEV_TYPE_AP 0x1
  6280. #define WMI_VDEV_TYPE_STA 0x2
  6281. #define WMI_VDEV_TYPE_IBSS 0x3
  6282. #define WMI_VDEV_TYPE_MONITOR 0x4
  6283.  
  6284. /** VDEV type is for social wifi interface.This VDEV is Currently mainly needed
  6285. * by FW to execute the NAN specific WMI commands and also implement NAN specific
  6286. * operations like Network discovery, service provisioning and service
  6287. * subscription ..etc. If FW needs NAN VDEV then Host should issue VDEV create
  6288. * WMI command to create this VDEV once during initialization and host is not
  6289. * expected to use any VDEV specific WMI commands on this VDEV.
  6290. **/
  6291. #define WMI_VDEV_TYPE_NAN 0x5
  6292.  
  6293. #define WMI_VDEV_TYPE_OCB 0x6
  6294.  
  6295. /* NAN Data Interface */
  6296. #define WMI_VDEV_TYPE_NDI 0x7
  6297.  
  6298. /*
  6299. * Param values to be sent for WMI_VDEV_PARAM_SGI command
  6300. * which are used in 11ax systems
  6301. */
  6302. #define WMI_SGI_LEGACY 0x1 /* for HT and VHT */
  6303. #define WMI_SGI_HE_400_NS 0x2 /* for HE 400 nsec */
  6304. #define WMI_SGI_HE_800_NS 0x4 /* for HE 800 nsec */
  6305. #define WMI_SGI_HE_1600_NS 0x8 /* for HE 1600 nsec */
  6306. #define WMI_SGI_HE_3200_NS 0x10 /* for HE 3200 nsec */
  6307.  
  6308. /** values for vdev_subtype */
  6309. #define WMI_UNIFIED_VDEV_SUBTYPE_P2P_DEVICE 0x1
  6310. #define WMI_UNIFIED_VDEV_SUBTYPE_P2P_CLIENT 0x2
  6311. #define WMI_UNIFIED_VDEV_SUBTYPE_P2P_GO 0x3
  6312. #define WMI_UNIFIED_VDEV_SUBTYPE_PROXY_STA 0x4
  6313. #define WMI_UNIFIED_VDEV_SUBTYPE_MESH 0x5
  6314. /* new subtype for 11S mesh is required as 11S functionality differs
  6315. * in many ways from proprietary mesh
  6316. * 11S uses 6-addr frame format and supports peering between mesh
  6317. * stations and dynamic best path selection between mesh stations.
  6318. * While in proprietary mesh, neighboring mesh station MAC is manually
  6319. * added to AST table for traffic flow between mesh stations
  6320. */
  6321. #define WMI_UNIFIED_VDEV_SUBTYPE_MESH_11S 0x6
  6322.  
  6323. /** values for vdev_start_request flags */
  6324. /** Indicates that AP VDEV uses hidden ssid. only valid for
  6325. * AP/GO */
  6326. #define WMI_UNIFIED_VDEV_START_HIDDEN_SSID (1<<0)
  6327. /** Indicates if robust management frame/management frame
  6328. * protection is enabled. For GO/AP vdevs, it indicates that
  6329. * it may support station/client associations with RMF enabled.
  6330. * For STA/client vdevs, it indicates that sta will
  6331. * associate with AP with RMF enabled. */
  6332. #define WMI_UNIFIED_VDEV_START_PMF_ENABLED (1<<1)
  6333. /*
  6334. * Host is sending bcn_tx_rate to override the beacon tx rates.
  6335. */
  6336. #define WMI_UNIFIED_VDEV_START_BCN_TX_RATE_PRESENT (1<<2)
  6337. /** Indicates if LDPC RX will be advertized inside HT/VHT Capabilities IE
  6338. * of assoc request/response
  6339. */
  6340. #define WMI_UNIFIED_VDEV_START_LDPC_RX_ENABLED (1<<3)
  6341.  
  6342. /* BSS color 0-6 */
  6343. #define WMI_HEOPS_COLOR_GET(he_ops) WMI_GET_BITS(he_ops, 0, 6)
  6344. #define WMI_HEOPS_COLOR_SET(he_ops, value) WMI_SET_BITS(he_ops, 0, 6, value)
  6345.  
  6346. /* Default PE Duration subfield indicates the PE duration in units of 4 us */
  6347. #define WMI_HEOPS_DEFPE_GET(he_ops) WMI_GET_BITS(he_ops, 6, 3)
  6348. #define WMI_HEOPS_DEFPE_SET(he_ops, value) WMI_SET_BITS(he_ops, 6, 3, value)
  6349.  
  6350. /* TWT required */
  6351. #define WMI_HEOPS_TWT_GET(he_ops) WMI_GET_BITS(he_ops, 9, 1)
  6352. #define WMI_HEOPS_TWT_SET(he_ops, value) WMI_SET_BITS(he_ops, 9, 1, value)
  6353.  
  6354. /* RTS threshold in units of 32 us,0 - always use RTS 1023 - this is disabled */
  6355. #define WMI_HEOPS_RTSTHLD_GET(he_ops) WMI_GET_BITS(he_ops, 10, 10)
  6356. #define WMI_HEOPS_RTSTHLD_SET(he_ops, value) WMI_SET_BITS(he_ops, 10, 10, value)
  6357.  
  6358. /* Partial BSS Color field indicates whether BSS applies an AID assignment rule using partial BSS color bits */
  6359. #define WMI_HEOPS_PARTBSSCOLOR_GET(he_ops) WMI_GET_BITS(he_ops, 20, 1)
  6360. #define WMI_HEOPS_PARTBSSCOLOR_SET(he_ops, value) WMI_SET_BITS(he_ops, 20, 1, value)
  6361.  
  6362. /* MAX BSS supported by MultiBSS element */
  6363. #define WMI_HEOPS_MAXBSSID_GET(he_ops) WMI_GET_BITS(he_ops, 21, 8)
  6364. #define WMI_HEOPS_MAXBSSID_SET(he_ops, value) WMI_SET_BITS(he_ops, 21, 8, value)
  6365.  
  6366. /* Tx BSSID Indicator indicates whether HE AP corresponds to transmitted BSSID */
  6367. #define WMI_HEOPS_TXBSSID_GET(he_ops) WMI_GET_BITS(he_ops, 29, 1)
  6368. #define WMI_HEOPS_TXBSSID_SET(he_ops, value) WMI_SET_BITS(he_ops, 29, 1, value)
  6369.  
  6370. /* when set to 1 disables use of BSS color */
  6371. #define WMI_HEOPS_BSSCOLORDISABLE_GET(he_ops) WMI_GET_BITS(he_ops, 30, 1)
  6372. #define WMI_HEOPS_BSSCOLORDISABLE_SET(he_ops, value) WMI_SET_BITS(he_ops, 30, 1, value)
  6373.  
  6374. /* When set to 1 HE AP transmits beacons using two PHY formats,
  6375. * one in non-HE format and other in an HE_EXT_SU PHY format
  6376. */
  6377. #define WMI_HEOPS_DUALBEACON_GET(he_ops) WMI_GET_BITS(he_ops, 30, 1)
  6378. #define WMI_HEOPS_DUALBEACON_SET(he_ops, value) WMI_SET_BITS(he_ops, 30, 1, value)
  6379.  
  6380. #define WMI_MAX_HECAP_PHY_SIZE (3)
  6381.  
  6382.  
  6383.  
  6384.  
  6385.  
  6386.  
  6387.  
  6388. /* Dual Band both 2.4 GHz and 5 GHz Supported */
  6389. #define WMI_HECAP_PHY_DB_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 0, 1)
  6390. #define WMI_HECAP_PHY_DB_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 0, 1, value)
  6391.  
  6392. /*
  6393. * B0: Indicates STA support 40 MHz channel width in 2.4 GHz
  6394. * B1: Indicates STA support 40 MHz and 80 MHz channel width in 5 GHz
  6395. * B2: Indicates STA supports 160 MHz channel width in 5 GHz
  6396. * B3: Indicates STA supports 160/80+80 MHz channel width in 5 GHz
  6397. * B4: If B1 is set to 0, then B5 indicates support of 242/106/52/26-tone
  6398. * RU mapping in 40 MHz channel width in 2.4 GHz. Otherwise Reserved.
  6399. * B5: If B2, B3, and B4 are set to 0, then B6 indicates support of
  6400. * 242-tone RU mapping in 40 MHz and 80
  6401. * MHz channel width in 5 GHz. Otherwise Reserved.
  6402. * B6: Reserved
  6403. */
  6404. #define WMI_HECAP_PHY_CBW_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 1, 7)
  6405. #define WMI_HECAP_PHY_CBW_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 1, 7, value)
  6406.  
  6407. /*
  6408. * B0: Indicates STA supports reception of preamble puncturing in 80 MHz,
  6409. * where in the preamble only the secondary 20 MHz is punctured
  6410. * B1: Indicates STA supports reception of preamble puncturing in 80 MHz,
  6411. * where in the preamble only one of the two 20 MHz sub-channels in the
  6412. * secondary 40 MHz is punctured
  6413. * B2: Indicates STA supports reception of preamble puncturing in 160 MHz
  6414. * or 80+80 MHz, where in the primary 80 MHz of the preamble only the
  6415. * secondary 20 MHz is punctured
  6416. * B3: Indicates STA supports reception of preamble puncturing in 160 MHz
  6417. * or 80+80 MHz, where in the primary 80 MHz of the preamble, the
  6418. * primary 40 MHz is present
  6419. */
  6420. #define WMI_HECAP_PHY_PREAMBLEPUNCRX_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 8, 4)
  6421. #define WMI_HECAP_PHY_PREAMBLEPUNCRX_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 8, 4, value)
  6422.  
  6423. /* Indicates transmitting STA is a Class A (1) or a Class B (0) device */
  6424. #define WMI_HECAP_PHY_COD_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 12, 1)
  6425. #define WMI_HECAP_PHY_COD_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 12, 1, value)
  6426.  
  6427. /* Indicates support of transmission and reception of LDPC encoded packets */
  6428. #define WMI_HECAP_PHY_LDPC_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 13, 1)
  6429. #define WMI_HECAP_PHY_LDPC_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 13, 1, value)
  6430.  
  6431. /* Below 2 macros are for maintaining backward compatability - Deprecated use WMI_HECAP_PHY_LDPC instead */
  6432. #define WMI_HECAP_PHY_TXLDPC_GET(he_cap_phy) WMI_HECAP_PHY_LDPC_GET(he_cap_phy)
  6433. #define WMI_HECAP_PHY_TXLDPC_SET(he_cap_phy, value) WMI_HECAP_PHY_LDPC_SET(he_cap_phy, value)
  6434. /* Below 2 macros are for maintaining backward compatability - Deprecated use WMI_HECAP_PHY_LDPC instead */
  6435. #define WMI_HECAP_PHY_RXLDPC_GET(he_cap_phy) WMI_HECAP_PHY_LDPC_GET(he_cap_phy)
  6436. #define WMI_HECAP_PHY_RXLDPC_SET(he_cap_phy, value) WMI_HECAP_PHY_LDPC_SET(he_cap_phy, value)
  6437.  
  6438. /*
  6439. * B0: Indicates support of reception of 1x LTF and 0.8us guard interval
  6440. * duration for HE SU PPDUs.
  6441. * B1: Indicates support of reception of 1x LTF and 1.6us guard interval
  6442. */
  6443. #define WMI_HECAP_PHY_LTFGIFORHE_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 14, 2)
  6444. #define WMI_HECAP_PHY_LTFGIFORHE_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 14, 2, value)
  6445.  
  6446.  
  6447. /* Below 2 macros are for maintaining backward compatability - Deprecated use WMI_HECAP_PHY_LTFGIFORHE_GET instead */
  6448. #define WMI_HECAP_PHY_OLTF_GET(he_cap_phy) WMI_HECAP_PHY_LTFGIFORHE_GET(he_cap_phy)
  6449. #define WMI_HECAP_PHY_OLTF_SET(he_cap_phy, value) WMI_HECAP_PHY_LTFGIFORHE_SET(he_cap_phy, value)
  6450.  
  6451. /*
  6452. * B0: For a transmitting STA acting as beamformer, it indicates support of
  6453. * NDP transmission using 4x LTFand 3.2 us guard interval duration
  6454. * B1: For a transmitting STA acting as beamformee, it indicates support of
  6455. * NDP reception using 4x LTF and 3.2 us guard interval duration
  6456. */
  6457. #define WMI_HECAP_PHY_LTFGIFORNDP_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 16, 2)
  6458. #define WMI_HECAP_PHY_LTFGIFORNDP_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 16, 2, value)
  6459.  
  6460. /* indicates support for the transmission of HE PPDUs using STBC with one spatial stream */
  6461. #define WMI_HECAP_PHY_TXSTBC_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 18, 1)
  6462. #define WMI_HECAP_PHY_TXSTBC_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 18, 1, value)
  6463.  
  6464. /* indicates support for the reception of HE PPDUs using STBC with one spatial stream */
  6465. #define WMI_HECAP_PHY_RXSTBC_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 19, 1)
  6466. #define WMI_HECAP_PHY_RXSTBC_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 19, 1, value)
  6467.  
  6468. /* indicates transmitting STA supports transmitting HE PPDUs with Doppler procedure */
  6469. #define WMI_HECAP_PHY_TXDOPPLER_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 20, 1)
  6470. #define WMI_HECAP_PHY_TXDOPPLER_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 20, 1, value)
  6471.  
  6472. /* indicates transmitting STA supports receiving HE PPDUs with Doppler procedure */
  6473. #define WMI_HECAP_PHY_RXDOPPLER_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 21, 1)
  6474. #define WMI_HECAP_PHY_RXDOPPLER_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 21, 1, value)
  6475.  
  6476. /*
  6477. * If the transmitting STA is an AP:
  6478. * indicates STA supports of reception of full bandwidth UL MU-MIMO
  6479. * transmission.
  6480. * If the transmitting STA is a non-AP STA:
  6481. * indicates STA supports of transmission of full bandwidth UL MU-MIMO
  6482. * transmission.
  6483. */
  6484. #define WMI_HECAP_PHY_UL_MU_MIMO_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 22, 1)
  6485. #define WMI_HECAP_PHY_UL_MU_MIMO_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 22, 1, value)
  6486.  
  6487. /*
  6488. * If the transmitting STA is an AP:
  6489. * indicates STA supports of reception of UL MUMIMO transmission on an
  6490. * RU in an HE MU PPDU where the RU does not span the entire PPDU bandwidth.
  6491. * If the transmitting STA is a non-AP STA:
  6492. * indicates STA supports of transmission of UL MU-MIMO transmission on an
  6493. * RU in an HE MU PPDU where the RU does not span the entire PPDU bandwidth.
  6494. */
  6495. #define WMI_HECAP_PHY_ULMUMIMOOFDMA_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 23, 1)
  6496. #define WMI_HECAP_PHY_ULMUMIMOOFDMA_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 23, 1, value)
  6497. /* START TEMPORARY WORKAROUND -
  6498. * Leave legacy names as aliases for new names, until all references to the
  6499. * legacy names have been removed.
  6500. */
  6501. #define WMI_HECAP_PHY_ULOFDMA_GET WMI_HECAP_PHY_ULMUMIMOOFDMA_GET
  6502. #define WMI_HECAP_PHY_ULOFDMA_SET WMI_HECAP_PHY_ULMUMIMOOFDMA_SET
  6503. /* END TEMPORARY WORKAROUND */
  6504.  
  6505. /* Tx DCM
  6506. * B0:B1
  6507. * 00: Does not support DCM
  6508. * 01: BPSK
  6509. * 10: QPSK
  6510. * 11: 16-QAM
  6511. * B2 signals maximum number of spatial streams with DCM
  6512. * 0: 1 spatial stream
  6513. * 1: 2 spatial streams
  6514. */
  6515. #define WMI_HECAP_PHY_DCMTX_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 24, 3)
  6516. #define WMI_HECAP_PHY_DCMTX_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 24, 3, value)
  6517.  
  6518. /* Rx DCM
  6519. * B0:B1
  6520. * 00: Does not support DCM
  6521. * 01: BPSK
  6522. * 10: QPSK
  6523. * 11: 16-QAM
  6524. * B2 signals maximum number of spatial streams with DCM
  6525. * 0: 1 spatial stream
  6526. * 1: 2 spatial streams
  6527. */
  6528. #define WMI_HECAP_PHY_DCMRX_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 27, 3)
  6529. #define WMI_HECAP_PHY_DCMRX_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 27, 3, value)
  6530.  
  6531. /* DEPRECATED - use WMI_HECAP_PHY_DCMRX or WMI_HECAP_PHY_DCMTX */
  6532. #define WMI_HECAP_PHY_DCM_GET(he_cap_phy) WMI_HECAP_PHY_DCMRX_GET(he_cap_phy)
  6533. #define WMI_HECAP_PHY_DCM_SET(he_cap_phy, value) WMI_HECAP_PHY_DCMRX_SET(he_cap_phy, value)
  6534.  
  6535. /*
  6536. * Indicates that the STA supports the reception of an HE MU PPDU payload
  6537. * over full bandwidth and partial bandwidth (106-tone RU within 20 MHz).
  6538. */
  6539. #define WMI_HECAP_PHY_ULHEMU_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 30, 1)
  6540. #define WMI_HECAP_PHY_ULHEMU_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 30, 1, value)
  6541.  
  6542. /* Indicates support for operation as an SU beamformer */
  6543. #define WMI_HECAP_PHY_SUBFMR_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 31, 1)
  6544. #define WMI_HECAP_PHY_SUBFMR_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 31, 1, value)
  6545.  
  6546. /* Indicates support for operation as an SU beamformee */
  6547. #define WMI_HECAP_PHY_SUBFME_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 0, 1)
  6548. #define WMI_HECAP_PHY_SUBFME_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 0, 1, value)
  6549.  
  6550. /* Indicates support for operation as an MU Beamformer */
  6551. #define WMI_HECAP_PHY_MUBFMR_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 1, 1)
  6552. #define WMI_HECAP_PHY_MUBFMR_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 1, 1, value)
  6553.  
  6554. /*
  6555. * Num STS -1 for <= 80MHz (min val 3)
  6556. * The maximum number of space-time streams minus 1 that the STA can
  6557. * receive in an HE NDP
  6558. */
  6559. #define WMI_HECAP_PHY_BFMESTSLT80MHZ_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 2, 3)
  6560. #define WMI_HECAP_PHY_BFMESTSLT80MHZ_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 2, 3, value)
  6561.  
  6562. /*
  6563. * The maximum value for NSTS-1<=80MHz,(min val 3)total that can be sent
  6564. * to the STA in a DL MU-MIMO transmission on full or partial bandwidth
  6565. */
  6566. #define WMI_HECAP_PHY_NSTSLT80MHZ_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 5, 3)
  6567. #define WMI_HECAP_PHY_NSTSLT80MHZ_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 5, 3, value)
  6568.  
  6569. /*
  6570. * Num STS -1 for > 80MHz (min val 3)
  6571. * The maximum number of space-time streams minus 1 that the STA can
  6572. * receive in an HE NDP
  6573. */
  6574. #define WMI_HECAP_PHY_BFMESTSGT80MHZ_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 8, 3)
  6575. #define WMI_HECAP_PHY_BFMESTSGT80MHZ_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 8, 3, value)
  6576.  
  6577. /*
  6578. * The maximum value for NSTS-1 > 80MHz (min val 3) total that can be sent
  6579. * to the STA in a DL MU-MIMO transmission on full or partial bandwidth
  6580. */
  6581. #define WMI_HECAP_PHY_NSTSGT80MHZ_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 11, 3)
  6582. #define WMI_HECAP_PHY_NSTSGT80MHZ_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 11, 3, value)
  6583.  
  6584. /*
  6585. * Number Of Sounding Dimensions For <= 80 MHz
  6586. * If SU beamformer capable, set to the maximum supported value of the
  6587. * TXVECTOR parameter NUM_STS minus 1.
  6588. * Otherwise, reserved.
  6589. */
  6590. #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 14, 3)
  6591. #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 14, 3, value)
  6592.  
  6593. /*
  6594. * Number Of Sounding Dimensions For > 80 MHz
  6595. * If SU beamformer capable, set to the maximum supported value of the
  6596. * TXVECTOR parameter NUM_STS minus 1.
  6597. * Otherwise, reserved.
  6598. */
  6599. #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 17, 3)
  6600. #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 17, 3, value)
  6601.  
  6602. /*
  6603. * Indicates if the HE beamformee is capable of feedback with tone
  6604. * grouping of 16 in the HE Compressed Beamforming Report field for
  6605. * a SU-type feedback.
  6606. */
  6607. #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 20, 1)
  6608. #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 20, 1, value)
  6609.  
  6610. /*
  6611. * Indicates if the HE beamformee is capable of feedback with tone
  6612. * grouping of 16 in the HE Compressed Beamforming Report field for
  6613. * a MU-type feedback.
  6614. */
  6615. #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 21, 1)
  6616. #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 21, 1, value)
  6617.  
  6618. /*
  6619. * Indicates if HE beamformee is capable of feedback with codebook
  6620. * size {4, 2} in the HECompressed Beamforming Report field for
  6621. * a SU-type feedback.
  6622. */
  6623. #define WMI_HECAP_PHY_CODBK42SU_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 22, 1)
  6624. #define WMI_HECAP_PHY_CODBK42SU_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 22, 1, value)
  6625.  
  6626. /*
  6627. * Indicates if HE beamformee is capable of feedback with codebook
  6628. * size {7, 5} in the HE Compressed Beamforming Report field for
  6629. * a MU-type feedback.
  6630. */
  6631. #define WMI_HECAP_PHY_CODBK75MU_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 23, 1)
  6632. #define WMI_HECAP_PHY_CODBK75MU_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 23, 1, value)
  6633.  
  6634. /*
  6635. * Beamforming Feedback With Trigger Frame*/
  6636. /*If the transmitting STA is an AP STA:
  6637. B0: indicates support of reception of SU-Type partial(1) and full bandwidth feedback(0)
  6638. B1: indicates support of reception of MU-Type partial(1) bandwidth feedback
  6639. B2: indicates support of reception of CQI-Only partial and full bandwidth feedback
  6640. If the transmitting STA is a non-AP STA:
  6641. B0: indicates support of transmission of SU-Type partial(1) and full bandwidth(0) feedback
  6642. B1: indicates support of transmission of MU-Type partial(1) bandwidth feedback
  6643. B2: indicates support of transmission of CQI-Onlypartial (1)and full bandwidth feedback*/
  6644. #define WMI_HECAP_PHY_BFFEEDBACKTRIG_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 24, 3)
  6645. #define WMI_HECAP_PHY_BFFEEDBACKTRIG_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 24, 3, value)
  6646.  
  6647. /*Indicates the support of transmission and reception of an HE extended range SU PPDU payload transmitted over the right 106-tone RU */
  6648. #define WMI_HECAP_PHY_HEERSU_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 27, 1)
  6649. #define WMI_HECAP_PHY_HEERSU_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 27, 1, value)
  6650.  
  6651. /*Indicates that the non-AP STA supports reception of a DL MU-MIMO transmission on an RU in an HE MU PPDU where the RU does not span the entire PPDU bandwidth.*/
  6652. #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 28, 1)
  6653. #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 28, 1, value)
  6654.  
  6655. /*Indicates whether or not the PPE Threshold field is present*/
  6656. #define WMI_HECAP_PHY_PETHRESPRESENT_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 29, 1)
  6657. #define WMI_HECAP_PHY_PETHRESPRESENT_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 29, 1, value)
  6658.  
  6659. /*Indicates that the STA supports SRP-based SR operation*/
  6660. #define WMI_HECAP_PHY_SRPSPRESENT_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 30, 1)
  6661. #define WMI_HECAP_PHY_SRPPRESENT_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 30, 1, value)
  6662.  
  6663. /*Indicates that the STA supports a power boost factor ar for the r-th RU in the range [0.5, 2]*/
  6664. #define WMI_HECAP_PHY_PWRBOOSTAR_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 31, 1)
  6665. #define WMI_HECAP_PHY_PWRBOOSTAR_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 31, 1, value)
  6666.  
  6667. /*Indicates support for the reception of 4x LTF and 0.8us guard interval duration for HE SU PPDUs.*/
  6668. #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 0, 1)
  6669. #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 0, 1, value)
  6670.  
  6671. /*HTC + HE Support Set to 1 if STA supports reception of HE Variant HT control Field*/
  6672. #define WMI_HECAP_MAC_HECTRL_GET(he_cap) WMI_GET_BITS(he_cap, 0, 1)
  6673. #define WMI_HECAP_MAC_HECTRL_SET(he_cap, value) WMI_SET_BITS(he_cap, 0, 1, value)
  6674.  
  6675. /* set to 1 to for TWT Requestor support*/
  6676. #define WMI_HECAP_MAC_TWTREQ_GET(he_cap) WMI_GET_BITS(he_cap, 1, 1)
  6677. #define WMI_HECAP_MAC_TWTREQ_SET(he_cap, value) WMI_SET_BITS(he_cap, 1, 1, value)
  6678.  
  6679. /* set to 1 to for TWT Responder support*/
  6680. #define WMI_HECAP_MAC_TWTRSP_GET(he_cap) WMI_GET_BITS(he_cap, 2, 1)
  6681. #define WMI_HECAP_MAC_TWTRSP_SET(he_cap, value) WMI_SET_BITS(he_cap, 2, 1, value)
  6682.  
  6683. /* Level of frag support
  6684. Set to 0 for no support for dynamic fragmentation.
  6685. Set to 1 for support for dynamic fragments that are contained within a S-MPDU
  6686. Set to 2 for support for dynamic fragments that are contained within a Single MPDU and support for up to
  6687. one dynamic fragment for each MSDU and each MMPDU within an A-MPDU or multi-TID A-MPDU.
  6688. Set to 3 for support for dynamic fragments that are contained within a Single MPDU and support for multiple
  6689. dynamic fragments for each MSDU within an AMPDU or multi-TID AMPDU and up to one dynamic fragment
  6690. for each MMPDU in a multi-TID A-MPDU that is not a Single MPDU
  6691. */
  6692. #define WMI_HECAP_MAC_HEFRAG_GET(he_cap) WMI_GET_BITS(he_cap, 3, 2)
  6693. #define WMI_HECAP_MAC_HEFRAG_SET(he_cap, value) WMI_SET_BITS(he_cap, 3, 2, value)
  6694.  
  6695. /* The maximum number of fragmented MSDUs, Nmax,defined by this field is Nmax = 2 Maximum Number Of FMPDUs*/
  6696. #define WMI_HECAP_MAC_MAXFRAGMSDU_GET(he_cap) WMI_GET_BITS(he_cap, 5, 3)
  6697. #define WMI_HECAP_MAC_MAXFRAGMSDU_SET(he_cap, value) WMI_SET_BITS(he_cap, 5, 3, value)
  6698.  
  6699. /* 0 = no restriction on the minimum payload , 1 = 128 octets min, 2 = 256 octets min, 3 = 512 octets min */
  6700. #define WMI_HECAP_MAC_MINFRAGSZ_GET(he_cap) WMI_GET_BITS(he_cap, 8, 2)
  6701. #define WMI_HECAP_MAC_MINFRAGSZ_SET(he_cap, value) WMI_SET_BITS(he_cap, 8, 2, value)
  6702.  
  6703. /*0 = no additional processing time, 1 = 8us,2 = 16us */
  6704. #define WMI_HECAP_MAC_TRIGPADDUR_GET(he_cap) WMI_GET_BITS(he_cap, 10, 2)
  6705. #define WMI_HECAP_MAC_TRIGPADDUR_SET(he_cap, value) WMI_SET_BITS(he_cap, 10, 2, value)
  6706.  
  6707. /*number of TIDs minus 1 of QoS Data frames that HE STA can aggregate in multi-TID AMPDU*/
  6708. #define WMI_HECAP_MAC_MTID_GET(he_cap) WMI_GET_BITS(he_cap, 12, 3)
  6709. #define WMI_HECAP_MAC_MTID_SET(he_cap, value) WMI_SET_BITS(he_cap, 12, 3, value)
  6710.  
  6711. /*0=No Feedback,2=Unsolicited,3=Both*/
  6712. #define WMI_HECAP_MAC_HELKAD_GET(he_cap) WMI_GET_BITS(he_cap, 15, 2)
  6713. #define WMI_HECAP_MAC_HELKAD_SET(he_cap, value) WMI_SET_BITS(he_cap, 15, 2, value)
  6714.  
  6715. /*Set to 1 for reception of AllAck support*/
  6716. #define WMI_HECAP_MAC_AACK_GET(he_cap) WMI_GET_BITS(he_cap, 17, 1)
  6717. #define WMI_HECAP_MAC_AACK_SET(he_cap, value) WMI_SET_BITS(he_cap, 17, 1, value)
  6718.  
  6719. /*Set to 1 if the STA supports reception of the UL MU Response Scheduling A-Control field*/
  6720. #define WMI_HECAP_MAC_ULMURSP_GET(he_cap) WMI_GET_BITS(he_cap, 18, 1)
  6721. #define WMI_HECAP_MAC_ULMURSP_SET(he_cap, value) WMI_SET_BITS(he_cap, 18, 1, value)
  6722.  
  6723. /*Set to 1 if the STA supports the BSR A-Control field functionality.*/
  6724. #define WMI_HECAP_MAC_BSR_GET(he_cap) WMI_GET_BITS(he_cap, 19, 1)
  6725. #define WMI_HECAP_MAC_BSR_SET(he_cap, value) WMI_SET_BITS(he_cap, 19, 1, value)
  6726.  
  6727. /*Set to 1 when the STA supports broadcast TWT functionality.*/
  6728. #define WMI_HECAP_MAC_BCSTTWT_GET(he_cap) WMI_GET_BITS(he_cap, 20, 1)
  6729. #define WMI_HECAP_MAC_BCSTTWT_SET(he_cap, value) WMI_SET_BITS(he_cap, 20, 1, value)
  6730.  
  6731. /*Set to 1 if STA supports rx of Multi-STA BA that has 32-bit Block Ack Bitmap*/
  6732. #define WMI_HECAP_MAC_32BITBA_GET(he_cap) WMI_GET_BITS(he_cap, 21, 1)
  6733. #define WMI_HECAP_MAC_32BITBA_SET(he_cap, value) WMI_SET_BITS(he_cap, 21, 1, value)
  6734.  
  6735. /*Set to 1 if the STA supports MU cascading operation*/
  6736. #define WMI_HECAP_MAC_MUCASCADE_GET(he_cap) WMI_GET_BITS(he_cap, 22, 1)
  6737. #define WMI_HECAP_MAC_MUCASCADE_SET(he_cap, value) WMI_SET_BITS(he_cap, 22, 1, value)
  6738.  
  6739. /*Set to 1 when the STA supports reception of this multi-TID A-MPDU format*/
  6740. #define WMI_HECAP_MAC_ACKMTIDAMPDU_GET(he_cap) WMI_GET_BITS(he_cap, 23, 1)
  6741. #define WMI_HECAP_MAC_ACKMTIDAMPDU_SET(he_cap, value) WMI_SET_BITS(he_cap, 23, 1, value)
  6742.  
  6743. /*Set to 1 when the STA supports its reception*/
  6744. #define WMI_HECAP_MAC_GROUPMSTABA_GET(he_cap) WMI_GET_BITS(he_cap, 24, 1)
  6745. #define WMI_HECAP_MAC_GROUPMSTABA_SET(he_cap, value) WMI_SET_BITS(he_cap, 24, 1, value)
  6746.  
  6747. /*Set to 1 if the STA supports reception of the OMI A-Control field*/
  6748. #define WMI_HECAP_MAC_OMI_GET(he_cap) WMI_GET_BITS(he_cap, 25, 1)
  6749. #define WMI_HECAP_MAC_OMI_SET(he_cap, value) WMI_SET_BITS(he_cap, 25, 1, value)
  6750.  
  6751. /*1 if OFDMA Random Access Supported*/
  6752. #define WMI_HECAP_MAC_OFDMARA_GET(he_cap) WMI_GET_BITS(he_cap, 26, 1)
  6753. #define WMI_HECAP_MAC_OFDMARA_SET(he_cap, value) WMI_SET_BITS(he_cap, 26, 1, value)
  6754.  
  6755. /* Maximum AMPDU Length Exponent.
  6756. * If the HE STA includes a VHT Capabilities element, the Maximum A-MPDU Length Exponent subfield in
  6757. * HE Capabilities element combined with the Maximum A-MPDU Length Exponent subfield in VHT
  6758. * Capabilities element indicate the maximum length of A-MPDU that the STA can Receive where EOF
  6759. * padding is not included in this limit.
  6760. */
  6761. #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_GET(he_cap) WMI_GET_BITS(he_cap, 27, 2)
  6762. #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_SET(he_cap, value) WMI_SET_BITS(he_cap, 27, 2, value)
  6763.  
  6764. /*A-MSDU Fragmentation Support*/
  6765. #define WMI_HECAP_MAC_AMSDUFRAG_GET(he_cap) WMI_GET_BITS(he_cap, 29, 1)
  6766. #define WMI_HECAP_MAC_AMSDUFRAG_SET(he_cap, value) WMI_SET_BITS(he_cap, 29, 1, value)
  6767.  
  6768. /*Flexible TWT Schedule Support*/
  6769. #define WMI_HECAP_MAC_FLEXTWT_GET(he_cap) WMI_GET_BITS(he_cap, 30, 1)
  6770. #define WMI_HECAP_MAC_FLEXTWT_SET(he_cap, value) WMI_SET_BITS(he_cap, 30, 1, value)
  6771.  
  6772. /*Rx Control Frame to MultiBSS*/
  6773. #define WMI_HECAP_MAC_MBSS_GET(he_cap) WMI_GET_BITS(he_cap, 31, 1)
  6774. #define WMI_HECAP_MAC_MBSS_SET(he_cap, value) WMI_SET_BITS(he_cap, 31, 1, value)
  6775.  
  6776. /*BSRP A-MPDU Aggregation
  6777. maintaining compatability since we dont support this now so not wasting memory*/
  6778. #define WMI_HECAP_MAC_BSRPAMPDU_GET(he_cap) (0)
  6779. #define WMI_HECAP_MAC_BSRPAMPDU_SET(he_cap, value) {;}
  6780.  
  6781. /* Quiet Time Period (QTP) operation
  6782. maintaining compatability since we dont support this now so not wasting memory*/
  6783. #define WMI_HECAP_MAC_QTP_GET(he_cap) (0)
  6784. #define WMI_HECAP_MAC_QTP_SET(he_cap, value) {;}
  6785.  
  6786. /*support by an AP for receiving an (A-)MPDU that contains a BQR in the
  6787. A-Control subfield and support by a non-AP STA for generating an (A-)MPDU
  6788. that contains a BQR in the A-Control subfield
  6789. maintaining compatability since we dont support this now so not wasting memory*/
  6790. #define WMI_HECAP_MAC_ABQR_GET(he_cap) (0)
  6791. #define WMI_HECAP_MAC_ABQR_SET(he_cap, value) {;}
  6792.  
  6793. /*BELOW MACROS ARE DEPRECATED Also we are not defining bits for capabilities
  6794. beyond bit 31 we donot support as it adds additional dword to our struct which may be later
  6795. removed by standard*/
  6796. #define WMI_HECAP_MAC_MBAHECTRL_GET(he_cap) (0) /* DO NOT USE - DEPRECATED*/
  6797. #define WMI_HECAP_MAC_MBAHECTRL_SET(he_cap, value) {;} /* DO NOT USE - DEPRECATED*/
  6798.  
  6799. #define WMI_HECAP_MAC_MURTS_GET(he_cap) (0) /* DO NOT USE - DEPRECATED*/
  6800. #define WMI_HECAP_MAC_MURTS_SET(he_cap, value) {;} /* DO NOT USE - DEPRECATED*/
  6801.  
  6802. /*Deprecate use WMI_HECAP_PHY_PREAMBLEPUNCRX instead*/
  6803. #define WMI_HECAP_PHY_CBMODE_GET(he_cap_phy) WMI_HECAP_PHY_CBMODE_GET(he_cap_phy)
  6804. #define WMI_HECAP_PHY_CBMODE_SET(he_cap_phy, value) WMI_HECAP_PHY_CBMODE_SET(he_cap_phy, value)
  6805.  
  6806.  
  6807. /*DEPRECATED - USE WMI_HECAP_PHY_BFMENLTSGT80MHZ*/
  6808. #define WMI_HECAP_PHY_SUBFMESTS_GET(he_cap_phy) WMI_HECAP_PHY_BFMESTSLT80MHZ_GET(he_cap_phy)
  6809. #define WMI_HECAP_PHY_SUBFMESTS_SET(he_cap_phy, value) WMI_HECAP_PHY_BFMESTSLT80MHZ_SET(he_cap_phy, value)
  6810.  
  6811. /*DEPRECATED - use WMI_HECAP_PHY_PETHRESPRESENT**/
  6812. #define WMI_HECAP_PHY_PADDING_GET(he_cap_phy) WMI_HECAP_PHY_PETHRESPRESENT_GET(he_cap_phy)
  6813. #define WMI_HECAP_PHY_PADDING_SET(he_cap_phy, value) WMI_HECAP_PHY_PETHRESPRESENT_SET(he_cap_phy, value)
  6814.  
  6815.  
  6816. /**DO NOT USE - DEPRECATED*/
  6817. #define WMI_HECAP_PHY_DLOFMAMUMIMO_GET(he_cap_phy) (0)
  6818. #define WMI_HECAP_PHY_DLOFDMAMUMIO_SET(he_cap_phy, value) {;}
  6819.  
  6820. /*DO NOT USE - DEPRECATED**/
  6821. #define WMI_HECAP_PHY_32GI_GET(he_cap_phy) (0)
  6822. #define WMI_HECAP_PHY_32GI_SET(he_cap_phy, value) {;}
  6823.  
  6824. /*DO NOT USE - DEPRECATED**/
  6825. #define WMI_HECAP_PHY_NOSUNDIMENS_GET(he_cap_phy) (0)
  6826. #define WMI_HECAP_PHY_NOSUNDIMENS_SET(he_cap_phy, value) {;}
  6827.  
  6828. /*DO NOT USE - DEPRECATED**/
  6829. #define WMI_HECAP_PHY_40MHZNSS_GET(he_cap_phy)(0)
  6830. #define WMI_HECAP_PHY_40MHZNSS_SET(he_cap_phy, value) {;}
  6831.  
  6832.  
  6833.  
  6834.  
  6835.  
  6836.  
  6837.  
  6838.  
  6839.  
  6840. #define WMI_GET_HW_RATECODE_PREAM_V1(_rcode) (((_rcode) >> 8) & 0x7)
  6841. #define WMI_GET_HW_RATECODE_NSS_V1(_rcode) (((_rcode) >> 5) & 0x7)
  6842. #define WMI_GET_HW_RATECODE_RATE_V1(_rcode) (((_rcode) >> 0) & 0x1F)
  6843. #define WMI_ASSEMBLE_RATECODE_V1(_rate, _nss, _pream) \
  6844. (((1) << 28) | ((_pream) << 8) | ((_nss) << 5) | (_rate))
  6845.  
  6846. typedef struct {
  6847. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_start_request_cmd_fixed_param */
  6848. /** unique id identifying the VDEV, generated by the caller */
  6849. A_UINT32 vdev_id;
  6850. /** requestor id identifying the caller module */
  6851. A_UINT32 requestor_id;
  6852. /** beacon interval from received beacon */
  6853. A_UINT32 beacon_interval;
  6854. /** DTIM Period from the received beacon */
  6855. A_UINT32 dtim_period;
  6856. /** Flags */
  6857. A_UINT32 flags;
  6858. /** ssid field. Only valid for AP/GO/IBSS/BTAmp VDEV type. */
  6859. wmi_ssid ssid;
  6860. /** beacon/probe reponse xmit rate. Applicable for SoftAP. */
  6861. /** This field will be invalid and ignored unless the */
  6862. /** flags field has the WMI_UNIFIED_VDEV_START_BCN_TX_RATE_PRESENT bit. */
  6863. /** When valid, this field contains the fixed tx rate for the beacon */
  6864. /** and probe response frames send by the GO or SoftAP */
  6865. A_UINT32 bcn_tx_rate;
  6866. /** beacon/probe reponse xmit power. Applicable for SoftAP. */
  6867. A_UINT32 bcn_txPower;
  6868. /** number of p2p NOA descriptor(s) from scan entry */
  6869. A_UINT32 num_noa_descriptors;
  6870. /** Disable H/W ack. This used by WMI_VDEV_RESTART_REQUEST_CMDID.
  6871. During CAC, Our HW shouldn't ack ditected frames */
  6872. A_UINT32 disable_hw_ack;
  6873. /** This field will be invalid unless the Dual Band Simultaneous (DBS) feature is enabled. */
  6874. /** The DBS policy manager indicates the preferred number of transmit streams. */
  6875. A_UINT32 preferred_tx_streams;
  6876. /** This field will be invalid unless the Dual Band Simultaneous (DBS) feature is enabled. */
  6877. /** the DBS policy manager indicates the preferred number of receive streams. */
  6878. A_UINT32 preferred_rx_streams;
  6879. A_UINT32 he_ops; /* refer to WMI_HEOPS_xxx macros */
  6880. A_UINT32 cac_duration_ms; /* in milliseconds */
  6881. A_UINT32 regdomain;
  6882. /* The TLVs follows this structure:
  6883. * wmi_channel chan; <-- WMI channel
  6884. * wmi_p2p_noa_descriptor noa_descriptors[]; <-- actual p2p NOA descriptor from scan entry
  6885. */
  6886. } wmi_vdev_start_request_cmd_fixed_param;
  6887.  
  6888. typedef struct {
  6889. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_delete_cmd_fixed_param */
  6890. /** unique id identifying the VDEV, generated by the caller */
  6891. A_UINT32 vdev_id;
  6892. } wmi_vdev_delete_cmd_fixed_param;
  6893.  
  6894. typedef struct {
  6895. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_up_cmdid_fixed_param */
  6896. /** unique id identifying the VDEV, generated by the caller */
  6897. A_UINT32 vdev_id;
  6898. /** aid (assoc id) received in association response for STA VDEV */
  6899. A_UINT32 vdev_assoc_id;
  6900. /** bssid of the BSS the VDEV is joining */
  6901. wmi_mac_addr vdev_bssid;
  6902. /** bssid of transmitted AP (mbssid case) */
  6903. wmi_mac_addr trans_bssid;
  6904. /** the profile index of the connected non-trans ap (mbssid case). 0 means invalid */
  6905. A_UINT32 profile_idx;
  6906. /** the total profile numbers of non-trans aps (mbssid case). 0 means legacy AP */
  6907. A_UINT32 profile_num;
  6908. } wmi_vdev_up_cmd_fixed_param;
  6909.  
  6910. typedef struct {
  6911. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_stop_cmd_fixed_param */
  6912. /** unique id identifying the VDEV, generated by the caller */
  6913. A_UINT32 vdev_id;
  6914. } wmi_vdev_stop_cmd_fixed_param;
  6915.  
  6916. typedef struct {
  6917. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_down_cmd_fixed_param */
  6918. /** unique id identifying the VDEV, generated by the caller */
  6919. A_UINT32 vdev_id;
  6920. } wmi_vdev_down_cmd_fixed_param;
  6921.  
  6922. typedef struct {
  6923. /** unique id identifying the VDEV, generated by the caller */
  6924. A_UINT32 vdev_id;
  6925. } wmi_vdev_standby_response_cmd;
  6926.  
  6927. typedef struct {
  6928. /** unique id identifying the VDEV, generated by the caller */
  6929. A_UINT32 vdev_id;
  6930. } wmi_vdev_resume_response_cmd;
  6931.  
  6932. typedef struct {
  6933. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_param_cmd_fixed_param */
  6934. /** unique id identifying the VDEV, generated by the caller */
  6935. A_UINT32 vdev_id;
  6936. /** parameter id */
  6937. A_UINT32 param_id;
  6938. /** parameter value */
  6939. A_UINT32 param_value;
  6940. } wmi_vdev_set_param_cmd_fixed_param;
  6941.  
  6942. typedef struct {
  6943. A_UINT32 key_seq_counter_l;
  6944. A_UINT32 key_seq_counter_h;
  6945. } wmi_key_seq_counter;
  6946.  
  6947. #define WMI_CIPHER_NONE 0x0 /* clear key */
  6948. #define WMI_CIPHER_WEP 0x1
  6949. #define WMI_CIPHER_TKIP 0x2
  6950. #define WMI_CIPHER_AES_OCB 0x3
  6951. #define WMI_CIPHER_AES_CCM 0x4
  6952. #define WMI_CIPHER_WAPI 0x5
  6953. #define WMI_CIPHER_CKIP 0x6
  6954. #define WMI_CIPHER_AES_CMAC 0x7
  6955. #define WMI_CIPHER_ANY 0x8
  6956. #define WMI_CIPHER_AES_GCM 0x9
  6957. #define WMI_CIPHER_AES_GMAC 0xa
  6958. #define WMI_CIPHER_WAPI_GCM_SM4 0xb
  6959.  
  6960. typedef struct {
  6961. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_install_key_cmd_fixed_param */
  6962. /** unique id identifying the VDEV, generated by the caller */
  6963. A_UINT32 vdev_id;
  6964. /** MAC address used for installing */
  6965. wmi_mac_addr peer_macaddr;
  6966. /** key index */
  6967. A_UINT32 key_ix;
  6968. /** key flags */
  6969. A_UINT32 key_flags;
  6970. /** key cipher, defined above */
  6971. A_UINT32 key_cipher;
  6972. /** key rsc counter */
  6973. wmi_key_seq_counter key_rsc_counter;
  6974. /** global key rsc counter */
  6975. wmi_key_seq_counter key_global_rsc_counter;
  6976. /** global key tsc counter */
  6977. wmi_key_seq_counter key_tsc_counter;
  6978. /** WAPI key rsc counter */
  6979. A_UINT8 wpi_key_rsc_counter[16];
  6980. /** WAPI key tsc counter */
  6981. A_UINT8 wpi_key_tsc_counter[16];
  6982. /** key length */
  6983. A_UINT32 key_len;
  6984. /** key tx mic length */
  6985. A_UINT32 key_txmic_len;
  6986. /** key rx mic length */
  6987. A_UINT32 key_rxmic_len;
  6988. /*
  6989. * Following this struct are this TLV.
  6990. * A_UINT8 key_data[]; <-- actual key data; contains key followed by tx mic followed by rx mic
  6991. */
  6992. } wmi_vdev_install_key_cmd_fixed_param;
  6993.  
  6994. /** Preamble types to be used with VDEV fixed rate configuration */
  6995. typedef enum {
  6996. WMI_RATE_PREAMBLE_OFDM,
  6997. WMI_RATE_PREAMBLE_CCK,
  6998. WMI_RATE_PREAMBLE_HT,
  6999. WMI_RATE_PREAMBLE_VHT,
  7000. WMI_RATE_PREAMBLE_HE,
  7001. } WMI_RATE_PREAMBLE;
  7002.  
  7003. /** Value to disable fixed rate setting */
  7004. #define WMI_FIXED_RATE_NONE (0xff)
  7005.  
  7006. #define WMI_GI_400_NS 1
  7007. #define WMI_GI_800_NS 0
  7008. #define WMI_GI_1600_NS 2
  7009. #define WMI_GI_3200_NS 3
  7010.  
  7011. /** the definition of different VDEV parameters */
  7012. typedef enum {
  7013. /** RTS Threshold */
  7014. WMI_VDEV_PARAM_RTS_THRESHOLD = 0x1,
  7015. /** Fragmentation threshold */
  7016. WMI_VDEV_PARAM_FRAGMENTATION_THRESHOLD,
  7017. /** beacon interval in TUs */
  7018. WMI_VDEV_PARAM_BEACON_INTERVAL,
  7019. /** Listen interval in TUs */
  7020. WMI_VDEV_PARAM_LISTEN_INTERVAL,
  7021. /** muticast rate in Mbps */
  7022. WMI_VDEV_PARAM_MULTICAST_RATE,
  7023. /** management frame rate in Mbps */
  7024. WMI_VDEV_PARAM_MGMT_TX_RATE,
  7025. /** slot time (long vs short) */
  7026. WMI_VDEV_PARAM_SLOT_TIME,
  7027. /** preamble (long vs short) */
  7028. WMI_VDEV_PARAM_PREAMBLE,
  7029. /** SWBA time (time before tbtt in msec) */
  7030. WMI_VDEV_PARAM_SWBA_TIME,
  7031. /** time period for updating VDEV stats */
  7032. WMI_VDEV_STATS_UPDATE_PERIOD,
  7033. /** age out time in msec for frames queued for station in power save*/
  7034. WMI_VDEV_PWRSAVE_AGEOUT_TIME,
  7035. /** Host SWBA interval (time in msec before tbtt for SWBA event generation) */
  7036. WMI_VDEV_HOST_SWBA_INTERVAL,
  7037. /** DTIM period (specified in units of num beacon intervals) */
  7038. WMI_VDEV_PARAM_DTIM_PERIOD,
  7039. /** scheduler air time limit for this VDEV. used by off chan scheduler */
  7040. WMI_VDEV_OC_SCHEDULER_AIR_TIME_LIMIT,
  7041. /** enable/dsiable WDS for this VDEV */
  7042. WMI_VDEV_PARAM_WDS,
  7043. /** ATIM Window */
  7044. WMI_VDEV_PARAM_ATIM_WINDOW,
  7045. /** BMISS max */
  7046. WMI_VDEV_PARAM_BMISS_COUNT_MAX,
  7047. /** BMISS first time */
  7048. WMI_VDEV_PARAM_BMISS_FIRST_BCNT,
  7049. /** BMISS final time */
  7050. WMI_VDEV_PARAM_BMISS_FINAL_BCNT,
  7051. /** WMM enables/disabled */
  7052. WMI_VDEV_PARAM_FEATURE_WMM,
  7053. /** Channel width */
  7054. WMI_VDEV_PARAM_CHWIDTH,
  7055. /** Channel Offset */
  7056. WMI_VDEV_PARAM_CHEXTOFFSET,
  7057. /** Disable HT Protection */
  7058. WMI_VDEV_PARAM_DISABLE_HTPROTECTION,
  7059. /** Quick STA Kickout */
  7060. WMI_VDEV_PARAM_STA_QUICKKICKOUT,
  7061. /** Rate to be used with Management frames */
  7062. WMI_VDEV_PARAM_MGMT_RATE,
  7063. /** Protection Mode */
  7064. WMI_VDEV_PARAM_PROTECTION_MODE,
  7065. /** Fixed rate setting
  7066. * The top nibble is used to select which format to use for encoding
  7067. * the rate specification: 0xVXXXXXXX
  7068. * If V == 0b0000: format is same as before: 0x000000RR
  7069. * If V == 0b0001: format is: 0x1000RRRR.
  7070. * This will be output of WMI_ASSEMBLE_RATECODE_V1
  7071. * The host shall use the new V1 format (and set V = 0x1) if the target
  7072. * indicates 802.11ax support via the WMI_SERVICE_11AX flag, or if the
  7073. * system is configured with Nss > 4 (either at compile time within the
  7074. * host driver, or through WMI_SERVICE_READY PHY capabilities provided
  7075. * by the target).
  7076. */
  7077. WMI_VDEV_PARAM_FIXED_RATE,
  7078. /**
  7079. * 11AX: GI =
  7080. * WMI_GI_400_NS, WMI_GI_800_NS, WMI_GI_1600_NS, or WMI_GI_3200_NS
  7081. * 11N: SGI=WMI_GI_400_NS
  7082. */
  7083. WMI_VDEV_PARAM_SGI,
  7084. /** Enable LDPC */
  7085. WMI_VDEV_PARAM_LDPC,
  7086. /** Enable Tx STBC */
  7087. WMI_VDEV_PARAM_TX_STBC,
  7088. /** Enable Rx STBC */
  7089. WMI_VDEV_PARAM_RX_STBC,
  7090. /** Intra BSS forwarding */
  7091. WMI_VDEV_PARAM_INTRA_BSS_FWD,
  7092. /** Setting Default xmit key for Vdev */
  7093. WMI_VDEV_PARAM_DEF_KEYID,
  7094. /** NSS width */
  7095. WMI_VDEV_PARAM_NSS,
  7096. /** Set the custom rate for the broadcast data frames */
  7097. WMI_VDEV_PARAM_BCAST_DATA_RATE,
  7098. /** Set the custom rate (rate-code) for multicast data frames */
  7099. WMI_VDEV_PARAM_MCAST_DATA_RATE,
  7100. /** Tx multicast packet indicate Enable/Disable */
  7101. WMI_VDEV_PARAM_MCAST_INDICATE,
  7102. /** Tx DHCP packet indicate Enable/Disable */
  7103. WMI_VDEV_PARAM_DHCP_INDICATE,
  7104. /** Enable host inspection of Tx unicast packet to unknown destination */
  7105. WMI_VDEV_PARAM_UNKNOWN_DEST_INDICATE,
  7106.  
  7107. /* The minimum amount of time AP begins to consider STA inactive */
  7108. WMI_VDEV_PARAM_AP_KEEPALIVE_MIN_IDLE_INACTIVE_TIME_SECS,
  7109.  
  7110. /* An associated STA is considered inactive when there is no recent TX/RX
  7111. * activity and no downlink frames are buffered for it. Once a STA exceeds
  7112. * the maximum idle inactive time, the AP will send an 802.11 data-null as
  7113. * a keep alive to verify the STA is still associated. If the STA does ACK
  7114. * the data-null, or if the data-null is buffered and the STA does not
  7115. * retrieve it, the STA will be considered unresponsive (see
  7116. * WMI_VDEV_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS). */
  7117. WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_IDLE_INACTIVE_TIME_SECS,
  7118.  
  7119. /* An associated STA is considered unresponsive if there is no recent
  7120. * TX/RX activity and downlink frames are buffered for it. Once a STA
  7121. * exceeds the maximum unresponsive time, the AP will send a
  7122. * WMI_STA_KICKOUT event to the host so the STA can be deleted. */
  7123. WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS,
  7124.  
  7125. /* Enable NAWDS : MCAST INSPECT Enable, NAWDS Flag set */
  7126. WMI_VDEV_PARAM_AP_ENABLE_NAWDS,
  7127. /** Enable/Disable RTS-CTS */
  7128. WMI_VDEV_PARAM_ENABLE_RTSCTS,
  7129. /* Enable TXBFee/er */
  7130. WMI_VDEV_PARAM_TXBF,
  7131.  
  7132. /**Set packet power save */
  7133. WMI_VDEV_PARAM_PACKET_POWERSAVE,
  7134.  
  7135. /**Drops un-encrypted packets if any received in an encryted connection
  7136. * otherwise forwards to host
  7137. */
  7138. WMI_VDEV_PARAM_DROP_UNENCRY,
  7139.  
  7140. /*
  7141. * Set TX encap type.
  7142. *
  7143. * enum wmi_pkt_type is to be used as the parameter
  7144. * specifying the encap type.
  7145. */
  7146. WMI_VDEV_PARAM_TX_ENCAP_TYPE,
  7147.  
  7148. /*
  7149. * Try to detect stations that woke-up and exited power save but did not
  7150. * successfully transmit data-null with PM=0 to AP. When this happens,
  7151. * STA and AP power save state are out-of-sync. Use buffered but
  7152. * undelivered MSDU to the STA as a hint that the STA is really awake
  7153. * and expecting normal ASAP delivery, rather than retrieving BU with
  7154. * PS-Poll, U-APSD trigger, etc.
  7155. *
  7156. * 0 disables out-of-sync detection. Maximum time is 255 seconds.
  7157. */
  7158. WMI_VDEV_PARAM_AP_DETECT_OUT_OF_SYNC_SLEEPING_STA_TIME_SECS,
  7159.  
  7160. /* Enable/Disable early rx dynamic adjust feature.
  7161. * Early-rx dynamic adjust is a advance power save feature.
  7162. * Early-rx is a wakeup duration before exact TBTT,which is deemed necessary to provide a cushion for various
  7163. * timing discrepancies in the system.
  7164. * In current code branch, the duration is set to a very conservative fix value to make sure the drift impact is minimum.
  7165. * The fix early-tx will result in the unnessary power consume, so a dynamic early-rx adjust algorithm can be designed
  7166. * properly to minimum the power consume.*/
  7167. WMI_VDEV_PARAM_EARLY_RX_ADJUST_ENABLE,
  7168.  
  7169. /* set target bmiss number per sample cycle if bmiss adjust was chosen.
  7170. * In this adjust policy,early-rx is adjusted by comparing the current bmiss rate to target bmiss rate
  7171. * which can be set by user through WMI command.
  7172. */
  7173. WMI_VDEV_PARAM_EARLY_RX_TGT_BMISS_NUM,
  7174.  
  7175. /* set sample cycle(in the unit of beacon interval) if bmiss adjust was chosen */
  7176. WMI_VDEV_PARAM_EARLY_RX_BMISS_SAMPLE_CYCLE,
  7177.  
  7178. /* set slop_step */
  7179. WMI_VDEV_PARAM_EARLY_RX_SLOP_STEP,
  7180.  
  7181. /* set init slop */
  7182. WMI_VDEV_PARAM_EARLY_RX_INIT_SLOP,
  7183.  
  7184. /* pause adjust enable/disable */
  7185. WMI_VDEV_PARAM_EARLY_RX_ADJUST_PAUSE,
  7186.  
  7187.  
  7188. /* Set channel pwr limit value of the vdev the minimal value of all
  7189. * vdevs operating on this channel will be set as channel tx power
  7190. * limit, which is used to configure ratearray
  7191. */
  7192. WMI_VDEV_PARAM_TX_PWRLIMIT,
  7193.  
  7194. /* set the count of snr value for calculation in snr monitor */
  7195. WMI_VDEV_PARAM_SNR_NUM_FOR_CAL,
  7196.  
  7197. /** Roaming offload */
  7198. WMI_VDEV_PARAM_ROAM_FW_OFFLOAD,
  7199.  
  7200. /** Enable Leader request RX functionality for RMC */
  7201. WMI_VDEV_PARAM_ENABLE_RMC,
  7202.  
  7203. /* IBSS does not have deauth/disassoc, vdev has to detect peer gone event
  7204. * by himself. If the beacon lost time exceed this threshold, the peer is
  7205. * thought to be gone. */
  7206. WMI_VDEV_PARAM_IBSS_MAX_BCN_LOST_MS,
  7207.  
  7208. /** max rate in kpbs, transmit rate can't go beyond it */
  7209. WMI_VDEV_PARAM_MAX_RATE,
  7210.  
  7211. /* enable/disable drift sample. 0: disable; 1: clk_drift; 2: ap_drift; 3 both clk and ap drift*/
  7212. WMI_VDEV_PARAM_EARLY_RX_DRIFT_SAMPLE,
  7213.  
  7214. /* set Tx failure count threshold for the vdev */
  7215. WMI_VDEV_PARAM_SET_IBSS_TX_FAIL_CNT_THR,
  7216.  
  7217. /* set ebt resync timeout value, in the unit of TU */
  7218. WMI_VDEV_PARAM_EBT_RESYNC_TIMEOUT,
  7219.  
  7220. /* Enable Aggregation State Trigger Event */
  7221. WMI_VDEV_PARAM_AGGR_TRIG_EVENT_ENABLE,
  7222.  
  7223. /* This parameter indicates whether IBSS station can enter into power save
  7224. * mode by sending Null frame (with PM=1). When not allowed, IBSS station has to stay
  7225. * awake all the time and should never set PM=1 in its transmitted frames.
  7226. * This parameter is meaningful/valid only when WMI_VDEV_PARAM_ATIM_WINDOW_LENGTH
  7227. * is non-zero. */
  7228. WMI_VDEV_PARAM_IS_IBSS_POWER_SAVE_ALLOWED,
  7229.  
  7230. /* This parameter indicates if this station can enter into power collapse
  7231. * for the remaining beacon interval after the ATIM window.
  7232. * This parameter is meaningful/valid only when WMI_VDEV_PARAM_IS_IBSS_POWER_SAVE_ALLOWED
  7233. * is set to TRUE. */
  7234. WMI_VDEV_PARAM_IS_POWER_COLLAPSE_ALLOWED,
  7235.  
  7236. /* This parameter indicates whether IBSS station exit power save mode and
  7237. * enter power active state (by sending Null frame with PM=0 in the immediate ATIM Window)
  7238. * whenever there is a TX/RX activity. */
  7239. WMI_VDEV_PARAM_IS_AWAKE_ON_TXRX_ENABLED,
  7240.  
  7241. /* If Awake on TX/RX activity is enabled, this parameter indicates
  7242. * the data inactivity time in number of beacon intervals after which
  7243. * IBSS station reenters power save by sending Null frame with PM=1. */
  7244. WMI_VDEV_PARAM_INACTIVITY_CNT,
  7245.  
  7246. /* Inactivity time in msec after which TX Service Period (SP) is
  7247. * terminated by sending a Qos Null frame with EOSP.
  7248. * If value is 0, TX SP is terminated with the last buffered packet itself
  7249. * instead of waiting for the inactivity timeout. */
  7250. WMI_VDEV_PARAM_TXSP_END_INACTIVITY_TIME_MS,
  7251.  
  7252. /** DTIM policy */
  7253. WMI_VDEV_PARAM_DTIM_POLICY,
  7254.  
  7255. /* When IBSS network is initialized, PS-supporting device
  7256. * does not enter protocol sleep state during first
  7257. * WMI_VDEV_PARAM_IBSS_PS_WARMUP_TIME_SECS seconds. */
  7258. WMI_VDEV_PARAM_IBSS_PS_WARMUP_TIME_SECS,
  7259.  
  7260. /* Enable/Disable 1 RX chain usage during the ATIM window */
  7261. WMI_VDEV_PARAM_IBSS_PS_1RX_CHAIN_IN_ATIM_WINDOW_ENABLE,
  7262.  
  7263. /* RX Leak window is the time driver waits before shutting down
  7264. * the radio or switching the channel and after receiving an ACK
  7265. * for a data frame with PM bit set) */
  7266. WMI_VDEV_PARAM_RX_LEAK_WINDOW,
  7267.  
  7268. /** Averaging factor(16 bit value) is used in the calculations to
  7269. * perform averaging of different link level statistics like average
  7270. * beacon spread or average number of frames leaked */
  7271. WMI_VDEV_PARAM_STATS_AVG_FACTOR,
  7272.  
  7273. /** disconnect threshold, once the consecutive error for specific peer
  7274. * exceed this threhold, FW will send kickout event to host */
  7275. WMI_VDEV_PARAM_DISCONNECT_TH,
  7276.  
  7277. /** The rate_code of RTS_CTS changed by host. Now FW can support
  7278. * more non-HT rates rather than 1Mbps or 6Mbps */
  7279. WMI_VDEV_PARAM_RTSCTS_RATE,
  7280.  
  7281. /** This parameter indicates whether using a long duration RTS-CTS
  7282. * protection when a SAP goes off channel in MCC mode */
  7283. WMI_VDEV_PARAM_MCC_RTSCTS_PROTECTION_ENABLE,
  7284.  
  7285. /** This parameter indicates whether using a broadcast probe response
  7286. * to increase the detectability of SAP in MCC mode */
  7287. WMI_VDEV_PARAM_MCC_BROADCAST_PROBE_ENABLE,
  7288.  
  7289. /** This parameter indicates the power backoff in percentage
  7290. * currently supports 100%, 50%, 25%, 12.5%, and minimum
  7291. * Host passes 0, 1, 2, 3, 4 to Firmware
  7292. * 0 --> 100% --> no changes, 1 --> 50% --> -3dB,
  7293. * 2 --> 25% --> -6dB, 3 --> 12.5% --> -9dB, 4 --> minimum --> -32dB
  7294. */
  7295. WMI_VDEV_PARAM_TXPOWER_SCALE,
  7296.  
  7297. /** TX power backoff in dB: tx power -= param value
  7298. * Host passes values(DB) to Halphy, Halphy reduces the power table
  7299. * by the values. Safety check will happen in Halphy.
  7300. */
  7301. WMI_VDEV_PARAM_TXPOWER_SCALE_DECR_DB,
  7302.  
  7303. /** Multicast to Unicast conversion setting */
  7304. WMI_VDEV_PARAM_MCAST2UCAST_SET,
  7305.  
  7306. /** Total number of HW retries */
  7307. WMI_VDEV_PARAM_RC_NUM_RETRIES,
  7308.  
  7309. /** Max tx percentage for cabq */
  7310. WMI_VDEV_PARAM_CABQ_MAXDUR,
  7311.  
  7312. /** MFPTEST settings */
  7313. WMI_VDEV_PARAM_MFPTEST_SET,
  7314.  
  7315. /** RTS Fixed rate setting */
  7316. WMI_VDEV_PARAM_RTS_FIXED_RATE,
  7317.  
  7318. /** VHT SGI MASK */
  7319. WMI_VDEV_PARAM_VHT_SGIMASK,
  7320.  
  7321. /** VHT80 Auto Rate MASK */
  7322. WMI_VDEV_PARAM_VHT80_RATEMASK,
  7323.  
  7324. /** set Proxy STA features for this vap */
  7325. WMI_VDEV_PARAM_PROXY_STA,
  7326.  
  7327. /** set virtual cell mode - enable/disable */
  7328. WMI_VDEV_PARAM_VIRTUAL_CELL_MODE,
  7329.  
  7330. /** Set receive packet type */
  7331. WMI_VDEV_PARAM_RX_DECAP_TYPE,
  7332.  
  7333. /** Set ratemask with specific Bandwidth and NSS */
  7334. WMI_VDEV_PARAM_BW_NSS_RATEMASK,
  7335.  
  7336. /** Set SENSOR Support */
  7337. WMI_VDEV_PARAM_SENSOR_AP,
  7338.  
  7339. /** Set beacon rate */
  7340. WMI_VDEV_PARAM_BEACON_RATE,
  7341.  
  7342. /** Enable CTS to self for DTIM beacon */
  7343. WMI_VDEV_PARAM_DTIM_ENABLE_CTS,
  7344.  
  7345. /** Disable station kickout at Vap level */
  7346. WMI_VDEV_PARAM_STA_KICKOUT,
  7347.  
  7348. /* VDEV capabilities */
  7349. WMI_VDEV_PARAM_CAPABILITIES, /* see capabilities defs below */
  7350.  
  7351. /**
  7352. * Increment TSF in micro seconds to avoid beacon collision on mesh VAP.
  7353. * The host must ensure that either no other vdevs share the TSF with
  7354. * this vdev, or else that it is acceptable to apply this TSF adjustment
  7355. * to all vdevs sharing the TSF.
  7356. */
  7357. WMI_VDEV_PARAM_TSF_INCREMENT,
  7358.  
  7359. /** Disable/Enable AMPDU of vdev per AC:
  7360. * bit | AC
  7361. * --------
  7362. * 0 | VO
  7363. * 1 | VI
  7364. * 2 | BE
  7365. * 3 | BK
  7366. * A value of 0 in a given bit disables A-MPDU aggregation for
  7367. * that AC; a value of 1 enables A-MPDU aggregation
  7368. */
  7369. WMI_VDEV_PARAM_AMPDU_PER_AC,
  7370.  
  7371. /**
  7372. * Vdev level rx filter of from-ds / to-ds / no-ds / ta / ra frames.
  7373. * Used mainly for mesh-vap.
  7374. * The parameter value delivered with the RX_FILTER vdev param contains
  7375. * a bit-or mask of wmi_vdev_param_filter enum values.
  7376. */
  7377. WMI_VDEV_PARAM_RX_FILTER,
  7378.  
  7379. /** vdev-specific mgmt tx power in dBm units (signed integer value) */
  7380. WMI_VDEV_PARAM_MGMT_TX_POWER,
  7381.  
  7382. /** Vdev level non aggregration/11g sw retry threshold. 0-disable, min:0, max:31, default:15 */
  7383. WMI_VDEV_PARAM_NON_AGG_SW_RETRY_TH,
  7384. /** Vdev level aggregration sw retry threshold. 0-disable, min:0, max:31, default:15 */
  7385. WMI_VDEV_PARAM_AGG_SW_RETRY_TH,
  7386.  
  7387. /** disable dynamic bw RTS **/
  7388. WMI_VDEV_PARAM_DISABLE_DYN_BW_RTS,
  7389.  
  7390. /** per ssid (vdev) based ATF strict/fair scheduling policy
  7391. * param values are WMI_ATF_SSID_FAIR_SCHED or WMI_ATF_SSID_STRICT_SCHED
  7392. */
  7393. WMI_VDEV_PARAM_ATF_SSID_SCHED_POLICY,
  7394.  
  7395. /** Enable or disable Dual carrier modulation
  7396. * valid values: 0-Disable DCM, 1-Enable DCM.
  7397. */
  7398. WMI_VDEV_PARAM_HE_DCM,
  7399.  
  7400. /** Enable or disable Extended range
  7401. * valid values: 0-Disable ER, 1-Enable ER.
  7402. */
  7403. WMI_VDEV_PARAM_HE_RANGE_EXT,
  7404.  
  7405. /* enable or disable BCAST probe response feature */
  7406. WMI_VDEV_PARAM_ENABLE_BCAST_PROBE_RESPONSE,
  7407.  
  7408. /* param to specify probe request Tx delay during Fast Initial Link Setup */
  7409. WMI_VDEV_PARAM_FILS_MAX_CHANNEL_GUARD_TIME, /* units = milliseconds */
  7410.  
  7411. /* enable or disable NOA for P2P GO */
  7412. WMI_VDEV_PARAM_DISABLE_NOA_P2P_GO,
  7413.  
  7414. /** Per band user management frame fix rate setting
  7415. * BIT 31: enable (1) or disable (0) mgmt fix rate for 5G
  7416. * BIT 30: enable (1) or disable (0) mgmt fix rate for 2G
  7417. *
  7418. * BIT 23: 11ax (1) or legacy (0) rate code
  7419. * BITS [22..12]: rate code for 5G
  7420. *
  7421. * BIT 11: 11ax (1) or legacy (0) rate code
  7422. * BITS [10..0]: rate code for 2G
  7423. */
  7424. WMI_VDEV_PARAM_PER_BAND_MGMT_TX_RATE,
  7425. /* This should be called before WMI_VDEV_PARAM_TXBF */
  7426. WMI_VDEV_PARAM_11AX_TXBF,
  7427.  
  7428. /** This parameter indicates whether VDEV is SMPS intolerant.
  7429. * I.e. - SMPS action frame cannot be transmitted by the VDEV to
  7430. * dynamically change the RX NSS.
  7431. *
  7432. * valid values: 1 - VDEV is SMPS intolerant, 0 - VDEV is SMPS tolerant
  7433. */
  7434. WMI_VDEV_PARAM_SMPS_INTOLERANT,
  7435.  
  7436. /*=== ADD NEW VDEV PARAM TYPES ABOVE THIS LINE ===
  7437. * The below vdev param types are used for prototyping, and are
  7438. * prone to change.
  7439. */
  7440. WMI_VDEV_PARAM_PROTOTYPE = 0x8000,
  7441. /* 11AX SPECIFIC defines */
  7442. /* USE this for BSS color change */
  7443. WMI_VDEV_PARAM_BSS_COLOR,
  7444. /*
  7445. * Enable / disable trigger access for a AP vdev's peers.
  7446. * For a STA mode vdev this will enable/disable triggered access
  7447. * and enable/disable Multi User mode of operation.
  7448. * 0 Disable MU OFDMA and MU MIMO
  7449. * 1 Disable DL OFDMA
  7450. * 2 Disable DL MUMIMO
  7451. * 3 Disable UL OFDMA
  7452. * 4 Disable UL MUMIMO
  7453. * 5 Enable MU OFDMA and MU MIMO
  7454. * 6 Enable DL OFDMA
  7455. * 7 Enable DL MUMIMO
  7456. * 8 Enable UL OFDMA
  7457. * 9 Enable UL MUMIMO
  7458. */
  7459. WMI_VDEV_PARAM_SET_HEMU_MODE,
  7460. WMI_VDEV_PARAM_HEOPS_0_31,
  7461. WMI_VDEV_PARAM_OBSSPD,
  7462. /*=== END VDEV_PARAM_PROTOTYPE SECTION ===*/
  7463. } WMI_VDEV_PARAM;
  7464.  
  7465. /* vdev capabilities bit mask */
  7466. #define WMI_VDEV_BEACON_SUPPORT 0x1
  7467. #define WMI_VDEV_WDS_LRN_ENABLED 0x2
  7468. #define WMI_VDEV_VOW_ENABLED 0x4
  7469.  
  7470. #define WMI_VDEV_IS_BEACON_SUPPORTED(param) ((param) & WMI_VDEV_BEACON_SUPPORT)
  7471. #define WMI_VDEV_IS_WDS_LRN_ENABLED(param) ((param) & WMI_VDEV_WDS_LRN_ENABLED)
  7472. #define WMI_VDEV_IS_VOW_ENABLED(param) ((param) & WMI_VDEV_VOW_ENABLED)
  7473.  
  7474. /* TXBF capabilities masks */
  7475. #define WMI_TXBF_CONF_SU_TX_BFEE_S 0
  7476. #define WMI_TXBF_CONF_SU_TX_BFEE_M 0x1
  7477. #define WMI_TXBF_CONF_SU_TX_BFEE (WMI_TXBF_CONF_SU_TX_BFEE_M << WMI_TXBF_CONF_SU_TX_BFEE_S)
  7478. #define WMI_TXBF_CONF_SU_TX_BFEE_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_SU_TX_BFEE)
  7479. #define WMI_TXBF_CONF_SU_TX_BFEE_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_SU_TX_BFEE)
  7480.  
  7481. #define WMI_TXBF_CONF_MU_TX_BFEE_S 1
  7482. #define WMI_TXBF_CONF_MU_TX_BFEE_M 0x1
  7483. #define WMI_TXBF_CONF_MU_TX_BFEE (WMI_TXBF_CONF_MU_TX_BFEE_M << WMI_TXBF_CONF_MU_TX_BFEE_S)
  7484. #define WMI_TXBF_CONF_MU_TX_BFEE_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_MU_TX_BFEE)
  7485. #define WMI_TXBF_CONF_MU_TX_BFEE_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_MU_TX_BFEE)
  7486.  
  7487. #define WMI_TXBF_CONF_SU_TX_BFER_S 2
  7488. #define WMI_TXBF_CONF_SU_TX_BFER_M 0x1
  7489. #define WMI_TXBF_CONF_SU_TX_BFER (WMI_TXBF_CONF_SU_TX_BFER_M << WMI_TXBF_CONF_SU_TX_BFER_S)
  7490. #define WMI_TXBF_CONF_SU_TX_BFER_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_SU_TX_BFER)
  7491. #define WMI_TXBF_CONF_SU_TX_BFER_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_SU_TX_BFER)
  7492.  
  7493. #define WMI_TXBF_CONF_MU_TX_BFER_S 3
  7494. #define WMI_TXBF_CONF_MU_TX_BFER_M 0x1
  7495. #define WMI_TXBF_CONF_MU_TX_BFER (WMI_TXBF_CONF_MU_TX_BFER_M << WMI_TXBF_CONF_MU_TX_BFER_S)
  7496. #define WMI_TXBF_CONF_MU_TX_BFER_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_MU_TX_BFER)
  7497. #define WMI_TXBF_CONF_MU_TX_BFER_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_MU_TX_BFER)
  7498.  
  7499. #define WMI_TXBF_CONF_STS_CAP_S 4
  7500. #define WMI_TXBF_CONF_STS_CAP_M 0x7
  7501. #define WMI_TXBF_CONF_STS_CAP (WMI_TXBF_CONF_STS_CAP_M << WMI_TXBF_CONF_STS_CAP_S)
  7502. #define WMI_TXBF_CONF_STS_CAP_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_STS_CAP);
  7503. #define WMI_TXBF_CONF_STS_CAP_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_STS_CAP)
  7504.  
  7505. #define WMI_TXBF_CONF_IMPLICIT_BF_S 7
  7506. #define WMI_TXBF_CONF_IMPLICIT_BF_M 0x1
  7507. #define WMI_TXBF_CONF_IMPLICIT_BF (WMI_TXBF_CONF_IMPLICIT_BF_M << WMI_TXBF_CONF_IMPLICIT_BF_S)
  7508. #define WMI_TXBF_CONF_IMPLICIT_BF_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_IMPLICIT_BF)
  7509. #define WMI_TXBF_CONF_IMPLICIT_BF_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_IMPLICIT_BF)
  7510.  
  7511. #define WMI_TXBF_CONF_BF_SND_DIM_S 8
  7512. #define WMI_TXBF_CONF_BF_SND_DIM_M 0x7
  7513. #define WMI_TXBF_CONF_BF_SND_DIM (WMI_TXBF_CONF_BF_SND_DIM_M << WMI_TXBF_CONF_BF_SND_DIM_S)
  7514. #define WMI_TXBF_CONF_BF_SND_DIM_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_BF_SND_DIM)
  7515. #define WMI_TXBF_CONF_BF_SND_DIM_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_BF_SND_DIM)
  7516.  
  7517. /* commands for 11ax TXBF capabilities */
  7518.  
  7519. #define WMI_TXBF_CONF_11AX_SU_TX_BFER_GET(x) WMI_GET_BITS((x,0,1)
  7520. #define WMI_TXBF_CONF_11AX_SU_TX_BFER_SET(x,z) WMI_SET_BITS(x,0,1,z)
  7521.  
  7522. #define WMI_TXBF_CONF_11AX_SU_TX_BFEE_GET(x) WMI_GET_BITS((x,1,1)
  7523. #define WMI_TXBF_CONF_11AX_SU_TX_BFEE_SET(x,z) WMI_SET_BITS(x,1,1,z)
  7524.  
  7525. #define WMI_TXBF_CONF_11AX_MU_TX_BFER_GET(x) WMI_GET_BITS((x,2,1)
  7526. #define WMI_TXBF_CONF_11AX_MU_TX_BFER_SET(x,z) WMI_SET_BITS(x,2,1,z)
  7527.  
  7528. #define WMI_TXBF_CONF_11AX_BFEE_NDP_STS_LT_EQ_80_GET(x) WMI_GET_BITS((x,3,3)
  7529. #define WMI_TXBF_CONF_11AX_BFEE_NDP_STS_LT_EQ_80_SET(x,z) WMI_SET_BITS(x,3,3,z)
  7530.  
  7531. #define WMI_TXBF_CONF_11AX_NSTS_LT_EQ_80_GET(x) WMI_GET_BITS((x,6,3)
  7532. #define WMI_TXBF_CONF_11AX_NSTS_LT_EQ_80_SET(x,z) WMI_SET_BITS(x,6,3,z)
  7533.  
  7534. #define WMI_TXBF_CONF_11AX_TX_BFEE_NDP_STS_GT_80_GET(x) WMI_GET_BITS((x,9,3)
  7535. #define WMI_TXBF_CONF_11AX_TX_BFEE_NDP_STS_GT_80_SET(x,z) WMI_SET_BITS(x,9,3,z)
  7536.  
  7537. #define WMI_TXBF_CONF_11AX_NSTS_GT_80_GET(x) WMI_GET_BITS((x,12,3)
  7538. #define WMI_TXBF_CONF_11AX_NSTS_GT_80_SET(x,z) WMI_SET_BITS(x,12,3,z)
  7539.  
  7540. #define WMI_TXBF_CONF_AX_BFER_SND_DIM_LT_EQ_80_SND_DIM_GET(x) WMI_GET_BITS((x,15,3)
  7541. #define WMI_TXBF_CONF_AX_BFER_SND_DIM_LT_EQ_80_SND_DIM_SET(x,z) WMI_SET_BITS(x,15,3,z)
  7542.  
  7543. #define WMI_TXBF_CONF_AX_BFER_SND_DIM_GT_80_SND_DIM_GET(x) WMI_GET_BITS((x,18,3)
  7544. #define WMI_TXBF_CONF_AX_BFER_SND_DIM_GT_80_SND_DIM_SET(x,z) WMI_SET_BITS(x,18,3,z)
  7545.  
  7546. #define WMI_TXBF_CONF_AX_SU_BFEE_NG16_FDBK_GET(x) WMI_GET_BITS((x,21,1)
  7547. #define WMI_TXBF_CONF_AX_SU_BFEE_NG16_FDBK_SET(x,z) WMI_SET_BITS(x,21,1,z)
  7548.  
  7549. #define WMI_TXBF_CONF_AX_MU_BFEE_NG16_FDBK_GET(x) WMI_GET_BITS((x,22,1)
  7550. #define WMI_TXBF_CONF_AX_MU_BFEE_NG16_FDBK_SET(x,z) WMI_SET_BITS(x,22,1,z)
  7551.  
  7552. #define WMI_TXBF_CONF_AX_SU_BFEE_CDBK_4_2_GET(x) WMI_GET_BITS((x,23,1)
  7553. #define WMI_TXBF_CONF_AX_SU_BFEE_CDBK_4_2_SET(x,z) WMI_SET_BITS(x,23,1,z)
  7554.  
  7555. #define WMI_TXBF_CONF_AX_MU_BFEE_CDBK_7_5_GET(x) WMI_GET_BITS((x,24,1)
  7556. #define WMI_TXBF_CONF_AX_MU_BFEE_CDBK_7_5_SET(x,z) WMI_SET_BITS(x,24,1,z)
  7557.  
  7558. #define WMI_TXBF_CONF_AX_FDBK_TRIG_GET(x) WMI_GET_BITS((x,25,1)
  7559. #define WMI_TXBF_CONF_AX_FDBK_TRIG_SET(x,z) WMI_SET_BITS(x,25,1,z)
  7560.  
  7561.  
  7562. /* TXBF capabilities */
  7563. typedef struct {
  7564. A_UINT32 txbf_cap;
  7565. } wmi_vdev_txbf_cap;
  7566.  
  7567. /* vdev rx filters (for mesh) */
  7568. typedef enum {
  7569. WMI_VDEV_RX_ALLOW_ALL_FRAMES = 0x0, /* Don't drop any frames - Default */
  7570. WMI_VDEV_RX_FILTER_OUT_FROMDS = 0x1, /* Drop FromDS frames */
  7571. WMI_VDEV_RX_FILTER_OUT_TODS = 0x2, /* Drop ToDS frames */
  7572. WMI_VDEV_RX_FILTER_OUT_NODS = 0x4, /* Drop NODS frames */
  7573. WMI_VDEV_RX_FILTER_OUT_RA = 0x8, /* Drop RA frames */
  7574. WMI_VDEV_RX_FILTER_OUT_TA = 0x10, /* Drop TA frames */
  7575. } wmi_vdev_param_filter;
  7576.  
  7577. /* Length of ATIM Window in TU */
  7578. #define WMI_VDEV_PARAM_ATIM_WINDOW_LENGTH WMI_VDEV_PARAM_ATIM_WINDOW
  7579.  
  7580. enum wmi_pkt_type {
  7581. WMI_PKT_TYPE_RAW = 0,
  7582. WMI_PKT_TYPE_NATIVE_WIFI = 1,
  7583. WMI_PKT_TYPE_ETHERNET = 2,
  7584. };
  7585.  
  7586. /*******************************************************************
  7587. * wmi_vdev_txbf_en is DEPRECATED in favor of wmi_vdev_txbf_cap
  7588. * Do not use it!
  7589. *******************************************************************/
  7590. typedef struct {
  7591. A_UINT8 sutxbfee : 1,
  7592. mutxbfee : 1,
  7593. sutxbfer : 1,
  7594. mutxbfer : 1,
  7595. txb_sts_cap : 3,
  7596. implicit_bf : 1;
  7597. } wmi_vdev_txbf_en;
  7598.  
  7599. /** Upto 8 bits are available for Roaming module to be sent along with
  7600. WMI_VDEV_PARAM_ROAM_FW_OFFLOAD WMI_VDEV_PARAM **/
  7601. /* Enable Roaming FW offload LFR1.5/LFR2.0 implementation */
  7602. #define WMI_ROAM_FW_OFFLOAD_ENABLE_FLAG 0x1
  7603. /* Enable Roaming module in FW to do scan based on Final BMISS */
  7604. #define WMI_ROAM_BMISS_FINAL_SCAN_ENABLE_FLAG 0x2
  7605.  
  7606. /** slot time long */
  7607. #define WMI_VDEV_SLOT_TIME_LONG 0x1
  7608. /** slot time short */
  7609. #define WMI_VDEV_SLOT_TIME_SHORT 0x2
  7610. /** preablbe long */
  7611. #define WMI_VDEV_PREAMBLE_LONG 0x1
  7612. /** preablbe short */
  7613. #define WMI_VDEV_PREAMBLE_SHORT 0x2
  7614.  
  7615. /** the definition of different START/RESTART Event response */
  7616. typedef enum {
  7617. /* Event respose of START CMD */
  7618. WMI_VDEV_START_RESP_EVENT = 0,
  7619. /* Event respose of RESTART CMD */
  7620. WMI_VDEV_RESTART_RESP_EVENT,
  7621. } WMI_START_EVENT_PARAM;
  7622.  
  7623. typedef struct {
  7624. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_start_response_event_fixed_param */
  7625. /** unique id identifying the VDEV, generated by the caller */
  7626. A_UINT32 vdev_id;
  7627. /** requestor id that requested the VDEV start request */
  7628. A_UINT32 requestor_id;
  7629. /* Respose of Event type START/RESTART */
  7630. WMI_START_EVENT_PARAM resp_type;
  7631. /** status of the response */
  7632. A_UINT32 status;
  7633. /** Vdev chain mask */
  7634. A_UINT32 chain_mask;
  7635. /** Vdev mimo power save mode */
  7636. A_UINT32 smps_mode;
  7637. union {
  7638. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  7639. /** pdev_id for identifying the MAC
  7640. * See macros starting with WMI_PDEV_ID_ for values.
  7641. */
  7642. A_UINT32 pdev_id;
  7643. };
  7644. /** Configured Transmit Streams **/
  7645. A_UINT32 cfgd_tx_streams;
  7646. /** Configured Receive Streams **/
  7647. A_UINT32 cfgd_rx_streams;
  7648. } wmi_vdev_start_response_event_fixed_param;
  7649.  
  7650. typedef struct {
  7651. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_stopped_event_fixed_param */
  7652. /** unique id identifying the VDEV, generated by the caller */
  7653. A_UINT32 vdev_id;
  7654. } wmi_vdev_stopped_event_fixed_param;
  7655.  
  7656. typedef struct {
  7657. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_delete_resp_event_fixed_param */
  7658. /** unique id identifying the VDEV, generated by the caller */
  7659. A_UINT32 vdev_id;
  7660. } wmi_vdev_delete_resp_event_fixed_param;
  7661.  
  7662. /** common structure used for simple events (stopped, resume_req, standby response) */
  7663. typedef struct {
  7664. A_UINT32 tlv_header; /* TLV tag and len; tag would be equivalent to actual event */
  7665. /** unique id identifying the VDEV, generated by the caller */
  7666. A_UINT32 vdev_id;
  7667. } wmi_vdev_simple_event_fixed_param;
  7668.  
  7669.  
  7670. /** VDEV start response status codes */
  7671. #define WMI_VDEV_START_RESPONSE_STATUS_SUCCESS 0x0 /** VDEV succesfully started */
  7672. #define WMI_VDEV_START_RESPONSE_INVALID_VDEVID 0x1 /** requested VDEV not found */
  7673. #define WMI_VDEV_START_RESPONSE_NOT_SUPPORTED 0x2 /** unsupported VDEV combination */
  7674.  
  7675. /** Beacon processing related command and event structures */
  7676. typedef struct {
  7677. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_tx_hdr */
  7678. /** unique id identifying the VDEV, generated by the caller */
  7679. A_UINT32 vdev_id;
  7680. /** xmit rate */
  7681. A_UINT32 tx_rate;
  7682. /** xmit power */
  7683. A_UINT32 txPower;
  7684. /** beacon buffer length in bytes */
  7685. A_UINT32 buf_len;
  7686. /* This TLV is followed by array of bytes:
  7687. * A_UINT8 bufp[]; <-- beacon frame buffer
  7688. */
  7689. } wmi_bcn_tx_hdr;
  7690.  
  7691. /* Beacon filter */
  7692. #define WMI_BCN_FILTER_ALL 0 /* Filter all beacons */
  7693. #define WMI_BCN_FILTER_NONE 1 /* Pass all beacons */
  7694. #define WMI_BCN_FILTER_RSSI 2 /* Pass Beacons RSSI >= RSSI threshold */
  7695. #define WMI_BCN_FILTER_BSSID 3 /* Pass Beacons with matching BSSID */
  7696. #define WMI_BCN_FILTER_SSID 4 /* Pass Beacons with matching SSID */
  7697.  
  7698. typedef struct {
  7699. /** Filter ID */
  7700. A_UINT32 bcn_filter_id;
  7701. /** Filter type - wmi_bcn_filter */
  7702. A_UINT32 bcn_filter;
  7703. /** Buffer len */
  7704. A_UINT32 bcn_filter_len;
  7705. /** Filter info (threshold, BSSID, RSSI) */
  7706. A_UINT8 *bcn_filter_buf;
  7707. } wmi_bcn_filter_rx_cmd;
  7708.  
  7709. /** Capabilities and IEs to be passed to firmware */
  7710. typedef struct {
  7711. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_prb_info */
  7712. /** Capabilities */
  7713. A_UINT32 caps;
  7714. /** ERP info */
  7715. A_UINT32 erp;
  7716. /** Advanced capabilities */
  7717. /** HT capabilities */
  7718. /** HT Info */
  7719. /** ibss_dfs */
  7720. /** wpa Info */
  7721. /** rsn Info */
  7722. /** rrm info */
  7723. /** ath_ext */
  7724. /** app IE */
  7725. } wmi_bcn_prb_info;
  7726.  
  7727. typedef struct {
  7728. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_tmpl_cmd_fixed_param */
  7729. /** unique id identifying the VDEV, generated by the caller */
  7730. A_UINT32 vdev_id;
  7731. /** TIM IE offset from the beginning of the template. */
  7732. A_UINT32 tim_ie_offset;
  7733. /** beacon buffer length. data is in TLV data[] */
  7734. A_UINT32 buf_len;
  7735. /** CSA IE switch count offset from the beginning of data[]
  7736. * Value 0 indicates CSA IE is not present in beacon template.
  7737. */
  7738. A_UINT32 csa_switch_count_offset; /* units = bytes */
  7739. /** Extended CSA IE switch count offset from the beginning of data[]
  7740. * Value 0 indicates CSA IE is not present in beacon template.
  7741. */
  7742. A_UINT32 ext_csa_switch_count_offset; /* units = bytes */
  7743.  
  7744. /*
  7745. * The TLVs follows:
  7746. * wmi_bcn_prb_info bcn_prb_info; <-- beacon probe capabilities and IEs
  7747. * A_UINT8 data[]; <-- Variable length data
  7748. */
  7749. } wmi_bcn_tmpl_cmd_fixed_param;
  7750.  
  7751. typedef struct {
  7752. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_prb_tmpl_cmd_fixed_param */
  7753. /** unique id identifying the VDEV, generated by the caller */
  7754. A_UINT32 vdev_id;
  7755. /** beacon buffer length. data is in TLV data[] */
  7756. A_UINT32 buf_len;
  7757. /*
  7758. * The TLVs follows:
  7759. * wmi_bcn_prb_info bcn_prb_info; <-- beacon probe capabilities and IEs
  7760. * A_UINT8 data[]; <-- Variable length data
  7761. */
  7762. } wmi_prb_tmpl_cmd_fixed_param;
  7763.  
  7764. typedef struct {
  7765. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offload_bcn_tx_status_event_fixed_param */
  7766. A_UINT32 tlv_header;
  7767. /** unique id identifying the VDEV */
  7768. A_UINT32 vdev_id;
  7769. /** bcn tx status, values defined in enum WMI_FRAME_TX_STATUS */
  7770. A_UINT32 tx_status;
  7771. } wmi_offload_bcn_tx_status_event_fixed_param;
  7772.  
  7773. enum wmi_sta_ps_mode {
  7774. /** enable power save for the given STA VDEV */
  7775. WMI_STA_PS_MODE_DISABLED = 0,
  7776. /** disable power save for a given STA VDEV */
  7777. WMI_STA_PS_MODE_ENABLED = 1,
  7778. };
  7779.  
  7780. typedef struct {
  7781. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_powersave_mode_cmd_fixed_param */
  7782. /** unique id identifying the VDEV, generated by the caller */
  7783. A_UINT32 vdev_id;
  7784.  
  7785. /** Power save mode
  7786. *
  7787. * (see enum wmi_sta_ps_mode)
  7788. */
  7789. A_UINT32 sta_ps_mode;
  7790. } wmi_sta_powersave_mode_cmd_fixed_param;
  7791.  
  7792. enum wmi_csa_offload_en {
  7793. WMI_CSA_OFFLOAD_DISABLE = 0,
  7794. WMI_CSA_OFFLOAD_ENABLE = 1,
  7795. };
  7796.  
  7797. typedef struct {
  7798. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csa_offload_enable_cmd_fixed_param */
  7799. A_UINT32 vdev_id;
  7800. A_UINT32 csa_offload_enable;
  7801. } wmi_csa_offload_enable_cmd_fixed_param;
  7802.  
  7803. typedef struct {
  7804. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csa_offload_chanswitch_cmd_fixed_param */
  7805. A_UINT32 vdev_id;
  7806. /*
  7807. * The TLVs follows:
  7808. * wmi_channel chan;
  7809. */
  7810. } wmi_csa_offload_chanswitch_cmd_fixed_param;
  7811. /**
  7812. * This parameter controls the policy for retrieving frames from AP while the
  7813. * STA is in sleep state.
  7814. *
  7815. * Only takes affect if the sta_ps_mode is enabled
  7816. */
  7817. enum wmi_sta_ps_param_rx_wake_policy {
  7818. /* Wake up when ever there is an RX activity on the VDEV. In this mode
  7819. * the Power save SM(state machine) will come out of sleep by either
  7820. * sending null frame (or) a data frame (with PS==0) in response to TIM
  7821. * bit set in the received beacon frame from AP.
  7822. */
  7823. WMI_STA_PS_RX_WAKE_POLICY_WAKE = 0,
  7824.  
  7825. /* Here the power save state machine will not wakeup in response to TIM
  7826. * bit, instead it will send a PSPOLL (or) UASPD trigger based on UAPSD
  7827. * configuration setup by WMISET_PS_SET_UAPSD WMI command. When all
  7828. * access categories are delivery-enabled, the station will send a UAPSD
  7829. * trigger frame, otherwise it will send a PS-Poll.
  7830. */
  7831. WMI_STA_PS_RX_WAKE_POLICY_POLL_UAPSD = 1,
  7832. };
  7833.  
  7834. /** Number of tx frames/beacon that cause the power save SM to wake up.
  7835. *
  7836. * Value 1 causes the SM to wake up for every TX. Value 0 has a special
  7837. * meaning, It will cause the SM to never wake up. This is useful if you want
  7838. * to keep the system to sleep all the time for some kind of test mode . host
  7839. * can change this parameter any time. It will affect at the next tx frame.
  7840. */
  7841. enum wmi_sta_ps_param_tx_wake_threshold {
  7842. WMI_STA_PS_TX_WAKE_THRESHOLD_NEVER = 0,
  7843. WMI_STA_PS_TX_WAKE_THRESHOLD_ALWAYS = 1,
  7844.  
  7845. /* Values greater than one indicate that many TX attempts per beacon
  7846. * interval before the STA will wake up
  7847. */
  7848. };
  7849.  
  7850. /**
  7851. * The maximum number of PS-Poll frames the FW will send in response to
  7852. * traffic advertised in TIM before waking up (by sending a null frame with PS
  7853. * = 0). Value 0 has a special meaning: there is no maximum count and the FW
  7854. * will send as many PS-Poll as are necessary to retrieve buffered BU. This
  7855. * parameter is used when the RX wake policy is
  7856. * WMI_STA_PS_RX_WAKE_POLICY_POLL_UAPSD and ignored when the RX wake
  7857. * policy is WMI_STA_PS_RX_WAKE_POLICY_WAKE.
  7858. */
  7859. enum wmi_sta_ps_param_pspoll_count {
  7860. WMI_STA_PS_PSPOLL_COUNT_NO_MAX = 0,
  7861. /* Values greater than 0 indicate the maximum numer of PS-Poll frames FW
  7862. * will send before waking up.
  7863. */
  7864. };
  7865.  
  7866. /*
  7867. * This will include the delivery and trigger enabled state for every AC.
  7868. * This is the negotiated state with AP. The host MLME needs to set this based
  7869. * on AP capability and the state Set in the association request by the
  7870. * station MLME.Lower 8 bits of the value specify the UAPSD configuration.
  7871. */
  7872. #define WMI_UAPSD_AC_TYPE_DELI 0
  7873. #define WMI_UAPSD_AC_TYPE_TRIG 1
  7874.  
  7875. #define WMI_UAPSD_AC_BIT_MASK(ac,type) \
  7876. ((type == WMI_UAPSD_AC_TYPE_DELI) ? \
  7877. (1 << (ac<<1)) : \
  7878. (1 << ((ac<<1)+1)))
  7879.  
  7880. enum wmi_sta_ps_param_uapsd {
  7881. WMI_STA_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0),
  7882. WMI_STA_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1),
  7883. WMI_STA_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2),
  7884. WMI_STA_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3),
  7885. WMI_STA_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4),
  7886. WMI_STA_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5),
  7887. WMI_STA_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6),
  7888. WMI_STA_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7),
  7889. };
  7890.  
  7891. enum wmi_sta_powersave_param {
  7892. /**
  7893. * Controls how frames are retrievd from AP while STA is sleeping
  7894. *
  7895. * (see enum wmi_sta_ps_param_rx_wake_policy)
  7896. */
  7897. WMI_STA_PS_PARAM_RX_WAKE_POLICY = 0,
  7898.  
  7899. /**
  7900. * The STA will go active after this many TX
  7901. *
  7902. * (see enum wmi_sta_ps_param_tx_wake_threshold)
  7903. */
  7904. WMI_STA_PS_PARAM_TX_WAKE_THRESHOLD = 1,
  7905.  
  7906. /**
  7907. * Number of PS-Poll to send before STA wakes up
  7908. *
  7909. * (see enum wmi_sta_ps_param_pspoll_count)
  7910. *
  7911. */
  7912. WMI_STA_PS_PARAM_PSPOLL_COUNT = 2,
  7913.  
  7914. /**
  7915. * TX/RX inactivity time in msec before going to sleep.
  7916. *
  7917. * The power save SM will monitor tx/rx activity on the VDEV, if no
  7918. * activity for the specified msec of the parameter the Power save SM will
  7919. * go to sleep.
  7920. */
  7921. WMI_STA_PS_PARAM_INACTIVITY_TIME = 3,
  7922.  
  7923. /**
  7924. * Set uapsd configuration.
  7925. *
  7926. * (see enum wmi_sta_ps_param_uapsd)
  7927. */
  7928. WMI_STA_PS_PARAM_UAPSD = 4,
  7929.  
  7930. /**
  7931. * Number of PS-Poll to send before STA wakes up in QPower Mode
  7932. */
  7933. WMI_STA_PS_PARAM_QPOWER_PSPOLL_COUNT = 5,
  7934.  
  7935. /**
  7936. * Enable QPower
  7937. */
  7938. WMI_STA_PS_ENABLE_QPOWER = 6,
  7939.  
  7940. /**
  7941. * Number of TX frames before the entering the Active state
  7942. */
  7943. WMI_STA_PS_PARAM_QPOWER_MAX_TX_BEFORE_WAKE = 7,
  7944.  
  7945. /**
  7946. * QPower SPEC PSPOLL interval
  7947. */
  7948. WMI_STA_PS_PARAM_QPOWER_SPEC_PSPOLL_WAKE_INTERVAL = 8,
  7949.  
  7950. /**
  7951. * Max SPEC PSPOLL to be sent when the PSPOLL response has
  7952. * no-data bit set
  7953. */
  7954. WMI_STA_PS_PARAM_QPOWER_SPEC_MAX_SPEC_NODATA_PSPOLL = 9,
  7955.  
  7956. /**
  7957. * Max value of ITO reset when there is no tx-rx
  7958. * after AP has set the TIM bit
  7959. */
  7960. WMI_STA_PS_PARAM_MAX_RESET_ITO_COUNT_ON_TIM_NO_TXRX = 10,
  7961. };
  7962.  
  7963. typedef struct {
  7964. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_powersave_param_cmd_fixed_param */
  7965. /** unique id identifying the VDEV, generated by the caller */
  7966. A_UINT32 vdev_id;
  7967. /** station power save parameter (see enum wmi_sta_powersave_param) */
  7968. A_UINT32 param;
  7969. A_UINT32 value;
  7970. } wmi_sta_powersave_param_cmd_fixed_param;
  7971.  
  7972. /** No MIMO power save */
  7973. #define WMI_STA_MIMO_PS_MODE_DISABLE
  7974. /** mimo powersave mode static*/
  7975. #define WMI_STA_MIMO_PS_MODE_STATIC
  7976. /** mimo powersave mode dynamic */
  7977. #define WMI_STA_MIMO_PS_MODE_DYNAMI
  7978.  
  7979. typedef struct {
  7980. /** unique id identifying the VDEV, generated by the caller */
  7981. A_UINT32 vdev_id;
  7982. /** mimo powersave mode as defined above */
  7983. A_UINT32 mimo_pwrsave_mode;
  7984. } wmi_sta_mimo_ps_mode_cmd;
  7985.  
  7986.  
  7987. /** U-APSD configuration of peer station from (re)assoc request and TSPECs */
  7988. enum wmi_ap_ps_param_uapsd {
  7989. WMI_AP_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0),
  7990. WMI_AP_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1),
  7991. WMI_AP_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2),
  7992. WMI_AP_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3),
  7993. WMI_AP_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4),
  7994. WMI_AP_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5),
  7995. WMI_AP_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6),
  7996. WMI_AP_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7),
  7997. };
  7998.  
  7999. /** U-APSD maximum service period of peer station */
  8000. enum wmi_ap_ps_peer_param_max_sp {
  8001. WMI_AP_PS_PEER_PARAM_MAX_SP_UNLIMITED = 0,
  8002. WMI_AP_PS_PEER_PARAM_MAX_SP_2 = 1,
  8003. WMI_AP_PS_PEER_PARAM_MAX_SP_4 = 2,
  8004. WMI_AP_PS_PEER_PARAM_MAX_SP_6 = 3,
  8005.  
  8006. /* keep last! */
  8007. MAX_WMI_AP_PS_PEER_PARAM_MAX_SP,
  8008. };
  8009.  
  8010. /** param values for WMI_AP_PS_PEER_PARAM_SIFS_RESP_FRMTYPE */
  8011. enum wmi_ap_ps_param_sifs_resp_frmtype {
  8012. WMI_SIFS_RESP_PSPOLL = (1 << 0),
  8013. WMI_SIFS_RESP_UAPSD = (1 << 1),
  8014. WMI_SIFS_RESP_QBST_EXP = (1 << 2),
  8015. WMI_SIFS_RESP_QBST_DATA = (1 << 3),
  8016. WMI_SIFS_RESP_QBST_BAR = (1 << 4),
  8017. };
  8018.  
  8019. /**
  8020. * AP power save parameter
  8021. * Set a power save specific parameter for a peer station
  8022. */
  8023. enum wmi_ap_ps_peer_param {
  8024. /** Set uapsd configuration for a given peer.
  8025. *
  8026. * This will include the delivery and trigger enabled state for every AC.
  8027. * The host MLME needs to set this based on AP capability and stations
  8028. * request Set in the association request received from the station.
  8029. *
  8030. * Lower 8 bits of the value specify the UAPSD configuration.
  8031. *
  8032. * (see enum wmi_ap_ps_param_uapsd)
  8033. * The default value is 0.
  8034. */
  8035. WMI_AP_PS_PEER_PARAM_UAPSD = 0,
  8036.  
  8037. /**
  8038. * Set the service period for a UAPSD capable station
  8039. *
  8040. * The service period from wme ie in the (re)assoc request frame.
  8041. *
  8042. * (see enum wmi_ap_ps_peer_param_max_sp)
  8043. */
  8044. WMI_AP_PS_PEER_PARAM_MAX_SP = 1,
  8045.  
  8046. /** Time in seconds for aging out buffered frames for STA in power save */
  8047. WMI_AP_PS_PEER_PARAM_AGEOUT_TIME = 2,
  8048.  
  8049. /**
  8050. * Specify frame types that are considered SIFS RESP trigger frame
  8051. * (see enum wmi_ap_ps_param_sifs_resp_frmtype)
  8052. */
  8053. WMI_AP_PS_PEER_PARAM_SIFS_RESP_FRMTYPE = 3,
  8054.  
  8055. /** Specifies the trigger state of TID. Valid only for UAPSD frame type */
  8056. WMI_AP_PS_PEER_PARAM_SIFS_RESP_UAPSD = 4,
  8057.  
  8058. /** Specifies the WNM sleep state of a STA */
  8059. WMI_AP_PS_PEER_PARAM_WNM_SLEEP = 5,
  8060. };
  8061.  
  8062. typedef struct {
  8063. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ap_ps_peer_cmd_fixed_param */
  8064. /** unique id identifying the VDEV, generated by the caller */
  8065. A_UINT32 vdev_id;
  8066. /** peer MAC address */
  8067. wmi_mac_addr peer_macaddr;
  8068. /** AP powersave param (see enum wmi_ap_ps_peer_param) */
  8069. A_UINT32 param;
  8070. /** AP powersave param value (see defines) */
  8071. A_UINT32 value;
  8072. } wmi_ap_ps_peer_cmd_fixed_param;
  8073.  
  8074. /** Configure peer station 11v U-APSD coexistance
  8075. *
  8076. * Two parameters from uaspd coexistence ie info (as specified in 11v) are
  8077. * sent down to FW along with this command.
  8078. *
  8079. * The semantics of these fields are described in the following text extracted
  8080. * from 802.11v.
  8081. *
  8082. * --- If the non-AP STA specified a non-zero TSF 0 Offset value in the
  8083. * U-APSD Coexistence element, the AP should not transmit frames to the
  8084. * non-AP STA outside of the U-APSD Coexistence Service Period, which
  8085. * begins when the AP receives the U-APSD trigger frame and ends after
  8086. * the transmission period specified by the result of the following
  8087. * calculation:
  8088. *
  8089. * End of transmission period = T + (Interval . ((T . TSF 0 Offset) mod Interval))
  8090. *
  8091. * Where T is the time the U-APSD trigger frame was received at the AP
  8092. * Interval is the UAPSD Coexistence element Duration/Interval field
  8093. * value (see 7.3.2.91) or upon the successful transmission of a frame
  8094. * with EOSP bit set to 1, whichever is earlier.
  8095. *
  8096. *
  8097. * --- If the non-AP STA specified a zero TSF 0 Offset value in the U-APSD
  8098. * Coexistence element, the AP should not transmit frames to the non-AP
  8099. * STA outside of the U-APSD Coexistence Service Period, which begins
  8100. * when the AP receives a U-APSD trigger frame and ends after the
  8101. * transmission period specified by the result of the following
  8102. * calculation: End of transmission period = T + Duration
  8103. */
  8104. typedef struct {
  8105. /** unique id identifying the VDEV, generated by the caller */
  8106. A_UINT32 vdev_id;
  8107. /** peer MAC address */
  8108. wmi_mac_addr peer_macaddr;
  8109. /** Enable U-APSD coexistence support for this peer
  8110. *
  8111. * 0 -> disabled (default)
  8112. * 1 -> enabled
  8113. */
  8114. A_UINT32 enabled;
  8115. /** Duration/Interval as defined by 11v U-ASPD coexistance */
  8116. A_UINT32 duration_interval;
  8117. /** Upper 32 bits of 64-bit TSF offset */
  8118. A_UINT32 tsf_offset_high;
  8119. /** Lower 32 bits of 64-bit TSF offset */
  8120. A_UINT32 tsf_offset_low;
  8121. } wmi_ap_powersave_peer_uapsd_coex_cmd;
  8122.  
  8123. typedef enum {
  8124. WMI_AP_PS_EGAP_F_ENABLE_PHYERR_DETECTION = 0x0001,
  8125. WMI_AP_PS_EGAP_F_ENABLE_PWRSAVE_BY_PS_STATE = 0x0002,
  8126. WMI_AP_PS_EGAP_F_ENABLE_PWRSAVE_BY_INACTIVITY = 0x0004,
  8127.  
  8128. WMI_AP_PS_EGAP_FLAG_MAX = 0x8000
  8129. } wmi_ap_ps_egap_flag_type;
  8130.  
  8131. /**
  8132. * configure ehanced green ap parameters
  8133. */
  8134. typedef struct {
  8135. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_ap_powersave_egap_param_cmd_fixed_param */
  8136. /** Enable enhanced green ap
  8137. * 0 -> disabled
  8138. * 1 -> enabled
  8139. */
  8140. A_UINT32 enable;
  8141. /** The param indicates a duration that all STAs connected
  8142. * to S-AP have no traffic.
  8143. */
  8144. A_UINT32 inactivity_time; /* in unit of milliseconds */
  8145. /** The param indicates a duration that all STAs connected
  8146. * to S-AP have no traffic, after all STAs have entered powersave.
  8147. */
  8148. A_UINT32 wait_time; /* in unit of milliseconds */
  8149. /** The param is used to turn on/off some functions within E-GAP.
  8150. */
  8151. A_UINT32 flags; /* wmi_ap_ps_egap_flag_type bitmap */
  8152. } wmi_ap_ps_egap_param_cmd_fixed_param;
  8153.  
  8154. typedef enum {
  8155. WMI_AP_PS_EGAP_STATUS_IDLE = 1,
  8156. WMI_AP_PS_EGAP_STATUS_PWRSAVE_OFF = 2,
  8157. WMI_AP_PS_EGAP_STATUS_PWRSAVE_ON = 3,
  8158.  
  8159. WMI_AP_PS_EGAP_STATUS_MAX = 15
  8160. } wmi_ap_ps_egap_status_type;
  8161.  
  8162. /**
  8163. * send ehanced green ap status to host
  8164. */
  8165. typedef struct
  8166. {
  8167. /** TLV tag and len; tag equals
  8168. * WMITLV_TAG_STRUC_wmi_ap_ps_egap_info_chainmask_list */
  8169. A_UINT32 tlv_header;
  8170. union {
  8171. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  8172. /** pdev_id for identifying the MAC
  8173. * See macros starting with WMI_PDEV_ID_ for values.
  8174. */
  8175. A_UINT32 pdev_id;
  8176. };
  8177. /** The param indicates the current tx chainmask with the mac id. */
  8178. A_UINT32 tx_chainmask;
  8179. /** The param indicates the current rx chainmask with the mac id. */
  8180. A_UINT32 rx_chainmask;
  8181. } wmi_ap_ps_egap_info_chainmask_list;
  8182.  
  8183. typedef struct {
  8184. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_ap_powersave_egap_param_cmd_fixed_param */
  8185. /** Enhanced green ap status (WMI_AP_PS_EGAP_STATUS). */
  8186. A_UINT32 status;
  8187. /* This TLV is followed by
  8188. * wmi_ap_ps_egap_info_chainmask_list chainmask_list[];
  8189. */
  8190. } wmi_ap_ps_egap_info_event_fixed_param;
  8191.  
  8192. /* 128 clients = 4 words */
  8193. /* WMI_TIM_BITMAP_ARRAY_SIZE can't be modified without breaking the compatibility */
  8194. #define WMI_TIM_BITMAP_ARRAY_SIZE 4
  8195.  
  8196. typedef struct {
  8197. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tim_info */
  8198. /** TIM bitmap len (in bytes) */
  8199. A_UINT32 tim_len;
  8200. /** TIM Partial Virtual Bitmap */
  8201. A_UINT32 tim_mcast;
  8202. A_UINT32 tim_bitmap[WMI_TIM_BITMAP_ARRAY_SIZE];
  8203. A_UINT32 tim_changed;
  8204. A_UINT32 tim_num_ps_pending;
  8205. /** Use the vdev_id only if vdev_id_valid is set */
  8206. A_UINT32 vdev_id_valid;
  8207. /** unique id identifying the VDEV */
  8208. A_UINT32 vdev_id;
  8209. } wmi_tim_info;
  8210.  
  8211. typedef struct {
  8212. /** Flag to enable quiet period IE support */
  8213. A_UINT32 is_enabled;
  8214. /** Quiet start */
  8215. A_UINT32 tbttcount;
  8216. /** Beacon intervals between quiets*/
  8217. A_UINT32 period;
  8218. /** TUs of each quiet*/
  8219. A_UINT32 duration;
  8220. /** TUs of from TBTT of quiet start*/
  8221. A_UINT32 offset;
  8222. } wmi_quiet_info;
  8223.  
  8224. /* WMI_P2P_MAX_NOA_DESCRIPTORS can't be modified without breaking the compatibility */
  8225. #define WMI_P2P_MAX_NOA_DESCRIPTORS 4 /* Maximum number of NOA Descriptors supported */
  8226.  
  8227. typedef struct {
  8228. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_info */
  8229. /** Bit 0: Flag to indicate an update in NOA schedule
  8230. * Bits 7-1: Reserved
  8231. * Bits 15-8: Index (identifies the instance of NOA sub element)
  8232. * Bit 16: Opp PS state of the AP
  8233. * Bits 23-17: Ctwindow in TUs
  8234. * Bits 31-24: Number of NOA descriptors
  8235. */
  8236. A_UINT32 noa_attributes;
  8237. wmi_p2p_noa_descriptor noa_descriptors[WMI_P2P_MAX_NOA_DESCRIPTORS];
  8238. /** Use the vdev_id only if vdev_id_valid is set */
  8239. A_UINT32 vdev_id_valid;
  8240. /** unique id identifying the VDEV */
  8241. A_UINT32 vdev_id;
  8242. } wmi_p2p_noa_info;
  8243.  
  8244. #define WMI_UNIFIED_NOA_ATTR_MODIFIED 0x1
  8245. #define WMI_UNIFIED_NOA_ATTR_MODIFIED_S 0
  8246.  
  8247. #define WMI_UNIFIED_NOA_ATTR_IS_MODIFIED(hdr) \
  8248. WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_MODIFIED)
  8249.  
  8250. #define WMI_UNIFIED_NOA_ATTR_MODIFIED_SET(hdr) \
  8251. WMI_F_RMW((hdr)->noa_attributes, 0x1, \
  8252. WMI_UNIFIED_NOA_ATTR_MODIFIED);
  8253.  
  8254. #define WMI_UNIFIED_NOA_ATTR_INDEX 0xff00
  8255. #define WMI_UNIFIED_NOA_ATTR_INDEX_S 8
  8256.  
  8257. #define WMI_UNIFIED_NOA_ATTR_INDEX_GET(hdr) \
  8258. WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_INDEX)
  8259.  
  8260. #define WMI_UNIFIED_NOA_ATTR_INDEX_SET(hdr, v) \
  8261. WMI_F_RMW((hdr)->noa_attributes, (v) & 0xff, \
  8262. WMI_UNIFIED_NOA_ATTR_INDEX);
  8263.  
  8264. #define WMI_UNIFIED_NOA_ATTR_OPP_PS 0x10000
  8265. #define WMI_UNIFIED_NOA_ATTR_OPP_PS_S 16
  8266.  
  8267. #define WMI_UNIFIED_NOA_ATTR_OPP_PS_GET(hdr) \
  8268. WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_OPP_PS)
  8269.  
  8270. #define WMI_UNIFIED_NOA_ATTR_OPP_PS_SET(hdr) \
  8271. WMI_F_RMW((hdr)->noa_attributes, 0x1, \
  8272. WMI_UNIFIED_NOA_ATTR_OPP_PS);
  8273.  
  8274. #define WMI_UNIFIED_NOA_ATTR_CTWIN 0xfe0000
  8275. #define WMI_UNIFIED_NOA_ATTR_CTWIN_S 17
  8276.  
  8277. #define WMI_UNIFIED_NOA_ATTR_CTWIN_GET(hdr) \
  8278. WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_CTWIN)
  8279.  
  8280. #define WMI_UNIFIED_NOA_ATTR_CTWIN_SET(hdr, v) \
  8281. WMI_F_RMW((hdr)->noa_attributes, (v) & 0x7f, \
  8282. WMI_UNIFIED_NOA_ATTR_CTWIN);
  8283.  
  8284. #define WMI_UNIFIED_NOA_ATTR_NUM_DESC 0xff000000
  8285. #define WMI_UNIFIED_NOA_ATTR_NUM_DESC_S 24
  8286.  
  8287. #define WMI_UNIFIED_NOA_ATTR_NUM_DESC_GET(hdr) \
  8288. WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_NUM_DESC)
  8289.  
  8290. #define WMI_UNIFIED_NOA_ATTR_NUM_DESC_SET(hdr, v) \
  8291. WMI_F_RMW((hdr)->noa_attributes, (v) & 0xff, \
  8292. WMI_UNIFIED_NOA_ATTR_NUM_DESC);
  8293.  
  8294. typedef struct {
  8295. /** TIM info */
  8296. wmi_tim_info tim_info;
  8297. /** P2P NOA info */
  8298. wmi_p2p_noa_info p2p_noa_info;
  8299. /* TBD: More info elements to be added later */
  8300. } wmi_bcn_info;
  8301.  
  8302. typedef struct {
  8303. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_swba_event_fixed_param */
  8304. /** bitmap identifying the VDEVs, generated by the caller */
  8305. A_UINT32 vdev_map;
  8306. /** how many vdev's info is included in this message
  8307. * If this field is zero, then the number of vdevs is specified by
  8308. * the number of bits set in the vdev_map bitmap.
  8309. */
  8310. A_UINT32 num_vdevs;
  8311. /* This TLV is followed by tim_info and p2p_noa_info for each vdev:
  8312. * wmi_tim_info tim_info[];
  8313. * wmi_p2p_noa_info p2p_noa_info[];
  8314. *
  8315. */
  8316. } wmi_host_swba_event_fixed_param;
  8317.  
  8318. #define WMI_MAX_AP_VDEV 16
  8319.  
  8320.  
  8321. typedef struct {
  8322. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tbtt_offset_event_fixed_param */
  8323. /** bimtap of VDEVs that has tbtt offset updated */
  8324. A_UINT32 vdev_map;
  8325. /* The TLVs for tbttoffset_list will follow this TLV.
  8326. * tbtt offset list in the order of the LSB to MSB in the vdev_map bitmap
  8327. * A_UINT32 tbttoffset_list[WMI_MAX_AP_VDEV];
  8328. */
  8329. } wmi_tbtt_offset_event_fixed_param;
  8330.  
  8331. typedef struct {
  8332. A_UINT32 tlv_header;/* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tbtt_offset_info */
  8333. /** unique id identifying the VDEV */
  8334. A_UINT32 vdev_id;
  8335. /** tbttoffset in TUs */
  8336. A_UINT32 tbttoffset;
  8337. } wmi_tbtt_offset_info;
  8338.  
  8339. /** Use this event if number of vdevs > 32 */
  8340. typedef struct {
  8341. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tbtt_offset_ext_event_fixed_param */
  8342. A_UINT32 num_vdevs;
  8343. /*
  8344. * The TLVs for tbttoffset will follow this TLV.
  8345. * Of size num_vdevs * wmi_tbtt_offset_info
  8346. */
  8347. } wmi_tbtt_offset_ext_event_fixed_param;
  8348.  
  8349.  
  8350. /* Peer Specific commands and events */
  8351.  
  8352. typedef struct {
  8353. A_UINT32 percentage; /* in unit of 12.5% */
  8354. A_UINT32 min_delta; /* in unit of Mbps */
  8355. } rate_delta_t;
  8356.  
  8357. #define PEER_RATE_REPORT_COND_FLAG_DELTA 0x01
  8358. #define PEER_RATE_REPORT_COND_FLAG_THRESHOLD 0x02
  8359. #define MAX_NUM_OF_RATE_THRESH 4
  8360.  
  8361. typedef struct {
  8362. A_UINT32 val_cond_flags; /* PEER_RATE_REPORT_COND_FLAG_DELTA, PEER_RATE_REPORT_COND_FLAG_THRESHOLD
  8363. Any of these two conditions or both of them can be set. */
  8364. rate_delta_t rate_delta;
  8365. A_UINT32 rate_threshold[MAX_NUM_OF_RATE_THRESH]; /* In unit of Mbps. There are at most 4 thresholds.
  8366. If the threshold count is less than 4, set zero to
  8367. the one following the last threshold */
  8368. } report_cond_per_phy_t;
  8369.  
  8370.  
  8371. enum peer_rate_report_cond_phy_type {
  8372. PEER_RATE_REPORT_COND_11B = 0,
  8373. PEER_RATE_REPORT_COND_11A_G,
  8374. PEER_RATE_REPORT_COND_11N,
  8375. PEER_RATE_REPORT_COND_11AC,
  8376. PEER_RATE_REPORT_COND_MAX_NUM
  8377. };
  8378.  
  8379. typedef struct {
  8380. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_rate_report_condtion_fixed_param */
  8381. A_UINT32 enable_rate_report; /* 1= enable, 0=disable */
  8382. A_UINT32 report_backoff_time; /* in unit of msecond */
  8383. A_UINT32 report_timer_period; /* in unit of msecond */
  8384. /* In the following field, the array index means the phy type,
  8385. * please see enum peer_rate_report_cond_phy_type for detail */
  8386. report_cond_per_phy_t cond_per_phy[PEER_RATE_REPORT_COND_MAX_NUM];
  8387. } wmi_peer_set_rate_report_condition_fixed_param;
  8388.  
  8389. /* Peer Type:
  8390. * NB: This can be left DEFAULT for the normal case, and f/w will determine BSS type based
  8391. * on address and vdev opmode. This is largely here to allow host to indicate that
  8392. * peer is explicitly a TDLS peer
  8393. */
  8394. enum wmi_peer_type {
  8395. WMI_PEER_TYPE_DEFAULT = 0, /* Generic/Non-BSS/Self Peer */
  8396. WMI_PEER_TYPE_BSS = 1, /* Peer is BSS Peer entry */
  8397. WMI_PEER_TYPE_TDLS = 2, /* Peer is a TDLS Peer */
  8398. WMI_PEER_TYPE_OCB = 3, /* Peer is a OCB Peer */
  8399. WMI_PEER_TYPE_NAN_DATA = 4, /* Peer is NAN DATA */
  8400. WMI_PEER_TYPE_HOST_MAX = 127, /* Host <-> Target Peer type is assigned up to 127 */
  8401. /* Reserved from 128 - 255 for target internal use.*/
  8402. WMI_PEER_TYPE_ROAMOFFLOAD_TEMP = 128, /* Temporarily created during offload roam */
  8403. };
  8404.  
  8405. typedef struct {
  8406. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_create_cmd_fixed_param */
  8407. /** unique id identifying the VDEV, generated by the caller */
  8408. A_UINT32 vdev_id;
  8409. /** peer MAC address */
  8410. wmi_mac_addr peer_macaddr;
  8411. /** peer type: see enum values above */
  8412. A_UINT32 peer_type;
  8413. } wmi_peer_create_cmd_fixed_param;
  8414.  
  8415. typedef struct {
  8416. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_delete_cmd_fixed_param */
  8417. /** unique id identifying the VDEV, generated by the caller */
  8418. A_UINT32 vdev_id;
  8419. /** peer MAC address */
  8420. wmi_mac_addr peer_macaddr;
  8421. } wmi_peer_delete_cmd_fixed_param;
  8422.  
  8423. typedef struct {
  8424. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_set_rx_blocksize_cmd_fixed_param */
  8425. /** unique id identifying the VDEV, generated by the caller */
  8426. A_UINT32 vdev_id;
  8427. /** peer MAC address */
  8428. wmi_mac_addr peer_macaddr;
  8429. /**
  8430. * maximum block ack window size to use during a rx block ack negotiation,
  8431. * i.e. the maximum number of MPDUs per A-MPDU that will be received
  8432. */
  8433. A_UINT32 rx_block_ack_win_limit;
  8434. } wmi_peer_set_rx_blocksize_cmd_fixed_param;
  8435.  
  8436. typedef struct {
  8437. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_flush_tids_cmd_fixed_param */
  8438. /** unique id identifying the VDEV, generated by the caller */
  8439. A_UINT32 vdev_id;
  8440. /** peer MAC address */
  8441. wmi_mac_addr peer_macaddr;
  8442. /** tid bitmap identifying the tids to flush */
  8443. A_UINT32 peer_tid_bitmap;
  8444. } wmi_peer_flush_tids_cmd_fixed_param;
  8445.  
  8446. typedef struct {
  8447. /** rate mode . 0: disable fixed rate (auto rate)
  8448. * 1: legacy (non 11n) rate specified as ieee rate 2*Mbps
  8449. * 2: ht20 11n rate specified as mcs index
  8450. * 3: ht40 11n rate specified as mcs index
  8451. */
  8452. A_UINT32 rate_mode;
  8453. /** 4 rate values for 4 rate series. series 0 is stored in byte 0 (LSB)
  8454. * and series 3 is stored at byte 3 (MSB) */
  8455. A_UINT32 rate_series;
  8456. /** 4 retry counts for 4 rate series. retry count for rate 0 is stored in byte 0 (LSB)
  8457. * and retry count for rate 3 is stored at byte 3 (MSB) */
  8458. A_UINT32 rate_retries;
  8459. } wmi_fixed_rate;
  8460.  
  8461. typedef struct {
  8462. /** unique id identifying the VDEV, generated by the caller */
  8463. A_UINT32 vdev_id;
  8464. /** peer MAC address */
  8465. wmi_mac_addr peer_macaddr;
  8466. /** fixed rate */
  8467. wmi_fixed_rate peer_fixed_rate;
  8468. } wmi_peer_fixed_rate_cmd;
  8469.  
  8470. #define WMI_MGMT_TID 17
  8471.  
  8472. typedef struct {
  8473. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_addba_clear_resp_cmd_fixed_param */
  8474. /** unique id identifying the VDEV, generated by the caller */
  8475. A_UINT32 vdev_id;
  8476. /** peer MAC address */
  8477. wmi_mac_addr peer_macaddr;
  8478. } wmi_addba_clear_resp_cmd_fixed_param;
  8479.  
  8480. typedef struct {
  8481. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_addba_send_cmd_fixed_param */
  8482. /** unique id identifying the VDEV, generated by the caller */
  8483. A_UINT32 vdev_id;
  8484. /** peer MAC address */
  8485. wmi_mac_addr peer_macaddr;
  8486. /** Tid number */
  8487. A_UINT32 tid;
  8488. /** Buffer/Window size*/
  8489. A_UINT32 buffersize;
  8490. } wmi_addba_send_cmd_fixed_param;
  8491.  
  8492. typedef struct {
  8493. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_delba_send_cmd_fixed_param */
  8494. /** unique id identifying the VDEV, generated by the caller */
  8495. A_UINT32 vdev_id;
  8496. /** peer MAC address */
  8497. wmi_mac_addr peer_macaddr;
  8498. /** Tid number */
  8499. A_UINT32 tid;
  8500. /** Is Initiator */
  8501. A_UINT32 initiator;
  8502. /** Reason code */
  8503. A_UINT32 reasoncode;
  8504. } wmi_delba_send_cmd_fixed_param;
  8505.  
  8506. typedef struct {
  8507. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_addba_setresponse_cmd_fixed_param */
  8508. /** unique id identifying the vdev, generated by the caller */
  8509. A_UINT32 vdev_id;
  8510. /** peer mac address */
  8511. wmi_mac_addr peer_macaddr;
  8512. /** Tid number */
  8513. A_UINT32 tid;
  8514. /** status code */
  8515. A_UINT32 statuscode;
  8516. } wmi_addba_setresponse_cmd_fixed_param;
  8517.  
  8518. typedef struct {
  8519. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_send_singleamsdu_cmd_fixed_param */
  8520. /** unique id identifying the vdev, generated by the caller */
  8521. A_UINT32 vdev_id;
  8522. /** peer mac address */
  8523. wmi_mac_addr peer_macaddr;
  8524. /** Tid number */
  8525. A_UINT32 tid;
  8526. } wmi_send_singleamsdu_cmd_fixed_param;
  8527.  
  8528. /* Type of Station DTIM Power Save method */
  8529. enum {
  8530. /* For NORMAL DTIM, the parameter is the number of beacon intervals and
  8531. * also the same value as the listen interval. For this method, the
  8532. * station will wake up based on the listen interval. If this
  8533. * listen interval is not equal to DTIM, then the station may
  8534. * miss certain DTIM beacons. If this value is 1, then the
  8535. * station will wake up for every beacon.
  8536. */
  8537. WMI_STA_DTIM_PS_NORMAL_DTIM = 0x01,
  8538. /* For MODULATED_DTIM, parameter is a multiple of DTIM beacons to skip.
  8539. * When this value is 1, then the station will wake at every DTIM beacon.
  8540. * If this value is >1, then the station will skip certain DTIM beacons.
  8541. * This value is the multiple of DTIM intervals that the station will
  8542. * wake up to receive the DTIM beacons.
  8543. */
  8544. WMI_STA_DTIM_PS_MODULATED_DTIM = 0x02,
  8545. };
  8546.  
  8547. /* Parameter structure for the WMI_STA_DTIM_PS_METHOD_CMDID */
  8548. typedef struct {
  8549. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_dtim_ps_method_cmd_fixed_param */
  8550. /** unique id identifying the VDEV, generated by the caller */
  8551. A_UINT32 vdev_id;
  8552. /** Station DTIM Power Save method as defined above */
  8553. A_UINT32 dtim_pwrsave_method;
  8554. /** DTIM PS value. Contents depends on the method */
  8555. A_UINT32 value;
  8556. /** Modulated DTIM value */
  8557. A_UINT32 MaxLIModulatedDTIM;
  8558. } wmi_sta_dtim_ps_method_cmd_fixed_param;
  8559.  
  8560. /*
  8561. * For Station UAPSD Auto Trigger feature, the Firmware monitors the
  8562. * uAPSD uplink and downlink traffic for each uAPSD enabled WMM ACs.
  8563. * If there is no uplink/download for the specified service interval (field service_interval),
  8564. * firmware will auto generate a QOS-NULL trigger for that WMM-AP with the TID value
  8565. * specified in the UP (field user_priority).
  8566. * Firmware also monitors the responses for these QOS-NULL triggers.
  8567. * If the peer does not have any delivery frames, it will respond with
  8568. * QOS-NULL (EOSP=1). This feature of only using service interval is assumed to be mandatory for all
  8569. * firmware implementation. For this basic implementation, the suspend_interval and delay_interval
  8570. * are unused and should be set to 0.
  8571. * When service_interval is 0, then the firmware will not send any trigger frames. This is for
  8572. * certain host-based implementations that don't want this firmware offload.
  8573. * Note that the per-AC intervals are required for some usage scenarios. This is why the intervals
  8574. * are given in the array of ac_param[]. For example, Voice service interval may defaults to 20 ms
  8575. * and rest of the AC default to 300 ms.
  8576. *
  8577. * The service bit, WMI_STA_UAPSD_VAR_AUTO_TRIG, will indicate that the more advanced feature
  8578. * of variable auto trigger is supported. The suspend_interval and delay_interval is used in
  8579. * the more advanced monitoring method.
  8580. * If the PEER does not have any delivery enabled data frames (non QOS-NULL) for the
  8581. * suspend interval (field suspend_interval), firmware will change its auto trigger interval
  8582. * to delay interval (field delay_interval). This way, when there is no traffic, the station
  8583. * will save more power by waking up less and sending less trigger frames.
  8584. * The (service_interval < suspend_interval) and (service_interval < delay_interval).
  8585. * If this variable auto trigger is not required, then the suspend_interval and delay_interval
  8586. * should be 0.
  8587. */
  8588. typedef struct {
  8589. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_uapsd_auto_trig_param */
  8590. /** WMM Access category from 0 to 3 */
  8591. A_UINT32 wmm_ac;
  8592. /** User priority to use in trigger frames. It is the TID
  8593. * value. This field needs to be specified and may not be
  8594. * equivalent to AC since some implementation may use the TSPEC
  8595. * to enable UAPSD and negotiate a particular user priority. */
  8596. A_UINT32 user_priority;
  8597. /** service interval in ms */
  8598. A_UINT32 service_interval;
  8599. /** Suspend interval in ms */
  8600. A_UINT32 suspend_interval;
  8601. /** delay interval in ms */
  8602. A_UINT32 delay_interval;
  8603. } wmi_sta_uapsd_auto_trig_param;
  8604.  
  8605. typedef struct {
  8606. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_uapsd_auto_trig_cmd_fixed_param */
  8607. /** unique id identifying the VDEV, generated by the caller */
  8608. A_UINT32 vdev_id;
  8609. /** peer mac address */
  8610. wmi_mac_addr peer_macaddr;
  8611. /** Number of AC to specify */
  8612. A_UINT32 num_ac;
  8613. /*
  8614. * Following this struc is the TLV:
  8615. * wmi_sta_uapsd_auto_trig_param ac_param[]; <-- Variable number of AC parameters (defined by field num_ac)
  8616. */
  8617.  
  8618. } wmi_sta_uapsd_auto_trig_cmd_fixed_param;
  8619.  
  8620. /** mimo powersave state */
  8621. #define WMI_PEER_MIMO_PS_STATE 0x1
  8622. /** enable/disable AMPDU . initial value (enabled) */
  8623. #define WMI_PEER_AMPDU 0x2
  8624. /** authorize/unauthorize peer. initial value is unauthorized (0) */
  8625. #define WMI_PEER_AUTHORIZE 0x3
  8626. /** peer channel bandwidth */
  8627. #define WMI_PEER_CHWIDTH 0x4
  8628. /** peer NSS */
  8629. #define WMI_PEER_NSS 0x5
  8630. /** USE 4 ADDR */
  8631. #define WMI_PEER_USE_4ADDR 0x6
  8632. /* set group membership status */
  8633. #define WMI_PEER_MEMBERSHIP 0x7
  8634. #define WMI_PEER_USERPOS 0x8
  8635. /*
  8636. * A critical high-level protocol is being used with this peer. Target
  8637. * should take appropriate measures (if possible) to ensure more
  8638. * reliable link with minimal latency. This *may* include modifying the
  8639. * station power save policy, enabling more RX chains, increased
  8640. * priority of channel scheduling, etc.
  8641. *
  8642. * NOTE: This parameter should only be considered a hint as specific
  8643. * behavior will depend on many factors including current network load
  8644. * and vdev/peer configuration.
  8645. *
  8646. * For STA VDEV this peer corresponds to the AP's BSS peer.
  8647. * For AP VDEV this peer corresponds to the remote peer STA.
  8648. */
  8649. #define WMI_PEER_CRIT_PROTO_HINT_ENABLED 0x9
  8650. /* set Tx failure count threshold for the peer - Currently unused */
  8651. #define WMI_PEER_TX_FAIL_CNT_THR 0xA
  8652. /* Enable H/W retry and Enable H/W Send CTS2S before Data */
  8653. #define WMI_PEER_SET_HW_RETRY_CTS2S 0xB
  8654.  
  8655. /* Set peer advertised IBSS atim window length */
  8656. #define WMI_PEER_IBSS_ATIM_WINDOW_LENGTH 0xC
  8657.  
  8658. /** peer phy mode */
  8659. #define WMI_PEER_PHYMODE 0xD
  8660. /** Use FIXED Pwr */
  8661. #define WMI_PEER_USE_FIXED_PWR 0xE
  8662. /** Set peer fixed rate
  8663. * The top nibble is used to select which format to use for encoding
  8664. * the rate specification: 0xVXXXXXXX
  8665. * If V == 0b0000: format is same as before: 0x000000RR
  8666. * If V == 0b0001: format is: 0x1000RRRR.
  8667. * This will be output of WMI_ASSEMBLE_RATECODE_V1
  8668. * The host shall use the new V1 format (and set V = 0x1) if the target
  8669. * indicates 802.11ax support via the WMI_SERVICE_11AX flag, or if the
  8670. * system is configured with Nss > 4 (either at compile time within the
  8671. * host driver, or through WMI_SERVICE_READY PHY capabilities provided
  8672. * by the target).
  8673. */
  8674. #define WMI_PEER_PARAM_FIXED_RATE 0xF
  8675. /** Whitelist peer TIDs */
  8676. #define WMI_PEER_SET_MU_WHITELIST 0x10
  8677. /** Set peer max tx rate (MCS) in adaptive rate ctrl */
  8678. #define WMI_PEER_SET_MAX_TX_RATE 0x11
  8679. /** Set peer minimal tx rate (MCS) in adaptive rate ctrl */
  8680. #define WMI_PEER_SET_MIN_TX_RATE 0x12
  8681. /**
  8682. * default ring routing for peer data packets,
  8683. * param_value = bit 0 for hash based routing enabled or not
  8684. * (value 1 is enabled, value 0 is disabled)
  8685. * bits 1:5 are for ring 32 (i.e. ring id value
  8686. * selected from 0 to 31 values)
  8687. */
  8688. #define WMI_PEER_SET_DEFAULT_ROUTING 0x13
  8689.  
  8690. /** mimo ps values for the parameter WMI_PEER_MIMO_PS_STATE */
  8691. #define WMI_PEER_MIMO_PS_NONE 0x0
  8692. #define WMI_PEER_MIMO_PS_STATIC 0x1
  8693. #define WMI_PEER_MIMO_PS_DYNAMIC 0x2
  8694.  
  8695. typedef struct {
  8696. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_set_param_cmd_fixed_param */
  8697. /** unique id identifying the VDEV, generated by the caller */
  8698. A_UINT32 vdev_id;
  8699. /** peer MAC address */
  8700. wmi_mac_addr peer_macaddr;
  8701. /** parameter id */
  8702. A_UINT32 param_id;
  8703. /** parametr value */
  8704. A_UINT32 param_value;
  8705. } wmi_peer_set_param_cmd_fixed_param;
  8706.  
  8707. typedef union {
  8708. /*
  8709. * The A_UINT16 "mode" and "tx_rate" fields can only be directly used
  8710. * by the target or a little-endian host.
  8711. * A big-endian host needs to use the WMI_PEER_MAX_MIN_TX_xxx_GET/SET
  8712. * macros on the A_UINT32 "value" field.
  8713. */
  8714. struct {
  8715. A_UINT16 mode; /* 0:CCK, 1:OFDM, 2:HT, 3:VHT (see WMI_RATE_PREAMBLE) */
  8716. A_UINT16 tx_rate; /* see per-mode specs below */
  8717. };
  8718. A_UINT32 value; /* for use by big-endian host */
  8719. } wmi_peer_max_min_tx_rate;
  8720.  
  8721. /*
  8722. * Any access to the mode/tx_rate in an big endian system should use
  8723. * the below Macros on the wmi_peer_max_min_tx_rate.value field.
  8724. */
  8725. #define WMI_PEER_MAX_MIN_TX_MODE_GET(value32) WMI_GET_BITS(value32, 0, 16)
  8726. #define WMI_PEER_MAX_MIN_TX_MODE_SET(value32, tx_mode) WMI_SET_BITS(value32, 0, 16, tx_mode)
  8727.  
  8728. #define WMI_PEER_MAX_MIN_TX_RATE_GET(value32) WMI_GET_BITS(value32, 16, 16)
  8729. #define WMI_PEER_MAX_MIN_TX_RATE_SET(value32, tx_mode) WMI_SET_BITS(value32, 16, 16, tx_mode)
  8730.  
  8731. /* CCK max/min tx Rate description
  8732. * tx_rate = 0: 1 Mbps
  8733. * tx_rate = 1: 2 Mbps
  8734. * tx_rate = 2: 5.5 Mbps
  8735. * tx_rate = 3: 11 Mbps
  8736. * tx_rate = else: invalid
  8737. */
  8738. enum {
  8739. WMI_MAX_CCK_TX_RATE_1M, /* up to 1M CCK Rate avaliable */
  8740. WMI_MAX_CCK_TX_RATE_2M, /* up to 2M CCK Rate avaliable */
  8741. WMI_MAX_CCK_TX_RATE_5_5M, /* up to 5.5M CCK Rate avaliable */
  8742. WMI_MAX_CCK_TX_RATE_11M, /* up to 11M CCK Rate avaliable */
  8743. WMI_MAX_CCK_TX_RATE = WMI_MAX_CCK_TX_RATE_11M,
  8744. };
  8745.  
  8746. /* OFDM max/min tx Rate description
  8747. * tx_rate = 0: 6 Mbps
  8748. * tx_rate = 1: 9 Mbps
  8749. * tx_rate = 2: 12 Mbps
  8750. * tx_rate = 3: 18 Mbps
  8751. * tx_rate = 4: 24 Mbps
  8752. * tx_rate = 5: 32 Mbps
  8753. * tx_rate = 6: 48 Mbps
  8754. * tx_rate = 7: 54 Mbps
  8755. * tx_rate = else: invalid
  8756. */
  8757. enum {
  8758. WMI_MAX_OFDM_TX_RATE_6M, /* up to 6M OFDM Rate avaliable */
  8759. WMI_MAX_OFDM_TX_RATE_9M, /* up to 9M OFDM Rate avaliable */
  8760. WMI_MAX_OFDM_TX_RATE_12M, /* up to 12M OFDM Rate avaliable */
  8761. WMI_MAX_OFDM_TX_RATE_18M, /* up to 18M OFDM Rate avaliable */
  8762. WMI_MAX_OFDM_TX_RATE_24M, /* up to 24M OFDM Rate avaliable */
  8763. WMI_MAX_OFDM_TX_RATE_36M, /* up to 36M OFDM Rate avaliable */
  8764. WMI_MAX_OFDM_TX_RATE_48M, /* up to 48M OFDM Rate avaliable */
  8765. WMI_MAX_OFDM_TX_RATE_54M, /* up to 54M OFDM Rate avaliable */
  8766. WMI_MAX_OFDM_TX_RATE = WMI_MAX_OFDM_TX_RATE_54M,
  8767. };
  8768.  
  8769. /* HT max/min tx rate description
  8770. * tx_rate = 0~7 : MCS Rate 0~7
  8771. * tx_rate=else : invalid.
  8772. */
  8773. #define WMI_MAX_HT_TX_MCS 0x07
  8774.  
  8775. /* VHT max/min tx rate description
  8776. * tx_rate = 0~9 : MCS Rate 0~9
  8777. * tx_rate=else : invalid.
  8778. */
  8779. #define WMI_MAX_VHT_TX_MCS 0x09
  8780.  
  8781.  
  8782. #define MAX_SUPPORTED_RATES 128
  8783.  
  8784. typedef struct {
  8785. /** total number of rates */
  8786. A_UINT32 num_rates;
  8787. /**
  8788. * rates (each 8bit value) packed into a 32 bit word.
  8789. * the rates are filled from least significant byte to most
  8790. * significant byte.
  8791. */
  8792. A_UINT32 rates[(MAX_SUPPORTED_RATES / 4) + 1];
  8793. } wmi_rate_set;
  8794.  
  8795. /* NOTE: It would bea good idea to represent the Tx MCS
  8796. * info in one word and Rx in another word. This is split
  8797. * into multiple words for convenience
  8798. */
  8799. typedef struct {
  8800. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vht_rate_set */
  8801. A_UINT32 rx_max_rate; /* Max Rx data rate */
  8802. A_UINT32 rx_mcs_set; /* Negotiated RX VHT rates */
  8803. A_UINT32 tx_max_rate; /* Max Tx data rate */
  8804. A_UINT32 tx_mcs_set; /* Negotiated TX VHT rates */
  8805. A_UINT32 tx_max_mcs_nss; /* b0-b3: max mcs idx; b4-b7: max nss */
  8806. } wmi_vht_rate_set;
  8807.  
  8808.  
  8809. /* NOTE: It would bea good idea to represent the Tx MCS
  8810. * info in one word and Rx in another word. This is split
  8811. * into multiple words for convenience
  8812. * currently this is being defined in IEEE802.11ax so this is same as wmi_vht_rate_set and is sub change in future and may include BW as well
  8813. */
  8814. typedef struct {
  8815. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_he_rate_set */
  8816. /* HE Supported MCS Set field Rx
  8817. * - 3 bits are used for each NSS chain.Max of 8 NSS can be encoded with
  8818. * bit 2-0 indicating max HE MCS of NSS1
  8819. * bit 5-3 indicating max HE MCS of NSS2 and so on
  8820. * - The max HE-MCS for n SS subfield (where n = 1,...,8) is encoded as follows
  8821. * - 0 indicates support for VHT-MCS 0-7 for n spatial streams
  8822. * - 1 indicates support for VHT-MCS 0-8 for n spatial streams
  8823. * - 2 indicates support for VHT-MCS 0-9 for n spatial streams
  8824. * - 3 indicates support for VHT-MCS 0-10 for n spatial streams
  8825. * - 4 indicates support for VHT-MCS 0-11 for n spatial streams
  8826. * - 5-6 reserved
  8827. * - 7 indicates that n spatial streams is not supported
  8828. * - WMI_HE_MAX_MCS_4_SS_MASK macro can be used for encoding this info
  8829. */
  8830. A_UINT32 rx_mcs_set; /* Negotiated RX VHT rates (i.e. rate this node can RX from peer)*/
  8831. /* HE Supported MCS Set field Tx
  8832. * - 3 bits are used for each NSS chain.Max of 8 NSS can be encoded with
  8833. * bit 2-0 indicating max HE MCS of NSS1
  8834. * bit 5-3 indicating max HE MCS of NSS2 and so on
  8835. * - The max HE-MCS for n SS subfield (where n = 1,...,8) is encoded as follows
  8836. * - 0 indicates support for VHT-MCS 0-7 for n spatial streams
  8837. * - 1 indicates support for VHT-MCS 0-8 for n spatial streams
  8838. * - 2 indicates support for VHT-MCS 0-9 for n spatial streams
  8839. * - 3 indicates support for VHT-MCS 0-10 for n spatial streams
  8840. * - 4 indicates support for VHT-MCS 0-11 for n spatial streams
  8841. * - 5-6 reserved
  8842. * - 7 indicates that n spatial streams is not supported
  8843. * - WMI_HE_MAX_MCS_4_SS_MASK macro can be used for encoding this info
  8844. */
  8845. A_UINT32 tx_mcs_set; /* Negotiated TX VHT rates(i.e. rate this node can TX to peer) */
  8846. } wmi_he_rate_set;
  8847.  
  8848.  
  8849.  
  8850.  
  8851.  
  8852.  
  8853. /*
  8854. * IMPORTANT: Make sure the bit definitions here are consistent
  8855. * with the ni_flags definitions in wlan_peer.h
  8856. */
  8857. #define WMI_PEER_AUTH 0x00000001 /* Authorized for data */
  8858. #define WMI_PEER_QOS 0x00000002 /* QoS enabled */
  8859. #define WMI_PEER_NEED_PTK_4_WAY 0x00000004 /* Needs PTK 4 way handshake for authorization */
  8860. #define WMI_PEER_NEED_GTK_2_WAY 0x00000010 /* Needs GTK 2 way handshake after 4-way handshake */
  8861. #define WMI_PEER_HE 0x00000400 /* HE Enabled */
  8862. #define WMI_PEER_APSD 0x00000800 /* U-APSD power save enabled */
  8863. #define WMI_PEER_HT 0x00001000 /* HT enabled */
  8864. #define WMI_PEER_40MHZ 0x00002000 /* 40MHz enabld */
  8865. #define WMI_PEER_STBC 0x00008000 /* STBC Enabled */
  8866. #define WMI_PEER_LDPC 0x00010000 /* LDPC ENabled */
  8867. #define WMI_PEER_DYN_MIMOPS 0x00020000 /* Dynamic MIMO PS Enabled */
  8868. #define WMI_PEER_STATIC_MIMOPS 0x00040000 /* Static MIMO PS enabled */
  8869. #define WMI_PEER_SPATIAL_MUX 0x00200000 /* SM Enabled */
  8870. #define WMI_PEER_VHT 0x02000000 /* VHT Enabled */
  8871. #define WMI_PEER_80MHZ 0x04000000 /* 80MHz enabld */
  8872. #define WMI_PEER_PMF 0x08000000 /* Robust Management Frame Protection enabled */
  8873. /** CAUTION TODO: Place holder for WLAN_PEER_F_PS_PRESEND_REQUIRED = 0x10000000. Need to be clean up */
  8874. #define WMI_PEER_IS_P2P_CAPABLE 0x20000000 /* P2P capable peer */
  8875. #define WMI_PEER_160MHZ 0x40000000 /* 160 MHz enabled */
  8876. #define WMI_PEER_SAFEMODE_EN 0x80000000 /* Fips Mode Enabled */
  8877.  
  8878. /**
  8879. * Peer rate capabilities.
  8880. *
  8881. * This is of interest to the ratecontrol
  8882. * module which resides in the firmware. The bit definitions are
  8883. * consistent with that defined in if_athrate.c.
  8884. *
  8885. * @todo
  8886. * Move this to a common header file later so there is no need to
  8887. * duplicate the definitions or maintain consistency.
  8888. */
  8889. #define WMI_RC_DS_FLAG 0x01 /* Dual stream flag */
  8890. #define WMI_RC_CW40_FLAG 0x02 /* CW 40 */
  8891. #define WMI_RC_SGI_FLAG 0x04 /* Short Guard Interval */
  8892. #define WMI_RC_HT_FLAG 0x08 /* HT */
  8893. #define WMI_RC_RTSCTS_FLAG 0x10 /* RTS-CTS */
  8894. #define WMI_RC_TX_STBC_FLAG 0x20 /* TX STBC */
  8895. #define WMI_RC_TX_STBC_FLAG_S 5 /* TX STBC */
  8896. #define WMI_RC_RX_STBC_FLAG 0xC0 /* RX STBC ,2 bits */
  8897. #define WMI_RC_RX_STBC_FLAG_S 6 /* RX STBC ,2 bits */
  8898. #define WMI_RC_WEP_TKIP_FLAG 0x100 /* WEP/TKIP encryption */
  8899. #define WMI_RC_TS_FLAG 0x200 /* Three stream flag */
  8900. #define WMI_RC_UAPSD_FLAG 0x400 /* UAPSD Rate Control */
  8901.  
  8902. typedef struct {
  8903. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_assoc_complete_cmd_fixed_param */
  8904. /** peer MAC address */
  8905. wmi_mac_addr peer_macaddr;
  8906. /** VDEV id */
  8907. A_UINT32 vdev_id;
  8908. /** assoc = 1 reassoc = 0 */
  8909. A_UINT32 peer_new_assoc;
  8910. /** peer associd (16 bits) */
  8911. A_UINT32 peer_associd;
  8912. /** peer station flags: see definition above */
  8913. A_UINT32 peer_flags;
  8914. /** negotiated capabilities (lower 16 bits)*/
  8915. A_UINT32 peer_caps;
  8916. /** Listen interval */
  8917. A_UINT32 peer_listen_intval;
  8918. /** HT capabilties of the peer */
  8919. A_UINT32 peer_ht_caps;
  8920. /** maximum rx A-MPDU length */
  8921. A_UINT32 peer_max_mpdu;
  8922. /** mpdu density of the peer in usec(0 to 16) */
  8923. A_UINT32 peer_mpdu_density;
  8924. /** peer rate capabilties see flags above */
  8925. A_UINT32 peer_rate_caps;
  8926. /** num spatial streams */
  8927. A_UINT32 peer_nss;
  8928. /** VHT capabilties of the peer */
  8929. A_UINT32 peer_vht_caps;
  8930. /** phy mode */
  8931. A_UINT32 peer_phymode;
  8932. /** HT Operation Element of the peer. Five bytes packed in 2
  8933. * INT32 array and filled from lsb to msb.
  8934. * Note that the size of array peer_ht_info[] cannotbe changed
  8935. * without breaking WMI Compatibility. */
  8936. A_UINT32 peer_ht_info[2];
  8937. /** total number of negotiated legacy rate set. Also the sizeof
  8938. * peer_legacy_rates[] */
  8939. A_UINT32 num_peer_legacy_rates;
  8940. /** total number of negotiated ht rate set. Also the sizeof
  8941. * peer_ht_rates[] */
  8942. A_UINT32 num_peer_ht_rates;
  8943. /**
  8944. * Bitmap providing customized mapping of bandwidths to max Rx NSS
  8945. * for this peer.
  8946. * This is required since 802.11 standard currently facilitates peer to be
  8947. * able to advertise only a single max Rx NSS value across all bandwidths.
  8948. * Some QCA chipsets might need to be able to advertise a different max
  8949. * Rx NSS value for 160 MHz, than that for 80 MHz and lower.
  8950. *
  8951. * bit[2:0] : Represents value of Rx NSS for VHT 160 MHz
  8952. * bit[30:3]: Reserved
  8953. * bit[31] : MSB(0/1): 1 in case of valid data else all bits will be set
  8954. * to 0 by host
  8955. */
  8956. A_UINT32 peer_bw_rxnss_override;
  8957.  
  8958. /* 802.11ax capabilities */
  8959. wmi_ppe_threshold peer_ppet;
  8960. A_UINT32 peer_he_cap_info; /* protocol-defined HE / 11ax capability flags */
  8961. A_UINT32 peer_he_ops; /* HE operation contains BSS color */
  8962. A_UINT32 peer_he_cap_phy[WMI_MAX_HECAP_PHY_SIZE];
  8963. A_UINT32 peer_he_mcs; /* Indicates number of HE MCS TLV present */
  8964.  
  8965. /* Following this struct are the TLV's:
  8966. * A_UINT8 peer_legacy_rates[];
  8967. * A_UINT8 peer_ht_rates[];
  8968. * wmi_vht_rate_set peer_vht_rates; <-- VHT capabilties of the peer
  8969. * WMI_he_rate_set_peer_he_rates; <-- HE capabilities of the peer
  8970. */
  8971. } wmi_peer_assoc_complete_cmd_fixed_param;
  8972.  
  8973. /* WDS Entry Flags */
  8974. #define WMI_WDS_FLAG_STATIC 0x1 /* Disable aging & learning */
  8975.  
  8976. typedef struct {
  8977. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_add_wds_entry_cmd_fixed_param */
  8978. /** peer MAC address */
  8979. wmi_mac_addr peer_macaddr;
  8980. /** wds MAC addr */
  8981. wmi_mac_addr wds_macaddr;
  8982. /* Flags associated with WDS entry - see WMI_WDS_FLAG defs */
  8983. A_UINT32 flags;
  8984. A_UINT32 vdev_id;
  8985. } wmi_peer_add_wds_entry_cmd_fixed_param;
  8986.  
  8987. #define WMI_CHAN_InFO_START_RESP 0
  8988. #define WMI_CHAN_InFO_END_RESP 1
  8989.  
  8990. typedef struct {
  8991. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_remove_wds_entry_cmd_fixed_param */
  8992. /** wds MAC addr */
  8993. wmi_mac_addr wds_macaddr;
  8994. A_UINT32 vdev_id;
  8995. } wmi_peer_remove_wds_entry_cmd_fixed_param;
  8996.  
  8997.  
  8998. typedef struct {
  8999. /** peer MAC address */
  9000. wmi_mac_addr peer_macaddr;
  9001. } wmi_peer_q_empty_callback_event;
  9002.  
  9003. /*
  9004. * Command to update an already existing WDS entry. Different address setting
  9005. * combinations are possible.
  9006. *
  9007. * Valid wds and peer -> Associated WDS entry peer ptr & flags will be updated.
  9008. * Valid wds and null peer -> Associated WDS entry flags will be updated.
  9009. * Null wds and Valid peer -> Flags will be updated for all WDS entries behind the peer.
  9010. * Null wds and peer -> Flags will be updated for all WDS entries.
  9011. */
  9012. typedef struct {
  9013. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_update_wds_entry_cmd_fixed_param */
  9014. /** peer MAC address */
  9015. wmi_mac_addr peer_macaddr;
  9016. /** wds MAC addr */
  9017. wmi_mac_addr wds_macaddr;
  9018. /* Flags associated with WDS entry */
  9019. A_UINT32 flags;
  9020. A_UINT32 vdev_id;
  9021. } wmi_peer_update_wds_entry_cmd_fixed_param;
  9022.  
  9023. /**
  9024. * Channel info WMI event
  9025. */
  9026. typedef struct {
  9027. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chan_info_event_fixed_param */
  9028. /** Error code */
  9029. A_UINT32 err_code;
  9030. /** Channel freq */
  9031. A_UINT32 freq;
  9032. /** Read flags */
  9033. A_UINT32 cmd_flags;
  9034. /** Noise Floor value */
  9035. A_UINT32 noise_floor;
  9036. /** rx clear count */
  9037. A_UINT32 rx_clear_count;
  9038. /** cycle count */
  9039. A_UINT32 cycle_count;
  9040. /** channel tx power per range in 0.5dBm steps */
  9041. A_UINT32 chan_tx_pwr_range;
  9042. /** channel tx power per throughput */
  9043. A_UINT32 chan_tx_pwr_tp;
  9044. /** rx frame count (cumulative) */
  9045. A_UINT32 rx_frame_count;
  9046. /** BSS rx cycle count */
  9047. A_UINT32 my_bss_rx_cycle_count;
  9048. /** b-mode data rx time (units are microseconds) */
  9049. A_UINT32 rx_11b_mode_data_duration;
  9050. /** tx frame count */
  9051. A_UINT32 tx_frame_cnt;
  9052. /** mac clock */
  9053. A_UINT32 mac_clk_mhz;
  9054. /** unique id identifying the VDEV */
  9055. A_UINT32 vdev_id;
  9056. } wmi_chan_info_event_fixed_param;
  9057.  
  9058. /**
  9059. * Non wlan interference event
  9060. */
  9061. typedef struct {
  9062. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wlan_dcs_cw_int */
  9063. A_UINT32 channel; /* either number or freq in mhz*/
  9064. } wlan_dcs_cw_int;
  9065. #define ath_dcs_cw_int /* DEPRECATED */ wlan_dcs_cw_int /* alias */
  9066.  
  9067. /**
  9068. * wlan_dcs_im_tgt_stats
  9069. *
  9070. */
  9071. typedef struct _wlan_dcs_im_tgt_stats {
  9072. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wlan_dcs_im_tgt_stats_t */
  9073.  
  9074. /** current running TSF from the TSF-1 */
  9075. A_UINT32 reg_tsf32;
  9076.  
  9077. /** Known last frame rssi, in case of multiple stations, if
  9078. * and at different ranges, this would not gaurantee that
  9079. * this is the least rssi.
  9080. */
  9081. A_UINT32 last_ack_rssi;
  9082.  
  9083. /** Sum of all the failed durations in the last one second interval.
  9084. */
  9085. A_UINT32 tx_waste_time;
  9086. /** count how many times the hal_rxerr_phy is marked, in this
  9087. * time period
  9088. */
  9089. A_UINT32 rx_time;
  9090. A_UINT32 phyerr_cnt;
  9091.  
  9092. /**
  9093. * WLAN IM stats from target to host
  9094. *
  9095. * Below statistics are sent from target to host periodically.
  9096. * These are collected at target as long as target is running
  9097. * and target chip is not in sleep.
  9098. *
  9099. */
  9100.  
  9101. /** listen time from ANI */
  9102. A_INT32 listen_time;
  9103.  
  9104. /** tx frame count, MAC_PCU_TX_FRAME_CNT_ADDRESS */
  9105. A_UINT32 reg_tx_frame_cnt;
  9106.  
  9107. /** rx frame count, MAC_PCU_RX_FRAME_CNT_ADDRESS */
  9108. A_UINT32 reg_rx_frame_cnt;
  9109.  
  9110. /** rx clear count, MAC_PCU_RX_CLEAR_CNT_ADDRESS */
  9111. A_UINT32 reg_rxclr_cnt;
  9112.  
  9113. /** total cycle counts MAC_PCU_CYCLE_CNT_ADDRESS */
  9114. A_UINT32 reg_cycle_cnt; /* delta cycle count */
  9115.  
  9116. /** extenstion channel rx clear count */
  9117. A_UINT32 reg_rxclr_ext_cnt;
  9118.  
  9119. /** OFDM phy error counts, MAC_PCU_PHY_ERR_CNT_1_ADDRESS */
  9120. A_UINT32 reg_ofdm_phyerr_cnt;
  9121.  
  9122. /** CCK phy error count, MAC_PCU_PHY_ERR_CNT_2_ADDRESS */
  9123. A_UINT32 reg_cck_phyerr_cnt; /* CCK err count since last reset, read from register */
  9124.  
  9125. /** Channel noise floor (units are dBm) */
  9126. A_INT32 chan_nf;
  9127.  
  9128. /** BSS rx cycle count */
  9129. A_UINT32 my_bss_rx_cycle_count;
  9130. } wlan_dcs_im_tgt_stats_t;
  9131.  
  9132. /**
  9133. * wmi_dcs_interference_event_t
  9134. *
  9135. * Right now this is event and stats together. Partly this is
  9136. * because cw interference is handled in target now. This
  9137. * can be done at host itself, if we can carry the NF alone
  9138. * as a stats event. In future this would be done and this
  9139. * event would carry only stats.
  9140. */
  9141. typedef struct {
  9142. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dcs_interference_event_fixed_param */
  9143. /**
  9144. * Type of the event present, either the cw interference event, or the wlan_im stats
  9145. */
  9146. A_UINT32 interference_type; /* type of interference, wlan or cw */
  9147. /** pdev_id for identifying the MAC
  9148. * See macros starting with WMI_PDEV_ID_ for values.
  9149. */
  9150. A_UINT32 pdev_id;
  9151. /*
  9152. * Following this struct are these TLVs. Note that they are both array of structures
  9153. * but can have at most one element. Which TLV is empty or has one element depends
  9154. * on the field interference_type. This is to emulate an union with cw_int and wlan_stat
  9155. * elements (not arrays). union { wlan_dcs_cw_int cw_int; wlan_dcs_im_tgt_stats_t wlan_stat; } int_event;
  9156. *
  9157. * wlan_dcs_cw_int cw_int[]; <-- cw_interference event
  9158. * wlan_dcs_im_tgt_stats_t wlan_stat[]; <-- wlan im interfernce stats
  9159. */
  9160. } wmi_dcs_interference_event_fixed_param;
  9161.  
  9162. enum wmi_peer_mcast_group_action {
  9163. wmi_peer_mcast_group_action_add = 0,
  9164. wmi_peer_mcast_group_action_del = 1
  9165. };
  9166. #define WMI_PEER_MCAST_GROUP_FLAG_ACTION_M 0x1
  9167. #define WMI_PEER_MCAST_GROUP_FLAG_ACTION_S 0
  9168. #define WMI_PEER_MCAST_GROUP_FLAG_WILDCARD_M 0x2
  9169. #define WMI_PEER_MCAST_GROUP_FLAG_WILDCARD_S 1
  9170. #define WMI_PEER_MCAST_GROUP_FLAG_SRC_FILTER_EXCLUDE_M 0x4 /* flag to exclude an ip while filtering. set to exclude */
  9171. #define WMI_PEER_MCAST_GROUP_FLAG_SRC_FILTER_EXCLUDE_S 2
  9172. #define WMI_PEER_MCAST_GROUP_FLAG_IPV6_M 0x8 /* flag to say ipv4/ipv6. Will be set for ipv6 */
  9173. #define WMI_PEER_MCAST_GROUP_FLAG_IPV6_S 3
  9174. #define WMI_PEER_MCAST_GROUP_FLAG_DELETEALL_M 0x10 /* delete all mcast table entries. */
  9175. #define WMI_PEER_MCAST_GROUP_FLAG_DELETEALL_S 4
  9176.  
  9177. /* multicast group membership commands */
  9178. /* TODO: Converting this will be tricky since it uses an union.
  9179. Also, the mac_addr is not aligned. We will convert to the wmi_mac_addr */
  9180. typedef struct {
  9181. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_mcast_group_cmd_fixed_param */
  9182. A_UINT32 flags;
  9183. wmi_mac_addr ucast_mac_addr;
  9184. /* in network byte order */
  9185. /* for ipv4, bytes (12-15) should contain ip address and other lower bytes 0. ipv6 should have all bytes valid */
  9186. A_UINT8 mcast_ip_addr[16];
  9187. /* for ipv6, all 16 bytes has to be valid; for ipv4 last 4 bytes(12-15) has to be valid, rest all 0s */
  9188. A_UINT8 mcast_ip_mask[16];/* zero out lower bytes if ipv4*/
  9189. /* number of address filters - irrespective of ipv4/ipv6 addresses */
  9190. A_UINT32 num_filter_addr;
  9191. /* this array should contain the src IPs that are to be filtered during find
  9192. The array should be packed.
  9193. If there are 2 ipv4 addresses, there should be 8 bytes and rest all 0s */
  9194. A_UINT8 filter_addr[64]; /* 16 ipv4 addresses or 4 ipv6 addresses */
  9195. A_UINT8 vdev_id; /* vdev of this mcast group */
  9196. } wmi_peer_mcast_group_cmd_fixed_param;
  9197.  
  9198.  
  9199. /** Offload Scan and Roaming related commands */
  9200. /** The FW performs 2 different kinds of offload scans independent
  9201. * of host. One is Roam scan which is primarily performed on a
  9202. * station VDEV after association to look for a better AP that
  9203. * the station VDEV can roam to. The second scan is connect scan
  9204. * which is mainly performed when the station is not associated
  9205. * and to look for a matching AP profile from a list of
  9206. * configured profiles. */
  9207.  
  9208. /* flags for roam_scan_mode_cmd
  9209. * indicate the status (success/fail) of wmi_roam_scan_mode cmd through WMI_ROAM_EVENTID */
  9210. #define WMI_ROAM_SCAN_MODE_FLAG_REPORT_STATUS 0x1
  9211.  
  9212. /**
  9213. * WMI_ROAM_SCAN_MODE: Set Roam Scan mode
  9214. * the roam scan mode is one of the periodic, rssi change, both, none.
  9215. * None : Disable Roam scan. No Roam scan at all.
  9216. * Periodic : Scan periodically with a configurable period.
  9217. * Rssi change : Scan when ever rssi to current AP changes by the threshold value
  9218. * set by WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD command.
  9219. * Both : Both of the above (scan when either period expires or rss to current AP changes by X amount)
  9220. *
  9221. */
  9222. typedef struct {
  9223. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_mode_fixed_param */
  9224. A_UINT32 roam_scan_mode;
  9225. A_UINT32 vdev_id;
  9226. A_UINT32 flags; /* see WMI_ROAM_SCAN_MODE_FLAG defs */
  9227. } wmi_roam_scan_mode_fixed_param;
  9228.  
  9229. #define WMI_ROAM_SCAN_MODE_NONE 0x0
  9230. #define WMI_ROAM_SCAN_MODE_PERIODIC 0x1
  9231. #define WMI_ROAM_SCAN_MODE_RSSI_CHANGE 0x2
  9232. #define WMI_ROAM_SCAN_MODE_BOTH 0x3
  9233. /* Note: WMI_ROAM_SCAN_MODE_ROAMOFFLOAD is one bit not conflict with LFR2.0 SCAN_MODE. */
  9234. #define WMI_ROAM_SCAN_MODE_ROAMOFFLOAD 0x4
  9235.  
  9236.  
  9237. typedef struct {
  9238. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_cmd_fixed_param */
  9239. A_UINT32 vdev_id;
  9240. A_UINT32 command_arg;
  9241. } wmi_roam_scan_cmd_fixed_param;
  9242.  
  9243. #define WMI_ROAM_SCAN_STOP_CMD 0x1
  9244.  
  9245. /**
  9246. * WMI_ROAM_SCAN_RSSI_THRESHOLD : set scan rssi thresold
  9247. * scan rssi threshold is the rssi threshold below which the FW will start running Roam scans.
  9248. * Applicable when WMI_ROAM_SCAN_MODE is not set to none.
  9249. */
  9250. typedef struct {
  9251. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_rssi_threshold_fixed_param */
  9252. /** unique id identifying the VDEV, generated by the caller */
  9253. A_UINT32 vdev_id;
  9254. /** roam scan rssi threshold */
  9255. A_UINT32 roam_scan_rssi_thresh;
  9256. /** When using Hw generated beacon RSSI interrupts */
  9257. A_UINT32 roam_rssi_thresh_diff;
  9258. /** 5G scan max count */
  9259. A_UINT32 hirssi_scan_max_count;
  9260. /** 5G scan rssi change threshold value */
  9261. A_UINT32 hirssi_scan_delta;
  9262. /** 5G scan upper bound */
  9263. A_UINT32 hirssi_upper_bound;
  9264. /** roam scan rssi threshold for 5G band.
  9265. * offset from roam_scan_rssi_thres, in dB units
  9266. */
  9267. A_INT32 rssi_thresh_offset_5g;
  9268. /* The TLVs will follow.
  9269. * wmi_roam_scan_extended_threshold_param extended_param;
  9270. * wmi_roam_earlystop_rssi_thres_param earlystop_param;
  9271. * wmi_roam_dense_thres_param dense_param;
  9272. */
  9273. } wmi_roam_scan_rssi_threshold_fixed_param;
  9274.  
  9275. #define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_FIXED 0x0
  9276. #define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_LINEAR 0x1
  9277. #define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_LOG 0x2
  9278. #define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_EXP 0x3
  9279.  
  9280. typedef struct {
  9281. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_extended_threshold_param */
  9282. A_UINT32 boost_threshold_5g; /** RSSI threshold above which 5GHz RSSI is favored */
  9283. A_UINT32 penalty_threshold_5g; /** RSSI threshold below which 5GHz RSSI is penalized */
  9284. A_UINT32 boost_algorithm_5g; /** 0 == fixed, 1 == linear, 2 == logarithm ..etc */
  9285. A_UINT32 boost_factor_5g; /** factor by which 5GHz RSSI is boosted */
  9286. A_UINT32 penalty_algorithm_5g; /** 0 == fixed, 1 == linear, 2 == logarithm ..etc */
  9287. A_UINT32 penalty_factor_5g; /** factor by which 5GHz RSSI is penalized */
  9288. A_UINT32 max_boost_5g; /** maximum boost that can be applied to a 5GHz RSSI */
  9289. A_UINT32 max_penalty_5g; /** maximum penality that can be applied to a 5GHz RSSI */
  9290. A_UINT32 good_rssi_threshold; /** RSSI below which roam is kicked in by background scan, although rssi is still good */
  9291. } wmi_roam_scan_extended_threshold_param;
  9292.  
  9293. /**
  9294. * WMI_ROAM_SCAN_PERIOD: period for roam scan.
  9295. * Applicable when the scan mode is Periodic or both.
  9296. */
  9297. typedef struct {
  9298. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_period_fixed_param */
  9299. /** unique id identifying the VDEV, generated by the caller */
  9300. A_UINT32 vdev_id;
  9301. /** roam scan period value */
  9302. A_UINT32 roam_scan_period;
  9303. /** Aging for Roam scans */
  9304. A_UINT32 roam_scan_age;
  9305. } wmi_roam_scan_period_fixed_param;
  9306.  
  9307. /**
  9308. * WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD : rssi delta to trigger the roam scan.
  9309. * Rssi change threshold used when mode is Rssi change (or) Both.
  9310. * The FW will run the roam scan when ever the rssi changes (up or down) by the value set by this parameter.
  9311. * Note scan is triggered based on the rssi threshold condition set by WMI_ROAM_SCAN_RSSI_THRESHOLD
  9312. */
  9313. typedef struct {
  9314. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_rssi_change_threshold_fixed_param */
  9315. /** unique id identifying the VDEV, generated by the caller */
  9316. A_UINT32 vdev_id;
  9317. /** roam scan rssi change threshold value */
  9318. A_UINT32 roam_scan_rssi_change_thresh;
  9319. /** When using Hw generated beacon RSSI interrupts */
  9320. A_UINT32 bcn_rssi_weight;
  9321. /** Minimum delay between two 5G scans */
  9322. A_UINT32 hirssi_delay_btw_scans;
  9323. } wmi_roam_scan_rssi_change_threshold_fixed_param;
  9324.  
  9325. #define WMI_ROAM_SCAN_CHAN_LIST_TYPE_NONE 0x1
  9326. #define WMI_ROAM_SCAN_CHAN_LIST_TYPE_STATIC 0x2
  9327. #define WMI_ROAM_SCAN_CHAN_LIST_TYPE_DYNAMIC 0x3
  9328. /**
  9329. * TLV for roaming channel list
  9330. */
  9331. typedef struct {
  9332. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_chan_list_fixed_param */
  9333. /** unique id identifying the VDEV, generated by the caller */
  9334. A_UINT32 vdev_id;
  9335. /** WMI_CHAN_LIST_TAG */
  9336. A_UINT32 chan_list_type;
  9337. /** # if channels to scan */
  9338. A_UINT32 num_chan;
  9339. /**
  9340. * TLV (tag length value) parameters follow the wmi_roam_chan_list
  9341. * structure. The TLV's are:
  9342. * A_UINT32 channel_list[];
  9343. **/
  9344. } wmi_roam_chan_list_fixed_param;
  9345.  
  9346. /** Authentication modes */
  9347. enum {
  9348. WMI_AUTH_NONE, /* no upper level auth */
  9349. WMI_AUTH_OPEN, /* open */
  9350. WMI_AUTH_SHARED, /* shared-key */
  9351. WMI_AUTH_8021X, /* 802.1x */
  9352. WMI_AUTH_AUTO, /* Auto */
  9353. WMI_AUTH_WPA, /* WPA */
  9354. WMI_AUTH_RSNA, /* WPA2/RSNA */
  9355. WMI_AUTH_CCKM, /* CCKM */
  9356. WMI_AUTH_WAPI, /* WAPI */
  9357. WMI_AUTH_AUTO_PSK,
  9358. WMI_AUTH_WPA_PSK,
  9359. WMI_AUTH_RSNA_PSK,
  9360. WMI_AUTH_WAPI_PSK,
  9361. WMI_AUTH_FT_RSNA, /* 11r FT */
  9362. WMI_AUTH_FT_RSNA_PSK,
  9363. WMI_AUTH_RSNA_PSK_SHA256,
  9364. WMI_AUTH_RSNA_8021X_SHA256,
  9365. WMI_AUTH_CCKM_WPA,
  9366. WMI_AUTH_CCKM_RSNA,
  9367. };
  9368.  
  9369. typedef struct {
  9370. /** authentication mode (defined above) */
  9371. A_UINT32 rsn_authmode;
  9372. /** unicast cipher set */
  9373. A_UINT32 rsn_ucastcipherset;
  9374. /** mcast/group cipher set */
  9375. A_UINT32 rsn_mcastcipherset;
  9376. /** mcast/group management frames cipher set */
  9377. A_UINT32 rsn_mcastmgmtcipherset;
  9378. } wmi_rsn_params;
  9379.  
  9380. /** looking for a wps enabled AP */
  9381. #define WMI_AP_PROFILE_FLAG_WPS 0x1
  9382. /** looking for a secure AP */
  9383. #define WMI_AP_PROFILE_FLAG_CRYPTO 0x2
  9384. /** looking for a PMF enabled AP */
  9385. #define WMI_AP_PROFILE_FLAG_PMF 0x4
  9386.  
  9387.  
  9388. /** To match an open AP, the rs_authmode should be set to WMI_AUTH_NONE
  9389. * and WMI_AP_PROFILE_FLAG_CRYPTO should be clear.
  9390. * To match a WEP enabled AP, the rs_authmode should be set to WMI_AUTH_NONE
  9391. * and WMI_AP_PROFILE_FLAG_CRYPTO should be set .
  9392. */
  9393.  
  9394. typedef struct {
  9395. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ap_profile */
  9396. /** flags as defined above */
  9397. A_UINT32 flags;
  9398. /**
  9399. * rssi thresold value: the value of the the candidate AP should
  9400. * higher by this threshold than the rssi of the currrently associated AP.
  9401. */
  9402. A_UINT32 rssi_threshold;
  9403. /**
  9404. * ssid vlaue to be matched.
  9405. */
  9406. wmi_ssid ssid;
  9407.  
  9408. /**
  9409. * security params to be matched.
  9410. */
  9411. /** authentication mode (defined above) */
  9412. A_UINT32 rsn_authmode;
  9413. /** unicast cipher set */
  9414. A_UINT32 rsn_ucastcipherset;
  9415. /** mcast/group cipher set */
  9416. A_UINT32 rsn_mcastcipherset;
  9417. /** mcast/group management frames cipher set */
  9418. A_UINT32 rsn_mcastmgmtcipherset;
  9419. /**
  9420. * rssi_abs_thresold value: the value of the candidate AP should
  9421. * higher than this absolute RSSI threshold.
  9422. * Zero means no absolute minimum RSSI is required.
  9423. * units are the offset from the noise floor in dB.
  9424. */
  9425. A_UINT32 rssi_abs_thresh;
  9426. } wmi_ap_profile;
  9427.  
  9428. /** Support early stop roaming scanning when finding a strong candidate AP
  9429. * A 'strong' candidate is
  9430. * 1) Is eligible candidate
  9431. * (all conditions are met in existing candidate selection).
  9432. * 2) Its rssi is better than earlystop threshold.
  9433. * Earlystop threshold will be relaxed as each channel is scanned.
  9434. */
  9435. typedef struct {
  9436. A_UINT32 tlv_header;
  9437. /* Minimum RSSI threshold value for early stop, unit is dB above NF. */
  9438. A_UINT32 roam_earlystop_thres_min;
  9439. /* Maminum RSSI threshold value for early stop, unit is dB above NF. */
  9440. A_UINT32 roam_earlystop_thres_max;
  9441. } wmi_roam_earlystop_rssi_thres_param;
  9442.  
  9443. typedef struct {
  9444. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_dense_thres_param */
  9445. A_UINT32 tlv_header;
  9446. /** rssi threshold offset under trffic and dense env */
  9447. A_UINT32 roam_dense_rssi_thres_offset;
  9448. /** minimum number of APs to determine dense env */
  9449. A_UINT32 roam_dense_min_aps;
  9450. /** initial dense status detected by host at the time of initial connection */
  9451. A_UINT32 roam_dense_status;
  9452. /* traffic threshold to enable aggressive roaming in dense env; units are percent of medium occupancy, 0 - 100 */
  9453. A_UINT32 roam_dense_traffic_thres;
  9454. } wmi_roam_dense_thres_param;
  9455.  
  9456. /** Beacon filter wmi command info */
  9457.  
  9458. #define BCN_FLT_MAX_SUPPORTED_IES 256
  9459. #define BCN_FLT_MAX_ELEMS_IE_LIST (BCN_FLT_MAX_SUPPORTED_IES/32)
  9460.  
  9461. typedef struct bss_bcn_stats {
  9462. A_UINT32 vdev_id;
  9463. A_UINT32 bss_bcnsdropped;
  9464. A_UINT32 bss_bcnsdelivered;
  9465. } wmi_bss_bcn_stats_t;
  9466.  
  9467. typedef struct bcn_filter_stats {
  9468. A_UINT32 bcns_dropped;
  9469. A_UINT32 bcns_delivered;
  9470. A_UINT32 activefilters;
  9471. wmi_bss_bcn_stats_t bss_stats;
  9472. } wmi_bcnfilter_stats_t;
  9473.  
  9474. typedef struct wmi_add_bcn_filter_cmd {
  9475. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_add_bcn_filter_cmd_fixed_param */
  9476. A_UINT32 vdev_id;
  9477. /*
  9478. * Following this structure is the TLV:
  9479. * A_UINT32 ie_map[BCN_FLT_MAX_ELEMS_IE_LIST];
  9480. */
  9481. } wmi_add_bcn_filter_cmd_fixed_param;
  9482.  
  9483. typedef struct wmi_rmv_bcn_filter_cmd {
  9484. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rmv_bcn_filter_cmd_fixed_param */
  9485. A_UINT32 vdev_id;
  9486. } wmi_rmv_bcn_filter_cmd_fixed_param;
  9487.  
  9488. #define WMI_BCN_SEND_DTIM_ZERO 1
  9489. #define WMI_BCN_SEND_DTIM_BITCTL_SET 2
  9490. typedef struct wmi_bcn_send_from_host {
  9491. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_send_from_host_cmd_fixed_param */
  9492. A_UINT32 vdev_id;
  9493. A_UINT32 data_len;
  9494. union {
  9495. A_UINT32 frag_ptr; /* Physical address of the frame */
  9496. A_UINT32 frag_ptr_lo; /* LSBs of physical address of the frame */
  9497. };
  9498. A_UINT32 frame_ctrl; /* farme ctrl to setup PPDU desc */
  9499. A_UINT32 dtim_flag; /* to control CABQ traffic */
  9500. A_UINT32 bcn_antenna; /* Antenna for beacon transmission */
  9501. A_UINT32 frag_ptr_hi; /* MSBs of physical address of the frame */
  9502. } wmi_bcn_send_from_host_cmd_fixed_param;
  9503.  
  9504. /* cmd to support bcn snd for all vaps at once */
  9505. typedef struct wmi_pdev_send_bcn {
  9506. A_UINT32 num_vdevs;
  9507. wmi_bcn_send_from_host_cmd_fixed_param bcn_cmd[1];
  9508. } wmi_pdev_send_bcn_cmd_t;
  9509.  
  9510. /*
  9511. * WMI_ROAM_AP_PROFILE: AP profile of connected AP for roaming.
  9512. */
  9513. typedef struct {
  9514. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_ap_profile_fixed_param */
  9515. /** id of AP criteria */
  9516. A_UINT32 id;
  9517.  
  9518. /** unique id identifying the VDEV, generated by the caller */
  9519. A_UINT32 vdev_id;
  9520.  
  9521. /*
  9522. * Following this structure is the TLV:
  9523. * wmi_ap_profile ap_profile; <-- AP profile info
  9524. */
  9525. } wmi_roam_ap_profile_fixed_param;
  9526.  
  9527. /**
  9528. * WMI_OFL_SCAN_ADD_AP_PROFILE: add an AP profile.
  9529. */
  9530. typedef struct {
  9531. /** id of AP criteria */
  9532. A_UINT32 id;
  9533.  
  9534. /** unique id identifying the VDEV, generated by the caller */
  9535. A_UINT32 vdev_id;
  9536.  
  9537. /** AP profile info */
  9538. wmi_ap_profile ap_profile;
  9539.  
  9540. } wmi_ofl_scan_add_ap_profile;
  9541.  
  9542. /**
  9543. * WMI_OFL_SCAN_REMOVE_AP_CRITERIA: remove an ap profile.
  9544. */
  9545. typedef struct {
  9546. /** id of AP criteria */
  9547. A_UINT32 id;
  9548. /** unique id identifying the VDEV, generated by the caller */
  9549. A_UINT32 vdev_id;
  9550. } wmi_ofl_scan_remove_ap_profile;
  9551.  
  9552. /**
  9553. * WMI_OFL_SCAN_PERIOD: period in msec for offload scan.
  9554. * 0 will disable ofload scan and a very low value will perform a continous
  9555. * scan.
  9556. */
  9557. typedef struct {
  9558. /** offload scan period value, used for scans used when not connected */
  9559. A_UINT32 ofl_scan_period;
  9560. } wmi_ofl_scan_period;
  9561.  
  9562. /* Do not modify XXX_BYTES or XXX_LEN below as it is fixed by standard */
  9563. #define ROAM_OFFLOAD_PMK_BYTES (32)
  9564. #define ROAM_OFFLOAD_PSK_MSK_BYTES (32)
  9565. #define ROAM_OFFLOAD_KRK_BYTES (16)
  9566. #define ROAM_OFFLOAD_BTK_BYTES (32)
  9567. #define ROAM_OFFLOAD_R0KH_ID_MAX_LEN (48)
  9568. #define ROAM_OFFLOAD_NUM_MCS_SET (16)
  9569.  
  9570. /* This TLV will be filled only in case roam offload for wpa2-psk/okc/ese/11r is enabled */
  9571. typedef struct {
  9572. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_offload_fixed_param */
  9573. A_UINT32 rssi_cat_gap; /* gap for every category bucket */
  9574. A_UINT32 prefer_5g; /* prefer select 5G candidate */
  9575. A_UINT32 select_5g_margin;
  9576. A_UINT32 reassoc_failure_timeout; /* reassoc failure timeout */
  9577. A_UINT32 capability;
  9578. A_UINT32 ht_caps_info;
  9579. A_UINT32 ampdu_param;
  9580. A_UINT32 ht_ext_cap;
  9581. A_UINT32 ht_txbf;
  9582. A_UINT32 asel_cap;
  9583. A_UINT32 qos_enabled;
  9584. A_UINT32 qos_caps;
  9585. A_UINT32 wmm_caps;
  9586. A_UINT32 mcsset[ROAM_OFFLOAD_NUM_MCS_SET>>2]; /* since this 4 byte aligned, we don't declare it as tlv array */
  9587. } wmi_roam_offload_tlv_param;
  9588.  
  9589.  
  9590. /* flags for 11i offload */
  9591. #define WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED 0 /* okc is enabled */
  9592. #define WMI_ROAM_OFFLOAD_FLAG_PMK_CACHE_DISABLED 1 /* pmk caching is disabled */
  9593. /* from bit 2 to bit 31 are reserved */
  9594.  
  9595. #define WMI_SET_ROAM_OFFLOAD_OKC_ENABLED(flag) do { \
  9596. (flag) |= (1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED); \
  9597. } while (0)
  9598.  
  9599. #define WMI_SET_ROAM_OFFLOAD_OKC_DISABLED(flag) do { \
  9600. (flag) &= ~(1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED); \
  9601. } while (0)
  9602.  
  9603. #define WMI_GET_ROAM_OFFLOAD_OKC_ENABLED(flag) \
  9604. ((flag) & (1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED))
  9605.  
  9606.  
  9607. #define WMI_SET_ROAM_OFFLOAD_PMK_CACHE_ENABLED(flag) \
  9608. do { \
  9609. (flag) &= ~(1 << WMI_ROAM_OFFLOAD_FLAG_PMK_CACHE_DISABLED); \
  9610. } while (0)
  9611.  
  9612. #define WMI_SET_ROAM_OFFLOAD_PMK_CACHE_DISABLED(flag) \
  9613. do { \
  9614. (flag) |= (1 << WMI_ROAM_OFFLOAD_FLAG_PMK_CACHE_DISABLED); \
  9615. } while (0)
  9616.  
  9617. #define WMI_GET_ROAM_OFFLOAD_PMK_CACHE_DISABLED(flag) \
  9618. ((flag) & (1 << WMI_ROAM_OFFLOAD_FLAG_PMK_CACHE_DISABLED))
  9619.  
  9620.  
  9621. /* This TLV will be filled only in case of wpa-psk/wpa2-psk */
  9622. typedef struct {
  9623. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_11i_offload_fixed_param */
  9624. A_UINT32 flags; /** flags. see WMI_ROAM_OFFLOAD_FLAG_ above */
  9625. A_UINT32 pmk[ROAM_OFFLOAD_PMK_BYTES>>2]; /* pmk offload. As this 4 byte aligned, we don't declare it as tlv array */
  9626. A_UINT32 pmk_len; /**the length of pmk. in normal case it should be 32, but for LEAP, is should be 16*/
  9627. } wmi_roam_11i_offload_tlv_param;
  9628.  
  9629. /* This TLV will be filled only in case of 11R*/
  9630. typedef struct {
  9631. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_11r_offload_fixed_param */
  9632. A_UINT32 mdie_present;
  9633. A_UINT32 mdid;
  9634. A_UINT32 r0kh_id[ROAM_OFFLOAD_R0KH_ID_MAX_LEN>>2];
  9635. A_UINT32 r0kh_id_len;
  9636. A_UINT32 psk_msk[ROAM_OFFLOAD_PSK_MSK_BYTES>>2]; /* psk/msk offload. As this 4 byte aligned, we don't declare it as tlv array */
  9637. A_UINT32 psk_msk_len; /**length of psk_msk*/
  9638. } wmi_roam_11r_offload_tlv_param;
  9639.  
  9640. /* This TLV will be filled only in case of ESE */
  9641. typedef struct {
  9642. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_ese_offload_fixed_param */
  9643. A_UINT32 krk[ROAM_OFFLOAD_KRK_BYTES>>2]; /* KRK offload. As this 4 byte aligned, we don't declare it as tlv array */
  9644. A_UINT32 btk[ROAM_OFFLOAD_BTK_BYTES>>2]; /* BTK offload. As this 4 byte aligned, we don't declare it as tlv array */
  9645. } wmi_roam_ese_offload_tlv_param;
  9646.  
  9647. /** WMI_ROAM_EVENT: roam event triggering the host roam logic.
  9648. * generated when ever a better AP is found in the recent roam scan (or)
  9649. * when beacon miss is detected (or) when a DEAUTH/DISASSOC is received
  9650. * from the current AP.
  9651. */
  9652. typedef struct {
  9653. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_event_fixed_param */
  9654. /** unique id identifying the VDEV, generated by the caller */
  9655. A_UINT32 vdev_id;
  9656. /** reason for roam event */
  9657. A_UINT32 reason;
  9658. /** associated AP's rssi calculated by FW when reason code is WMI_ROAM_REASON_LOW_RSSI*/
  9659. A_UINT32 rssi;
  9660. /** roam notification */
  9661. A_UINT32 notif;
  9662. } wmi_roam_event_fixed_param;
  9663.  
  9664.  
  9665. /* roam_reason: bits 0-3 */
  9666. #define WMI_ROAM_REASON_INVALID 0x0 /** invalid reason. Do not interpret reason field */
  9667. #define WMI_ROAM_REASON_BETTER_AP 0x1 /** found a better AP */
  9668. #define WMI_ROAM_REASON_BMISS 0x2 /** beacon miss detected */
  9669. #define WMI_ROAM_REASON_DEAUTH 0x2 /** deauth/disassoc received */
  9670. #define WMI_ROAM_REASON_LOW_RSSI 0x3 /** connected AP's low rssi condition detected */
  9671. #define WMI_ROAM_REASON_SUITABLE_AP 0x4 /** found another AP that matches
  9672. SSID and Security profile in
  9673. WMI_ROAM_AP_PROFILE, found during scan
  9674. triggered upon FINAL_BMISS **/
  9675. #define WMI_ROAM_REASON_HO_FAILED 0x5 /** LFR3.0 roaming failed, indicate the disconnection to host */
  9676. /** WMI_ROAM_REASON_INVOKE_ROAM_FAIL:
  9677. * Result code of WMI_ROAM_INVOKE_CMDID.
  9678. * Any roaming failure before reassociation will be indicated to host
  9679. * with this reason.
  9680. * Any roaming failure after reassociation will be indicated to host with
  9681. * WMI_ROAM_REASON_HO_FAILED no matter WMI_ROAM_INVOKE_CMDID is called or not.
  9682. */
  9683. #define WMI_ROAM_REASON_INVOKE_ROAM_FAIL 0x6
  9684. #define WMI_ROAM_REASON_RSO_STATUS 0x7
  9685. /* reserved up through 0xF */
  9686.  
  9687. /* subnet status: bits 4-5 */
  9688. typedef enum
  9689. {
  9690. WMI_ROAM_SUBNET_CHANGE_STATUS_UNKNOWN = 0,
  9691. WMI_ROAM_SUBNET_CHANGE_STATUS_UNCHANGED,
  9692. WMI_ROAM_SUBNET_CHANGE_STATUS_CHANGED,
  9693. } wmi_roam_subnet_change_status;
  9694.  
  9695. #define WMI_ROAM_SUBNET_CHANGE_STATUS_MASK 0x30
  9696. #define WMI_ROAM_SUBNET_CHANGE_STATUS_SHIFT 4
  9697.  
  9698. #define WMI_SET_ROAM_SUBNET_CHANGE_STATUS(roam_reason, status) \
  9699. do { \
  9700. (roam_reason) |= \
  9701. (((status) << WMI_ROAM_SUBNET_CHANGE_STATUS_SHIFT) & \
  9702. WMI_ROAM_SUBNET_CHANGE_STATUS_MASK); \
  9703. } while (0)
  9704.  
  9705. #define WMI_GET_ROAM_SUBNET_CHANGE_STATUS(roam_reason) \
  9706. (((roam_reason) & WMI_ROAM_SUBNET_CHANGE_STATUS_MASK) >> \
  9707. WMI_ROAM_SUBNET_CHANGE_STATUS_SHIFT)
  9708.  
  9709. /* roaming notification */
  9710. #define WMI_ROAM_NOTIF_INVALID 0x0 /** invalid notification. Do not interpret notif field */
  9711. #define WMI_ROAM_NOTIF_ROAM_START 0x1 /** indicate that roaming is started. sent only in non WOW state */
  9712. #define WMI_ROAM_NOTIF_ROAM_ABORT 0x2 /** indicate that roaming is aborted. sent only in non WOW state */
  9713. #define WMI_ROAM_NOTIF_ROAM_REASSOC 0x3 /** indicate that reassociation is done. sent only in non WOW state */
  9714. #define WMI_ROAM_NOTIF_SCAN_MODE_SUCCESS 0x4 /** indicate that roaming scan mode is successful */
  9715. #define WMI_ROAM_NOTIF_SCAN_MODE_FAIL 0x5 /** indicate that roaming scan mode is failed due to internal roaming state */
  9716.  
  9717. /**whenever RIC request information change, host driver should pass all ric related information to firmware (now only support tsepc)
  9718. * Once, 11r roaming happens, firmware can generate RIC request in reassoc request based on these informations
  9719. */
  9720. typedef struct
  9721. {
  9722. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ric_request_fixed_param */
  9723. A_UINT32 vdev_id; /**unique id identifying the VDEV, generated by the caller*/
  9724. A_UINT32 num_ric_request; /**number of ric request ie send to firmware.(max value is 2 now)*/
  9725. A_UINT32 is_add_ric; /**support add ric or delete ric*/
  9726. } wmi_ric_request_fixed_param;
  9727.  
  9728. /**tspec element: refer to 8.4.2.32 of 802.11 2012 spec
  9729. * these elements are used to construct tspec field in RIC request, which allow station to require specific TS when 11r roaming
  9730. */
  9731. typedef struct{
  9732. A_UINT32 tlv_header;
  9733. A_UINT32 ts_info; /** bits value of TS Info field.*/
  9734. A_UINT32 nominal_msdu_size; /**Nominal MSDU Size field*/
  9735. A_UINT32 maximum_msdu_size; /**The Maximum MSDU Size field*/
  9736. A_UINT32 min_service_interval; /**The Minimum Service Interval field*/
  9737. A_UINT32 max_service_interval; /**The Maximum Service Interval field*/
  9738. A_UINT32 inactivity_interval; /**The Inactivity Interval field*/
  9739. A_UINT32 suspension_interval; /**The Suspension Interval field*/
  9740. A_UINT32 svc_start_time; /**The Service Start Time field*/
  9741. A_UINT32 min_data_rate; /**The Minimum Data Rate field*/
  9742. A_UINT32 mean_data_rate; /**The Mean Data Rate field*/
  9743. A_UINT32 peak_data_rate; /**The Peak Data Rate field*/
  9744. A_UINT32 max_burst_size; /**The Burst Size field*/
  9745. A_UINT32 delay_bound; /**The Delay Bound field*/
  9746. A_UINT32 min_phy_rate; /**The Minimum PHY Rate field*/
  9747. A_UINT32 surplus_bw_allowance; /**The Surplus Bandwidth Allowance field*/
  9748. A_UINT32 medium_time; /**The Medium Time field,in units of 32 us/s.*/
  9749. } wmi_ric_tspec;
  9750.  
  9751. /* flags for roam_invoke_cmd */
  9752. /* add this channel into roam cache channel list after this command is finished */
  9753. #define WMI_ROAM_INVOKE_FLAG_ADD_CH_TO_CACHE 0
  9754. /* indicate to host of failure if WMI_ROAM_INVOKE_CMDID. */
  9755. #define WMI_ROAM_INVOKE_FLAG_REPORT_FAILURE 1
  9756. /* during host-invoked roaming, don't send null data frame to AP */
  9757. #define WMI_ROAM_INVOKE_FLAG_NO_NULL_FRAME_TO_AP 2
  9758. /* from bit 3 to bit 31 are reserved */
  9759.  
  9760. #define WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE(flag) do { \
  9761. (flag) |= (1 << WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE); \
  9762. } while (0)
  9763.  
  9764. #define WMI_CLEAR_ROAM_INVOKE_ADD_CH_TO_CACHE(flag) do { \
  9765. (flag) &= ~(1 << WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE); \
  9766. } while (0)
  9767.  
  9768. #define WMI_GET_ROAM_INVOKE_ADD_CH_TO_CACHE(flag) \
  9769. ((flag) & (1 << WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE))
  9770.  
  9771.  
  9772. #define WMI_ROAM_INVOKE_SCAN_MODE_FIXED_CH 0 /* scan given channel only */
  9773. #define WMI_ROAM_INVOKE_SCAN_MODE_CACHE_LIST 1 /* scan cached channel list */
  9774. #define WMI_ROAM_INVOKE_SCAN_MODE_FULL_CH 2 /* scan full channel */
  9775. #define WMI_ROAM_INVOKE_SCAN_MODE_SKIP 3 /* no scan is performed. use beacon/probe resp given by the host */
  9776.  
  9777. #define WMI_ROAM_INVOKE_AP_SEL_FIXED_BSSID 0 /* roam to given BSSID only */
  9778. #define WMI_ROAM_INVOKE_AP_SEL_ANY_BSSID 1 /* roam to any BSSID */
  9779.  
  9780. /** WMI_ROAM_INVOKE_CMD: command to invoke roaming forcefully
  9781. *
  9782. if <roam_scan_ch_mode> is zero and <channel_no> is not given, roaming is not executed.
  9783. if <roam_ap_sel_mode> is zero and <BSSID) is not given, roaming is not executed
  9784.  
  9785. This command can be used to add specific channel into roam cached channel list by following
  9786. <roam_scan_ch_mode> = 0
  9787. <roam_ap_sel_mode> = 0
  9788. <roam_delay> = 0
  9789. <flag> |= WMI_ROAM_INVOKE_FLAG_ADD_CH_TO_CACHE
  9790. <BSSID> = do not fill (there will be no actual roaming because of ap_sel_mode is zero, but no BSSID is given)
  9791. <channel_no> = channel list to be added
  9792. */
  9793. typedef struct {
  9794. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_invoke_fixed_param */
  9795. A_UINT32 vdev_id; /** Unique id identifying the VDEV on which roaming is invoked */
  9796. A_UINT32 flags; /** flags. see WMI_ROAM_INVOKE_FLAG_ above */
  9797. A_UINT32 roam_scan_mode; /** see WMI_ROAM_INVOKE_SCAN_ above */
  9798. A_UINT32 roam_ap_sel_mode; /** see WMI_ROAM_INVOKE_AP_SEL_ above */
  9799. A_UINT32 roam_delay; /** 0 = immediate roam, 1-2^32 = roam after this delay (msec) */
  9800. A_UINT32 num_chan; /** # if channels to scan. In the TLV channel_list[] */
  9801. A_UINT32 num_bssid; /** number of bssids. In the TLV bssid_list[] */
  9802. A_UINT32 num_buf; /** number of buffers In the TLV bcn_prb_buf_list[] */
  9803. /**
  9804. * TLV (tag length value) parameters follows roam_invoke_req
  9805. * The TLV's are:
  9806. * A_UINT32 channel_list[];
  9807. * wmi_mac_addr bssid_list[];
  9808. * wmi_tlv_buf_len_param bcn_prb_buf_list[];
  9809. * A_UINT8 bcn_prb_frm[];
  9810. */
  9811. } wmi_roam_invoke_cmd_fixed_param;
  9812.  
  9813. /* Definition for op_bitmap */
  9814. enum {
  9815. ROAM_FILTER_OP_BITMAP_BLACK_LIST = 0x1,
  9816. ROAM_FILTER_OP_BITMAP_WHITE_LIST = 0x2,
  9817. ROAM_FILTER_OP_BITMAP_PREFER_BSSID = 0x4,
  9818. ROAM_FILTER_OP_BITMAP_LCA_DISALLOW = 0x8,
  9819. };
  9820.  
  9821. /** lca_enable_source_bitmap */
  9822. #define WMI_ROAM_LCA_DISALLOW_SOURCE_PER 0x1
  9823. #define WMI_ROAM_LCA_DISALLOW_SOURCE_BMISS 0x2
  9824. #define WMI_ROAM_LCA_DISALLOW_SOURCE_LOW_RSSI 0x4
  9825. #define WMI_ROAM_LCA_DISALLOW_SOURCE_HIGH_RSSI 0x8
  9826. #define WMI_ROAM_LCA_DISALLOW_SOURCE_PERIODIC 0x10
  9827. #define WMI_ROAM_LCA_DISALLOW_SOURCE_MAWC 0x20 /* MAWC = Motion Aided Wifi connectivity */
  9828. #define WMI_ROAM_LCA_DISALLOW_SOURCE_DENSE 0x40
  9829. #define WMI_ROAM_LCA_DISALLOW_SOURCE_BACKGROUND 0x80
  9830. #define WMI_ROAM_LCA_DISALLOW_SOURCE_FORCED 0x100
  9831.  
  9832. typedef struct {
  9833. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_filter_list_fixed_param */
  9834. A_UINT32 vdev_id; /** Unique id identifying the VDEV on which roaming filter is adopted */
  9835. A_UINT32 flags; /** flags for filter */
  9836. A_UINT32 op_bitmap; /** 32 bit bitmap to be set on. bit0 = first param, bit 1 = second param...etc. Can be or'ed */
  9837. A_UINT32 num_bssid_black_list; /* number of blacklist in the TLV variable bssid_black_list */
  9838. A_UINT32 num_ssid_white_list; /* number of whitelist in the TLV variable ssid_white_list */
  9839. A_UINT32 num_bssid_preferred_list; /* only for lfr 3.0. number of preferred list & factor in the TLV */
  9840. /**
  9841. * TLV (tag length value) parameters follows roam_filter_list_cmd
  9842. * The TLV's are:
  9843. * wmi_mac_addr bssid_black_list[];
  9844. * wmi_ssid ssid_white_list[];
  9845. * wmi_mac_addr bssid_preferred_list[];
  9846. * A_UINT32 bssid_preferred_factor[];
  9847. * wmi_roam_lca_disallow_config_tlv_param lca_disallow_param[0/1] (opt)
  9848. */
  9849. } wmi_roam_filter_fixed_param;
  9850.  
  9851. typedef struct {
  9852. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_lca_disallow_config_tlv_param */
  9853. A_UINT32 disallow_duration; /** How long LCA AP will be disallowed before it can be a roaming candidate again, in units of seconds */
  9854. A_UINT32 rssi_channel_penalization; /** How much RSSI will be penalized if candidate(s) are found in the same channel as disallowed AP's, in units of db */
  9855. A_UINT32 num_disallowed_aps; /** How many APs the target should maintain in its LCA (Last Connected AP) list */
  9856. A_UINT32 disallow_lca_enable_source_bitmap; /** disallow LCA logic is enabled only when trigger sources are matched with corresponding bit (see WMI_ROAM_LCA_DISALLOW_SOURCE constants) */
  9857. } wmi_roam_lca_disallow_config_tlv_param;
  9858.  
  9859. typedef struct {
  9860. A_UINT8 address[4]; /* IPV4 address in Network Byte Order */
  9861. } WMI_IPV4_ADDR;
  9862.  
  9863. typedef struct _WMI_IPV6_ADDR {
  9864. A_UINT8 address[16]; /* IPV6 in Network Byte Order */
  9865. } WMI_IPV6_ADDR;
  9866.  
  9867. /* flags for subnet change detection */
  9868. #define WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED 0
  9869. #define WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED 1
  9870. /* bit 2 to bit 31 are reserved */
  9871.  
  9872. /* set IPv4 enabled/disabled flag and get the flag */
  9873. #define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED(flag) do { \
  9874. (flag) |= (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED); \
  9875. } while (0)
  9876.  
  9877. #define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP4_DISABLED(flag) do { \
  9878. (flag) &= ~(1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED); \
  9879. } while (0)
  9880.  
  9881. #define WMI_GET_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED(flag) \
  9882. ((flag) & (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED))
  9883.  
  9884. /* set IPv6 enabled flag, disabled and get the flag */
  9885. #define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED(flag) do { \
  9886. (flag) |= (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED); \
  9887. } while (0)
  9888.  
  9889. #define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP6_DISABLED(flag) do { \
  9890. (flag) &= ~(1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED); \
  9891. } while (0)
  9892.  
  9893. #define WMI_GET_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED(flag) \
  9894. ((flag) & (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED))
  9895.  
  9896. /**
  9897. * WMI_ROAM_SUBNET_CHANGE_CONFIG : Pass the gateway IP and MAC addresses
  9898. * to FW. FW uses these parameters for subnet change detection.
  9899. */
  9900. typedef struct {
  9901. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_subnet_change_config_fixed_param */
  9902. /** unique id identifying the VDEV, generated by the caller */
  9903. A_UINT32 vdev_id;
  9904. /** IPv4/IPv6 enabled/disabled */
  9905. /** This flag sets the WMI_SET_ROAM_SUBNET_CHANGE_FLAG_xxx_ENABLED/DISABLED */
  9906. A_UINT32 flag;
  9907. /** Gateway MAC address */
  9908. wmi_mac_addr inet_gw_mac_addr;
  9909. /** IP addresses */
  9910. WMI_IPV4_ADDR inet_gw_ip_v4_addr;
  9911. WMI_IPV6_ADDR inet_gw_ip_v6_addr;
  9912. /** Number of software retries for ARP/Neighbor solicitation request */
  9913. A_UINT32 max_retries;
  9914. /** timeout in milliseconds for each ARP request*/
  9915. A_UINT32 timeout;
  9916. /** number of skipped aps **/
  9917. A_UINT32 num_skip_subnet_change_detection_bssid_list;
  9918. /**
  9919. * TLV (tag length value) parameters follows roam_subnet_change_config_cmd
  9920. * structure. The TLV's are:
  9921. * wmi_mac_addr skip_subnet_change_detection_bssid_list [];
  9922. **/
  9923. } wmi_roam_subnet_change_config_fixed_param;
  9924.  
  9925. /** WMI_PROFILE_MATCH_EVENT: offload scan
  9926. * generated when ever atleast one of the matching profiles is found
  9927. * in recent NLO scan. no data is carried with the event.
  9928. */
  9929.  
  9930. /** P2P specific commands */
  9931.  
  9932. /**
  9933. * WMI_P2P_DEV_SET_DEVICE_INFO : p2p device info, which will be used by
  9934. * FW to generate P2P IE tobe carried in probe response frames.
  9935. * FW will respond to probe requests while in listen state.
  9936. */
  9937. typedef struct {
  9938. /* number of secondary device types,supported */
  9939. A_UINT32 num_secondary_dev_types;
  9940. /**
  9941. * followed by 8 bytes of primary device id and
  9942. * num_secondary_dev_types * 8 bytes of secondary device
  9943. * id.
  9944. */
  9945. } wmi_p2p_dev_set_device_info;
  9946.  
  9947. /** WMI_P2P_DEV_SET_DISCOVERABILITY: enable/disable discoverability
  9948. * state. if enabled, an active STA/AP will respond to P2P probe requests on
  9949. * the operating channel of the VDEV.
  9950. */
  9951.  
  9952. typedef struct {
  9953. /* 1:enable disoverability, 0:disable discoverability */
  9954. A_UINT32 enable_discoverability;
  9955. } wmi_p2p_set_discoverability;
  9956.  
  9957. /** WMI_P2P_GO_SET_BEACON_IE: P2P IE to be added to
  9958. * beacons generated by FW. used in FW beacon mode.
  9959. * the FW will add this IE to beacon in addition to the beacon
  9960. * template set by WMI_BCN_TMPL_CMDID command.
  9961. */
  9962. typedef struct {
  9963. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_go_set_beacon_ie_fixed_param */
  9964. /** unique id identifying the VDEV, generated by the caller */
  9965. A_UINT32 vdev_id;
  9966. /* ie length */
  9967. A_UINT32 ie_buf_len;
  9968. /* Following this structure is the TLV byte stream of ie data of length ie_buf_len:
  9969. * A_UINT8 ie_data[]; <-- length in byte given by field num_data.
  9970. */
  9971.  
  9972. } wmi_p2p_go_set_beacon_ie_fixed_param;
  9973.  
  9974. /** WMI_P2P_GO_PROBE_RESP_IE: P2P IE to be added to
  9975. * probe response generated by FW. used in FW beacon mode.
  9976. * the FW will add this IE to probe response in addition to the probe response
  9977. * template set by WMI_PRB_TMPL_CMDID command.
  9978. */
  9979. typedef struct {
  9980. /** unique id identifying the VDEV, generated by the caller */
  9981. A_UINT32 vdev_id;
  9982. /* ie length */
  9983. A_UINT32 ie_buf_len;
  9984. /*followed by byte stream of ie data of length ie_buf_len */
  9985. } wmi_p2p_go_set_probe_resp_ie;
  9986.  
  9987. /** WMI_P2P_SET_VENDOR_IE_DATA_CMDID: Vendor specific P2P IE data, which will
  9988. * be used by the FW to parse the P2P NoA attribute in beacons, probe resposes
  9989. * and action frames received by the P2P Client.
  9990. * Note: This command is currently used only for Apple P2P implementation.
  9991. */
  9992. typedef struct {
  9993. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_vendor_ie_data_cmd_fixed_param */
  9994. /** OS specific P2P IE OUI (3 bytes) + OUI type (1 byte) */
  9995. A_UINT32 p2p_ie_oui_type;
  9996. /** OS specific NoA Attribute ID */
  9997. A_UINT32 p2p_noa_attribute;
  9998. } wmi_p2p_set_vendor_ie_data_cmd_fixed_param;
  9999.  
  10000. /*----P2P disc offload definition ----*/
  10001.  
  10002. typedef struct {
  10003. A_UINT32 pattern_type;
  10004. /**
  10005. * TLV (tag length value) paramerters follow the pattern structure.
  10006. * TLV can contain bssid list, ssid list and
  10007. * ie. the TLV tags are defined above;
  10008. */
  10009. } wmi_p2p_disc_offload_pattern_cmd;
  10010.  
  10011. typedef struct {
  10012. /* unique id identifying the VDEV, generated by the caller */
  10013. A_UINT32 vdev_id;
  10014. /* mgmt type of the ie*/
  10015. A_UINT32 mgmt_type;
  10016. /* ie length */
  10017. A_UINT32 ie_buf_len;
  10018. /*followed by byte stream of ie data of length ie_buf_len */
  10019. } wmi_p2p_disc_offload_appie_cmd;
  10020.  
  10021. typedef struct {
  10022. /* enable/disable p2p find offload*/
  10023. A_UINT32 enable;
  10024. /* unique id identifying the VDEV, generated by the caller */
  10025. A_UINT32 vdev_id;
  10026. /* p2p find type */
  10027. A_UINT32 disc_type;
  10028. /* p2p find perodic */
  10029. A_UINT32 perodic;
  10030. /* p2p find listen channel */
  10031. A_UINT32 listen_channel;
  10032. /* p2p find full channel number */
  10033. A_UINT32 num_scan_chans;
  10034. /**
  10035. * TLV (tag length value) paramerters follow the pattern structure.
  10036. * TLV contain channel list
  10037. */
  10038. } wmi_p2p_disc_offload_config_cmd;
  10039.  
  10040. /*----P2P OppPS definition ----*/
  10041. typedef struct {
  10042. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_oppps_cmd_fixed_param */
  10043. A_UINT32 tlv_header;
  10044. /* unique id identifying the VDEV, generated by the caller */
  10045. A_UINT32 vdev_id;
  10046. /* OppPS attributes */
  10047. /** Bit 0: Indicate enable/disable of OppPS
  10048. * Bits 7-1: Ctwindow in TUs
  10049. * Bits 31-8: Reserved
  10050. */
  10051. A_UINT32 oppps_attr;
  10052. } wmi_p2p_set_oppps_cmd_fixed_param;
  10053.  
  10054. #define WMI_UNIFIED_OPPPS_ATTR_ENALBED 0x1
  10055. #define WMI_UNIFIED_OPPPS_ATTR_ENALBED_S 0
  10056.  
  10057. #define WMI_UNIFIED_OPPPS_ATTR_IS_ENABLED(hdr) \
  10058. WMI_F_MS((hdr)->oppps_attr, WMI_UNIFIED_OPPPS_ATTR_ENALBED)
  10059.  
  10060. #define WMI_UNIFIED_OPPPS_ATTR_ENABLED_SET(hdr) \
  10061. WMI_F_RMW((hdr)->oppps_attr, 0x1, \
  10062. WMI_UNIFIED_OPPPS_ATTR_ENALBED);
  10063.  
  10064. #define WMI_UNIFIED_OPPPS_ATTR_CTWIN 0xfe
  10065. #define WMI_UNIFIED_OPPPS_ATTR_CTWIN_S 1
  10066.  
  10067. #define WMI_UNIFIED_OPPPS_ATTR_CTWIN_GET(hdr) \
  10068. WMI_F_MS((hdr)->oppps_attr, WMI_UNIFIED_OPPPS_ATTR_CTWIN)
  10069.  
  10070. #define WMI_UNIFIED_OPPPS_ATTR_CTWIN_SET(hdr, v) \
  10071. WMI_F_RMW((hdr)->oppps_attr, (v) & 0x7f, \
  10072. WMI_UNIFIED_OPPPS_ATTR_CTWIN);
  10073.  
  10074. typedef enum p2p_lo_start_ctrl_flags_e {
  10075. P2P_LO_START_CTRL_FLAG_FLUSH_LISTEN_RESULT = 1 << 0, /* flush prob. req when host is awake */
  10076. } p2p_lo_start_ctrl_flags;
  10077.  
  10078. #define P2P_LO_PER_DEV_TYPE_LEN 8
  10079. #define P2P_LO_DEV_TYPES_COUNT_MAX 10
  10080. #define P2P_LO_DEV_TYPES_LEN_MAX (P2P_LO_PER_DEV_TYPE_LEN * P2P_LO_DEV_TYPES_COUNT_MAX)
  10081. #define P2P_LO_PROB_RESP_MAX_LEN 512
  10082.  
  10083. typedef struct {
  10084. A_UINT32 tlv_header;
  10085. A_UINT32 vdev_id;
  10086. A_UINT32 ctl_flags; /* refer to enum_p2p_lo_start_ctrl_flags_e */
  10087. A_UINT32 channel; /* MHz */
  10088. A_UINT32 period; /* ms */
  10089. A_UINT32 interval; /* ms, interval should be larger than period */
  10090. A_UINT32 count; /* 0 means forever */
  10091. /*
  10092. * device_types_len specifies the number of bytes in the
  10093. * device_types_data[] byte-array TLV that follows this TLV.
  10094. * The data in device_types_data[] is in 8-byte elements, so
  10095. * device_types_len will be a multiple of 8.
  10096. * Refer to P2P_LO_DEV_TYPES_LEN_MAX
  10097. */
  10098. A_UINT32 device_types_len;
  10099. /*
  10100. * prob_resp_len specifies the number of bytes in the
  10101. * prob_resp_data[] byte-array TLV that follows this TLV.
  10102. * Refer to P2P_LO_PROB_RESP_MAX_LEN
  10103. */
  10104. A_UINT32 prob_resp_len;
  10105. /*
  10106. * Two other TLVs follow this TLV:
  10107. * A_UINT8 device_types_data[device_types_len];
  10108. * A_UINT8 prob_resp_data[prob_resp_len];
  10109. * The information in device_types_data[] and prob_resp_data[]
  10110. * needs to be provided to the target in over-the-air byte order.
  10111. * On a big-endian host, if device_types_data and prob_resp_data
  10112. * are initially in the correct over-the-air byte order,
  10113. * the automatic byteswap for endianness-correction during WMI
  10114. * message download will mess up the byte order.
  10115. * Thus, a big-endian host needs to explicitly byte-swap the bytes
  10116. * within each quad-byte segment of device_types_data[] and
  10117. * prob_resp_data[], so that the automatic byte-swap applied during
  10118. * WMI download from a big-endian host to the little-endian target
  10119. * will restore device_types_data and prob_resp_data into the
  10120. * correct byte ordering.
  10121. */
  10122. } wmi_p2p_lo_start_cmd_fixed_param;
  10123.  
  10124. typedef struct {
  10125. A_UINT32 tlv_header;
  10126. A_UINT32 vdev_id;
  10127. } wmi_p2p_lo_stop_cmd_fixed_param;
  10128.  
  10129. typedef enum p2p_lo_stopped_reason_e {
  10130. P2P_LO_STOPPED_REASON_COMPLETE = 0, /* finished as scheduled */
  10131. P2P_LO_STOPPED_REASON_RECV_STOP_CMD, /* host stops it */
  10132. P2P_LO_STOPPED_REASON_INVALID_LO_PAR, /* invalid listen offload par */
  10133. P2P_LO_STOPPED_REASON_FW_NOT_SUPPORT, /* vdev cannot support it right now */
  10134. } p2p_lo_stopped_reason;
  10135.  
  10136. typedef struct {
  10137. A_UINT32 tlv_header;
  10138. A_UINT32 vdev_id;
  10139. A_UINT32 reason;/* refer to p2p_lo_stopped_reason_e */
  10140. } wmi_p2p_lo_stopped_event_fixed_param;
  10141.  
  10142. typedef enum {
  10143. WMI_MNT_FILTER_CONFIG_MANAGER,
  10144. WMI_MNT_FILTER_CONFIG_CONTROL,
  10145. WMI_MNT_FILTER_CONFIG_DATA,
  10146. WMI_MNT_FILTER_CONFIG_ALL,
  10147. WMI_MNT_FILTER_CONFIG_UNKNOWN,
  10148. } WMI_MNT_FILTER_CONFIG_TYPE;
  10149.  
  10150. typedef struct {
  10151. A_UINT32 tlv_header;
  10152. A_UINT32 vdev_id;
  10153. A_UINT32 clear_or_set;
  10154. A_UINT32 configure_type; /* see WMI_MNT_FILTER_CONFIG_TYPE */
  10155. } wmi_mnt_filter_cmd_fixed_param;
  10156.  
  10157. typedef struct {
  10158. A_UINT32 time32; /* upper 32 bits of time stamp */
  10159. A_UINT32 time0; /* lower 32 bits of time stamp */
  10160. } A_TIME64;
  10161.  
  10162. typedef enum wmi_peer_sta_kickout_reason {
  10163. WMI_PEER_STA_KICKOUT_REASON_UNSPECIFIED = 0, /* default value to preserve legacy behavior */
  10164. WMI_PEER_STA_KICKOUT_REASON_XRETRY = 1,
  10165. WMI_PEER_STA_KICKOUT_REASON_INACTIVITY = 2,
  10166. WMI_PEER_STA_KICKOUT_REASON_IBSS_DISCONNECT = 3,
  10167. WMI_PEER_STA_KICKOUT_REASON_TDLS_DISCONNECT = 4, /* TDLS peer has disappeared. All tx is failing */
  10168. WMI_PEER_STA_KICKOUT_REASON_SA_QUERY_TIMEOUT = 5,
  10169. } PEER_KICKOUT_REASON;
  10170.  
  10171. typedef struct {
  10172. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_sta_kickout_event_fixed_param */
  10173. /** peer mac address */
  10174. wmi_mac_addr peer_macaddr;
  10175. /** Reason code, defined as above */
  10176. A_UINT32 reason;
  10177. /** RSSI of the last bcn (averaged) in dB. 0 means Noise Floor value */
  10178. A_UINT32 rssi;
  10179. } wmi_peer_sta_kickout_event_fixed_param;
  10180.  
  10181. #define WMI_WLAN_PROFILE_MAX_HIST 3
  10182. #define WMI_WLAN_PROFILE_MAX_BIN_CNT 32
  10183.  
  10184. typedef struct _wmi_wlan_profile_t {
  10185. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_t */
  10186. A_UINT32 id;
  10187. A_UINT32 cnt;
  10188. A_UINT32 tot;
  10189. A_UINT32 min;
  10190. A_UINT32 max;
  10191. A_UINT32 hist_intvl;
  10192. A_UINT32 hist[WMI_WLAN_PROFILE_MAX_HIST];
  10193. } wmi_wlan_profile_t;
  10194.  
  10195. typedef struct _wmi_wlan_profile_ctx_t {
  10196. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_ctx_t */
  10197. A_UINT32 tot; /* time in us */
  10198. A_UINT32 tx_msdu_cnt;
  10199. A_UINT32 tx_mpdu_cnt;
  10200. A_UINT32 tx_ppdu_cnt;
  10201. A_UINT32 rx_msdu_cnt;
  10202. A_UINT32 rx_mpdu_cnt;
  10203. A_UINT32 bin_count;
  10204. } wmi_wlan_profile_ctx_t;
  10205.  
  10206.  
  10207. typedef struct {
  10208. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_trigger_cmd_fixed_param */
  10209. A_UINT32 enable;
  10210. } wmi_wlan_profile_trigger_cmd_fixed_param;
  10211.  
  10212. typedef struct {
  10213. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_get_prof_data_cmd_fixed_param */
  10214. A_UINT32 value;
  10215. } wmi_wlan_profile_get_prof_data_cmd_fixed_param;
  10216.  
  10217. typedef struct {
  10218. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_set_hist_intvl_cmd_fixed_param */
  10219. A_UINT32 profile_id;
  10220. A_UINT32 value;
  10221. } wmi_wlan_profile_set_hist_intvl_cmd_fixed_param;
  10222.  
  10223. typedef struct {
  10224. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_enable_profile_id_cmd_fixed_param */
  10225. A_UINT32 profile_id;
  10226. A_UINT32 enable;
  10227. } wmi_wlan_profile_enable_profile_id_cmd_fixed_param;
  10228.  
  10229. /*Wifi header is upto 26, LLC is 8, with 14 byte duplicate in 802.3 header, that's 26+8-14=20.
  10230. 146-128=18. So this means it is converted to non-QoS header. Riva FW take care of the QOS/non-QOS
  10231. when comparing wifi header.*/
  10232. /* NOTE: WOW_DEFAULT_BITMAP_PATTERN_SIZE(_DWORD) and WOW_DEFAULT_BITMASK_SIZE(_DWORD) can't be changed without breaking the compatibility */
  10233. #define WOW_DEFAULT_BITMAP_PATTERN_SIZE 146
  10234. #define WOW_DEFAULT_BITMAP_PATTERN_SIZE_DWORD 37 /* Convert WOW_DEFAULT_EVT_BUF_SIZE into Int32 size */
  10235. #define WOW_DEFAULT_BITMASK_SIZE 146
  10236. #define WOW_DEFAULT_BITMASK_SIZE_DWORD 37
  10237. #define WOW_MAX_BITMAP_FILTERS 32
  10238. #define WOW_DEFAULT_MAGIG_PATTERN_MATCH_CNT 16
  10239. #define WOW_EXTEND_PATTERN_MATCH_CNT 16
  10240. #define WOW_SHORT_PATTERN_MATCH_CNT 8
  10241. #define WOW_DEFAULT_EVT_BUF_SIZE 148 /* Maximum 148 bytes of the data is copied starting from header incase if the match is found.
  10242. The 148 comes from (128 - 14) payload size + 8bytes LLC + 26bytes MAC header*/
  10243. #define WOW_DEFAULT_IOAC_PATTERN_SIZE 6
  10244. #define WOW_DEFAULT_IOAC_PATTERN_SIZE_DWORD 2
  10245. #define WOW_DEFAULT_IOAC_RANDOM_SIZE 6
  10246. #define WOW_DEFAULT_IOAC_RANDOM_SIZE_DWORD 2
  10247. #define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_SIZE 120
  10248. #define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_SIZE_DWORD 30
  10249. #define WOW_DEFAULT_IOAC_SOCKET_PATTERN_SIZE 32
  10250. #define WOW_DEFAULT_IOAC_SOCKET_PATTERN_SIZE_DWORD 8
  10251. #define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_REV_SIZE 32
  10252. #define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_REV_SIZE_DWORD 8
  10253. #define WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE 128
  10254. #define WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE_DWORD 32
  10255.  
  10256. typedef enum pattern_type_e {
  10257. WOW_PATTERN_MIN = 0,
  10258. WOW_BITMAP_PATTERN = WOW_PATTERN_MIN,
  10259. WOW_IPV4_SYNC_PATTERN,
  10260. WOW_IPV6_SYNC_PATTERN,
  10261. WOW_WILD_CARD_PATTERN,
  10262. WOW_TIMER_PATTERN,
  10263. WOW_MAGIC_PATTERN,
  10264. WOW_IPV6_RA_PATTERN,
  10265. WOW_IOAC_PKT_PATTERN,
  10266. WOW_IOAC_TMR_PATTERN,
  10267. WOW_IOAC_SOCK_PATTERN,
  10268. WOW_PATTERN_MAX
  10269. } WOW_PATTERN_TYPE;
  10270.  
  10271. typedef enum event_type_e {
  10272. WOW_BMISS_EVENT = 0,
  10273. WOW_BETTER_AP_EVENT,
  10274. WOW_DEAUTH_RECVD_EVENT,
  10275. WOW_MAGIC_PKT_RECVD_EVENT,
  10276. WOW_GTK_ERR_EVENT,
  10277. WOW_FOURWAY_HSHAKE_EVENT,
  10278. WOW_EAPOL_RECVD_EVENT,
  10279. WOW_NLO_DETECTED_EVENT,
  10280. WOW_DISASSOC_RECVD_EVENT,
  10281. WOW_PATTERN_MATCH_EVENT,
  10282. WOW_CSA_IE_EVENT,
  10283. WOW_PROBE_REQ_WPS_IE_EVENT,
  10284. WOW_AUTH_REQ_EVENT,
  10285. WOW_ASSOC_REQ_EVENT,
  10286. WOW_HTT_EVENT,
  10287. WOW_RA_MATCH_EVENT,
  10288. WOW_HOST_AUTO_SHUTDOWN_EVENT,
  10289. WOW_IOAC_MAGIC_EVENT,
  10290. WOW_IOAC_SHORT_EVENT,
  10291. WOW_IOAC_EXTEND_EVENT,
  10292. WOW_IOAC_TIMER_EVENT,
  10293. WOW_DFS_PHYERR_RADAR_EVENT,
  10294. WOW_BEACON_EVENT,
  10295. WOW_CLIENT_KICKOUT_EVENT,
  10296. WOW_NAN_EVENT,
  10297. WOW_EXTSCAN_EVENT,
  10298. WOW_IOAC_REV_KA_FAIL_EVENT,
  10299. WOW_IOAC_SOCK_EVENT,
  10300. WOW_NLO_SCAN_COMPLETE_EVENT,
  10301. WOW_NAN_DATA_EVENT,
  10302. WOW_NAN_RTT_EVENT, /* DEPRECATED, UNUSED */
  10303. WOW_OEM_RESPONSE_EVENT = WOW_NAN_RTT_EVENT, /* reuse deprecated event value */
  10304. WOW_TDLS_CONN_TRACKER_EVENT,
  10305. WOW_CRITICAL_LOG_EVENT,
  10306. WOW_CHIP_POWER_FAILURE_DETECT_EVENT,
  10307. WOW_11D_SCAN_EVENT,
  10308. } WOW_WAKE_EVENT_TYPE;
  10309.  
  10310. typedef enum wake_reason_e {
  10311. WOW_REASON_UNSPECIFIED = -1,
  10312. WOW_REASON_NLOD = 0,
  10313. WOW_REASON_AP_ASSOC_LOST,
  10314. WOW_REASON_LOW_RSSI,
  10315. WOW_REASON_DEAUTH_RECVD,
  10316. WOW_REASON_DISASSOC_RECVD,
  10317. WOW_REASON_GTK_HS_ERR,
  10318. WOW_REASON_EAP_REQ,
  10319. WOW_REASON_FOURWAY_HS_RECV,
  10320. WOW_REASON_TIMER_INTR_RECV,
  10321. WOW_REASON_PATTERN_MATCH_FOUND,
  10322. WOW_REASON_RECV_MAGIC_PATTERN,
  10323. WOW_REASON_P2P_DISC,
  10324. WOW_REASON_WLAN_HB,
  10325. WOW_REASON_CSA_EVENT,
  10326. WOW_REASON_PROBE_REQ_WPS_IE_RECV,
  10327. WOW_REASON_AUTH_REQ_RECV,
  10328. WOW_REASON_ASSOC_REQ_RECV,
  10329. WOW_REASON_HTT_EVENT,
  10330. WOW_REASON_RA_MATCH,
  10331. WOW_REASON_HOST_AUTO_SHUTDOWN,
  10332. WOW_REASON_IOAC_MAGIC_EVENT,
  10333. WOW_REASON_IOAC_SHORT_EVENT,
  10334. WOW_REASON_IOAC_EXTEND_EVENT,
  10335. WOW_REASON_IOAC_TIMER_EVENT,
  10336. WOW_REASON_ROAM_HO,
  10337. WOW_REASON_DFS_PHYERR_RADADR_EVENT,
  10338. WOW_REASON_BEACON_RECV,
  10339. WOW_REASON_CLIENT_KICKOUT_EVENT,
  10340. WOW_REASON_NAN_EVENT,
  10341. WOW_REASON_EXTSCAN,
  10342. WOW_REASON_RSSI_BREACH_EVENT,
  10343. WOW_REASON_IOAC_REV_KA_FAIL_EVENT,
  10344. WOW_REASON_IOAC_SOCK_EVENT,
  10345. WOW_REASON_NLO_SCAN_COMPLETE,
  10346. WOW_REASON_PACKET_FILTER_MATCH,
  10347. WOW_REASON_ASSOC_RES_RECV,
  10348. WOW_REASON_REASSOC_REQ_RECV,
  10349. WOW_REASON_REASSOC_RES_RECV,
  10350. WOW_REASON_ACTION_FRAME_RECV,
  10351. WOW_REASON_BPF_ALLOW,
  10352. WOW_REASON_NAN_DATA,
  10353. WOW_REASON_NAN_RTT, /* DEPRECATED, UNUSED */
  10354. WOW_REASON_OEM_RESPONSE_EVENT = WOW_REASON_NAN_RTT, /* reuse deprecated reason value */
  10355. WOW_REASON_TDLS_CONN_TRACKER_EVENT,
  10356. WOW_REASON_CRITICAL_LOG,
  10357. WOW_REASON_P2P_LISTEN_OFFLOAD,
  10358. WOW_REASON_NAN_EVENT_WAKE_HOST,
  10359. WOW_REASON_CHIP_POWER_FAILURE_DETECT,
  10360. WOW_REASON_11D_SCAN,
  10361. WOW_REASON_THERMAL_CHANGE,
  10362. WOW_REASON_DEBUG_TEST = 0xFF,
  10363. } WOW_WAKE_REASON_TYPE;
  10364.  
  10365.  
  10366. typedef enum {
  10367. WOW_IFACE_PAUSE_ENABLED,
  10368. WOW_IFACE_PAUSE_DISABLED
  10369. } WOW_IFACE_STATUS;
  10370.  
  10371. enum {
  10372. WMI_WOW_FLAG_IGNORE_PCIE_RESET = 0x00000001, /* some win10 platfrom will not assert pcie_reset for wow.*/
  10373. /* WMI_WOW_FLAG_SEND_PM_PME
  10374. * Some platforms have issues if the PM_PME message is sent after WoW,
  10375. * so don't send PM_PME after WoW unless the host uses this flag
  10376. * to request it.
  10377. */
  10378. WMI_WOW_FLAG_SEND_PM_PME = 0x00000002,
  10379. /* Flag to indicate unit test */
  10380. WMI_WOW_FLAG_UNIT_TEST_ENABLE = 0x00000004,
  10381. /* Force HTC wakeup */
  10382. WMI_WOW_FLAG_DO_HTC_WAKEUP = 0x00000008,
  10383. /* Enable L1SS sleep for PCIE DRV case */
  10384. WMI_WOW_FLAG_ENABLE_DRV_PCIE_L1SS_SLEEP = 0x00000010,
  10385. };
  10386.  
  10387. typedef struct {
  10388. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wow_enable_cmd_fixed_param */
  10389. A_UINT32 enable;
  10390. A_UINT32 pause_iface_config;
  10391. A_UINT32 flags; /* WMI_WOW_FLAG enums */
  10392. } wmi_wow_enable_cmd_fixed_param;
  10393.  
  10394. typedef struct {
  10395. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wow_hostwakeup_from_sleep_cmd_fixed_param */
  10396. /** Reserved for future use */
  10397. A_UINT32 reserved0;
  10398. } wmi_wow_hostwakeup_from_sleep_cmd_fixed_param;
  10399.  
  10400. #define WOW_ICMPV6_NA_FILTER_DISABLE 0
  10401. #define WOW_ICMPV6_NA_FILTER_ENABLE 1
  10402.  
  10403. typedef struct {
  10404. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wow_enable_icmpv6_na_flt_cmd_fixed_param */
  10405. A_UINT32 vdev_id;
  10406. A_UINT32 enable; /* WOW_ICMPV6_NA_FILTER_ENABLE/DISABLE */
  10407. } wmi_wow_enable_icmpv6_na_flt_cmd_fixed_param;
  10408.  
  10409. typedef struct bitmap_pattern_s {
  10410. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_BITMAP_PATTERN_T */
  10411. A_UINT32 patternbuf[WOW_DEFAULT_BITMAP_PATTERN_SIZE_DWORD];
  10412. A_UINT32 bitmaskbuf[WOW_DEFAULT_BITMASK_SIZE_DWORD];
  10413. A_UINT32 pattern_offset;
  10414. A_UINT32 pattern_len;
  10415. A_UINT32 bitmask_len;
  10416. A_UINT32 pattern_id; /* must be less than max_bitmap_filters */
  10417. } WOW_BITMAP_PATTERN_T;
  10418.  
  10419. typedef struct ipv4_sync_s {
  10420. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IPV4_SYNC_PATTERN_T */
  10421. A_UINT32 ipv4_src_addr;
  10422. A_UINT32 ipv4_dst_addr;
  10423. A_UINT32 tcp_src_prt;
  10424. A_UINT32 tcp_dst_prt;
  10425. } WOW_IPV4_SYNC_PATTERN_T;
  10426.  
  10427. typedef struct ipv6_sync_s {
  10428. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IPV6_SYNC_PATTERN_T */
  10429. A_UINT32 ipv6_src_addr[4];
  10430. A_UINT32 ipv6_dst_addr[4];
  10431. A_UINT32 tcp_src_prt;
  10432. A_UINT32 tcp_dst_prt;
  10433. } WOW_IPV6_SYNC_PATTERN_T;
  10434.  
  10435. typedef struct WOW_MAGIC_PATTERN_CMD
  10436. {
  10437. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_MAGIC_PATTERN_CMD */
  10438. wmi_mac_addr macaddr;
  10439. } WOW_MAGIC_PATTERN_CMD;
  10440.  
  10441. typedef enum wow_ioac_pattern_type {
  10442. WOW_IOAC_MAGIC_PATTERN = 1,
  10443. WOW_IOAC_SHORT_PATTERN,
  10444. WOW_IOAC_EXTEND_PATTERN,
  10445. } WOW_IOAC_PATTERN_TYPE;
  10446.  
  10447. typedef struct ioac_sock_pattern_s {
  10448. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IOAC_SOCK_PATTERN_T */
  10449. A_UINT32 id;
  10450. A_UINT32 local_ipv4;
  10451. A_UINT32 remote_ipv4;
  10452. A_UINT32 local_port;
  10453. A_UINT32 remote_port;
  10454. A_UINT32 pattern_len; /* units = bytes */
  10455. A_UINT32 pattern[WOW_DEFAULT_IOAC_SOCKET_PATTERN_SIZE_DWORD];
  10456. WMI_IPV6_ADDR local_ipv6;
  10457. WMI_IPV6_ADDR remote_ipv6;
  10458. A_UINT32 ack_nak_len;
  10459. A_UINT32 ackpkt[WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE_DWORD];
  10460. A_UINT32 nakpkt[WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE_DWORD];
  10461. } WOW_IOAC_SOCK_PATTERN_T;
  10462.  
  10463. typedef struct ioac_pkt_pattern_s {
  10464. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IOAC_PKT_PATTERN_T */
  10465. A_UINT32 pattern_type;
  10466. A_UINT32 pattern[WOW_DEFAULT_IOAC_PATTERN_SIZE_DWORD];
  10467. A_UINT32 random[WOW_DEFAULT_IOAC_RANDOM_SIZE_DWORD];
  10468. A_UINT32 pattern_len;
  10469. A_UINT32 random_len;
  10470. } WOW_IOAC_PKT_PATTERN_T;
  10471.  
  10472. typedef struct ioac_tmr_pattern_s {
  10473. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IOAC_TMR_PATTERN_T */
  10474. A_UINT32 wake_in_s;
  10475. A_UINT32 vdev_id;
  10476. } WOW_IOAC_TMR_PATTERN_T;
  10477.  
  10478. typedef struct {
  10479. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_ADD_KEEPALIVE_CMD_fixed_param */
  10480. A_UINT32 nID;
  10481. } WMI_WOW_IOAC_ADD_KEEPALIVE_CMD_fixed_param;
  10482.  
  10483. typedef struct {
  10484. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_DEL_KEEPALIVE_CMD_fixed_param */
  10485. A_UINT32 nID;
  10486. } WMI_WOW_IOAC_DEL_KEEPALIVE_CMD_fixed_param;
  10487.  
  10488. typedef struct ioac_keepalive_s {
  10489. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_KEEPALIVE_T */
  10490. A_UINT32 keepalive_pkt_buf[WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_SIZE_DWORD];
  10491. A_UINT32 keepalive_pkt_len;
  10492. A_UINT32 period_in_ms;
  10493. A_UINT32 vdev_id;
  10494. A_UINT32 max_loss_cnt;
  10495. A_UINT32 local_ipv4;
  10496. A_UINT32 remote_ipv4;
  10497. A_UINT32 local_port;
  10498. A_UINT32 remote_port;
  10499. A_UINT32 recv_period_in_ms;
  10500. A_UINT32 rev_ka_size;
  10501. A_UINT32 rev_ka_data[WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_REV_SIZE_DWORD];
  10502. WMI_IPV6_ADDR local_ipv6;
  10503. WMI_IPV6_ADDR remote_ipv6;
  10504. } WMI_WOW_IOAC_KEEPALIVE_T;
  10505.  
  10506. typedef struct {
  10507. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_ADD_PATTERN_CMD_fixed_param */
  10508. A_UINT32 vdev_id;
  10509. A_UINT32 pattern_type;
  10510. /*
  10511. * Following this struct are these TLVs. Note that they are all array of structures
  10512. * but can have at most one element. Which TLV is empty or has one element depends
  10513. * on the field pattern_type. This is to emulate an union.
  10514. * WOW_IOAC_PKT_PATTERN_T pattern_info_pkt[];
  10515. * WOW_IOAC_TMR_PATTERN_T pattern_info_tmr[];
  10516. */
  10517. } WMI_WOW_IOAC_ADD_PATTERN_CMD_fixed_param;
  10518.  
  10519. typedef struct {
  10520. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_DEL_PATTERN_CMD_fixed_param */
  10521. A_UINT32 vdev_id;
  10522. A_UINT32 pattern_type;
  10523. A_UINT32 pattern_id;
  10524. } WMI_WOW_IOAC_DEL_PATTERN_CMD_fixed_param;
  10525.  
  10526. typedef struct {
  10527. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_ADD_PATTERN_CMD_fixed_param */
  10528. A_UINT32 vdev_id;
  10529. A_UINT32 pattern_id;
  10530. A_UINT32 pattern_type;
  10531. /*
  10532. * Following this struct are these TLVs. Note that they are all array of structures
  10533. * but can have at most one element. Which TLV is empty or has one element depends
  10534. * on the field pattern_type. This is to emulate an union.
  10535. * WOW_BITMAP_PATTERN_T pattern_info_bitmap[];
  10536. * WOW_IPV4_SYNC_PATTERN_T pattern_info_ipv4[];
  10537. * WOW_IPV6_SYNC_PATTERN_T pattern_info_ipv6[];
  10538. * WOW_MAGIC_PATTERN_CMD pattern_info_magic_pattern[];
  10539. * A_UINT32 pattern_info_timeout[];
  10540. * A_UINT32 ra_ratelimit_interval;
  10541. */
  10542. } WMI_WOW_ADD_PATTERN_CMD_fixed_param;
  10543.  
  10544. typedef struct {
  10545. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_DEL_PATTERN_CMD_fixed_param */
  10546. A_UINT32 vdev_id;
  10547. A_UINT32 pattern_id;
  10548. A_UINT32 pattern_type;
  10549. } WMI_WOW_DEL_PATTERN_CMD_fixed_param;
  10550.  
  10551. #define WMI_WOW_MAX_EVENT_BM_LEN 4
  10552.  
  10553. typedef struct {
  10554. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_ADD_DEL_EVT_CMD_fixed_param */
  10555. A_UINT32 vdev_id;
  10556. A_UINT32 is_add;
  10557. union {
  10558. A_UINT32 event_bitmap;
  10559. A_UINT32 event_bitmaps[WMI_WOW_MAX_EVENT_BM_LEN];
  10560. };
  10561. } WMI_WOW_ADD_DEL_EVT_CMD_fixed_param;
  10562.  
  10563. /*
  10564. * This structure is used to set the pattern to check UDP packet in WOW mode.
  10565. * If match, construct a tx frame in a local buffer to send through the peer
  10566. * AP to the entity in the IP network that sent the UDP packet to this STA.
  10567. */
  10568. typedef struct {
  10569. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_UDP_SVC_OFLD_CMD_fixed_param */
  10570. A_UINT32 vdev_id;
  10571. A_UINT32 enable; /* 1: enable, 0: disable*/
  10572. /* dest_port -
  10573. * bits 7:0 contain the LSB of the UDP dest port,
  10574. * bits 15:8 contain the MSB of the UDP dest port
  10575. */
  10576. A_UINT32 dest_port;
  10577. A_UINT32 pattern_len; /* length in byte of pattern[] */
  10578. A_UINT32 response_len; /* length in byte of response[] */
  10579. /* Following this struct are the TLV's:
  10580. * A_UINT8 pattern[]; <-- payload of UDP packet to be checked, network byte order
  10581. * A_UINT8 response[]; <-- payload of UDP packet to be response, network byte order
  10582. */
  10583. } WMI_WOW_UDP_SVC_OFLD_CMD_fixed_param;
  10584.  
  10585. /*
  10586. * This structure is used to set the pattern for WOW host wakeup pin pulse pattern confirguration.
  10587. */
  10588. typedef struct {
  10589. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_HOSTWAKEUP_PIN_PATTERN_CONFIG_CMD_fixed_param */
  10590. A_UINT32 enable; /* 1: enable, 0: disable */
  10591. A_UINT32 pin; /* pin for host wakeup */
  10592. A_UINT32 interval_low; /* interval for keeping low voltage, unit: ms */
  10593. A_UINT32 interval_high; /* interval for keeping high voltage, unit: ms */
  10594. A_UINT32 repeat_cnt; /* repeat times for pulse (0xffffffff means forever) */
  10595. } WMI_WOW_HOSTWAKEUP_GPIO_PIN_PATTERN_CONFIG_CMD_fixed_param;
  10596.  
  10597. #define MAX_SUPPORTED_ACTION_CATEGORY 256
  10598. #define MAX_SUPPORTED_ACTION_CATEGORY_ELE_LIST (MAX_SUPPORTED_ACTION_CATEGORY/32)
  10599.  
  10600. typedef enum {
  10601. WOW_ACTION_WAKEUP_OPERATION_RESET = 0,
  10602. WOW_ACTION_WAKEUP_OPERATION_SET,
  10603. WOW_ACTION_WAKEUP_OPERATION_ADD_SET,
  10604. WOW_ACTION_WAKEUP_OPERATION_DELETE_SET,
  10605. } WOW_ACTION_WAKEUP_OPERATION;
  10606.  
  10607. typedef struct {
  10608. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_SET_ACTION_WAKE_UP_CMD_fixed_param */
  10609. A_UINT32 vdev_id;
  10610. A_UINT32 operation; /* 0 reset to fw default, 1 set the bits, 2 add the setting bits, 3 delete the setting bits */
  10611. A_UINT32 action_category_map[MAX_SUPPORTED_ACTION_CATEGORY_ELE_LIST];
  10612. } WMI_WOW_SET_ACTION_WAKE_UP_CMD_fixed_param;
  10613.  
  10614. typedef struct wow_event_info_s {
  10615. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_EVENT_INFO_fixed_param */
  10616. A_UINT32 vdev_id;
  10617. A_UINT32 flag; /*This is current reserved.*/
  10618. A_INT32 wake_reason;
  10619. A_UINT32 data_len;
  10620. } WOW_EVENT_INFO_fixed_param;
  10621.  
  10622. typedef struct wow_initial_wakeup_event_s {
  10623. A_UINT32 tlv_header; /* TLV tag and len; tag equals WOW_INITIAL_WAKEUP_EVENT_fixed_param */
  10624. A_UINT32 vdev_id;
  10625. } WOW_INITIAL_WAKEUP_EVENT_fixed_param;
  10626.  
  10627. typedef enum {
  10628. WOW_EVENT_INFO_TYPE_PACKET = 0x0001,
  10629. WOW_EVENT_INFO_TYPE_BITMAP,
  10630. WOW_EVENT_INFO_TYPE_GTKIGTK,
  10631. } WOW_EVENT_INFO_TYPE;
  10632.  
  10633. typedef struct wow_event_info_section_s {
  10634. A_UINT32 data_type;
  10635. A_UINT32 data_len;
  10636. } WOW_EVENT_INFO_SECTION;
  10637.  
  10638. typedef struct wow_event_info_section_packet_s {
  10639. A_UINT8 packet[WOW_DEFAULT_EVT_BUF_SIZE];
  10640. } WOW_EVENT_INFO_SECTION_PACKET;
  10641.  
  10642. typedef struct wow_event_info_section_bitmap_s {
  10643. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_EVENT_INFO_SECTION_BITMAP */
  10644. A_UINT32 flag; /*This is current reserved.*/
  10645. A_UINT32 value; /*This could be the pattern id for bitmap pattern.*/
  10646. A_UINT32 org_len; /*The length of the orginal packet.*/
  10647. } WOW_EVENT_INFO_SECTION_BITMAP;
  10648.  
  10649. /**
  10650. * This command is sent from WLAN host driver to firmware to
  10651. * enable or disable D0-WOW. D0-WOW means APSS suspend with
  10652. * PCIe link and DDR being active.
  10653. *
  10654. *
  10655. * Entering D0-WOW Mode (based on kernel suspend request):
  10656. * host->target: WMI_DO_WOW_ENABLE_DISABLE_CMDID (enable = 1)
  10657. * target: Take action (e.g. dbglog suspend)
  10658. * target->host: HTC_ACK (HTC_MSG_SEND_SUSPEND_COMPLETE message)
  10659. *
  10660. * Exiting D0-WOW mode (based on kernel resume OR target->host message received)
  10661. * host->target: WMI_DO_WOW_ENABLE_DISABLE_CMDID (enable = 0)
  10662. * target: Take action (e.g. dbglog resume)
  10663. * target->host: WMI_D0_WOW_DISABLE_ACK_EVENTID
  10664. *
  10665. * This command is applicable only on the PCIE LL systems
  10666. * Host can enter either D0-WOW or WOW mode, but NOT both at same time
  10667. * Decision to enter D0-WOW or WOW is based on active interfaces
  10668. *
  10669. */
  10670. typedef struct {
  10671. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_d0_wow_enable_disable_cmd_fixed_param */
  10672. A_UINT32 enable; /* 1 = enable, 0 = disable */
  10673. } wmi_d0_wow_enable_disable_cmd_fixed_param;
  10674.  
  10675.  
  10676. typedef enum extend_wow_type_e {
  10677. EXTWOW_TYPE_APP_TYPE1, /* extend wow type: only enable wakeup for app type1 */
  10678. EXTWOW_TYPE_APP_TYPE2, /* extend wow type: only enable wakeup for app type2 */
  10679. EXTWOW_TYPE_APP_TYPE1_2, /* extend wow type: enable wakeup for app type1&2 */
  10680. EXTWOW_TYPE_APP_PULSETEST,
  10681. EXTWOW_DISABLED = 255,
  10682. } EXTWOW_TYPE;
  10683.  
  10684. typedef struct {
  10685. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_extwow_enable_cmd_fixed_param */
  10686. A_UINT32 vdev_id;
  10687. A_UINT32 type;
  10688. A_UINT32 wakeup_pin_num;
  10689. A_UINT32 swol_pulsetest_type;
  10690. A_UINT32 swol_pulsetest_application;
  10691. } wmi_extwow_enable_cmd_fixed_param;
  10692.  
  10693. #define SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX 8
  10694. #define SWOL_INDOOR_KEY_LEN 16
  10695.  
  10696. typedef struct {
  10697. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_extwow_set_app_type1_params_cmd_fixed_param */
  10698. A_UINT32 vdev_id;
  10699. wmi_mac_addr wakee_mac;
  10700. A_UINT8 ident[8];
  10701. A_UINT8 passwd[16];
  10702. A_UINT32 ident_len;
  10703. A_UINT32 passwd_len;
  10704.  
  10705. /* indoor check parameters */
  10706. /* key for mac addresses specified in swol_indoor_key_mac
  10707. * Big-endian hosts need to byte-swap the bytes within each 4-byte
  10708. * segment of this array, so the bytes will return to their original
  10709. * order when the entire WMI message contents are byte-swapped to
  10710. * convert from big-endian to little-endian format.
  10711. */
  10712. A_UINT8 swol_indoor_key[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX][SWOL_INDOOR_KEY_LEN];
  10713. /* key length for specified mac address index
  10714. * Big-endian hosts need to byte-swap the bytes within each 4-byte
  10715. * segment of this array, so the bytes will return to their original
  10716. * order when the entire WMI message contents are byte-swapped to
  10717. * convert from big-endian to little-endian format.
  10718. */
  10719. A_UINT8 swol_indoor_key_len[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX];
  10720. /* mac address array allowed to wakeup host*/
  10721. wmi_mac_addr swol_indoor_key_mac[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX];
  10722. /* app mask for the mac addresses specified in swol_indoor_key_mac */
  10723. A_UINT32 swol_indoor_app_mask[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX];
  10724. A_UINT32 swol_indoor_waker_check; /* whether to do indoor waker check */
  10725. A_UINT32 swol_indoor_pw_check; /* whether to check password */
  10726. A_UINT32 swol_indoor_pattern; /* wakeup pattern */
  10727. A_UINT32 swol_indoor_exception; /* wakeup when exception happens */
  10728. A_UINT32 swol_indoor_exception_app;
  10729. A_UINT32 swol_assist_enable; /* whether to enable IoT mode */
  10730. } wmi_extwow_set_app_type1_params_cmd_fixed_param;
  10731.  
  10732. typedef struct {
  10733. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_extwow_set_app_type2_params_cmd_fixed_param */
  10734. A_UINT32 vdev_id;
  10735.  
  10736. A_UINT8 rc4_key[16];
  10737. A_UINT32 rc4_key_len;
  10738.  
  10739. /** ip header parameter */
  10740. A_UINT32 ip_id; /* NC id */
  10741. A_UINT32 ip_device_ip; /* NC IP address */
  10742. A_UINT32 ip_server_ip; /* Push server IP address */
  10743.  
  10744. /** tcp header parameter */
  10745. A_UINT16 tcp_src_port; /* NC TCP port */
  10746. A_UINT16 tcp_dst_port; /* Push server TCP port */
  10747. A_UINT32 tcp_seq;
  10748. A_UINT32 tcp_ack_seq;
  10749.  
  10750. A_UINT32 keepalive_init; /* Initial ping interval */
  10751. A_UINT32 keepalive_min; /* Minimum ping interval */
  10752. A_UINT32 keepalive_max; /* Maximum ping interval */
  10753. A_UINT32 keepalive_inc; /* Increment of ping interval */
  10754.  
  10755. wmi_mac_addr gateway_mac;
  10756. A_UINT32 tcp_tx_timeout_val;
  10757. A_UINT32 tcp_rx_timeout_val;
  10758.  
  10759. /** add extra parameter for backward-compatible */
  10760. /*
  10761. * For all byte arrays, natural order is used. E.g.
  10762. * rc4_write_sandbox[0] holds the 1st RC4 S-box byte,
  10763. * rc4_write_sandbox[1] holds the 2nd RC4 S-box byte, etc.
  10764. */
  10765.  
  10766. /* used to encrypt transmit packet such as keep-alive */
  10767. A_UINT8 rc4_write_sandbox[256];
  10768. A_UINT32 rc4_write_x;
  10769. A_UINT32 rc4_write_y;
  10770.  
  10771. /* used to decrypt received packet such as wow data */
  10772. A_UINT8 rc4_read_sandbox[256];
  10773. A_UINT32 rc4_read_x;
  10774. A_UINT32 rc4_read_y;
  10775.  
  10776. /* used to caculate HMAC hash for transmit packet such as keep-alive */
  10777. A_UINT8 ssl_write_seq[8];
  10778. A_UINT8 ssl_sha1_write_key[64];
  10779. A_UINT32 ssl_sha1_write_key_len;
  10780.  
  10781. /* used to calculate HAMC hash for receive packet such as wow data */
  10782. A_UINT8 ssl_read_seq[8];
  10783. A_UINT8 ssl_sha1_read_key[64];
  10784. A_UINT32 ssl_sha1_read_key_len;
  10785.  
  10786. /* optional element for specifying TCP options data to include in
  10787. * transmit packets such as keep-alive
  10788. */
  10789. A_UINT32 tcp_options_len;
  10790. A_UINT8 tcp_options[40];
  10791.  
  10792. A_UINT32 async_id; /* keep-alive request id */
  10793. } wmi_extwow_set_app_type2_params_cmd_fixed_param;
  10794.  
  10795.  
  10796. #define WMI_RXERR_CRC 0x01 /* CRC error on frame */
  10797. #define WMI_RXERR_DECRYPT 0x08 /* non-Michael decrypt error */
  10798. #define WMI_RXERR_MIC 0x10 /* Michael MIC decrypt error */
  10799. #define WMI_RXERR_KEY_CACHE_MISS 0x20 /* No/incorrect key matter in h/w */
  10800.  
  10801. typedef enum {
  10802. PKT_PWR_SAVE_PAID_MATCH = 0x00000001,
  10803. PKT_PWR_SAVE_GID_MATCH = 0x00000002,
  10804. PKT_PWR_SAVE_EARLY_TIM_CLEAR = 0x00000004,
  10805. PKT_PWR_SAVE_EARLY_DTIM_CLEAR = 0x00000008,
  10806. PKT_PWR_SAVE_EOF_PAD_DELIM = 0x00000010,
  10807. PKT_PWR_SAVE_MACADDR_MISMATCH = 0x00000020,
  10808. PKT_PWR_SAVE_DELIM_CRC_FAIL = 0x00000040,
  10809. PKT_PWR_SAVE_GID_NSTS_ZERO = 0x00000080,
  10810. PKT_PWR_SAVE_RSSI_CHECK = 0x00000100,
  10811. PKT_PWR_SAVE_5G_EBT = 0x00000200,
  10812. PKT_PWR_SAVE_2G_EBT = 0x00000400,
  10813. PKT_PWR_SAVE_BSS_COLOR_MISMATCH = 0x00000800,
  10814. PKT_PWR_SAVE_UL_FLAG = 0x00001000,
  10815. PKT_PWR_SAVE_STA_ID_MISMATCH = 0x00002000,
  10816. PKT_PWR_SAVE_MACADDR_MISMATCH_FCS = 0x00004000,
  10817.  
  10818. PKT_PWR_SAVE_ENABLE = 0x80000000,
  10819. } WMI_PKT_PWR_SAVE_TYPE;
  10820.  
  10821. typedef struct {
  10822. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ftm_intg_cmd_fixed_param */
  10823. A_UINT32 num_data; /** length in byte of data[]. */
  10824. /** pdev_id for identifying the MAC
  10825. * See macros starting with WMI_PDEV_ID_ for values.
  10826. */
  10827. A_UINT32 pdev_id;
  10828. /* This structure is used to send Factory Test Mode [FTM] command
  10829. * from host to firmware for integrated chips which are binary blobs.
  10830. * Following this structure is the TLV:
  10831. * A_UINT8 data[]; <-- length in byte given by field num_data.
  10832. */
  10833. } wmi_ftm_intg_cmd_fixed_param;
  10834.  
  10835. typedef struct {
  10836. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ftm_intg_event_fixed_param */
  10837. A_UINT32 num_data; /** length in byte of data[]. */
  10838. /* This structure is used to receive Factory Test Mode [FTM] event
  10839. * from firmware to host for integrated chips which are binary blobs.
  10840. * Following this structure is the TLV:
  10841. * A_UINT8 data[]; <-- length in byte given by field num_data.
  10842. */
  10843. } wmi_ftm_intg_event_fixed_param;
  10844.  
  10845. #define WMI_MAX_NS_OFFLOADS 2
  10846. #define WMI_MAX_ARP_OFFLOADS 2
  10847.  
  10848. #define WMI_ARPOFF_FLAGS_VALID (1 << 0) /* the tuple entry is valid */
  10849. #define WMI_ARPOFF_FLAGS_MAC_VALID (1 << 1) /* the target mac address is valid */
  10850. #define WMI_ARPOFF_FLAGS_REMOTE_IP_VALID (1 << 2) /* remote IP field is valid */
  10851.  
  10852. typedef struct {
  10853. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_ARP_OFFLOAD_TUPLE */
  10854. A_UINT32 flags; /* flags */
  10855. A_UINT8 target_ipaddr[4]; /* IPV4 addresses of the local node*/
  10856. A_UINT8 remote_ipaddr[4]; /* source address of the remote node requesting the ARP (qualifier) */
  10857. wmi_mac_addr target_mac; /* mac address for this tuple, if not valid, the local MAC is used */
  10858. } WMI_ARP_OFFLOAD_TUPLE;
  10859.  
  10860. #define WMI_NSOFF_FLAGS_VALID (1 << 0) /* the tuple entry is valid */
  10861. #define WMI_NSOFF_FLAGS_MAC_VALID (1 << 1) /* the target mac address is valid */
  10862. #define WMI_NSOFF_FLAGS_REMOTE_IP_VALID (1 << 2) /* remote IP field is valid */
  10863. #define WMI_NSOFF_FLAGS_IS_IPV6_ANYCAST (1 << 3) /* whether the configured IPv6 address is anycast */
  10864.  
  10865. #define WMI_NSOFF_MAX_TARGET_IPS 2
  10866.  
  10867. typedef struct {
  10868. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_NS_OFFLOAD_TUPLE */
  10869. A_UINT32 flags; /* flags */
  10870. /* NOTE: This size of array target_ipaddr[] cannot be changed without breaking WMI compatibility. */
  10871. WMI_IPV6_ADDR target_ipaddr[WMI_NSOFF_MAX_TARGET_IPS]; /* IPV6 target addresses of the local node */
  10872. WMI_IPV6_ADDR solicitation_ipaddr; /* multi-cast source IP addresses for receiving solicitations */
  10873. WMI_IPV6_ADDR remote_ipaddr; /* address of remote node requesting the solicitation (qualifier) */
  10874. wmi_mac_addr target_mac; /* mac address for this tuple, if not valid, the local MAC is used */
  10875. } WMI_NS_OFFLOAD_TUPLE;
  10876.  
  10877. typedef struct {
  10878. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SET_ARP_NS_OFFLOAD_CMD_fixed_param */
  10879. A_UINT32 flags;
  10880. A_UINT32 vdev_id;
  10881. A_UINT32 num_ns_ext_tuples;
  10882. /* Following this structure are the TLVs:
  10883. * WMI_NS_OFFLOAD_TUPLE ns_tuples[WMI_MAX_NS_OFFLOADS];
  10884. * WMI_ARP_OFFLOAD_TUPLE arp_tuples[WMI_MAX_ARP_OFFLOADS];
  10885. * WMI_NS_OFFLOAD_TUPLE ns_ext_tuples[]; <-- size based on num_ns_ext_tuples
  10886. */
  10887. } WMI_SET_ARP_NS_OFFLOAD_CMD_fixed_param;
  10888.  
  10889.  
  10890. typedef struct {
  10891. A_UINT32 tlv_header;
  10892. A_UINT32 vdev_id;
  10893. A_UINT32 pattern_id;
  10894. A_UINT32 timeout;
  10895. A_UINT32 length;
  10896. /*Following this would be the pattern
  10897. A_UINT8 pattern[] of length specifed by length
  10898. field in the structure.*/
  10899. } WMI_ADD_PROACTIVE_ARP_RSP_PATTERN_CMD_fixed_param;
  10900.  
  10901.  
  10902. typedef struct {
  10903. A_UINT32 tlv_header;
  10904. A_UINT32 vdev_id;
  10905. A_UINT32 pattern_id;
  10906. } WMI_DEL_PROACTIVE_ARP_RSP_PATTERN_CMD_fixed_param;
  10907.  
  10908. typedef struct {
  10909. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_tid_addba_cmd_fixed_param */
  10910. /** unique id identifying the VDEV, generated by the caller */
  10911. A_UINT32 vdev_id;
  10912. /** peer MAC address */
  10913. wmi_mac_addr peer_macaddr;
  10914. /** Tid number */
  10915. A_UINT32 tid;
  10916. /** Initiator (1) or Responder (0) for this aggregation */
  10917. A_UINT32 initiator;
  10918. /** size of the negotiated window */
  10919. A_UINT32 window_size;
  10920. /** starting sequence number (only valid for initiator) */
  10921. A_UINT32 ssn;
  10922. /** timeout field represents the time to wait for Block Ack in
  10923. * initiator case and the time to wait for BAR in responder
  10924. * case. 0 represents no timeout. */
  10925. A_UINT32 timeout;
  10926. /* BA policy: immediate ACK (0) or delayed ACK (1) */
  10927. A_UINT32 policy;
  10928. } wmi_peer_tid_addba_cmd_fixed_param;
  10929.  
  10930. typedef struct {
  10931. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_tid_delba_cmd */
  10932. /** unique id identifying the VDEV, generated by the caller */
  10933. A_UINT32 vdev_id;
  10934. /** peer MAC address */
  10935. wmi_mac_addr peer_macaddr;
  10936. /** Tid number */
  10937. A_UINT32 tid;
  10938. /** Initiator (1) or Responder (0) for this aggregation */
  10939. A_UINT32 initiator;
  10940. } wmi_peer_tid_delba_cmd_fixed_param;
  10941.  
  10942. typedef struct {
  10943. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_addba_complete_event_fixed_param */
  10944. /** unique id identifying the VDEV, generated by the caller */
  10945. A_UINT32 vdev_id;
  10946. /** peer MAC address */
  10947. wmi_mac_addr peer_macaddr;
  10948. /** Tid number */
  10949. A_UINT32 tid;
  10950. /** Event status */
  10951. A_UINT32 status;
  10952. } wmi_tx_addba_complete_event_fixed_param;
  10953.  
  10954. typedef struct {
  10955. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_delba_complete_event_fixed_param */
  10956. /** unique id identifying the VDEV, generated by the caller */
  10957. A_UINT32 vdev_id;
  10958. /** peer MAC address */
  10959. wmi_mac_addr peer_macaddr;
  10960. /** Tid number */
  10961. A_UINT32 tid;
  10962. /** Event status */
  10963. A_UINT32 status;
  10964. } wmi_tx_delba_complete_event_fixed_param;
  10965.  
  10966.  
  10967.  
  10968. /*
  10969. * Structure to request sequence numbers for a given
  10970. * peer station on different TIDs. The TIDs are
  10971. * indicated in the tidBitMap, tid 0 would
  10972. * be represented by LSB bit 0. tid 1 would be
  10973. * represented by LSB bit 1 etc.
  10974. * The target will retrieve the current sequence
  10975. * numbers for the peer on all the TIDs requested
  10976. * and send back a response in a WMI event.
  10977. */
  10978. typedef struct
  10979. {
  10980. A_UINT32 tlv_header; /* TLV tag and len; tag equals
  10981. WMITLV_TAG_STRUC_wmi_ba_req_ssn_cmd_sub_struct_param */
  10982. wmi_mac_addr peer_macaddr;
  10983. A_UINT32 tidBitmap;
  10984. } wmi_ba_req_ssn;
  10985.  
  10986. typedef struct {
  10987. A_UINT32 tlv_header; /* TLV tag and len; tag equals
  10988. WMITLV_TAG_STRUC_wmi_ba_req_ssn_cmd_fixed_param */
  10989. /** unique id identifying the VDEV, generated by the caller */
  10990. A_UINT32 vdev_id;
  10991. /** Number of requested SSN In the TLV wmi_ba_req_ssn[] */
  10992. A_UINT32 num_ba_req_ssn;
  10993. /* Following this struc are the TLV's:
  10994. * wmi_ba_req_ssn ba_req_ssn_list; All peer and tidBitMap for which the ssn is requested
  10995. */
  10996. } wmi_ba_req_ssn_cmd_fixed_param;
  10997.  
  10998. /*
  10999. * Max transmit categories
  11000. *
  11001. * Note: In future if we need to increase WMI_MAX_TC definition
  11002. * It would break the compatibility for WMI_BA_RSP_SSN_EVENTID.
  11003. */
  11004. #define WMI_MAX_TC 8
  11005.  
  11006. /*
  11007. * Structure to send response sequence numbers
  11008. * for a give peer and tidmap.
  11009. */
  11010. typedef struct
  11011. {
  11012. A_UINT32 tlv_header; /* TLV tag and len; tag equals
  11013. WMITLV_TAG_STRUC_wmi_ba_req_ssn_event_sub_struct_param */
  11014. wmi_mac_addr peer_macaddr;
  11015. /* A boolean to indicate if ssn is present */
  11016. A_UINT32 ssn_present_for_tid[WMI_MAX_TC];
  11017. /* The ssn from target, valid only if
  11018. * ssn_present_for_tid[tidn] equals 1
  11019. */
  11020. A_UINT32 ssn_for_tid[WMI_MAX_TC];
  11021. } wmi_ba_event_ssn;
  11022.  
  11023. typedef struct {
  11024. A_UINT32 tlv_header; /* TLV tag and len; tag equals
  11025. WMITLV_TAG_STRUC_wmi_ba_rsp_ssn_event_fixed_param */
  11026. /** unique id identifying the VDEV, generated by the caller */
  11027. A_UINT32 vdev_id;
  11028. /** Event status, success or failure of the overall operation */
  11029. A_UINT32 status;
  11030. /** Number of requested SSN In the TLV wmi_ba_req_ssn[] */
  11031. A_UINT32 num_ba_event_ssn;
  11032. /* Following this struc are the TLV's:
  11033. * wmi_ba_event_ssn ba_event_ssn_list; All peer and tidBitMap for which the ssn is requested
  11034. */
  11035. } wmi_ba_rsp_ssn_event_fixed_param;
  11036.  
  11037.  
  11038. enum wmi_aggr_state_req_type {
  11039.  
  11040. WMI_DISABLE_AGGREGATION,
  11041. WMI_ENABLE_AGGREGATION
  11042. };
  11043.  
  11044. /*
  11045. * This event is generated by the COEX module
  11046. * when esco call is begins the coex module in fw genrated this event to host to
  11047. * disable the RX aggregation and after completion of the esco call fw will indicate to
  11048. * enable back the Rx aggregation .
  11049. */
  11050.  
  11051. typedef struct {
  11052. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_aggr_state_trig_event_fixed_param */
  11053. /** unique id identifying the VDEV, generated by the caller */
  11054. A_UINT32 vdev_id;
  11055. /** req_type contains values from enum
  11056. * wmi_aggr_state_req_type; 0 (disable) 1(enable) */
  11057. A_UINT32 req_type;
  11058. } wmi_aggr_state_trig_event_fixed_param;
  11059.  
  11060. typedef struct {
  11061. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_install_key_complete_event_fixed_param */
  11062. /** unique id identifying the VDEV, generated by the caller */
  11063. A_UINT32 vdev_id;
  11064. /** MAC address used for installing */
  11065. wmi_mac_addr peer_macaddr;
  11066. /** key index */
  11067. A_UINT32 key_ix;
  11068. /** key flags */
  11069. A_UINT32 key_flags;
  11070. /** Event status */
  11071. A_UINT32 status;
  11072. } wmi_vdev_install_key_complete_event_fixed_param;
  11073.  
  11074. typedef enum _WMI_NLO_AUTH_ALGORITHM {
  11075. WMI_NLO_AUTH_ALGO_80211_OPEN = 1,
  11076. WMI_NLO_AUTH_ALGO_80211_SHARED_KEY = 2,
  11077. WMI_NLO_AUTH_ALGO_WPA = 3,
  11078. WMI_NLO_AUTH_ALGO_WPA_PSK = 4,
  11079. WMI_NLO_AUTH_ALGO_WPA_NONE = 5,
  11080. WMI_NLO_AUTH_ALGO_RSNA = 6,
  11081. WMI_NLO_AUTH_ALGO_RSNA_PSK = 7,
  11082. } WMI_NLO_AUTH_ALGORITHM;
  11083.  
  11084. typedef enum _WMI_NLO_CIPHER_ALGORITHM {
  11085. WMI_NLO_CIPHER_ALGO_NONE = 0x00,
  11086. WMI_NLO_CIPHER_ALGO_WEP40 = 0x01,
  11087. WMI_NLO_CIPHER_ALGO_TKIP = 0x02,
  11088. WMI_NLO_CIPHER_ALGO_CCMP = 0x04,
  11089. WMI_NLO_CIPHER_ALGO_WEP104 = 0x05,
  11090. WMI_NLO_CIPHER_ALGO_BIP = 0x06,
  11091. WMI_NLO_CIPHER_ALGO_WPA_USE_GROUP = 0x100,
  11092. WMI_NLO_CIPHER_ALGO_RSN_USE_GROUP = 0x100,
  11093. WMI_NLO_CIPHER_ALGO_WEP = 0x101,
  11094. } WMI_NLO_CIPHER_ALGORITHM;
  11095.  
  11096. /* SSID broadcast type passed in NLO params */
  11097. typedef enum _WMI_NLO_SSID_BcastNwType
  11098. {
  11099. WMI_NLO_BCAST_UNKNOWN = 0,
  11100. WMI_NLO_BCAST_NORMAL = 1,
  11101. WMI_NLO_BCAST_HIDDEN = 2,
  11102. } WMI_NLO_SSID_BcastNwType;
  11103.  
  11104. #define WMI_NLO_MAX_SSIDS 16
  11105. #define WMI_NLO_MAX_CHAN 48
  11106.  
  11107. #define WMI_NLO_CONFIG_STOP (0x1 << 0)
  11108. #define WMI_NLO_CONFIG_START (0x1 << 1)
  11109. #define WMI_NLO_CONFIG_RESET (0x1 << 2)
  11110. #define WMI_NLO_CONFIG_SLOW_SCAN (0x1 << 4)
  11111. #define WMI_NLO_CONFIG_FAST_SCAN (0x1 << 5)
  11112. #define WMI_NLO_CONFIG_SSID_HIDE_EN (0x1 << 6)
  11113.  
  11114. /* This bit is used to indicate if EPNO Profile is enabled */
  11115. #define WMI_NLO_CONFIG_ENLO (0x1 << 7)
  11116. #define WMI_NLO_CONFIG_SCAN_PASSIVE (0x1 << 8)
  11117. #define WMI_NLO_CONFIG_ENLO_RESET (0x1 << 9)
  11118. #define WMI_NLO_CONFIG_SPOOFED_MAC_IN_PROBE_REQ (0x1 << 10)
  11119. #define WMI_NLO_CONFIG_RANDOM_SEQ_NO_IN_PROBE_REQ (0x1 << 11)
  11120. #define WMI_NLO_CONFIG_ENABLE_IE_WHITELIST_IN_PROBE_REQ (0x1 << 12)
  11121. #define WMI_NLO_CONFIG_ENABLE_CNLO_RSSI_CONFIG (0x1 << 13)
  11122.  
  11123. /* Whether directed scan needs to be performed (for hidden SSIDs) */
  11124. #define WMI_ENLO_FLAG_DIRECTED_SCAN 1
  11125. /* Whether PNO event shall be triggered if the network is found on A band */
  11126. #define WMI_ENLO_FLAG_A_BAND 2
  11127. /* Whether PNO event shall be triggered if the network is found on G band */
  11128. #define WMI_ENLO_FLAG_G_BAND 4
  11129. /* Whether strict matching is required (i.e. firmware shall not match on the entire SSID) */
  11130. #define WMI_ENLO_FLAG_STRICT_MATCH 8
  11131.  
  11132. /* Code for matching the beacon AUTH IE - additional codes TBD */
  11133. /* open */
  11134. #define WMI_ENLO_AUTH_CODE_OPEN 1
  11135. /* WPA_PSK or WPA2PSK */
  11136. #define WMI_ENLO_AUTH_CODE_PSK 2
  11137. /* any EAPOL */
  11138. #define WMI_ENLO_AUTH_CODE_EAPOL 4
  11139.  
  11140. /* NOTE: wmi_nlo_ssid_param structure can't be changed without breaking the compatibility */
  11141. typedef struct wmi_nlo_ssid_param
  11142. {
  11143. A_UINT32 valid;
  11144. wmi_ssid ssid;
  11145. } wmi_nlo_ssid_param;
  11146.  
  11147. /* NOTE: wmi_nlo_enc_param structure can't be changed without breaking the compatibility */
  11148. typedef struct wmi_nlo_enc_param
  11149. {
  11150. A_UINT32 valid;
  11151. A_UINT32 enc_type;
  11152. } wmi_nlo_enc_param;
  11153.  
  11154. /* NOTE: wmi_nlo_auth_param structure can't be changed without breaking the compatibility */
  11155. typedef struct wmi_nlo_auth_param
  11156. {
  11157. A_UINT32 valid;
  11158. A_UINT32 auth_type;
  11159. } wmi_nlo_auth_param;
  11160.  
  11161. /* NOTE: wmi_nlo_bcast_nw_param structure can't be changed without breaking the compatibility */
  11162. typedef struct wmi_nlo_bcast_nw_param
  11163. {
  11164. A_UINT32 valid;
  11165. /* If WMI_NLO_CONFIG_EPNO is not set. Supplicant PNO is enabled. The value should be true/false
  11166. Otherwise EPNO is enabled. bcast_nw_type would be used as a bit flag contains WMI_ENLO_FLAG_XXX */
  11167. A_UINT32 bcast_nw_type;
  11168. } wmi_nlo_bcast_nw_param;
  11169.  
  11170. /* NOTE: wmi_nlo_rssi_param structure can't be changed without breaking the compatibility */
  11171. typedef struct wmi_nlo_rssi_param
  11172. {
  11173. A_UINT32 valid;
  11174. A_INT32 rssi;
  11175. } wmi_nlo_rssi_param;
  11176.  
  11177. typedef struct nlo_configured_parameters {
  11178. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_nlo_configured_parameters */
  11179. wmi_nlo_ssid_param ssid;
  11180. wmi_nlo_enc_param enc_type;
  11181. wmi_nlo_auth_param auth_type;
  11182. wmi_nlo_rssi_param rssi_cond;
  11183. wmi_nlo_bcast_nw_param bcast_nw_type; /* indicates if the SSID is hidden or not */
  11184. } nlo_configured_parameters;
  11185.  
  11186.  
  11187. /* Support channel prediction for PNO scan after scanning top_k_num channels
  11188. * if stationary_threshold is met.
  11189. */
  11190. typedef struct nlo_channel_prediction_cfg {
  11191. A_UINT32 tlv_header;
  11192. /* Enable or disable this feature. */
  11193. A_UINT32 enable;
  11194. /* Top K channels will be scanned before deciding whether to further scan
  11195. * or stop. Minimum value is 3 and maximum is 5. */
  11196. A_UINT32 top_k_num;
  11197. /* Preconfigured stationary threshold.
  11198. * Lesser value means more conservative. Bigger value means more aggressive.
  11199. * Maximum is 100 and mininum is 0. */
  11200. A_UINT32 stationary_threshold;
  11201. /* Periodic full channel scan in milliseconds unit.
  11202. * After full_scan_period_ms since last full scan, channel prediction
  11203. * scan is suppressed and will do full scan.
  11204. * This is to help detecting sudden AP power-on or -off. Value 0 means no
  11205. * full scan at all (not recommended).
  11206. */
  11207. A_UINT32 full_scan_period_ms;
  11208. } nlo_channel_prediction_cfg;
  11209.  
  11210. typedef struct enlo_candidate_score_params_t {
  11211. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_enlo_candidate_score_param */
  11212. A_INT32 min5GHz_rssi; /* minimum 5GHz RSSI for a BSSID to be considered (units = dBm) */
  11213. A_INT32 min24GHz_rssi; /* minimum 2.4GHz RSSI for a BSSID to be considered (units = dBm) */
  11214. A_UINT32 initial_score_max; /* the maximum score that a network can have before bonuses */
  11215. /* current_connection_bonus:
  11216. * only report when there is a network's score this much higher
  11217. * than the current connection
  11218. */
  11219. A_UINT32 current_connection_bonus;
  11220. A_UINT32 same_network_bonus; /* score bonus for all networks with the same network flag */
  11221. A_UINT32 secure_bonus; /* score bonus for networks that are not open */
  11222. A_UINT32 band5GHz_bonus; /* 5GHz RSSI score bonus (applied to all 5GHz networks) */
  11223. } enlo_candidate_score_params;
  11224.  
  11225. typedef struct connected_nlo_bss_band_rssi_pref_t {
  11226. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_connected_nlo_bss_band_rssi_pref */
  11227. /** band which needs to get preference over other band - see wmi_set_vdev_ie_band enum */
  11228. A_UINT32 band;
  11229. /* Amount of RSSI preference (in dB) that can be given to band (mentioned above) over other band */
  11230. A_INT32 rssi_pref;
  11231. } connected_nlo_bss_band_rssi_pref;
  11232.  
  11233. typedef struct connected_nlo_rssi_params_t {
  11234. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_connected_nlo_rssi_params */
  11235. /* Relative rssi threshold (in dB) by which new BSS should have better rssi than
  11236. * the current connected BSS.
  11237. */
  11238. A_INT32 relative_rssi;
  11239. /* The amount of rssi preference (in dB) that can be given to a 5G BSS over 2.4G BSS. */
  11240. A_INT32 relative_rssi_5g_pref;
  11241. } connected_nlo_rssi_params;
  11242.  
  11243. typedef struct wmi_nlo_config {
  11244. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nlo_config_cmd_fixed_param */
  11245. A_UINT32 flags;
  11246. A_UINT32 vdev_id;
  11247. A_UINT32 fast_scan_max_cycles;
  11248. A_UINT32 active_dwell_time;
  11249. A_UINT32 passive_dwell_time; /* PDT in msecs */
  11250. A_UINT32 probe_bundle_size;
  11251. A_UINT32 rest_time; /* ART = IRT */
  11252. A_UINT32 max_rest_time; /* Max value that can be reached after SBM */
  11253. A_UINT32 scan_backoff_multiplier; /* SBM */
  11254. A_UINT32 fast_scan_period; /* SCBM */
  11255. A_UINT32 slow_scan_period; /* specific to windows */
  11256. A_UINT32 no_of_ssids;
  11257. A_UINT32 num_of_channels;
  11258. A_UINT32 delay_start_time; /* NLO scan start delay time in milliseconds */
  11259. /** MAC Address to use in Probe Req as SA **/
  11260. wmi_mac_addr mac_addr;
  11261. /** Mask on which MAC has to be randomized **/
  11262. wmi_mac_addr mac_mask;
  11263. /** IE bitmap to use in Probe Req **/
  11264. A_UINT32 ie_bitmap[WMI_IE_BITMAP_SIZE];
  11265. /** Number of vendor OUIs. In the TLV vendor_oui[] **/
  11266. A_UINT32 num_vendor_oui;
  11267. /** Number of connected NLO band preferences **/
  11268. A_UINT32 num_cnlo_band_pref;
  11269. /* The TLVs will follow.
  11270. * nlo_configured_parameters nlo_list[];
  11271. * A_UINT32 channel_list[num_of_channels];
  11272. * nlo_channel_prediction_cfg ch_prediction_cfg;
  11273. * enlo_candidate_score_params candidate_score_params;
  11274. * wmi_vendor_oui vendor_oui[num_vendor_oui];
  11275. * connected_nlo_rssi_params cnlo_rssi_params;
  11276. * connected_nlo_bss_band_rssi_pref cnlo_bss_band_rssi_pref[num_cnlo_band_pref];
  11277. */
  11278. } wmi_nlo_config_cmd_fixed_param;
  11279.  
  11280. typedef struct wmi_nlo_event
  11281. {
  11282. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nlo_event */
  11283. A_UINT32 vdev_id;
  11284. } wmi_nlo_event;
  11285.  
  11286.  
  11287. /* WMI_PASSPOINT_CONFIG_SET
  11288. * Sets a list for passpoint networks for PNO purposes;
  11289. * it should be matched against any passpoint networks found
  11290. * during regular PNO scan.
  11291. */
  11292. #define WMI_PASSPOINT_CONFIG_SET (0x1 << 0)
  11293. /* WMI_PASSPOINT_CONFIG_RESET
  11294. * Reset passpoint network list -
  11295. * no Passpoint networks should be matched after this.
  11296. */
  11297. #define WMI_PASSPOINT_CONFIG_RESET (0x1 << 1)
  11298.  
  11299. #define PASSPOINT_REALM_LEN 256
  11300. #define PASSPOINT_ROAMING_CONSORTIUM_ID_LEN 5
  11301. #define PASSPOINT_ROAMING_CONSORTIUM_ID_NUM 16
  11302. #define PASSPOINT_PLMN_ID_LEN 3
  11303. #define PASSPOINT_PLMN_ID_ALLOC_LEN /* round up to A_UINT32 boundary */ \
  11304. (((PASSPOINT_PLMN_ID_LEN + 3) >> 2) << 2)
  11305.  
  11306. /*
  11307. * Confirm PASSPOINT_REALM_LEN is a multiple of 4, so the
  11308. * A_UINT8 realm[PASSPOINT_REALM_LEN]
  11309. * array will end on a 4-byte boundary.
  11310. * (This 4-byte alignment simplifies endianness-correction byte swapping.)
  11311. */
  11312. A_COMPILE_TIME_ASSERT(
  11313. check_passpoint_realm_size,
  11314. (PASSPOINT_REALM_LEN % sizeof(A_UINT32)) == 0);
  11315.  
  11316. /*
  11317. * Confirm the product of PASSPOINT_ROAMING_CONSORTIUM_ID_NUM and
  11318. * PASSPOINT_ROAMING_CONSORTIUM_ID_LEN is a multiple of 4, so the
  11319. * roaming_consortium_ids array below will end on a 4-byte boundary.
  11320. * (This 4-byte alignment simplifies endianness-correction byte swapping.)
  11321. */
  11322. A_COMPILE_TIME_ASSERT(
  11323. check_passpoint_roaming_consortium_ids_size,
  11324. ((PASSPOINT_ROAMING_CONSORTIUM_ID_NUM*PASSPOINT_ROAMING_CONSORTIUM_ID_LEN) % sizeof(A_UINT32)) == 0);
  11325.  
  11326. /* wildcard ID to allow an action (reset) to apply to all networks */
  11327. #define WMI_PASSPOINT_NETWORK_ID_WILDCARD 0xFFFFFFFF
  11328. typedef struct wmi_passpoint_config {
  11329. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_passpoint_config_cmd_fixed_param */
  11330. /* (network) id
  11331. * identifier of the matched network, report this in event
  11332. * This id can be a wildcard (WMI_PASSPOINT_NETWORK_ID_WILDCARD)
  11333. * that indicates the action should be applied to all networks.
  11334. * Currently, the only action that is applied to all networks is "reset".
  11335. * If a non-wildcard ID is specified, that particular network is configured.
  11336. * If a wildcard ID is specified, all networks are reset.
  11337. */
  11338. A_UINT32 id;
  11339. A_UINT32 req_id;
  11340. A_UINT8 realm[PASSPOINT_REALM_LEN]; /*null terminated UTF8 encoded realm, 0 if unspecified*/
  11341. A_UINT8 roaming_consortium_ids[PASSPOINT_ROAMING_CONSORTIUM_ID_NUM][PASSPOINT_ROAMING_CONSORTIUM_ID_LEN]; /*roaming consortium ids to match, 0s if unspecified*/
  11342. /*This would be bytes-stream as same as defition of realm id in 802.11 standard*/
  11343. A_UINT8 plmn[PASSPOINT_PLMN_ID_ALLOC_LEN]; /*PLMN id mcc/mnc combination as per rules, 0s if unspecified */
  11344. } wmi_passpoint_config_cmd_fixed_param;
  11345.  
  11346. typedef struct {
  11347. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_passpoint_event_hdr */
  11348. A_UINT32 id; /* identifier of the matched network */
  11349. A_UINT32 vdev_id;
  11350. A_UINT32 timestamp; /* time since boot (in microsecond) when the result was retrieved*/
  11351. wmi_ssid ssid;
  11352. wmi_mac_addr bssid; /* bssid of the network */
  11353. A_UINT32 channel_mhz; /* channel frequency in MHz */
  11354. A_UINT32 rssi; /* rssi value */
  11355. A_UINT32 rtt; /* timestamp in nanoseconds*/
  11356. A_UINT32 rtt_sd; /* standard deviation in rtt */
  11357. A_UINT32 beacon_period; /* beacon advertised in the beacon */
  11358. A_UINT32 capability; /* capabilities advertised in the beacon */
  11359. A_UINT32 ie_length; /* size of the ie_data blob */
  11360. A_UINT32 anqp_length; /* length of ANQP blob */
  11361. /* Following this structure is the byte stream of ie data of length ie_buf_len:
  11362. * A_UINT8 ie_data[]; <-- length in byte given by field ie_length, blob of ie data in beacon
  11363. * A_UINT8 anqp_ie[]; <-- length in byte given by field anqp_len, blob of anqp data of IE
  11364. * Implicitly, combing ie_data and anqp_ie into a single bufp, and the bytes stream of each ie should be same as BEACON/Action-frm by 802.11 spec.
  11365. */
  11366. } wmi_passpoint_event_hdr;
  11367.  
  11368.  
  11369. #define GTK_OFFLOAD_OPCODE_MASK 0xFF000000
  11370. /** Enable GTK offload, and provided parameters KEK,KCK and replay counter values */
  11371. #define GTK_OFFLOAD_ENABLE_OPCODE 0x01000000
  11372. /** Disable GTK offload */
  11373. #define GTK_OFFLOAD_DISABLE_OPCODE 0x02000000
  11374. /** Read GTK offload parameters, generates WMI_GTK_OFFLOAD_STATUS_EVENT */
  11375. #define GTK_OFFLOAD_REQUEST_STATUS_OPCODE 0x04000000
  11376. enum wmi_chatter_mode {
  11377. /* Chatter enter/exit happens
  11378. * automatically based on preset
  11379. * params
  11380. */
  11381. WMI_CHATTER_MODE_AUTO,
  11382. /* Chatter enter is triggered
  11383. * manually by the user
  11384. */
  11385. WMI_CHATTER_MODE_MANUAL_ENTER,
  11386. /* Chatter exit is triggered
  11387. * manually by the user
  11388. */
  11389. WMI_CHATTER_MODE_MANUAL_EXIT,
  11390. /* Placeholder max value, always last*/
  11391. WMI_CHATTER_MODE_MAX
  11392. };
  11393.  
  11394. enum wmi_chatter_query_type {
  11395. /*query coalescing filter match counter*/
  11396. WMI_CHATTER_QUERY_FILTER_MATCH_CNT,
  11397. WMI_CHATTER_QUERY_MAX
  11398. };
  11399.  
  11400. typedef struct {
  11401. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_set_mode_cmd_fixed_param */
  11402. A_UINT32 chatter_mode;
  11403. } wmi_chatter_set_mode_cmd_fixed_param;
  11404.  
  11405. /** maximum number of filter supported*/
  11406. #define CHATTER_MAX_COALESCING_RULES 11
  11407. /** maximum number of field tests per filter*/
  11408. #define CHATTER_MAX_FIELD_TEST 5
  11409. /** maximum field length in number of DWORDS*/
  11410. #define CHATTER_MAX_TEST_FIELD_LEN32 2
  11411.  
  11412. /** field test kinds*/
  11413. #define CHATTER_COALESCING_TEST_EQUAL 1
  11414. #define CHATTER_COALESCING_TEST_MASKED_EQUAL 2
  11415. #define CHATTER_COALESCING_TEST_NOT_EQUAL 3
  11416.  
  11417. /** packet type*/
  11418. #define CHATTER_COALESCING_PKT_TYPE_UNICAST (1 << 0)
  11419. #define CHATTER_COALESCING_PKT_TYPE_MULTICAST (1 << 1)
  11420. #define CHATTER_COALESCING_PKT_TYPE_BROADCAST (1 << 2)
  11421.  
  11422. /** coalescing field test*/
  11423. typedef struct _chatter_pkt_coalescing_hdr_test {
  11424. /** offset from start of mac header, for windows native wifi host driver
  11425. * should assume standard 802.11 frame format without QoS info and address4
  11426. * FW would account for any non-stand fields for final offset value.
  11427. */
  11428. A_UINT32 offset;
  11429. A_UINT32 length; /* length of test field*/
  11430. A_UINT32 test; /*equal, not equal or masked equal*/
  11431. A_UINT32 mask[CHATTER_MAX_TEST_FIELD_LEN32]; /*mask byte stream*/
  11432. A_UINT32 value[CHATTER_MAX_TEST_FIELD_LEN32]; /*value byte stream*/
  11433. } chatter_pkt_coalescing_hdr_test;
  11434.  
  11435. /** packet coalescing filter*/
  11436. typedef struct _chatter_pkt_coalescing_filter {
  11437. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_pkt_coalescing_filter */
  11438. A_UINT32 filter_id; /*unique id assigned by OS*/
  11439. A_UINT32 max_coalescing_delay; /*max miliseconds 1st pkt can be hold*/
  11440. A_UINT32 pkt_type; /*unicast/multicast/broadcast*/
  11441. A_UINT32 num_of_test_field; /*number of field test in table*/
  11442. chatter_pkt_coalescing_hdr_test test_fields[CHATTER_MAX_FIELD_TEST]; /*field test tbl*/
  11443. } chatter_pkt_coalescing_filter;
  11444.  
  11445. /** packet coalescing filter add command*/
  11446. typedef struct {
  11447. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_coalescing_add_filter_cmd_fixed_param */
  11448. A_UINT32 num_of_filters;
  11449. /* Following this tlv, there comes an array of structure of type chatter_pkt_coalescing_filter
  11450. chatter_pkt_coalescing_filter rx_filter[1];*/
  11451. } wmi_chatter_coalescing_add_filter_cmd_fixed_param;
  11452. /** packet coalescing filter delete command*/
  11453. typedef struct {
  11454. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_coalescing_delete_filter_cmd_fixed_param */
  11455. A_UINT32 filter_id; /*filter id which will be deleted*/
  11456. } wmi_chatter_coalescing_delete_filter_cmd_fixed_param;
  11457. /** packet coalescing query command*/
  11458. typedef struct {
  11459. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_coalescing_query_cmd_fixed_param */
  11460. A_UINT32 type; /*type of query*/
  11461. } wmi_chatter_coalescing_query_cmd_fixed_param;
  11462. /** chatter query reply event*/
  11463. typedef struct {
  11464. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_query_reply_event_fixed_param */
  11465. A_UINT32 type; /*query type*/
  11466. A_UINT32 filter_match_cnt; /*coalescing filter match counter*/
  11467. } wmi_chatter_query_reply_event_fixed_param;
  11468.  
  11469. /* NOTE: This constants GTK_OFFLOAD_KEK_BYTES, GTK_OFFLOAD_KCK_BYTES, and GTK_REPLAY_COUNTER_BYTES
  11470. * cannot be changed without breaking WMI compatibility. */
  11471. #define GTK_OFFLOAD_KEK_BYTES 16
  11472. #define GTK_OFFLOAD_KCK_BYTES 16
  11473. /* NOTE: GTK_REPLAY_COUNTER_BYTES, WMI_MAX_KEY_LEN, IGTK_PN_SIZE cannot be changed in the future without breaking WMI compatibility */
  11474. #define GTK_REPLAY_COUNTER_BYTES 8
  11475. #define WMI_MAX_KEY_LEN 32
  11476. #define IGTK_PN_SIZE 6
  11477.  
  11478. typedef struct {
  11479. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_GTK_OFFLOAD_STATUS_EVENT_fixed_param */
  11480. A_UINT32 vdev_id; /** unique id identifying the VDEV */
  11481. A_UINT32 flags; /* status flags */
  11482. A_UINT32 refresh_cnt; /* number of successful GTK refresh exchanges since last SET operation */
  11483. A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES]; /* current replay counter */
  11484. A_UINT8 igtk_keyIndex; /* Use if IGTK_OFFLOAD is defined */
  11485. A_UINT8 igtk_keyLength; /* Use if IGTK_OFFLOAD is defined */
  11486. A_UINT8 igtk_keyRSC[IGTK_PN_SIZE]; /* key replay sequence counter *//* Use if IGTK_OFFLOAD is defined */
  11487. A_UINT8 igtk_key[WMI_MAX_KEY_LEN]; /* Use if IGTK_OFFLOAD is defined */
  11488. } WMI_GTK_OFFLOAD_STATUS_EVENT_fixed_param;
  11489.  
  11490. typedef struct {
  11491. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_GTK_OFFLOAD_CMD_fixed_param */
  11492. A_UINT32 vdev_id; /** unique id identifying the VDEV */
  11493. A_UINT32 flags; /* control flags, GTK offload command use high byte */
  11494. /* The size of following 3 arrays cannot be changed without breaking WMI compatibility. */
  11495. A_UINT8 KEK[GTK_OFFLOAD_KEK_BYTES]; /* key encryption key */
  11496. A_UINT8 KCK[GTK_OFFLOAD_KCK_BYTES]; /* key confirmation key */
  11497. A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES]; /* replay counter for re-key */
  11498. } WMI_GTK_OFFLOAD_CMD_fixed_param;
  11499.  
  11500. typedef struct {
  11501. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_PMF_OFFLOAD_SET_SA_QUERY_CMD_fixed_param */
  11502. A_UINT32 vdev_id;
  11503. A_UINT32 sa_query_retry_interval; /* in msec */
  11504. A_UINT32 sa_query_max_retry_count;
  11505. } WMI_PMF_OFFLOAD_SET_SA_QUERY_CMD_fixed_param;
  11506.  
  11507. typedef enum {
  11508. WMI_STA_KEEPALIVE_METHOD_NULL_FRAME = 1, /* 802.11 NULL frame */
  11509. WMI_STA_KEEPALIVE_METHOD_UNSOLICITED_ARP_RESPONSE = 2, /* ARP response */
  11510. WMI_STA_KEEPALIVE_METHOD_ETHERNET_LOOPBACK = 3, /*ETHERNET LOOPBACK*/
  11511. WMI_STA_KEEPALIVE_METHOD_GRATUITOUS_ARP_REQUEST = 4, /* gratuitous ARP req*/
  11512. } WMI_STA_KEEPALIVE_METHOD;
  11513.  
  11514. typedef struct {
  11515. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_STA_KEEPALVE_ARP_RESPONSE */
  11516. WMI_IPV4_ADDR sender_prot_addr; /* Sender protocol address */
  11517. WMI_IPV4_ADDR target_prot_addr; /* Target protocol address */
  11518. wmi_mac_addr dest_mac_addr; /* destination MAC address */
  11519. } WMI_STA_KEEPALVE_ARP_RESPONSE;
  11520.  
  11521. typedef struct {
  11522. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_STA_KEEPALIVE_CMD_fixed_param */
  11523. A_UINT32 vdev_id;
  11524. A_UINT32 enable; /* 1 - Enable, 0 - disable */
  11525. A_UINT32 method; /* keep alive method */
  11526. A_UINT32 interval; /* time interval in seconds */
  11527. /*
  11528. * NOTE: following this structure is the TLV for ARP Resonse:
  11529. * WMI_STA_KEEPALVE_ARP_RESPONSE arp_resp; <-- ARP response
  11530. */
  11531. } WMI_STA_KEEPALIVE_CMD_fixed_param;
  11532.  
  11533. typedef struct {
  11534. A_UINT32 tlv_header;
  11535. A_UINT32 vdev_id;
  11536. A_UINT32 action;
  11537. } WMI_VDEV_WNM_SLEEPMODE_CMD_fixed_param;
  11538. typedef WMI_VDEV_WNM_SLEEPMODE_CMD_fixed_param WMI_STA_WNMSLEEP_CMD;
  11539.  
  11540. typedef struct {
  11541. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_keepalive_cmd_fixed_param */
  11542. A_UINT32 vdev_id;
  11543. A_UINT32 keepaliveInterval; /* seconds */
  11544. A_UINT32 keepaliveMethod;
  11545. } wmi_vdev_set_keepalive_cmd_fixed_param;
  11546.  
  11547. typedef struct {
  11548. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_keepalive_cmd_fixed_param */
  11549. A_UINT32 vdev_id;
  11550. } wmi_vdev_get_keepalive_cmd_fixed_param;
  11551.  
  11552. typedef struct {
  11553. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_keepalive_event_fixed_param */
  11554. A_UINT32 vdev_id;
  11555. A_UINT32 keepaliveInterval; /* seconds */
  11556. A_UINT32 keepaliveMethod; /* seconds */
  11557. } wmi_vdev_get_keepalive_event_fixed_param;
  11558.  
  11559. typedef enum {
  11560. WMI_CLEAR_ARP_STATS_COLLECTED = 0x0,
  11561. WMI_START_ARP_STATS_COLLECTION,
  11562. } WMI_ARP_STATS_ACTION;
  11563.  
  11564. typedef enum {
  11565. WMI_ARP_STATS_RX_PKT_TYPE_ARP = 0x1,
  11566. } WMI_ARP_STATS_RX_PKT_TYPE;
  11567.  
  11568. typedef enum {
  11569. WMI_BA_SESSION_ESTABLISHMENT_STATUS_SUCCESS = 0x0,
  11570. WMI_BA_SESSION_ESTABLISHMENT_STATUS_FAILURE,
  11571. } WMI_ARP_STATS_BA_SESSION_ESTABLISH_STATUS;
  11572.  
  11573. typedef enum {
  11574. WMI_CONNECTION_STATUS_FAILURE = 0x0,
  11575. WMI_CONNECTION_STATUS_SUCCESS,
  11576. } WMI_ARP_STATS_CONNECTION_STATUS;
  11577.  
  11578. /* ARP stats set (configure) req */
  11579. typedef struct {
  11580. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_arp_stats_cmd_fixed_param */
  11581. A_UINT32 vdev_id;
  11582. A_UINT32 set_clr; /* WMI_ARP_STATS_ACTION */
  11583. A_UINT32 pkt_type; /* WMI_ARP_STATS_RX_PKT_TYPE */
  11584. A_UINT32 ipv4; /* target will maintain ARP stats (only) for frames containing this IP address */
  11585. } wmi_vdev_set_arp_stats_cmd_fixed_param;
  11586.  
  11587. /* ARP stats get req */
  11588. typedef struct {
  11589. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_arp_stats_cmd_fixed_param */
  11590. A_UINT32 vdev_id;
  11591. } wmi_vdev_get_arp_stats_cmd_fixed_param;
  11592.  
  11593. /* per vdev based ARP stats */
  11594. typedef struct {
  11595. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_arp_stats_event_fixed_param */
  11596. A_UINT32 vdev_id;
  11597. A_UINT32 arp_req_enqueue;
  11598. A_UINT32 arp_req_tx_success;
  11599. A_UINT32 arp_req_tx_failure; /* number of times a tx MPDU containing a unicast ARP request went unacked */
  11600. A_UINT32 arp_rsp_recvd;
  11601. A_UINT32 out_of_order_arp_rsp_drop_cnt;
  11602. A_UINT32 dad_detected; /* duplicate address detection */
  11603. A_UINT32 connect_status; /* WMI_ARP_STATS_CONNECTION_STATUS */
  11604. A_UINT32 ba_session_establishment_status; /* WMI_ARP_STATS_BA_SESSION_ESTABLISH_STATUS */
  11605. } wmi_vdev_get_arp_stats_event_fixed_param;
  11606.  
  11607. typedef struct {
  11608. A_UINT32 tlv_header;
  11609. A_UINT32 vdev_id;
  11610. #define IPSEC_NATKEEPALIVE_FILTER_DISABLE 0
  11611. #define IPSEC_NATKEEPALIVE_FILTER_ENABLE 1
  11612. A_UINT32 action;
  11613. } WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMD_fixed_param;
  11614. typedef WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMD_fixed_param WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMD;
  11615.  
  11616. typedef struct {
  11617. A_UINT32 tlv_header;
  11618. A_UINT32 vdev_id;
  11619. A_UINT32 mcc_tbttmode;
  11620. wmi_mac_addr mcc_bssid;
  11621. } wmi_vdev_mcc_set_tbtt_mode_cmd_fixed_param;
  11622.  
  11623. typedef struct {
  11624. A_UINT32 tlv_header;
  11625. A_UINT32 vdev_id; /* home vdev id */
  11626. A_UINT32 meas_token; /* from measure request frame */
  11627. A_UINT32 dialog_token;
  11628. A_UINT32 number_bursts; /* zero keep sending until cancel, bigger than 0 means times e.g. 1,2 */
  11629. A_UINT32 burst_interval; /* unit in mill seconds, interval between consecutive burst*/
  11630. A_UINT32 burst_cycle; /* times cycle through within one burst */
  11631. A_UINT32 tx_power; /* for path frame */
  11632. A_UINT32 off_duration; /* uint in mill seconds, channel off duraiton for path loss frame sending */
  11633. wmi_mac_addr dest_mac; /* multicast DA, for path loss frame */
  11634. A_UINT32 num_chans;
  11635. } wmi_vdev_plmreq_start_cmd_fixed_param;
  11636.  
  11637. typedef struct {
  11638. A_UINT32 tlv_header;
  11639. A_UINT32 vdev_id;
  11640. A_UINT32 meas_token; /* same value from req*/
  11641. } wmi_vdev_plmreq_stop_cmd_fixed_param;
  11642.  
  11643. typedef struct {
  11644. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_noa_cmd_fixed_param */
  11645. A_UINT32 tlv_header;
  11646. /* unique id identifying the VDEV, generated by the caller */
  11647. A_UINT32 vdev_id;
  11648. /* enable/disable NoA */
  11649. A_UINT32 enable;
  11650. /** number of NoA desc. In the TLV noa_descriptor[] */
  11651. A_UINT32 num_noa;
  11652. /**
  11653. * TLV (tag length value) paramerters follow the pattern structure.
  11654. * TLV contain NoA desc with num of num_noa
  11655. */
  11656. } wmi_p2p_set_noa_cmd_fixed_param;
  11657.  
  11658. typedef struct {
  11659. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_unit_test_cmd_fixed_param */
  11660. A_UINT32 tlv_header;
  11661. /* unique id identifying the VDEV, generated by the caller */
  11662. A_UINT32 vdev_id;
  11663. /* Identify the wlan module */
  11664. A_UINT32 module_id;
  11665. /* Num of test arguments passed */
  11666. A_UINT32 num_args;
  11667. /**
  11668. * TLV (tag length value) parameters follow the wmi_roam_chan_list
  11669. * structure. The TLV's are:
  11670. * A_UINT32 args[];
  11671. **/
  11672. } wmi_unit_test_cmd_fixed_param;
  11673.  
  11674. /** Roaming offload SYNCH_COMPLETE from host when host finished sync logic
  11675. * after it received WMI_ROAM_SYNCH_EVENTID.
  11676. */
  11677. typedef struct {
  11678. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_synch_complete_fixed_param */
  11679. /** unique id identifying the VDEV, generated by the caller */
  11680. A_UINT32 vdev_id;
  11681. } wmi_roam_synch_complete_fixed_param;
  11682.  
  11683.  
  11684. typedef enum {
  11685. RECOVERY_SIM_ASSERT = 0x01,
  11686. RECOVERY_SIM_NO_DETECT = 0x02,
  11687. RECOVERY_SIM_CTR_EP_FULL = 0x03,
  11688. RECOVERY_SIM_EMPTY_POINT = 0x04,
  11689. RECOVERY_SIM_STACK_OV = 0x05,
  11690. RECOVERY_SIM_INFINITE_LOOP = 0x06,
  11691. RECOVERY_SIM_PCIE_LINKDOWN = 0x07,
  11692. RECOVERY_SIM_SELF_RECOVERY = 0x08,
  11693. } RECOVERY_SIM_TYPE;
  11694.  
  11695. /* WMI_FORCE_FW_HANG_CMDID */
  11696. typedef struct {
  11697. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_FORCE_FW_HANG_CMD_fixed_param */
  11698. A_UINT32 type; /*0:unused 1: ASSERT, 2: not respond detect command,3: simulate ep-full(),4:...*/
  11699. A_UINT32 delay_time_ms; /*0xffffffff means the simulate will delay for random time (0 ~0xffffffff ms)*/
  11700. } WMI_FORCE_FW_HANG_CMD_fixed_param;
  11701.  
  11702. typedef enum {
  11703. WMI_MCAST_FILTER_SET = 1,
  11704. WMI_MCAST_FILTER_DELETE
  11705. } WMI_SET_SINGLE_MCAST_FILTER_OP;
  11706.  
  11707. typedef struct {
  11708. A_UINT32 tlv_header;
  11709. A_UINT32 vdev_id;
  11710. A_UINT32 index;
  11711. A_UINT32 action;
  11712. wmi_mac_addr mcastbdcastaddr;
  11713. } WMI_SET_MCASTBCAST_FILTER_CMD_fixed_param;
  11714.  
  11715. typedef enum {
  11716. WMI_MULTIPLE_MCAST_FILTER_CLEAR = 1, /* clear all previous mc list */
  11717. WMI_MULTIPLE_MCAST_FILTER_SET, /* clear all previous mc list, and set new list */
  11718. WMI_MULTIPLE_MCAST_FILTER_DELETE, /* delete one/multiple mc list */
  11719. WMI_MULTIPLE_MCAST_FILTER_ADD /* add one/multiple mc list */
  11720. } WMI_MULTIPLE_MCAST_FILTER_OP;
  11721.  
  11722. typedef struct {
  11723. A_UINT32 tlv_header;
  11724. A_UINT32 vdev_id;
  11725. A_UINT32 operation; /* refer WMI_MULTIPLE_MCAST_FILTER_OP */
  11726. A_UINT32 num_mcastaddrs; /* number of elements in the subsequent mcast addr list */
  11727. /**
  11728. * TLV (tag length value) parameters follow the
  11729. * structure. The TLV's are:
  11730. * wmi_mac_addr mcastaddr_list[num_mcastaddrs];
  11731. */
  11732. } WMI_SET_MULTIPLE_MCAST_FILTER_CMD_fixed_param;
  11733.  
  11734.  
  11735. /* WMI_DBGLOG_TIME_STAMP_SYNC_CMDID */
  11736. typedef enum {
  11737. WMI_TIME_STAMP_SYNC_MODE_MS, /* millisecond units */
  11738. WMI_TIME_STAMP_SYNC_MODE_US, /* microsecond units */
  11739. } WMI_TIME_STAMP_SYNC_MODE;
  11740.  
  11741. typedef struct {
  11742. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dbglog_time_stamp_sync_cmd_fixed_param */
  11743. A_UINT32 mode; /* 0: millisec, 1: microsec (see WMI_TIME_STAMP_SYNC_MODE) */
  11744. A_UINT32 time_stamp_low; /* lower 32 bits of remote time stamp */
  11745. A_UINT32 time_stamp_high; /* higher 32 bits of remote time stamp */
  11746. } WMI_DBGLOG_TIME_STAMP_SYNC_CMD_fixed_param;
  11747.  
  11748. /* GPIO Command and Event data structures */
  11749.  
  11750. /* WMI_GPIO_CONFIG_CMDID */
  11751. enum {
  11752. WMI_GPIO_PULL_NONE,
  11753. WMI_GPIO_PULL_UP,
  11754. WMI_GPIO_PULL_DOWN,
  11755. };
  11756.  
  11757. enum {
  11758. WMI_GPIO_INTTYPE_DISABLE,
  11759. WMI_GPIO_INTTYPE_RISING_EDGE,
  11760. WMI_GPIO_INTTYPE_FALLING_EDGE,
  11761. WMI_GPIO_INTTYPE_BOTH_EDGE,
  11762. WMI_GPIO_INTTYPE_LEVEL_LOW,
  11763. WMI_GPIO_INTTYPE_LEVEL_HIGH
  11764. };
  11765.  
  11766. typedef struct {
  11767. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_config_cmd_fixed_param */
  11768. A_UINT32 gpio_num; /* GPIO number to be setup */
  11769. A_UINT32 input; /* 0 - Output/ 1 - Input */
  11770. A_UINT32 pull_type; /* Pull type defined above */
  11771. A_UINT32 intr_mode; /* Interrupt mode defined above (Input) */
  11772. } wmi_gpio_config_cmd_fixed_param;
  11773.  
  11774. /* WMI_GPIO_OUTPUT_CMDID */
  11775. typedef struct {
  11776. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_output_cmd_fixed_param */
  11777. A_UINT32 gpio_num; /* GPIO number to be setup */
  11778. A_UINT32 set; /* Set the GPIO pin*/
  11779. } wmi_gpio_output_cmd_fixed_param;
  11780.  
  11781. /* WMI_GPIO_INPUT_EVENTID */
  11782. typedef struct {
  11783. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_input_event_fixed_param */
  11784. A_UINT32 gpio_num; /* GPIO number which changed state */
  11785. } wmi_gpio_input_event_fixed_param;
  11786.  
  11787. /* WMI_P2P_DISC_EVENTID */
  11788. enum {
  11789. P2P_DISC_SEARCH_PROB_REQ_HIT = 0, /* prob req hit the p2p find pattern */
  11790. P2P_DISC_SEARCH_PROB_RESP_HIT, /* prob resp hit the p2p find pattern */
  11791. };
  11792.  
  11793. enum {
  11794. P2P_DISC_MODE_SEARCH = 0, /* do search when p2p find offload*/
  11795. P2P_DISC_MODE_LISTEN, /* do listen when p2p find offload*/
  11796. P2P_DISC_MODE_AUTO, /* do listen and search when p2p find offload*/
  11797. };
  11798.  
  11799. enum {
  11800. P2P_DISC_PATTERN_TYPE_BSSID = 0, /* BSSID pattern */
  11801. P2P_DISC_PATTERN_TYPE_DEV_NAME, /* device name pattern */
  11802. };
  11803.  
  11804. typedef struct {
  11805. A_UINT32 vdev_id;
  11806. A_UINT32 reason; /* P2P DISC wake up reason*/
  11807. } wmi_p2p_disc_event;
  11808.  
  11809. typedef WMI_GTK_OFFLOAD_STATUS_EVENT_fixed_param WOW_EVENT_INFO_SECTION_GTKIGTK;
  11810.  
  11811. typedef enum {
  11812. WMI_FAKE_TXBFER_SEND_NDPA,
  11813. WMI_FAKE_TXBFER_SEND_MU,
  11814. WMI_FAKE_TXBFER_NDPA_FBTYPE,
  11815. WMI_FAKE_TXBFER_NDPA_NCIDX,
  11816. WMI_FAKE_TXBFER_NDPA_POLL,
  11817. WMI_FAKE_TXBFER_NDPA_BW,
  11818. WMI_FAKE_TXBFER_NDPA_PREAMBLE,
  11819. WMI_FAKE_TXBFER_NDPA_RATE,
  11820. WMI_FAKE_TXBFER_NDP_BW,
  11821. WMI_FAKE_TXBFER_NDP_NSS,
  11822. WMI_TXBFEE_ENABLE_UPLOAD_H,
  11823. WMI_TXBFEE_ENABLE_CAPTURE_H,
  11824. WMI_TXBFEE_SET_CBF_TBL,
  11825. WMI_TXBFEE_CBF_TBL_LSIG,
  11826. WMI_TXBFEE_CBF_TBL_SIGA1,
  11827. WMI_TXBFEE_CBF_TBL_SIGA2,
  11828. WMI_TXBFEE_CBF_TBL_SIGB,
  11829. WMI_TXBFEE_CBF_TBL_PAD,
  11830. WMI_TXBFEE_CBF_TBL_DUR,
  11831. WMI_TXBFEE_SU_NCIDX,
  11832. WMI_TXBFEE_CBIDX,
  11833. WMI_TXBFEE_NGIDX,
  11834. } WMI_TXBF_PARAM_ID;
  11835.  
  11836. typedef struct {
  11837. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_txbf_cmd_fixed_param */
  11838. /** parameter id */
  11839. A_UINT32 param_id;
  11840. /** parameter value */
  11841. A_UINT32 param_value;
  11842. } wmi_txbf_cmd_fixed_param;
  11843.  
  11844. typedef struct {
  11845. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_upload_h_hdr */
  11846. A_UINT32 h_length;
  11847. A_UINT32 cv_length;
  11848. /* This TLV is followed by array of bytes:
  11849. * A_UINT8 bufp[]; <-- h_cv info buffer
  11850. */
  11851. } wmi_upload_h_hdr;
  11852.  
  11853. typedef struct {
  11854. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_capture_h_event_hdr */
  11855. A_UINT32 svd_num;
  11856. A_UINT32 tone_num;
  11857. A_UINT32 reserved;
  11858. } wmi_capture_h_event_hdr;
  11859.  
  11860. typedef struct {
  11861. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_avoid_freq_range_desc */
  11862. A_UINT32 start_freq; /* start frequency, not channel center freq */
  11863. A_UINT32 end_freq; /* end frequency */
  11864. } wmi_avoid_freq_range_desc;
  11865.  
  11866. typedef struct {
  11867. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_avoid_freq_ranges_event_fixed_param */
  11868. /* bad channel range count, multi range is allowed, 0 means all channel clear */
  11869. A_UINT32 num_freq_ranges;
  11870.  
  11871. /* The TLVs will follow.
  11872. * multi range with num_freq_ranges, LTE advance multi carrier, CDMA,etc
  11873. * wmi_avoid_freq_range_desc avd_freq_range[]; <-- message buffer, NULL terminated
  11874. */
  11875. } wmi_avoid_freq_ranges_event_fixed_param;
  11876.  
  11877. typedef struct {
  11878. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gtk_rekey_fail_event_fixed_param */
  11879. /** Reserved for future use */
  11880. A_UINT32 reserved0;
  11881. A_UINT32 vdev_id;
  11882. } wmi_gtk_rekey_fail_event_fixed_param;
  11883.  
  11884.  
  11885. typedef enum WLAN_COEX_EVENT {
  11886. WLAN_COEX_EVENT_BT_NONE = 0,
  11887. WLAN_COEX_EVENT_BT_A2DP_PROFILE_ADD = 1,
  11888. WLAN_COEX_EVENT_BT_A2DP_PROFILE_REMOVE = 2,
  11889. WLAN_COEX_EVENT_BT_VOICE_PROFILE_ADD = 3,
  11890. WLAN_COEX_EVENT_BT_VOICE_PROFILE_REMOVE = 4,
  11891. WLAN_COEX_EVENT_BT_SCAN_START = 5,
  11892. WLAN_COEX_EVENT_BT_SCAN_STOP = 6,
  11893. }WLAN_COEX_EVENT;
  11894.  
  11895. typedef struct {
  11896. A_UINT32 tlv_header;
  11897. A_UINT32 coex_profile_evt; //uses the enum values form WLAN_COEX_EVENT
  11898. } wmi_coex_bt_activity_event_fixed_param;
  11899.  
  11900. enum wmm_ac_downgrade_policy {
  11901. WMM_AC_DOWNGRADE_DEPRIO,
  11902. WMM_AC_DOWNGRADE_DROP,
  11903. WMM_AC_DOWNGRADE_INVALID,
  11904. };
  11905.  
  11906. /* WMM EDCA Params type */
  11907. #define WMM_PARAM_TYPE_LEGACY 0
  11908. /* Relaxed EDCA parameters for 11ax to be used in case of triggered access */
  11909. #define WMM_PARAM_TYPE_11AX_EDCA 1
  11910.  
  11911. typedef struct {
  11912. A_UINT32 tlv_header;
  11913. A_UINT32 cwmin;
  11914. A_UINT32 cwmax;
  11915. A_UINT32 aifs;
  11916. union {
  11917. A_UINT32 txoplimit;
  11918. A_UINT32 mu_edca_timer;
  11919. };
  11920. A_UINT32 acm;
  11921. A_UINT32 no_ack;
  11922. } wmi_wmm_vparams;
  11923.  
  11924. typedef struct {
  11925. A_UINT32 tlv_header;
  11926. A_UINT32 vdev_id;
  11927. wmi_wmm_vparams wmm_params[4]; /* 0 be, 1 bk, 2 vi, 3 vo */
  11928. A_UINT32 wmm_param_type; /* see WMM_PARAM_TYPE_xxx defs */
  11929. } wmi_vdev_set_wmm_params_cmd_fixed_param;
  11930.  
  11931. typedef struct {
  11932. A_UINT32 tlv_header;
  11933. A_UINT32 vdev_id;
  11934. A_UINT32 gtxRTMask[2]; /* for HT and VHT rate masks */
  11935. A_UINT32 userGtxMask; /* host request for GTX mask */
  11936. A_UINT32 gtxPERThreshold; /* default: 10% */
  11937. A_UINT32 gtxPERMargin; /* default: 2% */
  11938. A_UINT32 gtxTPCstep; /* default: 1 */
  11939. A_UINT32 gtxTPCMin; /* default: 5 */
  11940. A_UINT32 gtxBWMask; /* 20/40/80/160 Mhz */
  11941. } wmi_vdev_set_gtx_params_cmd_fixed_param;
  11942.  
  11943. typedef struct
  11944. {
  11945. A_UINT32 tlv_header;
  11946. A_UINT32 vdev_id;
  11947. A_UINT32 ac;
  11948. A_UINT32 medium_time_us; /* per second unit, the Admitted time granted, unit in micro seconds */
  11949. A_UINT32 downgrade_type;
  11950. } wmi_vdev_wmm_addts_cmd_fixed_param;
  11951.  
  11952. typedef struct
  11953. {
  11954. A_UINT32 tlv_header;
  11955. A_UINT32 vdev_id;
  11956. A_UINT32 ac;
  11957. } wmi_vdev_wmm_delts_cmd_fixed_param;
  11958.  
  11959. /* DEPRECATED */
  11960. typedef struct {
  11961. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_dfs_enable_cmd_fixed_param */
  11962. /** Reserved for future use */
  11963. A_UINT32 reserved0;
  11964. } wmi_pdev_dfs_enable_cmd_fixed_param;
  11965.  
  11966. /* DEPRECATED */
  11967. typedef struct {
  11968. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_dfs_disable_cmd_fixed_param */
  11969. /** pdev_id for identifying the MAC
  11970. * See macros starting with WMI_PDEV_ID_ for values.
  11971. */
  11972. A_UINT32 pdev_id;
  11973. } wmi_pdev_dfs_disable_cmd_fixed_param;
  11974.  
  11975. typedef struct {
  11976. /** TLV tag and len; tag equals
  11977. * WMITLV_TAG_STRUC_wmi_dfs_phyerr_filter_ena_cmd_fixed_param
  11978. */
  11979. A_UINT32 tlv_header;
  11980.  
  11981. /** pdev_id for identifying the MAC
  11982. * See macros starting with WMI_PDEV_ID_ for values.
  11983. */
  11984. A_UINT32 pdev_id;
  11985. } wmi_dfs_phyerr_filter_ena_cmd_fixed_param;
  11986.  
  11987. typedef struct {
  11988. /** TLV tag and len; tag equals
  11989. * WMITLV_TAG_STRUC_wmi_dfs_phyerr_filter_dis_cmd_fixed_param
  11990. */
  11991. A_UINT32 tlv_header;
  11992. /** pdev_id for identifying the MAC
  11993. * See macros starting with WMI_PDEV_ID_ for values.
  11994. */
  11995. A_UINT32 pdev_id;
  11996. } wmi_dfs_phyerr_filter_dis_cmd_fixed_param;
  11997.  
  11998. typedef struct {
  11999. A_UINT32 tlv_header;
  12000. A_UINT32 pdev_id;
  12001. } wmi_pdev_dfs_phyerr_offload_enable_cmd_fixed_param;
  12002.  
  12003. typedef struct {
  12004. A_UINT32 tlv_header;
  12005. A_UINT32 pdev_id;
  12006. } wmi_pdev_dfs_phyerr_offload_disable_cmd_fixed_param;
  12007.  
  12008. typedef enum {
  12009. QUICK_OCAC = 0,
  12010. EXTENSIVE_OCAC,
  12011. } WMI_ADFS_OCAC_MODE;
  12012.  
  12013. typedef struct {
  12014. A_UINT32 tlv_header;
  12015. A_UINT32 vdev_id;
  12016. A_UINT32 ocac_mode; /* WMI_ADFS_OCAC_MODE */
  12017. A_UINT32 min_duration_ms; /* in milliseconds */
  12018. A_UINT32 max_duration_ms; /* in milliseconds */
  12019. A_UINT32 chan_freq; /* in MHz */
  12020. A_UINT32 chan_width; /* in MHz */
  12021. A_UINT32 center_freq; /* in MHz */
  12022. } wmi_vdev_adfs_ch_cfg_cmd_fixed_param;
  12023.  
  12024. typedef struct {
  12025. A_UINT32 tlv_header;
  12026. A_UINT32 vdev_id;
  12027. } wmi_vdev_adfs_ocac_abort_cmd_fixed_param;
  12028.  
  12029. typedef enum {
  12030. IN_SERVICE_MODE = 0,
  12031. OCAC_MODE,
  12032. } WMI_DFS_RADAR_DETECTION_MODE;
  12033.  
  12034. typedef struct {
  12035. A_UINT32 tlv_header;
  12036. A_UINT32 pdev_id;
  12037. /* In-service mode or O-CAC mode */
  12038. A_UINT32 detection_mode; /* WMI_DFS_RADAR_DETECTION_MODE */
  12039. A_UINT32 chan_freq; /* in MHz */
  12040. A_UINT32 chan_width; /* in MHz */
  12041. A_UINT32 detector_id;
  12042. A_UINT32 segment_id;
  12043. A_UINT32 timestamp;
  12044. A_UINT32 is_chirp;
  12045. A_INT32 freq_offset; /* in MHz */
  12046. A_INT32 sidx; /* segment index (where was the radar within the channel) */
  12047. } wmi_pdev_dfs_radar_detection_event_fixed_param;
  12048.  
  12049. typedef enum {
  12050. OCAC_COMPLETE = 0,
  12051. OCAC_ABORT,
  12052. } WMI_VDEV_OCAC_COMPLETE_STATUS;
  12053.  
  12054. typedef struct {
  12055. A_UINT32 tlv_header;
  12056. A_UINT32 vdev_id;
  12057. A_UINT32 chan_freq; /* in MHz */
  12058. A_UINT32 chan_width; /* in MHz */
  12059. A_UINT32 center_freq; /* in MHz */
  12060. A_UINT32 status; /* WMI_VDEV_OCAC_COMPLETE_STATUS */
  12061. } wmi_vdev_adfs_ocac_complete_event_fixed_param;
  12062.  
  12063. typedef struct {
  12064. A_UINT32 tlv_header;
  12065. A_UINT32 vdev_id;
  12066. } wmi_vdev_dfs_cac_complete_event_fixed_param;
  12067.  
  12068.  
  12069. /** TDLS COMMANDS */
  12070.  
  12071. /* WMI_TDLS_SET_STATE_CMDID */
  12072. /* TDLS State */
  12073. enum wmi_tdls_state {
  12074. /** TDLS disable */
  12075. WMI_TDLS_DISABLE,
  12076. /** TDLS enabled - no firmware connection tracking/notifications */
  12077. WMI_TDLS_ENABLE_PASSIVE,
  12078. /** TDLS enabled - with firmware connection tracking/notifications */
  12079. WMI_TDLS_ENABLE_ACTIVE,
  12080. /** TDLS enabled - firmware waits for peer mac for connection tracking */
  12081. WMI_TDLS_ENABLE_ACTIVE_EXTERNAL_CONTROL,
  12082. /** TDLS enabled - TDLS connection tracking is done in host */
  12083. WMI_TDLS_ENABLE_CONNECTION_TRACKER_IN_HOST,
  12084. };
  12085.  
  12086. /* TDLS Options */
  12087. #define WMI_TDLS_OFFCHAN_EN (1 << 0) /** TDLS Off Channel support */
  12088. #define WMI_TDLS_BUFFER_STA_EN (1 << 1) /** TDLS Buffer STA support */
  12089. #define WMI_TDLS_SLEEP_STA_EN (1 << 2) /** TDLS Sleep STA support (not currently supported) */
  12090.  
  12091. typedef struct {
  12092. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_set_state_cmd_fixed_param */
  12093. A_UINT32 tlv_header;
  12094. /** unique id identifying the VDEV */
  12095. A_UINT32 vdev_id;
  12096. /** Enable/Disable TDLS (wmi_tdls_state) */
  12097. A_UINT32 state;
  12098. /** Duration (in ms) over which to calculate tx/rx threshold to trigger TDLS Discovery */
  12099. A_UINT32 notification_interval_ms;
  12100. /** number of packets OVER which notify/suggest TDLS Discovery:
  12101. * if current tx pps counter / notification interval >= threshold
  12102. * then a notification will be sent to host to advise TDLS Discovery */
  12103. A_UINT32 tx_discovery_threshold;
  12104. /** number of packets UNDER which notify/suggest TDLS Teardown:
  12105. * if current tx pps counter / notification interval < threshold
  12106. * then a notification will be sent to host to advise TDLS Tear down */
  12107. A_UINT32 tx_teardown_threshold;
  12108. /** Absolute RSSI value under which notify/suggest TDLS Teardown */
  12109. A_INT32 rssi_teardown_threshold;
  12110. /** Peer RSSI < (AP RSSI + delta) will trigger a teardown */
  12111. A_INT32 rssi_delta;
  12112. /** TDLS Option Control
  12113. * Off-Channel, Buffer STA, (later)Sleep STA support */
  12114. A_UINT32 tdls_options;
  12115. /* Buffering time in number of beacon intervals */
  12116. A_UINT32 tdls_peer_traffic_ind_window;
  12117. /* Wait time for PTR frame */
  12118. A_UINT32 tdls_peer_traffic_response_timeout_ms;
  12119. /* Self PUAPSD mask */
  12120. A_UINT32 tdls_puapsd_mask;
  12121. /* Inactivity timeout */
  12122. A_UINT32 tdls_puapsd_inactivity_time_ms;
  12123. /* Max of rx frame during SP */
  12124. A_UINT32 tdls_puapsd_rx_frame_threshold;
  12125. /**Duration (in ms) over which to check whether TDLS link needs to be torn down */
  12126. A_UINT32 teardown_notification_ms;
  12127. /**STA kickout threshold for TDLS peer */
  12128. A_UINT32 tdls_peer_kickout_threshold;
  12129. } wmi_tdls_set_state_cmd_fixed_param;
  12130.  
  12131. /* WMI_TDLS_PEER_UPDATE_CMDID */
  12132.  
  12133. enum wmi_tdls_peer_state {
  12134. /** tx peer TDLS link setup now starting, traffic to DA should be
  12135. * paused (except TDLS frames) until state is moved to CONNECTED (or
  12136. * TEARDOWN on setup failure) */
  12137. WMI_TDLS_PEER_STATE_PEERING,
  12138. /** tx peer TDLS link established, running (all traffic to DA unpaused) */
  12139. WMI_TDLS_PEER_STATE_CONNECTED,
  12140. /** tx peer TDLS link tear down started (link paused, any frames
  12141. * queued for DA will be requeued back through the AP)*/
  12142. WMI_TDLS_PEER_STATE_TEARDOWN,
  12143. /** Add peer mac into connection table */
  12144. WMI_TDLS_PEER_ADD_MAC_ADDR,
  12145. /** Remove peer mac from connection table */
  12146. WMI_TDLS_PEER_REMOVE_MAC_ADDR,
  12147. };
  12148.  
  12149. /* NB: These defines are fixed, and cannot be changed without breaking WMI compatibility */
  12150. #define WMI_TDLS_MAX_SUPP_CHANNELS 128
  12151. #define WMI_TDLS_MAX_SUPP_OPER_CLASSES 32
  12152. typedef struct {
  12153. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_capabilities */
  12154. A_UINT32 tlv_header;
  12155. /* Peer's QoS Info - for U-APSD */
  12156. /* AC FLAGS - accessed through macros below */
  12157. /* Ack, SP, More Data Ack - accessed through macros below */
  12158. A_UINT32 peer_qos;
  12159. /*TDLS Peer's U-APSD Buffer STA Support*/
  12160. A_UINT32 buff_sta_support;
  12161. /*TDLS off channel related params */
  12162. A_UINT32 off_chan_support;
  12163. A_UINT32 peer_curr_operclass;
  12164. A_UINT32 self_curr_operclass;
  12165. /* Number of channels available for off channel operation */
  12166. A_UINT32 peer_chan_len;
  12167. A_UINT32 peer_operclass_len;
  12168. A_UINT8 peer_operclass[WMI_TDLS_MAX_SUPP_OPER_CLASSES];
  12169. /* Is peer initiator or responder of TDLS setup request */
  12170. A_UINT32 is_peer_responder;
  12171. /* Preferred off channel number as configured by user */
  12172. A_UINT32 pref_offchan_num;
  12173. /* Preferred off channel bandwidth as configured by user */
  12174. A_UINT32 pref_offchan_bw;
  12175.  
  12176. /** Followed by the variable length TLV peer_chan_list:
  12177. * wmi_channel peer_chan_list[].
  12178. * Array size would be peer_chan_len.
  12179. * This array is intersected channels which is supported by both peer
  12180. * and DUT. freq1 in chan_info shall be same as mhz, freq2 shall be 0.
  12181. * FW shall compute BW for an offchan based on peer's ht/vht cap
  12182. * received in peer_assoc cmd during change STA operation
  12183. */
  12184. } wmi_tdls_peer_capabilities;
  12185.  
  12186. #define WMI_TDLS_QOS_VO_FLAG 0
  12187. #define WMI_TDLS_QOS_VI_FLAG 1
  12188. #define WMI_TDLS_QOS_BK_FLAG 2
  12189. #define WMI_TDLS_QOS_BE_FLAG 3
  12190. #define WMI_TDLS_QOS_ACK_FLAG 4
  12191. #define WMI_TDLS_QOS_SP_FLAG 5
  12192. #define WMI_TDLS_QOS_MOREDATA_FLAG 7
  12193.  
  12194. #define WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps,flag) do { \
  12195. (ppeer_caps)->peer_qos |= (1 << flag); \
  12196. } while (0)
  12197. #define WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps,flag) \
  12198. (((ppeer_caps)->peer_qos & (1 << flag)) >> flag)
  12199.  
  12200. #define WMI_SET_TDLS_PEER_VO_UAPSD(ppeer_caps) \
  12201. WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VO_FLAG)
  12202. #define WMI_GET_TDLS_PEER_VO_UAPSD(ppeer_caps) \
  12203. WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VO_FLAG)
  12204. #define WMI_SET_TDLS_PEER_VI_UAPSD(ppeer_caps) \
  12205. WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VI_FLAG)
  12206. #define WMI_GET_TDLS_PEER_VI_UAPSD(ppeer_caps) \
  12207. WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VI_FLAG)
  12208. #define WMI_SET_TDLS_PEER_BK_UAPSD(ppeer_caps) \
  12209. WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BK_FLAG)
  12210. #define WMI_GET_TDLS_PEER_BK_UAPSD(ppeer_caps) \
  12211. WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BK_FLAG)
  12212. #define WMI_SET_TDLS_PEER_BE_UAPSD(ppeer_caps) \
  12213. WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BE_FLAG)
  12214. #define WMI_GET_TDLS_PEER_BE_UAPSD(ppeer_caps) \
  12215. WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BE_FLAG)
  12216. #define WMI_SET_TDLS_PEER_ACK_UAPSD(ppeer_caps) \
  12217. WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_ACK_FLAG)
  12218. #define WMI_GET_TDLS_PEER_ACK_UAPSD(ppeer_caps) \
  12219. WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_ACK_FLAG)
  12220. /* SP has 2 bits */
  12221. #define WMI_SET_TDLS_PEER_SP_UAPSD(ppeer_caps,val) do { \
  12222. (ppeer_caps)->peer_qos |= (((val) & 0x3) << WMI_TDLS_QOS_SP_FLAG); \
  12223. } while (0)
  12224. #define WMI_GET_TDLS_PEER_SP_UAPSD(ppeer_caps) \
  12225. (((ppeer_caps)->peer_qos & (0x3 << WMI_TDLS_QOS_SP_FLAG)) >> WMI_TDLS_QOS_SP_FLAG)
  12226.  
  12227. #define WMI_SET_TDLS_PEER_MORE_DATA_ACK_UAPSD(ppeer_caps) \
  12228. WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_MOREDATA_FLAG)
  12229. #define WMI_GET_TDLS_PEER_MORE_DATA_ACK_UAPSD(ppeer_caps) \
  12230. WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_MOREDATA_FLAG)
  12231.  
  12232.  
  12233. #define WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd,flag) do { \
  12234. (pset_cmd)->tdls_puapsd_mask |= (1 << flag); \
  12235. } while (0)
  12236. #define WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd,flag) \
  12237. (((pset_cmd)->tdls_puapsd_mask & (1 << flag)) >> flag)
  12238.  
  12239. #define WMI_SET_TDLS_SELF_VO_UAPSD(pset_cmd) \
  12240. WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VO_FLAG)
  12241. #define WMI_GET_TDLS_SELF_VO_UAPSD(pset_cmd) \
  12242. WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VO_FLAG)
  12243. #define WMI_SET_TDLS_SELF_VI_UAPSD(pset_cmd) \
  12244. WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VI_FLAG)
  12245. #define WMI_GET_TDLS_SELF_VI_UAPSD(pset_cmd) \
  12246. WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VI_FLAG)
  12247. #define WMI_SET_TDLS_SELF_BK_UAPSD(pset_cmd) \
  12248. WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BK_FLAG)
  12249. #define WMI_GET_TDLS_SELF__BK_UAPSD(pset_cmd) \
  12250. WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BK_FLAG)
  12251. #define WMI_SET_TDLS_SELF_BE_UAPSD(pset_cmd) \
  12252. WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BE_FLAG)
  12253. #define WMI_GET_TDLS_SELF_BE_UAPSD(pset_cmd) \
  12254. WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BE_FLAG)
  12255. #define WMI_SET_TDLS_SELF_ACK_UAPSD(pset_cmd) \
  12256. WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_ACK_FLAG)
  12257. #define WMI_GET_TDLS_SELF_ACK_UAPSD(pset_cmd) \
  12258. WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_ACK_FLAG)
  12259. /* SP has 2 bits */
  12260. #define WMI_SET_TDLS_SELF_SP_UAPSD(pset_cmd,val) do { \
  12261. (pset_cmd)->tdls_puapsd_mask |= (((val) & 0x3) << WMI_TDLS_QOS_SP_FLAG); \
  12262. } while (0)
  12263. #define WMI_GET_TDLS_SELF_SP_UAPSD(pset_cmd) \
  12264. (((pset_cmd)->tdls_puapsd_mask & (0x3 << WMI_TDLS_QOS_SP_FLAG)) >> WMI_TDLS_QOS_SP_FLAG)
  12265.  
  12266. #define WMI_SET_TDLS_SELF_MORE_DATA_ACK_UAPSD(pset_cmd) \
  12267. WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_MOREDATA_FLAG)
  12268. #define WMI_GET_TDLS_SELF_MORE_DATA_ACK_UAPSD(pset_cmd) \
  12269. WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_MOREDATA_FLAG)
  12270.  
  12271.  
  12272. typedef struct {
  12273. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_update_cmd_fixed_param */
  12274. A_UINT32 tlv_header;
  12275. /** unique id identifying the VDEV */
  12276. A_UINT32 vdev_id;
  12277. /** peer MAC address */
  12278. wmi_mac_addr peer_macaddr;
  12279. /** new TDLS state for peer (wmi_tdls_peer_state) */
  12280. A_UINT32 peer_state;
  12281. /* The TLV for wmi_tdls_peer_capabilities will follow.
  12282. * wmi_tdls_peer_capabilities peer_caps;
  12283. */
  12284. /** Followed by the variable length TLV chan_info:
  12285. * wmi_channel chan_info[] */
  12286. } wmi_tdls_peer_update_cmd_fixed_param;
  12287.  
  12288. /* WMI_TDLS_SET_OFFCHAN_MODE_CMDID */
  12289.  
  12290.  
  12291. /* bitmap 20, 40, 80 or 160 MHz wide channel */
  12292. #define WMI_TDLS_OFFCHAN_20MHZ 0x1 /* 20 MHz wide channel */
  12293. #define WMI_TDLS_OFFCHAN_40MHZ 0x2 /* 40 MHz wide channel */
  12294. #define WMI_TDLS_OFFCHAN_80MHZ 0x4 /* 80 MHz wide channel */
  12295. #define WMI_TDLS_OFFCHAN_160MHZ 0x8 /* 160 MHz wide channel */
  12296.  
  12297.  
  12298. enum wmi_tdls_offchan_mode {
  12299. WMI_TDLS_ENABLE_OFFCHANNEL,
  12300. WMI_TDLS_DISABLE_OFFCHANNEL
  12301. };
  12302.  
  12303. typedef struct {
  12304. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_set_offchan_mode_cmd_fixed_param */
  12305. A_UINT32 tlv_header;
  12306. /** unique id identifying the VDEV */
  12307. A_UINT32 vdev_id;
  12308. /** Enable/Disable TDLS offchannel */
  12309. A_UINT32 offchan_mode;
  12310. /** peer MAC address */
  12311. wmi_mac_addr peer_macaddr;
  12312. /* Is peer initiator or responder of TDLS setup request */
  12313. A_UINT32 is_peer_responder;
  12314. /* off channel number*/
  12315. A_UINT32 offchan_num;
  12316. /* off channel bandwidth bitmap, e.g. WMI_OFFCHAN_20MHZ */
  12317. A_UINT32 offchan_bw_bitmap;
  12318. /* operating class for offchan */
  12319. A_UINT32 offchan_oper_class;
  12320. } wmi_tdls_set_offchan_mode_cmd_fixed_param;
  12321.  
  12322.  
  12323. /** TDLS EVENTS */
  12324. enum wmi_tdls_peer_notification {
  12325. /** tdls discovery recommended for peer (based
  12326. * on tx bytes per second > tx_discover threshold) */
  12327. WMI_TDLS_SHOULD_DISCOVER,
  12328. /** tdls link tear down recommended for peer
  12329. * due to tx bytes per second below tx_teardown_threshold
  12330. * NB: this notification sent once */
  12331. WMI_TDLS_SHOULD_TEARDOWN,
  12332. /** tx peer TDLS link tear down complete */
  12333. WMI_TDLS_PEER_DISCONNECTED,
  12334. /** TDLS/BT role change notification for connection tracker */
  12335. WMI_TDLS_CONNECTION_TRACKER_NOTIFICATION,
  12336. };
  12337.  
  12338. enum wmi_tdls_peer_reason {
  12339. /** tdls teardown recommended due to low transmits */
  12340. WMI_TDLS_TEARDOWN_REASON_TX,
  12341. /** tdls link tear down recommended due to poor RSSI */
  12342. WMI_TDLS_TEARDOWN_REASON_RSSI,
  12343. /** tdls link tear down recommended due to offchannel scan */
  12344. WMI_TDLS_TEARDOWN_REASON_SCAN,
  12345. /** tdls peer disconnected due to peer deletion */
  12346. WMI_TDLS_DISCONNECTED_REASON_PEER_DELETE,
  12347. /** tdls peer disconnected due to PTR timeout */
  12348. WMI_TDLS_TEARDOWN_REASON_PTR_TIMEOUT,
  12349. /** tdls peer disconnected due wrong PTR format */
  12350. WMI_TDLS_TEARDOWN_REASON_BAD_PTR,
  12351. /** tdls peer not responding */
  12352. WMI_TDLS_TEARDOWN_REASON_NO_RESPONSE,
  12353. /** tdls entered buffer STA role, TDLS connection tracker needs to handle this */
  12354. WMI_TDLS_ENTER_BUF_STA,
  12355. /** tdls exited buffer STA role, TDLS connection tracker needs to handle this */
  12356. WMI_TDLS_EXIT_BUF_STA,
  12357. /** BT entered busy mode, TDLS connection tracker needs to handle this */
  12358. WMI_TDLS_ENTER_BT_BUSY_MODE,
  12359. /** BT exited busy mode, TDLS connection tracker needs to handle this */
  12360. WMI_TDLS_EXIT_BT_BUSY_MODE,
  12361. /** TDLS module received a scan start event, TDLS connection tracker needs to handle this */
  12362. WMI_TDLS_SCAN_STARTED_EVENT,
  12363. /** TDLS module received a scan complete event, TDLS connection tracker needs to handle this */
  12364. WMI_TDLS_SCAN_COMPLETED_EVENT,
  12365. };
  12366.  
  12367. /* WMI_TDLS_PEER_EVENTID */
  12368. typedef struct {
  12369. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_event_fixed_param */
  12370. A_UINT32 tlv_header;
  12371. /** peer MAC address */
  12372. wmi_mac_addr peer_macaddr;
  12373. /** TDLS peer status (wmi_tdls_peer_notification)*/
  12374. A_UINT32 peer_status;
  12375. /** TDLS peer reason (wmi_tdls_peer_reason) */
  12376. A_UINT32 peer_reason;
  12377. /** unique id identifying the VDEV */
  12378. A_UINT32 vdev_id;
  12379. } wmi_tdls_peer_event_fixed_param;
  12380.  
  12381. /* NOTE: wmi_vdev_mcc_bcn_intvl_change_event_fixed_param would be deprecated. Please
  12382. don't use this for any new implementations */
  12383. typedef struct {
  12384. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_mcc_bcn_intvl_change_event_fixed_param */
  12385. /** unique id identifying the VDEV, generated by the caller */
  12386. A_UINT32 vdev_id;
  12387. /* New beacon interval to be used for the specified VDEV suggested by firmware */
  12388. A_UINT32 new_bcn_intvl;
  12389. } wmi_vdev_mcc_bcn_intvl_change_event_fixed_param;
  12390.  
  12391. /* WMI_RESMGR_ADAPTIVE_OCS_ENABLE_DISABLE_CMDID */
  12392. typedef struct {
  12393. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_adaptive_ocs_enable_disable_cmd_fixed_param */
  12394. A_UINT32 tlv_header;
  12395. /** 1: enable fw based adaptive ocs,
  12396. * 0: disable fw based adaptive ocs
  12397. */
  12398. A_UINT32 enable;
  12399. /** This field contains the MAC identifier in order to lookup the appropriate OCS instance. */
  12400. union {
  12401. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  12402. /** pdev_id for identifying the MAC
  12403. * See macros starting with WMI_PDEV_ID_ for values.
  12404. */
  12405. A_UINT32 pdev_id;
  12406. };
  12407. } wmi_resmgr_adaptive_ocs_enable_disable_cmd_fixed_param;
  12408.  
  12409. /* WMI_RESMGR_SET_CHAN_TIME_QUOTA_CMDID */
  12410. typedef struct {
  12411. /* Frequency of the channel for which the quota is set */
  12412. A_UINT32 chan_mhz;
  12413. /* Requested channel time quota expressed as percentage */
  12414. A_UINT32 channel_time_quota;
  12415. } wmi_resmgr_chan_time_quota;
  12416.  
  12417. typedef struct {
  12418. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_set_chan_time_quota_cmd_fixed_param */
  12419. A_UINT32 tlv_header;
  12420. /** number of channel time quota command structures
  12421. * (wmi_resmgr_chan_time_quota) 1 or 2
  12422. */
  12423. A_UINT32 num_chans;
  12424. /* This TLV is followed by another TLV of array of bytes
  12425. * A_UINT8 data[];
  12426. * This data array contains
  12427. * num_chans * size of(struct wmi_resmgr_chan_time_quota)
  12428. */
  12429. } wmi_resmgr_set_chan_time_quota_cmd_fixed_param;
  12430.  
  12431. /* WMI_RESMGR_SET_CHAN_LATENCY_CMDID */
  12432. typedef struct {
  12433. /* Frequency of the channel for which the latency is set */
  12434. A_UINT32 chan_mhz;
  12435. /* Requested channel latency in milliseconds */
  12436. A_UINT32 latency;
  12437. } wmi_resmgr_chan_latency;
  12438.  
  12439. typedef struct {
  12440. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_set_chan_latency_cmd_fixed_param */
  12441. A_UINT32 tlv_header;
  12442. /** number of channel latency command structures
  12443. * (wmi_resmgr_chan_latency) 1 or 2
  12444. */
  12445. A_UINT32 num_chans;
  12446. /* This TLV is followed by another TLV of array of bytes
  12447. * A_UINT8 data[];
  12448. * This data array contains
  12449. * num_chans * size of(struct wmi_resmgr_chan_latency)
  12450. */
  12451. } wmi_resmgr_set_chan_latency_cmd_fixed_param;
  12452.  
  12453. /* WMI_STA_SMPS_FORCE_MODE_CMDID */
  12454.  
  12455. /** STA SMPS Forced Mode */
  12456. typedef enum {
  12457. WMI_SMPS_FORCED_MODE_NONE = 0,
  12458. WMI_SMPS_FORCED_MODE_DISABLED,
  12459. WMI_SMPS_FORCED_MODE_STATIC,
  12460. WMI_SMPS_FORCED_MODE_DYNAMIC
  12461. } wmi_sta_smps_forced_mode;
  12462.  
  12463. typedef struct {
  12464. /** TLV tag and len; tag equals
  12465. * WMITLV_TAG_STRUC_wmi_sta_smps_force_mode_cmd_fixed_param */
  12466. A_UINT32 tlv_header;
  12467. /** Unique id identifying the VDEV */
  12468. A_UINT32 vdev_id;
  12469. /** The mode of SMPS that is to be forced in the FW. */
  12470. A_UINT32 forced_mode;
  12471. } wmi_sta_smps_force_mode_cmd_fixed_param;
  12472.  
  12473. /** wlan HB commands */
  12474. #define WMI_WLAN_HB_ITEM_UDP 0x1
  12475. #define WMI_WLAN_HB_ITEM_TCP 0x2
  12476. #define WMI_WLAN_HB_MAX_FILTER_SIZE 32 /* should be equal to WLAN_HB_MAX_FILTER_SIZE,
  12477. must be a multiple of 4 bytes */
  12478.  
  12479. typedef struct {
  12480. /** TLV tag and len; tag equals
  12481. * WMITLV_TAG_STRUC_wmi_hb_set_enable_cmd_fixed_param */
  12482. A_UINT32 tlv_header;
  12483. A_UINT32 vdev_id;
  12484. A_UINT32 enable;
  12485. A_UINT32 item;
  12486. A_UINT32 session;
  12487. } wmi_hb_set_enable_cmd_fixed_param;
  12488.  
  12489. typedef struct {
  12490. /** TLV tag and len; tag equals
  12491. * WMITLV_TAG_STRUC_wmi_hb_set_tcp_params_cmd_fixed_param */
  12492. A_UINT32 tlv_header;
  12493. A_UINT32 vdev_id;
  12494. A_UINT32 srv_ip;
  12495. A_UINT32 dev_ip;
  12496. A_UINT32 seq;
  12497. A_UINT32 src_port;
  12498. A_UINT32 dst_port;
  12499. A_UINT32 interval;
  12500. A_UINT32 timeout;
  12501. A_UINT32 session;
  12502. wmi_mac_addr gateway_mac;
  12503. } wmi_hb_set_tcp_params_cmd_fixed_param;
  12504.  
  12505. typedef struct {
  12506. /** TLV tag and len; tag equals
  12507. * WMITLV_TAG_STRUC_wmi_hb_set_tcp_pkt_filter_cmd_fixed_param */
  12508. A_UINT32 tlv_header;
  12509. A_UINT32 vdev_id;
  12510. A_UINT32 length;
  12511. A_UINT32 offset;
  12512. A_UINT32 session;
  12513. A_UINT8 filter[WMI_WLAN_HB_MAX_FILTER_SIZE];
  12514. } wmi_hb_set_tcp_pkt_filter_cmd_fixed_param;
  12515.  
  12516. typedef struct {
  12517. /** TLV tag and len; tag equals
  12518. * WMITLV_TAG_STRUC_wmi_hb_set_udp_params_cmd_fixed_param */
  12519. A_UINT32 tlv_header;
  12520. A_UINT32 vdev_id;
  12521. A_UINT32 srv_ip;
  12522. A_UINT32 dev_ip;
  12523. A_UINT32 src_port;
  12524. A_UINT32 dst_port;
  12525. A_UINT32 interval;
  12526. A_UINT32 timeout;
  12527. A_UINT32 session;
  12528. wmi_mac_addr gateway_mac;
  12529. } wmi_hb_set_udp_params_cmd_fixed_param;
  12530.  
  12531. typedef struct {
  12532. /** TLV tag and len; tag equals
  12533. * WMITLV_TAG_STRUC_wmi_hb_set_udp_pkt_filter_cmd_fixed_param */
  12534. A_UINT32 tlv_header;
  12535. A_UINT32 vdev_id;
  12536. A_UINT32 length;
  12537. A_UINT32 offset;
  12538. A_UINT32 session;
  12539. A_UINT8 filter[WMI_WLAN_HB_MAX_FILTER_SIZE];
  12540. } wmi_hb_set_udp_pkt_filter_cmd_fixed_param;
  12541.  
  12542. /** wlan HB events */
  12543. typedef enum {
  12544. WMI_WLAN_HB_REASON_UNKNOWN = 0,
  12545. WMI_WLAN_HB_REASON_TCP_TIMEOUT = 1,
  12546. WMI_WLAN_HB_REASON_UDP_TIMEOUT = 2,
  12547. } WMI_HB_WAKEUP_REASON;
  12548.  
  12549. typedef struct {
  12550. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_hb_ind_event_fixed_param */
  12551. A_UINT32 vdev_id; /* unique id identifying the VDEV */
  12552. A_UINT32 session; /* Session ID from driver */
  12553. A_UINT32 reason; /* wakeup reason */
  12554. } wmi_hb_ind_event_fixed_param;
  12555.  
  12556. /** WMI_STA_SMPS_PARAM_CMDID */
  12557. typedef enum {
  12558. /** RSSI threshold to enter Dynamic SMPS mode from inactive mode */
  12559. WMI_STA_SMPS_PARAM_UPPER_RSSI_THRESH = 0,
  12560. /** RSSI threshold to enter Stalled-D-SMPS mode from D-SMPS mode or
  12561. * to enter D-SMPS mode from Stalled-D-SMPS mode */
  12562. WMI_STA_SMPS_PARAM_STALL_RSSI_THRESH = 1,
  12563. /** RSSI threshold to disable SMPS modes */
  12564. WMI_STA_SMPS_PARAM_LOWER_RSSI_THRESH = 2,
  12565. /** Upper threshold for beacon-RSSI. Used to reduce RX chainmask. */
  12566. WMI_STA_SMPS_PARAM_UPPER_BRSSI_THRESH = 3,
  12567. /** Lower threshold for beacon-RSSI. Used to increase RX chainmask. */
  12568. WMI_STA_SMPS_PARAM_LOWER_BRSSI_THRESH = 4,
  12569. /** Enable/Disable DTIM 1chRx feature */
  12570. WMI_STA_SMPS_PARAM_DTIM_1CHRX_ENABLE = 5
  12571. } wmi_sta_smps_param;
  12572.  
  12573. typedef struct {
  12574. /** TLV tag and len; tag equals
  12575. * WMITLV_TAG_STRUC_wmi_sta_smps_param_cmd_fixed_param */
  12576. A_UINT32 tlv_header;
  12577. /** Unique id identifying the VDEV */
  12578. A_UINT32 vdev_id;
  12579. /** SMPS parameter (see wmi_sta_smps_param) */
  12580. A_UINT32 param;
  12581. /** Value of SMPS parameter */
  12582. A_UINT32 value;
  12583. } wmi_sta_smps_param_cmd_fixed_param;
  12584.  
  12585. typedef struct {
  12586. /** TLV tag and len; tag equals
  12587. * WMITLV_TAG_STRUC_wmi_mcc_sched_sta_traffic_stats */
  12588. A_UINT32 tlv_header;
  12589. /* TX stats */
  12590. A_UINT32 txBytesPushed;
  12591. A_UINT32 txPacketsPushed;
  12592. /* RX stats */
  12593. A_UINT32 rxBytesRcvd;
  12594. A_UINT32 rxPacketsRcvd;
  12595. A_UINT32 rxTimeTotal;
  12596. /** peer MAC address */
  12597. wmi_mac_addr peer_macaddr;
  12598. } wmi_mcc_sched_sta_traffic_stats;
  12599.  
  12600. typedef struct {
  12601. /** TLV tag and len; tag equals
  12602. * WMITLV_TAG_STRUC_wmi_mcc_sched_traffic_stats_cmd_fixed_param */
  12603. A_UINT32 tlv_header;
  12604. /** Duration over which the host stats were collected */
  12605. A_UINT32 duration;
  12606. /** Number of stations filled in following stats array */
  12607. A_UINT32 num_sta;
  12608. /* Following this struct are the TLVs:
  12609. * wmi_mcc_sched_sta_traffic_stats mcc_sched_sta_traffic_stats_list;
  12610. */
  12611. } wmi_mcc_sched_traffic_stats_cmd_fixed_param;
  12612.  
  12613. typedef struct
  12614. {
  12615. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_enable_cmd_fixed_param */
  12616. /* unique id identifying the VDEV, generated by the caller */
  12617. A_UINT32 vdev_id;
  12618. /*Batch scan enable command parameters*/
  12619. A_UINT32 scanInterval;
  12620. A_UINT32 numScan2Batch;
  12621. A_UINT32 bestNetworks;
  12622. A_UINT32 rfBand;
  12623. A_UINT32 rtt;
  12624. } wmi_batch_scan_enable_cmd_fixed_param;
  12625.  
  12626. typedef struct
  12627. {
  12628. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_enabled_event_fixed_param */
  12629. A_UINT32 supportedMscan;
  12630. } wmi_batch_scan_enabled_event_fixed_param;
  12631.  
  12632. typedef struct
  12633. {
  12634. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_disable_cmd_fixed_param */
  12635. /* unique id identifying the VDEV, generated by the caller */
  12636. A_UINT32 vdev_id;
  12637. A_UINT32 param;
  12638. } wmi_batch_scan_disable_cmd_fixed_param;
  12639.  
  12640. typedef struct
  12641. {
  12642. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_trigger_result_cmd_fixed_param */
  12643. /** unique id identifying the VDEV, generated by the caller */
  12644. A_UINT32 vdev_id;
  12645. A_UINT32 param;
  12646. } wmi_batch_scan_trigger_result_cmd_fixed_param;
  12647.  
  12648. typedef struct
  12649. {
  12650. A_UINT32 tlv_header;
  12651. wmi_mac_addr bssid; /* BSSID */
  12652. wmi_ssid ssid; /* SSID */
  12653. A_UINT32 ch; /* Channel */
  12654. A_UINT32 rssi; /* RSSI or Level */
  12655. /* Timestamp when Network was found. Used to calculate age based on timestamp in GET_RSP msg header */
  12656. A_UINT32 timestamp;
  12657. } wmi_batch_scan_result_network_info;
  12658.  
  12659. typedef struct
  12660. {
  12661. A_UINT32 tlv_header;
  12662. A_UINT32 scanId; /* Scan List ID. */
  12663. /* No of AP in a Scan Result. Should be same as bestNetwork in SET_REQ msg */
  12664. A_UINT32 numNetworksInScanList;
  12665. A_UINT32 netWorkStartIndex; /* indicate the start index of network info*/
  12666. } wmi_batch_scan_result_scan_list;
  12667.  
  12668. #define LPI_IE_BITMAP_BSSID 0x00000001 /* if this bit is set, bssid of the scan response frame is sent as the first IE in the data buffer sent to LOWI LP. */
  12669. #define LPI_IE_BITMAP_IS_PROBE 0x00000002 /* send true or false based on scan response frame being a Probe Rsp or not */
  12670. #define LPI_IE_BITMAP_SSID 0x00000004 /* send ssid from received scan response frame */
  12671. #define LPI_IE_BITMAP_RSSI 0x00000008 /* send RSSI value reported by HW for the received scan response after adjusting with noise floor */
  12672. #define LPI_IE_BITMAP_CHAN 0x00000010 /* send channel number from the received scan response */
  12673. #define LPI_IE_BITMAP_AP_TX_PWR 0x00000020 /* send Tx power from TPC IE of scan rsp */
  12674. #define LPI_IE_BITMAP_TX_RATE 0x00000040 /* send rate of the received frame as reported by HW. */
  12675. #define LPI_IE_BITMAP_80211_MC_SUPPORT 0x00000080 /* send true or false based on the received scan rsp was from a 11mc supported AP or not. */
  12676. #define LPI_IE_BITMAP_TSF_TIMER_VALUE 0x00000100 /* send timestamp reported in the received scan rsp frame. */
  12677. #define LPI_IE_BITMAP_AGE_OF_MEASUREMENT 0x00000200 /* (current system time - received time) = duration of time scan rsp frame data is kept in the buffer before sending to LOWI LP. */
  12678. /*
  12679. * TEMPORARY alias of incorrect old name the correct name.
  12680. * This alias will be removed once all references to the old name have been fixed.
  12681. */
  12682. #define LPI_IE_BITMAP_AGE_OF_MESAUREMENT LPI_IE_BITMAP_AGE_OF_MEASUREMENT
  12683. #define LPI_IE_BITMAP_CONN_STATUS 0x00000400 /* If an infra STA is active and connected to an AP, true value is sent else false. */
  12684. #define LPI_IE_BITMAP_MSAP_IE 0x00000800 /* info on the vendor specific proprietary IE MSAP */
  12685. #define LPI_IE_BITMAP_SEC_STATUS 0x00001000 /* we indicate true or false based on if the AP has WPA or RSN security enabled */
  12686. #define LPI_IE_BITMAP_DEVICE_TYPE 0x00002000 /* info about the beacons coming from an AP or P2P or NAN device. */
  12687. #define LPI_IE_BITMAP_CHAN_IS_PASSIVE 0x00004000 /* info on whether the scan rsp was received from a passive channel */
  12688. #define LPI_IE_BITMAP_DWELL_TIME 0x00008000 /* send the scan dwell time of the channel on which the current scan rsp frame was received. */
  12689. #define LPI_IE_BITMAP_BAND_CENTER_FREQ1 0x00010000 /* the center frequencies in case AP is supporting wider channels than 20 MHz */
  12690. #define LPI_IE_BITMAP_BAND_CENTER_FREQ2 0x00020000 /* same as above */
  12691. #define LPI_IE_BITMAP_PHY_MODE 0x00040000 /* PHY mode indicates a, b, ,g, ac and other combinations */
  12692. #define LPI_IE_BITMAP_SCAN_MODULE_ID 0x00080000 /* scan module id indicates the scan client who originated the scan */
  12693. #define LPI_IE_BITMAP_SCAN_ID 0x00100000 /* extscan inserts the scan cycle count for this value; other scan clients can insert the scan id of the scan, if needed. */
  12694. #define LPI_IE_BITMAP_FLAGS 0x00200000 /* reserved as a bitmap to indicate more scan information; one such use being to indicate if the on-going scan is interrupted or not */
  12695. #define LPI_IE_BITMAP_CACHING_REQD 0x00400000 /* extscan will use this field to indicate if this frame info needs to be cached in LOWI LP or not */
  12696. #define LPI_IE_BITMAP_REPORT_CONTEXT_HUB 0x00800000 /* extscan will use this field to indicate to LOWI LP whether to report result to context hub or not. */
  12697. #define LPI_IE_BITMAP_CHRE_ESS 0x010000000 /* ESS capability info for CHRE */
  12698. #define LPI_IE_BITMAP_CHRE_SEC_MODE 0x020000000 /* Security capability info for CHRE */
  12699. #define LPI_IE_BITMAP_CHRE_SUPPORTED_RATE 0x040000000 /* Hightest MCS corresponding NCC for TX and RX */
  12700. #define LPI_IE_BITMAP_COUNTRY_STRING 0x080000000 /* send country string inside Country IE to LOWI LP */
  12701. #define LPI_IE_BITMAP_ALL 0xFFFFFFFF
  12702.  
  12703. typedef struct {
  12704. A_UINT32 tlv_header;
  12705. /**A_BOOL indicates LPI mgmt snooping enable/disable*/
  12706. A_UINT32 enable;
  12707. /**LPI snooping mode*/
  12708. A_UINT32 snooping_mode;
  12709. /** LPI interested IEs in snooping context */
  12710. A_UINT32 ie_bitmap;
  12711. } wmi_lpi_mgmt_snooping_config_cmd_fixed_param;
  12712.  
  12713. typedef struct {
  12714. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_start_scan_cmd_fixed_param */
  12715. /** Scan ID */
  12716. A_UINT32 scan_id;
  12717. /** Scan requestor ID */
  12718. A_UINT32 scan_req_id;
  12719. /** VDEV id(interface) that is requesting scan */
  12720. A_UINT32 vdev_id;
  12721. /** LPI interested IEs in scan context */
  12722. A_UINT32 ie_bitmap;
  12723. /** Scan Priority, input to scan scheduler */
  12724. A_UINT32 scan_priority;
  12725. /** dwell time in msec on active channels */
  12726. A_UINT32 dwell_time_active;
  12727. /** dwell time in msec on passive channels */
  12728. A_UINT32 dwell_time_passive;
  12729. /** min time in msec on the BSS channel,only valid if atleast one VDEV is active*/
  12730. A_UINT32 min_rest_time;
  12731. /** max rest time in msec on the BSS channel,only valid if at least one VDEV is active*/
  12732. /** the scanner will rest on the bss channel at least min_rest_time. after min_rest_time the scanner
  12733. * will start checking for tx/rx activity on all VDEVs. if there is no activity the scanner will
  12734. * switch to off channel. if there is activity the scanner will let the radio on the bss channel
  12735. * until max_rest_time expires.at max_rest_time scanner will switch to off channel
  12736. * irrespective of activity. activity is determined by the idle_time parameter.
  12737. */
  12738. A_UINT32 max_rest_time;
  12739. /** time before sending next set of probe requests.
  12740. * The scanner keeps repeating probe requests transmission with period specified by repeat_probe_time.
  12741. * The number of probe requests specified depends on the ssid_list and bssid_list
  12742. */
  12743. A_UINT32 repeat_probe_time;
  12744. /** time in msec between 2 consequetive probe requests with in a set. */
  12745. A_UINT32 probe_spacing_time;
  12746. /** data inactivity time in msec on bss channel that will be used by scanner for measuring the inactivity */
  12747. A_UINT32 idle_time;
  12748. /** maximum time in msec allowed for scan */
  12749. A_UINT32 max_scan_time;
  12750. /** delay in msec before sending first probe request after switching to a channel */
  12751. A_UINT32 probe_delay;
  12752. /** Scan control flags */
  12753. A_UINT32 scan_ctrl_flags;
  12754. /** Burst duration time in msec*/
  12755. A_UINT32 burst_duration;
  12756.  
  12757. /** # if channels to scan. In the TLV channel_list[] */
  12758. A_UINT32 num_chan;
  12759. /** number of bssids. In the TLV bssid_list[] */
  12760. A_UINT32 num_bssid;
  12761. /** number of ssid. In the TLV ssid_list[] */
  12762. A_UINT32 num_ssids;
  12763. /** number of bytes in ie data. In the TLV ie_data[] */
  12764. A_UINT32 ie_len;
  12765.  
  12766. /**
  12767. * TLV (tag length value) parameters follow the scan_cmd
  12768. * structure. The TLV's are:
  12769. * A_UINT32 channel_list[];
  12770. * wmi_ssid ssid_list[];
  12771. * wmi_mac_addr bssid_list[];
  12772. * A_UINT8 ie_data[];
  12773. */
  12774. } wmi_lpi_start_scan_cmd_fixed_param;
  12775.  
  12776. typedef struct {
  12777. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stop_scan_cmd_fixed_param */
  12778. /** Scan requestor ID */
  12779. A_UINT32 scan_req_id;
  12780. /** Scan ID */
  12781. A_UINT32 scan_id;
  12782. /**
  12783. * Req Type
  12784. * req_type should be WMI_SCAN_STOP_ONE, WMI_SCN_STOP_VAP_ALL or WMI_SCAN_STOP_ALL
  12785. * WMI_SCAN_STOP_ONE indicates to stop a specific scan with scan_id
  12786. * WMI_SCN_STOP_VAP_ALL indicates to stop all scan requests on a specific vDev with vdev_id
  12787. * WMI_SCAN_STOP_ALL indicates to stop all scan requests in both Scheduler's queue and Scan Engine
  12788. */
  12789. A_UINT32 req_type;
  12790. /**
  12791. * vDev ID
  12792. * used when req_type equals to WMI_SCN_STOP_VAP_ALL, it indexed the vDev on which to stop the scan
  12793. */
  12794. A_UINT32 vdev_id;
  12795. } wmi_lpi_stop_scan_cmd_fixed_param;
  12796.  
  12797. typedef enum {
  12798. WMI_LPI_DEVICE_TYPE_AP = 1,
  12799. WMI_LPI_DEVICE_TYPE_P2P = 2,
  12800. WMI_LPI_DEVICE_TYPE_NAN = 3,
  12801. } wmi_lpi_device_type;
  12802.  
  12803. typedef struct
  12804. {
  12805. A_UINT32 tlv_header;
  12806. /** Scan requestor ID */
  12807. A_UINT32 scan_req_id;
  12808. A_UINT32 ie_bitmap;
  12809. A_UINT32 data_len;
  12810. } wmi_lpi_result_event_fixed_param;
  12811.  
  12812. typedef enum {
  12813. /** User scan Request completed */
  12814. WMI_LPI_STATUS_SCAN_REQ_COMPLED = 0,
  12815. /** User Request was never serviced */
  12816. WMI_LPI_STATUS_DROPPED_REQ = 1,
  12817. /** Illegal channel Req */
  12818. WMI_LPI_STATUS_ILLEGAL_CHAN_REQ = 2,
  12819. /** Illegal Operation Req */
  12820. WMI_LPI_STATUS_ILLEGAL_OPER_REQ = 3,
  12821. /** Request Aborted */
  12822. WMI_LPI_STATUS_REQ_ABORTED = 4,
  12823. /** Request Timed Out */
  12824. WMI_LPI_STATUS_REQ_TIME_OUT = 5,
  12825. /** Medium Busy, already there
  12826. * is a scan is going on */
  12827. WMI_LPI_STATUS_MEDIUM_BUSY = 6,
  12828. /** Extscan is the scan client whose scan complete event is triggered */
  12829. WMI_LPI_STATUS_EXTSCAN_CYCLE_AND_SCAN_REQ_COMPLETED = 7,
  12830. } wmi_lpi_staus;
  12831.  
  12832. typedef struct
  12833. {
  12834. A_UINT32 tlv_header;
  12835. wmi_lpi_staus status;
  12836. /** Scan requestor ID */
  12837. A_UINT32 scan_req_id;
  12838. } wmi_lpi_status_event_fixed_param;
  12839.  
  12840.  
  12841. typedef struct
  12842. {
  12843. A_UINT32 tlv_header;
  12844. wmi_mac_addr bssid;
  12845. wmi_ssid ssid;
  12846. A_UINT32 freq;
  12847. A_UINT32 rssi;
  12848. A_UINT32 vdev_id;
  12849. } wmi_lpi_handoff_event_fixed_param;
  12850. typedef struct
  12851. {
  12852. A_UINT32 tlv_header;
  12853. A_UINT32 timestamp; /*timestamp of batch scan event*/
  12854. A_UINT32 numScanLists; /*number of scan in this event*/
  12855. A_UINT32 isLastResult; /*is this event a last event of the whole batch scan*/
  12856. } wmi_batch_scan_result_event_fixed_param;
  12857.  
  12858. typedef struct {
  12859. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_event_fixed_param */
  12860. A_UINT32 vdev_id;
  12861. /* This TLV is followed by p2p_noa_info for vdev :
  12862. * wmi_p2p_noa_info p2p_noa_info;
  12863. */
  12864. } wmi_p2p_noa_event_fixed_param;
  12865.  
  12866. #define WMI_RFKILL_CFG_RADIO_LEVEL_OFFSET 6
  12867. #define WMI_RFKILL_CFG_RADIO_LEVEL_MASK 0x1
  12868.  
  12869. #define WMI_RFKILL_CFG_GPIO_PIN_NUM_OFFSET 0
  12870. #define WMI_RFKILL_CFG_GPIO_PIN_NUM_MASK 0x3f
  12871.  
  12872. #define WMI_RFKILL_CFG_PIN_AS_GPIO_OFFSET 7
  12873. #define WMI_RFKILL_CFG_PIN_AS_GPIO_MASK 0xf
  12874.  
  12875. typedef struct {
  12876. /** TLV tag and len; tag equals
  12877. * */
  12878. A_UINT32 tlv_header;
  12879. /** gpip pin number */
  12880. A_UINT32 gpio_pin_num;
  12881. /** gpio interupt type */
  12882. A_UINT32 int_type;
  12883. /** RF radio status */
  12884. A_UINT32 radio_state;
  12885. } wmi_rfkill_mode_param;
  12886.  
  12887. typedef enum {
  12888. WMI_SET_LED_SYS_POWEROFF,
  12889. WMI_SET_LED_SYS_S3_SUSPEND,
  12890. WMI_SET_LED_SYS_S4_S5,
  12891. WMI_SET_LED_SYS_DRIVER_DISABLE,
  12892. WMI_SET_LED_SYS_WAKEUP,
  12893. WMI_SET_LED_SYS_ALWAYS_ON, /* just for test! */
  12894. WMI_SET_LED_SYS_POWERON,
  12895. } wmi_led_sys_state_param;
  12896.  
  12897. typedef enum {
  12898. WMI_CONFIG_LED_TO_VDD = 0,
  12899. WMI_CONFIG_LED_TO_GND = 1,
  12900. } wmi_config_led_connect_type;
  12901.  
  12902. typedef enum {
  12903. WMI_CONFIG_LED_NOT_WITH_BT = 0,
  12904. WMI_CONFIG_LED_WITH_BT = 1,
  12905. } wmi_config_led_with_bt_flag;
  12906.  
  12907. typedef enum {
  12908. WMI_CONFIG_LED_DISABLE = 0,
  12909. WMI_CONFIG_LED_ENABLE = 1,
  12910. } wmi_config_led_enable_flag;
  12911.  
  12912. typedef enum {
  12913. WMI_CONFIG_LED_HIGH_UNSPECIFIED = 0,
  12914. WMI_CONFIG_LED_HIGH_OFF = 1,
  12915. WMI_CONFIG_LED_HIGH_ON = 2,
  12916. } wmi_config_led_on_flag;
  12917.  
  12918. typedef enum {
  12919. WMI_CONFIG_LED_UNSPECIFIED = 0,
  12920. WMI_CONFIG_LED_ON = 1,
  12921. WMI_CONFIG_LED_OFF = 2,
  12922. WMI_CONFIG_LED_DIM = 3,
  12923. WMI_CONFIG_LED_BLINK = 4,
  12924. WMI_CONFIG_LED_TXRX = 5,
  12925. } wmi_config_led_operation_type;
  12926.  
  12927. typedef struct {
  12928. /** TLV tag and len; tag equals
  12929. * WMITLV_TAG_STRUC_wmi_pdev_set_led_config_cmd_fixed_param */
  12930. A_UINT32 tlv_header;
  12931. /* Set GPIO pin */
  12932. A_UINT32 led_gpio_pin;
  12933. /* Set connect type defined in wmi_config_led_connect_type */
  12934. A_UINT32 connect_type;
  12935. /* Set flag defined in wmi_config_led_with_bt_flag*/
  12936. A_UINT32 with_bt;
  12937. /* Set LED enablement defined in wmi_config_led_enable_flag */
  12938. A_UINT32 led_enable;
  12939. /** pdev_id for identifying the MAC
  12940. * See macros starting with WMI_PDEV_ID_ for values.
  12941. */
  12942. A_UINT32 pdev_id;
  12943. /* see wmi_config_led_operation_type enum */
  12944. A_UINT32 led_operation_type;
  12945. /* see wmi_config_led_on_flag enum */
  12946. A_UINT32 led_on_flag; /* configure high/low on/off sense */
  12947. A_UINT32 led_on_interval; /* for blink function; unit: ms */
  12948. A_UINT32 led_off_interval; /* for blink function; unit: ms */
  12949. A_UINT32 led_repeat_cnt; /* for blink function: how many blinks */
  12950. } wmi_pdev_set_led_config_cmd_fixed_param;
  12951.  
  12952. #define WMI_WNTS_CFG_GPIO_PIN_NUM_OFFSET 0
  12953. #define WMI_WNTS_CFG_GPIO_PIN_NUM_MASK 0xff
  12954.  
  12955. /** WMI_PEER_INFO_REQ_CMDID
  12956. * Request FW to provide peer info */
  12957. typedef struct {
  12958. /** TLV tag and len; tag equals
  12959. * WMITLV_TAG_STRUC_wmi_peer_info_req_cmd_fixed_param */
  12960. A_UINT32 tlv_header;
  12961. /** In order to get the peer info for a single peer, host shall
  12962. * issue the peer_mac_address of that peer. For getting the
  12963. * info all peers, the host shall issue 0xFFFFFFFF as the mac
  12964. * address. The firmware will return the peer info for all the
  12965. * peers on the specified vdev_id */
  12966. wmi_mac_addr peer_mac_address;
  12967. /** vdev id */
  12968. A_UINT32 vdev_id;
  12969. } wmi_peer_info_req_cmd_fixed_param;
  12970.  
  12971. typedef struct {
  12972. /** TLV tag and len; tag equals
  12973. * WMITLV_TAG_STRUC_wmi_peer_info */
  12974. A_UINT32 tlv_header;
  12975. /** mac addr of the peer */
  12976. wmi_mac_addr peer_mac_address;
  12977. /** data_rate of the peer */
  12978. A_UINT32 data_rate;
  12979. /** rssi of the peer */
  12980. A_UINT32 rssi;
  12981. /** tx fail count */
  12982. A_UINT32 tx_fail_cnt;
  12983. } wmi_peer_info;
  12984.  
  12985. /** FW response with the peer info */
  12986. typedef struct {
  12987. /** TLV tag and len; tag equals
  12988. * WMITLV_TAG_STRUC_wmi_peer_info_event_fixed_param */
  12989. A_UINT32 tlv_header;
  12990. /** number of peers in peer_info */
  12991. A_UINT32 num_peers;
  12992. /* Set to 1 only if vdev_id field is valid */
  12993. A_UINT32 valid_vdev_id;
  12994. /* VDEV to which the peer belongs to */
  12995. A_UINT32 vdev_id;
  12996. /* This TLV is followed by another TLV of array of structs
  12997. * wmi_peer_info peer_info[];
  12998. */
  12999. } wmi_peer_info_event_fixed_param;
  13000.  
  13001. /** WMI_PEER_ANTDIV_INFO_REQ_CMDID
  13002. * Request FW to provide peer info */
  13003. typedef struct {
  13004. /** TLV tag and len; tag equals
  13005. * WMITLV_TAG_STRUC_wmi_peer_antdiv_info_req_cmd_fixed_param */
  13006. A_UINT32 tlv_header;
  13007. /** In order to get the peer antdiv info for a single peer, host shall
  13008. * issue the peer_mac_address of that peer. For getting the
  13009. * info all peers, the host shall issue 0xFFFFFFFF as the mac
  13010. * address. The firmware will return the peer info for all the
  13011. * peers on the specified vdev_id */
  13012. wmi_mac_addr peer_mac_address;
  13013. /** vdev id */
  13014. A_UINT32 vdev_id;
  13015. } wmi_peer_antdiv_info_req_cmd_fixed_param;
  13016.  
  13017. /** FW response with the peer antdiv info */
  13018. typedef struct {
  13019. /** TLV tag and len; tag equals
  13020. * WMITLV_TAG_STRUC_wmi_peer_antdiv_info_event_fixed_param */
  13021. A_UINT32 tlv_header;
  13022. /** number of peers in peer_info */
  13023. A_UINT32 num_peers;
  13024. /* VDEV to which the peer belongs to */
  13025. A_UINT32 vdev_id;
  13026. /* This TLV is followed by another TLV of array of structs
  13027. * wmi_peer_antdiv_info peer_antdiv_info[];
  13028. */
  13029. } wmi_peer_antdiv_info_event_fixed_param;
  13030.  
  13031. typedef struct {
  13032. /** TLV tag and len; tag equals
  13033. * WMITLV_TAG_STRUC_wmi_peer_antdiv_info */
  13034. A_UINT32 tlv_header;
  13035. /** mac addr of the peer */
  13036. wmi_mac_addr peer_mac_address;
  13037. /** per chain rssi of the peer, for up to 8 chains.
  13038. * Each chain's entry reports the RSSI for different bandwidths:
  13039. * bits 7:0 -> primary 20 MHz
  13040. * bits 15:8 -> secondary 20 MHz of 40 MHz channel (if applicable)
  13041. * bits 23:16 -> secondary 40 MHz of 80 MHz channel (if applicable)
  13042. * bits 31:24 -> secondary 80 MHz of 160 MHz channel (if applicable)
  13043. * Each of these 8-bit RSSI reports is in dB units, with respect to
  13044. * the noise floor.
  13045. * 0x80 means invalid.
  13046. * All unused bytes within used chain_rssi indices shall be set to 0x80.
  13047. * All unused chain_rssi indices shall be set to 0x80808080.
  13048. */
  13049. A_INT32 chain_rssi[8];
  13050. } wmi_peer_antdiv_info;
  13051.  
  13052. typedef enum {
  13053. WMI_PEER_IND_SMPS = 0x0, /* spatial multiplexing power save */
  13054. WMI_PEER_IND_OMN, /* operating mode notification */
  13055. WMI_PEER_IND_OMI, /* operating mode indication */
  13056. } WMI_PEER_OPER_MODE_IND;
  13057.  
  13058. typedef struct {
  13059. /** TLV tag and len; tag equals
  13060. * WMITLV_TAG_STRUC_wmi_peer_oper_mode_change */
  13061. A_UINT32 tlv_header;
  13062. /** mac addr of the peer */
  13063. wmi_mac_addr peer_mac_address;
  13064. /** Peer type indication WMI_PEER_OPER_MODE_IND. */
  13065. A_UINT32 ind_type;
  13066. /** new_rxnss valid for all peer_operating mode ind. */
  13067. A_UINT32 new_rxnss;
  13068. /** new_bw valid for peer_operating mode ind. OMN/OMI
  13069. * value of this bw is as per 11ax/ac standard:
  13070. * 0 = 20MHz,1 = 40MHz, 2= 80MHz, 3 = 160MHz
  13071. */
  13072. A_UINT32 new_bw;
  13073. /** new_txnss valid for peer_operating mode ind. OMI */
  13074. A_UINT32 new_txnss;
  13075. /** new_disablemu: disable mu mode
  13076. * valid for peer_operating mode ind. OMI
  13077. */
  13078. A_UINT32 new_disablemu;
  13079. } wmi_peer_oper_mode_change_event_fixed_param;
  13080.  
  13081. /** FW response when tx failure count has reached threshold
  13082. * for a peer */
  13083. typedef struct {
  13084. /** TLV tag and len; tag equals
  13085. * WMITLV_TAG_STRUC_wmi_peer_tx_fail_cnt_thr_event_fixed_param */
  13086. A_UINT32 tlv_header;
  13087. /** vdev id*/
  13088. A_UINT32 vdev_id;
  13089. /** mac address */
  13090. wmi_mac_addr peer_mac_address;
  13091. /** tx failure count - will eventually be removed and not used */
  13092. A_UINT32 tx_fail_cnt;
  13093. /** seq number of the nth tx_fail_event */
  13094. A_UINT32 seq_no;
  13095. } wmi_peer_tx_fail_cnt_thr_event_fixed_param;
  13096.  
  13097. enum wmi_rmc_mode {
  13098. /** Disable RMC */
  13099. WMI_RMC_MODE_DISABLED = 0,
  13100. /** Enable RMC */
  13101. WMI_RMC_MODE_ENABLED = 1,
  13102. };
  13103.  
  13104. /** Enable RMC transmitter functionality. Upon
  13105. * receiving this, the FW shall mutlicast frames with
  13106. * reliablity. This is a vendor
  13107. * proprietary feature. */
  13108. typedef struct {
  13109. /** TLV tag and len; tag equals
  13110. * WMITLV_TAG_STRUC_wmi_rmc_set_mode_cmd_fixed_param */
  13111. A_UINT32 tlv_header;
  13112. /** vdev id*/
  13113. A_UINT32 vdev_id;
  13114. /** enable_rmc contains values from enum wmi_rmc_mode;
  13115. * Default value: 0 (disabled) */
  13116. A_UINT32 enable_rmc;
  13117. } wmi_rmc_set_mode_cmd_fixed_param;
  13118.  
  13119. /** Configure transmission periodicity of action frames in a
  13120. * RMC network for the multicast transmitter */
  13121. typedef struct {
  13122. /** TLV tag and len; tag equals
  13123. * WMITLV_TAG_STRUC_wmi_rmc_set_action_period_cmd_fixed_param */
  13124. A_UINT32 tlv_header;
  13125. /** vdev id */
  13126. A_UINT32 vdev_id;
  13127. /** time period in milliseconds. Default: 300 ms.
  13128. An action frame indicating the current leader is transmitted by the
  13129. RMC transmitter once every 'periodity_msec' */
  13130. A_UINT32 periodicity_msec;
  13131. } wmi_rmc_set_action_period_cmd_fixed_param;
  13132.  
  13133. /** Optimise Leader selection process in RMC functionality. For
  13134. * Enhancement/Debug purposes only */
  13135. typedef struct {
  13136. /** TLV tag and len; tag equals
  13137. * WMITLV_TAG_STRUC_wmi_rmc_config_cmd_fixed_param */
  13138. A_UINT32 tlv_header;
  13139. /** vdev id */
  13140. A_UINT32 vdev_id;
  13141. /** flags ::
  13142. * 0x0001 - Enable beacon averaging
  13143. * 0x0002 - Force leader selection
  13144. * 0x0004 - Enable Timer based leader switch
  13145. * 0x0008 - Use qos/NULL based for multicast reliability */
  13146. A_UINT32 flags;
  13147. /** control leader change timeperiod (in seconds) */
  13148. A_UINT32 peridocity_leader_switch;
  13149. /** control activity timeout value for data rx (in seconds) */
  13150. A_UINT32 data_activity_timeout;
  13151. /** mac address of leader */
  13152. wmi_mac_addr forced_leader_mac_addr;
  13153. } wmi_rmc_config_cmd_fixed_param;
  13154.  
  13155. /** MHF is generally implemented in
  13156. * the kernel. To decrease system power consumption, the
  13157. * driver can enable offloading this to the chipset. In
  13158. * order for the offload, the firmware needs the routing table.
  13159. * The host shall plumb the routing table into FW. The firmware
  13160. * shall perform an IP address lookup and forward the packet to
  13161. * the next hop using next hop's mac address. This is a vendor
  13162. * proprietary feature. */
  13163. enum wmi_mhf_ofl_mode {
  13164. /** Disable MHF offload */
  13165. WMI_MHF_OFL_MODE_DISABLED = 0,
  13166. /** Enable MHF offload */
  13167. WMI_MHF_OFL_MODE_ENABLED = 1,
  13168. };
  13169.  
  13170. typedef struct {
  13171. /** TLV tag and len; tag equals
  13172. * WMITLV_TAG_STRUC_wmi_mhf_offload_set_mode_cmd_fixed_param */
  13173. A_UINT32 tlv_header;
  13174. /** vdev id*/
  13175. A_UINT32 vdev_id;
  13176. /** enable_mhf_ofl contains values from enum
  13177. * wmi_mhf_ofl_mode; Default value: 0 (disabled) */
  13178. A_UINT32 enable_mhf_ofl;
  13179. } wmi_mhf_offload_set_mode_cmd_fixed_param;
  13180.  
  13181. enum wmi_mhf_ofl_table_action {
  13182. /** Create MHF offload table in FW */
  13183. WMI_MHF_OFL_TBL_CREATE = 0,
  13184. /** Append to existing MHF offload table */
  13185. WMI_MHF_OFL_TBL_APPEND = 1,
  13186. /** Flush entire MHF offload table in FW */
  13187. WMI_MHF_OFL_TBL_FLUSH = 2,
  13188. };
  13189.  
  13190. typedef struct {
  13191. /** TLV tag and len; tag equals
  13192. * WMITLV_TAG_STRUC_wmi_mhf_offload_plumb_routing_table_cmd_fixed_param */
  13193. A_UINT32 tlv_header;
  13194. /** vdev id*/
  13195. A_UINT32 vdev_id;
  13196. /** action corresponds to values from enum
  13197. * wmi_mhf_ofl_table_action */
  13198. A_UINT32 action;
  13199. /** number of entries in the table */
  13200. A_UINT32 num_entries;
  13201. /** Followed by the variable length TLV
  13202. * wmi_mhf_offload_routing_table_entry entries[] */
  13203. } wmi_mhf_offload_plumb_routing_table_cmd;
  13204.  
  13205. typedef struct {
  13206. /** TLV tag and len; tag equals
  13207. * WMITLV_TAG_STRUC_wmi_mhf_offload_routing_table_entry */
  13208. A_UINT32 tlv_header;
  13209. /** Destination node's IP address */
  13210. WMI_IPV4_ADDR dest_ipv4_addr;
  13211. /** Next hop node's MAC address */
  13212. wmi_mac_addr next_hop_mac_addr;
  13213. } wmi_mhf_offload_routing_table_entry;
  13214.  
  13215. typedef struct {
  13216. /** tlv tag and len, tag equals
  13217. * WMITLV_TAG_STRUC_wmi_dfs_radar_event */
  13218. A_UINT32 tlv_header;
  13219.  
  13220. /** full 64 tsf timestamp get from MAC tsf timer indicates
  13221. * the time that the radar event uploading to host, split
  13222. * it to high 32 bit and lower 32 bit in fulltsf_high and
  13223. * full_tsf_low
  13224. */
  13225. A_UINT32 upload_fullts_low;
  13226. A_UINT32 upload_fullts_high;
  13227.  
  13228. /** timestamp indicates the time when DFS pulse is detected
  13229. * equal to ppdu_end_ts - radar_pusle_summary_ts_offset
  13230. */
  13231. A_UINT32 pulse_detect_ts;
  13232.  
  13233. /** the duaration of the pulse in us */
  13234. A_UINT32 pulse_duration;
  13235.  
  13236. /** the center frequency of the radar pulse detected, KHz */
  13237. A_UINT32 pulse_center_freq;
  13238.  
  13239. /** bandwidth of current DFS channel, MHz */
  13240. A_UINT32 ch_bandwidth;
  13241.  
  13242. /** center channel frequency1 of current DFS channel, MHz */
  13243. A_UINT16 ch_center_freq1;
  13244.  
  13245. /** center channel frequency2 of current DFS channel, MHz,
  13246. * reserved for 160 BW mode
  13247. */
  13248. A_UINT16 ch_center_freq2;
  13249.  
  13250. /** flag to indicate if this pulse is chirp */
  13251. A_UINT8 pulse_is_chirp;
  13252.  
  13253. /** RSSI recorded in the ppdu */
  13254. A_UINT8 rssi;
  13255.  
  13256. /** extened RSSI info */
  13257. A_UINT8 rssi_ext;
  13258.  
  13259. union {
  13260. A_UINT8 pmac_id; /* OBSOLETE - will be removed once all refs are gone */
  13261. /** pdev_id for identifying the MAC
  13262. * See macros starting with WMI_PDEV_ID_ for values.
  13263. */
  13264. A_UINT8 pdev_id;
  13265. };
  13266.  
  13267. /** index of peak magnitude bin (signed) */
  13268. A_INT32 peak_sidx;
  13269.  
  13270. } wmi_dfs_radar_event_fixed_param;
  13271.  
  13272. enum {
  13273. /* DEFAULT - target chooses what action to take, based on its thermal
  13274. * management policy
  13275. * Targets which throttle tx (and potentially rx) based on thermal
  13276. * management thresholds specified by the host will shut down tx
  13277. * if the temperature exceeds upper_thresh_degreeC.
  13278. * Targets which simply inform the host about threshold breaches will
  13279. * send a notification message to the host if the temperature exceeds
  13280. * upper_thresh_degreeC.
  13281. * Conversely, if the temperature was above upper_thresh_degreeC but
  13282. * then drops to below lower_threshold_degreeC, the target will either
  13283. * resume tx, or notify the host.
  13284. */
  13285. WMI_THERMAL_MGMT_ACTION_DEFAULT = 0,
  13286. /* HALT_TRAFFIC -
  13287. * If the temperature rises above upper_thresh_degreeC, the target will
  13288. * halt tx.
  13289. * If the temperature falls back below lower_thresh_degreeC, the target
  13290. * will resume tx.
  13291. */
  13292. WMI_THERMAL_MGMT_ACTION_HALT_TRAFFIC = 1,
  13293. /* NOTIFY_HOST - the target will notify the host if the temperature
  13294. * either rises above upper_thresh_degreeC or falls below
  13295. * lower_thresh_degreeC.
  13296. */
  13297. WMI_THERMAL_MGMT_ACTION_NOTIFY_HOST = 2,
  13298. };
  13299.  
  13300. typedef struct {
  13301. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_thermal_mgmt_cmd_fixed_param */
  13302.  
  13303. /*Thermal thresholds*/
  13304. A_UINT32 lower_thresh_degreeC; /* in degree C*/
  13305. A_UINT32 upper_thresh_degreeC; /* in degree C*/
  13306.  
  13307. /*Enable/Disable Thermal Monitoring for Mitigation*/
  13308. A_UINT32 enable;
  13309.  
  13310. /* action: what the target should do when a thermal upper/lower threshold
  13311. * is crossed.
  13312. * Refer to the WMI_THERMAL_MGMT_ACTION enum.
  13313. */
  13314. A_UINT32 action;
  13315. A_UINT32 threshold_warning_degreeC;
  13316. A_UINT32 sample_rate_ms;
  13317. } wmi_thermal_mgmt_cmd_fixed_param;
  13318.  
  13319. typedef struct {
  13320. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_thermal_mgmt_event_fixed_param */
  13321.  
  13322. A_UINT32 temperature_degreeC;/* temperature in degree C*/
  13323. } wmi_thermal_mgmt_event_fixed_param;
  13324.  
  13325. /**
  13326. * This command is sent from WLAN host driver to firmware to
  13327. * request firmware to configure auto shutdown timer in fw
  13328. * 0 - Disable <1-19600>-Enabled and timer value is seconds (86400 seconds = 1 day maximum>
  13329. */
  13330. typedef struct {
  13331. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_auto_shutdown_cfg_cmd_param */
  13332. A_UINT32 timer_value; /** timer value; 0=disable */
  13333. } wmi_host_auto_shutdown_cfg_cmd_fixed_param;
  13334.  
  13335. enum wmi_host_auto_shutdown_reason {
  13336. WMI_HOST_AUTO_SHUTDOWN_REASON_UNKNOWN = 0,
  13337. WMI_HOST_AUTO_SHUTDOWN_REASON_TIMER_EXPIRY = 1,
  13338. WMI_HOST_AUTO_SHUTDOWN_REASON_MAX,
  13339. };
  13340.  
  13341. /* WMI_HOST_AUTO_SHUTDOWN_EVENTID */
  13342. typedef struct{
  13343. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_auto_shutdown_event_fixed_param */
  13344. A_UINT32 shutdown_reason; /* value: wmi_host_auto_shutdown_reason */
  13345. } wmi_host_auto_shutdown_event_fixed_param;
  13346.  
  13347.  
  13348.  
  13349. /** New WMI command to support TPC CHAINMASK ADJUSTMENT ACCORDING TO a set of conditions specified in the command.
  13350. * fw will save c tpc offset/chainmask along with conditions and adjust tpc/chainmask when condition meet.
  13351. * This command is only used by some customer for verification test. It is not for end-user.
  13352. *
  13353. * array of wmi_tpc_chainmask_config structures are passed with the command to specify multiple conditions.
  13354. *
  13355. * The set of conditions include bt status, stbc status, band, phy_mode, 1stream/2streams, channel, rate. when all these conditions meet,
  13356. * the output(tpc_offset,chainmask) will be applied on per packet basis. ack_offset is applied based on channel condtion only. When multiple
  13357. * conditions has the same channel ,then the first ack_offset will be applied. It is better for host driver to make sure the
  13358. * <channel, ack_offset> pair is unique.
  13359. *
  13360. * the conditions (bt status, stbc status, band, phy_mode, 1steam/2streams, tpc_offset, ack_offset, chainmask) are combinedi into a single word
  13361. * called basic_config_info by bitmap
  13362. * to save memory. And channel & rate info will be tracked by 'channel' field and 'rate0', 'rate1' field because of its large combination.
  13363. *
  13364. * 'rate bit' or 'channel bit' field of basic_config_info indicate validity of the channel and rate fields.if rate bit is 0 then the rate field
  13365. * is ignored.
  13366. * disable will remove preious conditions from FW.
  13367. * conditions from the later command will over write conditions stored from a previous command.
  13368. *
  13369. */
  13370.  
  13371. #define WMI_TPC_CHAINMASK_CONFIG_BT_ON_OFF 0 /** dont' care the bt status */
  13372. #define WMI_TPC_CHAINMASK_CONFIG_BT_ON 1 /** apply only when bt on */
  13373. #define WMI_TPC_CHAINMASK_CONFIG_BT_OFF 2 /** apply only when bt off */
  13374. #define WMI_TPC_CHAINMASK_CONFIG_BT_RESV1 3 /** reserved */
  13375.  
  13376. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_DONT_CARE 0 /** don't care the chainmask */
  13377. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_CHAIN0 1 /** force to use Chain0 to send */
  13378. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_CHAIN1 2 /** force to use Chain1 to send */
  13379. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_CHAIN0_CHAIN1 3 /** force to use Chain0 & Chain1 to send */
  13380.  
  13381. #define WMI_TPC_CHAINMASK_CONFIG_STBC_ON_OFF 0 /** don't care about stbc */
  13382. #define WMI_TPC_CHAINMASK_CONFIG_STBC_ON 1 /** apply only when stbc on */
  13383. #define WMI_TPC_CHAINMASK_CONFIG_STBC_OFF 2 /** apply only when stbc off */
  13384. #define WMI_TPC_CHAINMASK_CONFIG_STBC_RESV1 3 /** reserved */
  13385.  
  13386. #define WMI_TPC_CHAINMASK_CONFIG_BAND_2G 0 /** 2G */
  13387. #define WMI_TPC_CHAINMASK_CONFIG_BAND_5G 1 /** 5G */
  13388.  
  13389. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11B_2G 0 /** 11b 2G */
  13390. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11G_2G 1 /** 11g 2G */
  13391. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_2G 2 /** 11n 2G */
  13392. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_11AC_2G 3 /** 11n + 11ac 2G */
  13393. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11A_5G 4 /** 11a 5G */
  13394. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_5G 5 /** 11n 5G */
  13395. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11AC_5G 6 /** 11ac 5G */
  13396. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_11AC_5G 7 /** 11n + 11ac 5G */
  13397.  
  13398. #define WMI_TPC_CHAINMASK_CONFIG_STREAM_1 0 /** 1 stream */
  13399. #define WMI_TPC_CHAINMASK_CONFIG_STREAM_2 1 /** 2 streams */
  13400.  
  13401. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_OFF 0 /** channel field is ignored */
  13402. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_ON 1 /** channel field needs to be checked */
  13403.  
  13404. #define WMI_TPC_CHAINMASK_CONFIG_RATE_OFF 0 /** rate field is ignored */
  13405. #define WMI_TPC_CHAINMASK_CONFIG_RATE_ON 1 /** rate field needs to be checked */
  13406.  
  13407. /** Bit map definition for basic_config_info starts */
  13408. #define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_S 0
  13409. #define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET (0x1f << WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_S)
  13410. #define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET)
  13411. #define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_SET(x,z) WMI_F_RMW(x,(z) & 0x1f,WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET)
  13412.  
  13413. #define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_S 5
  13414. #define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET (0x1f << WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_S)
  13415. #define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET)
  13416. #define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_SET(x,z) WMI_F_RMW(x, (z) & 0x1f, WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET)
  13417.  
  13418. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_S 10
  13419. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK (0x3 << WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_S)
  13420. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_CHAINMASK)
  13421. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_SET(x,z) WMI_F_RMW(x, (z) & 0x3, WMI_TPC_CHAINMASK_CONFIG_CHAINMASK)
  13422.  
  13423. #define WMI_TPC_CHAINMASK_CONFIG_BT_S 12
  13424. #define WMI_TPC_CHAINMASK_CONFIG_BT (0x3 << WMI_TPC_CHAINMASK_CONFIG_BT_S)
  13425. #define WMI_TPC_CHAINMASK_CONFIG_BT_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_BT)
  13426. #define WMI_TPC_CHAINMASK_CONFIG_BT_SET(x,z) WMI_F_RMW(x, (z) & 0x3, WMI_TPC_CHAINMASK_CONFIG_BT)
  13427.  
  13428. #define WMI_TPC_CHAINMASK_CONFIG_STBC_S 14
  13429. #define WMI_TPC_CHAINMASK_CONFIG_STBC (0x3 << WMI_TPC_CHAINMASK_CONFIG_STBC_S)
  13430. #define WMI_TPC_CHAINMASK_CONFIG_STBC_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_STBC)
  13431. #define WMI_TPC_CHAINMASK_CONFIG_STBC_SET(x,z) WMI_F_RMW(x, (z) & 0x3, WMI_TPC_CHAINMASK_CONFIG_STBC)
  13432.  
  13433. #define WMI_TPC_CHAINMASK_CONFIG_BAND_S 16
  13434. #define WMI_TPC_CHAINMASK_CONFIG_BAND (0x1 << WMI_TPC_CHAINMASK_CONFIG_BAND_S)
  13435. #define WMI_TPC_CHAINMASK_CONFIG_BAND_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_BAND)
  13436. #define WMI_TPC_CHAINMASK_CONFIG_BAND_SET(x,z) WMI_F_RMW(x, (z) & 0x1, WMI_TPC_CHAINMASK_CONFIG_BAND)
  13437.  
  13438. #define WMI_TPC_CHAINMASK_CONFIG_STREAM_S 17
  13439. #define WMI_TPC_CHAINMASK_CONFIG_STREAM (0x1 << WMI_TPC_CHAINMASK_CONFIG_STREAM_S)
  13440. #define WMI_TPC_CHAINMASK_CONFIG_STREAM_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_STREAM)
  13441. #define WMI_TPC_CHAINMASK_CONFIG_STREAM_SET(x,z) WMI_F_RMW(x, (z) & 0x1, WMI_TPC_CHAINMASK_CONFIG_STREAM)
  13442.  
  13443. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_S 18
  13444. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE (0x7 << WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_S)
  13445. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_PHY_MODE)
  13446. #define WMI_TPC_CHAINAMSK_CONFIG_PHY_MODE_SET(x,z) WMI_F_RMW(x, (z) & 0x7, WMI_TPC_CHAINMASK_CONFIG_PHY_MODE)
  13447.  
  13448. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_S 21
  13449. /*
  13450. * The deprecated old name (WMI_TPC_CHAINMASK_CONFIG_CHANNEL_EXIST)
  13451. * is temporarily maintained as an alias for the correct name
  13452. * (WMI_TPC_CHAINMASK_CONFIG_CHANNEL)
  13453. */
  13454. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_EXIST WMI_TPC_CHAINMASK_CONFIG_CHANNEL
  13455. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL (0x1 << WMI_TPC_CHAINMASK_CONFIG_CHANNEL_S)
  13456. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_CHANNEL)
  13457. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_SET(x,z) WMI_F_RMW(x, (z) & 0x1, WMI_TPC_CHAINMASK_CONFIG_CHANNEL)
  13458.  
  13459. #define WMI_TPC_CHAINMASK_CONFIG_RATE_S 22
  13460. /*
  13461. * The deprecated old name (WMI_TPC_CHAINMASK_CONFIG_RATE_EXIST)
  13462. * is temporarily maintained as an alias for the correct name
  13463. * (WMI_TPC_CHAINMASK_CONFIG_RATE)
  13464. */
  13465. #define WMI_TPC_CHAINMASK_CONFIG_RATE_EXIST WMI_TPC_CHAINMASK_CONFIG_RATE
  13466. #define WMI_TPC_CHAINMASK_CONFIG_RATE (0x1 << WMI_TPC_CHAINMASK_CONFIG_RATE_S)
  13467. #define WMI_TPC_CHAINMASK_CONFIG_RATE_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_RATE)
  13468. #define WMI_TPC_CHAINMASK_CONFIG_RATE_SET(x,z) WMI_F_RMW(x, (z) & 0x1, WMI_TPC_CHAINMASK_CONFIG_RATE)
  13469.  
  13470. /** Bit map definition for basic_config_info ends */
  13471.  
  13472. typedef struct{
  13473. A_UINT32 tlv_header;
  13474. /** Basic condition defined as bit map above, bitmap is chosen to save memory.
  13475. * Bit0 ~ Bit4: tpc offset which will be adjusted if condtion matches, the unit is 0.5dB. bit4 indicates signed
  13476. * Bit5 ~ Bit9: ack offset which will be adjusted if condtion matches, the unit is 0.5dB. bit9 indicates signed
  13477. * Bit10 ~ Bit11: chainmask b'00: don't care, b'01: force to use chain0, b'10: force to use chain1, b'11: force to use chain0&chain1
  13478. * Bit12 ~ Bit13: bt condition b'00: don't care, b'01: apply only when bt on, b'10: apply only when bt off, b'11: reserved
  13479. * Bit14 ~ Bit15: stbc condition b'00: don't care, b'01: apply only when stbc on, b'10: apply only when stbc off, b'11: reserved
  13480. * Bit16 : band condition b'0: 2G, b'1: 5G
  13481. * Bit17 : stream condition: b'0: 1 stream, b'1: 2 streams
  13482. * Bit18 ~ Bit20: phy mode condition: b'000: 11b 2g, b'001: 11g 2g, b'010: 11n 2g, b'011: 11n+11ac 2g, b'100: 11a, b'101: 11n 5g, b'110: 11ac 5g, b'111: 11n+11ac 5g
  13483. * Bit21 : channel bit, if this bit is 0, then the following channel field is ignored
  13484. * Bit22 : rate bit, if this bit is 0, then the following rate0&rate1 is ignored.
  13485. * Bit23 ~ Bit31: reserved
  13486. */
  13487. A_UINT32 basic_config_info;
  13488.  
  13489. /** channel mapping bit rule: The lower bit corresponds with smaller channel.
  13490. * it depends on Bit14 of basic_config_info
  13491. * Total 24 channels for 5G
  13492. * 36 40 44 48 52 56 60 64 100 104 108 112 116 120 124 128 132 136 140 149 153 157 161 165
  13493. * Total 14 channels for 2G
  13494. * 1 ~ 14
  13495. */
  13496. A_UINT32 channel;
  13497.  
  13498. /** rate mapping bit rule: The lower bit corresponds with lower rate.
  13499. * it depends on Bit16 ~ Bit18 of basic_config_info, "phy mode condition"
  13500. * Legacy rates , 11b, 11g, 11A
  13501. * 11n one stream (ht20, ht40) 8+8
  13502. * 11n two streams (ht20, ht40) 8+8
  13503. * 11ac one stream (vht20, vht40, vht80) 10+10+10
  13504. * 11ac two streams (vht20, vht40, vht80) 10+10+10
  13505. */
  13506. A_UINT32 rate0;
  13507. /** For example, for 11b, when rate0 equals 0x3, it means if actual_rate in [ "1Mbps", "2Mbps"] connection, the rate condition is true.
  13508. * For example, for 11g/11a, when rate0 equals 0xf0,it means "54Mbps", "48Mbps", "36Mbps", "24Mb's" is selected, while "18Mbps", "12Mbps", "9Mbps", "6Mbps" is not selected
  13509. */
  13510.  
  13511. /** only used for "11n+11ac" combined phy_mode, (WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_11AC_2G , WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_11AC_5G) in this case, 11n rates begins on rate0, while 11ac rates begins on rate1
  13512. */
  13513. A_UINT32 rate1;
  13514. } wmi_tpc_chainmask_config;
  13515.  
  13516. #define WMI_TPC_CHAINMASK_CONFIG_DISABLE 0 /** control the off for the tpc & chainmask*/
  13517. #define WMI_TPC_CHAINMASK_CONFIG_ENABLE 1 /** control the on for the tpc & chainmask*/
  13518.  
  13519. typedef struct{
  13520. A_UINT32 tlv_header;
  13521. A_UINT32 enable; /** enable to set tpc & chainmask when condtions meet, 0: disabled, 1: enabled. */
  13522. A_UINT32 num_tpc_chainmask_configs;
  13523. /** following this structure is num_tpc_chainmask_configs number of wmi_tpc_chainmask_config */
  13524. } wmi_tpc_chainmask_config_cmd_fixed_param;
  13525.  
  13526. typedef struct {
  13527. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_oem_dma_ring_cfg_req_fixed_param */
  13528. A_UINT32 pdev_id;
  13529. /**
  13530. * Bits 31:0: base address of ring [31:0]
  13531. */
  13532. A_UINT32 base_addr_lo;
  13533. /**
  13534. * Bits 3:0: base address of ring [35:32]
  13535. * Bits 31:4: reserved
  13536. */
  13537. A_UINT32 base_addr_hi;
  13538. /**
  13539. * Bits 31:0: address of head index [31:0]
  13540. */
  13541. A_UINT32 head_idx_addr_lo;
  13542. /**
  13543. * Bits 3:0: address of head index [35:32]
  13544. * Bits 31:4: reserved
  13545. */
  13546. A_UINT32 head_idx_addr_hi;
  13547. /**
  13548. * Bits 31:0: address of tail index [31:0]
  13549. */
  13550. A_UINT32 tail_idx_addr_lo;
  13551. /**
  13552. * Bits 3:0: address of tail index [35:32]
  13553. * Bits 31:4: reserved
  13554. */
  13555. A_UINT32 tail_idx_addr_hi;
  13556. A_UINT32 num_ptr; /** Number of pointers in the ring */
  13557. } wmi_oem_dma_ring_cfg_req_fixed_param;
  13558.  
  13559. #define WMI_OEM_DMA_RING_ADDR_LO_S 0
  13560. #define WMI_OEM_DMA_RING_ADDR_LO 0xffffffff
  13561.  
  13562. #define WMI_OEM_DMA_RING_ADDR_LO_GET(dword) WMI_F_MS(dword, WMI_OEM_DMA_RING_ADDR_LO)
  13563. #define WMI_OEM_DMA_RING_ADDR_LO_SET(dword, val) WMI_F_RMW(dword, val, WMI_OEM_DMA_RING_ADDR_LO)
  13564.  
  13565. #define WMI_OEM_DMA_RING_ADDR_HI_S 0
  13566. #define WMI_OEM_DMA_RING_ADDR_HI 0xf
  13567.  
  13568. #define WMI_OEM_DMA_RING_ADDR_HI_GET(dword) WMI_F_MS(dword, WMI_OEM_DMA_RING_ADDR_HI)
  13569. #define WMI_OEM_DMA_RING_ADDR_HI_SET(dword, val) WMI_F_RMW(dword, val, WMI_OEM_DMA_RING_ADDR_HI)
  13570.  
  13571. typedef struct {
  13572. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_oem_dma_ring_cfg_rsp_fixed_param */
  13573. A_UINT32 pdev_id;
  13574. A_UINT32 cfg_status; /** Configuration status; see A_STATUS */
  13575. } wmi_oem_dma_ring_cfg_rsp_fixed_param;
  13576.  
  13577. typedef struct {
  13578. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_oem_indirect_data */
  13579. A_UINT32 pdev_id; /** ID of pdev whose OEM DMA ring produced the data */
  13580. /**
  13581. * Bits 31:0: address of data [31:0]
  13582. */
  13583. A_UINT32 addr_lo;
  13584. /**
  13585. * Bits 3:0: address of data [35:32]
  13586. * Bits 11:4: reserved
  13587. * Bits 31:12: opaque host context data [19:0]
  13588. */
  13589. A_UINT32 addr_hi;
  13590. A_UINT32 len; /** Length of data in bytes */
  13591. } wmi_oem_indirect_data;
  13592.  
  13593. #define WMI_OEM_DMA_DATA_ADDR_LO_S 0
  13594. #define WMI_OEM_DMA_DATA_ADDR_LO 0xffffffff
  13595.  
  13596. #define WMI_OEM_DMA_DATA_ADDR_LO_GET(dword) WMI_F_MS(dword, WMI_OEM_DMA_DATA_ADDR_LO)
  13597. #define WMI_OEM_DMA_DATA_ADDR_LO_SET(dword, val) WMI_F_RMW(dword, val, WMI_OEM_DMA_DATA_ADDR_LO)
  13598.  
  13599. #define WMI_OEM_DMA_DATA_ADDR_HI_S 0
  13600. #define WMI_OEM_DMA_DATA_ADDR_HI 0xf
  13601.  
  13602. #define WMI_OEM_DMA_DATA_ADDR_HI_GET(dword) WMI_F_MS(dword, WMI_OEM_DMA_DATA_ADDR_HI)
  13603. #define WMI_OEM_DMA_DATA_ADDR_HI_SET(dword, val) WMI_F_RMW(dword, val, WMI_OEM_DMA_DATA_ADDR_HI)
  13604.  
  13605. #define WMI_OEM_DMA_DATA_ADDR_HI_HOST_DATA_S 12
  13606. #define WMI_OEM_DMA_DATA_ADDR_HI_HOST_DATA 0xfffff
  13607.  
  13608. #define WMI_OEM_DMA_DATA_ADDR_HI_HOST_DATA_GET(dword) WMI_F_MS(dword, WMI_OEM_DMA_DATA_ADDR_HI_HOST_DATA)
  13609. #define WMI_OEM_DMA_DATA_ADDR_HI_HOST_DATA_SET(dword, val) WMI_F_RMW(dword, val, WMI_OEM_DMA_DATA_ADDR_HI_HOST_DATA)
  13610.  
  13611. typedef struct {
  13612. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_oem_dma_buf_release_hdr */
  13613. A_UINT32 pdev_id; /** ID of pdev whose OEM DMA ring produced the data */
  13614. } wmi_oem_dma_buf_release_fixed_param;
  13615.  
  13616. typedef struct {
  13617. /**
  13618. * Bits 31:0: address of data [31:0]
  13619. */
  13620. A_UINT32 addr_lo;
  13621. /**
  13622. * Bits 3:0: address of data [35:32]
  13623. * Bits 11:4: reserved
  13624. * Bits 31:12: host context data [19:0]
  13625. */
  13626. A_UINT32 addr_hi;
  13627. } wmi_oem_dma_buf_release_entry;
  13628.  
  13629. typedef struct {
  13630. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_cmd_param */
  13631. A_UINT32 data_len; /** length in byte of data[]. */
  13632. /* This structure is used to send REQ binary blobs
  13633. * from application/service to firmware where Host drv is pass through .
  13634. * Following this structure is the TLV:
  13635. * A_UINT8 data[]; <-- length in byte given by field data_len.
  13636. */
  13637. } wmi_nan_cmd_param;
  13638.  
  13639. typedef struct {
  13640. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_event_hdr */
  13641. A_UINT32 data_len; /** length in byte of data[]. */
  13642. /* This structure is used to send REQ binary blobs
  13643. * from firmware to application/service where Host drv is pass through .
  13644. * Following this structure is the TLV:
  13645. * A_UINT8 data[]; <-- length in byte given by field data_len.
  13646. */
  13647. } wmi_nan_event_hdr;
  13648.  
  13649. /**
  13650. * Event to indicate NAN discovery interface created
  13651. */
  13652. typedef struct {
  13653. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_disc_iface_created_event_fixed_param */
  13654. A_UINT32 tlv_header;
  13655. /** Unique id identifying the VDEV */
  13656. A_UINT32 vdev_id;
  13657. /** NAN interface MAC address */
  13658. wmi_mac_addr nan_interface_macaddr;
  13659. } wmi_nan_disc_iface_created_event_fixed_param_PROTOTYPE;
  13660.  
  13661. #define wmi_nan_disc_iface_created_event_fixed_param wmi_nan_disc_iface_created_event_fixed_param_PROTOTYPE
  13662.  
  13663. /**
  13664. * Event to indicate NAN discovery interface deleted
  13665. */
  13666. typedef struct {
  13667. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_disc_iface_deleted_event_fixed_param */
  13668. A_UINT32 tlv_header;
  13669. /** Unique id identifying the VDEV */
  13670. A_UINT32 vdev_id;
  13671. } wmi_nan_disc_iface_deleted_event_fixed_param_PROTOTYPE;
  13672.  
  13673. #define wmi_nan_disc_iface_deleted_event_fixed_param wmi_nan_disc_iface_deleted_event_fixed_param_PROTOTYPE
  13674.  
  13675. /**
  13676. * Event to indicate NAN device started new cluster
  13677. */
  13678. typedef struct {
  13679. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_started_cluster_event_fixed_param */
  13680. A_UINT32 tlv_header;
  13681. /** Unique id identifying the VDEV */
  13682. A_UINT32 vdev_id;
  13683. /** NAN Cluster ID */
  13684. A_UINT32 nan_cluster_id;
  13685. } wmi_nan_started_cluster_event_fixed_param_PROTOTYPE;
  13686.  
  13687. #define wmi_nan_started_cluster_event_fixed_param wmi_nan_started_cluster_event_fixed_param_PROTOTYPE
  13688.  
  13689. /**
  13690. * Event to indicate NAN device joined to cluster
  13691. */
  13692. typedef struct {
  13693. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_joined_cluster_event_fixed_param */
  13694. A_UINT32 tlv_header;
  13695. /** Unique id identifying the VDEV */
  13696. A_UINT32 vdev_id;
  13697. /** NAN Cluster ID */
  13698. A_UINT32 nan_cluster_id;
  13699. } wmi_nan_joined_cluster_event_fixed_param_PROTOTYPE;
  13700.  
  13701. #define wmi_nan_joined_cluster_event_fixed_param wmi_nan_joined_cluster_event_fixed_param_PROTOTYPE
  13702.  
  13703. /** NAN DATA CMD's */
  13704.  
  13705. /**
  13706. * NAN Data get capabilities req
  13707. */
  13708. typedef struct {
  13709. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndi_get_cap_req_fixed_param */
  13710. A_UINT32 tlv_header;
  13711. /** unique id generated in upper layer for the transaction */
  13712. A_UINT32 transaction_id;
  13713. } wmi_ndi_get_cap_req_fixed_param_PROTOTYPE;
  13714.  
  13715. #define wmi_ndi_get_cap_req_fixed_param wmi_ndi_get_cap_req_fixed_param_PROTOTYPE
  13716.  
  13717. /**
  13718. * NDP Response code
  13719. */
  13720. typedef enum {
  13721. NDP_RSP_CODE_REQUEST_ACCEPT = 0x00,
  13722. NDP_RSP_CODE_REQUEST_REJECT = 0x01,
  13723. NDP_RSP_CODE_REQUEST_DEFER = 0x02,
  13724. } wmi_ndp_rsp_code_PROTOTYPE;
  13725.  
  13726. #define wmi_ndp_rsp_code wmi_ndp_rsp_code_PROTOTYPE
  13727.  
  13728. /**
  13729. * NDP Channel configuration type
  13730. */
  13731. typedef enum {
  13732. WMI_NDP_CHANNEL_NOT_REQUESTED = 0, /* Channel will not configured */
  13733. WMI_NDP_REQUEST_CHANNEL_SETUP = 1, /* Channel will be provided and is optional/hint */
  13734. WMI_NDP_FORCE_CHANNEL_SETUP = 2/* NDP must start on the provided channel */
  13735. } wmi_ndp_channel_cfg_PROTOTYPE;
  13736.  
  13737. #define wmi_ndp_channel_cfg wmi_ndp_channel_cfg_PROTOTYPE
  13738.  
  13739. /**
  13740. * NDP Initiator requesting a data session
  13741. */
  13742. typedef struct {
  13743. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_initiator_req_fixed_param */
  13744. A_UINT32 tlv_header;
  13745. /** Unique id identifying the VDEV */
  13746. A_UINT32 vdev_id;
  13747. /** unique id generated in upper layer for the transaction */
  13748. A_UINT32 transaction_id;
  13749. /** Unique Instance Id identifying the Responder's service */
  13750. A_UINT32 service_instance_id;
  13751. /** Discovery MAC addr of the publisher/peer */
  13752. wmi_mac_addr peer_discovery_mac_addr;
  13753. /** Actual number of bytes in TLV ndp_cfg */
  13754. A_UINT32 ndp_cfg_len;
  13755. /** Actual number of bytes in TLV ndp_app_info */
  13756. A_UINT32 ndp_app_info_len;
  13757. /** NDP channel configuration type defined in wmi_ndp_channel_cfg */
  13758. A_UINT32 ndp_channel_cfg;
  13759. /** NAN Cipher Suite Shared Key */
  13760. A_UINT32 nan_csid;
  13761. /** Actual number of bytes in TLV ndp_pmk */
  13762. A_UINT32 nan_pmk_len;
  13763. /** Actual number of bytes in TLV ndp_passphrase */
  13764. A_UINT32 nan_passphrase_len;
  13765. /** Actual number of bytes in TLV nan_servicename */
  13766. A_UINT32 nan_servicename_len;
  13767. /**
  13768. * TLV (tag length value) parameters follow the ndp_initiator_req
  13769. * structure. The TLV's are:
  13770. * wmi_channel channel;
  13771. * A_UINT8 ndp_cfg[];
  13772. * A_UINT8 ndp_app_info[];
  13773. * A_UINT8 ndp_pmk[];
  13774. * A_INT8 ndp_passphrase[];
  13775. * A_INT8 nan_servicename[];
  13776. */
  13777. } wmi_ndp_initiator_req_fixed_param_PROTOTYPE;
  13778.  
  13779. #define wmi_ndp_initiator_req_fixed_param wmi_ndp_initiator_req_fixed_param_PROTOTYPE
  13780.  
  13781. /**
  13782. * Initiate a data response on the responder side
  13783. * for data request indication from the peer
  13784. */
  13785. typedef struct {
  13786. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_responder_req_fixed_param */
  13787. A_UINT32 tlv_header;
  13788. /** Unique id identifying the VDEV */
  13789. A_UINT32 vdev_id;
  13790. /** unique id generated in upper layer for the transaction */
  13791. A_UINT32 transaction_id;
  13792. /**
  13793. * Unique token Id generated on the initiator/responder
  13794. * side used for a NDP session between two NAN devices
  13795. */
  13796. A_UINT32 ndp_instance_id;
  13797. /** Response Code defined in wmi_ndp_rsp_code */
  13798. A_UINT32 rsp_code;
  13799. /** Number of bytes in TLV ndp_cfg */
  13800. A_UINT32 ndp_cfg_len;
  13801. /** Number of bytes in TLV ndp_app_info */
  13802. A_UINT32 ndp_app_info_len;
  13803. /** NAN Cipher Suite Shared Key */
  13804. A_UINT32 nan_csid;
  13805. /** Actual number of bytes in TLV ndp_pmk */
  13806. A_UINT32 nan_pmk_len;
  13807. /** Actual number of bytes in TLV ndp_passphrase */
  13808. A_UINT32 nan_passphrase_len;
  13809. /** Actual number of bytes in TLV nan_servicename */
  13810. A_UINT32 nan_servicename_len;
  13811. /**
  13812. * TLV (tag length value) parameters follow the ndp_responder_req
  13813. * structure. The TLV's are:
  13814. * A_UINT8 ndp_cfg[];
  13815. * A_UINT8 ndp_app_info[];
  13816. * A_UINT8 ndp_pmk[];
  13817. * A_INT8 ndp_passphrase[];
  13818. * A_INT8 nan_servicename[];
  13819. */
  13820. } wmi_ndp_responder_req_fixed_param_PROTOTYPE;
  13821.  
  13822. #define wmi_ndp_responder_req_fixed_param wmi_ndp_responder_req_fixed_param_PROTOTYPE
  13823.  
  13824. /**
  13825. * NDP end type
  13826. */
  13827. typedef enum {
  13828. WMI_NDP_END_TYPE_UNSPECIFIED = 0x00,
  13829. WMI_NDP_END_TYPE_PEER_UNAVAILABLE = 0x01,
  13830. WMI_NDP_END_TYPE_OTA_FRAME = 0x02,
  13831. } wmi_ndp_end_type_PROTOTYPE;
  13832.  
  13833. #define wmi_ndp_end_type wmi_ndp_end_type_PROTOTYPE
  13834.  
  13835. /**
  13836. * NDP end reason code
  13837. */
  13838. typedef enum {
  13839. WMI_NDP_END_REASON_UNSPECIFIED = 0x00,
  13840. WMI_NDP_END_REASON_INACTIVITY = 0x01,
  13841. WMI_NDP_END_REASON_PEER_DATA_END = 0x02,
  13842. } wmi_ndp_end_reason_code_PROTOTYPE;
  13843.  
  13844. #define wmi_ndp_end_reason_code wmi_ndp_end_reason_code_PROTOTYPE
  13845.  
  13846. /**
  13847. * NDP end request
  13848. */
  13849. typedef struct {
  13850. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_end_req */
  13851. A_UINT32 tlv_header;
  13852. /** NDP instance id */
  13853. A_UINT32 ndp_instance_id;
  13854. } wmi_ndp_end_req_PROTOTYPE;
  13855.  
  13856. #define wmi_ndp_end_req wmi_ndp_end_req_PROTOTYPE
  13857.  
  13858. /**
  13859. * NDP End request
  13860. */
  13861. typedef struct {
  13862. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_end_req_fixed_param */
  13863. A_UINT32 tlv_header;
  13864. /** unique id generated in upper layer for the transaction */
  13865. A_UINT32 transaction_id;
  13866. /**
  13867. * TLV (tag length value) parameters follow the ndp_end_req
  13868. * structure. The TLV's are:
  13869. * wmi_ndp_end_req ndp_end_req_list[];
  13870. */
  13871. } wmi_ndp_end_req_fixed_param_PROTOTYPE;
  13872.  
  13873. #define wmi_ndp_end_req_fixed_param wmi_ndp_end_req_fixed_param_PROTOTYPE
  13874.  
  13875. /* NAN DATA RSP EVENTS */
  13876.  
  13877. /**
  13878. * Event to indicate NAN Data Interface capabilities cmd
  13879. */
  13880. typedef struct {
  13881. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndi_cap_rsp_event_fixed_param */
  13882. A_UINT32 tlv_header;
  13883. /** Copy of transaction_id received in wmi_ndi_get_cap_req */
  13884. A_UINT32 transaction_id;
  13885. /** Max ndi interface support */
  13886. A_UINT32 max_ndi_interfaces;
  13887. /** Max ndp sessions can support */
  13888. A_UINT32 max_ndp_sessions;
  13889. /** Max number of peer's per ndi */
  13890. A_UINT32 max_peers_per_ndi;
  13891. /** which combination of bands is supported - see NAN_DATA_SUPPORTED_BAND enums */
  13892. A_UINT32 nan_data_supported_bands;
  13893. } wmi_ndi_cap_rsp_event_fixed_param_PROTOTYPE;
  13894.  
  13895. #define wmi_ndi_cap_rsp_event_fixed_param wmi_ndi_cap_rsp_event_fixed_param_PROTOTYPE
  13896.  
  13897. /**
  13898. * NDP command response code
  13899. */
  13900. typedef enum {
  13901. NDP_CMD_RSP_STATUS_SUCCESS = 0x00,
  13902. NDP_CMD_RSP_STATUS_ERROR = 0x01,
  13903. } wmi_ndp_cmd_rsp_status_PROTOTYPE;
  13904.  
  13905. #define wmi_ndp_cmd_rsp_status wmi_ndp_cmd_rsp_status_PROTOTYPE
  13906.  
  13907. /**
  13908. * Event response for wmi_ndp_initiator_req
  13909. */
  13910. typedef struct {
  13911. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_initiator_rsp_event_fixed_param */
  13912. A_UINT32 tlv_header;
  13913. /** Unique id identifying the VDEV */
  13914. A_UINT32 vdev_id;
  13915. /** Copy of transaction_id received in wmi_ndp_initiator_req */
  13916. A_UINT32 transaction_id;
  13917. /** Response status defined in wmi_ndp_cmd_rsp_status*/
  13918. A_UINT32 rsp_status;
  13919. A_UINT32 reason_code;
  13920. /**
  13921. * Unique token Id generated on the initiator/responder
  13922. * side used for a NDP session between two NAN devices
  13923. */
  13924. A_UINT32 ndp_instance_id;
  13925. } wmi_ndp_initiator_rsp_event_fixed_param_PROTOTYPE;
  13926.  
  13927. #define wmi_ndp_initiator_rsp_event_fixed_param wmi_ndp_initiator_rsp_event_fixed_param_PROTOTYPE
  13928.  
  13929. /**
  13930. * Event response for wmi_ndp_responder_req cmd
  13931. */
  13932. typedef struct {
  13933. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_responder_rsp_event_fixed_param */
  13934. A_UINT32 tlv_header;
  13935. /** Unique id identifying the VDEV */
  13936. A_UINT32 vdev_id;
  13937. /** Copy of transaction_id received in wmi_ndp_responder_req */
  13938. A_UINT32 transaction_id;
  13939. /** Response status defined in wmi_ndp_cmd_rsp_status*/
  13940. A_UINT32 rsp_status;
  13941. A_UINT32 reason_code;
  13942. /**
  13943. * Unique token Id generated on the initiator/responder
  13944. * side used for a NDP session between two NAN devices
  13945. */
  13946. A_UINT32 ndp_instance_id;
  13947. /** NDI mac address of the peer */
  13948. wmi_mac_addr peer_ndi_mac_addr;
  13949. /** Host can create peer if this entry is TRUE */
  13950. A_UINT32 create_peer;
  13951. } wmi_ndp_responder_rsp_event_fixed_param_PROTOTYPE;
  13952.  
  13953. #define wmi_ndp_responder_rsp_event_fixed_param wmi_ndp_responder_rsp_event_fixed_param_PROTOTYPE
  13954. /**
  13955. * Active ndp instance id
  13956. */
  13957. typedef struct {
  13958. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_active_ndp_instance_id */
  13959. A_UINT32 tlv_header;
  13960. /** NDP instance id */
  13961. A_UINT32 ndp_instance_id;
  13962. } wmi_active_ndp_instance_id_PROTOTYPE;
  13963.  
  13964. #define wmi_active_ndp_instance_id wmi_active_ndp_instance_id_PROTOTYPE
  13965.  
  13966. /**
  13967. * NDP end response per ndi
  13968. */
  13969. typedef struct {
  13970. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_end_rsp_per_ndi */
  13971. A_UINT32 tlv_header;
  13972. /** Unique id identifying the VDEV */
  13973. A_UINT32 vdev_id;
  13974. /** Peer MAC addr */
  13975. wmi_mac_addr peer_mac_addr;
  13976. /** Number of active ndps on this ndi */
  13977. A_UINT32 num_active_ndps_on_ndi;
  13978. } wmi_ndp_end_rsp_per_ndi_PROTOTYPE;
  13979.  
  13980. #define wmi_ndp_end_rsp_per_ndi wmi_ndp_end_rsp_per_ndi_PROTOTYPE
  13981.  
  13982. /**
  13983. * Event response for wmi_ndp_end_req cmd
  13984. */
  13985. typedef struct {
  13986. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_end_rsp_event_fixed_param */
  13987. A_UINT32 tlv_header;
  13988. /** Copy of transaction_id received in wmi_ndp_end_req */
  13989. A_UINT32 transaction_id;
  13990. /** Response status defined in wmi_ndp_cmd_rsp_status*/
  13991. A_UINT32 rsp_status;
  13992. A_UINT32 reason_code;
  13993. /**
  13994. * TLV (tag length value) parameters follow the ndp_end_rsp
  13995. * structure. The TLV's are:
  13996. * wmi_ndp_end_rsp_per_ndi ndp_end_rsp_per_ndis[];
  13997. * wmi_active_ndp_instance_id active_ndp_instances_id[];
  13998. */
  13999. } wmi_ndp_end_rsp_event_fixed_param_PROTOTYPE;
  14000.  
  14001. #define wmi_ndp_end_rsp_event_fixed_param wmi_ndp_end_rsp_event_fixed_param_PROTOTYPE
  14002.  
  14003. /** NAN DATA EVENTS */
  14004.  
  14005. /**
  14006. * NDP self role
  14007. */
  14008. typedef enum {
  14009. WMI_NDP_INITIATOR_ROLE,
  14010. WMI_NDP_RESPONDER_ROLE,
  14011. } wmi_ndp_self_role_PROTOTYPE;
  14012.  
  14013. #define wmi_ndp_self_role wmi_ndp_self_role_PROTOTYPE
  14014.  
  14015. /**
  14016. * NDP accept policy
  14017. */
  14018. typedef enum {
  14019. WMI_NDP_ACCEPT_POLICY_NONE,
  14020. WMI_NDP_ACCEPT_POLICY_ALL,
  14021. } wmi_ndp_accept_policy_PROTOTYPE;
  14022.  
  14023. #define wmi_ndp_accept_policy wmi_ndp_accept_policy_PROTOTYPE
  14024.  
  14025. /**
  14026. * Event indication received on the responder side when a NDP Initiator request/
  14027. * NDP session is initiated on the Initiator side (self role will be NDP_RESPONDER_ROLE)
  14028. *
  14029. * Event indication received on the initiator side when a
  14030. * NDP responder request on the Initiator side (self role will be NDP_INITIATOR_ROLE)
  14031. */
  14032. typedef struct {
  14033. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_indication_event_fixed_param */
  14034. A_UINT32 tlv_header;
  14035. /** Unique id identifying the VDEV */
  14036. A_UINT32 vdev_id;
  14037. /** Self NDP Role defined in wmi_ndp_self_role */
  14038. A_UINT32 self_ndp_role;
  14039. /** Accept policy defined in wmi_ndp_accept_policy */
  14040. A_UINT32 accept_policy;
  14041. /** Unique Instance Id corresponding to a service/session. */
  14042. A_UINT32 service_instance_id;
  14043. /** Discovery MAC addr of the peer/initiator */
  14044. wmi_mac_addr peer_discovery_mac_addr;
  14045. /** NDI mac address of the peer */
  14046. wmi_mac_addr peer_ndi_mac_addr;
  14047. /**
  14048. * Unique token Id generated on the initiator/responder
  14049. * side used for a NDP session between two NAN devices
  14050. */
  14051. A_UINT32 ndp_instance_id;
  14052. /** Number of bytes in TLV wmi_ndp_cfg */
  14053. A_UINT32 ndp_cfg_len;
  14054. /** Number of bytes in TLV wmi_ndp_app_info */
  14055. A_UINT32 ndp_app_info_len;
  14056. /** Peer NAN Cipher Suite Shared Key */
  14057. A_UINT32 nan_csid;
  14058. /** Actual number of bytes in TLV nan_scid */
  14059. A_UINT32 nan_scid_len;
  14060. /** Self NDI mac address */
  14061. wmi_mac_addr self_ndi_mac_addr;
  14062. /**
  14063. * TLV (tag length value) parameters follow the ndp_indication
  14064. * structure. The TLV's are:
  14065. * A_UINT8 ndp_cfg[];
  14066. * A_UINT8 ndp_app_info[];
  14067. * A_UINT8 nan_scid[];
  14068. */
  14069. } wmi_ndp_indication_event_fixed_param_PROTOTYPE;
  14070.  
  14071. #define wmi_ndp_indication_event_fixed_param wmi_ndp_indication_event_fixed_param_PROTOTYPE
  14072.  
  14073. /**
  14074. * Event indication of data confirm is received on both
  14075. * initiator and responder side confirming a NDP session
  14076. */
  14077. typedef struct {
  14078. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_confirm_event_fixed_param */
  14079. A_UINT32 tlv_header;
  14080. /** Unique id identifying the VDEV */
  14081. A_UINT32 vdev_id;
  14082. /**
  14083. * Unique token Id generated on the initiator/responder
  14084. * side used for a NDP session between two NAN devices
  14085. */
  14086. A_UINT32 ndp_instance_id;
  14087. /** NDI mac address of the peer (required to derive target ipv6 address) */
  14088. wmi_mac_addr peer_ndi_mac_addr;
  14089. /** Response Code defined in wmi_ndp_rsp_code */
  14090. A_UINT32 rsp_code;
  14091. /** Number of bytes in TLV wmi_ndp_cfg */
  14092. A_UINT32 ndp_cfg_len;
  14093. /** Number of bytes in TLV wmi_ndp_app_info */
  14094. A_UINT32 ndp_app_info_len;
  14095. /** Reason Code */
  14096. A_UINT32 reason_code;
  14097. /** Number of active ndps on this peer */
  14098. A_UINT32 num_active_ndps_on_peer;
  14099. /**
  14100. * TLV (tag length value) parameters follow the ndp_confirm
  14101. * structure. The TLV's are:
  14102. * A_UINT8 ndp_cfg[];
  14103. * A_UINT8 ndp_app_info[];
  14104. */
  14105. } wmi_ndp_confirm_event_fixed_param_PROTOTYPE;
  14106.  
  14107. #define wmi_ndp_confirm_event_fixed_param wmi_ndp_confirm_event_fixed_param_PROTOTYPE
  14108.  
  14109. /**
  14110. * Event indication received on the initiator/responder side terminating a NDP session
  14111. */
  14112. typedef struct {
  14113. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_end_indication */
  14114. A_UINT32 tlv_header;
  14115. /** type defined in wmi_ndp_end_type */
  14116. A_UINT32 type;
  14117. /** Unique id identifying the VDEV */
  14118. A_UINT32 vdev_id;
  14119. /** reason_code defined in wmi_ndp_end_reason_code */
  14120. A_UINT32 reason_code;
  14121. /** NDP instance id */
  14122. A_UINT32 ndp_instance_id;
  14123. /** NDI MAC addr of the peer */
  14124. wmi_mac_addr peer_ndi_mac_addr;
  14125. /** Number of active ndps on this peer */
  14126. A_UINT32 num_active_ndps_on_peer;
  14127. } wmi_ndp_end_indication_PROTOTYPE;
  14128.  
  14129. #define wmi_ndp_end_indication wmi_ndp_end_indication_PROTOTYPE
  14130.  
  14131. typedef struct {
  14132. A_UINT32 tlv_header;
  14133. A_UINT32 num_data;
  14134. /* followed by WMITLV_TAG_ARRAY_BYTE */
  14135. } wmi_diag_data_container_event_fixed_param;
  14136.  
  14137. enum {
  14138. WMI_PDEV_PARAM_TXPOWER_REASON_NONE = 0,
  14139. WMI_PDEV_PARAM_TXPOWER_REASON_SAR,
  14140. WMI_PDEV_PARAM_TXPOWER_REASON_MAX
  14141. };
  14142.  
  14143. #define PDEV_PARAM_TXPOWER_VALUE_MASK 0x000000FF
  14144. #define PDEV_PARAM_TXPOWER_VALUE_SHIFT 0
  14145.  
  14146. #define PDEV_PARAM_TXPOWER_REASON_MASK 0x0000FF00
  14147. #define PDEV_PARAM_TXPOWER_REASON_SHIFT 8
  14148.  
  14149. #define SET_PDEV_PARAM_TXPOWER_VALUE(txpower_param, value) \
  14150. ((txpower_param) &= ~PDEV_PARAM_TXPOWER_VALUE_MASK, (txpower_param) |= ((value) << PDEV_PARAM_TXPOWER_VALUE_SHIFT))
  14151.  
  14152. #define SET_PDEV_PARAM_TXPOWER_REASON(txpower_param, value) \
  14153. ((txpower_param) &= ~PDEV_PARAM_TXPOWER_REASON_MASK, (txpower_param) |= ((value) << PDEV_PARAM_TXPOWER_REASON_SHIFT))
  14154.  
  14155. #define GET_PDEV_PARAM_TXPOWER_VALUE(txpower_param) \
  14156. (((txpower_param) & PDEV_PARAM_TXPOWER_VALUE_MASK) >> PDEV_PARAM_TXPOWER_VALUE_SHIFT)
  14157.  
  14158. #define GET_PDEV_PARAM_TXPOWER_REASON(txpower_param) \
  14159. (((txpower_param) & PDEV_PARAM_TXPOWER_REASON_MASK) >> PDEV_PARAM_TXPOWER_REASON_SHIFT)
  14160.  
  14161. #define PDEV_PARAM_SMART_CHAINMASK_SCHEME_DECISION_MASK 0x00000001
  14162. #define PDEV_PARAM_SMART_CHAINMASK_SCHEME_DECISION_SHIFT 0
  14163.  
  14164. #define SET_PDEV_SMART_CHAINMASK_SCHEME_DECISION(param, value) \
  14165. do { \
  14166. (param) &= ~PDEV_PARAM_SMART_CHAINMASK_SCHEME_DECISION_MASK; \
  14167. (param) |= (value) << PDEV_PARAM_SMART_CHAINMASK_SCHEME_DECISION_SHIFT; \
  14168. while (0)
  14169.  
  14170. #define GET_PDEV_SMART_CHAINMASK_SCHEME_DECISION(param) \
  14171. (((param) & PDEV_PARAM_SMART_CHAINMASK_SCHEME_DECISION_MASK) >> PDEV_PARAM_SMART_CHAINMASK_SCHEME_DECISION_SHIFT)
  14172.  
  14173. /**
  14174. * This command is sent from WLAN host driver to firmware to
  14175. * notify the current modem power state. Host would receive a
  14176. * message from modem when modem is powered on. Host driver
  14177. * would then send this command to firmware. Firmware would then
  14178. * power on WCI-2 (UART) interface for LTE/MWS Coex.
  14179. *
  14180. * This command is only applicable for APQ platform which has
  14181. * modem on the platform. If firmware doesn't support MWS Coex,
  14182. * this command can be dropped by firmware.
  14183. *
  14184. * This is a requirement from modem team that WCN can't toggle
  14185. * UART before modem is powered on.
  14186. */
  14187. typedef struct {
  14188. /** TLV tag and len; tag equals
  14189. * WMITLV_TAG_STRUC_wmi_modem_power_state_cmd_param */
  14190. A_UINT32 tlv_header;
  14191.  
  14192. /** Modem power state parameter */
  14193. A_UINT32 modem_power_state;
  14194. } wmi_modem_power_state_cmd_param;
  14195.  
  14196. enum {
  14197. WMI_MODEM_STATE_OFF = 0,
  14198. WMI_MODEM_STATE_ON
  14199. };
  14200.  
  14201. /**
  14202. * This command is sent from WLAN host driver to firmware to
  14203. * notify the updated Specific Absorption Rate (SAR) limits.
  14204. * A critical regulation for FCC compliance, OEMs require methods to set
  14205. * limits on TX power of WLAN/WWAN.
  14206. * Host would receive instructions on what to set the limits per
  14207. * band/chain/modulation to, it would then interpret and send the limits
  14208. * to FW using this WMI message.
  14209. * Since it is possible to have too many commands to fit into one message,
  14210. * FW will keep receiving the messages, until it finds one with
  14211. * commit_limits = 1, at which point it will apply all the received
  14212. * specifications.
  14213. */
  14214. typedef struct {
  14215. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar_limits_cmd_param */
  14216. A_UINT32 tlv_header;
  14217.  
  14218. /** when set to WMI_SAR_FEATURE_ON_*, enable SAR feature
  14219. * with BDF (SET_0 to 4) or WMI
  14220. * if set to WMI_SAR_FEATURE_OFF, disable feature;
  14221. * if set to WMI_SAR_FEATURE_NO_CHANGE, do not alter state of feature;
  14222. */
  14223. A_UINT32 sar_enable;
  14224.  
  14225. /** number of items in sar_limits[] */
  14226. A_UINT32 num_limit_rows;
  14227.  
  14228. /** once received and is set to 1, FW will calculate the power limits
  14229. * and send set_power command to apply them.
  14230. * Otherwise just update local values stored in FW until a future msg
  14231. * with commit_limits=1 arrives.
  14232. */
  14233. A_UINT32 commit_limits;
  14234.  
  14235. /**
  14236. * TLV (tag length value) parameters follow the sar_limit_cmd_row
  14237. * structure. The TLV's are:
  14238. * wmi_sar_limit_cmd_row sar_limits[];
  14239. */
  14240. } wmi_sar_limits_cmd_fixed_param;
  14241.  
  14242. enum wmi_sar_feature_state_flags {
  14243. WMI_SAR_FEATURE_OFF = 0,
  14244. WMI_SAR_FEATURE_ON_SET_0,
  14245. WMI_SAR_FEATURE_ON_SET_1,
  14246. WMI_SAR_FEATURE_ON_SET_2,
  14247. WMI_SAR_FEATURE_ON_SET_3,
  14248. WMI_SAR_FEATURE_ON_SET_4,
  14249. WMI_SAR_FEATURE_NO_CHANGE,
  14250. WMI_SAR_FEATURE_ON_USER_DEFINED,
  14251. };
  14252.  
  14253. typedef struct {
  14254. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar_limit_cmd_row */
  14255.  
  14256. /** Current values: WMI_SAR_2G_ID, WMI_SAR_5G_ID. Can be extended by adding
  14257. * new band_id values .
  14258. */
  14259. A_UINT32 band_id;
  14260.  
  14261. A_UINT32 chain_id;
  14262.  
  14263. /** Current values: WMI_SAR_MOD_CCK, WMI_SAR_MOD_OFDM */
  14264. A_UINT32 mod_id;
  14265.  
  14266. /** actual power limit value, in steps of 0.5 dBm */
  14267. A_UINT32 limit_value;
  14268.  
  14269. /** in case the OEM doesn't care about one of the qualifiers from above,
  14270. * the bit for that qualifier within the validity_bitmap can be set to 0
  14271. * so that limit is applied to all possible cases of this qualifier
  14272. * (i.e. if a qualifier's validity_bitmap flag is 0, the qualifier is
  14273. * treated as a wildcard).
  14274. * Current masks:
  14275. * WMI_SAR_BAND_ID_VALID_MASK
  14276. * WMI_SAR_CHAIN_ID_VALID_MASK
  14277. * WMI_SAR_MOD_ID_VALID_MASK
  14278. * Example: if !WMI_IS_SAR_MOD_ID_VALID(bitmap),
  14279. * it means apply same limit_value to both WMI_SAR_MOD_CCK and
  14280. * WMI_SAR_MOD_OFDM cases.
  14281. */
  14282. A_UINT32 validity_bitmap;
  14283. } wmi_sar_limit_cmd_row;
  14284.  
  14285. enum wmi_sar_band_id_flags {
  14286. WMI_SAR_2G_ID = 0,
  14287. WMI_SAR_5G_ID
  14288. };
  14289.  
  14290. enum wmi_sar_mod_id_flags {
  14291. WMI_SAR_MOD_CCK = 0,
  14292. WMI_SAR_MOD_OFDM
  14293. };
  14294.  
  14295. #define WMI_SAR_BAND_ID_VALID_MASK (0x1)
  14296. #define WMI_SAR_CHAIN_ID_VALID_MASK (0x2)
  14297. #define WMI_SAR_MOD_ID_VALID_MASK (0x4)
  14298.  
  14299. #define WMI_SET_SAR_BAND_ID_VALID(bitmap) ((bitmap) |= WMI_SAR_BAND_ID_VALID_MASK)
  14300. #define WMI_SET_SAR_CHAIN_ID_VALID(bitmap) ((bitmap) |= WMI_SAR_CHAIN_ID_VALID_MASK)
  14301. #define WMI_SET_SAR_MOD_ID_VALID(bitmap) ((bitmap) |= WMI_SAR_MOD_ID_VALID_MASK)
  14302.  
  14303. #define WMI_IS_SAR_BAND_ID_VALID(bitmap) ((bitmap) & WMI_SAR_BAND_ID_VALID_MASK)
  14304. #define WMI_IS_SAR_CHAIN_ID_VALID(bitmap) ((bitmap) & WMI_SAR_CHAIN_ID_VALID_MASK)
  14305. #define WMI_IS_SAR_MOD_ID_VALID(bitmap) ((bitmap) & WMI_SAR_MOD_ID_VALID_MASK)
  14306.  
  14307. #define WMI_ROAM_AUTH_STATUS_CONNECTED 0x1 /** connected, but not authenticated */
  14308. #define WMI_ROAM_AUTH_STATUS_AUTHENTICATED 0x2 /** connected and authenticated */
  14309.  
  14310. /** WMI_ROAM_SYNCH_EVENT: roam synch event triggering the host propagation logic
  14311. generated whenever firmware roamed to new AP silently and
  14312. (a) If the host is awake, FW sends the event to the host immediately .
  14313. (b) If host is in sleep then either
  14314. (1) FW waits until host sends WMI_PDEV_RESUME_CMDID or WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID
  14315. command to FW (part of host wake up sequence from low power mode) before sending the event host.
  14316. (2) data/mgmt frame is received from roamed AP, which needs to return to host
  14317. */
  14318.  
  14319. typedef struct {
  14320. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_key_material */
  14321. A_UINT32 tlv_header;
  14322.  
  14323. A_UINT8 kck[GTK_OFFLOAD_KCK_BYTES]; /* EAPOL-Key Key Confirmation Key (KCK) */
  14324. A_UINT8 kek[GTK_OFFLOAD_KEK_BYTES]; /* EAPOL-Key Key Encryption Key (KEK) */
  14325. A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES];
  14326. } wmi_key_material;
  14327.  
  14328. typedef struct {
  14329. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_synch_event_fixed_param */
  14330. /** Unique id identifying the VDEV on which roaming is done by firmware */
  14331. A_UINT32 vdev_id;
  14332. /** auth_status: connected or authorized */
  14333. A_UINT32 auth_status;
  14334. /** roam_reason:
  14335. * bits 0-3 for roam reason see WMI_ROAM_REASON_XXX
  14336. * bits 4-5 for subnet status see WMI_ROAM_SUBNET_CHANGE_STATUS_XXX.
  14337. */
  14338. A_UINT32 roam_reason;
  14339. /** associated AP's rssi calculated by FW when reason code is WMI_ROAM_REASON_LOW_RSSI. not valid if roam_reason is BMISS */
  14340. A_UINT32 rssi;
  14341. /** MAC address of roamed AP */
  14342. wmi_mac_addr bssid; /* BSSID */
  14343. /** whether the frame is beacon or probe rsp */
  14344. A_UINT32 is_beacon;
  14345. /** the length of beacon/probe rsp */
  14346. A_UINT32 bcn_probe_rsp_len;
  14347. /** the length of reassoc rsp */
  14348. A_UINT32 reassoc_rsp_len;
  14349. /** the length of reassoc req */
  14350. A_UINT32 reassoc_req_len;
  14351. /**
  14352. * TLV (tag length value) parameters follows roam_synch_event
  14353. * The TLV's are:
  14354. * A_UINT8 bcn_probe_rsp_frame[]; length identified by bcn_probe_rsp_len
  14355. * A_UINT8 reassoc_rsp_frame[]; length identified by reassoc_rsp_len
  14356. * wmi_channel chan;
  14357. * wmi_key_material key;
  14358. * A_UINT32 status; subnet changed status not being used currently.
  14359. * will pass the information using roam_status.
  14360. * A_UINT8 reassoc_req_frame[]; length identified by reassoc_req_len
  14361. *
  14362. **/
  14363. } wmi_roam_synch_event_fixed_param;
  14364.  
  14365. #define WMI_PEER_ESTIMATED_LINKSPEED_INVALID 0xFFFFFFFF
  14366.  
  14367. typedef struct {
  14368. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_ wmi_peer_get_estimated_linkspeed_cmd_fixed_param */
  14369. A_UINT32 tlv_header;
  14370. /** MAC address of the peer for which the estimated link speed is required. */
  14371. wmi_mac_addr peer_macaddr;
  14372. /* Set to 1 only if vdev_id field is valid */
  14373. A_UINT32 valid_vdev_id;
  14374. /* VDEV to which the peer belongs to */
  14375. A_UINT32 vdev_id;
  14376. } wmi_peer_get_estimated_linkspeed_cmd_fixed_param;
  14377.  
  14378. typedef struct {
  14379. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_ wmi_peer_estimated_linkspeed_event_fixed_param */
  14380. A_UINT32 tlv_header;
  14381. /** MAC address of the peer for which the estimated link speed is required.
  14382. */
  14383. wmi_mac_addr peer_macaddr;
  14384. /* Estimated link speed in kbps.
  14385. * When est_linkspeed_kbps is not valid, the value is set to WMI_PEER_ESTIMATED_LINKSPEED_INVALID.
  14386. */
  14387. A_UINT32 est_linkspeed_kbps;
  14388. /* Set to 1 only if vdev_id field is valid */
  14389. A_UINT32 valid_vdev_id;
  14390. /* VDEV to which the peer belongs to */
  14391. A_UINT32 vdev_id;
  14392. } wmi_peer_estimated_linkspeed_event_fixed_param;
  14393.  
  14394. typedef struct {
  14395. A_UINT32 tlv_header; /* TLV tag and len; tag equals */
  14396. /* vdev ID */
  14397. A_UINT32 vdev_id;
  14398. A_UINT32 data_len; /** length in byte of data[]. */
  14399. /* This structure is used to send REQ binary blobs
  14400. * from application/service to firmware where Host drv is pass through .
  14401. * Following this structure is the TLV:
  14402. * A_UINT8 data[]; <-- length in byte given by field data_len.
  14403. */
  14404. } wmi_req_stats_ext_cmd_fixed_param;
  14405.  
  14406. typedef struct {
  14407. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats1_event_fix_param */
  14408. A_UINT32 vdev_id; /** vdev ID */
  14409. A_UINT32 data_len; /** length in byte of data[]. */
  14410. /* This structure is used to send REQ binary blobs
  14411. * from firmware to application/service where Host drv is pass through .
  14412. * Following this structure is the TLV:
  14413. * A_UINT8 data[]; <-- length in byte given by field data_len.
  14414. */
  14415. } wmi_stats_ext_event_fixed_param;
  14416.  
  14417. typedef struct {
  14418. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_delete_resp_event_fixed_param */
  14419. /** unique id identifying the VDEV, generated by the caller */
  14420. A_UINT32 vdev_id;
  14421. /** peer MAC address */
  14422. wmi_mac_addr peer_macaddr;
  14423. } wmi_peer_delete_resp_event_fixed_param;
  14424.  
  14425. typedef struct {
  14426. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_ wmi_peer_state_event_fixed_param */
  14427. A_UINT32 tlv_header;
  14428. A_UINT32 vdev_id; /* vdev ID */
  14429. /* MAC address of the peer for which the estimated link speed is required.*/
  14430. wmi_mac_addr peer_macaddr;
  14431. A_UINT32 state; /* peer state */
  14432. } wmi_peer_state_event_fixed_param;
  14433.  
  14434. typedef struct {
  14435. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_assoc_conf_event_fixed_param */
  14436. A_UINT32 tlv_header;
  14437. /* unique id identifying the VDEV, generated by the caller */
  14438. A_UINT32 vdev_id;
  14439. /* peer MAC address */
  14440. wmi_mac_addr peer_macaddr;
  14441. } wmi_peer_assoc_conf_event_fixed_param;
  14442.  
  14443. enum {
  14444. WMI_2G4_HT40_OBSS_SCAN_PASSIVE = 0, /** scan_type: passive */
  14445. WMI_2G4_HT40_OBSS_SCAN_ACTIVE, /** scan_type: active */
  14446. };
  14447.  
  14448. typedef struct {
  14449. /**
  14450. * TLV tag and len;
  14451. * tag equals WMITLV_TAG_STRUC_wmi_obss_scan_enalbe_cmd_fixed_param
  14452. */
  14453. A_UINT32 tlv_header;
  14454. A_UINT32 vdev_id;
  14455. /**
  14456. * active or passive. if active all the channels are actively scanned.
  14457. * if passive then all the channels are passively scanned
  14458. */
  14459. A_UINT32 scan_type;
  14460. /**
  14461. * FW can perform multiple scans with in a OBSS scan interval.
  14462. * For each scan,
  14463. * if the scan is passive then obss_scan_passive_dwell is minimum dwell to be used for each channel ,
  14464. * if the scan is active then obss_scan_active_dwell is minimum dwell to be used for each channel .
  14465. * The unit for these 2 parameters is TUs.
  14466. */
  14467. A_UINT32 obss_scan_passive_dwell;
  14468. A_UINT32 obss_scan_active_dwell;
  14469. /**
  14470. * OBSS scan interval . FW needs to perform one or more OBSS scans within this interval and fulfill the
  14471. * both min and total per channel dwell time requirement
  14472. */
  14473. A_UINT32 bss_channel_width_trigger_scan_interval;
  14474. /**
  14475. * FW can perform multiple scans with in a OBSS scan interval.
  14476. * For each scan,
  14477. * the total per channel dwell time across all scans with in OBSS scan interval should be
  14478. * atleast obss_scan_passive_total_per channel for passive scas and obss_scan_active_total_per channel
  14479. * for active scans and ,
  14480. * The unit for these 2 parameters is TUs.
  14481. */
  14482. A_UINT32 obss_scan_passive_total_per_channel;
  14483. A_UINT32 obss_scan_active_total_per_channel;
  14484. A_UINT32 bss_width_channel_transition_delay_factor; /** parameter to check exemption from scan */
  14485. A_UINT32 obss_scan_activity_threshold; /** parameter to check exemption from scan */
  14486. /** following two parameters used by FW to fill IEs when sending 20/40 coexistence action frame to AP */
  14487. A_UINT32 forty_mhz_intolerant; /** STA 40M bandwidth intolerant capability */
  14488. A_UINT32 current_operating_class; /** STA current operating class */
  14489. /** length of 2.4GHz channel list to scan at, channel list in tlv->channels[] */
  14490. A_UINT32 channel_len;
  14491. /** length of optional ie data to append to probe reqest when active scan, ie data in tlv->ie_field[] */
  14492. A_UINT32 ie_len;
  14493. } wmi_obss_scan_enable_cmd_fixed_param;
  14494.  
  14495. typedef struct {
  14496. /**
  14497. * TLV tag and len;
  14498. * tag equals WMITLV_TAG_STRUC_wmi_obss_scan_disalbe_cmd_fixed_param
  14499. */
  14500. A_UINT32 tlv_header;
  14501. A_UINT32 vdev_id;
  14502. } wmi_obss_scan_disable_cmd_fixed_param;
  14503.  
  14504. typedef struct {
  14505. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offload_prb_rsp_tx_status_event_fixed_param */
  14506. A_UINT32 tlv_header;
  14507. /** unique id identifying the VDEV */
  14508. A_UINT32 vdev_id;
  14509. /** prb rsp tx status, values defined in enum WMI_FRAME_TX_STATUS */
  14510. A_UINT32 tx_status;
  14511. } wmi_offload_prb_rsp_tx_status_event_fixed_param;
  14512.  
  14513. typedef enum {
  14514. WMI_FRAME_TX_OK, /* frame tx ok */
  14515. WMI_FRAME_TX_XRETRY, /* excessivley retried */
  14516. WMI_FRAME_TX_DROP, /* frame dropped by FW due to resources */
  14517. WMI_FRAME_TX_FILTERED, /* frame filtered by hardware */
  14518. } WMI_FRAME_TX_STATUS;
  14519.  
  14520. /**
  14521. * This command is sent from WLAN host driver to firmware to
  14522. * request firmware to send the latest channel avoidance range
  14523. * to host.
  14524. *
  14525. * This command is only applicable for APQ platform which has
  14526. * modem on the platform. If firmware doesn't support MWS Coex,
  14527. * this command can be dropped by firmware.
  14528. *
  14529. * Host would send this command to firmware to request a channel
  14530. * avoidance information update.
  14531. */
  14532. typedef struct {
  14533. /** TLV tag and len; tag equals
  14534. * WMITLV_TAG_STRUC_wmi_chan_avoid_update_cmd_param */
  14535. A_UINT32 tlv_header;
  14536. } wmi_chan_avoid_update_cmd_param;
  14537.  
  14538. /* ExtScan operation mode */
  14539. typedef enum {
  14540. WMI_EXTSCAN_MODE_NONE = 0x0000,
  14541. WMI_EXTSCAN_MODE_START = 0x0001, /* ExtScan/TableMonitoring operation started */
  14542. WMI_EXTSCAN_MODE_STOP = 0x0002, /* ExtScan/TableMonitoring operation stopped */
  14543. WMI_EXTSCAN_MODE_IGNORED = 0x0003, /* ExtScan command ignored due to error */
  14544. } wmi_extscan_operation_mode;
  14545.  
  14546. /* Channel Mask */
  14547. typedef enum {
  14548. WMI_CHANNEL_BAND_UNSPECIFIED = 0x0000,
  14549. WMI_CHANNEL_BAND_24 = 0x0001, /* 2.4 channel */
  14550. WMI_CHANNEL_BAND_5_NON_DFS = 0x0002, /* 5G Channels (No DFS channels) */
  14551. WMI_CHANNEL_BAND_DFS = 0x0004, /* DFS channels */
  14552. } wmi_channel_band_mask;
  14553.  
  14554. typedef enum {
  14555. WMI_EXTSCAN_CYCLE_STARTED_EVENT = 0x0001,
  14556. WMI_EXTSCAN_CYCLE_COMPLETED_EVENT = 0x0002,
  14557. WMI_EXTSCAN_BUCKET_STARTED_EVENT = 0x0004,
  14558. WMI_EXTSCAN_BUCKET_COMPLETED_EVENT = 0x0008,
  14559. WMI_EXTSCAN_BUCKET_FAILED_EVENT = 0x0010,
  14560. WMI_EXTSCAN_BUCKET_OVERRUN_EVENT = 0x0020,
  14561. WMI_EXTSCAN_THRESHOLD_NUM_SCANS = 0x0040,
  14562. WMI_EXTSCAN_THRESHOLD_PERCENT = 0x0080,
  14563.  
  14564. WMI_EXTSCAN_EVENT_MAX = 0x8000
  14565. } wmi_extscan_event_type;
  14566.  
  14567. #define WMI_EXTSCAN_CYCLE_EVENTS_MASK (WMI_EXTSCAN_CYCLE_STARTED_EVENT | \
  14568. WMI_EXTSCAN_CYCLE_COMPLETED_EVENT)
  14569.  
  14570. #define WMI_EXTSCAN_BUCKET_EVENTS_MASK (WMI_EXTSCAN_BUCKET_STARTED_EVENT | \
  14571. WMI_EXTSCAN_BUCKET_COMPLETED_EVENT | \
  14572. WMI_EXTSCAN_BUCKET_FAILED_EVENT | \
  14573. WMI_EXTSCAN_BUCKET_OVERRUN_EVENT)
  14574.  
  14575. typedef enum {
  14576. WMI_EXTSCAN_NO_FORWARDING = 0x0000,
  14577. WMI_EXTSCAN_FORWARD_FRAME_TO_HOST = 0x0001
  14578. } wmi_extscan_forwarding_flags;
  14579.  
  14580. typedef enum {
  14581. WMI_EXTSCAN_USE_MSD = 0x0001, /* Use Motion Sensor Detection */
  14582. WMI_EXTSCAN_EXTENDED_BATCHING_EN = 0x0002, /* Extscan LPASS extended batching feature is supported and enabled */
  14583. } wmi_extscan_configuration_flags;
  14584.  
  14585. typedef enum {
  14586. WMI_EXTSCAN_BUCKET_CACHE_RESULTS = 0x0001, /* Cache the results of bucket whose configuration flags has this bit set */
  14587. WMI_EXTSCAN_REPORT_EVENT_CONTEXT_HUB = 0x0002, /* Report ext scan results to context hub or not. */
  14588. } wmi_extscan_bucket_configuration_flags;
  14589.  
  14590. typedef enum {
  14591. WMI_EXTSCAN_STATUS_OK = 0,
  14592. WMI_EXTSCAN_STATUS_ERROR = 0x80000000,
  14593. WMI_EXTSCAN_STATUS_INVALID_PARAMETERS,
  14594. WMI_EXTSCAN_STATUS_INTERNAL_ERROR
  14595. } wmi_extscan_start_stop_status;
  14596.  
  14597. typedef struct {
  14598. /** Request ID - to identify command. Cannot be 0 */
  14599. A_UINT32 request_id;
  14600. /** Requestor ID - client requesting ExtScan */
  14601. A_UINT32 requestor_id;
  14602. /** VDEV id(interface) that is requesting scan */
  14603. A_UINT32 vdev_id;
  14604. } wmi_extscan_command_id;
  14605.  
  14606. typedef struct {
  14607. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  14608. /** channel number */
  14609. A_UINT32 channel;
  14610.  
  14611. /** dwell time in msec - use defaults if 0 */
  14612. A_UINT32 min_dwell_time;
  14613. A_UINT32 max_dwell_time;
  14614.  
  14615. /** passive/active channel and other flags */
  14616. A_UINT32 control_flags; /* 0 => active, 1 => passive scan; ignored for DFS */
  14617. } wmi_extscan_bucket_channel;
  14618.  
  14619. /* Scan Bucket specification */
  14620. typedef struct {
  14621. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  14622. /** Bucket ID - 0-based */
  14623. A_UINT32 bucket_id;
  14624. /** ExtScan events subscription - events to be reported to client (see wmi_extscan_event_type) */
  14625. A_UINT32 notify_extscan_events;
  14626. /** Options to forward scan results - see wmi_extscan_forwarding_flags */
  14627. A_UINT32 forwarding_flags;
  14628. /** ExtScan configuration flags - wmi_extscan_bucket_configuration_flags */
  14629. A_UINT32 configuration_flags;
  14630. /** DEPRECATED member: multiplier to be applied to the periodic scan's base period */
  14631. A_UINT32 base_period_multiplier;
  14632. /** dwell time in msec on active channels - use defaults if 0 */
  14633. A_UINT32 min_dwell_time_active;
  14634. A_UINT32 max_dwell_time_active;
  14635. /** dwell time in msec on passive channels - use defaults if 0 */
  14636. A_UINT32 min_dwell_time_passive;
  14637. A_UINT32 max_dwell_time_passive;
  14638. /** see wmi_channel_band_mask; when equal to WMI_CHANNEL_UNSPECIFIED, use channel list */
  14639. A_UINT32 channel_band;
  14640. /** number of channels (if channel_band is WMI_CHANNEL_UNSPECIFIED) */
  14641. A_UINT32 num_channels;
  14642. /** scan period upon start or restart of the bucket - periodicity of the bucket to begin with */
  14643. A_UINT32 min_period;
  14644. /** period above which exponent is not applied anymore */
  14645. A_UINT32 max_period;
  14646. /** back off value to be applied to bucket's periodicity after exp_max_step_count scan cycles
  14647. * new_bucket_period = last_bucket_period + last_exponent_period * exp_backoff
  14648. */
  14649. A_UINT32 exp_backoff;
  14650. /** number of scans performed at a given periodicity after which exponential back off value is
  14651. * applied to current periodicity to obtain a newer one
  14652. */
  14653. A_UINT32 exp_max_step_count;
  14654. /** Followed by the variable length TLV chan_list:
  14655. * wmi_extscan_bucket_channel chan_list[] */
  14656. } wmi_extscan_bucket;
  14657.  
  14658. typedef struct {
  14659. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_start_cmd_fixed_param */
  14660. /** Request ID - to identify command. Cannot be 0 */
  14661. A_UINT32 request_id;
  14662. /** Requestor ID - client requesting ExtScan */
  14663. A_UINT32 requestor_id;
  14664. /** VDEV id(interface) that is requesting scan */
  14665. A_UINT32 vdev_id;
  14666. /** table ID - to allow support for multiple simultaneous requests */
  14667. A_UINT32 table_id;
  14668. /** Base period (milliseconds) used by scan buckets to define periodicity of the scans */
  14669. A_UINT32 base_period;
  14670. /** Maximum number of iterations to run - one iteration is the scanning of the least frequent bucket */
  14671. A_UINT32 max_iterations;
  14672. /** Options to forward scan results - see wmi_extscan_forwarding_flags */
  14673. A_UINT32 forwarding_flags;
  14674. /** ExtScan configuration flags - wmi_extscan_configuration_flags */
  14675. A_UINT32 configuration_flags;
  14676. /** ExtScan events subscription - bitmask indicating which events should be send to client (see wmi_extscan_event_type) */
  14677. A_UINT32 notify_extscan_events;
  14678. /** Scan Priority, input to scan scheduler */
  14679. A_UINT32 scan_priority;
  14680. /** Maximum number of BSSIDs to cache on each scan cycle */
  14681. A_UINT32 max_bssids_per_scan_cycle;
  14682. /** Minimum RSSI value to report */
  14683. A_UINT32 min_rssi;
  14684. /** Maximum table usage in percentage */
  14685. A_UINT32 max_table_usage;
  14686. /** default dwell time in msec on active channels */
  14687. A_UINT32 min_dwell_time_active;
  14688. A_UINT32 max_dwell_time_active;
  14689. /** default dwell time in msec on passive channels */
  14690. A_UINT32 min_dwell_time_passive;
  14691. A_UINT32 max_dwell_time_passive;
  14692. /** min time in msec on the BSS channel,only valid if atleast one VDEV is active*/
  14693. A_UINT32 min_rest_time;
  14694. /** max rest time in msec on the BSS channel,only valid if at least one VDEV is active*/
  14695. /** the scanner will rest on the bss channel at least min_rest_time. after min_rest_time the scanner
  14696. * will start checking for tx/rx activity on all VDEVs. if there is no activity the scanner will
  14697. * switch to off channel. if there is activity the scanner will let the radio on the bss channel
  14698. * until max_rest_time expires.at max_rest_time scanner will switch to off channel
  14699. * irrespective of activity. activity is determined by the idle_time parameter.
  14700. */
  14701. A_UINT32 max_rest_time;
  14702. /** time before sending next set of probe requests.
  14703. * The scanner keeps repeating probe requests transmission with period specified by repeat_probe_time.
  14704. * The number of probe requests specified depends on the ssid_list and bssid_list
  14705. */
  14706. /** Max number of probes to be sent */
  14707. A_UINT32 n_probes;
  14708. /** time in msec between 2 sets of probe requests. */
  14709. A_UINT32 repeat_probe_time;
  14710. /** time in msec between 2 consequetive probe requests with in a set. */
  14711. A_UINT32 probe_spacing_time;
  14712. /** data inactivity time in msec on bss channel that will be used by scanner for measuring the inactivity */
  14713. A_UINT32 idle_time;
  14714. /** maximum time in msec allowed for scan */
  14715. A_UINT32 max_scan_time;
  14716. /** delay in msec before sending first probe request after switching to a channel */
  14717. A_UINT32 probe_delay;
  14718. /** Scan control flags */
  14719. A_UINT32 scan_ctrl_flags;
  14720. /** Burst duration time in msec*/
  14721. A_UINT32 burst_duration;
  14722.  
  14723. /** number of bssids in the TLV bssid_list[] */
  14724. A_UINT32 num_bssid;
  14725. /** number of ssid in the TLV ssid_list[] */
  14726. A_UINT32 num_ssids;
  14727. /** number of bytes in TLV ie_data[] */
  14728. A_UINT32 ie_len;
  14729. /** number of buckets in the TLV bucket_list[] */
  14730. A_UINT32 num_buckets;
  14731. /** in number of scans, send notifications to host after these many scans */
  14732. A_UINT32 report_threshold_num_scans;
  14733. /** number of channels in channel_list[] determined by the
  14734. sum of wmi_extscan_bucket.num_channels in array */
  14735.  
  14736. /**
  14737. * TLV (tag length value) parameters follow the extscan_cmd
  14738. * structure. The TLV's are:
  14739. * wmi_ssid ssid_list[];
  14740. * wmi_mac_addr bssid_list[];
  14741. * A_UINT8 ie_data[];
  14742. * wmi_extscan_bucket bucket_list[];
  14743. * wmi_extscan_bucket_channel channel_list[];
  14744. */
  14745. } wmi_extscan_start_cmd_fixed_param;
  14746.  
  14747. typedef struct {
  14748. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_stop_cmd_fixed_param */
  14749. /** Request ID - to match running command. 0 matches any request */
  14750. A_UINT32 request_id;
  14751. /** Requestor ID - client requesting stop */
  14752. A_UINT32 requestor_id;
  14753. /** VDEV id(interface) that is requesting scan */
  14754. A_UINT32 vdev_id;
  14755. /** table ID - to allow support for multiple simultaneous requests */
  14756. A_UINT32 table_id;
  14757. } wmi_extscan_stop_cmd_fixed_param;
  14758.  
  14759. enum wmi_extscan_get_cached_results_flags {
  14760. WMI_EXTSCAN_GET_CACHED_RESULTS_FLAG_NONE = 0x0000,
  14761. WMI_EXTSCAN_GET_CACHED_RESULTS_FLAG_FLUSH_TABLE = 0x0001
  14762. };
  14763.  
  14764. typedef struct {
  14765. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_get_cached_results_cmd_fixed_param */
  14766. /** request ID - used to correlate command with events */
  14767. A_UINT32 request_id;
  14768. /** Requestor ID - client that requested results */
  14769. A_UINT32 requestor_id;
  14770. /** VDEV id(interface) that is requesting scan */
  14771. A_UINT32 vdev_id;
  14772. /** table ID - to allow support for multiple simultaneous requests */
  14773. A_UINT32 table_id;
  14774. /** maximum number of results to be returned */
  14775. A_UINT32 max_results;
  14776. /** flush BSSID list - wmi_extscan_get_cached_results_flags */
  14777. A_UINT32 control_flags; /* enum wmi_extscan_get_cached_results_flags */
  14778. } wmi_extscan_get_cached_results_cmd_fixed_param;
  14779.  
  14780. typedef struct {
  14781. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_get_wlan_change_results_cmd_fixed_param */
  14782. /** request ID - used to correlate command with events */
  14783. A_UINT32 request_id;
  14784. /** Requestor ID - client that requested results */
  14785. A_UINT32 requestor_id;
  14786. /** VDEV id(interface) that is requesting scan */
  14787. A_UINT32 vdev_id;
  14788. /** table ID - to allow support for multiple simultaneous requests */
  14789. A_UINT32 table_id;
  14790. } wmi_extscan_get_wlan_change_results_cmd_fixed_param;
  14791.  
  14792. typedef struct {
  14793. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  14794. /**bssid */
  14795. wmi_mac_addr bssid;
  14796. /**channel number */
  14797. A_UINT32 channel;
  14798. /**upper RSSI limit */
  14799. A_UINT32 upper_rssi_limit;
  14800. /**lower RSSI limit */
  14801. A_UINT32 lower_rssi_limit;
  14802. } wmi_extscan_wlan_change_bssid_param;
  14803.  
  14804. typedef struct {
  14805. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_configure_wlan_change_monitor_cmd_fixed_param */
  14806. /** Request ID - to identify command. Cannot be 0 */
  14807. A_UINT32 request_id;
  14808. /** Requestor ID - client requesting wlan change monitoring */
  14809. A_UINT32 requestor_id;
  14810. /** VDEV id(interface) that is requesting scan */
  14811. A_UINT32 vdev_id;
  14812. /** table ID - to allow support for multiple simultaneous tables */
  14813. A_UINT32 table_id;
  14814. /** operation mode: start/stop */
  14815. A_UINT32 mode; /* wmi_extscan_operation_mode */
  14816. /** number of rssi samples to store */
  14817. A_UINT32 max_rssi_samples;
  14818. /** number of samples to use to calculate RSSI average */
  14819. A_UINT32 rssi_averaging_samples;
  14820. /** number of scans to confirm loss of contact with RSSI */
  14821. A_UINT32 lost_ap_scan_count;
  14822. /** number of out-of-range BSSIDs necessary to send event */
  14823. A_UINT32 max_out_of_range_count;
  14824.  
  14825. /** total number of bssid signal descriptors (in all pages) */
  14826. A_UINT32 total_entries;
  14827. /** index of the first bssid entry found in the TLV wlan_change_descriptor_list*/
  14828. A_UINT32 first_entry_index;
  14829. /** number of bssid signal descriptors in this page */
  14830. A_UINT32 num_entries_in_page;
  14831. /* Following this structure is the TLV:
  14832. * wmi_extscan_wlan_change_bssid_param wlan_change_descriptor_list[];
  14833. * (number of elements given by field num_page_entries)
  14834. */
  14835. } wmi_extscan_configure_wlan_change_monitor_cmd_fixed_param;
  14836.  
  14837. typedef struct {
  14838. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  14839. /**bssid */
  14840. wmi_mac_addr bssid;
  14841. /**RSSI min threshold for reporting */
  14842. A_UINT32 min_rssi;
  14843. /**Deprecated entry - channel number */
  14844. A_UINT32 channel;
  14845. /** RSSI max threshold for reporting */
  14846. A_UINT32 max_rssi;
  14847. } wmi_extscan_hotlist_entry;
  14848.  
  14849. typedef struct {
  14850. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_configure_hotlist_monitor_cmd_fixed_param */
  14851. /** Request ID - to identify command. Cannot be 0 */
  14852. A_UINT32 request_id;
  14853. /** Requestor ID - client requesting hotlist monitoring */
  14854. A_UINT32 requestor_id;
  14855. /** VDEV id(interface) that is requesting scan */
  14856. A_UINT32 vdev_id;
  14857. /** table ID - to allow support for multiple simultaneous tables */
  14858. A_UINT32 table_id;
  14859. /** operation mode: start/stop */
  14860. A_UINT32 mode; /* wmi_extscan_operation_mode */
  14861. /** total number of bssids (in all pages) */
  14862. A_UINT32 total_entries;
  14863. /** index of the first bssid entry found in the TLV wmi_extscan_hotlist_entry */
  14864. A_UINT32 first_entry_index;
  14865. /** number of bssids in this page */
  14866. A_UINT32 num_entries_in_page;
  14867. /** number of consecutive scans to confirm loss of contact with AP */
  14868. A_UINT32 lost_ap_scan_count;
  14869. /* Following this structure is the TLV:
  14870. * wmi_extscan_hotlist_entry hotlist[]; <-- number of elements given by field num_page_entries.
  14871. */
  14872. } wmi_extscan_configure_hotlist_monitor_cmd_fixed_param;
  14873.  
  14874. typedef struct {
  14875. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  14876. /**ssid */
  14877. wmi_ssid ssid;
  14878. /**band */
  14879. A_UINT32 band;
  14880. /**RSSI threshold for reporting */
  14881. A_UINT32 min_rssi;
  14882. A_UINT32 max_rssi;
  14883. } wmi_extscan_hotlist_ssid_entry;
  14884.  
  14885. typedef struct {
  14886. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_configure_hotlist_ssid_monitor_cmd_fixed_param */
  14887. /** Request ID - to identify command. Cannot be 0 */
  14888. A_UINT32 request_id;
  14889. /** Requestor ID - client requesting hotlist ssid monitoring */
  14890. A_UINT32 requestor_id;
  14891. /** VDEV id(interface) that is requesting scan */
  14892. A_UINT32 vdev_id;
  14893. /** table ID - to allow support for multiple simultaneous tables */
  14894. A_UINT32 table_id;
  14895. /** operation mode: start/stop */
  14896. A_UINT32 mode; /* wmi_extscan_operation_mode */
  14897. /**total number of ssids (in all pages) */
  14898. A_UINT32 total_entries;
  14899. /**index of the first ssid entry found in the TLV wmi_extscan_hotlist_ssid_entry*/
  14900. A_UINT32 first_entry_index;
  14901. /**number of ssids in this page */
  14902. A_UINT32 num_entries_in_page;
  14903. /** number of consecutive scans to confirm loss of an ssid **/
  14904. A_UINT32 lost_ap_scan_count;
  14905. /* Following this structure is the TLV:
  14906. * wmi_extscan_hotlist_ssid_entry hotlist_ssid[]; <-- number of elements given by field num_page_entries.
  14907. */
  14908. } wmi_extscan_configure_hotlist_ssid_monitor_cmd_fixed_param;
  14909.  
  14910. typedef struct {
  14911. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  14912. /** table ID - to allow support for multiple simultaneous tables */
  14913. A_UINT32 table_id;
  14914. /** size in bytes of scan cache entry */
  14915. A_UINT32 scan_cache_entry_size;
  14916. /** maximum number of scan cache entries */
  14917. A_UINT32 max_scan_cache_entries;
  14918. /** maximum number of buckets per extscan request */
  14919. A_UINT32 max_buckets;
  14920. /** maximum number of BSSIDs that will be stored in each scan (best n/w as per RSSI) */
  14921. A_UINT32 max_bssid_per_scan;
  14922. /** table usage level at which indication must be sent to host */
  14923. A_UINT32 max_table_usage_threshold;
  14924. } wmi_extscan_cache_capabilities;
  14925.  
  14926. typedef struct {
  14927. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  14928. /** table ID - to allow support for multiple simultaneous tables */
  14929. A_UINT32 table_id;
  14930. /** size in bytes of wlan change entry */
  14931. A_UINT32 wlan_change_entry_size;
  14932. /** maximum number of entries in wlan change table */
  14933. A_UINT32 max_wlan_change_entries;
  14934. /** number of RSSI samples used for averaging RSSI */
  14935. A_UINT32 max_rssi_averaging_samples;
  14936. /** number of BSSID/RSSI entries (BSSID pointer, RSSI, timestamp) that device can hold */
  14937. A_UINT32 max_rssi_history_entries;
  14938. } wmi_extscan_wlan_change_monitor_capabilities;
  14939.  
  14940. typedef struct {
  14941. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  14942. /** table ID - to allow support for multiple simultaneous tables */
  14943. A_UINT32 table_id;
  14944. /** size in bytes of hotlist entry */
  14945. A_UINT32 wlan_hotlist_entry_size;
  14946. /** maximum number of entries in wlan change table */
  14947. A_UINT32 max_hotlist_entries;
  14948. } wmi_extscan_hotlist_monitor_capabilities;
  14949.  
  14950. typedef struct {
  14951. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_set_capabilities_cmd_fixed_param */
  14952. /** Request ID - matches request ID used to start hot list monitoring */
  14953. A_UINT32 request_id;
  14954. /** Requestor ID - client requesting stop */
  14955. A_UINT32 requestor_id;
  14956. /** number of extscan caches */
  14957. A_UINT32 num_extscan_cache_tables;
  14958. /** number of wlan change lists */
  14959. A_UINT32 num_wlan_change_monitor_tables;
  14960. /** number of hotlists */
  14961. A_UINT32 num_hotlist_monitor_tables;
  14962. /** if one sided rtt data collection is supported */
  14963. A_UINT32 rtt_one_sided_supported;
  14964. /** if 11v data collection is supported */
  14965. A_UINT32 rtt_11v_supported;
  14966. /** if 11mc data collection is supported */
  14967. A_UINT32 rtt_ftm_supported;
  14968. /** number of extscan cache capabilities (one per table) */
  14969. A_UINT32 num_extscan_cache_capabilities;
  14970. /** number of wlan change capabilities (one per table) */
  14971. A_UINT32 num_extscan_wlan_change_capabilities;
  14972. /** number of extscan hotlist capabilities (one per table) */
  14973. A_UINT32 num_extscan_hotlist_capabilities;
  14974. /* Following this structure is the TLV:
  14975. * wmi_extscan_cache_capabilities extscan_cache_capabilities; <-- number of capabilities given by num_extscan_caches
  14976. * wmi_extscan_wlan_change_monitor_capabilities wlan_change_capabilities; <-- number of capabilities given by num_wlan_change_monitor_tables
  14977. * wmi_extscan_hotlist_monitor_capabilities hotlist_capabilities; <-- number of capabilities given by num_hotlist_monitor_tables
  14978. */
  14979. } wmi_extscan_set_capabilities_cmd_fixed_param;
  14980.  
  14981. typedef struct {
  14982. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_get_capabilities_cmd_fixed_param */
  14983. /** Request ID - matches request ID used to start hot list monitoring */
  14984. A_UINT32 request_id;
  14985. /** Requestor ID - client requesting capabilities */
  14986. A_UINT32 requestor_id;
  14987. } wmi_extscan_get_capabilities_cmd_fixed_param;
  14988.  
  14989. typedef struct {
  14990. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_start_stop_event_fixed_param */
  14991. /** Request ID of the operation that was started/stopped */
  14992. A_UINT32 request_id;
  14993. /** Requestor ID of the operation that was started/stopped */
  14994. A_UINT32 requestor_id;
  14995. /** VDEV id(interface) of the operation that was started/stopped */
  14996. A_UINT32 vdev_id;
  14997. /** extscan WMI command */
  14998. A_UINT32 command;
  14999. /** operation mode: start/stop */
  15000. A_UINT32 mode; /* wmi_extscan_operation_mode */
  15001. /**success/failure */
  15002. A_UINT32 status; /* enum wmi_extscan_start_stop_status */
  15003. /** table ID - to allow support for multiple simultaneous requests */
  15004. A_UINT32 table_id;
  15005. } wmi_extscan_start_stop_event_fixed_param;
  15006.  
  15007. typedef struct {
  15008. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_operation_event_fixed_param */
  15009. /** Request ID of the extscan operation that is currently running */
  15010. A_UINT32 request_id;
  15011. /** Requestor ID of the extscan operation that is currently running */
  15012. A_UINT32 requestor_id;
  15013. /** VDEV id(interface) of the extscan operation that is currently running */
  15014. A_UINT32 vdev_id;
  15015. /** scan event (wmi_scan_event_type) */
  15016. A_UINT32 event; /* wmi_extscan_event_type */
  15017. /** table ID - to allow support for multiple simultaneous requests */
  15018. A_UINT32 table_id;
  15019. /**number of buckets */
  15020. A_UINT32 num_buckets;
  15021. /* Following this structure is the TLV:
  15022. * A_UINT32 bucket_id[]; <-- number of elements given by field num_buckets.
  15023. */
  15024. } wmi_extscan_operation_event_fixed_param;
  15025.  
  15026. /* Types of extscan tables */
  15027. typedef enum {
  15028. EXTSCAN_TABLE_NONE = 0,
  15029. EXTSCAN_TABLE_BSSID = 1,
  15030. EXTSCAN_TABLE_RSSI = 2,
  15031. } wmi_extscan_table_type;
  15032.  
  15033. typedef struct {
  15034. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_table_usage_event_fixed_param */
  15035. /** Request ID of the extscan operation that is currently running */
  15036. A_UINT32 request_id;
  15037. /** Requestor ID of the extscan operation that is currently running */
  15038. A_UINT32 requestor_id;
  15039. /** VDEV id(interface) of the extscan operation that is currently running */
  15040. A_UINT32 vdev_id;
  15041. /** table ID - to allow support for multiple simultaneous tables */
  15042. A_UINT32 table_id;
  15043. /**see wmi_extscan_table_type for table reporting usage */
  15044. A_UINT32 table_type;
  15045. /**number of entries in use */
  15046. A_UINT32 entries_in_use;
  15047. /**maximum number of entries in table */
  15048. A_UINT32 maximum_entries;
  15049. } wmi_extscan_table_usage_event_fixed_param;
  15050.  
  15051. typedef enum {
  15052. WMI_SCAN_STATUS_INTERRUPTED = 1 /* Indicates scan got interrupted i.e. aborted or pre-empted for a long time (> 1sec)
  15053. this can be used to discard scan results */
  15054. } wmi_scan_status_flags;
  15055.  
  15056. typedef struct {
  15057. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  15058. /** RSSI */
  15059. A_UINT32 rssi;
  15060. /** time stamp in milliseconds */
  15061. A_UINT32 tstamp;
  15062. /** Extscan cycle during which this entry was scanned */
  15063. A_UINT32 scan_cycle_id;
  15064. /** flag to indicate if the given result was obtained as part of interrupted (aborted/large time gap preempted) scan */
  15065. A_UINT32 flags;
  15066. /** Bitmask of buckets (i.e. sets of channels) scanned */
  15067. A_UINT32 buckets_scanned;
  15068. } wmi_extscan_rssi_info;
  15069.  
  15070. typedef struct {
  15071. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  15072. /**bssid */
  15073. wmi_mac_addr bssid;
  15074. /**ssid */
  15075. wmi_ssid ssid;
  15076. /**channel number */
  15077. A_UINT32 channel;
  15078. /* capabilities */
  15079. A_UINT32 capabilities;
  15080. /* beacon interval in TUs */
  15081. A_UINT32 beacon_interval;
  15082. /**time stamp in milliseconds - time last seen */
  15083. A_UINT32 tstamp;
  15084. /**flags - _tExtScanEntryFlags */
  15085. A_UINT32 flags;
  15086. /**RTT in ns */
  15087. A_UINT32 rtt;
  15088. /**rtt standard deviation */
  15089. A_UINT32 rtt_sd;
  15090. /* rssi information */
  15091. A_UINT32 number_rssi_samples;
  15092. /** IE length */
  15093. A_UINT32 ie_length; /* length of IE data */
  15094. } wmi_extscan_wlan_descriptor;
  15095.  
  15096. typedef struct {
  15097. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_cached_results_event_fixed_param */
  15098. /** Request ID of the WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID */
  15099. A_UINT32 request_id;
  15100. /** Requestor ID of the WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID */
  15101. A_UINT32 requestor_id;
  15102. /** VDEV id(interface) of the WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID */
  15103. A_UINT32 vdev_id;
  15104. /** Request ID of the extscan operation that is currently running */
  15105. A_UINT32 extscan_request_id;
  15106. /** Requestor ID of the extscan operation that is currently running */
  15107. A_UINT32 extscan_requestor_id;
  15108. /** VDEV id(interface) of the extscan operation that is currently running */
  15109. A_UINT32 extscan_vdev_id;
  15110. /** table ID - to allow support for multiple simultaneous tables */
  15111. A_UINT32 table_id;
  15112. /**current time stamp in seconds. Used to provide a baseline for the relative timestamps returned for each block and entry */
  15113. A_UINT32 current_tstamp;
  15114. /**total number of bssids (in all pages) */
  15115. A_UINT32 total_entries;
  15116. /**index of the first bssid entry found in the TLV wmi_extscan_wlan_descriptor*/
  15117. A_UINT32 first_entry_index;
  15118. /**number of bssids in this page */
  15119. A_UINT32 num_entries_in_page;
  15120. /** number of buckets scanned**/
  15121. A_UINT32 buckets_scanned;
  15122. /* Followed by the variable length TLVs
  15123. * wmi_extscan_wlan_descriptor bssid_list[]
  15124. * wmi_extscan_rssi_info rssi_list[]
  15125. * A_UINT8 ie_list[]
  15126. */
  15127. } wmi_extscan_cached_results_event_fixed_param;
  15128.  
  15129. typedef enum {
  15130. EXTSCAN_WLAN_CHANGE_FLAG_NONE = 0x00,
  15131. EXTSCAN_WLAN_CHANGE_FLAG_OUT_OF_RANGE = 0x01,
  15132. EXTSCAN_WLAN_CHANGE_FLAG_AP_LOST = 0x02,
  15133. } wmi_extscan_wlan_change_flags;
  15134.  
  15135. typedef struct {
  15136. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  15137. /**bssid */
  15138. wmi_mac_addr bssid;
  15139. /**time stamp in milliseconds */
  15140. A_UINT32 tstamp;
  15141. /**upper RSSI limit */
  15142. A_UINT32 upper_rssi_limit;
  15143. /**lower RSSI limit */
  15144. A_UINT32 lower_rssi_limit;
  15145. /** channel */
  15146. A_UINT32 channel; /* in MHz */
  15147. /**current RSSI average */
  15148. A_UINT32 rssi_average;
  15149. /**flags - wmi_extscan_wlan_change_flags */
  15150. A_UINT32 flags;
  15151. /**legnth of RSSI history to follow (number of values) */
  15152. A_UINT32 num_rssi_samples;
  15153. } wmi_extscan_wlan_change_result_bssid;
  15154.  
  15155. typedef struct {
  15156. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_wlan_change_results_event_fixed_param */
  15157. /** Request ID of the WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID command that requested the results */
  15158. A_UINT32 request_id;
  15159. /** Requestor ID of the WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID command that requested the results */
  15160. A_UINT32 requestor_id;
  15161. /** VDEV id(interface) of the WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID command that requested the results */
  15162. A_UINT32 vdev_id;
  15163. /** Request ID of the WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID command that configured the table */
  15164. A_UINT32 config_request_id;
  15165. /** Requestor ID of the WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID command that configured the table */
  15166. A_UINT32 config_requestor_id;
  15167. /** VDEV id(interface) of the WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID command that configured the table */
  15168. A_UINT32 config_vdev_id;
  15169. /** table ID - to allow support for multiple simultaneous tables */
  15170. A_UINT32 table_id;
  15171. /**number of entries with RSSI out of range or BSSID not detected */
  15172. A_UINT32 change_count;
  15173. /**total number of bssid signal descriptors (in all pages) */
  15174. A_UINT32 total_entries;
  15175. /**index of the first bssid signal descriptor entry found in the TLV wmi_extscan_wlan_descriptor*/
  15176. A_UINT32 first_entry_index;
  15177. /**number of bssids signal descriptors in this page */
  15178. A_UINT32 num_entries_in_page;
  15179. /* Following this structure is the TLV:
  15180. * wmi_extscan_wlan_change_result_bssid bssid_signal_descriptor_list[];
  15181. * (number of descriptors given by field num_entries_in_page)
  15182. * Following this structure is the list of RSSI values (each is an A_UINT8):
  15183. * A_UINT8 rssi_list[]; <-- last N RSSI values.
  15184. */
  15185. } wmi_extscan_wlan_change_results_event_fixed_param;
  15186.  
  15187. enum _tExtScanEntryFlags
  15188. {
  15189. WMI_HOTLIST_FLAG_NONE = 0x00,
  15190. WMI_HOTLIST_FLAG_PRESENCE = 0x01,
  15191. WMI_HOTLIST_FLAG_DUPLICATE_SSID = 0x80,
  15192. };
  15193.  
  15194. typedef struct {
  15195. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_hotlist_match_event_fixed_param */
  15196. /** Request ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID that configured the table */
  15197. A_UINT32 config_request_id;
  15198. /** Requestor ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID that configured the table */
  15199. A_UINT32 config_requestor_id;
  15200. /** VDEV id(interface) of the WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID that configured the table */
  15201. A_UINT32 config_vdev_id;
  15202. /** table ID - to allow support for multiple simultaneous tables */
  15203. A_UINT32 table_id;
  15204. /**total number of bssids (in all pages) */
  15205. A_UINT32 total_entries;
  15206. /**index of the first bssid entry found in the TLV wmi_extscan_wlan_descriptor*/
  15207. A_UINT32 first_entry_index;
  15208. /**number of bssids in this page */
  15209. A_UINT32 num_entries_in_page;
  15210. /* Following this structure is the TLV:
  15211. * wmi_extscan_wlan_descriptor hotlist_match[]; <-- number of descriptors given by field num_entries_in_page.
  15212. */
  15213. } wmi_extscan_hotlist_match_event_fixed_param;
  15214.  
  15215. typedef struct {
  15216. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_hotlist_match_event_fixed_param */
  15217. /** Request ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID that configured the table */
  15218. A_UINT32 config_request_id;
  15219. /** Requestor ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID that configured the table */
  15220. A_UINT32 config_requestor_id;
  15221. /** VDEV id(interface) of the WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID that configured the table */
  15222. A_UINT32 config_vdev_id;
  15223. /** table ID - to allow support for multiple simultaneous tables */
  15224. A_UINT32 table_id;
  15225. /**total number of ssids (in all pages) */
  15226. A_UINT32 total_entries;
  15227. /**index of the first ssid entry found in the TLV wmi_extscan_wlan_descriptor*/
  15228. A_UINT32 first_entry_index;
  15229. /**number of ssids in this page */
  15230. A_UINT32 num_entries_in_page;
  15231. /* Following this structure is the TLV:
  15232. * wmi_extscan_wlan_descriptor hotlist_match[]; <-- number of descriptors given by field num_entries_in_page.
  15233. */
  15234. } wmi_extscan_hotlist_ssid_match_event_fixed_param;
  15235.  
  15236. typedef struct {
  15237. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_capabilities_event_fixed_param */
  15238. /** Request ID of the WMI_EXTSCAN_GET_CAPABILITIES_CMDID */
  15239. A_UINT32 request_id;
  15240. /** Requestor ID of the WMI_EXTSCAN_GET_CAPABILITIES_CMDID */
  15241. A_UINT32 requestor_id;
  15242. /** VDEV id(interface) of the WMI_EXTSCAN_GET_CAPABILITIES_CMDID */
  15243. A_UINT32 vdev_id;
  15244. /** number of extscan caches */
  15245. A_UINT32 num_extscan_cache_tables;
  15246. /** number of wlan change lists */
  15247. A_UINT32 num_wlan_change_monitor_tables;
  15248. /** number of hotlists */
  15249. A_UINT32 num_hotlist_monitor_tables;
  15250. /** if one sided rtt data collection is supported */
  15251. A_UINT32 rtt_one_sided_supported;
  15252. /** if 11v data collection is supported */
  15253. A_UINT32 rtt_11v_supported;
  15254. /** if 11mc data collection is supported */
  15255. A_UINT32 rtt_ftm_supported;
  15256. /** number of extscan cache capabilities (one per table) */
  15257. A_UINT32 num_extscan_cache_capabilities;
  15258. /** number of wlan change capabilities (one per table) */
  15259. A_UINT32 num_extscan_wlan_change_capabilities;
  15260. /** number of extscan hotlist capabilities (one per table) */
  15261. A_UINT32 num_extscan_hotlist_capabilities;
  15262. /* max number of roaming ssid whitelist firmware can support */
  15263. A_UINT32 num_roam_ssid_whitelist;
  15264. /* max number of blacklist bssid firmware can support */
  15265. A_UINT32 num_roam_bssid_blacklist;
  15266. /* max number of preferred list firmware can support */
  15267. A_UINT32 num_roam_bssid_preferred_list;
  15268. /* max number of hotlist ssids firmware can support */
  15269. A_UINT32 num_extscan_hotlist_ssid;
  15270. /* max number of epno networks firmware can support */
  15271. A_UINT32 num_epno_networks;
  15272.  
  15273. /* Following this structure are the TLVs describing the capabilities of of the various types of lists. The FW theoretically
  15274. * supports multiple lists of each type.
  15275. *
  15276. * wmi_extscan_cache_capabilities extscan_cache_capabilities[] <-- capabilities of extscan cache (BSSID/RSSI lists)
  15277. * wmi_extscan_wlan_change_monitor_capabilities wlan_change_capabilities[] <-- capabilities of wlan_change_monitor_tables
  15278. * wmi_extscan_hotlist_monitor_capabilities hotlist_capabilities[] <-- capabilities of hotlist_monitor_tables
  15279. */
  15280. } wmi_extscan_capabilities_event_fixed_param;
  15281.  
  15282. /* WMI_D0_WOW_DISABLE_ACK_EVENTID */
  15283. typedef struct{
  15284. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_d0_wow_disable_ack_event_fixed_param */
  15285. A_UINT32 reserved0; /* for future need */
  15286. } wmi_d0_wow_disable_ack_event_fixed_param;
  15287.  
  15288. /** WMI_PDEV_RESUME_EVENTID : generated in response to WMI_PDEV_RESUME_CMDID */
  15289. typedef struct {
  15290. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_resume_event_fixed_param */
  15291. /** pdev_id for identifying the MAC
  15292. * See macros starting with WMI_PDEV_ID_ for values.
  15293. */
  15294. A_UINT32 pdev_id;
  15295. } wmi_pdev_resume_event_fixed_param;
  15296.  
  15297.  
  15298.  
  15299. /** value representing all modules */
  15300. #define WMI_DEBUG_LOG_MODULE_ALL 0xffff
  15301.  
  15302. /* param definitions */
  15303.  
  15304. /**
  15305. * Log level for a given module. Value contains both module id and log level.
  15306. * here is the bitmap definition for value.
  15307. * module Id : 16
  15308. * Flags : reserved
  15309. * Level : 8
  15310. * if odule Id is WMI_DEBUG_LOG_MODULE_ALL then log level is applied to all modules (global).
  15311. * WMI_DEBUG_LOG_MIDULE_ALL will overwrites per module level setting.
  15312. */
  15313. #define WMI_DEBUG_LOG_PARAM_LOG_LEVEL 0x1
  15314.  
  15315. #define WMI_DBGLOG_SET_LOG_LEVEL(val,lvl) do { \
  15316. (val) |= (lvl & 0xff); \
  15317. } while (0)
  15318.  
  15319. #define WMI_DBGLOG_GET_LOG_LEVEL(val) ((val) & 0xff)
  15320.  
  15321. #define WMI_DBGLOG_SET_MODULE_ID(val,mid) do { \
  15322. (val) |= ((mid & 0xffff) << 16); \
  15323. } while (0)
  15324.  
  15325. #define WMI_DBGLOG_GET_MODULE_ID(val) (((val) >> 16) & 0xffff)
  15326.  
  15327. /**
  15328. * Enable the debug log for a given vdev. Value is vdev id
  15329. */
  15330. #define WMI_DEBUG_LOG_PARAM_VDEV_ENABLE 0x2
  15331.  
  15332.  
  15333. /**
  15334. * Disable the debug log for a given vdev. Value is vdev id
  15335. * All the log level for a given VDEV is disabled except the ERROR log messages
  15336. */
  15337.  
  15338. #define WMI_DEBUG_LOG_PARAM_VDEV_DISABLE 0x3
  15339.  
  15340. /**
  15341. * set vdev enable bitmap. value is the vden enable bitmap
  15342. */
  15343. #define WMI_DEBUG_LOG_PARAM_VDEV_ENABLE_BITMAP 0x4
  15344.  
  15345. /**
  15346. * set a given log level to all the modules specified in the module bitmap.
  15347. * and set the log levle for all other modules to DBGLOG_ERR.
  15348. * value: log levelt to be set.
  15349. * module_id_bitmap : identifies the modules for which the log level should be set and
  15350. * modules for which the log level should be reset to DBGLOG_ERR.
  15351. */
  15352. #define WMI_DEBUG_LOG_PARAM_MOD_ENABLE_BITMAP 0x5
  15353.  
  15354. #define NUM_MODULES_PER_ENTRY ((sizeof(A_UINT32)) << 3)
  15355.  
  15356. #define WMI_MODULE_ENABLE(pmid_bitmap,mod_id) \
  15357. ((pmid_bitmap)[(mod_id)/NUM_MODULES_PER_ENTRY] |= \
  15358. (1 << ((mod_id)%NUM_MODULES_PER_ENTRY)))
  15359.  
  15360. #define WMI_MODULE_DISABLE(pmid_bitmap,mod_id) \
  15361. ((pmid_bitmap)[(mod_id)/NUM_MODULES_PER_ENTRY] &= \
  15362. (~(1 << ((mod_id)%NUM_MODULES_PER_ENTRY))))
  15363.  
  15364. #define WMI_MODULE_IS_ENABLED(pmid_bitmap,mod_id) \
  15365. (((pmid_bitmap)[(mod_id)/NUM_MODULES_PER_ENTRY] & \
  15366. (1 << ((mod_id)%NUM_MODULES_PER_ENTRY))) != 0)
  15367.  
  15368. #define MAX_MODULE_ID_BITMAP_WORDS 16 /* 16*32=512 module ids. should be more than sufficient */
  15369. typedef struct {
  15370. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_debug_log_config_cmd_fixed_param */
  15371. A_UINT32 dbg_log_param; /** param types are defined above */
  15372. A_UINT32 value;
  15373. /* The below array will follow this tlv ->fixed length module_id_bitmap[]
  15374. A_UINT32 module_id_bitmap[MAX_MODULE_ID_BITMAP_WORDS];
  15375. */
  15376. } wmi_debug_log_config_cmd_fixed_param;
  15377.  
  15378. typedef struct {
  15379. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_temperature_cmd_fixed_param */
  15380. A_UINT32 param; /* Reserved for future use */
  15381. /** pdev_id for identifying the MAC
  15382. * See macros starting with WMI_PDEV_ID_ for values.
  15383. */
  15384. A_UINT32 pdev_id;
  15385. } wmi_pdev_get_temperature_cmd_fixed_param;
  15386.  
  15387. typedef struct {
  15388. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_temperature_event_fixed_param */
  15389. A_INT32 value; /* temprature value in Celcius degree */
  15390. /** pdev_id for identifying the MAC
  15391. * See macros starting with WMI_PDEV_ID_ for values.
  15392. */
  15393. A_UINT32 pdev_id;
  15394. } wmi_pdev_temperature_event_fixed_param;
  15395.  
  15396. typedef enum {
  15397. ANTDIV_HW_CFG_STATUS,
  15398. ANTDIV_SW_CFG_STATUS,
  15399. ANTDIV_MAX_STATUS_TYPE_NUM
  15400. } ANTDIV_STATUS_TYPE;
  15401.  
  15402. typedef struct {
  15403. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_antdiv_status_cmd_fixed_param */
  15404. A_UINT32 status_event_id; /* Status event ID - see ANTDIV_STATUS_TYPE */
  15405. /** pdev_id for identifying the MAC
  15406. * See macros starting with WMI_PDEV_ID_ for values.
  15407. */
  15408. A_UINT32 pdev_id;
  15409. } wmi_pdev_get_antdiv_status_cmd_fixed_param;
  15410.  
  15411. typedef struct {
  15412. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_antdiv_status_event_fixed_param */
  15413. A_UINT32 support; /* ANT DIV feature enabled or not */
  15414. A_UINT32 chain_num; /* how many chain supported */
  15415. A_UINT32 ant_num; /* how many ANT supported, 32 max */
  15416. /*
  15417. * Each entry is for a tx/rx chain, and contains a bitmap identifying
  15418. * the antennas attached to that tx/rx chain.
  15419. */
  15420. A_UINT32 selectable_ant_mask[8];
  15421. /** pdev_id for identifying the MAC
  15422. * See macros starting with WMI_PDEV_ID_ for values.
  15423. */
  15424. A_UINT32 pdev_id;
  15425. } wmi_pdev_antdiv_status_event_fixed_param;
  15426.  
  15427. typedef struct {
  15428. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_dhcp_server_offload_cmd_fixed_param */
  15429. A_UINT32 vdev_id;
  15430. A_UINT32 enable;
  15431. A_UINT32 srv_ipv4; /* server IP */
  15432. A_UINT32 start_lsb; /* starting address assigned to client */
  15433. A_UINT32 num_client; /* number of clients we support */
  15434. } wmi_set_dhcp_server_offload_cmd_fixed_param;
  15435.  
  15436. typedef enum {
  15437. AP_RX_DATA_OFFLOAD = 0x00,
  15438. STA_RX_DATA_OFFLOAD = 0x01,
  15439. } wmi_ipa_offload_types;
  15440.  
  15441. /**
  15442. * This command is sent from WLAN host driver to firmware for
  15443. * enabling/disabling IPA data-path offload features.
  15444. *
  15445. *
  15446. * Enabling data path offload to IPA(based on host INI configuration), example:
  15447. * when STA interface comes up,
  15448. * host->target: WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMD,
  15449. * (enable = 1, vdev_id = STA vdev id, offload_type = STA_RX_DATA_OFFLOAD)
  15450. *
  15451. * Disabling data path offload to IPA, example:
  15452. * host->target: WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMD,
  15453. * (enable = 0, vdev_id = STA vdev id, offload_type = STA_RX_DATA_OFFLOAD)
  15454. *
  15455. *
  15456. * This command is applicable only on the PCIE LL systems
  15457. *
  15458. */
  15459. typedef struct {
  15460. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ipa_offload_enable_disable_cmd_fixed_param */
  15461. A_UINT32 offload_type; /* wmi_ipa_offload_types enum values */
  15462. A_UINT32 vdev_id;
  15463. A_UINT32 enable; /* 1 == enable, 0 == disable */
  15464. } wmi_ipa_offload_enable_disable_cmd_fixed_param;
  15465.  
  15466. typedef enum {
  15467. WMI_LED_FLASHING_PATTERN_NOT_CONNECTED = 0,
  15468. WMI_LED_FLASHING_PATTERN_CONNECTED = 1,
  15469. WMI_LED_FLASHING_PATTERN_RESERVED = 2,
  15470. } wmi_set_led_flashing_type;
  15471.  
  15472. /**
  15473. The state of the LED GPIO control is determined by two 32 bit values(X_0 and X_1) to produce a 64 bit value.
  15474. Each 32 bit value consists of 4 bytes, where each byte defines the number of 50ms intervals that the GPIO will
  15475. remain at a predetermined state. The 64 bit value provides 8 unique GPIO timing intervals. The pattern starts
  15476. with the MSB of X_0 and continues to the LSB of X_1. After executing the timer interval of the LSB of X_1, the
  15477. pattern returns to the MSB of X_0 and repeats. The GPIO state for each timing interval alternates from Low to
  15478. High and the first interval of the pattern represents the time when the GPIO is Low. When a timing interval of
  15479. Zero is reached, it is skipped and moves on to the next interval.
  15480. */
  15481. typedef struct{
  15482. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_led_flashing_cmd_fixed_param */
  15483. A_UINT32 pattern_id; /* pattern identifier */
  15484. A_UINT32 led_x0; /* led flashing parameter0 */
  15485. A_UINT32 led_x1; /* led flashing parameter1 */
  15486. A_UINT32 gpio_num; /* GPIO number */
  15487. } wmi_set_led_flashing_cmd_fixed_param;
  15488.  
  15489. /**
  15490. * The purpose of the multicast Domain Name System (mDNS) is to resolve host names to IP addresses
  15491. * within small networks that do not include a local name server.
  15492. * It utilizes essentially the same programming interfaces, packet formats and operating semantics
  15493. * as the unicast DNS, and the advantage is zero configuration service while no need for central or
  15494. * global server.
  15495. * Based on mDNS, the DNS-SD (Service Discovery) allows clients to discover a named list of services
  15496. * by type in a specified domain using standard DNS queries.
  15497. * Here, we provide the ability to advertise the available services by responding to mDNS queries.
  15498. */
  15499. typedef struct {
  15500. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_offload_cmd_fixed_param */
  15501. A_UINT32 vdev_id;
  15502. A_UINT32 enable;
  15503. } wmi_mdns_offload_cmd_fixed_param;
  15504.  
  15505. #define WMI_MAX_MDNS_FQDN_LEN 64
  15506. #define WMI_MAX_MDNS_RESP_LEN 512
  15507. #define WMI_MDNS_FQDN_TYPE_GENERAL 0
  15508. #define WMI_MDNS_FQDN_TYPE_UNIQUE 1
  15509.  
  15510. typedef struct {
  15511. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_set_fqdn_cmd_fixed_param */
  15512. A_UINT32 vdev_id;
  15513. /** type of fqdn, general or unique */
  15514. A_UINT32 type;
  15515. /** length of fqdn */
  15516. A_UINT32 fqdn_len;
  15517. /* Following this structure is the TLV byte stream of fqdn data of length fqdn_len
  15518. * A_UINT8 fqdn_data[]; <-- fully-qualified domain name to check if match with the received queries
  15519. */
  15520. } wmi_mdns_set_fqdn_cmd_fixed_param;
  15521.  
  15522. typedef struct {
  15523. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_set_resp_cmd_fixed_param */
  15524. A_UINT32 vdev_id;
  15525. /** Answer Resource Record count */
  15526. A_UINT32 AR_count;
  15527. /** length of response */
  15528. A_UINT32 resp_len;
  15529. /* Following this structure is the TLV byte stream of resp data of length resp_len
  15530. * A_UINT8 resp_data[]; <-- responses consisits of Resource Records
  15531. */
  15532. } wmi_mdns_set_resp_cmd_fixed_param;
  15533.  
  15534. typedef struct {
  15535. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_get_stats_cmd_fixed_param */
  15536. A_UINT32 vdev_id;
  15537. } wmi_mdns_get_stats_cmd_fixed_param;
  15538.  
  15539. typedef struct {
  15540. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_stats_event_fixed_param */
  15541. A_UINT32 vdev_id;
  15542. /** curTimestamp in milliseconds */
  15543. A_UINT32 curTimestamp;
  15544. /** last received Query in milliseconds */
  15545. A_UINT32 lastQueryTimestamp;
  15546. /** last sent Response in milliseconds */
  15547. A_UINT32 lastResponseTimestamp;
  15548. /** stats of received queries */
  15549. A_UINT32 totalQueries;
  15550. /** stats of macth queries */
  15551. A_UINT32 totalMatches;
  15552. /** stats of responses */
  15553. A_UINT32 totalResponses;
  15554. /** indicate the current status of mDNS offload */
  15555. A_UINT32 status;
  15556. } wmi_mdns_stats_event_fixed_param;
  15557.  
  15558. /**
  15559. * The purpose of the SoftAP authenticator offload is to offload the association and 4-way handshake process
  15560. * down to the firmware. When this feature is enabled, firmware can process the association/disassociation
  15561. * request and create/remove connection even host is suspended.
  15562. * 3 major components are offloaded:
  15563. * 1. ap-mlme. Firmware will process auth/deauth, association/disassociation request and send out response.
  15564. * 2. 4-way handshake. Firmware will send out m1/m3 and receive m2/m4.
  15565. * 3. key installation. Firmware will generate PMK from the psk info which is sent from the host and install PMK/GTK.
  15566. * Current implementation only supports WPA2 CCMP.
  15567. */
  15568.  
  15569. typedef struct {
  15570. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_enable_cmd_fixed_param */
  15571. /** VDEV id(interface) of the WMI_SAP_OFL_ENABLE_CMDID */
  15572. A_UINT32 vdev_id;
  15573. /** enable/disable sap auth offload */
  15574. A_UINT32 enable;
  15575. /** sap ssid */
  15576. wmi_ssid ap_ssid;
  15577. /** authentication mode (defined above) */
  15578. A_UINT32 rsn_authmode;
  15579. /** unicast cipher set */
  15580. A_UINT32 rsn_ucastcipherset;
  15581. /** mcast/group cipher set */
  15582. A_UINT32 rsn_mcastcipherset;
  15583. /** mcast/group management frames cipher set */
  15584. A_UINT32 rsn_mcastmgmtcipherset;
  15585. /** sap channel */
  15586. A_UINT32 channel;
  15587. /** length of psk */
  15588. A_UINT32 psk_len;
  15589. /* Following this structure is the TLV byte stream of wpa passphrase data of length psk_len
  15590. * A_UINT8 psk[];
  15591. */
  15592. } wmi_sap_ofl_enable_cmd_fixed_param;
  15593.  
  15594. typedef struct {
  15595. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_add_sta_event_fixed_param */
  15596. /** VDEV id(interface) of the WMI_SAP_OFL_ADD_STA_EVENTID */
  15597. A_UINT32 vdev_id;
  15598. /** aid (association id) of this station */
  15599. A_UINT32 assoc_id;
  15600. /** peer station's mac addr */
  15601. wmi_mac_addr peer_macaddr;
  15602. /** length of association request frame */
  15603. A_UINT32 data_len;
  15604. /* Following this structure is the TLV byte stream of a whole association request frame of length data_len
  15605. * A_UINT8 bufp[];
  15606. */
  15607. } wmi_sap_ofl_add_sta_event_fixed_param;
  15608.  
  15609. typedef enum {
  15610. SAP_OFL_DEL_STA_FLAG_NONE = 0x00,
  15611. SAP_OFL_DEL_STA_FLAG_RECONNECT = 0x01,
  15612. } wmi_sap_ofl_del_sta_flags;
  15613.  
  15614. typedef struct {
  15615. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_del_sta_event_fixed_param */
  15616. /** VDEV id(interface) of the WMI_SAP_OFL_DEL_STA_EVENTID */
  15617. A_UINT32 vdev_id;
  15618. /** aid (association id) of this station */
  15619. A_UINT32 assoc_id;
  15620. /** peer station's mac addr */
  15621. wmi_mac_addr peer_macaddr;
  15622. /** disassociation reason */
  15623. A_UINT32 reason;
  15624. /** flags - wmi_sap_ofl_del_sta_flags */
  15625. A_UINT32 flags;
  15626. } wmi_sap_ofl_del_sta_event_fixed_param;
  15627.  
  15628. typedef struct {
  15629. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_set_blacklist_param_cmd_fixed_param */
  15630. A_UINT32 vdev_id;
  15631. /* Number of client failure connection attempt */
  15632. A_UINT32 num_retry;
  15633. /* Time in milliseconds to record the client's failure connection attempts */
  15634. A_UINT32 retry_allow_time_ms;
  15635. /* Time in milliseconds to drop the connection request if client is blacklisted */
  15636. A_UINT32 blackout_time_ms;
  15637. } wmi_sap_set_blacklist_param_cmd_fixed_param;
  15638.  
  15639. typedef struct {
  15640. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_apfind_cmd_param */
  15641. A_UINT32 data_len; /** length in byte of data[]. */
  15642. /** This structure is used to send REQ binary blobs
  15643. * from application/service to firmware where Host drv is pass through .
  15644. * Following this structure is the TLV:
  15645. * A_UINT8 data[]; <-- length in byte given by field data_len.
  15646. */
  15647. } wmi_apfind_cmd_param;
  15648.  
  15649. typedef enum apfind_event_type_e {
  15650. APFIND_MATCH_EVENT = 0,
  15651. APFIND_WAKEUP_EVENT,
  15652. } APFIND_EVENT_TYPE;
  15653.  
  15654. typedef struct {
  15655. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_apfind_event_hdr */
  15656. A_UINT32 event_type; /** APFIND_EVENT_TYPE */
  15657. A_UINT32 data_len; /** length in byte of data[]. */
  15658. /** This structure is used to send event binary blobs
  15659. * from firmware to application/service and Host drv.
  15660. * Following this structure is the TLV:
  15661. * A_UINT8 data[]; <-- length in byte given by field data_len.
  15662. */
  15663. } wmi_apfind_event_hdr;
  15664.  
  15665.  
  15666. /**
  15667. * OCB DCC types and structures.
  15668. */
  15669.  
  15670. /**
  15671. * DCC types as described in ETSI TS 102 687
  15672. * Type Format stepSize referenceValue numBits
  15673. * -------------------------------------------------------------------------
  15674. * ndlType_acPrio INTEGER (0...7) 1 number 3
  15675. * ndlType_controlLoop INTEGER (0...7) 1 0 3
  15676. * ndlType_arrivalRate INTEGER (0..8191) 0.01 /s 0 13
  15677. * ndlType_channelLoad INTEGER (0..1000) 0.1 % 0 % 10
  15678. * ndlType_channelUse INTEGER (0..8000) 0.0125 % 0 % 13
  15679. * ndlType_datarate INTEGER (0..7) Table 8 3
  15680. * ndlType_distance INTEGER (0..4095) 1 m 0 12
  15681. * ndlType_numberElements INTEGER (0..63) number 6
  15682. * ndlType_packetDuration INTEGER (0..2047) TSYM 0 11
  15683. * ndlType_packetInterval INTEGER (0..1023) 10 ms 0 10
  15684. * ndlType_pathloss INTEGER (0..31) 0.1 1.0 5
  15685. * ndlType_rxPower INTEGER (0..127) -0.5 dB -40 dBm 7
  15686. * ndlType_snr INTEGER (0..127) 0.5 dB -10 dB 7
  15687. * ndlType_timing INTEGER (0..4095) 10 ms 0 12
  15688. * ndlType_txPower INTEGER (0..127) 0.5 dB -20 dBm 7
  15689. * ndlType_ratio INTEGER (0..100) 1 % 0 % 7
  15690. * ndlType_exponent INTEGER (0..100) 0.1 0 7
  15691. * ndlType_queueStatus Enumeration Table A.2 1
  15692. * ndlType_dccMechanism Bitset Table A.2 6
  15693. *
  15694. * NOTE: All of following size macros (SIZE_NDLTYPE_ACPRIO through SIZE_BYTE)
  15695. * cannot be changed without breaking WMI compatibility.
  15696. *
  15697. * NOTE: For each of the types, one additional bit is allocated. This
  15698. * leftmost bit is used to indicate that the value is invalid. */
  15699. #define SIZE_NDLTYPE_ACPRIO (1 + 3)
  15700. #define SIZE_NDLTYPE_CONTROLLOOP (1 + 3)
  15701. #define SIZE_NDLTYPE_ARRIVALRATE (1 + 13)
  15702. #define SIZE_NDLTYPE_CHANNELLOAD (1 + 10)
  15703. #define SIZE_NDLTYPE_CHANNELUSE (1 + 13)
  15704. #define SIZE_NDLTYPE_DATARATE (1 + 3)
  15705. #define SIZE_NDLTYPE_DISTANCE (1 + 12)
  15706. #define SIZE_NDLTYPE_NUMBERELEMENTS (1 + 6)
  15707. #define SIZE_NDLTYPE_PACKETDURATION (1 + 11)
  15708. #define SIZE_NDLTYPE_PACKETINTERVAL (1 + 10)
  15709. #define SIZE_NDLTYPE_PATHLOSS (1 + 5)
  15710. #define SIZE_NDLTYPE_RXPOWER (1 + 7)
  15711. #define SIZE_NDLTYPE_SNR (1 + 7)
  15712. #define SIZE_NDLTYPE_TIMING (1 + 12)
  15713. #define SIZE_NDLTYPE_TXPOWER (1 + 7)
  15714. #define SIZE_NDLTYPE_RATIO (1 + 7)
  15715. #define SIZE_NDLTYPE_EXPONENT (1 + 7)
  15716. #define SIZE_NDLTYPE_QUEUESTATUS (1 + 1)
  15717. #define SIZE_NDLTYPE_DCCMECHANISM (1 + 6)
  15718. #define SIZE_BYTE (8)
  15719.  
  15720. #define INVALID_ACPRIO ((1 << SIZE_NDLTYPE_ACPRIO) - 1)
  15721. #define INVALID_CONTROLLOOP ((1 << SIZE_NDLTYPE_CONTROLLOOP) - 1)
  15722. #define INVALID_ARRIVALRATE ((1 << SIZE_NDLTYPE_ARRIVALRATE) - 1)
  15723. #define INVALID_CHANNELLOAD ((1 << SIZE_NDLTYPE_CHANNELLOAD) - 1)
  15724. #define INVALID_CHANNELUSE ((1 << SIZE_NDLTYPE_CHANNELUSE) - 1)
  15725. #define INVALID_DATARATE ((1 << SIZE_NDLTYPE_DATARATE) - 1)
  15726. #define INVALID_DISTANCE ((1 << SIZE_NDLTYPE_DISTANCE) - 1)
  15727. #define INVALID_NUMBERELEMENTS ((1 << SIZE_NDLTYPE_NUMBERELEMENTS) - 1)
  15728. #define INVALID_PACKETDURATION ((1 << SIZE_NDLTYPE_PACKETDURATION) - 1)
  15729. #define INVALID_PACKETINTERVAL ((1 << SIZE_NDLTYPE_PACKETINTERVAL) - 1)
  15730. #define INVALID_PATHLOSS ((1 << SIZE_NDLTYPE_PATHLOSS) - 1)
  15731. #define INVALID_RXPOWER ((1 << SIZE_NDLTYPE_RXPOWER) - 1)
  15732. #define INVALID_SNR ((1 << SIZE_NDLTYPE_SNR) - 1)
  15733. #define INVALID_TIMING ((1 << SIZE_NDLTYPE_TIMING) - 1)
  15734. #define INVALID_TXPOWER ((1 << SIZE_NDLTYPE_TXPOWER) - 1)
  15735. #define INVALID_RATIO ((1 << SIZE_NDLTYPE_RATIO) - 1)
  15736. #define INVALID_EXPONENT ((1 << SIZE_NDLTYPE_EXPONENT) - 1)
  15737. #define INVALID_QUEUESTATS ((1 << SIZE_NDLTYPE_QUEUESTATUS) - 1)
  15738. #define INVALID_DCCMECHANISM ((1 << SIZE_NDLTYPE_DCCMECHANISM) - 1)
  15739.  
  15740. /** The MCS_COUNT macro cannot be modified without breaking
  15741. * WMI compatibility. */
  15742. #define MCS_COUNT (8)
  15743.  
  15744. /** Flags for ndlType_dccMechanism. */
  15745. typedef enum {
  15746. DCC_MECHANISM_TPC = 1,
  15747. DCC_MECHANISM_TRC = 2,
  15748. DCC_MECHANISM_TDC = 4,
  15749. DCC_MECHANISM_DSC = 8,
  15750. DCC_MECHANISM_TAC = 16,
  15751. DCC_MECHANISM_RESERVED = 32,
  15752. DCC_MECHANISM_ALL = 0x3f,
  15753. } wmi_dcc_ndl_type_dcc_mechanism;
  15754.  
  15755. /** Values for ndlType_queueStatus. */
  15756. typedef enum {
  15757. DCC_QUEUE_CLOSED = 0,
  15758. DCC_QUEUE_OPEN = 1,
  15759. } wmi_dcc_ndl_type_queue_status;
  15760.  
  15761. /** For ndlType_acPrio, use the values in wmi_traffic_ac. */
  15762.  
  15763. /** Values for ndlType_datarate */
  15764. typedef enum {
  15765. DCC_DATARATE_3_MBPS = 0,
  15766. DCC_DATARATE_4_5_MBPS = 1,
  15767. DCC_DATARATE_6_MBPS = 2,
  15768. DCC_DATARATE_9_MBPS = 3,
  15769. DCC_DATARATE_12_MBPS = 4,
  15770. DCC_DATARATE_18_MBPS = 5,
  15771. DCC_DATARATE_24_MBPS = 6,
  15772. DCC_DATARATE_27_MBPS = 7,
  15773. } wmi_dcc_ndl_type_datarate;
  15774.  
  15775. /** Data structure for active state configuration. */
  15776. typedef struct {
  15777. /** TLV tag and len; tag equals
  15778. * WMITLV_TAG_STRUC_wmi_dcc_ndl_active_state_config */
  15779. A_UINT32 tlv_header;
  15780. /**
  15781. * NDL_asStateId, ndlType_numberElements, 1+6 bits.
  15782. * NDL_asChanLoad, ndlType_channelLoad, 1+10 bits.
  15783. */
  15784. A_UINT32 state_info;
  15785. /**
  15786. * NDL_asDcc(AC_BK), ndlType_dccMechanism, 1+6 bits.
  15787. * NDL_asDcc(AC_BE), ndlType_dccMechanism, 1+6 bits.
  15788. * NDL_asDcc(AC_VI), ndlType_dccMechanism, 1+6 bits.
  15789. * NDL_asDcc(AC_VO), ndlType_dccMechanism, 1+6 bits.
  15790. */
  15791. A_UINT32 as_dcc[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_DCCMECHANISM)];
  15792.  
  15793. /**
  15794. * NDL_asTxPower(AC_BK), ndlType_txPower, 1+7 bits.
  15795. * NDL_asTxPower(AC_BE), ndlType_txPower, 1+7 bits.
  15796. * NDL_asTxPower(AC_VI), ndlType_txPower, 1+7 bits.
  15797. * NDL_asTxPower(AC_VO), ndlType_txPower, 1+7 bits.
  15798. */
  15799. A_UINT32 as_tx_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_TXPOWER)];
  15800. /**
  15801. * NDL_asPacketInterval(AC_BK), ndlType_packetInterval, 1+10 bits.
  15802. * NDL_asPacketInterval(AC_BE), ndlType_packetInterval, 1+10 bits.
  15803. * NDL_asPacketInterval(AC_VI), ndlType_packetInterval, 1+10 bits.
  15804. * NDL_asPacketInterval(AC_VO), ndlType_packetInterval, 1+10 bits.
  15805. */
  15806. A_UINT32 as_packet_interval_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETINTERVAL)];
  15807. /**
  15808. * NDL_asDatarate(AC_BK), ndlType_datarate, 1+3 bits.
  15809. * NDL_asDatarate(AC_BE), ndlType_datarate, 1+3 bits.
  15810. * NDL_asDatarate(AC_VI), ndlType_datarate, 1+3 bits.
  15811. * NDL_asDatarate(AC_VO), ndlType_datarate, 1+3 bits.
  15812. */
  15813. A_UINT32 as_datarate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_DATARATE)];
  15814. /**
  15815. * NDL_asCarrierSense(AC_BK), ndlType_rxPower, 1+7 bits.
  15816. * NDL_asCarrierSense(AC_BE), ndlType_rxPower, 1+7 bits.
  15817. * NDL_asCarrierSense(AC_VI), ndlType_rxPower, 1+7 bits.
  15818. * NDL_asCarrierSense(AC_VO), ndlType_rxPower, 1+7 bits.
  15819. */
  15820. A_UINT32 as_carrier_sense_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_RXPOWER)];
  15821. } wmi_dcc_ndl_active_state_config;
  15822.  
  15823. #define WMI_NDL_AS_STATE_ID_GET(ptr) WMI_GET_BITS((ptr)->state_info, 0, 7)
  15824. #define WMI_NDL_AS_STATE_ID_SET(ptr,val) WMI_SET_BITS((ptr)->state_info, 0, 7, val)
  15825. #define WMI_NDL_AS_CHAN_LOAD_GET(ptr) WMI_GET_BITS((ptr)->state_info, 7, 11)
  15826. #define WMI_NDL_AS_CHAN_LOAD_SET(ptr,val) WMI_SET_BITS((ptr)->state_info, 7, 11, val)
  15827. #define WMI_NDL_AS_DCC_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->as_dcc, acprio, SIZE_NDLTYPE_DCCMECHANISM)
  15828. #define WMI_NDL_AS_DCC_SET(ptr,acprio,val) wmi_packed_arr_set_bits((ptr)->as_dcc, acprio, SIZE_NDLTYPE_DCCMECHANISM, val)
  15829. #define WMI_NDL_AS_TX_POWER_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->as_tx_power_ac, acprio, SIZE_NDLTYPE_TXPOWER)
  15830. #define WMI_NDL_AS_TX_POWER_SET(ptr,acprio,val) wmi_packed_arr_set_bits((ptr)->as_tx_power_ac, acprio, SIZE_NDLTYPE_TXPOWER, val)
  15831. #define WMI_NDL_AS_PACKET_INTERVAL_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->as_packet_interval_ac, acprio, SIZE_NDLTYPE_PACKETINTERVAL)
  15832. #define WMI_NDL_AS_PACKET_INTERVAL_SET(ptr,acprio,val) wmi_packed_arr_set_bits((ptr)->as_packet_interval_ac, acprio, SIZE_NDLTYPE_PACKETINTERVAL, val)
  15833. #define WMI_NDL_AS_DATARATE_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->as_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE)
  15834. #define WMI_NDL_AS_DATARATE_SET(ptr,acprio,val) wmi_packed_arr_set_bits((ptr)->as_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE, val)
  15835. #define WMI_NDL_AS_CARRIER_SENSE_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->as_carrier_sense_ac, acprio, SIZE_NDLTYPE_RXPOWER)
  15836. #define WMI_NDL_AS_CARRIER_SENSE_SET(ptr,acprio,val) wmi_packed_arr_set_bits((ptr)->as_carrier_sense_ac, acprio, SIZE_NDLTYPE_RXPOWER, val)
  15837.  
  15838. /** Data structure for EDCA/QOS parameters. */
  15839. typedef struct
  15840. {
  15841. /** TLV tag and len; tag equals
  15842. * WMITLV_TAG_STRUC_wmi_qos_parameter */
  15843. A_UINT32 tlv_header;
  15844. /** Arbitration Inter-Frame Spacing. Range: 2-15 */
  15845. A_UINT32 aifsn;
  15846. /** Contention Window minimum. Range: 1 - 10 */
  15847. A_UINT32 cwmin;
  15848. /** Contention Window maximum. Range: 1 - 10 */
  15849. A_UINT32 cwmax;
  15850. } wmi_qos_parameter;
  15851.  
  15852. /** Data structure for information specific to a channel. */
  15853. typedef struct {
  15854. /** TLV tag and len; tag equals
  15855. * WMITLV_TAG_STRUC_wmi_ocb_channel */
  15856. A_UINT32 tlv_header;
  15857. A_UINT32 bandwidth; /* MHz units */
  15858. wmi_mac_addr mac_address;
  15859. } wmi_ocb_channel;
  15860.  
  15861. /** Data structure for an element of the schedule array. */
  15862. typedef struct {
  15863. /** TLV tag and len; tag equals
  15864. * WMITLV_TAG_STRUC_wmi_ocb_schedule_element */
  15865. A_UINT32 tlv_header;
  15866. A_UINT32 channel_freq; /* MHz units */
  15867. A_UINT32 total_duration; /* ms units */
  15868. A_UINT32 guard_interval; /* ms units */
  15869. } wmi_ocb_schedule_element;
  15870.  
  15871. /** Data structure for OCB configuration. */
  15872. typedef struct {
  15873. /** TLV tag and len; tag equals
  15874. * WMITLV_TAG_STRUC_wmi_ocb_set_config_cmd_fixed_param */
  15875. A_UINT32 tlv_header;
  15876. /** VDEV id(interface) that is being configured */
  15877. A_UINT32 vdev_id;
  15878. A_UINT32 channel_count;
  15879. A_UINT32 schedule_size;
  15880. A_UINT32 flags;
  15881. A_UINT32 ta_max_duration; /* Max duration of continuing multichannel operation without receiving a TA frame (units = seconds) */
  15882.  
  15883. /** This is followed by a TLV array of wmi_channel. */
  15884. /** This is followed by a TLV array of wmi_ocb_channel. */
  15885. /** This is followed by a TLV array of wmi_qos_parameter. */
  15886. /** This is followed by a TLV array of wmi_dcc_ndl_chan. */
  15887. /** This is followed by a TLV array of wmi_dcc_ndl_active_state_config. */
  15888. /** This is followed by a TLV array of wmi_ocb_schedule_element. */
  15889. } wmi_ocb_set_config_cmd_fixed_param;
  15890.  
  15891. #define EXPIRY_TIME_IN_TSF_TIMESTAMP_OFFSET 0
  15892. #define EXPIRY_TIME_IN_TSF_TIMESTAMP_MASK 1
  15893.  
  15894. #define WMI_OCB_EXPIRY_TIME_IN_TSF(ptr) (((ptr)->flags & EXPIRY_TIME_IN_TSF_TIMESTAMP_MASK) >> EXPIRY_TIME_IN_TSF_TIMESTAMP_OFFSET)
  15895.  
  15896.  
  15897. /** Data structure for the response to the WMI_OCB_SET_CONFIG_CMDID command. */
  15898. typedef struct {
  15899. /** TLV tag and len; tag equals
  15900. * WMITLV_TAG_STRUC_wmi_ocb_set_config_resp_event_fixed_param */
  15901. A_UINT32 tlv_header;
  15902. /* VDEV identifier */
  15903. A_UINT32 vdev_id;
  15904. A_UINT32 status;
  15905. } wmi_ocb_set_config_resp_event_fixed_param;
  15906.  
  15907. /* SIZE_UTC_TIME and SIZE_UTC_TIME_ERROR cannot be modified without breaking
  15908. WMI compatibility. */
  15909. #define SIZE_UTC_TIME (10) /* The size of the utc time in bytes. */
  15910. #define SIZE_UTC_TIME_ERROR (5) /* The size of the utc time error in bytes. */
  15911.  
  15912. /** Data structure to set the UTC time. */
  15913. typedef struct {
  15914. /** TLV tag and len; tag equals
  15915. * WMITLV_TAG_STRUC_wmi_ocb_set_utc_time_cmd_fixed_param */
  15916. A_UINT32 tlv_header;
  15917. /* VDEV identifier */
  15918. A_UINT32 vdev_id;
  15919. /** 10 bytes of the utc time. */
  15920. A_UINT32 utc_time[WMI_PACKED_ARR_SIZE(SIZE_UTC_TIME,SIZE_BYTE)];
  15921. /** 5 bytes of the time error. */
  15922. A_UINT32 time_error[WMI_PACKED_ARR_SIZE(SIZE_UTC_TIME_ERROR,SIZE_BYTE)];
  15923. } wmi_ocb_set_utc_time_cmd_fixed_param;
  15924.  
  15925. #define WMI_UTC_TIME_GET(ptr,byte_index) wmi_packed_arr_get_bits((ptr)->utc_time, byte_index, SIZE_BYTE)
  15926. #define WMI_UTC_TIME_SET(ptr,byte_index,val) wmi_packed_arr_set_bits((ptr)->utc_time, byte_index, SIZE_BYTE, val)
  15927. #define WMI_TIME_ERROR_GET(ptr,byte_index) wmi_packed_arr_get_bits((ptr)->time_error, byte_index, SIZE_BYTE)
  15928. #define WMI_TIME_ERROR_SET(ptr,byte_index,val) wmi_packed_arr_set_bits((ptr)->time_error, byte_index, SIZE_BYTE, val)
  15929.  
  15930. /** Data structure start the timing advertisement. The template for the
  15931. * timing advertisement frame follows this structure in the WMI command.
  15932. */
  15933. typedef struct {
  15934. /** TLV tag and len; tag equals
  15935. * WMITLV_TAG_STRUC_wmi_ocb_start_timing_advert_cmd_fixed_param */
  15936. A_UINT32 tlv_header;
  15937. /* VDEV identifier */
  15938. A_UINT32 vdev_id;
  15939. /** Number of times the TA is sent every 5 seconds. */
  15940. A_UINT32 repeat_rate;
  15941. /** The frequency on which to transmit. */
  15942. A_UINT32 channel_freq; /* MHz units */
  15943. /** The offset into the template of the timestamp. */
  15944. A_UINT32 timestamp_offset;
  15945. /** The offset into the template of the time value. */
  15946. A_UINT32 time_value_offset;
  15947. /** The length of the timing advertisement template. The
  15948. * template is in the TLV data. */
  15949. A_UINT32 timing_advert_template_length;
  15950.  
  15951. /** This is followed by a binary array containing the TA template. */
  15952. } wmi_ocb_start_timing_advert_cmd_fixed_param;
  15953.  
  15954. /** Data structure to stop the timing advertisement. */
  15955. typedef struct {
  15956. /** TLV tag and len; tag equals
  15957. * WMITLV_TAG_STRUC_wmi_ocb_stop_timing_advert_cmd_fixed_param */
  15958. A_UINT32 tlv_header;
  15959. /* VDEV identifier */
  15960. A_UINT32 vdev_id;
  15961. A_UINT32 channel_freq; /* MHz units */
  15962. } wmi_ocb_stop_timing_advert_cmd_fixed_param;
  15963.  
  15964. /** Data structure for the request for WMI_OCB_GET_TSF_TIMER_CMDID. */
  15965. typedef struct {
  15966. /** TLV tag and len; tag equals
  15967. * WMITLV_TAG_STRUC_wmi_ocb_get_tsf_timer_cmd_fixed_param */
  15968. A_UINT32 tlv_header;
  15969. /* VDEV identifier */
  15970. A_UINT32 vdev_id;
  15971. A_UINT32 reserved;
  15972. } wmi_ocb_get_tsf_timer_cmd_fixed_param;
  15973.  
  15974. /** Data structure for the response to WMI_OCB_GET_TSF_TIMER_CMDID. */
  15975. typedef struct {
  15976. /** TLV tag and len; tag equals
  15977. * WMITLV_TAG_STRUC_wmi_ocb_get_tsf_timer_resp_event_fixed_param */
  15978. A_UINT32 tlv_header;
  15979. /* VDEV identifier */
  15980. A_UINT32 vdev_id;
  15981. A_UINT32 tsf_timer_high;
  15982. A_UINT32 tsf_timer_low;
  15983. } wmi_ocb_get_tsf_timer_resp_event_fixed_param;
  15984.  
  15985. /** Data structure for DCC stats configuration per channel. */
  15986. typedef struct {
  15987. /** TLV tag and len; tag equals
  15988. * WMITLV_TAG_STRUC_wmi_dcc_ndl_stats_per_channel */
  15989. A_UINT32 tlv_header;
  15990.  
  15991. /** The channel for which this applies, 16 bits. */
  15992. /** The dcc_stats_bitmap, 8 bits. */
  15993. A_UINT32 chan_info;
  15994.  
  15995. /** Demodulation model parameters. */
  15996. /**
  15997. * NDL_snrBackoff(MCS0), ndlType_snr, 1+7 bits.
  15998. * NDL_snrBackoff(MCS1), ndlType_snr, 1+7 bits.
  15999. * NDL_snrBackoff(MCS2), ndlType_snr, 1+7 bits.
  16000. * NDL_snrBackoff(MCS3), ndlType_snr, 1+7 bits.
  16001. * NDL_snrBackoff(MCS4), ndlType_snr, 1+7 bits.
  16002. * NDL_snrBackoff(MCS5), ndlType_snr, 1+7 bits.
  16003. * NDL_snrBackoff(MCS6), ndlType_snr, 1+7 bits.
  16004. * NDL_snrBackoff(MCS7), ndlType_snr, 1+7 bits.
  16005. */
  16006. A_UINT32 snr_backoff_mcs[WMI_PACKED_ARR_SIZE(MCS_COUNT,SIZE_NDLTYPE_SNR)];
  16007.  
  16008. /** Communication ranges. */
  16009. /**
  16010. * tx_power, ndlType_txPower, 1+7 bits.
  16011. * datarate, ndlType_datarate, 1+3 bits.
  16012. */
  16013. A_UINT32 tx_power_datarate;
  16014. /**
  16015. * NDL_carrierSenseRange, ndlType_distance, 1+12 bits.
  16016. * NDL_estCommRange, ndlType_distance, 1+12 bits.
  16017. */
  16018. A_UINT32 carrier_sense_est_comm_range;
  16019.  
  16020. /** Channel load measures. */
  16021. /**
  16022. * dccSensitivity, ndlType_rxPower, 1+7 bits.
  16023. * carrierSense, ndlType_rxPower, 1+7 bits.
  16024. * NDL_channelLoad, ndlType_channelLoad, 1+10 bits.
  16025. */
  16026. A_UINT32 dcc_stats;
  16027. /**
  16028. * NDL_packetArrivalRate, ndlType_arrivalRate, 1+13 bits.
  16029. * NDL_packetAvgDuration, ndlType_packetDuration, 1+11 bits.
  16030. */
  16031. A_UINT32 packet_stats;
  16032. /**
  16033. * NDL_channelBusyTime, ndlType_channelLoad, 1+10 bits.
  16034. */
  16035. A_UINT32 channel_busy_time;
  16036.  
  16037. /** Transmit packet statistics. */
  16038. /**
  16039. * NDL_txPacketArrivalRate(AC_BK), ndlType_arrivalRate, 1+13 bits.
  16040. * NDL_txPacketArrivalRate(AC_BE), ndlType_arrivalRate, 1+13 bits.
  16041. * NDL_txPacketArrivalRate(AC_VI), ndlType_arrivalRate, 1+13 bits.
  16042. * NDL_txPacketArrivalRate(AC_VO), ndlType_arrivalRate, 1+13 bits.
  16043. */
  16044. A_UINT32 tx_packet_arrival_rate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_ARRIVALRATE)];
  16045. /**
  16046. * NDL_txPacketAvgDuration(AC_BK), ndlType_packetDuration, 1+11 bits.
  16047. * NDL_txPacketAvgDuration(AC_BE), ndlType_packetDuration, 1+11 bits.
  16048. * NDL_txPacketAvgDuration(AC_VI), ndlType_packetDuration, 1+11 bits.
  16049. * NDL_txPacketAvgDuration(AC_VO), ndlType_packetDuration, 1+11 bits.
  16050. */
  16051. A_UINT32 tx_packet_avg_duration_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_PACKETDURATION)];
  16052. /**
  16053. * NDL_txChannelUse(AC_BK), ndlType_channelUse, 1+13 bits.
  16054. * NDL_txChannelUse(AC_BE), ndlType_channelUse, 1+13 bits.
  16055. * NDL_txChannelUse(AC_VI), ndlType_channelUse, 1+13 bits.
  16056. * NDL_txChannelUse(AC_VO), ndlType_channelUse, 1+13 bits.
  16057. */
  16058. A_UINT32 tx_channel_use_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_CHANNELUSE)];
  16059. /**
  16060. * NDL_txSignalAvgPower(AC_BK), ndlType_txPower, 1+7 bits.
  16061. * NDL_txSignalAvgPower(AC_BE), ndlType_txPower, 1+7 bits.
  16062. * NDL_txSignalAvgPower(AC_VI), ndlType_txPower, 1+7 bits.
  16063. * NDL_txSignalAvgPower(AC_VO), ndlType_txPower, 1+7 bits.
  16064. */
  16065. A_UINT32 tx_signal_avg_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_TXPOWER)];
  16066. } wmi_dcc_ndl_stats_per_channel;
  16067.  
  16068. #define WMI_NDL_STATS_SNR_BACKOFF_GET(ptr,mcs) wmi_packed_arr_get_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR)
  16069. #define WMI_NDL_STATS_SNR_BACKOFF_SET(ptr,mcs,val) wmi_packed_arr_set_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR, val)
  16070.  
  16071. #define WMI_NDL_STATS_CHAN_FREQ_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 0, 16)
  16072. #define WMI_NDL_STATS_CHAN_FREQ_SET(ptr,val) WMI_SET_BITS((ptr)->chan_info, 0, 16, val)
  16073. #define WMI_NDL_STATS_DCC_STATS_BITMAP_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 16, 8)
  16074. #define WMI_NDL_STATS_DCC_STATS_BITMAP_SET(ptr,val) WMI_SET_BITS((ptr)->chan_info, 16, 8, val)
  16075.  
  16076. #define WMI_NDL_STATS_SNR_BACKOFF_GET(ptr,mcs) wmi_packed_arr_get_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR)
  16077. #define WMI_NDL_STATS_SNR_BACKOFF_SET(ptr,mcs,val) wmi_packed_arr_set_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR, val)
  16078.  
  16079. #define WMI_TX_POWER_GET(ptr) WMI_GET_BITS((ptr)->tx_power_datarate, 0, 8)
  16080. #define WMI_TX_POWER_SET(ptr,val) WMI_SET_BITS((ptr)->tx_power_datarate, 0, 8, val)
  16081. #define WMI_TX_DATARATE_GET(ptr) WMI_GET_BITS((ptr)->tx_power_datarate, 0, 4)
  16082. #define WMI_TX_DATARATE_SET(ptr,val) WMI_SET_BITS((ptr)->tx_power_datarate, 0, 4, val)
  16083. #define WMI_NDL_CARRIER_SENSE_RANGE_GET(ptr) WMI_GET_BITS((ptr)->carrier_sense_est_comm_range, 0, 13)
  16084. #define WMI_NDL_CARRIER_SENSE_RANGE_SET(ptr,val) WMI_SET_BITS((ptr)->carrier_sense_est_comm_range, 0, 13, val)
  16085. #define WMI_NDL_EST_COMM_RANGE_GET(ptr) WMI_GET_BITS((ptr)->carrier_sense_est_comm_range, 13, 13)
  16086. #define WMI_NDL_EST_COMM_RANGE_SET(ptr,val) WMI_SET_BITS((ptr)->carrier_sense_est_comm_range, 13, 13, val)
  16087.  
  16088. #define WMI_DCC_SENSITIVITY_GET(ptr) WMI_GET_BITS((ptr)->dcc_stats, 0, 8)
  16089. #define WMI_DCC_SENSITIVITY_SET(ptr,val) WMI_SET_BITS((ptr)->dcc_stats, 0, 8, val)
  16090. #define WMI_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->dcc_stats, 8, 8)
  16091. #define WMI_CARRIER_SENSE_SET(ptr,val) WMI_SET_BITS((ptr)->dcc_stats, 8, 8, val)
  16092. #define WMI_NDL_CHANNEL_LOAD_GET(ptr) WMI_GET_BITS((ptr)->dcc_stats, 16, 11)
  16093. #define WMI_NDL_CHANNEL_LOAD_SET(ptr,val) WMI_SET_BITS((ptr)->dcc_stats, 16, 11, val)
  16094. #define WMI_NDL_PACKET_ARRIVAL_RATE_GET(ptr) WMI_GET_BITS((ptr)->packet_stats, 0, 14)
  16095. #define WMI_NDL_PACKET_ARRIVAL_RATE_SET(ptr,val) WMI_SET_BITS((ptr)->packet_stats, 0, 14, val)
  16096. #define WMI_NDL_PACKET_AVG_DURATION_GET(ptr) WMI_GET_BITS((ptr)->packet_stats, 14, 12)
  16097. #define WMI_NDL_PACKET_AVG_DURATION_SET(ptr,val) WMI_SET_BITS((ptr)->packet_stats, 14, 12, val)
  16098. #define WMI_NDL_CHANNEL_BUSY_TIME_GET(ptr) WMI_GET_BITS((ptr)->channel_busy_time, 0, 11)
  16099. #define WMI_NDL_CHANNEL_BUSY_TIME_SET(ptr,val) WMI_SET_BITS((ptr)->channel_busy_time, 0, 11, val)
  16100.  
  16101. #define WMI_NDL_TX_PACKET_ARRIVAL_RATE_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->tx_packet_arrival_rate_ac, acprio, SIZE_NDLTYPE_ARRIVALRATE)
  16102. #define WMI_NDL_TX_PACKET_ARRIVAL_RATE_SET(ptr,acprio,val) wmi_packed_arr_set_bits((ptr)->tx_packet_arrival_rate_ac, acprio, SIZE_NDLTYPE_ARRIVALRATE, val)
  16103. #define WMI_NDL_TX_PACKET_AVG_DURATION_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->tx_packet_avg_duration_ac, acprio, SIZE_NDLTYPE_PACKETDURATION)
  16104. #define WMI_NDL_TX_PACKET_AVG_DURATION_SET(ptr,acprio,val) wmi_packed_arr_set_bits((ptr)->tx_packet_avg_duration_ac, acprio, SIZE_NDLTYPE_PACKETDURATION, val)
  16105. #define WMI_NDL_TX_CHANNEL_USE_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->tx_channel_use_ac, acprio, SIZE_NDLTYPE_CHANNELUSE)
  16106. #define WMI_NDL_TX_CHANNEL_USE_SET(ptr,acprio,val) wmi_packed_arr_set_bits((ptr)->tx_channel_use_ac, acprio, SIZE_NDLTYPE_CHANNELUSE, val)
  16107. #define WMI_NDL_TX_SIGNAL_AVG_POWER_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->tx_signal_avg_power_ac, acprio, SIZE_NDLTYPE_TXPOWER)
  16108. #define WMI_NDL_TX_SIGNAL_AVG_POWER_SET(ptr,acprio,val) wmi_packed_arr_set_bits((ptr)->tx_signal_avg_power_ac, acprio, SIZE_NDLTYPE_TXPOWER, val)
  16109.  
  16110. /** Bitmap for DCC stats. */
  16111. typedef enum {
  16112. DCC_STATS_DEMODULATION_MODEL = 1,
  16113. DCC_STATS_COMMUNICATION_RANGES = 2,
  16114. DCC_STATS_CHANNEL_LOAD_MEASURES = 4,
  16115. DCC_STATS_TRANSMIT_PACKET_STATS = 8,
  16116. DCC_STATS_TRANSMIT_MODEL_PARAMETER = 16,
  16117. DCC_STATS_ALL = 0xff,
  16118. } wmi_dcc_stats_bitmap;
  16119.  
  16120. /** Data structure for getting the DCC stats. */
  16121. typedef struct {
  16122. /** TLV tag and len; tag equals
  16123. * WMITLV_TAG_STRUC_wmi_dcc_get_stats_cmd_fixed_param */
  16124. A_UINT32 tlv_header;
  16125.  
  16126. /* VDEV identifier */
  16127. A_UINT32 vdev_id;
  16128.  
  16129. /** The number of channels for which stats are being requested. */
  16130. A_UINT32 num_channels;
  16131.  
  16132. /** This is followed by a TLV array of wmi_dcc_channel_stats_request. */
  16133. } wmi_dcc_get_stats_cmd_fixed_param;
  16134.  
  16135. typedef struct {
  16136. /** TLV tag and len; tag equals
  16137. * WMITLV_TAG_STRUC_wmi_dcc_channel_stats_request */
  16138. A_UINT32 tlv_header;
  16139.  
  16140. /** The channel for which this applies. */
  16141. A_UINT32 chan_freq; /* MHz units */
  16142.  
  16143. /** The DCC stats being requested. */
  16144. A_UINT32 dcc_stats_bitmap;
  16145. } wmi_dcc_channel_stats_request;
  16146.  
  16147. /** Data structure for the response with the DCC stats. */
  16148. typedef struct {
  16149. /** TLV tag and len; tag equals
  16150. * WMITLV_TAG_STRUC_wmi_dcc_get_stats_resp_event_fixed_param */
  16151. A_UINT32 tlv_header;
  16152. /* VDEV identifier */
  16153. A_UINT32 vdev_id;
  16154. /** Number of channels in the response. */
  16155. A_UINT32 num_channels;
  16156. /** This is followed by a TLV array of wmi_dcc_ndl_stats_per_channel. */
  16157. } wmi_dcc_get_stats_resp_event_fixed_param;
  16158.  
  16159. /** Data structure for clearing the DCC stats. */
  16160. typedef struct {
  16161. /** TLV tag and len; tag equals
  16162. * WMITLV_TAG_STRUC_wmi_dcc_clear_stats_cmd_fixed_param */
  16163. A_UINT32 tlv_header;
  16164. /* VDEV identifier */
  16165. A_UINT32 vdev_id;
  16166. A_UINT32 dcc_stats_bitmap;
  16167. } wmi_dcc_clear_stats_cmd_fixed_param;
  16168.  
  16169. /** Data structure for the pushed DCC stats */
  16170. typedef struct {
  16171. /** TLV tag and len; tag equals
  16172. * WMITLV_TAG_STRUC_wmi_dcc_stats_event_fixed_param */
  16173. A_UINT32 tlv_header;
  16174. /* VDEV identifier */
  16175. A_UINT32 vdev_id;
  16176. /** The number of channels in the response. */
  16177. A_UINT32 num_channels;
  16178.  
  16179. /** This is followed by a TLV array of wmi_dcc_ndl_stats_per_channel. */
  16180. } wmi_dcc_stats_event_fixed_param;
  16181.  
  16182. /** Data structure for updating NDL per channel. */
  16183. typedef struct {
  16184. /** TLV tag and len; tag equals
  16185. * WMITLV_TAG_STRUC_wmi_dcc_ndl_chan */
  16186. A_UINT32 tlv_header;
  16187.  
  16188. /**
  16189. * Channel frequency, 16 bits
  16190. * NDL_numActiveState, ndlType_numberElements, 1+6 bits
  16191. */
  16192. A_UINT32 chan_info;
  16193.  
  16194. /**
  16195. * NDL_minDccSampling, 10 bits.
  16196. * Maximum time interval between subsequent checks of the DCC rules.
  16197. */
  16198. A_UINT32 ndl_min_dcc_sampling;
  16199.  
  16200. /**
  16201. * dcc_enable, 1 bit.
  16202. * dcc_stats_enable, 1 bit.
  16203. * dcc_stats_interval, 16 bits.
  16204. */
  16205. A_UINT32 dcc_flags;
  16206.  
  16207. /** General DCC configuration. */
  16208. /**
  16209. * NDL_timeUp, ndlType_timing, 1+12 bits.
  16210. * NDL_timeDown, ndlType_timing, 1+12 bits.
  16211. */
  16212. A_UINT32 general_config;
  16213.  
  16214. /** Transmit power thresholds. */
  16215. /**
  16216. * NDL_minTxPower, ndlType_txPower, 1+7 bits.
  16217. * NDL_maxTxPower, ndlType_txPower, 1+7 bits.
  16218. */
  16219. A_UINT32 min_max_tx_power; /* see "ETSI TS 102 687" table above for units */
  16220. /**
  16221. * NDL_defTxPower(AC_BK), ndlType_txPower, 1+7 bits.
  16222. * NDL_defTxPower(AC_BE), ndlType_txPower, 1+7 bits.
  16223. * NDL_defTxPower(AC_VI), ndlType_txPower, 1+7 bits.
  16224. * NDL_defTxPower(AC_VO), ndlType_txPower, 1+7 bits.
  16225. */
  16226. /* see "ETSI TS 102 687" table above for units */
  16227. A_UINT32 def_tx_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_TXPOWER)];
  16228.  
  16229. /** Packet timing thresholds. */
  16230. /**
  16231. * NDL_maxPacketDuration(AC_BK), ndlType_packetDuration, 1+11 bits.
  16232. * NDL_maxPacketDuration(AC_BE), ndlType_packetDuration, 1+11 bits.
  16233. * NDL_maxPacketDuration(AC_VI), ndlType_packetDuration, 1+11 bits.
  16234. * NDL_maxPacketDuration(AC_VO), ndlType_packetDuration, 1+11 bits.
  16235. */
  16236. A_UINT32 max_packet_duration_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_PACKETDURATION)];
  16237. /**
  16238. * NDL_minPacketInterval, ndlType_packetInterval, 1+10 bits.
  16239. * NDL_maxPacketInterval, ndlType_packetInterval, 1+10 bits.
  16240. */
  16241. A_UINT32 min_max_packet_interval;
  16242. /**
  16243. * NDL_defPacketInterval(AC_BK), ndlType_packetInterval, 1+10 bits.
  16244. * NDL_defPacketInterval(AC_BE), ndlType_packetInterval, 1+10 bits.
  16245. * NDL_defPacketInterval(AC_VI), ndlType_packetInterval, 1+10 bits.
  16246. * NDL_defPacketInterval(AC_VO), ndlType_packetInterval, 1+10 bits.
  16247. */
  16248. A_UINT32 def_packet_interval_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_PACKETINTERVAL)];
  16249.  
  16250. /** Packet datarate thresholds. */
  16251. /**
  16252. * NDL_minDatarate, ndlType_datarate, 1+3 bits.
  16253. * NDL_maxDatarate, ndlType_datarate, 1+3 bits.
  16254. */
  16255. A_UINT32 min_max_datarate;
  16256. /**
  16257. * NDL_defDatarate(AC_BK), ndlType_datarate, 1+3 bits.
  16258. * NDL_defDatarate(AC_BE), ndlType_datarate, 1+3 bits.
  16259. * NDL_defDatarate(AC_VI), ndlType_datarate, 1+3 bits.
  16260. * NDL_defDatarate(AC_VO), ndlType_datarate, 1+3 bits.
  16261. */
  16262. A_UINT32 def_datarate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_DATARATE)];
  16263.  
  16264. /** Receive signal thresholds. */
  16265. /**
  16266. * NDL_minCarrierSense, ndlType_rxPower, 1+7 bits.
  16267. * NDL_maxCarrierSense, ndlType_rxPower, 1+7 bits.
  16268. * NDL_defCarrierSense, ndlType_rxPower, 1+7 bits.
  16269. */
  16270. A_UINT32 min_max_def_carrier_sense;
  16271.  
  16272. /** Receive model parameter. */
  16273. /**
  16274. * NDL_defDccSensitivity, ndlType_rxPower, 1+7 bits.
  16275. * NDL_maxCsRange, ndlType_distance, 1+12 bits.
  16276. * NDL_refPathLoss, ndlType_pathloss, 1+5 bits.
  16277. */
  16278. A_UINT32 receive_model_parameter;
  16279.  
  16280. /**
  16281. * NDL_minSNR, ndlType_snr, 1+7 bits.
  16282. */
  16283. A_UINT32 receive_model_parameter_2;
  16284.  
  16285. /** Demodulation model parameters. */
  16286. /**
  16287. * NDL_snrBackoff(MCS0), ndlType_snr, 1+7 bits.
  16288. * NDL_snrBackoff(MCS1), ndlType_snr, 1+7 bits.
  16289. * NDL_snrBackoff(MCS2), ndlType_snr, 1+7 bits.
  16290. * NDL_snrBackoff(MCS3), ndlType_snr, 1+7 bits.
  16291. * NDL_snrBackoff(MCS4), ndlType_snr, 1+7 bits.
  16292. * NDL_snrBackoff(MCS5), ndlType_snr, 1+7 bits.
  16293. * NDL_snrBackoff(MCS6), ndlType_snr, 1+7 bits.
  16294. * NDL_snrBackoff(MCS7), ndlType_snr, 1+7 bits.
  16295. */
  16296. A_UINT32 snr_backoff_mcs[WMI_PACKED_ARR_SIZE(MCS_COUNT,SIZE_NDLTYPE_SNR)];
  16297.  
  16298. /** Transmit model parameters. */
  16299. /**
  16300. * NDL_tmPacketArrivalRate(AC_BK), ndlType_arrivalRate, 1+13 bits.
  16301. * NDL_tmPacketArrivalRate(AC_BE), ndlType_arrivalRate, 1+13 bits.
  16302. * NDL_tmPacketArrivalRate(AC_VI), ndlType_arrivalRate, 1+13 bits.
  16303. * NDL_tmPacketArrivalRate(AC_VO), ndlType_arrivalRate, 1+13 bits.
  16304. */
  16305. A_UINT32 tm_packet_arrival_rate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_ARRIVALRATE)];
  16306. /**
  16307. * NDL_tmPacketAvgDuration(AC_BK), ndlType_packetDuration, 1+11 bits.
  16308. * NDL_tmPacketAvgDuration(AC_BE), ndlType_packetDuration, 1+11 bits.
  16309. * NDL_tmPacketAvgDuration(AC_VI), ndlType_packetDuration, 1+11 bits.
  16310. * NDL_tmPacketAvgDuration(AC_VO), ndlType_packetDuration, 1+11 bits.
  16311. */
  16312. A_UINT32 tm_packet_avg_duration_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETDURATION)];
  16313. /**
  16314. * NDL_tmSignalAvgPower(AC_BK), ndlType_txPower, 1+7 bits.
  16315. * NDL_tmSignalAvgPower(AC_BE), ndlType_txPower, 1+7 bits.
  16316. * NDL_tmSignalAvgPower(AC_VI), ndlType_txPower, 1+7 bits.
  16317. * NDL_tmSignalAvgPower(AC_VO), ndlType_txPower, 1+7 bits.
  16318. */
  16319. A_UINT32 tm_signal_avg_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_TXPOWER)];
  16320. /**
  16321. * NDL_tmMaxChannelUse, ndlType_channelUse, 1+13 bits.
  16322. */
  16323. A_UINT32 tm_max_channel_use;
  16324. /**
  16325. * NDL_tmChannelUse(AC_BK), ndlType_channelUse, 1+13 bits.
  16326. * NDL_tmChannelUse(AC_BE), ndlType_channelUse, 1+13 bits.
  16327. * NDL_tmChannelUse(AC_VI), ndlType_channelUse, 1+13 bits.
  16328. * NDL_tmChannelUse(AC_VO), ndlType_channelUse, 1+13 bits.
  16329. */
  16330. A_UINT32 tm_channel_use_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_CHANNELUSE)];
  16331.  
  16332. /** Channel load thresholds. */
  16333. /**
  16334. * NDL_minChannelLoad, ndlType_channelLoad, 1+10 bits.
  16335. * NDL_maxChannelLoad, ndlType_channelLoad, 1+10 bits.
  16336. */
  16337. A_UINT32 min_max_channel_load;
  16338.  
  16339. /** Transmit queue parameters. */
  16340. /**
  16341. * NDL_numQueue, ndlType_acPrio, 1+3 bits.
  16342. * NDL_refQueueStatus(AC_BK), ndlType_queueStatus, 1+1 bit.
  16343. * NDL_refQueueStatus(AC_BE), ndlType_queueStatus, 1+1 bit.
  16344. * NDL_refQueueStatus(AC_VI), ndlType_queueStatus, 1+1 bit.
  16345. * NDL_refQueueStatus(AC_VO), ndlType_queueStatus, 1+1 bit.
  16346. */
  16347. A_UINT32 transmit_queue_parameters;
  16348.  
  16349. /**
  16350. * NDL_refQueueLen(AC_BK), ndlType_numberElements, 1+6 bits.
  16351. * NDL_refQueueLen(AC_BE), ndlType_numberElements, 1+6 bits.
  16352. * NDL_refQueueLen(AC_VI), ndlType_numberElements, 1+6 bits.
  16353. * NDL_refQueueLen(AC_VO), ndlType_numberElements, 1+6 bits.
  16354. */
  16355. A_UINT32 numberElements[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_NUMBERELEMENTS)];
  16356.  
  16357. } wmi_dcc_ndl_chan;
  16358.  
  16359. #define WMI_CHAN_FREQ_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 0, 16)
  16360. #define WMI_CHAN_FREQ_SET(ptr,val) WMI_SET_BITS((ptr)->chan_info, 0, 16, val)
  16361. #define WMI_NDL_NUM_ACTIVE_STATE_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 16, 7)
  16362. #define WMI_NDL_NUM_ACTIVE_STATE_SET(ptr,val) WMI_SET_BITS((ptr)->chan_info, 16, 7, val)
  16363.  
  16364. #define WMI_NDL_MIN_DCC_SAMPLING_GET(ptr) WMI_GET_BITS((ptr)->ndl_min_dcc_sampling, 0, 10)
  16365. #define WMI_NDL_MIN_DCC_SAMPLING_SET(ptr,val) WMI_SET_BITS((ptr)->ndl_min_dcc_sampling, 0, 10, val)
  16366. #define WMI_NDL_MEASURE_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->ndl_min_dcc_sampling, 10, 16)
  16367. #define WMI_NDL_MEASURE_INTERVAL_SET(ptr,val) WMI_SET_BITS((ptr)->ndl_min_dcc_sampling, 10, 16, val)
  16368.  
  16369. #define WMI_NDL_DCC_ENABLE_GET(ptr) WMI_GET_BITS((ptr)->dcc_flags, 0, 1)
  16370. #define WMI_NDL_DCC_ENABLE_SET(ptr,val) WMI_SET_BITS((ptr)->dcc_flags, 0, 1, val)
  16371. #define WMI_NDL_DCC_STATS_ENABLE_GET(ptr) WMI_GET_BITS((ptr)->dcc_flags, 1, 1)
  16372. #define WMI_NDL_DCC_STATS_ENABLE_SET(ptr,val) WMI_SET_BITS((ptr)->dcc_flags, 1, 1, val)
  16373. #define WMI_NDL_DCC_STATS_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->dcc_flags, 2, 16)
  16374. #define WMI_NDL_DCC_STATS_INTERVAL_SET(ptr,val) WMI_SET_BITS((ptr)->dcc_flags, 2, 16, val)
  16375.  
  16376. #define WMI_NDL_TIME_UP_GET(ptr) WMI_GET_BITS((ptr)->general_config, 0, 13)
  16377. #define WMI_NDL_TIME_UP_SET(ptr,val) WMI_SET_BITS((ptr)->general_config, 0, 13, val)
  16378. #define WMI_NDL_TIME_DOWN_GET(ptr) WMI_GET_BITS((ptr)->general_config, 13, 13)
  16379. #define WMI_NDL_TIME_DOWN_SET(ptr,val) WMI_SET_BITS((ptr)->general_config, 13, 13, val)
  16380.  
  16381. #define WMI_NDL_MIN_TX_POWER_GET(ptr) WMI_GET_BITS((ptr)->min_max_tx_power, 0, 8)
  16382. #define WMI_NDL_MIN_TX_POWER_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_tx_power, 0, 8, val)
  16383. #define WMI_NDL_MAX_TX_POWER_GET(ptr) WMI_GET_BITS((ptr)->min_max_tx_power, 8, 8)
  16384. #define WMI_NDL_MAX_TX_POWER_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_tx_power, 8, 8, val)
  16385.  
  16386. #define WMI_NDL_DEF_TX_POWER_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->def_tx_power_ac, acprio, SIZE_NDLTYPE_TXPOWER)
  16387. #define WMI_NDL_DEF_TX_POWER_SET(ptr,acprio,val) wmi_packed_arr_set_bits((ptr)->def_tx_power_ac, acprio, SIZE_NDLTYPE_TXPOWER, val)
  16388.  
  16389. #define WMI_NDL_MAX_PACKET_DURATION_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->max_packet_duration_ac, acprio, SIZE_NDLTYPE_PACKETDURATION)
  16390. #define WMI_NDL_MAX_PACKET_DURATION_SET(ptr,acprio,val) wmi_packed_arr_set_bits((ptr)->max_packet_duration_ac, acprio, SIZE_NDLTYPE_PACKETDURATION, val)
  16391. #define WMI_NDL_MIN_PACKET_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->min_max_packet_interval, 0, 11)
  16392. #define WMI_NDL_MIN_PACKET_INTERVAL_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_packet_interval, 0, 11, val)
  16393. #define WMI_NDL_MAX_PACKET_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->min_max_packet_interval, 11, 11)
  16394. #define WMI_NDL_MAX_PACKET_INTERVAL_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_packet_interval, 11, 11, val)
  16395. #define WMI_NDL_DEF_PACKET_INTERVAL_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->def_packet_interval_ac, acprio, SIZE_NDLTYPE_PACKETINTERVAL)
  16396. #define WMI_NDL_DEF_PACKET_INTERVAL_SET(ptr,acprio,val) wmi_packed_arr_set_bits((ptr)->def_packet_interval_ac, acprio, SIZE_NDLTYPE_PACKETINTERVAL, val)
  16397.  
  16398. #define WMI_NDL_MIN_DATARATE_GET(ptr) WMI_GET_BITS((ptr)->min_max_datarate, 0, 4)
  16399. #define WMI_NDL_MIN_DATARATE_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_datarate, 0, 4, val)
  16400. #define WMI_NDL_MAX_DATARATE_GET(ptr) WMI_GET_BITS((ptr)->min_max_datarate, 4, 4)
  16401. #define WMI_NDL_MAX_DATARATE_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_datarate, 4, 4, val)
  16402. #define WMI_NDL_DEF_DATARATE_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->def_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE)
  16403. #define WMI_NDL_DEF_DATARATE_SET(ptr,acprio,val) wmi_packed_arr_set_bits((ptr)->def_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE, val)
  16404.  
  16405. #define WMI_NDL_MIN_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->min_max_def_carrier_sense, 0, 8)
  16406. #define WMI_NDL_MIN_CARRIER_SENSE_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_def_carrier_sense, 0, 8, val)
  16407. #define WMI_NDL_MAX_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->min_max_def_carrier_sense, 8, 8)
  16408. #define WMI_NDL_MAX_CARRIER_SENSE_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_def_carrier_sense, 8, 8, val)
  16409. #define WMI_NDL_DEF_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->min_max_def_carrier_sense, 16, 8)
  16410. #define WMI_NDL_DEF_CARRIER_SENSE_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_def_carrier_sense, 16, 8, val)
  16411.  
  16412. #define WMI_NDL_DEF_DCC_SENSITIVITY_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter, 0, 8)
  16413. #define WMI_NDL_DEF_DCC_SENSITIVITY_SET(ptr,val) WMI_SET_BITS((ptr)->receive_model_parameter, 0, 8, val)
  16414. #define WMI_NDL_MAX_CS_RANGE_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter, 8, 13)
  16415. #define WMI_NDL_MAX_CS_RANGE_SET(ptr,val) WMI_SET_BITS((ptr)->receive_model_parameter, 8, 13, val)
  16416. #define WMI_NDL_REF_PATH_LOSS_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter, 21, 6)
  16417. #define WMI_NDL_REF_PATH_LOSS_SET(ptr,val) WMI_SET_BITS((ptr)->receive_model_parameter, 21, 6, val)
  16418.  
  16419. #define WMI_NDL_MIN_SNR_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter_2, 0, 8)
  16420. #define WMI_NDL_MIN_SNR_SET(ptr,val) WMI_SET_BITS((ptr)->receive_model_parameter_2, 0, 8, val)
  16421.  
  16422. #define WMI_NDL_SNR_BACKOFF_GET(ptr,mcs) wmi_packed_arr_get_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR)
  16423. #define WMI_NDL_SNR_BACKOFF_SET(ptr,mcs,val) wmi_packed_arr_set_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR, val)
  16424.  
  16425. #define WMI_NDL_TM_PACKET_ARRIVAL_RATE_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->tm_packet_arrival_rate_ac, acprio, SIZE_NDLTYPE_ARRIVALRATE)
  16426. #define WMI_NDL_TM_PACKET_ARRIVAL_RATE_SET(ptr,acprio,val) wmi_packed_arr_set_bits((ptr)->tm_packet_arrival_rate_ac, acprio, SIZE_NDLTYPE_ARRIVALRATE, val)
  16427. #define WMI_NDL_TM_PACKET_AVG_DURATION_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->tm_packet_avg_duration_ac, acprio, SIZE_NDLTYPE_PACKETDURATION)
  16428. #define WMI_NDL_TM_PACKET_AVG_DURATION_SET(ptr,acprio,val) wmi_packed_arr_set_bits((ptr)->tm_packet_avg_duration_ac, acprio, SIZE_NDLTYPE_PACKETDURATION, val)
  16429. #define WMI_NDL_TM_SIGNAL_AVG_POWER_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->tm_signal_avg_power_ac, acprio, SIZE_NDLTYPE_TXPOWER)
  16430. #define WMI_NDL_TM_SIGNAL_AVG_POWER_SET(ptr,acprio,val) wmi_packed_arr_set_bits((ptr)->tm_signal_avg_power_ac, acprio, SIZE_NDLTYPE_TXPOWER, val)
  16431. #define WMI_NDL_TM_MAX_CHANNEL_USE_GET(ptr) WMI_GET_BITS((ptr)->tm_max_channel_use, 0, 14)
  16432. #define WMI_NDL_TM_MAX_CHANNEL_USE_SET(ptr,val) WMI_SET_BITS((ptr)->tm_max_channel_use, 0, 14, val)
  16433. #define WMI_NDL_TM_CHANNEL_USE_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->tm_channel_use_ac, acprio, SIZE_NDLTYPE_CHANNELUSE)
  16434. #define WMI_NDL_TM_CHANNEL_USE_SET(ptr,acprio,val) wmi_packed_arr_set_bits((ptr)->tm_channel_use_ac, acprio, SIZE_NDLTYPE_CHANNELUSE, val)
  16435.  
  16436. #define WMI_NDL_MIN_CHANNEL_LOAD_GET(ptr) WMI_GET_BITS((ptr)->min_max_channel_load, 0, 11)
  16437. #define WMI_NDL_MIN_CHANNEL_LOAD_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_channel_load, 0, 11, val)
  16438. #define WMI_NDL_MAX_CHANNEL_LOAD_GET(ptr) WMI_GET_BITS((ptr)->min_max_channel_load, 11, 11)
  16439. #define WMI_NDL_MAX_CHANNEL_LOAD_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_channel_load, 11, 11, val)
  16440.  
  16441. #define WMI_NDL_NUM_QUEUE_GET(ptr) WMI_GET_BITS((ptr)->transmit_queue_parameters, 0, 4)
  16442. #define WMI_NDL_NUM_QUEUE_SET(ptr,val) WMI_SET_BITS((ptr)->transmit_queue_parameters, 0, 4, val)
  16443. #define WMI_NDL_REF_QUEUE_STATUS_GET(ptr,acprio) WMI_GET_BITS((ptr)->transmit_queue_parameters, (4 + (acprio * 2)), 2)
  16444. #define WMI_NDL_REF_QUEUE_STATUS_SET(ptr,acprio,val) WMI_SET_BITS((ptr)->transmit_queue_parameters, (4 + (acprio * 2)), 2, val)
  16445. #define WMI_NDL_REF_QUEUE_LEN_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->numberElements, acprio, SIZE_NDLTYPE_NUMBERELEMENTS)
  16446. #define WMI_NDL_REF_QUEUE_LEN_SET(ptr,acprio,val) wmi_packed_arr_set_bits((ptr)->numberElements, acprio, SIZE_NDLTYPE_NUMBERELEMENTS, val)
  16447.  
  16448. /** Data structure for updating the NDL. */
  16449. typedef struct {
  16450. /** TLV tag and len; tag equals
  16451. * WMITLV_TAG_STRUC_wmi_dcc_update_ndl_cmd_fixed_param */
  16452. A_UINT32 tlv_header;
  16453.  
  16454. /* VDEV identifier */
  16455. A_UINT32 vdev_id;
  16456.  
  16457. /** The number of channels in the request. */
  16458. A_UINT32 num_channel;
  16459.  
  16460. /** This is followed by a TLV array of wmi_dcc_ndl_chan. */
  16461. /** This is followed by a TLV array of wmi_dcc_ndl_active_state_config. */
  16462. } wmi_dcc_update_ndl_cmd_fixed_param;
  16463.  
  16464. typedef struct {
  16465. /** TLV tag and len; tag equals
  16466. * WMITLV_TAG_STRUC_wmi_dcc_update_ndl_resp_event_fixed_param */
  16467. A_UINT32 tlv_header;
  16468. /* VDEV identifier */
  16469. A_UINT32 vdev_id;
  16470. A_UINT32 status;
  16471. } wmi_dcc_update_ndl_resp_event_fixed_param;
  16472.  
  16473. /* Actions for TSF timestamp */
  16474. typedef enum {
  16475. TSF_TSTAMP_CAPTURE_REQ = 1,
  16476. TSF_TSTAMP_CAPTURE_RESET = 2,
  16477. TSF_TSTAMP_READ_VALUE = 3,
  16478. TSF_TSTAMP_QTIMER_CAPTURE_REQ = 4,
  16479. } wmi_tsf_tstamp_action;
  16480.  
  16481. typedef struct {
  16482. /** TLV tag and len; tag equals
  16483. * WMITLV_TAG_STRUC_wmi_vdev_tsf_tstamp_action_cmd_fixed_param */
  16484. A_UINT32 tlv_header;
  16485. /** unique id identifying the VDEV, generated by the caller */
  16486. A_UINT32 vdev_id;
  16487. /* action type, refer to wmi_tsf_tstamp_action */
  16488. A_UINT32 tsf_action;
  16489. } wmi_vdev_tsf_tstamp_action_cmd_fixed_param;
  16490.  
  16491. typedef struct {
  16492. /* TLV tag and len; tag equals
  16493. * WMITLV_TAG_STRUC_wmi_vdev_tsf_report_event_fixed_param */
  16494. A_UINT32 tlv_header;
  16495. /* VDEV identifier */
  16496. A_UINT32 vdev_id;
  16497. /* low 32bit of tsf */
  16498. A_UINT32 tsf_low;
  16499. /* high 32 bit of tsf */
  16500. A_UINT32 tsf_high;
  16501. /* low 32 bits of qtimer */
  16502. A_UINT32 qtimer_low;
  16503. /* high 32 bits of qtimer */
  16504. A_UINT32 qtimer_high;
  16505. } wmi_vdev_tsf_report_event_fixed_param;
  16506.  
  16507. /* ie_id values:
  16508. * 0 to 255 are used for individual IEEE802.11 Information Element types
  16509. */
  16510. #define WMI_SET_VDEV_IE_ID_SCAN_SET_DEFAULT_IE 256
  16511.  
  16512. /* source values: */
  16513. #define WMI_SET_VDEV_IE_SOURCE_HOST 0x0
  16514.  
  16515. /* band values: */
  16516. typedef enum {
  16517. WMI_SET_VDEV_IE_BAND_ALL = 0,
  16518. WMI_SET_VDEV_IE_BAND_2_4GHZ,
  16519. WMI_SET_VDEV_IE_BAND_5GHZ,
  16520. } wmi_set_vdev_ie_band;
  16521.  
  16522. typedef struct {
  16523. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_ie_cmd_fixed_param */
  16524. A_UINT32 tlv_header;
  16525. /** unique id identifying the VDEV, generated by the caller */
  16526. A_UINT32 vdev_id;
  16527. /** unique id to identify the ie_data as defined by ieee 802.11 spec */
  16528. A_UINT32 ie_id;
  16529. /** ie_len corresponds to num of bytes in ie_data[] */
  16530. A_UINT32 ie_len;
  16531. /** source of this command */
  16532. A_UINT32 ie_source; /* see WMI_SET_VDEV_IE_SOURCE_ defs */
  16533. /** band for this IE - se wmi_set_vdev_ie_band enum */
  16534. A_UINT32 band;
  16535. /**
  16536. * Following this structure is the TLV byte stream of ie data of length ie_buf_len:
  16537. * A_UINT8 ie_data[];
  16538. *
  16539. */
  16540. } wmi_vdev_set_ie_cmd_fixed_param;
  16541.  
  16542. /* DISA feature related data structures */
  16543. #define MAX_MAC_HEADER_LEN 32
  16544. typedef enum {
  16545. WMI_ENCRYPT_DECRYPT_FLAG_INVALID,
  16546. WMI_ENCRYPT = 1,
  16547. WMI_DECRYPT = 2,
  16548. } WMI_ENCRYPT_DECRYPT_FLAG;
  16549.  
  16550. typedef struct {
  16551. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_encrypt_decrypt_data_req_cmd_fixed_param */
  16552. /** unique id identifying the VDEV, generated by the caller */
  16553. A_UINT32 vdev_id;
  16554. A_UINT32 key_flag; /* WMI_ENCRYPT_DECRYPT_FLAG */
  16555. A_UINT32 key_idx;
  16556. A_UINT32 key_cipher;
  16557. A_UINT32 key_len; /* units = bytes */
  16558. A_UINT32 key_txmic_len; /* units = bytes */
  16559. A_UINT32 key_rxmic_len; /* units = bytes */
  16560. /** Key: This array needs to be provided in little-endian order */
  16561. A_UINT8 key_data[WMI_MAX_KEY_LEN];
  16562. /** Packet number: This array needs to be provided in little-endian order.
  16563. * If the PN is less than 8 bytes, the PN data shall be placed into this
  16564. * pn[] array starting at byte 0, leaving the MSBs empty.
  16565. */
  16566. A_UINT8 pn[8];
  16567. /** 802.11 MAC header to be typecast to struct ieee80211_qosframe_addr4
  16568. * This array needs to be provided in little-endian order.
  16569. */
  16570. A_UINT8 mac_hdr[MAX_MAC_HEADER_LEN];
  16571. A_UINT32 data_len; /** Payload length, units = bytes */
  16572. /*
  16573. * Following this struct are this TLV:
  16574. * A_UINT8 data[]; <-- actual data to be encrypted,
  16575. * needs to be provided in little-endian order
  16576. */
  16577. } wmi_vdev_encrypt_decrypt_data_req_cmd_fixed_param;
  16578.  
  16579. /* This event is generated in response to WMI_VDEV_ENCRYPT_DECRYPT_DATA_REQ_CMDID from HOST.
  16580. * On receiving WMI command WMI_VDEV_ENCRYPT_DECRYPT_DATA_REQ_CMDID from
  16581. * HOST with DISA test vectors, DISA frame will prepared and submitted to HW,
  16582. * then on receiving the tx completion for the DISA frame this WMI event
  16583. * will be delivered to HOST with the encrypted frame.
  16584. */
  16585. typedef struct {
  16586. /** TLV tag and len; tag equals
  16587. * WMITLV_TAG_STRUC_wmi_vdev_encrypt_decrypt_data_resp_event_fixed_param */
  16588. A_UINT32 tlv_header;
  16589. /* VDEV identifier */
  16590. A_UINT32 vdev_id;
  16591. A_INT32 status; /* 0: success, -1: Failure, */
  16592. /* 802.11 header length + encrypted payload length (units = bytes) */
  16593. A_UINT32 data_length;
  16594. /*
  16595. * Following this struct is this TLV:
  16596. * A_UINT8 enc80211_frame[]; <-- Encrypted 802.11 frame;
  16597. * 802.11 header + encrypted payload,
  16598. * provided in little-endian order
  16599. */
  16600. } wmi_vdev_encrypt_decrypt_data_resp_event_fixed_param;
  16601.  
  16602. /* DEPRECATED - use wmi_pdev_set_pcl_cmd_fixed_param instead */
  16603. typedef struct {
  16604. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_pcl_cmd_fixed_param */
  16605. /** Set Preferred Channel List **/
  16606.  
  16607. /** # of channels to scan */
  16608. A_UINT32 num_chan;
  16609. /**
  16610. * TLV (tag length value) parameters follow the wmi_soc_set_pcl_cmd
  16611. * structure. The TLV's are:
  16612. * A_UINT32 channel_list[];
  16613. **/
  16614. } wmi_soc_set_pcl_cmd_fixed_param;
  16615.  
  16616. /* Values for channel_weight */
  16617. typedef enum {
  16618. WMI_PCL_WEIGHT_DISALLOW = 0,
  16619. WMI_PCL_WEIGHT_LOW = 1,
  16620. WMI_PCL_WEIGHT_MEDIUM = 2,
  16621. WMI_PCL_WEIGHT_HIGH = 3,
  16622. WMI_PCL_WEIGHT_VERY_HIGH = 4,
  16623. } wmi_pcl_chan_weight;
  16624.  
  16625. typedef struct {
  16626. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_pcl_cmd_fixed_param */
  16627. /** Set Preferred Channel List **/
  16628.  
  16629. /** pdev_id for identifying the MAC
  16630. * See macros starting with WMI_PDEV_ID_ for values.
  16631. */
  16632. A_UINT32 pdev_id;
  16633.  
  16634. /** # of channels to scan */
  16635. A_UINT32 num_chan;
  16636. /**
  16637. * TLV (tag length value) parameters follow the wmi_soc_set_pcl_cmd
  16638. 12930 * structure. The TLV's are:
  16639. * A_UINT32 channel_weight[]; channel order & size will be as per the list provided in WMI_SCAN_CHAN_LIST_CMDID
  16640. **/
  16641. } wmi_pdev_set_pcl_cmd_fixed_param;
  16642.  
  16643. /* DEPRECATED - use wmi_pdev_set_hw_mode_cmd_fixed_param instead */
  16644. typedef struct {
  16645. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_cmd_fixed_param */
  16646. /** Set Hardware Mode **/
  16647.  
  16648. /* Hardware Mode Index */
  16649. A_UINT32 hw_mode_index;
  16650. } wmi_soc_set_hw_mode_cmd_fixed_param;
  16651.  
  16652. typedef struct {
  16653. A_UINT32 tlv_header; /* TLV tag and len tag equals WMITLV_TAG_STRUC_wmi_pdev_band_to_mac */
  16654. /** pdev_id for identifying the MAC
  16655. * See macros starting with WMI_PDEV_ID_ for values.
  16656. */
  16657. A_UINT32 pdev_id;
  16658. /* start frequency in MHz */
  16659. A_UINT32 start_freq;
  16660. /* end frequency in MHz */
  16661. A_UINT32 end_freq;
  16662. } wmi_pdev_band_to_mac;
  16663.  
  16664. typedef struct {
  16665. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_hw_mode_cmd_fixed_param */
  16666. /** Set Hardware Mode **/
  16667.  
  16668. /** pdev_id for identifying the MAC
  16669. * See macros starting with WMI_PDEV_ID_ for values.
  16670. */
  16671. A_UINT32 pdev_id;
  16672.  
  16673. /* Hardware Mode Index */
  16674. A_UINT32 hw_mode_index;
  16675.  
  16676. /* Number of band to mac TLVs */
  16677. A_UINT32 num_band_to_mac;
  16678.  
  16679. /* Followed by TLVs of type
  16680. * num_band_to_mac * wmi_pdev_band_to_mac.
  16681. */
  16682. } wmi_pdev_set_hw_mode_cmd_fixed_param;
  16683.  
  16684. /* DEPRECATED - use wmi_pdev_set_dual_mac_config_cmd_fixed_param instead */
  16685. typedef struct {
  16686. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_dual_mac_config_cmd_fixed_param */
  16687. /** Set Dual MAC Firmware Configuration **/
  16688.  
  16689. /* Concurrent scan configuration bits */
  16690. A_UINT32 concurrent_scan_config_bits;
  16691. /* Firmware mode configuration bits */
  16692. A_UINT32 fw_mode_config_bits;
  16693. } wmi_soc_set_dual_mac_config_cmd_fixed_param;
  16694.  
  16695. typedef struct {
  16696. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_mac_config_cmd_fixed_param */
  16697. /** Set Dual MAC Firmware Configuration **/
  16698.  
  16699. /** pdev_id for identifying the MAC
  16700. * See macros starting with WMI_PDEV_ID_ for values.
  16701. */
  16702. A_UINT32 pdev_id;
  16703.  
  16704. /* Concurrent scan configuration bits */
  16705. A_UINT32 concurrent_scan_config_bits;
  16706. /* Firmware mode configuration bits */
  16707. A_UINT32 fw_mode_config_bits;
  16708. } wmi_pdev_set_mac_config_cmd_fixed_param;
  16709.  
  16710. typedef struct { /* DEPRECATED */
  16711. A_UINT32 num_tx_chains;
  16712. A_UINT32 num_rx_chains;
  16713. A_UINT32 reserved[2];
  16714. } soc_num_tx_rx_chains;
  16715.  
  16716. typedef struct {
  16717. A_UINT32 num_tx_chains_2g;
  16718. A_UINT32 num_rx_chains_2g;
  16719. A_UINT32 num_tx_chains_5g;
  16720. A_UINT32 num_rx_chains_5g;
  16721. } band_num_tx_rx_chains;
  16722.  
  16723. typedef union { /* DEPRECATED */
  16724. soc_num_tx_rx_chains soc_txrx_chain_setting;
  16725. band_num_tx_rx_chains band_txrx_chain_setting;
  16726. } antenna_num_tx_rx_chains;
  16727.  
  16728. typedef enum {
  16729. ANTENNA_MODE_DISABLED = 0x0,
  16730. ANTENNA_MODE_LOW_POWER_LOCATION_SCAN = 0x01,
  16731. /* reserved */
  16732. } antenna_mode_reason;
  16733.  
  16734. /* DEPRECATED - use wmi_pdev_set_antenna_mode_cmd_fixed_param instead */
  16735. typedef struct {
  16736. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_antenna_mode_cmd_fixed_param */
  16737.  
  16738. /* the reason for setting antenna mode, refer antenna_mode_reason */
  16739. A_UINT32 reason;
  16740.  
  16741. /*
  16742. * The above reason parameter will select whether the following union
  16743. * is soc_num_tx_rx_chains or band_num_tx_rx_chains.
  16744. */
  16745. antenna_num_tx_rx_chains num_txrx_chains_setting;
  16746. } wmi_soc_set_antenna_mode_cmd_fixed_param;
  16747.  
  16748. typedef struct {
  16749. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_antenna_mode_cmd_fixed_param */
  16750.  
  16751. /** pdev_id for identifying the MAC
  16752. * See macros starting with WMI_PDEV_ID_ for values.
  16753. */
  16754. A_UINT32 pdev_id;
  16755.  
  16756. /* Bits 0-15 is the number of RX chains and 16-31 is the number of TX chains */
  16757. A_UINT32 num_txrx_chains;
  16758. } wmi_pdev_set_antenna_mode_cmd_fixed_param;
  16759.  
  16760. /** Data structure for information specific to a VDEV to MAC mapping. */
  16761. /* DEPRECATED - use wmi_pdev_set_hw_mode_response_vdev_mac_entry instead */
  16762. typedef struct {
  16763. /** TLV tag and len; tag equals
  16764. * WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_response_vdev_mac_entry */
  16765. A_UINT32 tlv_header;
  16766. A_UINT32 vdev_id; /* VDEV ID */
  16767. A_UINT32 mac_id; /* MAC ID */
  16768. } wmi_soc_set_hw_mode_response_vdev_mac_entry;
  16769.  
  16770. /** Data structure for information specific to a VDEV to MAC mapping. */
  16771. typedef struct {
  16772. /** TLV tag and len; tag equals
  16773. * WMITLV_TAG_STRUC_wmi_pdev_set_hw_mode_response_vdev_mac_entry */
  16774. A_UINT32 tlv_header;
  16775.  
  16776. /** pdev_id for identifying the MAC
  16777. * See macros starting with WMI_PDEV_ID_ for values.
  16778. */
  16779. A_UINT32 pdev_id;
  16780.  
  16781. A_UINT32 vdev_id;
  16782. } wmi_pdev_set_hw_mode_response_vdev_mac_entry;
  16783.  
  16784. /* DEPRECATED - use wmi_pdev_set_hw_mode_response_event_fixed_param instead */
  16785. typedef struct {
  16786. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_response_event_fixed_param */
  16787. /** Set Hardware Mode Response Event **/
  16788.  
  16789. /* Status of set_hw_mode command */
  16790. /*
  16791. * Values for Status:
  16792. * 0 - OK; command successful
  16793. * 1 - EINVAL; Requested invalid hw_mode
  16794. * 2 - ECANCELED; HW mode change canceled
  16795. * 3 - ENOTSUP; HW mode not supported
  16796. * 4 - EHARDWARE; HW mode change prevented by hardware
  16797. * 5 - EPENDING; HW mode change is pending
  16798. * 6 - ECOEX; HW mode change conflict with Coex
  16799. */
  16800. A_UINT32 status;
  16801. /* Configured Hardware Mode */
  16802. A_UINT32 cfgd_hw_mode_index;
  16803. /* Number of Vdev to Mac entries */
  16804. A_UINT32 num_vdev_mac_entries;
  16805.  
  16806. /**
  16807. * TLV (tag length value) parameters follow the soc_set_hw_mode_response_event
  16808. * structure. The TLV's are:
  16809. * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
  16810. */
  16811. } wmi_soc_set_hw_mode_response_event_fixed_param;
  16812.  
  16813. typedef struct {
  16814. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_hw_mode_response_event_fixed_param */
  16815. /** Set Hardware Mode Response Event **/
  16816.  
  16817. /** pdev_id for identifying the MAC
  16818. * See macros starting with WMI_PDEV_ID_ for values.
  16819. */
  16820. A_UINT32 pdev_id;
  16821.  
  16822. /* Status of set_hw_mode command */
  16823. /*
  16824. * Values for Status:
  16825. * 0 - OK; command successful
  16826. * 1 - EINVAL; Requested invalid hw_mode
  16827. * 2 - ECANCELED; HW mode change canceled
  16828. * 3 - ENOTSUP; HW mode not supported
  16829. * 4 - EHARDWARE; HW mode change prevented by hardware
  16830. * 5 - EPENDING; HW mode change is pending
  16831. * 6 - ECOEX; HW mode change conflict with Coex
  16832. */
  16833. A_UINT32 status;
  16834. /* Configured Hardware Mode */
  16835. A_UINT32 cfgd_hw_mode_index;
  16836. /* Number of Vdev to Mac entries */
  16837. A_UINT32 num_vdev_mac_entries;
  16838. /**
  16839. * TLV (tag length value) parameters follow the soc_set_hw_mode_response_event
  16840. * structure. The TLV's are:
  16841. * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
  16842. */
  16843. } wmi_pdev_set_hw_mode_response_event_fixed_param;
  16844.  
  16845. /* DEPRECATED - use wmi_pdev_hw_mode_transition_event_fixed_param instead */
  16846. typedef struct {
  16847. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_hw_mode_transition_event_fixed_param */
  16848. /** Hardware Mode Transition Event **/
  16849.  
  16850. /* Original or old Hardware mode */
  16851. A_UINT32 old_hw_mode_index;
  16852. /* New Hardware Mode */
  16853. A_UINT32 new_hw_mode_index;
  16854. /* Number of Vdev to Mac entries */
  16855. A_UINT32 num_vdev_mac_entries;
  16856.  
  16857. /**
  16858. * TLV (tag length value) parameters follow the soc_set_hw_mode_response_event
  16859. * structure. The TLV's are:
  16860. * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
  16861. */
  16862. } wmi_soc_hw_mode_transition_event_fixed_param;
  16863.  
  16864. typedef struct {
  16865. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_hw_mode_transition_event_fixed_param */
  16866. /** Hardware Mode Transition Event **/
  16867.  
  16868. /** pdev_id for identifying the MAC
  16869. * See macros starting with WMI_PDEV_ID_ for values.
  16870. */
  16871. A_UINT32 pdev_id;
  16872.  
  16873. /* Original or old Hardware mode */
  16874. A_UINT32 old_hw_mode_index;
  16875. /* New Hardware Mode */
  16876. A_UINT32 new_hw_mode_index;
  16877. /* Number of Vdev to Mac entries */
  16878. A_UINT32 num_vdev_mac_entries;
  16879.  
  16880. /**
  16881. * TLV (tag length value) parameters follow the soc_set_hw_mode_response_event
  16882. * structure. The TLV's are:
  16883. * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
  16884. */
  16885. } wmi_pdev_hw_mode_transition_event_fixed_param;
  16886.  
  16887. /**
  16888. * This command is sent from WLAN host driver to firmware for
  16889. * plugging in reorder queue desc to lithium hw.
  16890. *
  16891. * Example: plug-in queue desc for TID 5
  16892. * host->target: WMI_PEER_REORDER_QUEUE_SETUP_CMDID,
  16893. * (vdev_id = PEER vdev id,
  16894. * peer_macaddr = PEER mac addr,
  16895. * tid = 5,
  16896. * queue_ptr_lo = queue desc addr lower 32 bits,
  16897. * queue_ptr_hi = queue desc addr higher 32 bits,
  16898. * queue_no = 16-bit number assigned by host for queue,
  16899. * stored in bits 15:0 of queue_no field)
  16900. */
  16901. typedef struct {
  16902. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_reorder_queue_setup_cmd_fixed_param */
  16903. A_UINT32 vdev_id;
  16904. wmi_mac_addr peer_macaddr; /* peer mac address */
  16905. A_UINT32 tid; /* 0 to 15 = QoS TIDs, 16 = non-qos TID */
  16906. A_UINT32 queue_ptr_lo; /* lower 32 bits of queue desc adddress */
  16907. A_UINT32 queue_ptr_hi; /* upper 32 bits of queue desc adddress */
  16908. A_UINT32 queue_no; /* 16-bit number assigned by host for queue,
  16909. stored in bits 15:0 of queue_no field */
  16910. } wmi_peer_reorder_queue_setup_cmd_fixed_param;
  16911.  
  16912. /**
  16913. * This command is sent from WLAN host driver to firmware for
  16914. * removing one or more reorder queue desc to lithium hw.
  16915. *
  16916. * Example: remove queue desc for all TIDs
  16917. * host->target: WMI_PEER_REORDER_REMOVE_CMDID,
  16918. * (vdev_id = PEER vdev id,
  16919. * peer_macaddr = PEER mac addr,
  16920. * tid = 0x1FFFF,
  16921. */
  16922. typedef struct {
  16923. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_reorder_queue_remove_cmd_fixed_param */
  16924. A_UINT32 vdev_id;
  16925. wmi_mac_addr peer_macaddr; /* peer mac address */
  16926. A_UINT32 tid_mask; /* bits 0 to 15 = QoS TIDs, bit 16 = non-qos TID */
  16927. } wmi_peer_reorder_queue_remove_cmd_fixed_param;
  16928.  
  16929.  
  16930. /* DEPRECATED - use wmi_pdev_set_mac_config_response_event_fixed_param instead */
  16931. typedef struct {
  16932. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_dual_mac_config_response_event_fixed_param */
  16933. /** Set Dual MAC Config Response Event **/
  16934.  
  16935. /* Status for set_dual_mac_config command */
  16936. /*
  16937. * Values for Status:
  16938. * 0 - OK; command successful
  16939. * 1 - EINVAL; Requested invalid hw_mode
  16940. * 3 - ENOTSUP; HW mode not supported
  16941. * 4 - EHARDWARE; HW mode change prevented by hardware
  16942. * 6 - ECOEX; HW mode change conflict with Coex
  16943. */
  16944. A_UINT32 status;
  16945.  
  16946. } wmi_soc_set_dual_mac_config_response_event_fixed_param;
  16947.  
  16948. typedef struct {
  16949. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_mac_config_response_event_fixed_param */
  16950. /** Set Dual MAC Config Response Event **/
  16951.  
  16952. /** pdev_id for identifying the MAC
  16953. * See macros starting with WMI_PDEV_ID_ for values.
  16954. */
  16955. A_UINT32 pdev_id;
  16956.  
  16957. /* Status for set_dual_mac_config command */
  16958. /*
  16959. * Values for Status:
  16960. * 0 - OK; command successful
  16961. * 1 - EINVAL; Requested invalid hw_mode
  16962. * 3 - ENOTSUP; HW mode not supported
  16963. * 4 - EHARDWARE; HW mode change prevented by hardware
  16964. * 6 - ECOEX; HW mode change conflict with Coex
  16965. */
  16966. A_UINT32 status;
  16967. } wmi_pdev_set_mac_config_response_event_fixed_param;
  16968.  
  16969. typedef enum {
  16970. MAWC_MOTION_STATE_UNKNOWN,
  16971. MAWC_MOTION_STATE_STATIONARY,
  16972. MAWC_MOTION_STATE_WALK,
  16973. MAWC_MOTION_STATE_TRANSIT,
  16974. } MAWC_MOTION_STATE;
  16975.  
  16976. typedef enum {
  16977. MAWC_SENSOR_STATUS_OK,
  16978. MAWC_SENSOR_STATUS_FAILED_TO_ENABLE,
  16979. MAWC_SENSOR_STATUS_SHUTDOWN,
  16980. } MAWC_SENSOR_STATUS;
  16981.  
  16982. typedef struct {
  16983. /* TLV tag and len; tag equals
  16984. * WMITLV_TAG_STRUC_wmi_mawc_sensor_report_ind_cmd_fixed_param */
  16985. A_UINT32 tlv_header;
  16986. /** new motion state, MAWC_MOTION_STATE */
  16987. A_UINT32 motion_state;
  16988. /** status code of sensor, MAWC_SENSOR_STATUS */
  16989. A_UINT32 sensor_status;
  16990. } wmi_mawc_sensor_report_ind_cmd_fixed_param;
  16991.  
  16992. /* MBO flag field definition */
  16993. /* Bit 0: 0 - Allow to connect to both MBO and non-MBO AP
  16994. * 1 - Allow to connect to MBO AP only
  16995. * Bit 1-31 : reserved.
  16996. */
  16997. #define WMI_ROAM_MBO_FLAG_MBO_ONLY_MODE (1<<0) /* DEPRECATED */
  16998.  
  16999. typedef struct {
  17000. /* TLV tag and len; tag equals
  17001. * WMITLV_TAG_STRUC_wmi_roam_set_mbo_fixed_param */
  17002. A_UINT32 tlv_header;
  17003. /** vdev id */
  17004. A_UINT32 vdev_id;
  17005. /** enable or disable MBO */
  17006. A_UINT32 enable;
  17007. /** MBO flags, refer to definition of MBO flags*/
  17008. A_UINT32 flags;
  17009. } wmi_roam_set_mbo_fixed_param; /* DEPRECATED */
  17010.  
  17011. typedef struct {
  17012. /* TLV tag and len; tag equals
  17013. * WMITLV_TAG_ARRAY_STRUC */
  17014. A_UINT32 tlv_header;
  17015. /** Current operating class number */
  17016. A_UINT32 cur_op_class;
  17017. /** Country string of current reg domain,
  17018. * the expected value should be same as country str defined
  17019. * in country IE.
  17020. * 3 octets (COUNTRY_STR) + 1 octet (always 0)
  17021. * The ordering of this array must be maintained,
  17022. * even when a big-endian host's WMI messages undergo
  17023. * automatic byte reordering for conversion to the
  17024. * little-endian ordering required by the target.
  17025. * On big-endian hosts, this array may need to be byte-swapped
  17026. * by the host, so the subsequent automatic byte-swap
  17027. * will result in the correct final byte order.
  17028. * global operating class: set country_str[0]=0
  17029. */
  17030. A_UINT8 country_str[4];
  17031. /** Supported operating class number in current regdomain */
  17032. A_UINT32 supp_op_class_num;
  17033. /* The TLVs will follow. */
  17034. /* A_UINT32 supp_op_class_list[] */
  17035. } wmi_supported_operating_class_param;
  17036.  
  17037. typedef struct {
  17038. /* TLV tag and len; tag equals
  17039. * WMITLV_TAG_ARRAY_STRUC */
  17040. A_UINT32 tlv_header;
  17041. /** non preferred channel attribute length */
  17042. A_UINT32 non_prefer_ch_attr_len;
  17043. /* The TLVs will follow. */
  17044. /** A_UINT8 non_prefer_ch_attr[];*/
  17045. } wmi_mbo_non_preferred_channel_report_param;
  17046.  
  17047. typedef struct {
  17048. /* TLV tag and len; tag equals
  17049. * WMITLV_TAG_STRUC_wmi_mawc_enable_sensor_event_fixed_param */
  17050. A_UINT32 tlv_header;
  17051. /* enable(1) or disable(0) */
  17052. A_UINT32 enable;
  17053. } wmi_mawc_enable_sensor_event_fixed_param;
  17054.  
  17055. typedef struct {
  17056. /* TLV tag and len; tag equals
  17057. * WMITLV_TAG_STRUC_wmi_extscan_configure_mawc_cmd_fixed_param */
  17058. A_UINT32 tlv_header;
  17059. /* Unique id identifying the VDEV */
  17060. A_UINT32 vdev_id;
  17061. /* enable(1) or disable(0) MAWC */
  17062. A_UINT32 enable;
  17063. /* ratio of skipping suppressing scan, skip one out of x */
  17064. A_UINT32 suppress_ratio;
  17065. } wmi_extscan_configure_mawc_cmd_fixed_param;
  17066.  
  17067. typedef struct {
  17068. /* TLV tag and len; tag equals
  17069. * WMITLV_TAG_STRUC_wmi_roam_per_config_fixed_param */
  17070. A_UINT32 tlv_header;
  17071. /* Unique id identifying the VDEV */
  17072. A_UINT32 vdev_id;
  17073. /* enable(1) or disable(0) packet error rate trigger for roaming */
  17074. A_UINT32 enable;
  17075. /* high_rate_thresh, low_rate_thresh, pkt_err_rate_thresh_pct:
  17076. * If PER monitoring as a trigger for roaming is enabled,
  17077. * it is controlled by high_rate_thresh, low_rate_thresh, and
  17078. * pkt_err_rate_thresh_pct.
  17079. * PER monitoring is performed only when the time-averaged throughput
  17080. * is less than high_rate_thresh.
  17081. * During PER monitoring, the target keeps track of the PHY rate for
  17082. * each of the first N PPDUs within a time window.
  17083. * If the number of PPDUs with PHY rate < low_rate_thresh exceeds
  17084. * N * pkt_err_rate_thresh_pct / 100, roaming will be triggered.
  17085. *
  17086. * This PER monitoring as a trigger for roaming is performed
  17087. * concurrently but independently for rx and tx.
  17088. */
  17089. A_UINT32 high_rate_thresh; /* units = Kbps */
  17090. A_UINT32 low_rate_thresh; /* units = Kbps */
  17091. A_UINT32 pkt_err_rate_thresh_pct;
  17092. /*
  17093. * rest time after associating to a new AP before
  17094. * starting to monitor PER as a roaming trigger,
  17095. * (units are seconds)
  17096. */
  17097. A_UINT32 per_rest_time;
  17098. /* This is the total time for which PER monitoring will be run.
  17099. * After completion of time windows, the average PER over the window
  17100. * will be computed.
  17101. * The parameter value stores specifications for both TX and RX
  17102. * monitor times.
  17103. * The two least-significant bytes (0 & 1) hold the RX monitor time;
  17104. * the two most-significant bytes (2 & 3) hold the TX monitor time.
  17105. */
  17106. A_UINT32 pkt_err_rate_mon_time; /* units = seconds */
  17107. /* Minimum roamable AP RSSI for candidate selection for PER based roam */
  17108. A_INT32 min_candidate_rssi; /* units = dBm */
  17109. } wmi_roam_per_config_fixed_param;
  17110.  
  17111. typedef struct {
  17112. /* TLV tag and len; tag equals
  17113. * WMITLV_TAG_STRUC_wmi_nlo_configure_mawc_cmd_fixed_param */
  17114. A_UINT32 tlv_header;
  17115. /* Unique id identifying the VDEV */
  17116. A_UINT32 vdev_id;
  17117. /* enable(1) or disable(0) MAWC */
  17118. A_UINT32 enable;
  17119. /* ratio of exponential backoff, next = current + current*ratio/100 */
  17120. A_UINT32 exp_backoff_ratio;
  17121. /* initial scan interval(msec) */
  17122. A_UINT32 init_scan_interval;
  17123. /* max scan interval(msec) */
  17124. A_UINT32 max_scan_interval;
  17125. } wmi_nlo_configure_mawc_cmd_fixed_param;
  17126.  
  17127. typedef struct {
  17128. /* TLV tag and len; tag equals
  17129. * WMITLV_TAG_STRUC_wmi_roam_configure_mawc_cmd_fixed_param */
  17130. A_UINT32 tlv_header;
  17131. /* Unique id identifying the VDEV */
  17132. A_UINT32 vdev_id;
  17133. /* enable(1) or disable(0) MAWC */
  17134. A_UINT32 enable;
  17135. /* data traffic load (kBps) to register CMC */
  17136. A_UINT32 traffic_load_threshold;
  17137. /* RSSI threshold (dBm) to scan for Best AP */
  17138. A_UINT32 best_ap_rssi_threshold;
  17139. /* high RSSI threshold adjustment in Stationary to suppress scan */
  17140. A_UINT32 rssi_stationary_high_adjust;
  17141. /* low RSSI threshold adjustment in Stationary to suppress scan */
  17142. A_UINT32 rssi_stationary_low_adjust;
  17143. } wmi_roam_configure_mawc_cmd_fixed_param;
  17144.  
  17145. #define WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD 2
  17146. #define WMI_PACKET_FILTER_MAX_CMP_PER_PACKET_FILTER 5
  17147.  
  17148. typedef enum {
  17149. PACKET_FILTER_TYPE_INVALID = 0,
  17150. PACKET_FILTER_TYPE_FILTER_PKT,
  17151. PACKET_FILTER_TYPE_RESERVE_PKT, /* not used */
  17152. PACKET_FILTER_TYPE_MAX_ENUM_SIZE
  17153. } WMI_PACKET_FILTER_FILTER_TYPE;
  17154.  
  17155. typedef enum {
  17156. PACKET_FILTER_PROTO_TYPE_INVALID = 0,
  17157.  
  17158. /* L2 header */
  17159. PACKET_FILTER_PROTO_TYPE_MAC,
  17160. PACKET_FILTER_PROTO_TYPE_SNAP,
  17161.  
  17162. /* L3 header (EtherType) */
  17163. PACKET_FILTER_PROTO_TYPE_IPV4,
  17164. PACKET_FILTER_PROTO_TYPE_IPV6,
  17165.  
  17166. /* L4 header (IP protocol) */
  17167. PACKET_FILTER_PROTO_TYPE_UDP,
  17168. PACKET_FILTER_PROTO_TYPE_TCP,
  17169. PACKET_FILTER_PROTO_TYPE_ICMPV6,
  17170.  
  17171. PACKET_FILTER_PROTO_TYPE_MAX
  17172. } WMI_PACKET_FILTER_PROTO_TYPE;
  17173.  
  17174. typedef enum {
  17175. PACKET_FILTER_CMP_TYPE_INVALID = 0,
  17176. PACKET_FILTER_CMP_TYPE_EQUAL,
  17177. PACKET_FILTER_CMP_TYPE_MASK_EQUAL,
  17178. PACKET_FILTER_CMP_TYPE_NOT_EQUAL,
  17179. PACKET_FILTER_CMP_TYPE_MASK_NOT_EQUAL,
  17180. PACKET_FILTER_CMP_TYPE_ADDRTYPE,
  17181. PACKET_FILTER_CMP_TYPE_MAX
  17182. } WMI_PACKET_FILTER_CMP_TYPE;
  17183.  
  17184. typedef enum {
  17185. PACKET_FILTER_SET_INACTIVE = 0,
  17186. PACKET_FILTER_SET_ACTIVE
  17187. } WMI_PACKET_FILTER_ACTION;
  17188.  
  17189. typedef enum {
  17190. PACKET_FILTER_SET_DISABLE = 0,
  17191. PACKET_FILTER_SET_ENABLE
  17192. } WMI_PACKET_FILTER_RUNTIME_ENABLE;
  17193.  
  17194. typedef struct {
  17195. A_UINT32 proto_type;
  17196. A_UINT32 cmp_type;
  17197. A_UINT32 data_length; /* Length of the data to compare (units = bytes) */
  17198. A_UINT32 data_offset; /* from start of the respective frame header (units = bytes) */
  17199. A_UINT32 compareData[WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD]; /* Data to compare, little-endian order */
  17200. A_UINT32 dataMask[WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD]; /* Mask to be applied on rcvd packet data before compare, little-endian order */
  17201. } WMI_PACKET_FILTER_PARAMS_TYPE;
  17202.  
  17203. typedef struct {
  17204. A_UINT32 tlv_header;
  17205. A_UINT32 vdev_id;
  17206. A_UINT32 filter_id;
  17207. A_UINT32 filter_action; /* WMI_PACKET_FILTER_ACTION */
  17208. A_UINT32 filter_type;
  17209. A_UINT32 num_params; /* how many entries in paramsData are valid */
  17210. A_UINT32 coalesce_time; /* not currently used - fill with 0x0 */
  17211. WMI_PACKET_FILTER_PARAMS_TYPE paramsData[WMI_PACKET_FILTER_MAX_CMP_PER_PACKET_FILTER];
  17212. /* deprecated0:
  17213. * This field simply provides filler space to retain the original message
  17214. * format while reducing WMI_PACKET_FILTER_MAX_CMP_PER_PACKET_FILTER
  17215. * from 10 to 5.
  17216. */
  17217. WMI_PACKET_FILTER_PARAMS_TYPE deprecated0[5];
  17218. } WMI_PACKET_FILTER_CONFIG_CMD_fixed_param;
  17219.  
  17220. /* enable / disable all filters within the specified vdev */
  17221. typedef struct {
  17222. A_UINT32 tlv_header;
  17223. A_UINT32 vdev_id;
  17224. A_UINT32 enable; /* WMI_PACKET_FILTER_RUNTIME_ENABLE */
  17225. } WMI_PACKET_FILTER_ENABLE_CMD_fixed_param;
  17226.  
  17227. #define WMI_LRO_INFO_TCP_FLAG_VALS_BITPOS 0
  17228. #define WMI_LRO_INFO_TCP_FLAG_VALS_NUMBITS 9
  17229.  
  17230. #define WMI_LRO_INFO_TCP_FLAG_VALS_SET(tcp_flag_u32, tcp_flag_values) \
  17231. WMI_SET_BITS(tcp_flag_u32, \
  17232. WMI_LRO_INFO_TCP_FLAG_VALS_BITPOS, \
  17233. WMI_LRO_INFO_TCP_FLAG_VALS_NUMBITS, \
  17234. tcp_flag_values)
  17235. #define WMI_LRO_INFO_TCP_FLAG_VALS_GET(tcp_flag_u32) \
  17236. WMI_GET_BITS(tcp_flag_u32, \
  17237. WMI_LRO_INFO_TCP_FLAG_VALS_BITPOS, \
  17238. WMI_LRO_INFO_TCP_FLAG_VALS_NUMBITS)
  17239.  
  17240. #define WMI_LRO_INFO_TCP_FLAGS_MASK_BITPOS 9
  17241. #define WMI_LRO_INFO_TCP_FLAGS_MASK_NUMBITS 9
  17242.  
  17243. #define WMI_LRO_INFO_TCP_FLAGS_MASK_SET(tcp_flag_u32, tcp_flags_mask) \
  17244. WMI_SET_BITS(tcp_flag_u32, \
  17245. WMI_LRO_INFO_TCP_FLAGS_MASK_BITPOS, \
  17246. WMI_LRO_INFO_TCP_FLAGS_MASK_NUMBITS, \
  17247. tcp_flags_mask)
  17248. #define WMI_LRO_INFO_TCP_FLAGS_MASK_GET(tcp_flag_u32) \
  17249. WMI_GET_BITS(tcp_flag_u32, \
  17250. WMI_LRO_INFO_TCP_FLAGS_MASK_BITPOS, \
  17251. WMI_LRO_INFO_TCP_FLAGS_MASK_NUMBITS)
  17252.  
  17253. typedef struct {
  17254. A_UINT32 tlv_header;
  17255. /**
  17256. * @brief lro_enable - indicates whether lro is enabled
  17257. * [0] LRO Enable
  17258. */
  17259. A_UINT32 lro_enable;
  17260. /**
  17261. * @brief tcp_flag_u32 - mask of which TCP flags to check and
  17262. * values to check for
  17263. * [8:0] TCP flag values - If the TCP flags from the packet do not match
  17264. * the values in this field after masking with TCP flags mask below,
  17265. * LRO eligible will not be set
  17266. * [17:9] TCP flags mask - Mask field for comparing the TCP values
  17267. * provided above with the TCP flags field in the received packet
  17268. * Use WMI_LRO_INFO_TCP_FLAG_VALS and WMI_LRO_INFO_TCP_FLAGS_MASK
  17269. * macros to isolate the mask field and values field that are packed
  17270. * into this u32 "word".
  17271. */
  17272. A_UINT32 tcp_flag_u32;
  17273. /**
  17274. * @brief toeplitz_hash_ipv4 - contains seed needed to compute
  17275. * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
  17276. * bytes 0 to 3
  17277. *
  17278. * In this and all the below toeplitz_hash fields, the bytes are
  17279. * specified in little-endian order. For example:
  17280. * toeplitz_hash_ipv4_0_3 bits 7:0 holds seed byte 0
  17281. * toeplitz_hash_ipv4_0_3 bits 15:8 holds seed byte 1
  17282. * toeplitz_hash_ipv4_0_3 bits 23:16 holds seed byte 2
  17283. * toeplitz_hash_ipv4_0_3 bits 31:24 holds seed byte 3
  17284. */
  17285. A_UINT32 toeplitz_hash_ipv4_0_3;
  17286.  
  17287. /**
  17288. * @brief toeplitz_hash_ipv4 - contains seed needed to compute
  17289. * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
  17290. * bytes 4 to 7
  17291. */
  17292. A_UINT32 toeplitz_hash_ipv4_4_7;
  17293.  
  17294. /**
  17295. * @brief toeplitz_hash_ipv4 - contains seed needed to compute
  17296. * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
  17297. * bytes 8 to 11
  17298. */
  17299. A_UINT32 toeplitz_hash_ipv4_8_11;
  17300.  
  17301. /**
  17302. * @brief toeplitz_hash_ipv4 - contains seed needed to compute
  17303. * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
  17304. * bytes 12 to 15
  17305. */
  17306. A_UINT32 toeplitz_hash_ipv4_12_15;
  17307.  
  17308. /**
  17309. * @brief toeplitz_hash_ipv4 - contains seed needed to compute
  17310. * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
  17311. * byte 16
  17312. */
  17313. A_UINT32 toeplitz_hash_ipv4_16;
  17314.  
  17315. /**
  17316. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  17317. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  17318. * bytes 0 to 3
  17319. */
  17320. A_UINT32 toeplitz_hash_ipv6_0_3;
  17321.  
  17322. /**
  17323. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  17324. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  17325. * bytes 4 to 7
  17326. */
  17327. A_UINT32 toeplitz_hash_ipv6_4_7;
  17328.  
  17329. /**
  17330. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  17331. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  17332. * bytes 8 to 11
  17333. */
  17334. A_UINT32 toeplitz_hash_ipv6_8_11;
  17335.  
  17336. /**
  17337. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  17338. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  17339. * bytes 12 to 15
  17340. */
  17341. A_UINT32 toeplitz_hash_ipv6_12_15;
  17342.  
  17343. /**
  17344. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  17345. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  17346. * bytes 16 to 19
  17347. */
  17348. A_UINT32 toeplitz_hash_ipv6_16_19;
  17349.  
  17350. /**
  17351. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  17352. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  17353. * bytes 20 to 22
  17354. */
  17355. A_UINT32 toeplitz_hash_ipv6_20_23;
  17356.  
  17357. /**
  17358. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  17359. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  17360. * bytes 24 to 27
  17361. */
  17362. A_UINT32 toeplitz_hash_ipv6_24_27;
  17363.  
  17364. /**
  17365. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  17366. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  17367. * bytes 28 to 31
  17368. */
  17369. A_UINT32 toeplitz_hash_ipv6_28_31;
  17370.  
  17371. /**
  17372. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  17373. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  17374. * bytes 32 to 35
  17375. */
  17376. A_UINT32 toeplitz_hash_ipv6_32_35;
  17377.  
  17378. /**
  17379. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  17380. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  17381. * bytes 36 to 39
  17382. */
  17383. A_UINT32 toeplitz_hash_ipv6_36_39;
  17384.  
  17385. /**
  17386. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  17387. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  17388. * byte 40
  17389. */
  17390. A_UINT32 toeplitz_hash_ipv6_40;
  17391. } wmi_lro_info_cmd_fixed_param;
  17392.  
  17393. typedef struct {
  17394. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_transfer_data_to_flash_cmd_fixed_param */
  17395. A_UINT32 offset; /* flash offset to write, starting from 0 */
  17396. A_UINT32 length; /* vaild data length in buffer, unit: byte */
  17397. } wmi_transfer_data_to_flash_cmd_fixed_param;
  17398.  
  17399. typedef struct {
  17400. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_transfer_data_to_flash_complete_event_fixed_param */
  17401. /** Return status. 0 for success, non-zero otherwise */
  17402. A_UINT32 status;
  17403. } wmi_transfer_data_to_flash_complete_event_fixed_param;
  17404.  
  17405. typedef struct {
  17406. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_read_data_from_flash_cmd_fixed_param */
  17407. A_UINT32 offset; /* flash offset to read, starting from 0 */
  17408. A_UINT32 length; /* data length to read, unit: byte */
  17409. } wmi_read_data_from_flash_cmd_fixed_param;
  17410.  
  17411. typedef struct {
  17412. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_read_data_from_flash_event_fixed_param */
  17413. A_UINT32 status; /* Return status. 0 for success, non-zero otherwise */
  17414. A_UINT32 offset; /* flash offset reading from, starting from 0 */
  17415. A_UINT32 length; /* length of data being reported, unit: byte */
  17416. } wmi_read_data_from_flash_event_fixed_param;
  17417.  
  17418. typedef enum {
  17419. ENHANCED_MCAST_FILTER_DISABLED,
  17420. ENHANCED_MCAST_FILTER_ENABLED
  17421. } ENHANCED_MCAST_FILTER_CONFIG;
  17422.  
  17423. /*
  17424. * Command to enable/disable filtering of multicast IP with unicast mac
  17425. */
  17426. typedef struct {
  17427. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_config_enhanced_mcast_filter_fixed_param */
  17428. /* Unique id identifying the VDEV */
  17429. A_UINT32 vdev_id;
  17430. /* 1 = enable 0 = disable (see ENHANCED_MCAST_FILTER_CONFIG) */
  17431. A_UINT32 enable;
  17432. } wmi_config_enhanced_mcast_filter_cmd_fixed_param;
  17433.  
  17434. typedef struct {
  17435. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_wisa_cmd_fixed_param */
  17436. A_UINT32 tlv_header;
  17437. /** unique id identifying the VDEV, generated by the caller */
  17438. A_UINT32 vdev_id;
  17439. /** WISA enable / disable mode */
  17440. A_UINT32 wisa_mode;
  17441. } wmi_vdev_wisa_cmd_fixed_param;
  17442.  
  17443. /*
  17444. * This structure is used to report SMPS force mode set complete to host.
  17445. */
  17446. typedef struct {
  17447. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_smps_force_mode_complete_event_fixed_param */
  17448. /* Unique id identifying the VDEV */
  17449. A_UINT32 vdev_id;
  17450. /* Return status. 0 for success, non-zero otherwise */
  17451. A_UINT32 status;
  17452. } wmi_sta_smps_force_mode_complete_event_fixed_param;
  17453.  
  17454. /*
  17455. * This structure is used to report SCPC calibrated data to host.
  17456. */
  17457. typedef struct {
  17458. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scpc_event_fixed_param */
  17459. /** number of BDF patches. Each patch contains offset, length and data */
  17460. A_UINT32 num_patch;
  17461. /* This TLV is followed by another TLV of array of bytes
  17462. * A_UINT8 data[];
  17463. * This data array contains, for example
  17464. * patch1 offset(byte3~0), patch1 data length(byte7~4), patch1 data(byte11~8)
  17465. * patch2 offset(byte15~12), patch2 data length(byte19~16), patch2 data(byte47~20)
  17466. *
  17467. */
  17468. } wmi_scpc_event_fixed_param;
  17469.  
  17470. typedef enum {
  17471. FW_ACTIVE_BPF_MODE_DISABLE = (1 << 1),
  17472. FW_ACTIVE_BPF_MODE_FORCE_ENABLE = (1 << 2),
  17473. FW_ACTIVE_BPF_MODE_ADAPTIVE_ENABLE = (1 << 3),
  17474. } FW_ACTIVE_BPF_MODE;
  17475.  
  17476. /* bpf interface structure */
  17477. typedef struct wmi_bpf_get_capability_cmd_s {
  17478. A_UINT32 tlv_header;
  17479. A_UINT32 reserved; /* reserved for future use - must be filled with 0x0 */
  17480. } wmi_bpf_get_capability_cmd_fixed_param;
  17481.  
  17482. typedef struct wmi_bpf_capability_info_evt_s {
  17483. A_UINT32 tlv_header;
  17484. A_UINT32 bpf_version; /* fw's implement version */
  17485. A_UINT32 max_bpf_filters; /* max filters that fw supports */
  17486. A_UINT32 max_bytes_for_bpf_inst; /* the maximum bytes that can be used as bpf instructions */
  17487. A_UINT32 fw_active_bpf_support_mcbc_modes; /* multicast/broadcast - refer to FW_ACTIVE_BPF_MODE, it can be 'or' of them */
  17488. A_UINT32 fw_active_bpf_support_uc_modes; /* unicast - refer to FW_ACTIVE_BPF_MODE, it can be 'or' of them */
  17489. } wmi_bpf_capability_info_evt_fixed_param;
  17490.  
  17491. /* bit 0 of flags: report counters */
  17492. #define WMI_BPF_GET_VDEV_STATS_FLAG_CTR_S 0
  17493. #define WMI_BPF_GET_VDEV_STATS_FLAG_CTR_M 0x1
  17494. typedef struct wmi_bpf_get_vdev_stats_cmd_s {
  17495. A_UINT32 tlv_header;
  17496. A_UINT32 flags;
  17497. A_UINT32 vdev_id;
  17498. } wmi_bpf_get_vdev_stats_cmd_fixed_param;
  17499.  
  17500. typedef struct wmi_bpf_vdev_stats_info_evt_s {
  17501. A_UINT32 tlv_header;
  17502. A_UINT32 vdev_id;
  17503. A_UINT32 num_filters;
  17504. A_UINT32 num_checked_pkts;
  17505. A_UINT32 num_dropped_pkts;
  17506. } wmi_bpf_vdev_stats_info_evt_fixed_param;
  17507.  
  17508. typedef struct wmi_bpf_set_vdev_instructions_cmd_s {
  17509. A_UINT32 tlv_header;
  17510. A_UINT32 vdev_id;
  17511. A_UINT32 filter_id;
  17512. A_UINT32 bpf_version; /* host bpf version */
  17513. A_UINT32 total_length;
  17514. A_UINT32 current_offset;
  17515. A_UINT32 current_length;
  17516. /*
  17517. * The TLV follows:
  17518. * A_UINT8 buf_inst[]; <-- Variable length buffer for the instuctions
  17519. */
  17520. } wmi_bpf_set_vdev_instructions_cmd_fixed_param;
  17521.  
  17522. #define BPF_FILTER_ID_ALL 0xFFFFFFFF
  17523. typedef struct wmi_bpf_del_vdev_instructions_cmd_s {
  17524. A_UINT32 tlv_header;
  17525. A_UINT32 vdev_id;
  17526. A_UINT32 filter_id; /* BPF_FILTER_ID_ALL means delete all */
  17527. } wmi_bpf_del_vdev_instructions_cmd_fixed_param;
  17528.  
  17529. typedef struct wmi_bpf_set_vdev_active_mode_cmd_s {
  17530. A_UINT32 tlv_header;
  17531. A_UINT32 vdev_id;
  17532. A_UINT32 mcbc_mode; /* refer to FW_ACTIVE_BPF_MODE */
  17533. A_UINT32 uc_mode; /* refer to FW_ACTIVE_BPF_MODE */
  17534. } wmi_bpf_set_vdev_active_mode_cmd_fixed_param;
  17535.  
  17536. #define AES_BLOCK_LEN 16 /* in bytes */
  17537. #define FIPS_KEY_LENGTH_128 16 /* in bytes */
  17538. #define FIPS_KEY_LENGTH_256 32 /* in bytes */
  17539. #define FIPS_ENCRYPT_CMD 0
  17540. #define FIPS_DECRYPT_CMD 1
  17541. #define FIPS_ENGINE_AES_CTR 0
  17542. #define FIPS_ENGINE_AES_MIC 1
  17543. #define FIPS_ERROR_OPER_TIMEOUT 1
  17544.  
  17545. /* WMI_PDEV_FIPS_CMDID */
  17546. typedef struct {
  17547. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_fips_cmd_fixed_param */
  17548.  
  17549. union {
  17550. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  17551. /** pdev_id for identifying the MAC
  17552. * See macros starting with WMI_PDEV_ID_ for values.
  17553. */
  17554. A_UINT32 pdev_id;
  17555. };
  17556.  
  17557. A_UINT32 fips_cmd; /* FIPS_ENCRYPT or FIPS_DECRYPT */
  17558. A_UINT32 mode; /* FIPS_ENGINE_AES_CTR or FIPS_ENGINE_AES_MIC */
  17559. A_UINT32 key_len; /* FIPS_KEY_LENGTH_128 or FIPS_KEY_LENGTH_256 (units = bytes) */
  17560. A_UINT8 key[WMI_MAX_KEY_LEN]; /* Key */
  17561. A_UINT32 data_len; /* data length */
  17562. /*
  17563. * Following this structure is the TLV:
  17564. * A_UINT32 data[1]; <-- In Data (keep this in the end)
  17565. */
  17566. } wmi_pdev_fips_cmd_fixed_param;
  17567.  
  17568. typedef struct {
  17569. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_smart_ant_enable_cmd_fixed_param */
  17570. union {
  17571. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  17572. /** pdev_id for identifying the MAC
  17573. * See macros starting with WMI_PDEV_ID_ for values.
  17574. */
  17575. A_UINT32 pdev_id;
  17576. };
  17577. A_UINT32 enable; /* 1:enable, 0:disable */
  17578. A_UINT32 mode; /* 1:GPIO parallel mode, 0:GPIO serial mode */
  17579. A_UINT32 rx_antenna; /* rx antenna */
  17580. A_UINT32 tx_default_antenna; /* tx default antenna */
  17581. /*
  17582. * Following this structure is the TLV:
  17583. * wmi_pdev_smart_ant_gpio_handle
  17584. */
  17585. } wmi_pdev_smart_ant_enable_cmd_fixed_param;
  17586.  
  17587. /** GPIO pins/function values to control antennas */
  17588. typedef struct {
  17589. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_smart_ant_gpio_handle */
  17590. A_UINT32 gpio_pin; /* For serial: index 0-strobe index 1-data, For Parallel: per stream */
  17591. A_UINT32 gpio_func; /* GPIO function values for Smart Antenna */
  17592. /** pdev_id for identifying the MAC
  17593. * See macros starting with WMI_PDEV_ID_ for values.
  17594. */
  17595. A_UINT32 pdev_id;
  17596. } wmi_pdev_smart_ant_gpio_handle;
  17597.  
  17598. typedef struct {
  17599. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_smart_ant_set_rx_antenna_cmd_fixed_param */
  17600. union {
  17601. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  17602. /** pdev_id for identifying the MAC
  17603. * See macros starting with WMI_PDEV_ID_ for values.
  17604. */
  17605. A_UINT32 pdev_id;
  17606. };
  17607. A_UINT32 rx_antenna;
  17608. } wmi_pdev_smart_ant_set_rx_antenna_cmd_fixed_param;
  17609.  
  17610. typedef struct {
  17611. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_tx_antenna_cmd_fixed_param */
  17612. /** unique id identifying the vdev, generated by the caller */
  17613. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  17614. /** peer MAC address */
  17615. wmi_mac_addr peer_macaddr;
  17616. /*
  17617. * Following this structure is the TLV:
  17618. * wmi_peer_smart_ant_set_tx_antenna_series
  17619. */
  17620. } wmi_peer_smart_ant_set_tx_antenna_cmd_fixed_param;
  17621.  
  17622. typedef struct {
  17623. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_tx_antenna_series */
  17624. /* antenna array */
  17625. A_UINT32 antenna_series;
  17626. } wmi_peer_smart_ant_set_tx_antenna_series;
  17627.  
  17628. typedef struct {
  17629. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_train_antenna_param */
  17630. /* rate array */
  17631. A_UINT32 train_rate_series;
  17632. /* antenna array */
  17633. A_UINT32 train_antenna_series;
  17634. /* Rate flags */
  17635. /* TODO: For future use? */
  17636. A_UINT32 rc_flags;
  17637. } wmi_peer_smart_ant_set_train_antenna_param;
  17638.  
  17639. typedef struct {
  17640. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_train_antenna_cmd_fixed_param */
  17641. /** unique id identifying the VDEV, generated by the caller */
  17642. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  17643. /** peer MAC address */
  17644. wmi_mac_addr peer_macaddr;
  17645. /* num packets; 0-stop training */
  17646. A_UINT32 num_pkts;
  17647. /*
  17648. * Following this structure is the TLV:
  17649. * wmi_peer_smart_ant_set_train_antenna_param
  17650. */
  17651. } wmi_peer_smart_ant_set_train_antenna_cmd_fixed_param;
  17652.  
  17653. typedef struct {
  17654. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_node_config_ops_cmd_fixed_param */
  17655. /** unique id identifying the vdev, generated by the caller */
  17656. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  17657. /** peer MAC address */
  17658. wmi_mac_addr peer_macaddr;
  17659. /* command id*/
  17660. A_UINT32 cmd_id;
  17661. /* number of arguments passed */
  17662. A_UINT32 args_count;
  17663. /*
  17664. * Following this structure is the TLV:
  17665. * A_UINT32 args[]; <-- argument list
  17666. */
  17667. } wmi_peer_smart_ant_set_node_config_ops_cmd_fixed_param;
  17668.  
  17669. typedef struct {
  17670. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_ant_ctrl_chain */
  17671. A_UINT32 antCtrlChain;
  17672. /** pdev_id for identifying the MAC
  17673. * See macros starting with WMI_PDEV_ID_ for values.
  17674. */
  17675. A_UINT32 pdev_id;
  17676. } wmi_pdev_set_ant_ctrl_chain;
  17677.  
  17678. typedef struct {
  17679. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_ant_switch_tbl_cmd_fixed_param */
  17680. A_UINT32 mac_id; /* MAC ID */
  17681. A_UINT32 antCtrlCommon1;
  17682. A_UINT32 antCtrlCommon2;
  17683. /*
  17684. * Following this structure is the TLV:
  17685. * wmi_pdev_set_ant_ctrl_chain
  17686. */
  17687. } wmi_pdev_set_ant_switch_tbl_cmd_fixed_param;
  17688.  
  17689. typedef struct {
  17690. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_ctl_table_cmd_fixed_param */
  17691. union {
  17692. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  17693. /** pdev_id for identifying the MAC
  17694. * See macros starting with WMI_PDEV_ID_ for values.
  17695. */
  17696. A_UINT32 pdev_id;
  17697. };
  17698. /** len of CTL info */
  17699. A_UINT32 ctl_len;
  17700. /* ctl array (len adjusted to number of words).
  17701. * Following this structure is the TLV:
  17702. * A_UINT32 ctl_info[1];
  17703. */
  17704. } wmi_pdev_set_ctl_table_cmd_fixed_param;
  17705.  
  17706. typedef struct {
  17707. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_mimogain_table_cmd_fixed_param */
  17708. union {
  17709. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  17710. /** pdev_id for identifying the MAC
  17711. * See macros starting with WMI_PDEV_ID_ for values.
  17712. */
  17713. A_UINT32 pdev_id;
  17714. };
  17715. A_UINT32 mimogain_info; /* see WMI_MIMOGAIN macros */
  17716. /*
  17717. * Bit 7:0 len of array gain table
  17718. * Bit 8 bypass multi chain gain or not
  17719. */
  17720. /* array gain table(s) (len adjusted to number of words).
  17721. * Following this structure is the TLV:
  17722. * A_UINT32 arraygain_tbl[1];
  17723. */
  17724. } wmi_pdev_set_mimogain_table_cmd_fixed_param;
  17725.  
  17726. #define WMI_MIMOGAIN_ARRAY_GAIN_LEN_S 0
  17727. #define WMI_MIMOGAIN_ARRAY_GAIN_LEN (0xff << WMI_MIMOGAIN_ARRAY_GAIN_LEN_S)
  17728. #define WMI_MIMOGAIN_ARRAY_GAIN_LEN_GET(x) WMI_F_MS(x,WMI_MIMOGAIN_ARRAY_GAIN_LEN)
  17729. #define WMI_MIMOGAIN_ARRAY_GAIN_LEN_SET(x,z) WMI_F_RMW(x,z,WMI_MIMOGAIN_ARRAY_GAIN_LEN)
  17730.  
  17731. #define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_S 8
  17732. #define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS (0x1 << WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_S)
  17733. #define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_GET(x) WMI_F_MS(x,WMI_MIMOGAIN_MULTI_CHAIN_BYPASS)
  17734. #define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_SET(x,z) WMI_F_RMW(x,z,WMI_MIMOGAIN_MULTI_CHAIN_BYPASS)
  17735.  
  17736.  
  17737. typedef struct {
  17738. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_fwtest_set_param_cmd_fixed_param */
  17739. /** parameter id */
  17740. A_UINT32 param_id;
  17741. /** parameter value */
  17742. A_UINT32 param_value;
  17743. } wmi_fwtest_set_param_cmd_fixed_param;
  17744.  
  17745. #define WMI_ATF_DENOMINATION 1000 /* Expressed in 1 part in 1000 (permille) */
  17746.  
  17747. #define WMI_ATF_SSID_FAIR_SCHED 0 /** fair ATF scheduling for vdev */
  17748. #define WMI_ATF_SSID_STRICT_SCHED 1 /** strict ATF scheduling for vdev */
  17749.  
  17750. typedef struct {
  17751. /** TLV tag and len; tag equals
  17752. * WMITLV_TAG_STRUC_wmi_atf_peer_info */
  17753. A_UINT32 tlv_header;
  17754. wmi_mac_addr peer_macaddr;
  17755. A_UINT32 atf_units; /* Based on 1 part in 1000 (per mille) */
  17756. A_UINT32 atf_groupid; /* Group Id of the peers for ATF SSID grouping */
  17757. A_UINT32 atf_units_reserved; /* Peer congestion threshold for future use */
  17758. A_UINT32 vdev_id;
  17759. A_UINT32 pdev_id;
  17760. } wmi_atf_peer_info;
  17761.  
  17762. typedef struct {
  17763. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_atf_request_fixed_param */
  17764. A_UINT32 num_peers;
  17765. /*
  17766. * Following this structure is the TLV:
  17767. * struct wmi_atf_peer_info peer_info[num_peers];
  17768. */
  17769. } wmi_peer_atf_request_fixed_param;
  17770.  
  17771. /* Structure for Bandwidth Fairness peer information */
  17772. typedef struct {
  17773. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bwf_peer_info */
  17774. A_UINT32 tlv_header;
  17775. wmi_mac_addr peer_macaddr;
  17776. A_UINT32 bwf_guaranteed_bandwidth; /* BWF guaranteed_bandwidth for the peers in mbps */
  17777. A_UINT32 bwf_max_airtime; /* BWF Maximum airtime percentage that can be allocated to the peer to meet the guaranteed_bandwidth */
  17778. A_UINT32 bwf_peer_priority; /* BWF priority of the peer to allocate the tokens dynamically */
  17779. A_UINT32 vdev_id;
  17780. A_UINT32 pdev_id;
  17781. } wmi_bwf_peer_info;
  17782.  
  17783. /* Structure for Bandwidth Fairness peer request */
  17784. typedef struct {
  17785. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_bwf_request_fixed_param */
  17786. A_UINT32 num_peers;
  17787. /*
  17788. * Following this structure is the TLV:
  17789. * struct wmi_bwf_peer_info peer_info[num_peers];
  17790. */
  17791. } wmi_peer_bwf_request_fixed_param;
  17792.  
  17793. /* Equal distribution of ATF air time within an VDEV. */
  17794. typedef struct {
  17795. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_atf_request_fixed_param */
  17796. A_UINT32 vdev_id;
  17797. A_UINT32 peer_atf_units; /* Per peer ATF units (per mille). */
  17798. A_UINT32 pdev_id;
  17799. } wmi_vdev_atf_request_fixed_param;
  17800.  
  17801. typedef struct {
  17802. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_ani_cck_config_cmd_fixed_param */
  17803. /** pdev_id for identifying the MAC
  17804. * See macros starting with WMI_PDEV_ID_ for values.
  17805. */
  17806. A_UINT32 pdev_id;
  17807. /** parameter */
  17808. A_UINT32 param;
  17809. } wmi_pdev_get_ani_cck_config_cmd_fixed_param;
  17810.  
  17811. typedef struct {
  17812. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_ani_ofdm_config_cmd_fixed_param */
  17813. /** pdev_id for identifying the MAC
  17814. * See macros starting with WMI_PDEV_ID_ for values.
  17815. */
  17816. A_UINT32 pdev_id;
  17817. /** parameter */
  17818. A_UINT32 param;
  17819. } wmi_pdev_get_ani_ofdm_config_cmd_fixed_param;
  17820.  
  17821. typedef struct {
  17822. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_QBOOST_CFG_CMD_fixed_param */
  17823. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  17824. A_UINT32 qb_enable;
  17825. wmi_mac_addr peer_macaddr;
  17826. } WMI_QBOOST_CFG_CMD_fixed_param;
  17827.  
  17828. #define WMI_INST_STATS_INVALID_RSSI 0
  17829.  
  17830. typedef struct {
  17831. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_inst_rssi_stats_resp_fixed_param */
  17832. A_UINT32 iRSSI; /* dB above the noise floor */
  17833. /* peer MAC address */
  17834. wmi_mac_addr peer_macaddr;
  17835. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  17836. } wmi_inst_rssi_stats_resp_fixed_param;
  17837.  
  17838. typedef struct {
  17839. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_cck_ofdm_rate_info */
  17840. A_UINT32 ratecode_legacy; /* Rate code for CCK OFDM */
  17841. } wmi_peer_cck_ofdm_rate_info;
  17842.  
  17843. typedef struct {
  17844. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_mcs_rate_info */
  17845. A_UINT32 ratecode_20; /* Rate code for 20MHz BW */
  17846. A_UINT32 ratecode_40; /* Rate code for 40MHz BW */
  17847. A_UINT32 ratecode_80; /* Rate code for 80MHz BW */
  17848. } wmi_peer_mcs_rate_info;
  17849.  
  17850. typedef struct {
  17851. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_ratecode_list_event_fixed_param */
  17852. wmi_mac_addr peer_macaddr;
  17853. A_UINT32 ratecount; /* Max Rate count for each mode */
  17854. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  17855. /*
  17856. * Following this structure are the TLV:
  17857. * struct wmi_peer_cck_ofdm_rate_info;
  17858. * struct wmi_peer_mcs_rate_info;
  17859. */
  17860. } wmi_peer_ratecode_list_event_fixed_param;
  17861.  
  17862. typedef struct wmi_wds_addr_event {
  17863. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wds_addr_event_fixed_param */
  17864. A_UINT32 event_type[4];
  17865. wmi_mac_addr peer_mac;
  17866. wmi_mac_addr dest_mac;
  17867. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  17868. } wmi_wds_addr_event_fixed_param;
  17869.  
  17870. typedef struct {
  17871. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_sta_ps_statechange_event_fixed_param */
  17872. wmi_mac_addr peer_macaddr;
  17873. A_UINT32 peer_ps_state;
  17874. } wmi_peer_sta_ps_statechange_event_fixed_param;
  17875.  
  17876. /* WMI_PDEV_FIPS_EVENTID */
  17877. typedef struct {
  17878. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_fips_event_fixed_param */
  17879. union {
  17880. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  17881. /** pdev_id for identifying the MAC
  17882. * See macros starting with WMI_PDEV_ID_ for values.
  17883. */
  17884. A_UINT32 pdev_id;
  17885. };
  17886. A_UINT32 error_status; /* Error status: 0 (no err), 1, or OPER_TIMEOUT */
  17887. A_UINT32 data_len; /* Data length */
  17888. /*
  17889. * Following this structure is the TLV:
  17890. * A_UINT32 data[1]; <-- Out Data (keep this in the end)
  17891. */
  17892. } wmi_pdev_fips_event_fixed_param;
  17893.  
  17894. typedef struct {
  17895. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_channel_hopping_event_fixed_param */
  17896. union {
  17897. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  17898. /** pdev_id for identifying the MAC
  17899. * See macros starting with WMI_PDEV_ID_ for values.
  17900. */
  17901. A_UINT32 pdev_id;
  17902. };
  17903. /* Noise threshold iterations with high values */
  17904. A_UINT32 noise_floor_report_iter;
  17905. /* Total noise threshold iterations */
  17906. A_UINT32 noise_floor_total_iter;
  17907. } wmi_pdev_channel_hopping_event_fixed_param;
  17908.  
  17909. enum {
  17910. WMI_PDEV_RESERVE_AST_ENTRY_OK,
  17911. WMI_PDEV_RESERVE_AST_ENTRY_HASH_COLLISION,
  17912. WMI_PDEV_RESERVE_AST_ENTRY_CROSSING_AXI_BOUNDARY,
  17913. };
  17914.  
  17915. typedef struct {
  17916. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_tpc_cmd_fixed_param */
  17917. union {
  17918. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  17919. /** pdev_id for identifying the MAC
  17920. * See macros starting with WMI_PDEV_ID_ for values.
  17921. */
  17922. A_UINT32 pdev_id;
  17923. };
  17924. A_UINT32 rate_flags;
  17925. /**
  17926. * FLAG_ONE_CHAIN 0x00000001 - one chain mask
  17927. * FLAG_TWO_CHAIN 0x00000003 - two chain mask
  17928. * FLAG_THREE_CHAIN 0x00000007 - three chain mask
  17929. * FLAG_FOUR_CHAIN 0x0000000F - four chain mask
  17930. * FLAG_FIVE_CHAIN 0x0000001F - five chain mask
  17931. * FLAG_SIX_CHAIN 0x0000003F - six chain mask
  17932. * FLAG_SEVEN_CHAIN 0x0000007F - seven chain mask
  17933. * FLAG_EIGHT_CHAIN 0x000000FF - eight chain mask
  17934. * FLAG_STBC 0x00000100 - STBC is set
  17935. * FLAG_40MHZ 0x00000200
  17936. * FLAG_80MHZ 0x00000300
  17937. * FLAG_160MHZ 0x00000400
  17938. * FLAG_TXBF 0x00000800 - Tx Bf enabled
  17939. * FLAG_RTSENA 0x00001000 - RTS enabled
  17940. * FLAG_CTSENA 0x00002000 - CTS enabled
  17941. * FLAG_LDPC 0x00004000 - LDPC set
  17942. * FLAG_SGI 0x00008000 - Short gaurd interval
  17943. * (0x00010000-0x00080000 unused)
  17944. *------------------
  17945. * 0x00100000-0x00700000 used for SU/MU/OFDMA tx mode
  17946. * FLAG_SU 0x00100000 - SU Data
  17947. * FLAG_DL_MU_MIMO_AC 0x00200000 - DL AC MU data
  17948. * FLAG_DL_MU_MIMO_AX 0x00300000 - DL AX MU data
  17949. * FLAG_DL_OFDMA 0x00400000 - DL OFDMA data
  17950. * FLAG_UL_OFDMA 0x00500000 - UL OFDMA data
  17951. * FLAG_UL_MU_MIMO 0x00600000 - UL MU data
  17952. *------------------
  17953. * */
  17954. A_UINT32 nss;
  17955. /**
  17956. * NSS 0x0 - 0x7
  17957. * */
  17958. A_UINT32 preamble;
  17959. /**
  17960. * PREAM_OFDM - 0x0
  17961. * PREAM_CCK - 0x1
  17962. * PREAM_HT - 0x2
  17963. * PREAM_VHT - 0x3
  17964. * PREAM_HE - 0x4
  17965. * */
  17966. A_UINT32 hw_rate;
  17967. /**
  17968. * *** HW_OFDM_RATE ***
  17969. * OFDM_48_MBPS - 0x0
  17970. * OFDM_24_MBPS - 0x1
  17971. * OFDM_12_MBPS - 0x2
  17972. * OFDM_6_MBPS - 0x3
  17973. * OFDM_54_MBPS - 0x4
  17974. * OFDM_36_MBPS - 0x5
  17975. * OFDM_18_MBPS - 0x6
  17976. * OFDM_9_MBPS - 0x7
  17977. *
  17978. * *** HW_CCK_RATE ***
  17979. * CCK_11_LONG_MBPS - 0x0
  17980. * CCK_5_5_LONG_MBPS - 0x1
  17981. * CCK_2_LONG_MBPS - 0x2
  17982. * CCK_1_LONG_MBPS - 0x3
  17983. * CCK_11_SHORT_MBPS - 0x4
  17984. * CCK_5_5_SHORT_MBPS - 0x5
  17985. * CCK_2_SHORT_MBPS - 0x6
  17986. *
  17987. * *** HW_HT / VHT_RATE ***
  17988. * MCS 0x0 - 0xb
  17989. * */
  17990. } wmi_pdev_get_tpc_cmd_fixed_param;
  17991.  
  17992. typedef struct {
  17993. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_chip_power_stats_cmd_fixed_param */
  17994. /** pdev_id for identifying the MAC
  17995. * See macros starting with WMI_PDEV_ID_ for values.
  17996. */
  17997. A_UINT32 pdev_id;
  17998. } wmi_pdev_get_chip_power_stats_cmd_fixed_param;
  17999.  
  18000. typedef struct {
  18001. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_tpc_event_fixed_param */
  18002. /** pdev_id for identifying the MAC
  18003. * See macros starting with WMI_PDEV_ID_ for values.
  18004. */
  18005. A_UINT32 pdev_id;
  18006. /*
  18007. * Following this structure is the TLV:
  18008. * A_UINT32 tpc[1];
  18009. */
  18010. } wmi_pdev_tpc_event_fixed_param;
  18011.  
  18012. typedef struct {
  18013. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_event_fixed_param */
  18014. union {
  18015. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  18016. /** pdev_id for identifying the MAC
  18017. * See macros starting with WMI_PDEV_ID_ for values.
  18018. */
  18019. A_UINT32 pdev_id;
  18020. };
  18021. A_UINT32 nfdBr_len;
  18022. A_UINT32 nfdBm_len;
  18023. A_UINT32 freqNum_len;
  18024. /*
  18025. * Following this structure is the TLV:
  18026. * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBr;
  18027. * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBm;
  18028. * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_freqNum;
  18029. */
  18030. } wmi_pdev_nfcal_power_all_channels_event_fixed_param;
  18031.  
  18032. typedef struct {
  18033. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBr */
  18034. A_UINT32 nfdBr;
  18035. } wmi_pdev_nfcal_power_all_channels_nfdBr;
  18036.  
  18037. typedef struct {
  18038. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBm */
  18039. A_UINT32 nfdBm;
  18040. } wmi_pdev_nfcal_power_all_channels_nfdBm;
  18041.  
  18042. typedef struct {
  18043. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_freqNum */
  18044. A_UINT32 freqNum;
  18045. } wmi_pdev_nfcal_power_all_channels_freqNum;
  18046.  
  18047. typedef struct {
  18048. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ani_cck_event_fixed_param */
  18049. A_UINT32 cck_level;
  18050. } wmi_ani_cck_event_fixed_param;
  18051.  
  18052. typedef enum wmi_power_debug_reg_fmt_type {
  18053. /* WMI_POWER_DEBUG_REG_FMT_TYPE_ROME -> Dumps following 12 Registers
  18054. * SOC_SYSTEM_SLEEP
  18055. * WLAN_SYSTEM_SLEEP
  18056. * RTC_SYNC_FORCE_WAKE
  18057. * MAC_DMA_ISR
  18058. * MAC_DMA_TXRX_ISR
  18059. * MAC_DMA_ISR_S1
  18060. * MAC_DMA_ISR_S2
  18061. * MAC_DMA_ISR_S3
  18062. * MAC_DMA_ISR_S4
  18063. * MAC_DMA_ISR_S5
  18064. * MAC_DMA_ISR_S6
  18065. * MAC_DMA_ISR_S7
  18066. */
  18067. WMI_POWER_DEBUG_REG_FMT_TYPE_ROME,
  18068.  
  18069. WMI_POWER_DEBUG_REG_FMT_TYPE_MAX = 0xf,
  18070. } WMI_POWER_DEBUG_REG_FMT_TYPE;
  18071.  
  18072. typedef struct {
  18073. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chip_power_stats_event_fixed_param */
  18074. A_UINT32 cumulative_sleep_time_ms; /* maximum range is 35 hours, due to conversion from internal 0.03215 ms units to ms */
  18075. A_UINT32 cumulative_total_on_time_ms; /* maximum range is 35 hours, due to conversion from internal 0.03215 ms units to ms */
  18076. A_UINT32 deep_sleep_enter_counter; /* count of number of times chip enterred deep sleep */
  18077. A_UINT32 last_deep_sleep_enter_tstamp_ms; /* Last Timestamp when Chip went to deep sleep */
  18078. A_UINT32 debug_register_fmt; /* WMI_POWER_DEBUG_REG_FMT_TYPE enum, describes debug registers being dumped as part of the event */
  18079. A_UINT32 num_debug_register; /* number of debug registers being sent to host */
  18080. /*
  18081. * Following this structure is the TLV:
  18082. * A_UINT32 debug_registers[num_debug_registers];
  18083. */
  18084. } wmi_pdev_chip_power_stats_event_fixed_param;
  18085.  
  18086. typedef enum wmi_chip_power_save_failure_reason_code_type {
  18087. WMI_PROTOCOL_POWER_SAVE_FAILURE_REASON,
  18088. WMI_HW_POWER_SAVE_FAILURE_REASON,
  18089. WMI_CSS_LOCKED_POWER_FAILURE_REASON,
  18090. WMI_MAC0_LOCKED_POWER_FAILURE_REASON,
  18091. WMI_MAC1_LOCKED_POWER_FAILURE_REASON,
  18092. WMI_POWER_SAVE_FAILURE_REASON_MAX = 0xf,
  18093. } WMI_POWER_SAVE_FAILURE_REASON_TYPE;
  18094.  
  18095. typedef struct {
  18096. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chip_power_save_failure_detected_fixed_param */
  18097. A_UINT32 power_save_failure_reason_code; /* Chip power save failuire reason as defined in WMI_POWER_SAVE_FAILURE_REASON_TYPE */
  18098. A_UINT32 protocol_wake_lock_bitmap[4]; /* bitmap with bits set for modules (from WLAN_MODULE_ID enum) voting against sleep for prolonged duration */
  18099. } wmi_chip_power_save_failure_detected_fixed_param;
  18100.  
  18101. typedef struct {
  18102. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ani_ofdm_event_fixed_param */
  18103. A_UINT32 ofdm_level;
  18104. } wmi_ani_ofdm_event_fixed_param;
  18105.  
  18106. /* When a bit is set it specifies the particular WLAN traffic type is high priority.
  18107. * BT low priority traffic has higher priority than WLAN low priority traffic and has
  18108. * lower priority when compared to WLAN high priority traffic.
  18109. * BT high priority traffic has higher priority than WLAN low/high priority traffic.
  18110. */
  18111. #define WMI_PDEV_BE_PRIORITY_BIT (1<<0)
  18112. #define WMI_PDEV_BK_PRIORITY_BIT (1<<1)
  18113. #define WMI_PDEV_VI_PRIORITY_BIT (1<<2)
  18114. #define WMI_PDEV_VO_PRIORITY_BIT (1<<3)
  18115. #define WMI_PDEV_BEACON_PRIORITY_BIT (1<<4)
  18116. #define WMI_PDEV_MGMT_PRIORITY_BIT (1<<5)
  18117. #define WMI_PDEV_IS_BE_PRIORITY_SET(val) ((val) & WMI_PDEV_BE_PRIORITY_BIT)
  18118. #define WMI_PDEV_IS_BK_PRIORITY_SET(val) ((val) & WMI_PDEV_BK_PRIORITY_BIT)
  18119. #define WMI_PDEV_IS_VI_PRIORITY_SET(val) ((val) & WMI_PDEV_VI_PRIORITY_BIT)
  18120. #define WMI_PDEV_IS_VO_PRIORITY_SET(val) ((val) & WMI_PDEV_VO_PRIORITY_BIT)
  18121. #define WMI_PDEV_IS_BEACON_PRIORITY_SET(val) ((val) & WMI_PDEV_BEACON_PRIORITY_BIT)
  18122. #define WMI_PDEV_IS_MGMT_PRIORITY_SET(val) ((val) & WMI_PDEV_MGMT_PRIORITY_BIT)
  18123.  
  18124. typedef enum wmi_coex_algo_type {
  18125. WMI_COEX_ALGO_UNCONS_FREERUN = 0,
  18126. WMI_COEX_ALGO_FREERUN = 1,
  18127. WMI_COEX_ALGO_OCS = 2,
  18128. } WMI_COEX_ALGO_TYPE;
  18129.  
  18130. typedef enum wmi_coex_config_type {
  18131. WMI_COEX_CONFIG_PAGE_P2P_TDM = 1, /* config interval (arg1 BT, arg2 WLAN) for P2P + PAGE */
  18132. WMI_COEX_CONFIG_PAGE_STA_TDM = 2, /* config interval (arg1 BT, arg2 WLAN) for STA + PAGE */
  18133. WMI_COEX_CONFIG_PAGE_SAP_TDM = 3, /* config interval (arg1 BT, arg2 WLAN) for SAP + PAGE */
  18134. WMI_COEX_CONFIG_DURING_WLAN_CONN = 4, /* config during WLAN connection */
  18135. WMI_COEX_CONFIG_BTC_ENABLE = 5, /* config to enable/disable BTC */
  18136. WMI_COEX_CONFIG_COEX_DBG = 6, /* config of COEX debug setting */
  18137. WMI_COEX_CONFIG_PAGE_P2P_STA_TDM = 7, /* config interval (ms units) (arg1 BT, arg2 WLAN) for P2P + STA + PAGE */
  18138. WMI_COEX_CONFIG_INQUIRY_P2P_TDM = 8, /* config interval (ms units) (arg1 BT, arg2 WLAN) for P2P + INQUIRY */
  18139. WMI_COEX_CONFIG_INQUIRY_STA_TDM = 9, /* config interval (ms units) (arg1 BT, arg2 WLAN) for STA + INQUIRY */
  18140. WMI_COEX_CONFIG_INQUIRY_SAP_TDM = 10, /* config interval (ms units) (arg1 BT, arg2 WLAN) for SAP + INQUIRY */
  18141. WMI_COEX_CONFIG_INQUIRY_P2P_STA_TDM = 11, /* config interval (ms units) (arg1 BT, arg2 WLAN) for P2P + STA + INQUIRY */
  18142. WMI_COEX_CONFIG_TX_POWER = 12, /* config wlan total tx power when bt coex (arg1 is wlan_tx_power_limit, in 0.5dbm units) */
  18143. WMI_COEX_CONFIG_PTA_CONFIG = 13, /* config whether enable PTA and GPIO number (arg1 is pta_enable, arg2 is GPIO number used as /BT_ACTIVE/BT_PRIORITY/WLAN_DENY,8 bit for each) */
  18144. WMI_COEX_CONFIG_AP_TDM = 14, /* config interval (arg1 duty cycle in ms, arg2 WLAN duration in ms) for AP */
  18145. WMI_COEX_CONFIG_WLAN_SCAN_PRIORITY = 15, /* config to set WLAN priority during Off Channel Scan */
  18146. WMI_COEX_CONFIG_WLAN_PKT_PRIORITY = 16, /* config to set WLAN priority for BE/BK/VO/VI/Beacon/Management frame */
  18147. WMI_COEX_CONFIG_PTA_INTERFACE = 17, /* config PTA interface,
  18148. arg1 PTA num,
  18149. arg2 mode (2-wire/3-wire/PTA),
  18150. arg3 first slot time in microsec,
  18151. arg4 BT priority time in microsec,
  18152. arg5 PTA algorithm (WMI_COEX_ALGO_TYPE),
  18153. arg6 PTA priority */
  18154. WMI_COEX_CONFIG_BTC_DUTYCYCLE = 18, /* config interval (ms units) (arg1 WLAN pause duration, arg2 WLAN unpause duration) for WLAN UL + BT Rx */
  18155. WMI_COEX_CONFIG_HANDOVER_RSSI = 19, /* config to set WLAN RSSI (dBm units) at which device switches from Hybrid to TDD coex mode */
  18156. WMI_COEX_CONFIG_PTA_BT_INFO = 20, /* get BT information,
  18157. arg1 BT info type: WMI_COEX_PTA_BT_INFO_TYPE_T, scan/advertise/connection info,
  18158. arg2-arg5: BT information parameters */
  18159. WMI_COEX_CONFIG_SINK_WLAN_TDM = 21, /* config interval (ms units) (arg1 BT, arg2 WLAN) for A2DP SINK + WLAN */
  18160. } WMI_COEX_CONFIG_TYPE;
  18161.  
  18162. typedef struct {
  18163. A_UINT32 tlv_header;
  18164. A_UINT32 vdev_id;
  18165. A_UINT32 config_type; /* wmi_coex_config_type enum */
  18166. A_UINT32 config_arg1;
  18167. A_UINT32 config_arg2;
  18168. A_UINT32 config_arg3;
  18169. A_UINT32 config_arg4;
  18170. A_UINT32 config_arg5;
  18171. A_UINT32 config_arg6;
  18172. } WMI_COEX_CONFIG_CMD_fixed_param;
  18173.  
  18174. /**
  18175. * This command is sent from WLAN host driver to firmware to
  18176. * request firmware to enable/disable channel avoidance report
  18177. * to host.
  18178. *
  18179. */
  18180. enum {
  18181. WMI_MWSCOEX_CHAN_AVD_RPT_DISALLOW = 0,
  18182. WMI_MWSCOEX_CHAN_AVD_RPT_ALLOW = 1
  18183. };
  18184.  
  18185. typedef struct {
  18186. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_CHAN_AVOID_RPT_ALLOW_CMD_fixed_param */
  18187. /** Allow/disallow flag - see WMI_MWSCOEX_CHAN_AVD_RPT enum */
  18188. A_UINT32 rpt_allow;
  18189. } WMI_CHAN_AVOID_RPT_ALLOW_CMD_fixed_param;
  18190.  
  18191. /*
  18192. * Periodic channel stats WMI command structure
  18193. * WMI_SET_PERIODIC_CHANNEL_STATS_CONFIG_CMDID
  18194. */
  18195. typedef struct {
  18196. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_periodic_channel_stats_config_fixed_param */
  18197. /** 1 = enable, 0 = disable */
  18198. A_UINT32 enable;
  18199. /** periodic stats duration (units are milliseconds) */
  18200. A_UINT32 stats_period;
  18201. /** pdev_id for identifying the MAC
  18202. * See macros starting with WMI_PDEV_ID_ for values.
  18203. */
  18204. A_UINT32 pdev_id;
  18205. } wmi_set_periodic_channel_stats_config_fixed_param;
  18206.  
  18207. typedef struct {
  18208. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_wal_power_debug_cmd_fixed_param */
  18209. /** pdev_id for identifying the MAC
  18210. * See macros starting with WMI_PDEV_ID_ for values.
  18211. */
  18212. A_UINT32 pdev_id;
  18213. /* Identify the wlan module */
  18214. A_UINT32 module_id;
  18215. /* Num of elements in the following args[] array */
  18216. A_UINT32 num_args;
  18217. /**
  18218. * Following this structure are the TLVs:
  18219. * A_UINT32 args[];
  18220. **/
  18221. } wmi_pdev_wal_power_debug_cmd_fixed_param;
  18222.  
  18223. typedef struct {
  18224. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_reorder_timeout_val_cmd_fixed_param */
  18225. /**
  18226. * @brief rx_timeout_pri - what rx reorder timeout (ms) to use for the AC
  18227. * @details
  18228. * Each WMM access category (voice, video, best-effort, background)
  18229. * will have its own timeout value to dictate how long to wait for
  18230. * missing rx MPDUs to arrive before releasing subsequent MPDUs that
  18231. * have already been received.
  18232. * This parameter specifies the timeout in milliseconds for each
  18233. * access category.
  18234. * The array elements are indexed by the WMI_AC enum to identify
  18235. * which array element corresponds to which AC / traffic type.
  18236. */
  18237. A_UINT32 rx_timeout_pri[WMI_AC_MAX];
  18238. } wmi_pdev_set_reorder_timeout_val_cmd_fixed_param;
  18239.  
  18240. /**
  18241. * wlan stats shall be understood as per period.
  18242. * Generally, it is reported periodically based on the period specified by host.
  18243. * But if the variation of one stats of compared to the
  18244. * pervious notification exceeds a threshold,
  18245. * FW will report the wlan stats immediately.
  18246. * The values of the stats becomes the new reference to compute variations.
  18247. * This threshold can be a global setting or per category.
  18248. * Host can enable/disable the mechanism for any stats per bitmap.
  18249. * TX/RX thresholds (percentage value) are shared across ACs,
  18250. * and TX/RX stats comprisons are processed per AC of each peer.
  18251. * For example, if bit 0 (stand for tx_mpdus) of tx_thresh_bitmap is set to 1,
  18252. * and the detailed tx_mpdus threshold value is set to 10%,
  18253. * suppose tx_mpdus value of BE of peer 0 is 100 in first period,
  18254. * and it reaches 110 during the second period,
  18255. * FW will generate and send out a wlan stats event immediately.
  18256. */
  18257. typedef struct {
  18258. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_stats_threshold_cmd_fixed_param */
  18259. /** Indicate if threshold mechnism is enabled or disabled.
  18260. * It is disabled by default.
  18261. * Host can enable and disable it dynamically.
  18262. */
  18263. A_UINT32 enable_thresh;
  18264. /** use_thresh_bitmap equals 0 means gbl_thresh is used.
  18265. * when use_thresh_bitmap equals 1, ignore gbl_thresh and use stats bitmap indicated thresholds.
  18266. */
  18267. A_UINT32 use_thresh_bitmap;
  18268. /** global threshold, valid when use_thresh_bitmap equals 0.
  18269. * It takes effect for all counters.
  18270. * If use_thresh_bitmap ==0 && gbl_thresh == 0, disable threshold mechanism.
  18271. */
  18272. A_UINT32 gbl_thresh;
  18273. /** Enable/disable bitmap for threshold mechanism of CCA stats */
  18274. A_UINT32 cca_thresh_enable_bitmap;
  18275. /** Enable/disable bitmap for threshold mechanism of signal stats */
  18276. A_UINT32 signal_thresh_enable_bitmap;
  18277. /** Enable/disable bitmap for threshold mechanism of TX stats */
  18278. A_UINT32 tx_thresh_enable_bitmap;
  18279. /** Enable/disable bitmap for threshold mechanism of RX stats */
  18280. A_UINT32 rx_thresh_enable_bitmap;
  18281. /* This TLV is followed by TLVs below:
  18282. * wmi_chan_cca_stats_thresh cca_thresh;
  18283. * wmi_peer_signal_stats_thresh signal_thresh;
  18284. * wmi_tx_stats_thresh tx_thresh;
  18285. * wmi_rx_stats_thresh rx_thresh;
  18286. */
  18287. } wmi_pdev_set_stats_threshold_cmd_fixed_param;
  18288.  
  18289. typedef enum {
  18290. WMI_REQUEST_WLAN_TX_STAT = 0x01,
  18291. WMI_REQUEST_WLAN_RX_STAT = 0x02,
  18292. WMI_REQUEST_WLAN_CCA_STAT = 0x04,
  18293. WMI_REQUEST_WLAN_SIGNAL_STAT = 0x08,
  18294. } wmi_wlan_stats_id;
  18295.  
  18296. typedef struct {
  18297. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_wlan_stats_cmd_fixed_param */
  18298. wmi_wlan_stats_id stats_id;
  18299. } wmi_request_wlan_stats_cmd_fixed_param;
  18300.  
  18301. typedef enum {
  18302. WMI_REQUEST_ONE_PEER_STATS_INFO = 0x01, /* request stats of one specified peer */
  18303. WMI_REQUEST_VDEV_ALL_PEER_STATS_INFO = 0x02, /* request stats of all peers belong to specified VDEV */
  18304. } wmi_peer_stats_info_request_type;
  18305.  
  18306. /** It is required to issue WMI_PDEV_PARAM_PEER_STATS_INFO_ENABLE
  18307. * (with a non-zero value) before issuing the first REQUEST_PEER_STATS_INFO.
  18308. */
  18309. typedef struct {
  18310. /** TLV tag and len; tag equals
  18311. * WMITLV_TAG_STRUC_wmi_request_peer_stats_info_cmd_fixed_param */
  18312. A_UINT32 tlv_header;
  18313. /** request_type to indicate if only stats of
  18314. * one peer or all peers of the VDEV are requested,
  18315. * see wmi_peer_stats_info_request_type.
  18316. */
  18317. A_UINT32 request_type;
  18318. /** VDEV identifier */
  18319. A_UINT32 vdev_id;
  18320. /** this peer_macaddr is only used if request_type == ONE_PEER_STATS_INFO */
  18321. wmi_mac_addr peer_macaddr;
  18322. /** flag to indicate if FW needs to reset requested peers stats */
  18323. A_UINT32 reset_after_request;
  18324. } wmi_request_peer_stats_info_cmd_fixed_param;
  18325.  
  18326. typedef enum {
  18327. WMI_REQUEST_ONE_RADIO_CHAN_STATS = 0x01, /* request stats of one specified channel */
  18328. WMI_REQUEST_ALL_RADIO_CHAN_STATS = 0x02, /* request stats of all channels */
  18329. } wmi_radio_chan_stats_request_type;
  18330.  
  18331. /** It is required to issue WMI_PDEV_PARAM_RADIO_CHAN_STATS_ENABLE
  18332. * (with a non-zero value) before issuing the first REQUEST_RADIO_CHAN_STATS.
  18333. */
  18334. typedef struct {
  18335. /** TLV tag and len; tag equals
  18336. * WMITLV_TAG_STRUC_wmi_request_radio_chan_stats_cmd_fixed_param */
  18337. A_UINT32 tlv_header;
  18338. /** request_type to indicate if only stats of
  18339. * one channel or all channels are requested,
  18340. * see wmi_radio_chan_stats_request_type.
  18341. */
  18342. A_UINT32 request_type;
  18343. /** Frequency of channel whose stats is requested,
  18344. * only used when request_type == WMI_REQUEST_ONE_RADIO_CHAN_STATS
  18345. */
  18346. A_UINT32 chan_mhz;
  18347. /** flag to indicate if FW needs to reset requested stats of specified channel/channels */
  18348. A_UINT32 reset_after_request;
  18349. } wmi_request_radio_chan_stats_cmd_fixed_param;
  18350.  
  18351. typedef struct {
  18352. /** TLV tag and len; tag equals
  18353. * WMITLV_TAG_STRUC_wmi_rmc_set_leader_cmd_fixed_param */
  18354. A_UINT32 tlv_header;
  18355. /* VDEV identifier */
  18356. A_UINT32 vdev_id;
  18357. /* Leader's mac address */
  18358. wmi_mac_addr leader_mac_addr;
  18359. } wmi_rmc_set_leader_cmd_fixed_param;
  18360.  
  18361. typedef struct {
  18362. /** TLV tag and len; tag equals
  18363. * WMITLV_TAG_STRUC_wmi_rmc_manual_leader_event_fixed_param */
  18364. A_UINT32 tlv_header;
  18365. /* VDEV identifier */
  18366. A_UINT32 vdev_id;
  18367. /* 0: success
  18368. * 1: selected leader not found in network, able to find using auto selection
  18369. * -1: error
  18370. * non zero value should be return to userspace in case of failure */
  18371. A_INT32 status;
  18372. /* bssid of new leader */
  18373. wmi_mac_addr leader_mac_addr;
  18374. } wmi_rmc_manual_leader_event_fixed_param;
  18375.  
  18376. typedef enum {
  18377. WLAN_2G_CAPABILITY = 0x1,
  18378. WLAN_5G_CAPABILITY = 0x2,
  18379. } WLAN_BAND_CAPABILITY;
  18380.  
  18381. typedef enum wmi_hw_mode_config_type {
  18382. WMI_HW_MODE_SINGLE = 0, /* Only one PHY is active. */
  18383. WMI_HW_MODE_DBS = 1, /* Both PHYs are active in different bands, one in 2G and another in 5G. */
  18384. WMI_HW_MODE_SBS_PASSIVE = 2, /* Both PHYs are in passive mode (only rx) in same band; no tx allowed. */
  18385. WMI_HW_MODE_SBS = 3, /* Both PHYs are active in the same band.
  18386. * Support for both PHYs within one band is planned for 5G only
  18387. * (as indicated in WMI_MAC_PHY_CAPABILITIES),
  18388. * but could be extended to other bands in the future.
  18389. * The separation of the band between the two PHYs needs to be communicated separately.
  18390. */
  18391. WMI_HW_MODE_DBS_SBS = 4, /* 3 PHYs, with 2 on the same band doing SBS
  18392. * as in WMI_HW_MODE_SBS, and 3rd on the other band
  18393. */
  18394. } WMI_HW_MODE_CONFIG_TYPE;
  18395.  
  18396. #define WMI_SUPPORT_11B_GET(flags) WMI_GET_BITS(flags, 0, 1)
  18397. #define WMI_SUPPORT_11B_SET(flags, value) WMI_SET_BITS(flags, 0, 1, value)
  18398.  
  18399. #define WMI_SUPPORT_11G_GET(flags) WMI_GET_BITS(flags, 1, 1)
  18400. #define WMI_SUPPORT_11G_SET(flags, value) WMI_SET_BITS(flags, 1, 1, value)
  18401.  
  18402. #define WMI_SUPPORT_11A_GET(flags) WMI_GET_BITS(flags, 2, 1)
  18403. #define WMI_SUPPORT_11A_SET(flags, value) WMI_SET_BITS(flags, 2, 1, value)
  18404.  
  18405. #define WMI_SUPPORT_11N_GET(flags) WMI_GET_BITS(flags, 3, 1)
  18406. #define WMI_SUPPORT_11N_SET(flags, value) WMI_SET_BITS(flags, 3, 1, value)
  18407.  
  18408. #define WMI_SUPPORT_11AC_GET(flags) WMI_GET_BITS(flags, 4, 1)
  18409. #define WMI_SUPPORT_11AC_SET(flags, value) WMI_SET_BITS(flags, 4, 1, value)
  18410.  
  18411. #define WMI_SUPPORT_11AX_GET(flags) WMI_GET_BITS(flags, 5, 1)
  18412. #define WMI_SUPPORT_11AX_SET(flags, value) WMI_SET_BITS(flags, 5, 1, value)
  18413.  
  18414. #define WMI_MAX_MUBFEE_GET(flags) WMI_GET_BITS(flags, 28, 4)
  18415. #define WMI_MAX_MUBFEE_SET(flags, value) WMI_SET_BITS(flags, 28, 4, value)
  18416.  
  18417. typedef struct {
  18418. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_MAC_PHY_CAPABILITIES */
  18419. /* hw_mode_id - identify a particular set of HW characteristics, as specified
  18420. * by the subsequent fields. WMI_MAC_PHY_CAPABILITIES element must be mapped
  18421. * to its parent WMI_HW_MODE_CAPABILITIES element using hw_mode_id.
  18422. * No particular ordering of WMI_MAC_PHY_CAPABILITIES elements should be assumed,
  18423. * though in practice the elements may always be ordered by hw_mode_id */
  18424. A_UINT32 hw_mode_id;
  18425. /* pdev_id starts with 1. pdev_id 1 => phy_id 0, pdev_id 2 => phy_id 1 */
  18426. A_UINT32 pdev_id;
  18427. /* phy id. Starts with 0 */
  18428. A_UINT32 phy_id;
  18429. /* supported modulations and number of MU beamformees */
  18430. union {
  18431. struct {
  18432. A_UINT32 supports_11b:1,
  18433. supports_11g:1,
  18434. supports_11a:1,
  18435. supports_11n:1,
  18436. supports_11ac:1,
  18437. supports_11ax:1,
  18438.  
  18439. unused: 22,
  18440.  
  18441. max_mubfee: 4; /* max MU beamformees supported per MAC */
  18442. };
  18443. A_UINT32 supported_flags;
  18444. };
  18445. /* supported bands, enum WLAN_BAND_CAPABILITY */
  18446. A_UINT32 supported_bands;
  18447. /* ampdu density 0 for no restriction, 1 for 1/4 us, 2 for 1/2 us,
  18448. * 3 for 1 us,4 for 2 us, 5 for 4 us, 6 for 8 us,7 for 16 us */
  18449. A_UINT32 ampdu_density;
  18450. /* max bw supported 2G, enum wmi_channel_width */
  18451. A_UINT32 max_bw_supported_2G;
  18452. /* WMI HT Capability, WMI_HT_CAP defines */
  18453. A_UINT32 ht_cap_info_2G;
  18454. /* VHT capability info field of 802.11ac, WMI_VHT_CAP defines */
  18455. A_UINT32 vht_cap_info_2G;
  18456. /* VHT Supported MCS Set field Rx/Tx same
  18457. * The max VHT-MCS for n SS subfield (where n = 1,...,8) is encoded as follows
  18458. * - 0 indicates support for VHT-MCS 0-7 for n spatial streams
  18459. * - 1 indicates support for VHT-MCS 0-8 for n spatial streams
  18460. * - 2 indicates support for VHT-MCS 0-9 for n spatial streams
  18461. * - 3 indicates that n spatial streams is not supported */
  18462. A_UINT32 vht_supp_mcs_2G;
  18463. /*HE capability info field of 802.11ax, WMI_HE_CAP defines */
  18464. A_UINT32 he_cap_info_2G;
  18465. /* HE Supported MCS Set field Rx/Tx same
  18466. * - 3 bits are used for each NSS chain.Max of 8 NSS can be encoded with
  18467. * bit 2-0 indicating max HE MCS of NSS1
  18468. * bit 5-3 indicating max HE MCS of NSS2 and so on
  18469. * - The max HE-MCS for n SS subfield (where n = 1,...,8) is encoded as follows
  18470. * - 0 indicates support for VHT-MCS 0-7 for n spatial streams
  18471. * - 1 indicates support for VHT-MCS 0-8 for n spatial streams
  18472. * - 2 indicates support for VHT-MCS 0-9 for n spatial streams
  18473. * - 3 indicates support for VHT-MCS 0-10 for n spatial streams
  18474. * - 4 indicates support for VHT-MCS 0-11 for n spatial streams
  18475. * - 5-6 reserved
  18476. * - 7 indicates that n spatial streams is not supported
  18477. * - WMI_HE_MAX_MCS_4_SS_MASK macro can be used for encoding this info
  18478. */
  18479. A_UINT32 he_supp_mcs_2G;
  18480. /* Valid Transmit chain mask */
  18481. A_UINT32 tx_chain_mask_2G;
  18482. /* Valid Receive chain mask */
  18483. A_UINT32 rx_chain_mask_2G;
  18484. /* max bw supported 5G, enum wmi_channel_width */
  18485. A_UINT32 max_bw_supported_5G;
  18486. /* WMI HT Capability, WMI_HT_CAP defines */
  18487. A_UINT32 ht_cap_info_5G;
  18488. /* VHT capability info field of 802.11ac, WMI_VHT_CAP defines */
  18489. A_UINT32 vht_cap_info_5G;
  18490. /* VHT Supported MCS Set field Rx/Tx same
  18491. * The max VHT-MCS for n SS subfield (where n = 1,...,8) is encoded as follows
  18492. * - 0 indicates support for VHT-MCS 0-7 for n spatial streams
  18493. * - 1 indicates support for VHT-MCS 0-8 for n spatial streams
  18494. * - 2 indicates support for VHT-MCS 0-9 for n spatial streams
  18495. * - 3 indicates that n spatial streams is not supported */
  18496. A_UINT32 vht_supp_mcs_5G;
  18497. /*HE capability info field of 802.11ax, WMI_HE_CAP defines */
  18498. A_UINT32 he_cap_info_5G;
  18499. /* HE Supported MCS Set field Rx/Tx same
  18500. * - 3 bits are used for each NSS chain.Max of 8 NSS can be encoded with
  18501. * bit 2-0 indicating max HE MCS of NSS1
  18502. * bit 5-3 indicating max HE MCS of NSS2 and so on
  18503. * - The max HE-MCS for n SS subfield (where n = 1,...,8) is encoded as follows
  18504. * - 0 indicates support for VHT-MCS 0-7 for n spatial streams
  18505. * - 1 indicates support for VHT-MCS 0-8 for n spatial streams
  18506. * - 2 indicates support for VHT-MCS 0-9 for n spatial streams
  18507. * - 3 indicates support for VHT-MCS 0-10 for n spatial streams
  18508. * - 4 indicates support for VHT-MCS 0-11 for n spatial streams
  18509. * - 5-6 reserved
  18510. * - 7 indicates that n spatial streams is not supported
  18511. * - WMI_HE_MAX_MCS_4_SS_MASK macro can be used for encoding this info
  18512. */
  18513. A_UINT32 he_supp_mcs_5G;
  18514. /* Valid Transmit chain mask */
  18515. A_UINT32 tx_chain_mask_5G;
  18516. /* Valid Receive chain mask */
  18517. A_UINT32 rx_chain_mask_5G;
  18518. /* HE capability phy field of 802.11ax, WMI_HE_CAP defines */
  18519. A_UINT32 he_cap_phy_info_2G[WMI_MAX_HECAP_PHY_SIZE];
  18520. A_UINT32 he_cap_phy_info_5G[WMI_MAX_HECAP_PHY_SIZE];
  18521. wmi_ppe_threshold he_ppet2G;
  18522. wmi_ppe_threshold he_ppet5G;
  18523. /* chainmask table to be used for the MAC */
  18524. A_UINT32 chainmask_table_id;
  18525. } WMI_MAC_PHY_CAPABILITIES;
  18526.  
  18527. typedef struct {
  18528. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_HW_MODE_CAPABILITIES */
  18529. /* hw_mode_id - identify a particular set of HW characteristics,
  18530. * as specified by the subsequent fields */
  18531. A_UINT32 hw_mode_id;
  18532. /* BIT0 represents phy_id 0, BIT1 represent phy_id 1 and so on
  18533. * number of bits set in phy_id_map represents number of WMI_MAC_PHY_CAPABILITIES TLV's
  18534. * one for each active PHY for current HW mode identified by hw_mode_id. For example for
  18535. * DBS/SBS mode there will be 2 WMI_MAC_PHY_CAPABILITIES TLVs and for single MAC modes it
  18536. * will be 1 WMI_MAC_PHY_CAPABILITIES TLVs */
  18537. A_UINT32 phy_id_map;
  18538. /* hw_mode_config_type
  18539. * Identify a particular type of HW mode such as SBS, DBS etc.
  18540. * Refer to WMI_HW_MODE_CONFIG_TYPE values.
  18541. */
  18542. A_UINT32 hw_mode_config_type;
  18543. } WMI_HW_MODE_CAPABILITIES;
  18544.  
  18545. /*
  18546. * The following macros are for the bitfields witihin the supported flags field
  18547. * of WMI_MAC_PHY_CHAINMASK_CAPABILITY:
  18548. * Capabilities for the chainmask
  18549. */
  18550.  
  18551. #define WMI_SUPPORT_CHAN_WIDTH_20_GET(flags) WMI_GET_BITS(flags, 0, 1)
  18552. #define WMI_SUPPORT_CHAN_WIDTH_20_SET(flags, value) WMI_SET_BITS(flags, 0, 1, value)
  18553.  
  18554. #define WMI_SUPPORT_CHAN_WIDTH_40_GET(flags) WMI_GET_BITS(flags, 1, 1)
  18555. #define WMI_SUPPORT_CHAN_WIDTH_40_SET(flags, value) WMI_SET_BITS(flags, 1, 1, value)
  18556.  
  18557. #define WMI_SUPPORT_CHAN_WIDTH_80_GET(flags) WMI_GET_BITS(flags, 2, 1)
  18558. #define WMI_SUPPORT_CHAN_WIDTH_80_SET(flags, value) WMI_SET_BITS(flags, 2, 1, value)
  18559.  
  18560. #define WMI_SUPPORT_CHAN_WIDTH_160_GET(flags) WMI_GET_BITS(flags, 3, 1)
  18561. #define WMI_SUPPORT_CHAN_WIDTH_160_SET(flags, value) WMI_SET_BITS(flags, 3, 1, value)
  18562.  
  18563. #define WMI_SUPPORT_CHAN_WIDTH_80P80_GET(flags) WMI_GET_BITS(flags, 4, 1)
  18564. #define WMI_SUPPORT_CHAN_WIDTH_80P80_SET(flags, value) WMI_SET_BITS(flags, 4, 1, value)
  18565.  
  18566. #define WMI_SUPPORT_CHAIN_MASK_2G_GET(flags) WMI_GET_BITS(flags, 27, 1)
  18567. #define WMI_SUPPORT_CHAIN_MASK_2G_SET(flags, value) WMI_SET_BITS(flags, 27, 1, value)
  18568.  
  18569. #define WMI_SUPPORT_CHAIN_MASK_5G_GET(flags) WMI_GET_BITS(flags, 28, 1)
  18570. #define WMI_SUPPORT_CHAIN_MASK_5G_SET(flags, value) WMI_SET_BITS(flags, 28, 1, value)
  18571.  
  18572. #define WMI_SUPPORT_CHAIN_MASK_TX_GET(flags) WMI_GET_BITS(flags, 29, 1)
  18573. #define WMI_SUPPORT_CHAIN_MASK_TX_SET(flags, value) WMI_SET_BITS(flags, 29, 1, value)
  18574.  
  18575. #define WMI_SUPPORT_CHAIN_MASK_RX_GET(flags) WMI_GET_BITS(flags, 30, 1)
  18576. #define WMI_SUPPORT_CHAIN_MASK_RX_SET(flags, value) WMI_SET_BITS(flags, 30, 1, value)
  18577.  
  18578. #define WMI_SUPPORT_CHAIN_MASK_ADFS_GET(flags) WMI_GET_BITS(flags, 31, 1)
  18579. #define WMI_SUPPORT_CHAIN_MASK_ADFS_SET(flags, value) WMI_SET_BITS(flags, 31, 1, value)
  18580.  
  18581. /** Definition of valid chainmask and associated capabilities */
  18582. typedef struct {
  18583. A_UINT32 tlv_header;/* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_MAC_PHY_CHAINMASK_CAPABILITY */
  18584. /* supported flags: Capabilities for this chianmask*/
  18585. union {
  18586. struct {
  18587. A_UINT32 supports_chan_width_20:1,
  18588. supports_chan_width_40:1,
  18589. supports_chan_width_80:1,
  18590. supports_chan_width_160:1,
  18591. supports_chan_width_80P80:1,
  18592. reserved:22, /* bits 26:5 */
  18593. chain_mask_2G:1,
  18594. chain_mask_5G:1,
  18595. chain_mask_tx:1,
  18596. chain_mask_rx:1,
  18597. supports_aDFS:1; /* agile DFS */
  18598. };
  18599. A_UINT32 supported_flags;
  18600. };
  18601. A_UINT32 chainmask;
  18602. } WMI_MAC_PHY_CHAINMASK_CAPABILITY;
  18603.  
  18604. typedef struct {
  18605. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_MAC_PHY_CHAINMASK_COMBO */
  18606. A_UINT32 chainmask_table_id;
  18607. /* Number of vaild Chainmask in the table */
  18608. A_UINT32 num_valid_chainmask;
  18609. /*
  18610. * This TLV is followed by the below TLVs:
  18611. * WMI_MAC_PHY_CHAINMASK_CAPABILITY mac_phy_chainmask_caps[num_valid_chainmask]
  18612. */
  18613. } WMI_MAC_PHY_CHAINMASK_COMBO;
  18614.  
  18615. typedef struct {
  18616. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SOC_MAC_PHY_HW_MODE_CAPS */
  18617. /* num HW modes */
  18618. A_UINT32 num_hw_modes;
  18619. /* number of unique chainmask combo tables */
  18620. A_UINT32 num_chainmask_tables;
  18621. /*
  18622. * This TLV is followed by the below TLVs:
  18623. *
  18624. * WMI_HW_MODE_CAPABILITIES soc_hw_mode_caps[num_hw_modes]
  18625. *
  18626. * (intervening TLVs, e.g. HW_MODE_CAPS, MAC_PHY_CAPS, HAL_REG_CAPS)
  18627. *
  18628. * WMI_MAC_PHY_CHAINMASK_COMBO mac_phy_chainmask_combo[num_chainmask_tables]
  18629. * // number of chainmasks specified in mac_phy_chainmask_combo[0]
  18630. * WMI_MAC_PHY_CHAINMASK_CAPABILITY mac_phy_chainmask_caps[num_valid_chainmask0]
  18631. * // number of chainmasks specified in mac_phy_chainmask_combo[1]
  18632. * WMI_MAC_PHY_CHAINMASK_CAPABILITY mac_phy_chainmask_caps[num_valid_chainmask1]
  18633. * // number of chainmasks specified in mac_phy_chainmask_combo[2]
  18634. * WMI_MAC_PHY_CHAINMASK_CAPABILITY mac_phy_chainmask_caps[num_valid_chainmask2]
  18635. * etc.
  18636. */
  18637. } WMI_SOC_MAC_PHY_HW_MODE_CAPS;
  18638.  
  18639. /*Below are Reg caps per PHY. Please note PHY ID starts with 0.*/
  18640. typedef struct {
  18641. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_HAL_REG_CAPABILITIES_EXT */
  18642. /* phy id */
  18643. A_UINT32 phy_id;
  18644. /* regdomain value specified in EEPROM */
  18645. A_UINT32 eeprom_reg_domain;
  18646. /* regdomain */
  18647. A_UINT32 eeprom_reg_domain_ext;
  18648. /* CAP1 capabilities bit map, see REGDMN_CAP1_ defines */
  18649. A_UINT32 regcap1;
  18650. /* REGDMN EEPROM CAP, see REGDMN_EEPROM_EEREGCAP_ defines */
  18651. A_UINT32 regcap2;
  18652. /* REGDMN MODE, see REGDMN_MODE_ enum */
  18653. A_UINT32 wireless_modes;
  18654. A_UINT32 low_2ghz_chan;
  18655. A_UINT32 high_2ghz_chan;
  18656. A_UINT32 low_5ghz_chan;
  18657. A_UINT32 high_5ghz_chan;
  18658. } WMI_HAL_REG_CAPABILITIES_EXT;
  18659.  
  18660. typedef struct {
  18661. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SOC_HAL_REG_CAPABILITIES */
  18662. A_UINT32 num_phy;
  18663. /* num_phy WMI_HAL_REG_CAPABILITIES_EXT TLV's */
  18664. } WMI_SOC_HAL_REG_CAPABILITIES;
  18665.  
  18666. typedef struct {
  18667. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_OEM_DMA_RING_CAPABILITIES */
  18668. A_UINT32 pdev_id;
  18669. A_UINT32 min_num_ptr;
  18670. /* Minimum number of pointers in the OEM DMA ring for this pdev */
  18671. A_UINT32 min_buf_size;
  18672. /* Minimum size in bytes of each buffer in the OEM DMA ring */
  18673. A_UINT32 min_buf_align;
  18674. /* Minimum alignment in bytes of each buffer in the OEM DMA ring */
  18675. } WMI_OEM_DMA_RING_CAPABILITIES;
  18676.  
  18677. typedef struct {
  18678. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_adaptive_dwell_parameters_tlv */
  18679. /** global default adaptive dwell mode, used when WMI_SCAN_DWELL_MODE_DEFAULT */
  18680. A_UINT32 default_adaptive_dwell_mode;
  18681. /** the weight to calculate the average low pass filter for channel congestion. 0-100 */
  18682. A_UINT32 adapative_lpf_weight;
  18683. /** interval to monitor passive scan in msec */
  18684. A_UINT32 passive_monitor_interval_ms;
  18685. /** % of wifi activity to switch from passive to active 0-100 */
  18686. A_UINT32 wifi_activity_threshold_pct;
  18687. } wmi_scan_adaptive_dwell_parameters_tlv;
  18688.  
  18689. typedef struct {
  18690. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_adaptive_dwell_config_fixed_param */
  18691. /* globally enable/disable adaptive dwell */
  18692. A_UINT32 enable;
  18693. /** pdev_id for identifying the MAC
  18694. * See macros starting with WMI_PDEV_ID_ for values.
  18695. * In non-DBDC case host should set it to 0
  18696. */
  18697. A_UINT32 pdev_id;
  18698. /**
  18699. * followed by TLV (tag length value) parameters array
  18700. * The TLV's are:
  18701. * wmi_scan_adaptive_dwell_parameters_tlv param[]; (0 or 1 elements)
  18702. */
  18703. } wmi_scan_adaptive_dwell_config_fixed_param;
  18704.  
  18705. typedef struct {
  18706. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_dbs_duty_cycle_param_tlv */
  18707. /** module_id **/
  18708. A_UINT32 module_id;
  18709. /** number of dbs scans */
  18710. A_UINT32 num_dbs_scans;
  18711. /** number of non-dbs scans */
  18712. A_UINT32 num_non_dbs_scans;
  18713. } wmi_scan_dbs_duty_cycle_tlv_param;
  18714.  
  18715. typedef struct {
  18716. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_dbs_duty_cycle_fixed_param */
  18717. /* number of scan client dutycycle param elements */
  18718. A_UINT32 num_clients;
  18719. /** pdev_id for identifying the MAC
  18720. * See macros starting with WMI_PDEV_ID_ for values.
  18721. * In non-DBDC case host should set it to 0
  18722. */
  18723. A_UINT32 pdev_id;
  18724. /**
  18725. * followed by TLV (tag length value) parameters array
  18726. * The TLV's are:
  18727. * wmi_scan_selection_duty_cycle_tlv_param[num_clients];
  18728. */
  18729. } wmi_scan_dbs_duty_cycle_fixed_param;
  18730.  
  18731. typedef struct {
  18732. /** TLV tag and len; tag equals
  18733. * WMITLV_TAG_STRUC_wmi_therm_throt_level_config_info */
  18734. A_UINT32 tlv_header;
  18735. /**
  18736. * temperature sensor value in celsius when to exit to lower zone,
  18737. * this value can be lower than HWM of lower zone as zone overlapping
  18738. * is permitted by design to provide hysteresis
  18739. */
  18740. A_UINT32 temp_lwm;
  18741. /**
  18742. * temperature sensor value in celsius when to exit to higher zone,
  18743. * this value can be higher than LWM of higher zone as zone overlapping
  18744. * is permitted by design to provide hysteresis
  18745. */
  18746. A_UINT32 temp_hwm;
  18747. A_UINT32 dc_off_percent; /* duty cycle off percent 0-100. 0 means no off, 100 means no on (shutdown the phy) */
  18748. /** Disable only the transmit queues in firmware that have lower priority than value defined by prio
  18749. * Prioritization:
  18750. * 0 = disable all data tx queues, No Prioritization defined
  18751. * 1 = disable BK tx queue
  18752. * 2 = disable BK+BE tx queues
  18753. * 3 = disable BK+BE+VI tx queues
  18754. */
  18755. A_UINT32 prio;
  18756. } wmi_therm_throt_level_config_info;
  18757.  
  18758. typedef struct {
  18759. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_therm_throt_config_request_fixed_param */
  18760. A_UINT32 pdev_id; /* config for each pdev */
  18761. A_UINT32 enable; /* 0:disable, 1:enable */
  18762. A_UINT32 dc; /* duty cycle in ms */
  18763. A_UINT32 dc_per_event; /* how often (after how many duty cycles) the FW sends stats to host */
  18764. A_UINT32 therm_throt_levels; /* Indicates the number of thermal zone configuration */
  18765. /*
  18766. * Following this structure is the TLV:
  18767. * struct wmi_therm_throt_level_config_info therm_throt_level_config_info[therm_throt_levels];
  18768. */
  18769. } wmi_therm_throt_config_request_fixed_param;
  18770.  
  18771. /** FW response with the stats event id for every pdev and zones */
  18772. typedef struct {
  18773. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_therm_throt_stats_event_fixed_param */
  18774. A_UINT32 tlv_header;
  18775. A_UINT32 pdev_id; /* stats for corresponding pdev*/
  18776. A_UINT32 temp; /* Temperature reading in celsius */
  18777. A_UINT32 level; /* current thermal throttling level */
  18778. A_UINT32 therm_throt_levels; /* number of levels in therm_throt_level_stats_info */
  18779. /* This TLV is followed by another TLV of array of structs
  18780. * wmi_therm_throt_level_stats_info therm_throt_level_stats_info[therm_throt_levels];
  18781. */
  18782. } wmi_therm_throt_stats_event_fixed_param;
  18783.  
  18784.  
  18785.  
  18786. typedef struct {
  18787. /** TLV tag and len; tag equals
  18788. * WMITLV_TAG_STRUC_wmi_therm_throt_level_stats_info */
  18789. A_UINT32 tlv_header;
  18790. A_UINT32 level_count; /* count of each time thermal throttling entered this state */
  18791. A_UINT32 dc_count; /* total number of duty cycles spent in this state. */
  18792. /* this number increments by one each time we are in this state and we finish one full duty cycle. */
  18793. } wmi_therm_throt_level_stats_info;
  18794.  
  18795.  
  18796.  
  18797.  
  18798. typedef enum {
  18799. WMI_REG_EXT_FCC_MIDBAND = 0,
  18800. WMI_REG_EXT_JAPAN_MIDBAND = 1,
  18801. WMI_REG_EXT_FCC_DFS_HT40 = 2,
  18802. WMI_REG_EXT_JAPAN_NONDFS_HT40 = 3,
  18803. WMI_REG_EXT_JAPAN_DFS_HT40 = 4,
  18804. WMI_REG_EXT_FCC_CH_144 = 5,
  18805. } WMI_REG_EXT_BITMAP;
  18806.  
  18807. #ifdef WMI_CMD_STRINGS
  18808. static INLINE A_UINT8 *wmi_id_to_name(A_UINT32 wmi_command)
  18809. {
  18810. switch (wmi_command) {
  18811. /* initialize the wlan sub system */
  18812. WMI_RETURN_STRING(WMI_INIT_CMDID);
  18813.  
  18814. /* Scan specific commands */
  18815.  
  18816. /* start scan request to FW */
  18817. WMI_RETURN_STRING(WMI_START_SCAN_CMDID);
  18818. /* stop scan request to FW */
  18819. WMI_RETURN_STRING(WMI_STOP_SCAN_CMDID);
  18820. /* full list of channels as defined by the regulatory
  18821. * that will be used by scanner */
  18822. WMI_RETURN_STRING(WMI_SCAN_CHAN_LIST_CMDID);
  18823. /* overwrite default priority table in scan scheduler */
  18824. WMI_RETURN_STRING(WMI_SCAN_SCH_PRIO_TBL_CMDID);
  18825. /* This command to adjust the priority and min.max_rest_time
  18826. * of an on ongoing scan request.
  18827. */
  18828. WMI_RETURN_STRING(WMI_SCAN_UPDATE_REQUEST_CMDID);
  18829.  
  18830. /* PDEV(physical device) specific commands */
  18831. /* set regulatorty ctl id used by FW to determine the exact
  18832. * ctl power limits */
  18833. WMI_RETURN_STRING(WMI_PDEV_SET_REGDOMAIN_CMDID);
  18834. /* set channel. mainly used for supporting monitor mode */
  18835. WMI_RETURN_STRING(WMI_PDEV_SET_CHANNEL_CMDID);
  18836. /* set pdev specific parameters */
  18837. WMI_RETURN_STRING(WMI_PDEV_SET_PARAM_CMDID);
  18838. /* enable packet log */
  18839. WMI_RETURN_STRING(WMI_PDEV_PKTLOG_ENABLE_CMDID);
  18840. /* disable packet log*/
  18841. WMI_RETURN_STRING(WMI_PDEV_PKTLOG_DISABLE_CMDID);
  18842. /* set wmm parameters */
  18843. WMI_RETURN_STRING(WMI_PDEV_SET_WMM_PARAMS_CMDID);
  18844. /* set HT cap ie that needs to be carried probe requests
  18845. * HT/VHT channels */
  18846. WMI_RETURN_STRING(WMI_PDEV_SET_HT_CAP_IE_CMDID);
  18847. /* set VHT cap ie that needs to be carried on probe
  18848. * requests on VHT channels */
  18849. WMI_RETURN_STRING(WMI_PDEV_SET_VHT_CAP_IE_CMDID);
  18850.  
  18851. /* Command to send the DSCP-to-TID map to the target */
  18852. WMI_RETURN_STRING(WMI_PDEV_SET_DSCP_TID_MAP_CMDID);
  18853. /* set quiet ie parameters. primarily used in AP mode */
  18854. WMI_RETURN_STRING(WMI_PDEV_SET_QUIET_MODE_CMDID);
  18855. /* Enable/Disable Green AP Power Save */
  18856. WMI_RETURN_STRING(WMI_PDEV_GREEN_AP_PS_ENABLE_CMDID);
  18857. /* get TPC config for the current operating channel */
  18858. WMI_RETURN_STRING(WMI_PDEV_GET_TPC_CONFIG_CMDID);
  18859.  
  18860. /* set the base MAC address for the physical device before
  18861. * a VDEV is created. For firmware that does not support
  18862. * this feature and this command, the pdev MAC address will
  18863. * not be changed. */
  18864. WMI_RETURN_STRING(WMI_PDEV_SET_BASE_MACADDR_CMDID);
  18865.  
  18866. /* eeprom content dump , the same to bdboard data */
  18867. WMI_RETURN_STRING(WMI_PDEV_DUMP_CMDID);
  18868.  
  18869. /* VDEV(virtual device) specific commands */
  18870. /* vdev create */
  18871. WMI_RETURN_STRING(WMI_VDEV_CREATE_CMDID);
  18872. /* vdev delete */
  18873. WMI_RETURN_STRING(WMI_VDEV_DELETE_CMDID);
  18874. /* vdev start request */
  18875. WMI_RETURN_STRING(WMI_VDEV_START_REQUEST_CMDID);
  18876. /* vdev restart request (RX only, NO TX, used for CAC period)*/
  18877. WMI_RETURN_STRING(WMI_VDEV_RESTART_REQUEST_CMDID);
  18878. /* vdev up request */
  18879. WMI_RETURN_STRING(WMI_VDEV_UP_CMDID);
  18880. /* vdev stop request */
  18881. WMI_RETURN_STRING(WMI_VDEV_STOP_CMDID);
  18882. /* vdev down request */
  18883. WMI_RETURN_STRING(WMI_VDEV_DOWN_CMDID);
  18884. /* set a vdev param */
  18885. WMI_RETURN_STRING(WMI_VDEV_SET_PARAM_CMDID);
  18886. /* set a key (used for setting per peer unicast
  18887. * and per vdev multicast) */
  18888. WMI_RETURN_STRING(WMI_VDEV_INSTALL_KEY_CMDID);
  18889.  
  18890. /* wnm sleep mode command */
  18891. WMI_RETURN_STRING(WMI_VDEV_WNM_SLEEPMODE_CMDID);
  18892. WMI_RETURN_STRING(WMI_VDEV_WMM_ADDTS_CMDID);
  18893. WMI_RETURN_STRING(WMI_VDEV_WMM_DELTS_CMDID);
  18894. WMI_RETURN_STRING(WMI_VDEV_SET_WMM_PARAMS_CMDID);
  18895. WMI_RETURN_STRING(WMI_VDEV_SET_GTX_PARAMS_CMDID);
  18896. WMI_RETURN_STRING(WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMDID);
  18897.  
  18898. WMI_RETURN_STRING(WMI_VDEV_PLMREQ_START_CMDID);
  18899. WMI_RETURN_STRING(WMI_VDEV_PLMREQ_STOP_CMDID);
  18900. WMI_RETURN_STRING(WMI_VDEV_TSF_TSTAMP_ACTION_CMDID);
  18901. WMI_RETURN_STRING(WMI_VDEV_SET_IE_CMDID);
  18902.  
  18903. /* peer specific commands */
  18904.  
  18905. /** create a peer */
  18906. WMI_RETURN_STRING(WMI_PEER_CREATE_CMDID);
  18907. /** delete a peer */
  18908. WMI_RETURN_STRING(WMI_PEER_DELETE_CMDID);
  18909. /** flush specific tid queues of a peer */
  18910. WMI_RETURN_STRING(WMI_PEER_FLUSH_TIDS_CMDID);
  18911. /** set a parameter of a peer */
  18912. WMI_RETURN_STRING(WMI_PEER_SET_PARAM_CMDID);
  18913. /* set peer to associated state. will cary all parameters
  18914. * determined during assocication time */
  18915. WMI_RETURN_STRING(WMI_PEER_ASSOC_CMDID);
  18916. /* add a wds (4 address ) entry. used only for testing
  18917. * WDS feature on AP products */
  18918. WMI_RETURN_STRING(WMI_PEER_ADD_WDS_ENTRY_CMDID);
  18919. /* remove wds (4 address ) entry. used only for testing WDS
  18920. * feature on AP products */
  18921. WMI_RETURN_STRING(WMI_PEER_REMOVE_WDS_ENTRY_CMDID);
  18922. /* set up mcast info for multicast to unicast conversion */
  18923. WMI_RETURN_STRING(WMI_PEER_MCAST_GROUP_CMDID);
  18924. /* request peer info from FW to get PEER_INFO_EVENTID */
  18925. WMI_RETURN_STRING(WMI_PEER_INFO_REQ_CMDID);
  18926.  
  18927. /* beacon/management specific commands */
  18928.  
  18929. /* transmit beacon by reference. used for transmitting beacon
  18930. * on low latency interface like pcie */
  18931. WMI_RETURN_STRING(WMI_BCN_TX_CMDID);
  18932. /* transmit beacon by value */
  18933. WMI_RETURN_STRING(WMI_PDEV_SEND_BCN_CMDID);
  18934. /* set the beacon template. used in beacon offload mode to setup
  18935. * the common beacon template with the FW to be used by FW to
  18936. * generate beacons */
  18937. WMI_RETURN_STRING(WMI_BCN_TMPL_CMDID);
  18938. /* set beacon filter with FW */
  18939. WMI_RETURN_STRING(WMI_BCN_FILTER_RX_CMDID);
  18940. /* enable/disable filtering of probe requests in the firmware */
  18941. WMI_RETURN_STRING(WMI_PRB_REQ_FILTER_RX_CMDID);
  18942. /* transmit management frame by value. will be deprecated */
  18943. WMI_RETURN_STRING(WMI_MGMT_TX_CMDID);
  18944. /* set the probe response template. used in beacon offload mode
  18945. * to setup the common probe response template with the FW to
  18946. * be used by FW to generate probe responses */
  18947. WMI_RETURN_STRING(WMI_PRB_TMPL_CMDID);
  18948.  
  18949. /* commands to directly control ba negotiation directly from
  18950. * host. only used in test mode */
  18951.  
  18952. /* turn off FW Auto addba mode and let host control addba */
  18953. WMI_RETURN_STRING(WMI_ADDBA_CLEAR_RESP_CMDID);
  18954. /* send add ba request */
  18955. WMI_RETURN_STRING(WMI_ADDBA_SEND_CMDID);
  18956. WMI_RETURN_STRING(WMI_ADDBA_STATUS_CMDID);
  18957. /* send del ba */
  18958. WMI_RETURN_STRING(WMI_DELBA_SEND_CMDID);
  18959. /* set add ba response will be used by FW to generate
  18960. * addba response*/
  18961. WMI_RETURN_STRING(WMI_ADDBA_SET_RESP_CMDID);
  18962. /* send single VHT MPDU with AMSDU */
  18963. WMI_RETURN_STRING(WMI_SEND_SINGLEAMSDU_CMDID);
  18964.  
  18965. /* Station power save specific config */
  18966. /* enable/disable station powersave */
  18967. WMI_RETURN_STRING(WMI_STA_POWERSAVE_MODE_CMDID);
  18968. /* set station power save specific parameter */
  18969. WMI_RETURN_STRING(WMI_STA_POWERSAVE_PARAM_CMDID);
  18970. /* set station mimo powersave mode */
  18971. WMI_RETURN_STRING(WMI_STA_MIMO_PS_MODE_CMDID);
  18972.  
  18973. /* DFS-specific commands */
  18974. /* enable DFS (radar detection)*/
  18975. WMI_RETURN_STRING(WMI_PDEV_DFS_ENABLE_CMDID);
  18976. /* disable DFS (radar detection)*/
  18977. WMI_RETURN_STRING(WMI_PDEV_DFS_DISABLE_CMDID);
  18978. /* enable DFS phyerr/parse filter offload */
  18979. WMI_RETURN_STRING(WMI_DFS_PHYERR_FILTER_ENA_CMDID);
  18980. /* enable DFS phyerr/parse filter offload */
  18981. WMI_RETURN_STRING(WMI_DFS_PHYERR_FILTER_DIS_CMDID);
  18982.  
  18983. /* Roaming specific commands */
  18984. /* set roam scan mode */
  18985. WMI_RETURN_STRING(WMI_ROAM_SCAN_MODE);
  18986. /* set roam scan rssi threshold below which roam
  18987. * scan is enabled */
  18988. WMI_RETURN_STRING(WMI_ROAM_SCAN_RSSI_THRESHOLD);
  18989. /* set roam scan period for periodic roam scan mode */
  18990. WMI_RETURN_STRING(WMI_ROAM_SCAN_PERIOD);
  18991. /* set roam scan trigger rssi change threshold */
  18992. WMI_RETURN_STRING(WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD);
  18993. /* set roam AP profile */
  18994. WMI_RETURN_STRING(WMI_ROAM_AP_PROFILE);
  18995. /* set channel list for roam scans */
  18996. WMI_RETURN_STRING(WMI_ROAM_CHAN_LIST);
  18997. /* offload scan specific commands */
  18998. /* set offload scan AP profile */
  18999. WMI_RETURN_STRING(WMI_OFL_SCAN_ADD_AP_PROFILE);
  19000. /* remove offload scan AP profile */
  19001. WMI_RETURN_STRING(WMI_OFL_SCAN_REMOVE_AP_PROFILE);
  19002. /* set offload scan period */
  19003. WMI_RETURN_STRING(WMI_OFL_SCAN_PERIOD);
  19004.  
  19005. /* P2P specific commands */
  19006. /* set P2P device info. FW will used by FW to create P2P IE
  19007. * to be carried in probe response generated during p2p listen
  19008. * and for p2p discoverability */
  19009. WMI_RETURN_STRING(WMI_P2P_DEV_SET_DEVICE_INFO);
  19010. /* enable/disable p2p discoverability on STA/AP VDEVs */
  19011. WMI_RETURN_STRING(WMI_P2P_DEV_SET_DISCOVERABILITY);
  19012. /* set p2p ie to be carried in beacons generated by FW for GO */
  19013. WMI_RETURN_STRING(WMI_P2P_GO_SET_BEACON_IE);
  19014. /* set p2p ie to be carried in probe response frames generated
  19015. * by FW for GO */
  19016. WMI_RETURN_STRING(WMI_P2P_GO_SET_PROBE_RESP_IE);
  19017. /* set the vendor specific p2p ie data.
  19018. * FW will use this to parse the P2P NoA
  19019. * attribute in the beacons/probe responses received.
  19020. */
  19021. WMI_RETURN_STRING(WMI_P2P_SET_VENDOR_IE_DATA_CMDID);
  19022. /* set the configure of p2p find offload */
  19023. WMI_RETURN_STRING(WMI_P2P_DISC_OFFLOAD_CONFIG_CMDID);
  19024. /* set the vendor specific p2p ie data for p2p find offload */
  19025. WMI_RETURN_STRING(WMI_P2P_DISC_OFFLOAD_APPIE_CMDID);
  19026. /* set the BSSID/device name pattern of p2p find offload */
  19027. WMI_RETURN_STRING(WMI_P2P_DISC_OFFLOAD_PATTERN_CMDID);
  19028. /* set OppPS related parameters **/
  19029. WMI_RETURN_STRING(WMI_P2P_SET_OPPPS_PARAM_CMDID);
  19030.  
  19031. /* AP power save specific config
  19032. * set AP power save specific param */
  19033. WMI_RETURN_STRING(WMI_AP_PS_PEER_PARAM_CMDID);
  19034. /* set AP UAPSD coex pecific param */
  19035. WMI_RETURN_STRING(WMI_AP_PS_PEER_UAPSD_COEX_CMDID);
  19036.  
  19037. /* Rate-control specific commands */
  19038. WMI_RETURN_STRING(WMI_PEER_RATE_RETRY_SCHED_CMDID);
  19039.  
  19040. /* WLAN Profiling commands. */
  19041. WMI_RETURN_STRING(WMI_WLAN_PROFILE_TRIGGER_CMDID);
  19042. WMI_RETURN_STRING(WMI_WLAN_PROFILE_SET_HIST_INTVL_CMDID);
  19043. WMI_RETURN_STRING(WMI_WLAN_PROFILE_GET_PROFILE_DATA_CMDID);
  19044. WMI_RETURN_STRING(WMI_WLAN_PROFILE_ENABLE_PROFILE_ID_CMDID);
  19045. WMI_RETURN_STRING(WMI_WLAN_PROFILE_LIST_PROFILE_ID_CMDID);
  19046.  
  19047. /* Suspend resume command Ids */
  19048. WMI_RETURN_STRING(WMI_PDEV_SUSPEND_CMDID);
  19049. WMI_RETURN_STRING(WMI_PDEV_RESUME_CMDID);
  19050.  
  19051. /* Beacon filter commands */
  19052. /* add a beacon filter */
  19053. WMI_RETURN_STRING(WMI_ADD_BCN_FILTER_CMDID);
  19054. /* remove a beacon filter */
  19055. WMI_RETURN_STRING(WMI_RMV_BCN_FILTER_CMDID);
  19056.  
  19057. /* WOW Specific WMI commands */
  19058. /* add pattern for awake */
  19059. WMI_RETURN_STRING(WMI_WOW_ADD_WAKE_PATTERN_CMDID);
  19060. /* deleta a wake pattern */
  19061. WMI_RETURN_STRING(WMI_WOW_DEL_WAKE_PATTERN_CMDID);
  19062. /* enable/deisable wake event */
  19063. WMI_RETURN_STRING(WMI_WOW_ENABLE_DISABLE_WAKE_EVENT_CMDID);
  19064. /* enable WOW */
  19065. WMI_RETURN_STRING(WMI_WOW_ENABLE_CMDID);
  19066. /* host woke up from sleep event to FW. Generated in response
  19067. * to WOW Hardware event */
  19068. WMI_RETURN_STRING(WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID);
  19069.  
  19070. /* RTT measurement related cmd */
  19071. /* reques to make an RTT measurement */
  19072. WMI_RETURN_STRING(WMI_RTT_MEASREQ_CMDID);
  19073. /* reques to report a tsf measurement */
  19074. WMI_RETURN_STRING(WMI_RTT_TSF_CMDID);
  19075.  
  19076. /* spectral scan command */
  19077. /* configure spectral scan */
  19078. WMI_RETURN_STRING(WMI_VDEV_SPECTRAL_SCAN_CONFIGURE_CMDID);
  19079. /* enable/disable spectral scan and trigger */
  19080. WMI_RETURN_STRING(WMI_VDEV_SPECTRAL_SCAN_ENABLE_CMDID);
  19081.  
  19082. /* F/W stats */
  19083. /* one time request for stats */
  19084. WMI_RETURN_STRING(WMI_REQUEST_STATS_CMDID);
  19085. /* Push MCC Adaptive Scheduler Stats to Firmware */
  19086. WMI_RETURN_STRING(WMI_MCC_SCHED_TRAFFIC_STATS_CMDID);
  19087.  
  19088. /* ARP OFFLOAD REQUEST*/
  19089. WMI_RETURN_STRING(WMI_SET_ARP_NS_OFFLOAD_CMDID);
  19090.  
  19091. /* Proactive ARP Response Add Pattern Command*/
  19092. WMI_RETURN_STRING(WMI_ADD_PROACTIVE_ARP_RSP_PATTERN_CMDID);
  19093.  
  19094. /* Proactive ARP Response Del Pattern Command*/
  19095. WMI_RETURN_STRING(WMI_DEL_PROACTIVE_ARP_RSP_PATTERN_CMDID);
  19096.  
  19097. /* NS offload confid*/
  19098. WMI_RETURN_STRING(WMI_NETWORK_LIST_OFFLOAD_CONFIG_CMDID);
  19099.  
  19100. /* GTK offload Specific WMI commands */
  19101. WMI_RETURN_STRING(WMI_GTK_OFFLOAD_CMDID);
  19102.  
  19103. /* CSA offload Specific WMI commands */
  19104. /* csa offload enable */
  19105. WMI_RETURN_STRING(WMI_CSA_OFFLOAD_ENABLE_CMDID);
  19106. /* chan switch command */
  19107. WMI_RETURN_STRING(WMI_CSA_OFFLOAD_CHANSWITCH_CMDID);
  19108.  
  19109. /* Chatter commands */
  19110. /* Change chatter mode of operation */
  19111. WMI_RETURN_STRING(WMI_CHATTER_SET_MODE_CMDID);
  19112. /* chatter add coalescing filter command */
  19113. WMI_RETURN_STRING(WMI_CHATTER_ADD_COALESCING_FILTER_CMDID);
  19114. /* chatter delete coalescing filter command */
  19115. WMI_RETURN_STRING(WMI_CHATTER_DELETE_COALESCING_FILTER_CMDID);
  19116. /* chatter coalecing query command */
  19117. WMI_RETURN_STRING(WMI_CHATTER_COALESCING_QUERY_CMDID);
  19118.  
  19119. /* addba specific commands */
  19120. /* start the aggregation on this TID */
  19121. WMI_RETURN_STRING(WMI_PEER_TID_ADDBA_CMDID);
  19122. /* stop the aggregation on this TID */
  19123. WMI_RETURN_STRING(WMI_PEER_TID_DELBA_CMDID);
  19124.  
  19125. /* set station mimo powersave method */
  19126. WMI_RETURN_STRING(WMI_STA_DTIM_PS_METHOD_CMDID);
  19127. /* Configure the Station UAPSD AC Auto Trigger Parameters */
  19128. WMI_RETURN_STRING(WMI_STA_UAPSD_AUTO_TRIG_CMDID);
  19129. /* Configure the Keep Alive Parameters */
  19130. WMI_RETURN_STRING(WMI_STA_KEEPALIVE_CMDID);
  19131.  
  19132. /* Request ssn from target for a sta/tid pair */
  19133. WMI_RETURN_STRING(WMI_BA_REQ_SSN_CMDID);
  19134. /* misc command group */
  19135. /* echo command mainly used for testing */
  19136. WMI_RETURN_STRING(WMI_ECHO_CMDID);
  19137.  
  19138. /* !!IMPORTANT!!
  19139. * If you need to add a new WMI command to the
  19140. * WMI_RETURN_STRING(WMI_GRP_MISC) sub-group,
  19141. * please make sure you add it BEHIND
  19142. * WMI_RETURN_STRING(WMI_PDEV_UTF_CMDID);
  19143. * as we MUST have a fixed value here to maintain compatibility between
  19144. * UTF and the ART2 driver
  19145. */
  19146. /* UTF WMI commands */
  19147. WMI_RETURN_STRING(WMI_PDEV_UTF_CMDID);
  19148.  
  19149. /* set debug log config */
  19150. WMI_RETURN_STRING(WMI_DBGLOG_CFG_CMDID);
  19151. /* QVIT specific command id */
  19152. WMI_RETURN_STRING(WMI_PDEV_QVIT_CMDID);
  19153. /* Factory Testing Mode request command
  19154. * used for integrated chipsets */
  19155. WMI_RETURN_STRING(WMI_PDEV_FTM_INTG_CMDID);
  19156. /* set and get keepalive parameters command */
  19157. WMI_RETURN_STRING(WMI_VDEV_SET_KEEPALIVE_CMDID);
  19158. WMI_RETURN_STRING(WMI_VDEV_GET_KEEPALIVE_CMDID);
  19159. /* For fw recovery test command */
  19160. WMI_RETURN_STRING(WMI_FORCE_FW_HANG_CMDID);
  19161. /* Set Mcast/Bdcast filter */
  19162. WMI_RETURN_STRING(WMI_SET_MCASTBCAST_FILTER_CMDID);
  19163. /* set thermal management params */
  19164. WMI_RETURN_STRING(WMI_THERMAL_MGMT_CMDID);
  19165. WMI_RETURN_STRING(WMI_RSSI_BREACH_MONITOR_CONFIG_CMDID);
  19166. WMI_RETURN_STRING(WMI_LRO_CONFIG_CMDID);
  19167. WMI_RETURN_STRING(WMI_TRANSFER_DATA_TO_FLASH_CMDID);
  19168. WMI_RETURN_STRING(WMI_CONFIG_ENHANCED_MCAST_FILTER_CMDID);
  19169. WMI_RETURN_STRING(WMI_VDEV_WISA_CMDID);
  19170. WMI_RETURN_STRING(WMI_SCAN_ADAPTIVE_DWELL_CONFIG_CMDID);
  19171. WMI_RETURN_STRING(WMI_WOW_SET_ACTION_WAKE_UP_CMDID);
  19172. WMI_RETURN_STRING(WMI_MAWC_SENSOR_REPORT_IND_CMDID);
  19173. WMI_RETURN_STRING(WMI_ROAM_CONFIGURE_MAWC_CMDID);
  19174. WMI_RETURN_STRING(WMI_NLO_CONFIGURE_MAWC_CMDID);
  19175. WMI_RETURN_STRING(WMI_EXTSCAN_CONFIGURE_MAWC_CMDID);
  19176. /* GPIO Configuration */
  19177. WMI_RETURN_STRING(WMI_GPIO_CONFIG_CMDID);
  19178. WMI_RETURN_STRING(WMI_GPIO_OUTPUT_CMDID);
  19179.  
  19180. /* Txbf configuration command */
  19181. WMI_RETURN_STRING(WMI_TXBF_CMDID);
  19182.  
  19183. /* FWTEST Commands */
  19184. WMI_RETURN_STRING(WMI_FWTEST_VDEV_MCC_SET_TBTT_MODE_CMDID);
  19185. /* set NoA descs */
  19186. WMI_RETURN_STRING(WMI_FWTEST_P2P_SET_NOA_PARAM_CMDID);
  19187.  
  19188. /* TDLS Configuration */
  19189. /* enable/disable TDLS */
  19190. WMI_RETURN_STRING(WMI_TDLS_SET_STATE_CMDID);
  19191. /* set tdls peer state */
  19192. WMI_RETURN_STRING(WMI_TDLS_PEER_UPDATE_CMDID);
  19193.  
  19194. /* Resmgr Configuration */
  19195. /* Adaptive OCS is enabled by default in the FW.
  19196. * This command is used to disable FW based adaptive OCS.
  19197. */
  19198. WMI_RETURN_STRING
  19199. (WMI_RESMGR_ADAPTIVE_OCS_ENABLE_DISABLE_CMDID);
  19200. /* set the requested channel time quota for the home channels */
  19201. WMI_RETURN_STRING(WMI_RESMGR_SET_CHAN_TIME_QUOTA_CMDID);
  19202. /* set the requested latency for the home channels */
  19203. WMI_RETURN_STRING(WMI_RESMGR_SET_CHAN_LATENCY_CMDID);
  19204.  
  19205. /* STA SMPS Configuration */
  19206. /* force SMPS mode */
  19207. WMI_RETURN_STRING(WMI_STA_SMPS_FORCE_MODE_CMDID);
  19208. /* set SMPS parameters */
  19209. WMI_RETURN_STRING(WMI_STA_SMPS_PARAM_CMDID);
  19210.  
  19211. /* Wlan HB commands */
  19212. /* enalbe/disable wlan HB */
  19213. WMI_RETURN_STRING(WMI_HB_SET_ENABLE_CMDID);
  19214. /* set tcp parameters for wlan HB */
  19215. WMI_RETURN_STRING(WMI_HB_SET_TCP_PARAMS_CMDID);
  19216. /* set tcp pkt filter for wlan HB */
  19217. WMI_RETURN_STRING(WMI_HB_SET_TCP_PKT_FILTER_CMDID);
  19218. /* set udp parameters for wlan HB */
  19219. WMI_RETURN_STRING(WMI_HB_SET_UDP_PARAMS_CMDID);
  19220. /* set udp pkt filter for wlan HB */
  19221. WMI_RETURN_STRING(WMI_HB_SET_UDP_PKT_FILTER_CMDID);
  19222.  
  19223. /* Wlan RMC commands*/
  19224. /* enable/disable RMC */
  19225. WMI_RETURN_STRING(WMI_RMC_SET_MODE_CMDID);
  19226. /* configure action frame period */
  19227. WMI_RETURN_STRING(WMI_RMC_SET_ACTION_PERIOD_CMDID);
  19228. /* For debug/future enhancement purposes only,
  19229. * configures/finetunes RMC algorithms */
  19230. WMI_RETURN_STRING(WMI_RMC_CONFIG_CMDID);
  19231.  
  19232. /* WLAN MHF offload commands */
  19233. /* enable/disable MHF offload */
  19234. WMI_RETURN_STRING(WMI_MHF_OFFLOAD_SET_MODE_CMDID);
  19235. /* Plumb routing table for MHF offload */
  19236. WMI_RETURN_STRING(WMI_MHF_OFFLOAD_PLUMB_ROUTING_TBL_CMDID);
  19237.  
  19238. /* location scan commands */
  19239. /* start batch scan */
  19240. WMI_RETURN_STRING(WMI_BATCH_SCAN_ENABLE_CMDID);
  19241. /* stop batch scan */
  19242. WMI_RETURN_STRING(WMI_BATCH_SCAN_DISABLE_CMDID);
  19243. /* get batch scan result */
  19244. WMI_RETURN_STRING(WMI_BATCH_SCAN_TRIGGER_RESULT_CMDID);
  19245. /* OEM related cmd */
  19246. WMI_RETURN_STRING(WMI_OEM_REQ_CMDID);
  19247. WMI_RETURN_STRING(WMI_OEM_REQUEST_CMDID);
  19248. /* NAN request cmd */
  19249. WMI_RETURN_STRING(WMI_NAN_CMDID);
  19250. /* Modem power state cmd */
  19251. WMI_RETURN_STRING(WMI_MODEM_POWER_STATE_CMDID);
  19252. WMI_RETURN_STRING(WMI_REQUEST_STATS_EXT_CMDID);
  19253. WMI_RETURN_STRING(WMI_OBSS_SCAN_ENABLE_CMDID);
  19254. WMI_RETURN_STRING(WMI_OBSS_SCAN_DISABLE_CMDID);
  19255. WMI_RETURN_STRING(WMI_PEER_GET_ESTIMATED_LINKSPEED_CMDID);
  19256. WMI_RETURN_STRING(WMI_ROAM_SCAN_CMD);
  19257. WMI_RETURN_STRING(WMI_PDEV_SET_LED_CONFIG_CMDID);
  19258. WMI_RETURN_STRING(WMI_HOST_AUTO_SHUTDOWN_CFG_CMDID);
  19259. WMI_RETURN_STRING(WMI_CHAN_AVOID_UPDATE_CMDID);
  19260. WMI_RETURN_STRING(WMI_COEX_CONFIG_CMDID);
  19261. WMI_RETURN_STRING(WMI_WOW_IOAC_ADD_KEEPALIVE_CMDID);
  19262. WMI_RETURN_STRING(WMI_WOW_IOAC_DEL_KEEPALIVE_CMDID);
  19263. WMI_RETURN_STRING(WMI_WOW_IOAC_ADD_WAKE_PATTERN_CMDID);
  19264. WMI_RETURN_STRING(WMI_WOW_IOAC_DEL_WAKE_PATTERN_CMDID);
  19265. WMI_RETURN_STRING(WMI_REQUEST_LINK_STATS_CMDID);
  19266. WMI_RETURN_STRING(WMI_START_LINK_STATS_CMDID);
  19267. WMI_RETURN_STRING(WMI_CLEAR_LINK_STATS_CMDID);
  19268. WMI_RETURN_STRING(WMI_GET_FW_MEM_DUMP_CMDID);
  19269. WMI_RETURN_STRING(WMI_LPI_MGMT_SNOOPING_CONFIG_CMDID);
  19270. WMI_RETURN_STRING(WMI_LPI_START_SCAN_CMDID);
  19271. WMI_RETURN_STRING(WMI_LPI_STOP_SCAN_CMDID);
  19272. WMI_RETURN_STRING(WMI_EXTSCAN_START_CMDID);
  19273. WMI_RETURN_STRING(WMI_EXTSCAN_STOP_CMDID);
  19274. WMI_RETURN_STRING(WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID);
  19275. WMI_RETURN_STRING(WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID);
  19276. WMI_RETURN_STRING(WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID);
  19277. WMI_RETURN_STRING(WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID);
  19278. WMI_RETURN_STRING(WMI_EXTSCAN_SET_CAPABILITIES_CMDID);
  19279. WMI_RETURN_STRING(WMI_EXTSCAN_GET_CAPABILITIES_CMDID);
  19280. WMI_RETURN_STRING(WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID);
  19281. WMI_RETURN_STRING(WMI_ROAM_SYNCH_COMPLETE);
  19282. WMI_RETURN_STRING(WMI_D0_WOW_ENABLE_DISABLE_CMDID);
  19283. WMI_RETURN_STRING(WMI_EXTWOW_ENABLE_CMDID);
  19284. WMI_RETURN_STRING(WMI_EXTWOW_SET_APP_TYPE1_PARAMS_CMDID);
  19285. WMI_RETURN_STRING(WMI_EXTWOW_SET_APP_TYPE2_PARAMS_CMDID);
  19286. WMI_RETURN_STRING(WMI_UNIT_TEST_CMDID);
  19287. WMI_RETURN_STRING(WMI_ROAM_SET_RIC_REQUEST_CMDID);
  19288. WMI_RETURN_STRING(WMI_PDEV_GET_TEMPERATURE_CMDID);
  19289. WMI_RETURN_STRING(WMI_SET_DHCP_SERVER_OFFLOAD_CMDID);
  19290. WMI_RETURN_STRING(WMI_TPC_CHAINMASK_CONFIG_CMDID);
  19291. WMI_RETURN_STRING(WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMDID);
  19292. WMI_RETURN_STRING(WMI_SCAN_PROB_REQ_OUI_CMDID);
  19293. WMI_RETURN_STRING(WMI_TDLS_SET_OFFCHAN_MODE_CMDID);
  19294. WMI_RETURN_STRING(WMI_PDEV_SET_LED_FLASHING_CMDID);
  19295. WMI_RETURN_STRING(WMI_MDNS_OFFLOAD_ENABLE_CMDID);
  19296. WMI_RETURN_STRING(WMI_MDNS_SET_FQDN_CMDID);
  19297. WMI_RETURN_STRING(WMI_MDNS_SET_RESPONSE_CMDID);
  19298. WMI_RETURN_STRING(WMI_MDNS_GET_STATS_CMDID);
  19299. WMI_RETURN_STRING(WMI_ROAM_INVOKE_CMDID);
  19300. WMI_RETURN_STRING(WMI_SET_ANTENNA_DIVERSITY_CMDID);
  19301. WMI_RETURN_STRING(WMI_SAP_OFL_ENABLE_CMDID);
  19302. WMI_RETURN_STRING(WMI_APFIND_CMDID);
  19303. WMI_RETURN_STRING(WMI_PASSPOINT_LIST_CONFIG_CMDID);
  19304. WMI_RETURN_STRING(WMI_OCB_SET_SCHED_CMDID);
  19305. WMI_RETURN_STRING(WMI_OCB_SET_CONFIG_CMDID);
  19306. WMI_RETURN_STRING(WMI_OCB_SET_UTC_TIME_CMDID);
  19307. WMI_RETURN_STRING(WMI_OCB_START_TIMING_ADVERT_CMDID);
  19308. WMI_RETURN_STRING(WMI_OCB_STOP_TIMING_ADVERT_CMDID);
  19309. WMI_RETURN_STRING(WMI_OCB_GET_TSF_TIMER_CMDID);
  19310. WMI_RETURN_STRING(WMI_DCC_GET_STATS_CMDID);
  19311. WMI_RETURN_STRING(WMI_DCC_CLEAR_STATS_CMDID);
  19312. WMI_RETURN_STRING(WMI_DCC_UPDATE_NDL_CMDID);
  19313. WMI_RETURN_STRING(WMI_ROAM_FILTER_CMDID);
  19314. WMI_RETURN_STRING(WMI_ROAM_SUBNET_CHANGE_CONFIG_CMDID);
  19315. WMI_RETURN_STRING(WMI_DEBUG_MESG_FLUSH_CMDID);
  19316. WMI_RETURN_STRING(WMI_PEER_SET_RATE_REPORT_CONDITION_CMDID);
  19317. WMI_RETURN_STRING(WMI_SOC_SET_PCL_CMDID);
  19318. WMI_RETURN_STRING(WMI_SOC_SET_HW_MODE_CMDID);
  19319. WMI_RETURN_STRING(WMI_SOC_SET_DUAL_MAC_CONFIG_CMDID);
  19320. WMI_RETURN_STRING(WMI_WOW_ENABLE_ICMPV6_NA_FLT_CMDID);
  19321. WMI_RETURN_STRING(WMI_DIAG_EVENT_LOG_CONFIG_CMDID);
  19322. WMI_RETURN_STRING(WMI_PACKET_FILTER_CONFIG_CMDID);
  19323. WMI_RETURN_STRING(WMI_PACKET_FILTER_ENABLE_CMDID);
  19324. WMI_RETURN_STRING(WMI_SAP_SET_BLACKLIST_PARAM_CMDID);
  19325. WMI_RETURN_STRING(WMI_WOW_UDP_SVC_OFLD_CMDID);
  19326. WMI_RETURN_STRING(WMI_MGMT_TX_SEND_CMDID);
  19327. WMI_RETURN_STRING(WMI_SOC_SET_ANTENNA_MODE_CMDID);
  19328. WMI_RETURN_STRING(WMI_WOW_HOSTWAKEUP_GPIO_PIN_PATTERN_CONFIG_CMDID);
  19329. WMI_RETURN_STRING(WMI_AP_PS_EGAP_PARAM_CMDID);
  19330. WMI_RETURN_STRING(WMI_PMF_OFFLOAD_SET_SA_QUERY_CMDID);
  19331. WMI_RETURN_STRING(WMI_BPF_GET_CAPABILITY_CMDID);
  19332. WMI_RETURN_STRING(WMI_BPF_GET_VDEV_STATS_CMDID);
  19333. WMI_RETURN_STRING(WMI_BPF_SET_VDEV_INSTRUCTIONS_CMDID);
  19334. WMI_RETURN_STRING(WMI_BPF_DEL_VDEV_INSTRUCTIONS_CMDID);
  19335. WMI_RETURN_STRING(WMI_NDI_GET_CAP_REQ_CMDID);
  19336. WMI_RETURN_STRING(WMI_NDP_INITIATOR_REQ_CMDID);
  19337. WMI_RETURN_STRING(WMI_NDP_RESPONDER_REQ_CMDID);
  19338. WMI_RETURN_STRING(WMI_NDP_END_REQ_CMDID);
  19339. WMI_RETURN_STRING(WMI_PEER_UPDATE_WDS_ENTRY_CMDID);
  19340. WMI_RETURN_STRING(WMI_PEER_ADD_PROXY_STA_ENTRY_CMDID);
  19341. WMI_RETURN_STRING(WMI_PDEV_FIPS_CMDID);
  19342. WMI_RETURN_STRING(WMI_PDEV_SMART_ANT_ENABLE_CMDID);
  19343. WMI_RETURN_STRING(WMI_PDEV_SMART_ANT_SET_RX_ANTENNA_CMDID);
  19344. WMI_RETURN_STRING(WMI_PDEV_SET_ANTENNA_SWITCH_TABLE_CMDID);
  19345. WMI_RETURN_STRING(WMI_PDEV_SET_CTL_TABLE_CMDID);
  19346. WMI_RETURN_STRING(WMI_PDEV_SET_MIMOGAIN_TABLE_CMDID);
  19347. WMI_RETURN_STRING(WMI_PDEV_GET_TPC_CMDID);
  19348. WMI_RETURN_STRING(WMI_MIB_STATS_ENABLE_CMDID);
  19349. WMI_RETURN_STRING(WMI_PDEV_GET_ANI_CCK_CONFIG_CMDID);
  19350. WMI_RETURN_STRING(WMI_PDEV_GET_ANI_OFDM_CONFIG_CMDID);
  19351. WMI_RETURN_STRING(WMI_VDEV_RATEMASK_CMDID);
  19352. WMI_RETURN_STRING(WMI_VDEV_ATF_REQUEST_CMDID);
  19353. WMI_RETURN_STRING(WMI_VDEV_SET_DSCP_TID_MAP_CMDID);
  19354. WMI_RETURN_STRING(WMI_VDEV_FILTER_NEIGHBOR_RX_PACKETS_CMDID);
  19355. WMI_RETURN_STRING(WMI_VDEV_SET_QUIET_MODE_CMDID);
  19356. WMI_RETURN_STRING(WMI_PEER_SMART_ANT_SET_TX_ANTENNA_CMDID);
  19357. WMI_RETURN_STRING(WMI_PEER_SMART_ANT_SET_TRAIN_INFO_CMDID);
  19358. WMI_RETURN_STRING(WMI_PEER_SMART_ANT_SET_NODE_CONFIG_OPS_CMDID);
  19359. WMI_RETURN_STRING(WMI_PEER_ATF_REQUEST_CMDID);
  19360. WMI_RETURN_STRING(WMI_FWTEST_CMDID);
  19361. WMI_RETURN_STRING(WMI_QBOOST_CFG_CMDID);
  19362. WMI_RETURN_STRING(WMI_PDEV_GET_NFCAL_POWER_CMDID);
  19363. WMI_RETURN_STRING(WMI_PDEV_SET_PCL_CMDID);
  19364. WMI_RETURN_STRING(WMI_PDEV_SET_HW_MODE_CMDID);
  19365. WMI_RETURN_STRING(WMI_PDEV_SET_MAC_CONFIG_CMDID);
  19366. WMI_RETURN_STRING(WMI_PDEV_SET_ANTENNA_MODE_CMDID);
  19367. WMI_RETURN_STRING(WMI_ROAM_SET_MBO_PARAM_CMDID);
  19368. WMI_RETURN_STRING(WMI_CHAN_AVOID_RPT_ALLOW_CMDID);
  19369. WMI_RETURN_STRING(WMI_SET_PERIODIC_CHANNEL_STATS_CONFIG_CMDID);
  19370. WMI_RETURN_STRING(WMI_VDEV_SET_CUSTOM_AGGR_SIZE_CMDID);
  19371. WMI_RETURN_STRING(WMI_PDEV_WAL_POWER_DEBUG_CMDID);
  19372. WMI_RETURN_STRING(WMI_PEER_BWF_REQUEST_CMDID);
  19373. WMI_RETURN_STRING(WMI_DBGLOG_TIME_STAMP_SYNC_CMDID);
  19374. WMI_RETURN_STRING(WMI_P2P_LISTEN_OFFLOAD_START_CMDID);
  19375. WMI_RETURN_STRING(WMI_P2P_LISTEN_OFFLOAD_STOP_CMDID);
  19376. WMI_RETURN_STRING(WMI_PEER_REORDER_QUEUE_SETUP_CMDID);
  19377. WMI_RETURN_STRING(WMI_PEER_REORDER_QUEUE_REMOVE_CMDID);
  19378. WMI_RETURN_STRING(WMI_SET_MULTIPLE_MCAST_FILTER_CMDID);
  19379. WMI_RETURN_STRING(WMI_READ_DATA_FROM_FLASH_CMDID);
  19380. WMI_RETURN_STRING(WMI_PDEV_SET_REORDER_TIMEOUT_VAL_CMDID);
  19381. WMI_RETURN_STRING(WMI_PEER_SET_RX_BLOCKSIZE_CMDID);
  19382. WMI_RETURN_STRING(WMI_PDEV_SET_WAKEUP_CONFIG_CMDID);
  19383. WMI_RETURN_STRING(WMI_PDEV_GET_ANTDIV_STATUS_CMDID);
  19384. WMI_RETURN_STRING(WMI_PEER_ANTDIV_INFO_REQ_CMDID);
  19385. WMI_RETURN_STRING(WMI_MNT_FILTER_CMDID);
  19386. WMI_RETURN_STRING(WMI_PDEV_GET_CHIP_POWER_STATS_CMDID);
  19387. WMI_RETURN_STRING(WMI_COEX_GET_ANTENNA_ISOLATION_CMDID);
  19388. WMI_RETURN_STRING(WMI_PDEV_SET_STATS_THRESHOLD_CMDID);
  19389. WMI_RETURN_STRING(WMI_REQUEST_WLAN_STATS_CMDID);
  19390. WMI_RETURN_STRING(WMI_VDEV_ENCRYPT_DECRYPT_DATA_REQ_CMDID);
  19391. WMI_RETURN_STRING(WMI_REQUEST_PEER_STATS_INFO_CMDID);
  19392. WMI_RETURN_STRING(WMI_REQUEST_RADIO_CHAN_STATS_CMDID);
  19393. WMI_RETURN_STRING(WMI_ROAM_PER_CONFIG_CMDID);
  19394. WMI_RETURN_STRING(WMI_VDEV_ADD_MAC_ADDR_TO_RX_FILTER_CMDID);
  19395. WMI_RETURN_STRING(WMI_BPF_SET_VDEV_ACTIVE_MODE_CMDID);
  19396. WMI_RETURN_STRING(WMI_HW_DATA_FILTER_CMDID);
  19397. WMI_RETURN_STRING(WMI_PDEV_MULTIPLE_VDEV_RESTART_REQUEST_CMDID);
  19398. WMI_RETURN_STRING(WMI_LPI_OEM_REQ_CMDID);
  19399. WMI_RETURN_STRING(WMI_PDEV_UPDATE_PKT_ROUTING_CMDID);
  19400. WMI_RETURN_STRING(WMI_PDEV_CHECK_CAL_VERSION_CMDID);
  19401. WMI_RETURN_STRING(WMI_PDEV_SET_DIVERSITY_GAIN_CMDID);
  19402. WMI_RETURN_STRING(WMI_VDEV_SET_ARP_STAT_CMDID);
  19403. WMI_RETURN_STRING(WMI_VDEV_GET_ARP_STAT_CMDID);
  19404. WMI_RETURN_STRING(WMI_VDEV_GET_TX_POWER_CMDID);
  19405. WMI_RETURN_STRING(WMI_OFFCHAN_DATA_TX_SEND_CMDID);
  19406. WMI_RETURN_STRING(WMI_SET_INIT_COUNTRY_CMDID);
  19407. WMI_RETURN_STRING(WMI_SET_SCAN_DBS_DUTY_CYCLE_CMDID);
  19408. WMI_RETURN_STRING(WMI_THERM_THROT_SET_CONF_CMDID);
  19409. WMI_RETURN_STRING(WMI_OEM_DMA_RING_CFG_REQ_CMDID);
  19410. WMI_RETURN_STRING(WMI_PDEV_BSS_CHAN_INFO_REQUEST_CMDID);
  19411. WMI_RETURN_STRING(WMI_VDEV_LIMIT_OFFCHAN_CMDID);
  19412. }
  19413.  
  19414. return "Invalid WMI cmd";
  19415. }
  19416. #endif /* WMI_CMD_STRINGS */
  19417.  
  19418. /** WMI commands/events for the regulatory offload */
  19419.  
  19420. /** Host indicating current country code to FW */
  19421. typedef struct {
  19422. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_current_country_cmd_fixed_param */
  19423. A_UINT32 pdev_id;
  19424. A_UINT32 new_alpha2; /** alpha2 characters representing the country code */
  19425. } wmi_set_current_country_cmd_fixed_param;
  19426.  
  19427. typedef enum {
  19428. WMI_COUNTRYCODE_ALPHA2,
  19429. WMI_COUNTRYCODE_COUNTRY_ID,
  19430. WMI_COUNTRYCODE_DOMAIN_CODE,
  19431. } WMI_COUNTRYCODE_TYPE;
  19432.  
  19433. typedef struct {
  19434. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_init_country_cmd_fixed_param */
  19435. A_UINT32 pdev_id;
  19436. A_UINT32 countrycode_type; /* WMI_COUNTRYCODE_TYPE */
  19437. union {
  19438. struct {
  19439. /* Three character for alpha2. The first two is ISO name for country the last one
  19440. present if it is indoor and out door. First char in bits 7:0 and second char in bits 15:8 ... */
  19441. A_UINT32 alpha2:24,
  19442. unused:8;
  19443. };
  19444. A_UINT32 country_id; /* Country ID */
  19445. A_UINT32 domain_code; /* Domain code */
  19446. } country_code;
  19447. } wmi_set_init_country_cmd_fixed_param;
  19448.  
  19449. /* Freq units in MHz */
  19450. #define WMI_REG_RULE_START_FREQ_GET(freq_info) WMI_GET_BITS(freq_info, 0, 16)
  19451. #define WMI_REG_RULE_START_FREQ_SET(freq_info, value) WMI_SET_BITS(freq_info, 0, 16, value)
  19452. #define WMI_REG_RULE_END_FREQ_GET(freq_info) WMI_GET_BITS(freq_info, 16, 16)
  19453. #define WMI_REG_RULE_END_FREQ_SET(freq_info, value) WMI_SET_BITS(freq_info, 16, 16, value)
  19454.  
  19455. /* BW in MHz */
  19456. #define WMI_REG_RULE_MAX_BW_GET(bw_pwr_info) WMI_GET_BITS(bw_pwr_info, 0, 16)
  19457. #define WMI_REG_RULE_MAX_BW_SET(bw_pwr_info, value) WMI_SET_BITS(bw_pwr_info, 0, 16, value)
  19458. /* regpower in dBm */
  19459. #define WMI_REG_RULE_REG_POWER_GET(bw_pwr_info) WMI_GET_BITS(bw_pwr_info, 16, 8)
  19460. #define WMI_REG_RULE_REG_POWER_SET(bw_pwr_info, value) WMI_SET_BITS(bw_pwr_info, 16, 8, value)
  19461. /* antenna gain */
  19462. #define WMI_REG_RULE_ANTENNA_GAIN_GET(bw_pwr_info) WMI_GET_BITS(bw_pwr_info, 24, 8)
  19463. #define WMI_REG_RULE_ANTENNA_GAIN_SET(bw_pwr_info, value) WMI_SET_BITS(bw_pwr_info, 24, 8, value)
  19464.  
  19465. typedef enum {
  19466. WMI_REG_FLAG_CHAN_NO_IR = 0x0001, /* passive channel */
  19467. WMI_REG_FLAG_CHAN_RADAR = 0x0002, /* dfs channel */
  19468. WMI_REG_FLAG_CHAN_NO_OFDM = 0x0004, /* no ofdm channel */
  19469. WMI_REG_FLAG_CHAN_INDOOR_ONLY = 0x0008, /* indoor only channel */
  19470. } WMI_REGULATORY_FLAGS;
  19471.  
  19472. #define WMI_REG_RULE_FLAGS_GET(flag_info) WMI_GET_BITS(flag_info, 0, 16)
  19473. #define WMI_REG_RULE_FLAGS_SET(flag_info, value) WMI_SET_BITS(flag_info, 0, 16, value)
  19474.  
  19475. typedef struct {
  19476. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_regulatory_rule_struct */
  19477. A_UINT32 freq_info; /* bits 15:0 = u16 start_freq,
  19478. * bits 31:16 = u16 end_freq
  19479. * (both in MHz units) */
  19480. A_UINT32 bw_pwr_info; /* bits 15:0 = u16 max_bw (MHz units),
  19481. bits 23:16 = u8 reg_power (dBm units),
  19482. bits 31:24 = u8 ant_gain (dB units) */
  19483. A_UINT32 flag_info; /* bits 15:0 = u16 flags,
  19484. bits 31:16 reserved */
  19485. } wmi_regulatory_rule_struct;
  19486.  
  19487. typedef enum {
  19488. WMI_REG_DFS_UNINIT_REGION = 0,
  19489. WMI_REG_DFS_FCC_REGION = 1,
  19490. WMI_REG_DFS_ETSI_REGION = 2,
  19491. WMI_REG_DFS_MKK_REGION = 3,
  19492. WMI_REG_DFS_CN_REGION = 4,
  19493. WMI_REG_DFS_KR_REGION = 5,
  19494.  
  19495. /* Add new items above */
  19496. WMI_REG_DFS_UNDEF_REGION = 0xFFFF,
  19497. } WMI_REG_DFS_REGION;
  19498.  
  19499. typedef enum {
  19500. WMI_REGULATORY_PHYMODE_NO11A = 0x0001, /* NO 11A */
  19501. WMI_REGULATORY_PHYMODE_NO11B = 0x0002, /* NO 11B */
  19502. WMI_REGULATORY_PHYMODE_NO11G = 0x0004, /* NO 11G */
  19503. WMI_REGULATORY_PHYMODE_NO11N = 0x0008, /* NO 11N */
  19504. WMI_REGULATORY_PHYMODE_NO11AC = 0x0010, /* NO 11AC */
  19505. WMI_REGULATORY_PHYMODE_NO11AX = 0x0020, /* NO 11AX */
  19506. } WMI_REGULATORY_PHYBITMAP;
  19507.  
  19508. typedef enum {
  19509. WMI_REG_SET_CC_STATUS_PASS = 0,
  19510. WMI_REG_CURRENT_ALPHA2_NOT_FOUND = 1,
  19511. WMI_REG_INIT_ALPHA2_NOT_FOUND = 2,
  19512. WMI_REG_SET_CC_CHANGE_NOT_ALLOWED = 3,
  19513. WMI_REG_SET_CC_STATUS_NO_MEMORY = 4,
  19514. WMI_REG_SET_CC_STATUS_FAIL = 5,
  19515. } WMI_REG_SET_CC_STATUS_CODE;
  19516.  
  19517. typedef struct {
  19518. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_reg_chan_list_cc_event_fixed_param */
  19519. A_UINT32 status_code; /* WMI_REG_SET_CC_STATUS_CODE */
  19520. A_UINT32 phy_id;
  19521. A_UINT32 alpha2;
  19522. A_UINT32 num_phy;
  19523. A_UINT32 country_id;
  19524. A_UINT32 domain_code;
  19525. A_UINT32 dfs_region; /* WMI_REG_DFS_REGION */
  19526. A_UINT32 phybitmap; /* WMI_REGULATORY_PHYBITMAP */
  19527. A_UINT32 min_bw_2g; /* BW in MHz */
  19528. A_UINT32 max_bw_2g; /* BW in MHz */
  19529. A_UINT32 min_bw_5g; /* BW in MHz */
  19530. A_UINT32 max_bw_5g; /* BW in MHz */
  19531. A_UINT32 num_2g_reg_rules;
  19532. A_UINT32 num_5g_reg_rules;
  19533. /* followed by wmi_regulatory_rule_struct TLV array. First 2G and then 5G */
  19534. } wmi_reg_chan_list_cc_event_fixed_param;
  19535.  
  19536. typedef struct {
  19537. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_11d_scan_start_cmd_fixed_param */
  19538. A_UINT32 vdev_id;
  19539. A_UINT32 scan_period_msec; /** scan duration in milli-seconds */
  19540. A_UINT32 start_interval_msec; /** offset duration to start the scan in milli-seconds */
  19541. } wmi_11d_scan_start_cmd_fixed_param;
  19542.  
  19543. typedef struct {
  19544. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_11d_scan_stop_cmd_fixed_param */
  19545. A_UINT32 vdev_id;
  19546. } wmi_11d_scan_stop_cmd_fixed_param;
  19547.  
  19548. /** FW indicating new current country code to Host */
  19549. typedef struct {
  19550. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_11d_new_country_event_fixed_param */
  19551. A_UINT32 new_alpha2; /** alpha2 characters representing the country code */
  19552. } wmi_11d_new_country_event_fixed_param;
  19553.  
  19554. typedef struct {
  19555. /** TLV tag and len; tag equals
  19556. * WMITLV_TAG_STRUC_wmi_coex_get_antenna_isolation_cmd_fixed_param */
  19557. A_UINT32 tlv_header;
  19558. /* Currently there are no parameters for this message. */
  19559. } wmi_coex_get_antenna_isolation_cmd_fixed_param;
  19560.  
  19561. typedef struct {
  19562. /** TLV tag and len; tag equals
  19563. * WMITLV_TAG_STRUC_wmi_coex_report_isolation_event_fixed_param */
  19564. A_UINT32 tlv_header;
  19565. /** Antenna isolation value in dB units, none zero value is valid while 0 means failed to do isolation measurement or corresponding chain is not active.
  19566. * Currently the HW descriptor only supports 4 chains at most.
  19567. * Further isolation_chainX elements can be added in the future
  19568. * for additional chains, if needed.
  19569. */
  19570. A_UINT32 isolation_chain0:8, /* [7:0], isolation value for chain 0 */
  19571. isolation_chain1:8, /* [15:8], isolation value for chain 1 */
  19572. isolation_chain2:8, /* [23:16], isolation value for chain 2 */
  19573. isolation_chain3:8; /* [31:24], isolation value for chain 3 */
  19574. } wmi_coex_report_isolation_event_fixed_param;
  19575.  
  19576. typedef enum {
  19577. WMI_RCPI_MEASUREMENT_TYPE_AVG_MGMT = 1,
  19578. WMI_RCPI_MEASUREMENT_TYPE_AVG_DATA = 2,
  19579. WMI_RCPI_MEASUREMENT_TYPE_LAST_MGMT = 3,
  19580. WMI_RCPI_MEASUREMENT_TYPE_LAST_DATA = 4,
  19581. } wmi_rcpi_measurement_type;
  19582.  
  19583. typedef struct {
  19584. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_rcpi_cmd_fixed_param */
  19585. A_UINT32 tlv_header;
  19586. /* VDEV identifier */
  19587. A_UINT32 vdev_id;
  19588. /* peer MAC address */
  19589. wmi_mac_addr peer_macaddr;
  19590. /* measurement type - defined in enum wmi_rcpi_measurement_type */
  19591. A_UINT32 measurement_type;
  19592. } wmi_request_rcpi_cmd_fixed_param;
  19593.  
  19594. typedef struct {
  19595. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_update_rcpi_event_fixed_param */
  19596. A_UINT32 tlv_header;
  19597. /* VDEV identifier */
  19598. A_UINT32 vdev_id;
  19599. /* peer MAC address */
  19600. wmi_mac_addr peer_macaddr;
  19601. /* measurement type - defined in enum wmi_rcpi_measurement_type */
  19602. A_UINT32 measurement_type;
  19603. /* Measured RCPI in dBm of the peer requested by host */
  19604. A_INT32 rcpi;
  19605. /** status
  19606. * 0 - Requested peer RCPI available
  19607. * 1 - Requested peer RCPI not available
  19608. */
  19609. A_UINT32 status;
  19610. } wmi_update_rcpi_event_fixed_param;
  19611.  
  19612. /* Definition of mask for various package id */
  19613. #define WMI_PKGID_MASK_AUTO 0x00000080
  19614.  
  19615. typedef struct {
  19616. /** TLV tag and len; tag equals*/
  19617. A_UINT32 tlv_header;
  19618. /**
  19619. * The value field is filled with WMI_PKGID_MASK values.
  19620. * Currently, the only flag used within values is
  19621. * WMI_PKGID_MASK_AUTO, where bit7=1 for automotive systems.
  19622. */
  19623. A_UINT32 value;
  19624. } wmi_pkgid_event_fixed_param;
  19625.  
  19626. typedef struct {
  19627. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_add_mac_addr_to_rx_filter_cmd_fixed_params */
  19628. A_UINT32 vdev_id; /* vdev id whose mac to be randomized */
  19629. /* enable is set to 1 if mac randomization to be enabled */
  19630. A_UINT32 enable;
  19631. /* randomization mac address if randomization is enabled */
  19632. wmi_mac_addr mac_addr;
  19633. /* To get the PMAC from freq param */
  19634. A_UINT32 freq; /* units in MHz */
  19635. } wmi_vdev_add_mac_addr_to_rx_filter_cmd_fixed_param;
  19636.  
  19637. typedef struct {
  19638. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_add_mac_addr_to_rx_filter_event_fixed_params */
  19639. A_UINT32 vdev_id; /* vdev of id whose mac address was randomized */
  19640. A_UINT32 status; /* status is 1 if success and 0 if failed */
  19641. } wmi_vdev_add_mac_addr_to_rx_filter_status_event_fixed_param;
  19642.  
  19643. /* Definition of HW data filtering */
  19644. typedef enum {
  19645. WMI_HW_DATA_FILTER_DROP_NON_ARP_BC = 0x01,
  19646. WMI_HW_DATA_FILTER_DROP_NON_ICMPV6_MC = 0x02,
  19647. } WMI_HW_DATA_FILTER_BITMAP_TYPE;
  19648.  
  19649. typedef struct {
  19650. A_UINT32 tlv_header;
  19651. A_UINT32 vdev_id;
  19652. A_UINT32 enable; /* 1 . enable, 0- disable */
  19653. A_UINT32 hw_filter_bitmap; /* see WMI_HW_DATA_FILTER_BITMAP_TYPE */
  19654. } wmi_hw_data_filter_cmd_fixed_param;
  19655.  
  19656. /* This command is used whenever host wants to restart multiple
  19657. * VDEVs using single command and the VDEV that are restarted will
  19658. * need to have same properties they had before restart except for the
  19659. * operating channel
  19660. */
  19661. typedef struct {
  19662. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_multiple_vdev_restart_request_cmd_fixed_param */
  19663. /** pdev_id for identifying the MAC
  19664. * See macros starting with WMI_PDEV_ID_ for values.
  19665. * In non-DBDC case host should set it to 0
  19666. */
  19667. A_UINT32 pdev_id;
  19668. /** unique id identifying the module, generated by the caller */
  19669. A_UINT32 requestor_id;
  19670. /** Disable H/W ack.
  19671. * During CAC, Our HW shouldn't ack directed frames
  19672. */
  19673. A_UINT32 disable_hw_ack;
  19674. /* Determine the duration of CAC on the given channel 'chan' */
  19675. A_UINT32 cac_duration_ms;
  19676. A_UINT32 num_vdevs;
  19677.  
  19678. /* The TLVs follows this structure:
  19679. * A_UINT32 vdev_ids[]; <--- Array of VDEV ids.
  19680. * wmi_channel chan; <------ WMI channel
  19681. */
  19682. } wmi_pdev_multiple_vdev_restart_request_cmd_fixed_param;
  19683.  
  19684. typedef struct {
  19685. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_csa_switch_count_status_event_fixed_param */
  19686. A_UINT32 tlv_header;
  19687. /** pdev_id for identifying the MAC
  19688. * See macros starting with WMI_PDEV_ID_ for values.
  19689. * In non-DBDC case host should set it to 0
  19690. */
  19691. A_UINT32 pdev_id;
  19692. /** CSA switch count value in the last transmitted beacon */
  19693. A_UINT32 current_switch_count;
  19694. A_UINT32 num_vdevs;
  19695.  
  19696. /* The TLVs follows this structure:
  19697. * A_UINT32 vdev_ids[]; <--- Array of VDEV ids.
  19698. */
  19699. } wmi_pdev_csa_switch_count_status_event_fixed_param;
  19700.  
  19701. /* Operation types for packet routing command */
  19702. typedef enum {
  19703. WMI_PDEV_ADD_PKT_ROUTING,
  19704. WMI_PDEV_DEL_PKT_ROUTING,
  19705. } wmi_pdev_pkt_routing_op_code;
  19706.  
  19707. /* Packet routing types based on specific data types */
  19708. typedef enum {
  19709. WMI_PDEV_ROUTING_TYPE_ARP_IPV4,
  19710. WMI_PDEV_ROUTING_TYPE_NS_IPV6,
  19711. WMI_PDEV_ROUTING_TYPE_IGMP_IPV4,
  19712. WMI_PDEV_ROUTING_TYPE_MLD_IPV6,
  19713. WMI_PDEV_ROUTING_TYPE_DHCP_IPV4,
  19714. WMI_PDEV_ROUTING_TYPE_DHCP_IPV6,
  19715. } wmi_pdev_pkt_routing_type;
  19716.  
  19717. /* This command shall be sent only when no VDEV is up. If the command is sent after any VDEV is up, target will ignore the command */
  19718. typedef struct {
  19719. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_update_pkt_routing_cmd_fixed_param */
  19720. A_UINT32 tlv_header;
  19721. /** Identifies pdev on which routing needs to be applied */
  19722. A_UINT32 pdev_id;
  19723. /** Indicates the routing operation type: add/delete */
  19724. A_UINT32 op_code; /* wmi_pdev_pkt_routing_op_code */
  19725. /** Bitmap of multiple pkt routing types for a given destination ring and meta data */
  19726. A_UINT32 routing_type_bitmap; /* see wmi_pdev_pkt_routing_type */
  19727. /** 5 bits [4:0] are used to specify the destination ring where the CCE matched
  19728. * packet needs to be routed.
  19729. */
  19730. A_UINT32 dest_ring;
  19731. /** 16 bits [15:0] meta data can be passed to CCE. When the superrule matches,
  19732. * CCE copies this back in RX_MSDU_END_TLV.
  19733. */
  19734. A_UINT32 meta_data;
  19735. } wmi_pdev_update_pkt_routing_cmd_fixed_param;
  19736.  
  19737. typedef enum {
  19738. WMI_CALIBRATION_NO_FEATURE = 0, /* The board was calibrated with a meta which did not have this feature */
  19739. WMI_CALIBRATION_OK, /* The calibration status is OK */
  19740. WMI_CALIBRATION_NOT_OK, /* The calibration status is NOT OK */
  19741. } WMI_CALIBRATION_STATUS;
  19742.  
  19743. typedef struct {
  19744. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_check_cal_version_event_fixed_param */
  19745. A_UINT32 software_cal_version; /* Current software level calibration data version */
  19746. A_UINT32 board_cal_version; /* Calibration data version programmed on chip */
  19747. A_UINT32 cal_status; /* filled with WMI_CALIBRATION_STATUS enum value */
  19748. /** pdev_id for identifying the MAC
  19749. * See macros starting with WMI_PDEV_ID_ for values.
  19750. */
  19751. A_UINT32 pdev_id;
  19752. } wmi_pdev_check_cal_version_event_fixed_param;
  19753.  
  19754. typedef struct {
  19755. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_check_cal_version_cmd_fixed_param */
  19756. /** pdev_id for identifying the MAC
  19757. * See macros starting with WMI_PDEV_ID_ for values.
  19758. */
  19759. A_UINT32 pdev_id;
  19760. } wmi_pdev_check_cal_version_cmd_fixed_param;
  19761.  
  19762. typedef struct {
  19763. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_diversity_gain_cmd_fixed_param */
  19764. /** Identifies pdev on which diversity gain to be applied */
  19765. A_UINT32 pdev_id;
  19766. /** The number of spatial stream */
  19767. A_UINT32 nss;
  19768. /** The number of gains */
  19769. A_UINT32 num_gains;
  19770. /*
  19771. * This fixed_param TLV is followed by other TLVs:
  19772. * A_UINT8 diversity_gains[num_gains]; (gain is in dB units)
  19773. */
  19774. } wmi_pdev_set_diversity_gain_cmd_fixed_param;
  19775.  
  19776.  
  19777. /* ADD NEW DEFS HERE */
  19778.  
  19779.  
  19780. /*****************************************************************************
  19781. * The following structures are deprecated. DO NOT USE THEM!
  19782. */
  19783. /** Max number of channels in the schedule. */
  19784. #define OCB_CHANNEL_MAX (5)
  19785.  
  19786. /* NOTE: Make sure these data structures are identical to those
  19787. * defined in sirApi.h */
  19788.  
  19789. typedef struct
  19790. {
  19791. /** Arbitration Inter-Frame Spacing. Range: 2-15 */
  19792. A_UINT32 aifsn;
  19793. /** Contention Window minimum. Range: 1 - 10 */
  19794. A_UINT32 cwmin;
  19795. /** Contention Window maximum. Range: 1 - 10 */
  19796. A_UINT32 cwmax;
  19797. } wmi_qos_params_t;
  19798.  
  19799. typedef struct
  19800. {
  19801. /** Channel frequency in MHz */
  19802. A_UINT32 chan_freq;
  19803. /** Channel duration in ms */
  19804. A_UINT32 duration;
  19805. /** Start guard interval in ms */
  19806. A_UINT32 start_guard_interval;
  19807. /** End guard interval in ms */
  19808. A_UINT32 end_guard_interval;
  19809. /** Transmit power in dBm, range 0 - 23 */
  19810. A_UINT32 tx_power;
  19811. /** Transmit datarate in Mbps */
  19812. A_UINT32 tx_rate;
  19813. /** QoS parameters for each AC */
  19814. wmi_qos_params_t qos_params[WLAN_MAX_AC];
  19815. /** 1 to enable RX stats for this channel, 0 otherwise */
  19816. A_UINT32 rx_stats;
  19817. } wmi_ocb_channel_t;
  19818.  
  19819. typedef struct {
  19820. /** TLV tag and len; tag equals
  19821. * WMITLV_TAG_STRUC_wmi_ocb_set_sched_cmd_fixed_param */
  19822. A_UINT32 tlv_header;
  19823. /* VDEV identifier */
  19824. A_UINT32 vdev_id;
  19825. /** Number of valid channels in the channels array */
  19826. A_UINT32 num_channels;
  19827. /** The array of channels */
  19828. wmi_ocb_channel_t channels[OCB_CHANNEL_MAX];
  19829. /** 1 to allow off-channel tx, 0 otherwise */
  19830. A_UINT32 off_channel_tx; /* Not supported */
  19831. } wmi_ocb_set_sched_cmd_fixed_param;
  19832.  
  19833. typedef struct {
  19834. /** Return status. 0 for success, non-zero otherwise */
  19835. A_UINT32 status;
  19836. } wmi_ocb_set_sched_event_fixed_param;
  19837.  
  19838. /*****************************************************************************
  19839. * END DEPRECATED
  19840. */
  19841.  
  19842. /* ADD NEW DEFS ABOVE THIS DEPRECATED SECTION */
  19843.  
  19844.  
  19845. #ifdef __cplusplus
  19846. }
  19847. #endif
  19848.  
  19849. #endif /*_WMI_UNIFIED_H_*/
  19850.  
  19851. /**@}*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement