wmi_unified_ap_params.h 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800
  1. /*
  2. * Copyright (c) 2020-2021, The Linux Foundation. All rights reserved.
  3. *
  4. * Permission to use, copy, modify, and/or distribute this software for any
  5. * purpose with or without fee is hereby granted, provided that the above
  6. * copyright notice and this permission notice appear in all copies.
  7. *
  8. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  9. * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  10. * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  11. * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  12. * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  13. * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  14. * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  15. */
  16. /* This file has WIN specific WMI structures and macros. */
  17. #ifndef _WMI_UNIFIED_AP_PARAMS_H_
  18. #define _WMI_UNIFIED_AP_PARAMS_H_
  19. /* Country code string length*/
  20. #define COUNTRY_CODE_LEN 2
  21. /* Civic information size in bytes */
  22. #define CIVIC_INFO_LEN 256
  23. /**
  24. * wmi_wifi_pos_lcr_info - LCR info structure
  25. * @pdev_id: host pdev id
  26. * @req_id: LCR request id
  27. * @civic_len: Civic info length
  28. * @country_code: Country code string
  29. * @civic_info: Civic info
  30. */
  31. struct wmi_wifi_pos_lcr_info {
  32. uint32_t pdev_id;
  33. uint16_t req_id;
  34. uint32_t civic_len;
  35. uint8_t country_code[COUNTRY_CODE_LEN];
  36. uint8_t civic_info[CIVIC_INFO_LEN];
  37. };
  38. /**
  39. * lci_motion_pattern - LCI motion pattern
  40. * @LCI_MOTION_NOT_EXPECTED: Not expected to change location
  41. * @LCI_MOTION_EXPECTED: Expected to change location
  42. * @LCI_MOTION_UNKNOWN: Movement pattern unknown
  43. */
  44. enum wifi_pos_motion_pattern {
  45. wifi_pos_MOTION_NOT_EXPECTED = 0,
  46. wifi_pos_MOTION_EXPECTED = 1,
  47. wifi_pos_MOTION_UNKNOWN = 2
  48. };
  49. /**
  50. * wifi_pos_lci_info - LCI info structure
  51. * @pdev_id: host pdev_id
  52. * @req_id: LCI request id
  53. * @latitude: Latitude value
  54. * @longitude: Longitude value
  55. * @altitude: Altitude value
  56. * @latitude_unc: Latitude uncertainty value
  57. * @longitude_unc: Longitude uncertainty value
  58. * @altitude_unc: Altitude uncertainty value
  59. * @motion_pattern: Motion pattern
  60. * @floor: Floor value
  61. * @height_above_floor: Height above floor
  62. * @height_unc: Height uncertainty value
  63. * @usage_rules: Usage rules
  64. */
  65. struct wifi_pos_lci_info {
  66. uint32_t pdev_id;
  67. uint16_t req_id;
  68. int64_t latitude;
  69. int64_t longitude;
  70. int32_t altitude;
  71. uint8_t latitude_unc;
  72. uint8_t longitude_unc;
  73. uint8_t altitude_unc;
  74. enum wifi_pos_motion_pattern motion_pattern;
  75. int32_t floor;
  76. int32_t height_above_floor;
  77. int32_t height_unc;
  78. uint32_t usage_rules;
  79. };
  80. /**
  81. * struct peer_add_wds_entry_params - WDS peer entry add params
  82. * @dest_addr: Pointer to destination macaddr
  83. * @peer_addr: Pointer to peer mac addr
  84. * @flags: flags
  85. * @vdev_id: Vdev id
  86. */
  87. struct peer_add_wds_entry_params {
  88. const uint8_t *dest_addr;
  89. uint8_t *peer_addr;
  90. uint32_t flags;
  91. uint32_t vdev_id;
  92. };
  93. /**
  94. * struct peer_del_wds_entry_params - WDS peer entry del params
  95. * @dest_addr: Pointer to destination macaddr
  96. * @vdev_id: Vdev id
  97. */
  98. struct peer_del_wds_entry_params {
  99. uint8_t *dest_addr;
  100. uint32_t vdev_id;
  101. };
  102. /**
  103. * struct peer_update_wds_entry_params - WDS peer entry update params
  104. * @wds_macaddr: Pointer to destination macaddr
  105. * @peer_add: Pointer to peer mac addr
  106. * @flags: flags
  107. * @vdev_id: Vdev id
  108. */
  109. struct peer_update_wds_entry_params {
  110. uint8_t *wds_macaddr;
  111. uint8_t *peer_macaddr;
  112. uint32_t flags;
  113. uint32_t vdev_id;
  114. };
  115. /**
  116. * struct ctl_table_params - Ctl table params
  117. * @ctl_array: pointer to ctl array
  118. * @ctl_cmd_len: ctl command length
  119. * @is_2g: is 2G
  120. * @target_type: target type
  121. * @ctl_band: ctl band
  122. * @pdev_id: pdev id
  123. */
  124. struct ctl_table_params {
  125. uint8_t *ctl_array;
  126. uint16_t ctl_cmd_len;
  127. bool is_2g;
  128. uint32_t target_type;
  129. uint32_t ctl_band;
  130. uint32_t pdev_id;
  131. };
  132. /**
  133. * struct mimogain_table_params - MIMO gain table params
  134. * @array_gain: pointer to array gain table
  135. * @tbl_len: table length
  136. * @multichain_gain_bypass: bypass multichain gain
  137. */
  138. struct mimogain_table_params {
  139. uint8_t *array_gain;
  140. uint16_t tbl_len;
  141. bool multichain_gain_bypass;
  142. uint32_t pdev_id;
  143. };
  144. /**
  145. * struct packet_power_info_params - packet power info params
  146. * @chainmask: chain mask
  147. * @chan_width: channel bandwidth
  148. * @rate_flags: rate flags
  149. * @su_mu_ofdma: su/mu/ofdma flags
  150. * @nss: number of spatial streams
  151. * @preamble: preamble
  152. * @hw_rate:
  153. */
  154. struct packet_power_info_params {
  155. uint16_t chainmask;
  156. uint16_t chan_width;
  157. uint16_t rate_flags;
  158. uint16_t su_mu_ofdma;
  159. uint16_t nss;
  160. uint16_t preamble;
  161. uint16_t hw_rate;
  162. uint32_t pdev_id;
  163. };
  164. /* struct ht_ie_params - HT IE params
  165. * @ie_len: IE length
  166. * @ie_data: pointer to IE data
  167. * @tx_streams: Tx streams supported for this HT IE
  168. * @rx_streams: Rx streams supported for this HT IE
  169. */
  170. struct ht_ie_params {
  171. uint32_t ie_len;
  172. uint8_t *ie_data;
  173. uint32_t tx_streams;
  174. uint32_t rx_streams;
  175. };
  176. /* struct vht_ie_params - VHT IE params
  177. * @ie_len: IE length
  178. * @ie_data: pointer to IE data
  179. * @tx_streams: Tx streams supported for this VHT IE
  180. * @rx_streams: Rx streams supported for this VHT IE
  181. */
  182. struct vht_ie_params {
  183. uint32_t ie_len;
  184. uint8_t *ie_data;
  185. uint32_t tx_streams;
  186. uint32_t rx_streams;
  187. };
  188. /**
  189. * struct set_quiet_mode_params - Set quiet mode params
  190. * @enabled: Enabled
  191. * @period: Quite period
  192. * @intval: Quite interval
  193. * @duration: Quite duration
  194. * @offset: offset
  195. */
  196. struct set_quiet_mode_params {
  197. uint8_t enabled;
  198. uint8_t period;
  199. uint16_t intval;
  200. uint16_t duration;
  201. uint16_t offset;
  202. };
  203. /**
  204. * struct set_bcn_offload_quiet_mode_params - Set quiet mode params
  205. * @vdev_id: Vdev ID
  206. * @period: Quite period
  207. * @duration: Quite duration
  208. * @next_start: Next quiet start
  209. * @flag: 0 - disable, 1 - enable and continuous, 3 - enable and single shot
  210. */
  211. struct set_bcn_offload_quiet_mode_params {
  212. uint32_t vdev_id;
  213. uint32_t period;
  214. uint32_t duration;
  215. uint32_t next_start;
  216. uint32_t flag;
  217. };
  218. /**
  219. * struct bcn_offload_control - Beacon offload control params
  220. * @vdev_id: vdev identifer of VAP to control beacon tx
  221. * @bcn_ctrl_op: values from enum bcn_offload_control_param
  222. */
  223. struct bcn_offload_control {
  224. uint32_t vdev_id;
  225. enum bcn_offload_control_param bcn_ctrl_op;
  226. };
  227. /**
  228. * struct wmi_host_tim_info - TIM info in SWBA event
  229. * @tim_len: TIM length
  230. * @tim_mcast:
  231. * @tim_bitmap: TIM bitmap
  232. * @tim_changed: TIM changed
  233. * @tim_num_ps_pending: TIM num PS sta pending
  234. * @vdev_id: Vdev id
  235. */
  236. typedef struct {
  237. uint32_t tim_len;
  238. uint32_t tim_mcast;
  239. uint32_t tim_bitmap[WMI_HOST_TIM_BITMAP_ARRAY_SIZE];
  240. uint32_t tim_changed;
  241. uint32_t tim_num_ps_pending;
  242. uint32_t vdev_id;
  243. } wmi_host_tim_info;
  244. /* Maximum number of NOA Descriptors supported */
  245. #define WMI_HOST_P2P_MAX_NOA_DESCRIPTORS 4
  246. /**
  247. * struct wmi_host_p2p_noa_info - p2p noa information
  248. * @modified: NoA modified
  249. * @index: Index
  250. * @oppPS: Oppurtunstic ps
  251. * @ctwindow: CT window
  252. * @num_descriptors: number of descriptors
  253. * @noa_descriptors: noa descriptors
  254. * @vdev_id: Vdev id
  255. */
  256. typedef struct {
  257. uint8_t modified;
  258. uint8_t index;
  259. uint8_t oppPS;
  260. uint8_t ctwindow;
  261. uint8_t num_descriptors;
  262. wmi_host_p2p_noa_descriptor
  263. noa_descriptors[WMI_HOST_P2P_MAX_NOA_DESCRIPTORS];
  264. uint32_t vdev_id;
  265. } wmi_host_p2p_noa_info;
  266. /**
  267. * struct wmi_host_quiet_info - Quiet info in SWBA event
  268. * @vdev_id: vdev_id for quiet info structure
  269. * @tbttcount: quiet start tbtt count
  270. * @period: Beacon interval between quiets
  271. * @duration: TUs of each quiet
  272. * @offset: TUs from TBTT to quiet start
  273. */
  274. typedef struct {
  275. uint32_t vdev_id;
  276. uint32_t tbttcount;
  277. uint32_t period;
  278. uint32_t duration;
  279. uint32_t offset;
  280. } wmi_host_quiet_info;
  281. /**
  282. * struct wmi_host_offchan_data_tx_compl_event - TX completion event
  283. * @desc_id: from tx_send_cmd
  284. * @status: VWMI_MGMT_TX_COMP_STATUS_TYPE
  285. * @pdev_id: pdev_id
  286. */
  287. struct wmi_host_offchan_data_tx_compl_event {
  288. uint32_t desc_id;
  289. uint32_t status;
  290. uint32_t pdev_id;
  291. };
  292. /**
  293. * struct wmi_host_pdev_tpc_config_event - host pdev tpc config event
  294. * @pdev_id: pdev_id
  295. * @regDomain:
  296. * @chanFreq:
  297. * @phyMode:
  298. * @twiceAntennaReduction:
  299. * @twiceMaxRDPower:
  300. * @twiceAntennaGain:
  301. * @powerLimit:
  302. * @rateMax:
  303. * @numTxChain:
  304. * @ctl:
  305. * @flags:
  306. * @maxRegAllowedPower:
  307. * @maxRegAllowedPowerAGCDD:
  308. * @maxRegAllowedPowerAGSTBC:
  309. * @maxRegAllowedPowerAGTXBF:
  310. * @ratesArray:
  311. */
  312. typedef struct {
  313. uint32_t pdev_id;
  314. uint32_t regDomain;
  315. uint32_t chanFreq;
  316. uint32_t phyMode;
  317. uint32_t twiceAntennaReduction;
  318. uint32_t twiceMaxRDPower;
  319. int32_t twiceAntennaGain;
  320. uint32_t powerLimit;
  321. uint32_t rateMax;
  322. uint32_t numTxChain;
  323. uint32_t ctl;
  324. uint32_t flags;
  325. int8_t maxRegAllowedPower[WMI_HOST_TPC_TX_NUM_CHAIN];
  326. int8_t maxRegAllowedPowerAGCDD[WMI_HOST_TPC_TX_NUM_CHAIN][WMI_HOST_TPC_TX_NUM_CHAIN];
  327. int8_t maxRegAllowedPowerAGSTBC[WMI_HOST_TPC_TX_NUM_CHAIN][WMI_HOST_TPC_TX_NUM_CHAIN];
  328. int8_t maxRegAllowedPowerAGTXBF[WMI_HOST_TPC_TX_NUM_CHAIN][WMI_HOST_TPC_TX_NUM_CHAIN];
  329. uint8_t ratesArray[WMI_HOST_TPC_RATE_MAX];
  330. } wmi_host_pdev_tpc_config_event;
  331. /**
  332. * struct wmi_host_peer_sta_kickout_event
  333. * @peer_macaddr: peer mac address
  334. * @reason: kickout reason
  335. * @rssi: rssi
  336. * @pdev_id: pdev_id
  337. */
  338. typedef struct {
  339. uint8_t peer_macaddr[QDF_MAC_ADDR_SIZE];
  340. uint32_t reason;
  341. uint32_t rssi;
  342. } wmi_host_peer_sta_kickout_event;
  343. /**
  344. * struct wmi_host_peer_create_response_event - Peer Create response event param
  345. * @vdev_id: vdev id
  346. * @mac_address: Peer Mac Address
  347. * @status: Peer create status
  348. *
  349. */
  350. struct wmi_host_peer_create_response_event {
  351. uint32_t vdev_id;
  352. struct qdf_mac_addr mac_address;
  353. uint32_t status;
  354. };
  355. /**
  356. * struct wmi_host_peer_delete_response_event - Peer Delete response event param
  357. * @vdev_id: vdev id
  358. * @mac_address: Peer Mac Address
  359. *
  360. */
  361. struct wmi_host_peer_delete_response_event {
  362. uint32_t vdev_id;
  363. struct qdf_mac_addr mac_address;
  364. };
  365. /**
  366. * struct wmi_host_pdev_tpc_event - WMI host pdev TPC event
  367. * @pdev_id: pdev_id
  368. * @tpc:
  369. */
  370. typedef struct {
  371. uint32_t pdev_id;
  372. int32_t tpc[WMI_HOST_TX_POWER_LEN];
  373. } wmi_host_pdev_tpc_event;
  374. /**
  375. * struct wmi_host_pdev_nfcal_power_all_channels_event - NF cal event data
  376. * @nfdbr:
  377. * chan[0 ~ 7]: {NFCalPower_chain0, NFCalPower_chain1,
  378. * NFCalPower_chain2, NFCalPower_chain3,
  379. * NFCalPower_chain4, NFCalPower_chain5,
  380. * NFCalPower_chain6, NFCalPower_chain7},
  381. * @nfdbm:
  382. * chan[0 ~ 7]: {NFCalPower_chain0, NFCalPower_chain1,
  383. * NFCalPower_chain2, NFCalPower_chain3,
  384. * NFCalPower_chain4, NFCalPower_chain5,
  385. * NFCalPower_chain6, NFCalPower_chain7},
  386. * @freqnum:
  387. * chan[0 ~ 7]: frequency number
  388. * @pdev_id: pdev_id
  389. * @num_freq: number of valid frequency in freqnum
  390. * @num_nfdbr_dbm: number of valid entries in dbr/dbm array
  391. *
  392. */
  393. typedef struct {
  394. int8_t nfdbr[WMI_HOST_RXG_CAL_CHAN_MAX * WMI_HOST_MAX_NUM_CHAINS];
  395. int8_t nfdbm[WMI_HOST_RXG_CAL_CHAN_MAX * WMI_HOST_MAX_NUM_CHAINS];
  396. uint32_t freqnum[WMI_HOST_RXG_CAL_CHAN_MAX];
  397. uint32_t pdev_id;
  398. uint16_t num_freq;
  399. uint16_t num_nfdbr_dbm;
  400. } wmi_host_pdev_nfcal_power_all_channels_event;
  401. /**
  402. * struct wds_addr_event - WDS addr event structure
  403. * @event_type: event type add/delete
  404. * @peer_mac: peer mac
  405. * @dest_mac: destination mac address
  406. * @vdev_id: vdev id
  407. */
  408. typedef struct {
  409. uint32_t event_type[4];
  410. u_int8_t peer_mac[QDF_MAC_ADDR_SIZE];
  411. u_int8_t dest_mac[QDF_MAC_ADDR_SIZE];
  412. uint32_t vdev_id;
  413. } wds_addr_event_t;
  414. /**
  415. * struct wmi_host_peer_sta_ps_statechange_event - ST ps state change event
  416. * @peer_macaddr: peer mac address
  417. * @peer_ps_stats: peer PS state
  418. * @pdev_id: pdev_id
  419. */
  420. typedef struct {
  421. uint8_t peer_macaddr[QDF_MAC_ADDR_SIZE];
  422. uint32_t peer_ps_state;
  423. } wmi_host_peer_sta_ps_statechange_event;
  424. /**
  425. * struct wmi_host_inst_stats_resp
  426. * @iRSSI: Instantaneous RSSI
  427. * @peer_macaddr: peer mac address
  428. * @pdev_id: pdev_id
  429. */
  430. typedef struct {
  431. uint32_t iRSSI;
  432. wmi_host_mac_addr peer_macaddr;
  433. uint32_t pdev_id;
  434. } wmi_host_inst_stats_resp;
  435. typedef struct {
  436. uint32_t software_cal_version;
  437. uint32_t board_cal_version;
  438. /* board_mcn_detail:
  439. * Provide a calibration message string for the host to display.
  440. * Note: on a big-endian host, the 4 bytes within each uint32_t portion
  441. * of a WMI message will be automatically byteswapped by the copy engine
  442. * as the messages are transferred between host and target, to convert
  443. * between the target's little-endianness and the host's big-endianness.
  444. * Consequently, a big-endian host should manually unswap the bytes
  445. * within the board_mcn_detail string buffer to get the bytes back into
  446. * the desired natural order.
  447. */
  448. uint8_t board_mcn_detail[WMI_HOST_BOARD_MCN_STRING_BUF_SIZE];
  449. uint32_t cal_ok; /* filled with CALIBRATION_STATUS enum value */
  450. } wmi_host_pdev_check_cal_version_event;
  451. #ifdef WLAN_SUPPORT_RX_PROTOCOL_TYPE_TAG
  452. /**
  453. * enum wmi_pdev_pkt_routing_op_code_type - packet routing supported opcodes
  454. * @ADD_PKT_ROUTING: Add packet routing command
  455. * @DEL_PKT_ROUTING: Delete packet routing command
  456. *
  457. * Defines supported opcodes for packet routing/tagging
  458. */
  459. enum wmi_pdev_pkt_routing_op_code_type {
  460. ADD_PKT_ROUTING,
  461. DEL_PKT_ROUTING,
  462. };
  463. /**
  464. * enum wmi_pdev_pkt_routing_pkt_type - supported packet types for
  465. * routing & tagging
  466. * @PDEV_PKT_TYPE_ARP_IPV4: Route/Tag for packet type ARP IPv4 (L3)
  467. * @PDEV_PKT_TYPE_NS_IPV6: Route/Tag for packet type NS IPv6 (L3)
  468. * @PDEV_PKT_TYPE_IGMP_IPV4: Route/Tag for packet type IGMP IPv4 (L3)
  469. * @PDEV_PKT_TYPE_MLD_IPV6: Route/Tag for packet type MLD IPv6 (L3)
  470. * @PDEV_PKT_TYPE_DHCP_IPV4: Route/Tag for packet type DHCP IPv4 (APP)
  471. * @PDEV_PKT_TYPE_DHCP_IPV6: Route/Tag for packet type DHCP IPv6 (APP)
  472. * @PDEV_PKT_TYPE_DNS_TCP_IPV4: Route/Tag for packet type TCP DNS IPv4 (APP)
  473. * @PDEV_PKT_TYPE_DNS_TCP_IPV6: Route/Tag for packet type TCP DNS IPv6 (APP)
  474. * @PDEV_PKT_TYPE_DNS_UDP_IPV4: Route/Tag for packet type UDP DNS IPv4 (APP)
  475. * @PDEV_PKT_TYPE_DNS_UDP_IPV6: Route/Tag for packet type UDP DNS IPv6 (APP)
  476. * @PDEV_PKT_TYPE_ICMP_IPV4: Route/Tag for packet type ICMP IPv4 (L3)
  477. * @PDEV_PKT_TYPE_ICMP_IPV6: Route/Tag for packet type ICMP IPv6 (L3)
  478. * @PDEV_PKT_TYPE_TCP_IPV4: Route/Tag for packet type TCP IPv4 (L4)
  479. * @PDEV_PKT_TYPE_TCP_IPV6: Route/Tag for packet type TCP IPv6 (L4)
  480. * @PDEV_PKT_TYPE_UDP_IPV4: Route/Tag for packet type UDP IPv4 (L4)
  481. * @PDEV_PKT_TYPE_UDP_IPV6: Route/Tag for packet type UDP IPv6 (L4)
  482. * @PDEV_PKT_TYPE_IPV4: Route/Tag for packet type IPv4 (L3)
  483. * @PDEV_PKT_TYPE_IPV6: Route/Tag for packet type IPv6 (L3)
  484. * @PDEV_PKT_TYPE_EAP: Route/Tag for packet type EAP (L2)
  485. *
  486. * Defines supported protocol types for routing/tagging
  487. */
  488. enum wmi_pdev_pkt_routing_pkt_type {
  489. PDEV_PKT_TYPE_ARP_IPV4,
  490. PDEV_PKT_TYPE_NS_IPV6,
  491. PDEV_PKT_TYPE_IGMP_IPV4,
  492. PDEV_PKT_TYPE_MLD_IPV6,
  493. PDEV_PKT_TYPE_DHCP_IPV4,
  494. PDEV_PKT_TYPE_DHCP_IPV6,
  495. PDEV_PKT_TYPE_DNS_TCP_IPV4,
  496. PDEV_PKT_TYPE_DNS_TCP_IPV6,
  497. PDEV_PKT_TYPE_DNS_UDP_IPV4,
  498. PDEV_PKT_TYPE_DNS_UDP_IPV6,
  499. PDEV_PKT_TYPE_ICMP_IPV4,
  500. PDEV_PKT_TYPE_ICMP_IPV6,
  501. PDEV_PKT_TYPE_TCP_IPV4,
  502. PDEV_PKT_TYPE_TCP_IPV6,
  503. PDEV_PKT_TYPE_UDP_IPV4,
  504. PDEV_PKT_TYPE_UDP_IPV6,
  505. PDEV_PKT_TYPE_IPV4,
  506. PDEV_PKT_TYPE_IPV6,
  507. PDEV_PKT_TYPE_EAP,
  508. PDEV_PKT_TYPE_MAX
  509. };
  510. /**
  511. * enum wmi_pdev_dest_ring_handler_type - packet routing options post CCE
  512. * tagging
  513. * @PDEV_WIFIRXCCE_USE_CCE_E: Use REO destination ring from CCE
  514. * @PDEV_WIFIRXCCE_USE_ASPT_E: Use REO destination ring from ASPT
  515. * @PDEV_WIFIRXCCE_USE_FT_E: Use REO destination ring from FSE
  516. * @PDEV_WIFIRXCCE_USE_CCE2_E: Use REO destination ring from CCE2
  517. *
  518. * Defines various options for routing policy
  519. */
  520. enum wmi_pdev_dest_ring_handler_type {
  521. PDEV_WIFIRXCCE_USE_CCE_E = 0,
  522. PDEV_WIFIRXCCE_USE_ASPT_E = 1,
  523. PDEV_WIFIRXCCE_USE_FT_E = 2,
  524. PDEV_WIFIRXCCE_USE_CCE2_E = 3,
  525. };
  526. /**
  527. * struct wmi_rx_pkt_protocol_routing_info - RX packet routing/tagging params
  528. * @pdev_id: pdev id
  529. * @op_code: Opcode option from wmi_pdev_pkt_routing_op_code_type enum
  530. * @routing_type_bitmap: Bitmap of protocol that is being configured. Only
  531. * one protocol can be configured in one command. Supported protocol list
  532. * from enum wmi_pdev_pkt_routing_pkt_type
  533. * @dest_ring_handler: Destination ring selection from enum
  534. * wmi_pdev_dest_ring_handler_type
  535. * @dest_ring: Destination ring number to use if dest ring handler is CCE
  536. * @meta_data: Metadata to tag with for given protocol
  537. */
  538. struct wmi_rx_pkt_protocol_routing_info {
  539. uint32_t pdev_id;
  540. enum wmi_pdev_pkt_routing_op_code_type op_code;
  541. uint32_t routing_type_bitmap;
  542. uint32_t dest_ring_handler;
  543. uint32_t dest_ring;
  544. uint32_t meta_data;
  545. };
  546. #endif /* WLAN_SUPPORT_RX_PROTOCOL_TYPE_TAG */
  547. /**
  548. * struct peer_vlan_config_param - peer vlan config command
  549. * @tx_cmd: Tx command
  550. * @rx_cmd: Rx command
  551. * @tx_strip_insert: Strip or Insert vlan in Tx[0:Strip, 1: Insert]
  552. * @tx_strip_insert_inner: Enable tx_strip_insert operation for inner vlan tag.
  553. * @tx_strip_insert_outer: Enable tx_strip_insert operation for outer vlan tag.
  554. * @rx_strip_c_tag: Strip c_tag
  555. * @rx_strip_s_tag: Strip s_tag
  556. * @rx_insert_c_tag: Insert c_tag
  557. * @rx_insert_s_tag: Insert s_tag
  558. *
  559. * @insert_vlan_inner_tci: Vlan inner tci
  560. * @insert_vlan_inner_tci: Vlan outer tci
  561. *
  562. * @vdev_id: vdev id corresponding to peer.
  563. */
  564. struct peer_vlan_config_param {
  565. uint16_t tx_cmd:1,
  566. rx_cmd:1,
  567. tx_strip_insert:1,
  568. tx_strip_insert_inner:1,
  569. tx_strip_insert_outer:1,
  570. rx_strip_c_tag:1,
  571. rx_strip_s_tag:1,
  572. rx_insert_c_tag:1,
  573. rx_insert_s_tag:1;
  574. uint16_t insert_vlan_inner_tci;
  575. uint16_t insert_vlan_outer_tci;
  576. uint8_t vdev_id;
  577. };
  578. /**
  579. * struct fd_params - FD cmd parameter
  580. * @vdev_id: vdev id
  581. * @frame_ctrl: frame control field
  582. * @wbuf: FD buffer
  583. */
  584. struct fd_params {
  585. uint8_t vdev_id;
  586. uint16_t frame_ctrl;
  587. qdf_nbuf_t wbuf;
  588. };
  589. /**
  590. * struct set_qbosst_params - Set QBOOST params
  591. * @vdev_id: vdev id
  592. * @value: value
  593. */
  594. struct set_qboost_params {
  595. uint8_t vdev_id;
  596. uint32_t value;
  597. };
  598. /**
  599. * struct mcast_group_update_param - Mcast group table update to target
  600. * @action: Addition/deletion
  601. * @wildcard: iwldcard table entry?
  602. * @mcast_ip_addr: mcast ip address to be updated
  603. * @mcast_ip_addr_bytes: mcast ip addr bytes
  604. * @nsrcs: number of entries in source list
  605. * @filter_mode: filter mode
  606. * @is_action_delete: is delete
  607. * @is_filter_mode_snoop: is filter mode snoop
  608. * @ucast_mac_addr: ucast peer mac subscribed to mcast ip
  609. * @srcs: source mac accpted
  610. * @mask: mask
  611. * @vap_id: vdev id
  612. * @is_mcast_addr_len: is mcast address length
  613. */
  614. struct mcast_group_update_params {
  615. int action;
  616. int wildcard;
  617. uint8_t *mcast_ip_addr;
  618. int mcast_ip_addr_bytes;
  619. uint8_t nsrcs;
  620. uint8_t filter_mode;
  621. bool is_action_delete;
  622. bool is_filter_mode_snoop;
  623. uint8_t *ucast_mac_addr;
  624. uint8_t *srcs;
  625. uint8_t *mask;
  626. uint8_t vap_id;
  627. bool is_mcast_addr_len;
  628. };
  629. struct pdev_qvit_params {
  630. uint8_t *utf_payload;
  631. uint32_t len;
  632. };
  633. /**
  634. * struct wmi_host_wmeParams - WME params
  635. * @wmep_acm: ACM paramete
  636. * @wmep_aifsn: AIFSN parameters
  637. * @wmep_logcwmin: cwmin in exponential form
  638. * @wmep_logcwmax: cwmax in exponential form
  639. * @wmep_txopLimit: txopLimit
  640. * @wmep_noackPolicy: No-Ack Policy: 0=ack, 1=no-ack
  641. */
  642. struct wmi_host_wmeParams {
  643. u_int8_t wmep_acm;
  644. u_int8_t wmep_aifsn;
  645. u_int8_t wmep_logcwmin;
  646. u_int8_t wmep_logcwmax;
  647. u_int16_t wmep_txopLimit;
  648. u_int8_t wmep_noackPolicy;
  649. };
  650. /**
  651. * struct wmm_update_params - WMM update params
  652. * @wmep_array: WME params for each AC
  653. */
  654. struct wmm_update_params {
  655. struct wmi_host_wmeParams *wmep_array;
  656. };
  657. /**
  658. * struct wmi_host_mgmt_tx_compl_event - TX completion event
  659. * @desc_id: from tx_send_cmd
  660. * @status: WMI_MGMT_TX_COMP_STATUS_TYPE
  661. * @pdev_id: pdev_id
  662. * @ppdu_id: ppdu_id
  663. * @retries_count: retries count
  664. * @tx_tsf: 64 bits completion timestamp
  665. */
  666. typedef struct {
  667. uint32_t desc_id;
  668. uint32_t status;
  669. uint32_t pdev_id;
  670. uint32_t ppdu_id;
  671. uint32_t retries_count;
  672. uint64_t tx_tsf;
  673. } wmi_host_mgmt_tx_compl_event;
  674. /**
  675. * struct wmi_host_chan_info_event - Channel info WMI event
  676. * @pdev_id: pdev_id
  677. * @err_code: Error code
  678. * @freq: Channel freq
  679. * @cmd_flags: Read flags
  680. * @noise_floor: Noise Floor value
  681. * @rx_clear_count: rx clear count
  682. * @cycle_count: cycle count
  683. * @chan_tx_pwr_range: channel tx power per range
  684. * @chan_tx_pwr_tp: channel tx power per throughput
  685. * @rx_frame_count: rx frame count
  686. * @rx_11b_mode_data_duration: 11b mode data duration
  687. * @my_bss_rx_cycle_count: self BSS rx cycle count
  688. * @tx_frame_cnt: tx frame count
  689. * @mac_clk_mhz: mac clock
  690. * @vdev_id: unique id identifying the VDEV
  691. * @tx_frame_count: tx frame count
  692. * @rx_clear_ext20_count: ext20 frame count
  693. * @rx_clear_ext40_count: ext40 frame count
  694. * @rx_clear_ext80_count: ext80 frame count
  695. * @per_chain_noise_floor: Per chain NF value in dBm
  696. */
  697. typedef struct {
  698. uint32_t pdev_id;
  699. uint32_t err_code;
  700. uint32_t freq;
  701. uint32_t cmd_flags;
  702. uint32_t noise_floor;
  703. uint32_t rx_clear_count;
  704. uint32_t cycle_count;
  705. uint32_t chan_tx_pwr_range;
  706. uint32_t chan_tx_pwr_tp;
  707. uint32_t rx_frame_count;
  708. uint32_t rx_11b_mode_data_duration;
  709. uint32_t my_bss_rx_cycle_count;
  710. uint32_t tx_frame_cnt;
  711. uint32_t mac_clk_mhz;
  712. uint32_t vdev_id;
  713. uint32_t tx_frame_count;
  714. uint32_t rx_clear_ext20_count;
  715. uint32_t rx_clear_ext40_count;
  716. uint32_t rx_clear_ext80_count;
  717. uint32_t per_chain_noise_floor[WMI_HOST_MAX_CHAINS];
  718. } wmi_host_chan_info_event;
  719. /**
  720. * struct wmi_host_pdev_channel_hopping_event
  721. * @pdev_id: pdev_id
  722. * @noise_floor_report_iter: Noise threshold iterations with high values
  723. * @noise_floor_total_iter: Total noise threshold iterations
  724. */
  725. typedef struct {
  726. uint32_t pdev_id;
  727. uint32_t noise_floor_report_iter;
  728. uint32_t noise_floor_total_iter;
  729. } wmi_host_pdev_channel_hopping_event;
  730. /**
  731. * struct peer_chan_width_switch_params - Peer channel width capability wrapper
  732. * @num_peers: Total number of peers connected to AP
  733. * @max_peers_per_cmd: Peer limit per WMI command
  734. * @vdev_id: vdev id
  735. * @chan_width_peer_list: List of capabilities for all connected peers
  736. */
  737. struct peer_chan_width_switch_params {
  738. uint32_t num_peers;
  739. uint32_t max_peers_per_cmd;
  740. uint32_t vdev_id;
  741. struct peer_chan_width_switch_info *chan_width_peer_list;
  742. };
  743. /**
  744. * struct wmi_pdev_enable_tx_mode_selection - fw tx mode selection
  745. * @pdev_id: radio id
  746. * @enable_tx_mode_selection: flag to enable tx mode selection
  747. */
  748. struct wmi_pdev_enable_tx_mode_selection {
  749. uint32_t pdev_id;
  750. uint32_t enable_tx_mode_selection;
  751. };
  752. #endif