cdp_txrx_mob_def.h 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599
  1. /*
  2. * Copyright (c) 2016-2021 The Linux Foundation. All rights reserved.
  3. * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
  4. *
  5. * Permission to use, copy, modify, and/or distribute this software for
  6. * any purpose with or without fee is hereby granted, provided that the
  7. * above copyright notice and this permission notice appear in all
  8. * copies.
  9. *
  10. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  11. * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  12. * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
  13. * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  14. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  15. * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  16. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  17. * PERFORMANCE OF THIS SOFTWARE.
  18. */
  19. #ifndef __CDP_TXRX_MOB_DEF_H
  20. #define __CDP_TXRX_MOB_DEF_H
  21. #include <sir_types.h>
  22. #include <htt.h>
  23. #define TX_WMM_AC_NUM 4
  24. #define ENABLE_DP_HIST_STATS
  25. #define DP_MEMORY_OPT
  26. #ifndef CONFIG_BERYLLIUM
  27. #define DP_USE_SINGLE_TCL
  28. #endif
  29. #define DP_RX_DISABLE_NDI_MDNS_FORWARDING
  30. #define OL_TXQ_PAUSE_REASON_FW (1 << 0)
  31. #define OL_TXQ_PAUSE_REASON_PEER_UNAUTHORIZED (1 << 1)
  32. #define OL_TXQ_PAUSE_REASON_TX_ABORT (1 << 2)
  33. #define OL_TXQ_PAUSE_REASON_VDEV_STOP (1 << 3)
  34. #define OL_TXQ_PAUSE_REASON_THERMAL_MITIGATION (1 << 4)
  35. #define OL_TXRX_INVALID_NUM_PEERS (-1)
  36. /* Maximum number of station supported by data path, including BC. */
  37. #define WLAN_MAX_STA_COUNT (HAL_NUM_STA)
  38. /* The symbolic station ID return to HDD to specify the packet is bc/mc */
  39. #define WLAN_RX_BCMC_STA_ID (WLAN_MAX_STA_COUNT + 1)
  40. /* The symbolic station ID return to HDD to specify the packet is
  41. to soft-AP itself */
  42. #define WLAN_RX_SAP_SELF_STA_ID (WLAN_MAX_STA_COUNT + 2)
  43. /* is 802.11 address multicast/broadcast? */
  44. #define IEEE80211_IS_MULTICAST(_a) (*(_a) & 0x01)
  45. #define MAX_PEERS 32
  46. /*
  47. * Bins used for reporting delay histogram:
  48. * bin 0: 0 - 10 ms delay
  49. * bin 1: 10 - 20 ms delay
  50. * bin 2: 20 - 40 ms delay
  51. * bin 3: 40 - 80 ms delay
  52. * bin 4: 80 - 160 ms delay
  53. * bin 5: > 160 ms delay
  54. */
  55. #define QCA_TX_DELAY_HIST_REPORT_BINS 6
  56. /* BA actions */
  57. #define IEEE80211_ACTION_BA_ADDBA_REQUEST 0 /* ADDBA request */
  58. #define IEEE80211_ACTION_BA_ADDBA_RESPONSE 1 /* ADDBA response */
  59. #define IEEE80211_ACTION_BA_DELBA 2 /* DELBA */
  60. #define IEEE80211_BA_POLICY_DELAYED 0
  61. #define IEEE80211_BA_POLICY_IMMEDIATE 1
  62. #define IEEE80211_BA_AMSDU_SUPPORTED 1
  63. /**
  64. * enum netif_action_type - Type of actions on netif queues
  65. * @WLAN_NETIF_ACTION_TYPE_NONE: perform no action
  66. * @WLAN_STOP_ALL_NETIF_QUEUE: stop all netif queues
  67. * @WLAN_START_ALL_NETIF_QUEUE: start all netif queues
  68. * @WLAN_WAKE_ALL_NETIF_QUEUE: wake all netif queues
  69. * @WLAN_STOP_ALL_NETIF_QUEUE_N_CARRIER: stop all queues and off carrier
  70. * @WLAN_START_ALL_NETIF_QUEUE_N_CARRIER: start all queues and on carrier
  71. * @WLAN_NETIF_TX_DISABLE: disable tx
  72. * @WLAN_NETIF_TX_DISABLE_N_CARRIER: disable tx and off carrier
  73. * @WLAN_NETIF_CARRIER_ON: on carrier
  74. * @WLAN_NETIF_CARRIER_OFF: off carrier
  75. * @WLAN_NETIF_PRIORITY_QUEUE_ON: start priority netif queues
  76. * @WLAN_NETIF_PRIORITY_QUEUE_OFF: stop priority netif queues
  77. * @WLAN_NETIF_VO_QUEUE_ON: start voice queue
  78. * @WLAN_NETIF_VO_QUEUE_OFF: stop voice queue
  79. * @WLAN_NETIF_VI_QUEUE_ON: start video queue
  80. * @WLAN_NETIF_VI_QUEUE_OFF: stop video queue
  81. * @WLAN_NETIF_BE_BK_QUEUE_OFF: start best-effort & background queue
  82. * @WLAN_NETIF_BE_BK_QUEUE_ON: stop best-effort & background queue
  83. * @WLAN_WAKE_NON_PRIORITY_QUEUE: wake non priority netif queues
  84. * @WLAN_STOP_NON_PRIORITY_QUEUE: stop non priority netif queues
  85. * @WLAN_NETIF_ACTION_TYPE_MAX: Maximum action
  86. */
  87. enum netif_action_type {
  88. WLAN_NETIF_ACTION_TYPE_NONE = 0,
  89. WLAN_STOP_ALL_NETIF_QUEUE = 1,
  90. WLAN_START_ALL_NETIF_QUEUE = 2,
  91. WLAN_WAKE_ALL_NETIF_QUEUE = 3,
  92. WLAN_STOP_ALL_NETIF_QUEUE_N_CARRIER = 4,
  93. WLAN_START_ALL_NETIF_QUEUE_N_CARRIER = 5,
  94. WLAN_NETIF_TX_DISABLE = 6,
  95. WLAN_NETIF_TX_DISABLE_N_CARRIER = 7,
  96. WLAN_NETIF_CARRIER_ON = 8,
  97. WLAN_NETIF_CARRIER_OFF = 9,
  98. WLAN_NETIF_PRIORITY_QUEUE_ON = 10,
  99. WLAN_NETIF_PRIORITY_QUEUE_OFF = 11,
  100. WLAN_NETIF_VO_QUEUE_ON = 12,
  101. WLAN_NETIF_VO_QUEUE_OFF = 13,
  102. WLAN_NETIF_VI_QUEUE_ON = 14,
  103. WLAN_NETIF_VI_QUEUE_OFF = 15,
  104. WLAN_NETIF_BE_BK_QUEUE_OFF = 16,
  105. WLAN_NETIF_BE_BK_QUEUE_ON = 17,
  106. WLAN_WAKE_NON_PRIORITY_QUEUE = 18,
  107. WLAN_STOP_NON_PRIORITY_QUEUE = 19,
  108. WLAN_NETIF_ACTION_TYPE_MAX,
  109. };
  110. /**
  111. * enum netif_reason_type - reason for netif queue action
  112. * @WLAN_CONTROL_PATH: action from control path
  113. * @WLAN_DATA_FLOW_CONTROL: because of flow control
  114. * @WLAN_FW_PAUSE: because of firmware pause
  115. * @WLAN_TX_ABORT: because of tx abort
  116. * @WLAN_VDEV_STOP: because of vdev stop
  117. * @WLAN_PEER_UNAUTHORISED: because of peer is unauthorised
  118. * @WLAN_THERMAL_MITIGATION: because of thermal mitigation
  119. * @WLAN_DATA_FLOW_CONTROL_PRIORITY:
  120. * @WLAN_DATA_FLOW_CTRL_BE_BK:
  121. * @WLAN_DATA_FLOW_CTRL_VI:
  122. * @WLAN_DATA_FLOW_CTRL_VO:
  123. * @WLAN_DATA_FLOW_CTRL_PRI:
  124. * @WLAN_REASON_TYPE_MAX: maximum reason
  125. */
  126. enum netif_reason_type {
  127. WLAN_CONTROL_PATH = 1,
  128. WLAN_DATA_FLOW_CONTROL,
  129. WLAN_FW_PAUSE,
  130. WLAN_TX_ABORT,
  131. WLAN_VDEV_STOP,
  132. WLAN_PEER_UNAUTHORISED,
  133. WLAN_THERMAL_MITIGATION,
  134. WLAN_DATA_FLOW_CONTROL_PRIORITY,
  135. WLAN_DATA_FLOW_CTRL_BE_BK,
  136. WLAN_DATA_FLOW_CTRL_VI,
  137. WLAN_DATA_FLOW_CTRL_VO,
  138. WLAN_DATA_FLOW_CTRL_PRI,
  139. WLAN_REASON_TYPE_MAX,
  140. };
  141. enum ol_rx_err_type {
  142. OL_RX_ERR_DEFRAG_MIC,
  143. OL_RX_ERR_PN,
  144. OL_RX_ERR_UNKNOWN_PEER,
  145. OL_RX_ERR_MALFORMED,
  146. OL_RX_ERR_TKIP_MIC,
  147. OL_RX_ERR_DECRYPT,
  148. OL_RX_ERR_MPDU_LENGTH,
  149. OL_RX_ERR_ENCRYPT_REQUIRED,
  150. OL_RX_ERR_DUP,
  151. OL_RX_ERR_UNKNOWN,
  152. OL_RX_ERR_FCS,
  153. OL_RX_ERR_PRIVACY,
  154. OL_RX_ERR_NONE_FRAG,
  155. OL_RX_ERR_NONE = 0xFF
  156. };
  157. enum throttle_level {
  158. THROTTLE_LEVEL_0,
  159. THROTTLE_LEVEL_1,
  160. THROTTLE_LEVEL_2,
  161. THROTTLE_LEVEL_3,
  162. THROTTLE_LEVEL_4,
  163. THROTTLE_LEVEL_5,
  164. /* Invalid */
  165. THROTTLE_LEVEL_MAX,
  166. };
  167. enum {
  168. OL_TX_WMM_AC_BE,
  169. OL_TX_WMM_AC_BK,
  170. OL_TX_WMM_AC_VI,
  171. OL_TX_WMM_AC_VO,
  172. OL_TX_NUM_WMM_AC
  173. };
  174. /**
  175. * enum ol_tx_spec - indicate what non-standard transmission actions to apply
  176. * @OL_TX_SPEC_STD: do regular processing
  177. * @OL_TX_SPEC_RAW: skip encap + A-MSDU aggr
  178. * @OL_TX_SPEC_NO_AGGR: skip encap + all aggr
  179. * @OL_TX_SPEC_NO_ENCRYPT: skip encap + encrypt
  180. * @OL_TX_SPEC_TSO: TCP segmented
  181. * @OL_TX_SPEC_NWIFI_NO_ENCRYPT: skip encrypt for nwifi
  182. * @OL_TX_SPEC_NO_FREE: give to cb rather than free
  183. *
  184. * Indicate one or more of the following:
  185. * - The tx frame already has a complete 802.11 header.
  186. * Thus, skip 802.3/native-WiFi to 802.11 header encapsulation and
  187. * A-MSDU aggregation.
  188. * - The tx frame should not be aggregated (A-MPDU or A-MSDU)
  189. * - The tx frame is already encrypted - don't attempt encryption.
  190. * - The tx frame is a segment of a TCP jumbo frame.
  191. * - This tx frame should not be unmapped and freed by the txrx layer
  192. * after transmission, but instead given to a registered tx completion
  193. * callback.
  194. * More than one of these specification can apply, though typically
  195. * only a single specification is applied to a tx frame.
  196. * A compound specification can be created, as a bit-OR of these
  197. * specifications.
  198. */
  199. enum ol_tx_spec {
  200. OL_TX_SPEC_STD = 0x0, /* do regular processing */
  201. OL_TX_SPEC_RAW = 0x1, /* skip encap + A-MSDU aggr */
  202. OL_TX_SPEC_NO_AGGR = 0x2, /* skip encap + all aggr */
  203. OL_TX_SPEC_NO_ENCRYPT = 0x4, /* skip encap + encrypt */
  204. OL_TX_SPEC_TSO = 0x8, /* TCP segmented */
  205. OL_TX_SPEC_NWIFI_NO_ENCRYPT = 0x10, /* skip encrypt for nwifi */
  206. OL_TX_SPEC_NO_FREE = 0x20, /* give to cb rather than free */
  207. };
  208. /**
  209. * enum peer_debug_id_type - debug ids to track peer get_ref and release_ref
  210. * @PEER_DEBUG_ID_OL_INTERNAL: debug id for OL internal usage
  211. * @PEER_DEBUG_ID_WMA_PKT_DROP: debug id for wma_is_pkt_drop_candidate API
  212. * @PEER_DEBUG_ID_WMA_ADDBA_REQ: debug id for ADDBA request
  213. * @PEER_DEBUG_ID_WMA_DELBA_REQ: debug id for DELBA request
  214. * @PEER_DEBUG_ID_LIM_SEND_ADDBA_RESP: debug id for send ADDBA response
  215. * @PEER_DEBUG_ID_OL_RX_THREAD: debug id for rx thread
  216. * @PEER_DEBUG_ID_WMA_CCMP_REPLAY_ATTACK: debug id for CCMP replay
  217. * @PEER_DEBUG_ID_WMA_DEL_BSS:debug id for remove BSS
  218. * @PEER_DEBUG_ID_WMA_VDEV_STOP_RESP:debug id for vdev stop response handler
  219. * @PEER_DEBUG_ID_OL_PEER_MAP:debug id for peer map/unmap
  220. * @PEER_DEBUG_ID_OL_PEER_ATTACH: debug id for peer attach/detach
  221. * @PEER_DEBUG_ID_OL_TXQ_VDEV_FL: debug id for vdev flush
  222. * @PEER_DEBUG_ID_OL_HASH_ERS: debug id for peer find hash erase
  223. * @PEER_DEBUG_ID_OL_UNMAP_TIMER_WORK: debug id for peer unmap timer work
  224. * @PEER_DEBUG_ID_MAX: debug id MAX
  225. *
  226. * Unique peer debug IDs to track the callers. Each new usage can add to
  227. * this enum list to create a new "PEER_DEBUG_ID_".
  228. */
  229. enum peer_debug_id_type {
  230. PEER_DEBUG_ID_OL_INTERNAL,
  231. PEER_DEBUG_ID_WMA_PKT_DROP,
  232. PEER_DEBUG_ID_WMA_ADDBA_REQ,
  233. PEER_DEBUG_ID_WMA_DELBA_REQ,
  234. PEER_DEBUG_ID_LIM_SEND_ADDBA_RESP,
  235. PEER_DEBUG_ID_OL_RX_THREAD,
  236. PEER_DEBUG_ID_WMA_CCMP_REPLAY_ATTACK,
  237. PEER_DEBUG_ID_WMA_DEL_BSS,
  238. PEER_DEBUG_ID_WMA_VDEV_STOP_RESP,
  239. PEER_DEBUG_ID_OL_PEER_MAP,
  240. PEER_DEBUG_ID_OL_PEER_ATTACH,
  241. PEER_DEBUG_ID_OL_TXQ_VDEV_FL,
  242. PEER_DEBUG_ID_OL_HASH_ERS,
  243. PEER_DEBUG_ID_OL_UNMAP_TIMER_WORK,
  244. PEER_DEBUG_ID_MAX
  245. };
  246. /**
  247. * enum cdp_peer_bw - Bandwidth types
  248. * @CDP_20_MHZ: 20MHz BW
  249. * @CDP_40_MHZ: 40MHz BW
  250. * @CDP_80_MHZ: 80MHz BW
  251. * @CDP_160_MHZ: 160MHz BW
  252. * @CDP_80P80_MHZ: 80+80MHz BW
  253. * @CDP_5_MHZ: 5MHz BW
  254. * @CDP_10_MHZ: 10MHz BW
  255. * @CDP_320_MHZ: 320MHz BW
  256. * @CDP_BW_INVALID: Invalid BW
  257. * @CDP_BW_MAX: Max BW id
  258. */
  259. enum cdp_peer_bw {
  260. CDP_20_MHZ,
  261. CDP_40_MHZ,
  262. CDP_80_MHZ,
  263. CDP_160_MHZ,
  264. CDP_80P80_MHZ,
  265. CDP_5_MHZ,
  266. CDP_10_MHZ,
  267. CDP_320_MHZ,
  268. CDP_BW_INVALID,
  269. CDP_BW_MAX
  270. };
  271. /**
  272. * struct ol_txrx_desc_type - txrx descriptor type
  273. * @is_qos_enabled: is station qos enabled
  274. * @is_wapi_supported: is station wapi supported
  275. * @peer_addr: peer mac address
  276. * @bw: bandwidth of peer connection
  277. */
  278. struct ol_txrx_desc_type {
  279. uint8_t is_qos_enabled;
  280. uint8_t is_wapi_supported;
  281. struct qdf_mac_addr peer_addr;
  282. enum cdp_peer_bw bw;
  283. };
  284. /**
  285. * struct ol_tx_sched_wrr_ac_specs_t - the wrr ac specs params structure
  286. * @wrr_skip_weight: map to ol_tx_sched_wrr_adv_category_info_t.specs.
  287. * wrr_skip_weight
  288. * @credit_threshold: map to ol_tx_sched_wrr_adv_category_info_t.specs.
  289. * credit_threshold
  290. * @send_limit: map to ol_tx_sched_wrr_adv_category_info_t.specs.
  291. * send_limit
  292. * @credit_reserve: map to ol_tx_sched_wrr_adv_category_info_t.specs.
  293. * credit_reserve
  294. * @discard_weight: map to ol_tx_sched_wrr_adv_category_info_t.specs.
  295. * discard_weight
  296. *
  297. * This structure is for wrr ac specs params set from user, it will update
  298. * its content corresponding to the ol_tx_sched_wrr_adv_category_info_t.specs.
  299. */
  300. struct ol_tx_sched_wrr_ac_specs_t {
  301. int wrr_skip_weight;
  302. uint32_t credit_threshold;
  303. uint16_t send_limit;
  304. int credit_reserve;
  305. int discard_weight;
  306. };
  307. /**
  308. * struct txrx_pdev_cfg_param_t - configuration information
  309. * passed to the data path
  310. * @is_full_reorder_offload:
  311. * @is_uc_offload_enabled: IPA Micro controller data path offload enable flag
  312. * @uc_tx_buffer_count: IPA Micro controller data path offload TX buffer count
  313. * @uc_tx_buffer_size: IPA Micro controller data path offload TX buffer size
  314. * @uc_rx_indication_ring_count: IPA Micro controller data path offload RX
  315. * indication ring count
  316. * @uc_tx_partition_base: IPA Micro controller data path offload TX partition
  317. * base
  318. * @ip_tcp_udp_checksum_offload: IP, TCP and UDP checksum offload
  319. * @nan_ip_tcp_udp_checksum_offload: IP, TCP and UDP checksum offload for NAN
  320. * Mode
  321. * @p2p_ip_tcp_udp_checksum_offload: IP, TCP and UDP checksum offload for P2P
  322. * Mod
  323. * @legacy_mode_csum_disable: Checksum offload override flag for Legcay modes
  324. * @enable_rxthread: Rx processing in thread from TXRX
  325. * @ce_classify_enabled: CE classification enabled through INI
  326. * @tx_flow_stop_queue_th: Threshold to stop queue in percentage
  327. * @tx_flow_start_queue_offset: Start queue offset in percentage
  328. * @del_ack_enable: enable the tcp delay ack feature in the driver
  329. * @del_ack_timer_value: timeout if no more tcp ack frames, unit is ms
  330. * @del_ack_pkt_count: the maximum number of replaced tcp ack frames
  331. * @ac_specs:
  332. * @gro_enable:
  333. * @tso_enable:
  334. * @lro_enable:
  335. * @sg_enable:
  336. * @enable_data_stall_detection:
  337. * @enable_flow_steering:
  338. * @disable_intra_bss_fwd:
  339. * @bundle_timer_value:
  340. * @bundle_size:
  341. * @pktlog_buffer_size:
  342. */
  343. struct txrx_pdev_cfg_param_t {
  344. uint8_t is_full_reorder_offload;
  345. uint8_t is_uc_offload_enabled;
  346. uint32_t uc_tx_buffer_count;
  347. uint32_t uc_tx_buffer_size;
  348. uint32_t uc_rx_indication_ring_count;
  349. uint32_t uc_tx_partition_base;
  350. bool ip_tcp_udp_checksum_offload;
  351. bool nan_ip_tcp_udp_checksum_offload;
  352. bool p2p_ip_tcp_udp_checksum_offload;
  353. bool legacy_mode_csum_disable;
  354. bool enable_rxthread;
  355. bool ce_classify_enabled;
  356. #if defined(QCA_LL_TX_FLOW_CONTROL_V2) || defined(QCA_LL_PDEV_TX_FLOW_CONTROL)
  357. uint32_t tx_flow_stop_queue_th;
  358. uint32_t tx_flow_start_queue_offset;
  359. #endif
  360. #ifdef QCA_SUPPORT_TXRX_DRIVER_TCP_DEL_ACK
  361. bool del_ack_enable;
  362. uint16_t del_ack_timer_value;
  363. uint16_t del_ack_pkt_count;
  364. #endif
  365. struct ol_tx_sched_wrr_ac_specs_t ac_specs[TX_WMM_AC_NUM];
  366. bool gro_enable;
  367. bool tso_enable;
  368. bool lro_enable;
  369. bool sg_enable;
  370. uint32_t enable_data_stall_detection;
  371. bool enable_flow_steering;
  372. bool disable_intra_bss_fwd;
  373. #ifdef WLAN_SUPPORT_TXRX_HL_BUNDLE
  374. uint16_t bundle_timer_value;
  375. uint16_t bundle_size;
  376. #endif
  377. uint8_t pktlog_buffer_size;
  378. };
  379. #ifdef IPA_OFFLOAD
  380. /**
  381. * struct ol_txrx_ipa_resources - Resources needed for IPA
  382. * @ce_sr:
  383. * @ce_sr_ring_size:
  384. * @ce_reg_paddr:
  385. * @tx_comp_ring:
  386. * @tx_num_alloc_buffer:
  387. * @rx_rdy_ring:
  388. * @rx_proc_done_idx:
  389. * @rx2_rdy_ring:
  390. * @rx2_proc_done_idx:
  391. * @tx_comp_doorbell_dmaaddr: IPA UC Tx Complete doorbell register paddr
  392. * @rx_ready_doorbell_dmaaddr: IPA UC Rx Ready doorbell register paddr
  393. * @tx_pipe_handle:
  394. * @rx_pipe_handle:
  395. */
  396. struct ol_txrx_ipa_resources {
  397. qdf_shared_mem_t *ce_sr;
  398. uint32_t ce_sr_ring_size;
  399. qdf_dma_addr_t ce_reg_paddr;
  400. qdf_shared_mem_t *tx_comp_ring;
  401. uint32_t tx_num_alloc_buffer;
  402. qdf_shared_mem_t *rx_rdy_ring;
  403. qdf_shared_mem_t *rx_proc_done_idx;
  404. qdf_shared_mem_t *rx2_rdy_ring;
  405. qdf_shared_mem_t *rx2_proc_done_idx;
  406. /* IPA UC doorbell registers paddr */
  407. qdf_dma_addr_t tx_comp_doorbell_dmaaddr;
  408. qdf_dma_addr_t rx_ready_doorbell_dmaaddr;
  409. uint32_t tx_pipe_handle;
  410. uint32_t rx_pipe_handle;
  411. };
  412. #endif
  413. struct ol_txrx_ocb_chan_info {
  414. uint32_t chan_freq;
  415. uint16_t disable_rx_stats_hdr:1;
  416. };
  417. /**
  418. * struct ol_mic_error_info - carries the information associated with
  419. * a MIC error
  420. * @vdev_id: virtual device ID
  421. * @key_id: Key ID
  422. * @pn: packet number
  423. * @sa: source address
  424. * @da: destination address
  425. * @ta: transmitter address
  426. */
  427. struct ol_mic_error_info {
  428. uint8_t vdev_id;
  429. uint32_t key_id;
  430. uint64_t pn;
  431. uint8_t sa[QDF_MAC_ADDR_SIZE];
  432. uint8_t da[QDF_MAC_ADDR_SIZE];
  433. uint8_t ta[QDF_MAC_ADDR_SIZE];
  434. };
  435. /**
  436. * struct ol_error_info - carries the information associated with an
  437. * error indicated by the firmware
  438. * @u: union of error information structs
  439. * @u.mic_err: MIC error information
  440. */
  441. struct ol_error_info {
  442. union {
  443. struct ol_mic_error_info mic_err;
  444. } u;
  445. };
  446. /**
  447. * struct ol_txrx_ocb_set_chan - txrx OCB channel info
  448. * @ocb_channel_count: Channel count
  449. * @ocb_channel_info: OCB channel info
  450. */
  451. struct ol_txrx_ocb_set_chan {
  452. uint32_t ocb_channel_count;
  453. struct ol_txrx_ocb_chan_info *ocb_channel_info;
  454. };
  455. /**
  456. * struct ol_tx_ac_param_t - WMM parameters
  457. * @aifs: Arbitration Inter-Frame Space
  458. * @cwmin: Minimum contention window size
  459. * @cwmax: Maximum contention window size
  460. *
  461. * The struct is used to specify information to update TX WMM scheduler.
  462. */
  463. struct ol_tx_ac_param_t {
  464. uint32_t aifs;
  465. uint32_t cwmin;
  466. uint32_t cwmax;
  467. };
  468. struct ol_tx_wmm_param_t {
  469. struct ol_tx_ac_param_t ac[OL_TX_NUM_WMM_AC];
  470. };
  471. struct ieee80211_ba_parameterset {
  472. #if _BYTE_ORDER == _BIG_ENDIAN
  473. uint16_t buffersize:10, /* B6-15 buffer size */
  474. tid:4, /* B2-5 TID */
  475. bapolicy:1, /* B1 block ack policy */
  476. amsdusupported:1; /* B0 amsdu supported */
  477. #else
  478. uint16_t amsdusupported:1, /* B0 amsdu supported */
  479. bapolicy:1, /* B1 block ack policy */
  480. tid:4, /* B2-5 TID */
  481. buffersize:10; /* B6-15 buffer size */
  482. #endif
  483. } __packed;
  484. struct ieee80211_ba_seqctrl {
  485. #if _BYTE_ORDER == _BIG_ENDIAN
  486. uint16_t startseqnum:12, /* B4-15 starting sequence number */
  487. fragnum:4; /* B0-3 fragment number */
  488. #else
  489. uint16_t fragnum:4, /* B0-3 fragment number */
  490. startseqnum:12; /* B4-15 starting sequence number */
  491. #endif
  492. } __packed;
  493. struct ieee80211_delba_parameterset {
  494. #if _BYTE_ORDER == _BIG_ENDIAN
  495. uint16_t tid:4, /* B12-15 tid */
  496. initiator:1, /* B11 initiator */
  497. reserved0:11; /* B0-10 reserved */
  498. #else
  499. uint16_t reserved0:11, /* B0-10 reserved */
  500. initiator:1, /* B11 initiator */
  501. tid:4; /* B12-15 tid */
  502. #endif
  503. } __packed;
  504. /**
  505. * typedef ol_txrx_vdev_peer_remove_cb() - wma_remove_peer callback
  506. * @handle: callback handle
  507. * @bssid: BSSID
  508. * @vdev_id: virtual device ID
  509. * @peer: peer
  510. */
  511. typedef void (*ol_txrx_vdev_peer_remove_cb)(void *handle, uint8_t *bssid,
  512. uint8_t vdev_id, void *peer);
  513. /**
  514. * typedef tx_pause_callback() - OSIF function registered with the data path
  515. * @vdev_id: virtual device id
  516. * @action: tx pause action to take
  517. * @reason: reason for the tx pause action
  518. */
  519. typedef void (*tx_pause_callback)(uint8_t vdev_id,
  520. enum netif_action_type action,
  521. enum netif_reason_type reason);
  522. /**
  523. * struct ol_rx_inv_peer_params - rx invalid peer data parameters
  524. * @vdev_id: Virtual device ID
  525. * @ra: RX data receiver MAC address
  526. * @ta: RX data transmitter MAC address
  527. */
  528. struct ol_rx_inv_peer_params {
  529. uint8_t vdev_id;
  530. uint8_t ra[QDF_MAC_ADDR_SIZE];
  531. uint8_t ta[QDF_MAC_ADDR_SIZE];
  532. };
  533. /**
  534. * struct cdp_txrx_ext_stats: dp extended stats
  535. * @tx_msdu_enqueue: tx msdu queued to hw
  536. * @tx_msdu_overflow: tx msdu overflow
  537. * @rx_mpdu_received: rx mpdu processed by hw
  538. * @rx_mpdu_delivered: rx mpdu received from hw
  539. * @rx_mpdu_error: rx mpdu error count
  540. * @rx_mpdu_missed: rx mpdu missed by hw
  541. */
  542. struct cdp_txrx_ext_stats {
  543. uint32_t tx_msdu_enqueue;
  544. uint32_t tx_msdu_overflow;
  545. uint32_t rx_mpdu_received;
  546. uint32_t rx_mpdu_delivered;
  547. uint32_t rx_mpdu_error;
  548. uint32_t rx_mpdu_missed;
  549. };
  550. #endif /* __CDP_TXRX_MOB_DEF_H */