cdp_txrx_stats_struct.h 37 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252
  1. /*
  2. * Copyright (c) 2016-2018 The Linux Foundation. All rights reserved.
  3. *
  4. * Permission to use, copy, modify, and/or distribute this software for
  5. * any purpose with or without fee is hereby granted, provided that the
  6. * above copyright notice and this permission notice appear in all
  7. * copies.
  8. *
  9. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  10. * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  11. * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
  12. * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  13. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  14. * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  15. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  16. * PERFORMANCE OF THIS SOFTWARE.
  17. */
  18. /**
  19. * @file cdp_txrx_stats_struct.h
  20. * @brief Define the host data path stats API functions
  21. * called by the host control SW and the OS interface module
  22. */
  23. #ifndef _CDP_TXRX_STATS_STRUCT_H_
  24. #define _CDP_TXRX_STATS_STRUCT_H_
  25. #ifndef CONFIG_WIN
  26. #include <wlan_defs.h>
  27. #endif
  28. #define TXRX_STATS_LEVEL_OFF 0
  29. #define TXRX_STATS_LEVEL_BASIC 1
  30. #define TXRX_STATS_LEVEL_FULL 2
  31. #define BSS_CHAN_INFO_READ 1
  32. #define BSS_CHAN_INFO_READ_AND_CLEAR 2
  33. #define TX_FRAME_TYPE_DATA 0
  34. #define TX_FRAME_TYPE_MGMT 1
  35. #define TX_FRAME_TYPE_BEACON 2
  36. #ifndef TXRX_STATS_LEVEL
  37. #define TXRX_STATS_LEVEL TXRX_STATS_LEVEL_BASIC
  38. #endif
  39. /* 1 additional MCS is for invalid values */
  40. #define MAX_MCS (12 + 1)
  41. #define MAX_MCS_11A 8
  42. #define MAX_MCS_11B 7
  43. #define MAX_MCS_11AC 12
  44. /* 1 additional GI is for invalid values */
  45. #define MAX_GI (4 + 1)
  46. #define SS_COUNT 8
  47. #define MAX_BW 7
  48. #define MAX_RECEPTION_TYPES 4
  49. /* WME stream classes */
  50. #define WME_AC_BE 0 /* best effort */
  51. #define WME_AC_BK 1 /* background */
  52. #define WME_AC_VI 2 /* video */
  53. #define WME_AC_VO 3 /* voice */
  54. #define WME_AC_MAX 4 /* MAX AC Value */
  55. #define CDP_MAX_RX_RINGS 4
  56. /*
  57. * Number of TLVs sent by FW. Needs to reflect
  58. * HTT_PPDU_STATS_MAX_TAG declared in FW
  59. */
  60. #define CDP_PPDU_STATS_MAX_TAG 14
  61. /* Different Packet Types */
  62. enum cdp_packet_type {
  63. DOT11_A = 0,
  64. DOT11_B = 1,
  65. DOT11_N = 2,
  66. DOT11_AC = 3,
  67. DOT11_AX = 4,
  68. DOT11_MAX = 5,
  69. };
  70. /* packet info */
  71. struct cdp_pkt_info {
  72. /*no of packets*/
  73. uint32_t num;
  74. /* total no of bytes */
  75. uint64_t bytes;
  76. };
  77. /* Tx Stats */
  78. struct cdp_tx_stats {
  79. /* Pkt Info for which completions were received */
  80. struct cdp_pkt_info comp_pkt;
  81. /* Unicast Packet Count */
  82. struct cdp_pkt_info ucast;
  83. /* Multicast Packet Count */
  84. struct cdp_pkt_info mcast;
  85. /* Broadcast Packet Count*/
  86. struct cdp_pkt_info bcast;
  87. /*NAWDS Multicast Packet Count */
  88. struct cdp_pkt_info nawds_mcast;
  89. /*NAWDS Multicast Drop Count */
  90. uint32_t nawds_mcast_drop;
  91. /* Successful Tx Packets */
  92. struct cdp_pkt_info tx_success;
  93. /* Total Tx failure */
  94. uint32_t tx_failed;
  95. /* Total Packets as ofdma*/
  96. uint32_t ofdma;
  97. /* Packets in STBC */
  98. uint32_t stbc;
  99. /* Packets in LDPC */
  100. uint32_t ldpc;
  101. /* Packet retries */
  102. uint32_t retries;
  103. /* Number of MSDUs with no MSDU level aggregation */
  104. uint32_t non_amsdu_cnt;
  105. /* Number of MSDUs part of AMSDU*/
  106. uint32_t amsdu_cnt;
  107. /* Tx Rate */
  108. uint32_t tx_rate;
  109. /* RSSI of last packet */
  110. uint32_t last_ack_rssi;
  111. /* Packet Type */
  112. struct {
  113. /* MCS Count */
  114. uint32_t mcs_count[MAX_MCS];
  115. } pkt_type[DOT11_MAX];
  116. /* SGI count */
  117. uint32_t sgi_count[MAX_GI];
  118. /* Packet count for different num_spatial_stream values */
  119. uint32_t nss[SS_COUNT];
  120. /* Packet Count for different bandwidths */
  121. uint32_t bw[MAX_BW];
  122. /* Wireless Multimedia type Count */
  123. uint32_t wme_ac_type[WME_AC_MAX];
  124. /* Wireless Multimedia type Count */
  125. uint32_t excess_retries_per_ac[WME_AC_MAX];
  126. /* Packets dropped on the Tx side */
  127. struct {
  128. /* Discarded by firmware */
  129. uint32_t fw_rem;
  130. /* firmware_discard_untransmitted */
  131. uint32_t fw_rem_notx;
  132. /* firmware_discard_transmitted */
  133. uint32_t fw_rem_tx;
  134. /* aged out in mpdu/msdu queues*/
  135. uint32_t age_out;
  136. /* discarded by firmware reason 1 */
  137. uint32_t fw_reason1;
  138. /* discarded by firmware reason 2 */
  139. uint32_t fw_reason2;
  140. /* discarded by firmware reason 3 */
  141. uint32_t fw_reason3;
  142. } dropped;
  143. };
  144. /* Rx Level Stats */
  145. struct cdp_rx_stats {
  146. /* Total packets sent up the stack */
  147. struct cdp_pkt_info to_stack;
  148. /* Packets received on the reo ring */
  149. struct cdp_pkt_info rcvd_reo[CDP_MAX_RX_RINGS];
  150. /* Total unicast packets */
  151. struct cdp_pkt_info unicast;
  152. /* Total multicast packets */
  153. struct cdp_pkt_info multicast;
  154. /* Broadcast Packet Count*/
  155. struct cdp_pkt_info bcast;
  156. /* Raw Pakets received */
  157. struct cdp_pkt_info raw;
  158. /* Total multicast packets */
  159. uint32_t nawds_mcast_drop;
  160. struct {
  161. /* Intra BSS packets received */
  162. struct cdp_pkt_info pkts;
  163. struct cdp_pkt_info fail;
  164. } intra_bss;
  165. /* Errors */
  166. struct {
  167. /* Rx MIC errors */
  168. uint32_t mic_err;
  169. /* Rx Decryption Errors */
  170. uint32_t decrypt_err;
  171. } err;
  172. /* Wireless Multimedia type Count */
  173. uint32_t wme_ac_type[WME_AC_MAX];
  174. /* Reception type os packets */
  175. uint32_t reception_type[MAX_RECEPTION_TYPES];
  176. /* Packet Type */
  177. struct {
  178. /* MCS Count */
  179. uint32_t mcs_count[MAX_MCS];
  180. } pkt_type[DOT11_MAX];
  181. /* SGI count */
  182. uint32_t sgi_count[MAX_GI];
  183. /* Packet count in spatiel Streams */
  184. uint32_t nss[SS_COUNT];
  185. /* Packet Count in different bandwidths */
  186. uint32_t bw[MAX_BW];
  187. /* Number of MSDUs with no MPDU level aggregation */
  188. uint32_t non_ampdu_cnt;
  189. /* Number of MSDUs part of AMSPU */
  190. uint32_t ampdu_cnt;
  191. /* Number of MSDUs with no MSDU level aggregation */
  192. uint32_t non_amsdu_cnt;
  193. /* Number of MSDUs part of AMSDU*/
  194. uint32_t amsdu_cnt;
  195. /* Number of bar received */
  196. uint32_t bar_recv_cnt;
  197. /* RSSI of received signal */
  198. uint32_t rssi;
  199. /*Rx rate */
  200. uint32_t rx_rate;
  201. };
  202. /* Tx ingress Stats */
  203. struct cdp_tx_ingress_stats {
  204. /* Total packets received for transmission */
  205. struct cdp_pkt_info rcvd;
  206. /* Tx packets processed*/
  207. struct cdp_pkt_info processed;
  208. /* Total packets passed Reinject handler */
  209. struct cdp_pkt_info reinject_pkts;
  210. /* Total packets passed to inspect handler */
  211. struct cdp_pkt_info inspect_pkts;
  212. /*NAWDS Multicast Packet Count */
  213. struct cdp_pkt_info nawds_mcast;
  214. /* Number of broadcast packets */
  215. struct cdp_pkt_info bcast;
  216. struct {
  217. /* Total Raw packets */
  218. struct cdp_pkt_info raw_pkt;
  219. /* DMA map error */
  220. uint32_t dma_map_error;
  221. } raw;
  222. /* TSO packets info */
  223. struct {
  224. /* No of segments in TSO packets */
  225. uint32_t num_seg;
  226. /* total no of TSO packets */
  227. struct cdp_pkt_info tso_pkt;
  228. /* TSO packets dropped by host */
  229. uint32_t dropped_host;
  230. /* TSO packets dropped by target */
  231. uint32_t dropped_target;
  232. } tso;
  233. /* Scatter Gather packet info */
  234. struct {
  235. /* Total scatter gather packets */
  236. struct cdp_pkt_info sg_pkt;
  237. /* SG packets dropped by host */
  238. uint32_t dropped_host;
  239. /* SG packets dropped by target */
  240. uint32_t dropped_target;
  241. /* Dma map error */
  242. uint32_t dma_map_error;
  243. } sg;
  244. /* Multicast Enhancement packets info */
  245. struct {
  246. /* total no of multicast conversion packets */
  247. struct cdp_pkt_info mcast_pkt;
  248. /* packets dropped due to map error */
  249. uint32_t dropped_map_error;
  250. /* packets dropped due to self Mac address */
  251. uint32_t dropped_self_mac;
  252. /* Packets dropped due to send fail */
  253. uint32_t dropped_send_fail;
  254. /* total unicast packets transmitted */
  255. uint32_t ucast;
  256. /* Segment allocation failure */
  257. uint32_t fail_seg_alloc;
  258. /* NBUF clone failure */
  259. uint32_t clone_fail;
  260. } mcast_en;
  261. /* Packets dropped on the Tx side */
  262. struct {
  263. /* Total scatter gather packets */
  264. struct cdp_pkt_info dropped_pkt;
  265. /* Desc Not Available */
  266. uint32_t desc_na;
  267. /* Ring Full */
  268. uint32_t ring_full;
  269. /* Hwenqueue failed */
  270. uint32_t enqueue_fail;
  271. /* DMA failed */
  272. uint32_t dma_error;
  273. /* Resource Full: Congestion Control */
  274. uint32_t res_full;
  275. } dropped;
  276. /* Mesh packets info */
  277. struct {
  278. /* packets sent to fw */
  279. uint32_t exception_fw;
  280. /* packets completions received from fw */
  281. uint32_t completion_fw;
  282. } mesh;
  283. /*Number of packets classified by CCE*/
  284. uint32_t cce_classified;
  285. /*Number of raw packets classified by CCE*/
  286. uint32_t cce_classified_raw;
  287. };
  288. struct cdp_vdev_stats {
  289. /* Tx ingress stats */
  290. struct cdp_tx_ingress_stats tx_i;
  291. /* CDP Tx Stats */
  292. struct cdp_tx_stats tx;
  293. /* CDP Rx Stats */
  294. struct cdp_rx_stats rx;
  295. };
  296. struct cdp_peer_stats {
  297. /* CDP Tx Stats */
  298. struct cdp_tx_stats tx;
  299. /* CDP Rx Stats */
  300. struct cdp_rx_stats rx;
  301. };
  302. /* Tx completions per interrupt */
  303. struct cdp_hist_tx_comp {
  304. uint32_t pkts_1;
  305. uint32_t pkts_2_20;
  306. uint32_t pkts_21_40;
  307. uint32_t pkts_41_60;
  308. uint32_t pkts_61_80;
  309. uint32_t pkts_81_100;
  310. uint32_t pkts_101_200;
  311. uint32_t pkts_201_plus;
  312. };
  313. /* Rx ring descriptors reaped per interrupt */
  314. struct cdp_hist_rx_ind {
  315. uint32_t pkts_1;
  316. uint32_t pkts_2_20;
  317. uint32_t pkts_21_40;
  318. uint32_t pkts_41_60;
  319. uint32_t pkts_61_80;
  320. uint32_t pkts_81_100;
  321. uint32_t pkts_101_200;
  322. uint32_t pkts_201_plus;
  323. };
  324. struct cdp_htt_tlv_hdr {
  325. /* BIT [11 : 0] :- tag
  326. * BIT [23 : 12] :- length
  327. * BIT [31 : 24] :- reserved
  328. */
  329. uint32_t tag__length;
  330. };
  331. #define HTT_STATS_SUBTYPE_MAX 16
  332. struct cdp_htt_rx_pdev_fw_stats_tlv {
  333. struct cdp_htt_tlv_hdr tlv_hdr;
  334. /* BIT [ 7 : 0] :- mac_id
  335. * BIT [31 : 8] :- reserved
  336. */
  337. uint32_t mac_id__word;
  338. /* Num PPDU status processed from HW */
  339. uint32_t ppdu_recvd;
  340. /* Num MPDU across PPDUs with FCS ok */
  341. uint32_t mpdu_cnt_fcs_ok;
  342. /* Num MPDU across PPDUs with FCS err */
  343. uint32_t mpdu_cnt_fcs_err;
  344. /* Num MSDU across PPDUs */
  345. uint32_t tcp_msdu_cnt;
  346. /* Num MSDU across PPDUs */
  347. uint32_t tcp_ack_msdu_cnt;
  348. /* Num MSDU across PPDUs */
  349. uint32_t udp_msdu_cnt;
  350. /* Num MSDU across PPDUs */
  351. uint32_t other_msdu_cnt;
  352. /* Num MPDU on FW ring indicated */
  353. uint32_t fw_ring_mpdu_ind;
  354. /* Num MGMT MPDU given to protocol */
  355. uint32_t fw_ring_mgmt_subtype[HTT_STATS_SUBTYPE_MAX];
  356. /* Num ctrl MPDU given to protocol */
  357. uint32_t fw_ring_ctrl_subtype[HTT_STATS_SUBTYPE_MAX];
  358. /* Num mcast data packet received */
  359. uint32_t fw_ring_mcast_data_msdu;
  360. /* Num broadcast data packet received */
  361. uint32_t fw_ring_bcast_data_msdu;
  362. /* Num unicat data packet received */
  363. uint32_t fw_ring_ucast_data_msdu;
  364. /* Num null data packet received */
  365. uint32_t fw_ring_null_data_msdu;
  366. /* Num MPDU on FW ring dropped */
  367. uint32_t fw_ring_mpdu_drop;
  368. /* Num buf indication to offload */
  369. uint32_t ofld_local_data_ind_cnt;
  370. /* Num buf recycle from offload */
  371. uint32_t ofld_local_data_buf_recycle_cnt;
  372. /* Num buf indication to data_rx */
  373. uint32_t drx_local_data_ind_cnt;
  374. /* Num buf recycle from data_rx */
  375. uint32_t drx_local_data_buf_recycle_cnt;
  376. /* Num buf indication to protocol */
  377. uint32_t local_nondata_ind_cnt;
  378. /* Num buf recycle from protocol */
  379. uint32_t local_nondata_buf_recycle_cnt;
  380. /* Num buf fed */
  381. uint32_t fw_status_buf_ring_refill_cnt;
  382. /* Num ring empty encountered */
  383. uint32_t fw_status_buf_ring_empty_cnt;
  384. /* Num buf fed */
  385. uint32_t fw_pkt_buf_ring_refill_cnt;
  386. /* Num ring empty encountered */
  387. uint32_t fw_pkt_buf_ring_empty_cnt;
  388. /* Num buf fed */
  389. uint32_t fw_link_buf_ring_refill_cnt;
  390. /* Num ring empty encountered */
  391. uint32_t fw_link_buf_ring_empty_cnt;
  392. /* Num buf fed */
  393. uint32_t host_pkt_buf_ring_refill_cnt;
  394. /* Num ring empty encountered */
  395. uint32_t host_pkt_buf_ring_empty_cnt;
  396. /* Num buf fed */
  397. uint32_t mon_pkt_buf_ring_refill_cnt;
  398. /* Num ring empty encountered */
  399. uint32_t mon_pkt_buf_ring_empty_cnt;
  400. /* Num buf fed */
  401. uint32_t mon_status_buf_ring_refill_cnt;
  402. /* Num ring empty encountered */
  403. uint32_t mon_status_buf_ring_empty_cnt;
  404. /* Num buf fed */
  405. uint32_t mon_desc_buf_ring_refill_cnt;
  406. /* Num ring empty encountered */
  407. uint32_t mon_desc_buf_ring_empty_cnt;
  408. /* Num buf fed */
  409. uint32_t mon_dest_ring_update_cnt;
  410. /* Num ring full encountered */
  411. uint32_t mon_dest_ring_full_cnt;
  412. /* Num rx suspend is attempted */
  413. uint32_t rx_suspend_cnt;
  414. /* Num rx suspend failed */
  415. uint32_t rx_suspend_fail_cnt;
  416. /* Num rx resume attempted */
  417. uint32_t rx_resume_cnt;
  418. /* Num rx resume failed */
  419. uint32_t rx_resume_fail_cnt;
  420. /* Num rx ring switch */
  421. uint32_t rx_ring_switch_cnt;
  422. /* Num rx ring restore */
  423. uint32_t rx_ring_restore_cnt;
  424. /* Num rx flush issued */
  425. uint32_t rx_flush_cnt;
  426. };
  427. /* == TX PDEV STATS == */
  428. struct cdp_htt_tx_pdev_stats_cmn_tlv {
  429. struct cdp_htt_tlv_hdr tlv_hdr;
  430. /* BIT [ 7 : 0] :- mac_id
  431. * BIT [31 : 8] :- reserved
  432. */
  433. uint32_t mac_id__word;
  434. /* Num queued to HW */
  435. uint32_t hw_queued;
  436. /* Num PPDU reaped from HW */
  437. uint32_t hw_reaped;
  438. /* Num underruns */
  439. uint32_t underrun;
  440. /* Num HW Paused counter. */
  441. uint32_t hw_paused;
  442. /* Num HW flush counter. */
  443. uint32_t hw_flush;
  444. /* Num HW filtered counter. */
  445. uint32_t hw_filt;
  446. /* Num PPDUs cleaned up in TX abort */
  447. uint32_t tx_abort;
  448. /* Num MPDUs requed by SW */
  449. uint32_t mpdu_requed;
  450. /* excessive retries */
  451. uint32_t tx_xretry;
  452. /* Last used data hw rate code */
  453. uint32_t data_rc;
  454. /* frames dropped due to excessive sw retries */
  455. uint32_t mpdu_dropped_xretry;
  456. /* illegal rate phy errors */
  457. uint32_t illgl_rate_phy_err;
  458. /* wal pdev continuous xretry */
  459. uint32_t cont_xretry;
  460. /* wal pdev continuous xretry */
  461. uint32_t tx_timeout;
  462. /* wal pdev resets */
  463. uint32_t pdev_resets;
  464. /* PhY/BB underrun */
  465. uint32_t phy_underrun;
  466. /* MPDU is more than txop limit */
  467. uint32_t txop_ovf;
  468. /* Number of Sequences posted */
  469. uint32_t seq_posted;
  470. /* Number of Sequences failed queueing */
  471. uint32_t seq_failed_queueing;
  472. /* Number of Sequences completed */
  473. uint32_t seq_completed;
  474. /* Number of Sequences restarted */
  475. uint32_t seq_restarted;
  476. /* Number of MU Sequences posted */
  477. uint32_t mu_seq_posted;
  478. /* Number of time HW ring is paused between seq switch within ISR */
  479. uint32_t seq_switch_hw_paused;
  480. /* Number of times seq continuation in DSR */
  481. uint32_t next_seq_posted_dsr;
  482. /* Number of times seq continuation in ISR */
  483. uint32_t seq_posted_isr;
  484. /* Number of seq_ctrl cached. */
  485. uint32_t seq_ctrl_cached;
  486. /* Number of MPDUs successfully transmitted */
  487. uint32_t mpdu_count_tqm;
  488. /* Number of MSDUs successfully transmitted */
  489. uint32_t msdu_count_tqm;
  490. /* Number of MPDUs dropped */
  491. uint32_t mpdu_removed_tqm;
  492. /* Number of MSDUs dropped */
  493. uint32_t msdu_removed_tqm;
  494. /* Num MPDUs flushed by SW, HWPAUSED, SW TXABORT (Reset,channel change) */
  495. uint32_t mpdus_sw_flush;
  496. /* Num MPDUs filtered by HW, all filter condition (TTL expired) */
  497. uint32_t mpdus_hw_filter;
  498. /* Num MPDUs truncated by PDG (TXOP, TBTT, PPDU_duration based on rate, dyn_bw) */
  499. uint32_t mpdus_truncated;
  500. /* Num MPDUs that was tried but didn't receive ACK or BA */
  501. uint32_t mpdus_ack_failed;
  502. /* Num MPDUs that was dropped due to expiry (MSDU TTL). */
  503. uint32_t mpdus_expired;
  504. /* Num MPDUs that was retried within seq_ctrl (MGMT/LEGACY) */
  505. uint32_t mpdus_seq_hw_retry;
  506. /* Num of TQM acked cmds processed */
  507. uint32_t ack_tlv_proc;
  508. /* coex_abort_mpdu_cnt valid. */
  509. uint32_t coex_abort_mpdu_cnt_valid;
  510. /* coex_abort_mpdu_cnt from TX FES stats. */
  511. uint32_t coex_abort_mpdu_cnt;
  512. /* Number of total PPDUs(DATA, MGMT, excludes selfgen) tried over the air (OTA) */
  513. uint32_t num_total_ppdus_tried_ota;
  514. /* Number of data PPDUs tried over the air (OTA) */
  515. uint32_t num_data_ppdus_tried_ota;
  516. /* Num Local control/mgmt frames (MSDUs) queued */
  517. uint32_t local_ctrl_mgmt_enqued;
  518. /* local_ctrl_mgmt_freed:
  519. * Num Local control/mgmt frames (MSDUs) done
  520. * It includes all local ctrl/mgmt completions
  521. * (acked, no ack, flush, TTL, etc)
  522. */
  523. uint32_t local_ctrl_mgmt_freed;
  524. /* Num Local data frames (MSDUs) queued */
  525. uint32_t local_data_enqued;
  526. /* local_data_freed:
  527. * Num Local data frames (MSDUs) done
  528. * It includes all local data completions
  529. * (acked, no ack, flush, TTL, etc)
  530. */
  531. uint32_t local_data_freed;
  532. };
  533. struct cdp_htt_tx_pdev_stats_urrn_tlv_v {
  534. struct cdp_htt_tlv_hdr tlv_hdr;
  535. uint32_t urrn_stats[1]; /* HTT_TX_PDEV_MAX_URRN_STATS */
  536. };
  537. /* NOTE: Variable length TLV, use length spec to infer array size */
  538. struct cdp_htt_tx_pdev_stats_flush_tlv_v {
  539. struct cdp_htt_tlv_hdr tlv_hdr;
  540. uint32_t flush_errs[1]; /* HTT_TX_PDEV_MAX_FLUSH_REASON_STATS */
  541. };
  542. /* NOTE: Variable length TLV, use length spec to infer array size */
  543. struct cdp_htt_tx_pdev_stats_sifs_tlv_v {
  544. struct cdp_htt_tlv_hdr tlv_hdr;
  545. uint32_t sifs_status[1]; /* HTT_TX_PDEV_MAX_SIFS_BURST_STATS */
  546. };
  547. /* NOTE: Variable length TLV, use length spec to infer array size */
  548. struct cdp_htt_tx_pdev_stats_phy_err_tlv_v {
  549. struct cdp_htt_tlv_hdr tlv_hdr;
  550. uint32_t phy_errs[1]; /* HTT_TX_PDEV_MAX_PHY_ERR_STATS */
  551. };
  552. /* == RX PDEV/SOC STATS == */
  553. /* HTT_STATS_RX_SOC_FW_STATS_TAG */
  554. struct cdp_htt_rx_soc_fw_stats_tlv {
  555. struct cdp_htt_tlv_hdr tlv_hdr;
  556. /* Num Packets received on REO FW ring */
  557. uint32_t fw_reo_ring_data_msdu;
  558. /* Num bc/mc packets indicated from fw to host */
  559. uint32_t fw_to_host_data_msdu_bcmc;
  560. /* Num unicast packets indicated from fw to host */
  561. uint32_t fw_to_host_data_msdu_uc;
  562. /* Num remote buf recycle from offload */
  563. uint32_t ofld_remote_data_buf_recycle_cnt;
  564. /* Num remote free buf given to offload */
  565. uint32_t ofld_remote_free_buf_indication_cnt;
  566. };
  567. struct cdp_htt_rx_soc_fw_refill_ring_num_refill_tlv_v {
  568. struct cdp_htt_tlv_hdr tlv_hdr;
  569. /* Num total buf refilled from refill ring */
  570. uint32_t refill_ring_num_refill[1]; /* HTT_RX_STATS_REFILL_MAX_RING */
  571. };
  572. struct cdp_htt_rx_pdev_fw_ring_mpdu_err_tlv_v {
  573. struct cdp_htt_tlv_hdr tlv_hdr;
  574. /* Num error MPDU for each RxDMA error type */
  575. uint32_t fw_ring_mpdu_err[1]; /* HTT_RX_STATS_RXDMA_MAX_ERR */
  576. };
  577. struct cdp_htt_rx_pdev_fw_mpdu_drop_tlv_v {
  578. struct cdp_htt_tlv_hdr tlv_hdr;
  579. /* Num MPDU dropped */
  580. uint32_t fw_mpdu_drop[1]; /* HTT_RX_STATS_FW_DROP_REASON_MAX */
  581. };
  582. #define HTT_STATS_PHY_ERR_MAX 43
  583. struct cdp_htt_rx_pdev_fw_stats_phy_err_tlv {
  584. struct cdp_htt_tlv_hdr tlv_hdr;
  585. /* BIT [ 7 : 0] :- mac_id
  586. * BIT [31 : 8] :- reserved
  587. */
  588. uint32_t mac_id__word;
  589. /* Num of phy err */
  590. uint32_t total_phy_err_cnt;
  591. /* Counts of different types of phy errs
  592. * The mapping of PHY error types to phy_err array elements is HW dependent.
  593. * The only currently-supported mapping is shown below:
  594. *
  595. * 0 phyrx_err_phy_off Reception aborted due to receiving a PHY_OFF TLV
  596. * 1 phyrx_err_synth_off
  597. * 2 phyrx_err_ofdma_timing
  598. * 3 phyrx_err_ofdma_signal_parity
  599. * 4 phyrx_err_ofdma_rate_illegal
  600. * 5 phyrx_err_ofdma_length_illegal
  601. * 6 phyrx_err_ofdma_restart
  602. * 7 phyrx_err_ofdma_service
  603. * 8 phyrx_err_ppdu_ofdma_power_drop
  604. * 9 phyrx_err_cck_blokker
  605. * 10 phyrx_err_cck_timing
  606. * 11 phyrx_err_cck_header_crc
  607. * 12 phyrx_err_cck_rate_illegal
  608. * 13 phyrx_err_cck_length_illegal
  609. * 14 phyrx_err_cck_restart
  610. * 15 phyrx_err_cck_service
  611. * 16 phyrx_err_cck_power_drop
  612. * 17 phyrx_err_ht_crc_err
  613. * 18 phyrx_err_ht_length_illegal
  614. * 19 phyrx_err_ht_rate_illegal
  615. * 20 phyrx_err_ht_zlf
  616. * 21 phyrx_err_false_radar_ext
  617. * 22 phyrx_err_green_field
  618. * 23 phyrx_err_bw_gt_dyn_bw
  619. * 24 phyrx_err_leg_ht_mismatch
  620. * 25 phyrx_err_vht_crc_error
  621. * 26 phyrx_err_vht_siga_unsupported
  622. * 27 phyrx_err_vht_lsig_len_invalid
  623. * 28 phyrx_err_vht_ndp_or_zlf
  624. * 29 phyrx_err_vht_nsym_lt_zero
  625. * 30 phyrx_err_vht_rx_extra_symbol_mismatch
  626. * 31 phyrx_err_vht_rx_skip_group_id0
  627. * 32 phyrx_err_vht_rx_skip_group_id1to62
  628. * 33 phyrx_err_vht_rx_skip_group_id63
  629. * 34 phyrx_err_ofdm_ldpc_decoder_disabled
  630. * 35 phyrx_err_defer_nap
  631. * 36 phyrx_err_fdomain_timeout
  632. * 37 phyrx_err_lsig_rel_check
  633. * 38 phyrx_err_bt_collision
  634. * 39 phyrx_err_unsupported_mu_feedback
  635. * 40 phyrx_err_ppdu_tx_interrupt_rx
  636. * 41 phyrx_err_unsupported_cbf
  637. * 42 phyrx_err_other
  638. */
  639. uint32_t phy_err[HTT_STATS_PHY_ERR_MAX];
  640. };
  641. struct cdp_htt_rx_soc_fw_refill_ring_empty_tlv_v {
  642. struct cdp_htt_tlv_hdr tlv_hdr;
  643. /* Num ring empty encountered */
  644. uint32_t refill_ring_empty_cnt[1]; /* HTT_RX_STATS_REFILL_MAX_RING */
  645. };
  646. struct cdp_htt_tx_pdev_stats {
  647. struct cdp_htt_tx_pdev_stats_cmn_tlv cmn_tlv;
  648. struct cdp_htt_tx_pdev_stats_urrn_tlv_v underrun_tlv;
  649. struct cdp_htt_tx_pdev_stats_sifs_tlv_v sifs_tlv;
  650. struct cdp_htt_tx_pdev_stats_flush_tlv_v flush_tlv;
  651. struct cdp_htt_tx_pdev_stats_phy_err_tlv_v phy_err_tlv;
  652. };
  653. struct cdp_htt_rx_soc_stats_t {
  654. struct cdp_htt_rx_soc_fw_stats_tlv fw_tlv;
  655. struct cdp_htt_rx_soc_fw_refill_ring_empty_tlv_v fw_refill_ring_empty_tlv;
  656. struct cdp_htt_rx_soc_fw_refill_ring_num_refill_tlv_v fw_refill_ring_num_refill_tlv;
  657. };
  658. struct cdp_htt_rx_pdev_stats {
  659. struct cdp_htt_rx_soc_stats_t soc_stats;
  660. struct cdp_htt_rx_pdev_fw_stats_tlv fw_stats_tlv;
  661. struct cdp_htt_rx_pdev_fw_ring_mpdu_err_tlv_v fw_ring_mpdu_err_tlv;
  662. struct cdp_htt_rx_pdev_fw_mpdu_drop_tlv_v fw_ring_mpdu_drop;
  663. struct cdp_htt_rx_pdev_fw_stats_phy_err_tlv fw_stats_phy_err_tlv;
  664. };
  665. struct cdp_pdev_stats {
  666. /* packets dropped on rx */
  667. struct {
  668. /* packets dropped because nsdu_done bit not set */
  669. uint32_t msdu_not_done;
  670. /* Multicast Echo check */
  671. uint32_t mec;
  672. /* Mesh Filtered packets */
  673. uint32_t mesh_filter;
  674. /* packets dropped on monitor vap */
  675. uint32_t mon_rx_drop;
  676. } dropped;
  677. struct {
  678. /* total packets replnished */
  679. struct cdp_pkt_info pkts;
  680. /* rxdma errors */
  681. uint32_t rxdma_err;
  682. /* nbuf alloc failed */
  683. uint32_t nbuf_alloc_fail;
  684. /* Mapping failure */
  685. uint32_t map_err;
  686. /* x86 failures */
  687. uint32_t x86_fail;
  688. /* low threshold interrupts */
  689. uint32_t low_thresh_intrs;
  690. } replenish;
  691. /* Rx Raw Packets */
  692. uint32_t rx_raw_pkts;
  693. /* Mesh Rx Stats Alloc fail */
  694. uint32_t mesh_mem_alloc;
  695. /* Rx errors */
  696. struct {
  697. /* desc alloc failed errors */
  698. uint32_t desc_alloc_fail;
  699. /* ip csum errors */
  700. uint32_t ip_csum_err;
  701. /* tcp/udp csum errors */
  702. uint32_t tcp_udp_csum_err;
  703. } err;
  704. /* buffers added back in freelist */
  705. uint32_t buf_freelist;
  706. /* Tx Ingress stats */
  707. struct cdp_tx_ingress_stats tx_i;
  708. /* CDP Tx Stats */
  709. struct cdp_tx_stats tx;
  710. /* CDP Rx Stats */
  711. struct cdp_rx_stats rx;
  712. /* Number of Tx completions per interrupt */
  713. struct cdp_hist_tx_comp tx_comp_histogram;
  714. /* Number of Rx ring descriptors reaped per interrupt */
  715. struct cdp_hist_rx_ind rx_ind_histogram;
  716. uint64_t ppdu_stats_counter[CDP_PPDU_STATS_MAX_TAG];
  717. struct cdp_htt_tx_pdev_stats htt_tx_pdev_stats;
  718. struct cdp_htt_rx_pdev_stats htt_rx_pdev_stats;
  719. };
  720. #ifndef BIG_ENDIAN_HOST
  721. typedef struct {
  722. uint64_t pkts;
  723. uint64_t bytes;
  724. } ol_txrx_stats_elem;
  725. #else
  726. struct ol_txrx_elem_t {
  727. uint64_t pkts;
  728. uint64_t bytes;
  729. };
  730. typedef struct ol_txrx_elem_t ol_txrx_stats_elem;
  731. #endif
  732. #ifndef CONFIG_MCL
  733. /**
  734. * @brief data stats published by the host txrx layer
  735. */
  736. struct ol_txrx_stats {
  737. struct {
  738. /* MSDUs received from the stack */
  739. ol_txrx_stats_elem from_stack;
  740. /* MSDUs successfully sent across the WLAN */
  741. ol_txrx_stats_elem delivered;
  742. struct {
  743. /* MSDUs that the host did not accept */
  744. ol_txrx_stats_elem host_reject;
  745. /* MSDUs which could not be downloaded to the target */
  746. ol_txrx_stats_elem download_fail;
  747. /*
  748. * MSDUs which the target discarded
  749. * (lack of mem or old age)
  750. */
  751. ol_txrx_stats_elem target_discard;
  752. /*
  753. * MSDUs which the target sent but couldn't get
  754. * an ack for
  755. */
  756. ol_txrx_stats_elem no_ack;
  757. /* MSDUs dropped in NSS-FW */
  758. ol_txrx_stats_elem nss_ol_dropped;
  759. } dropped;
  760. u_int32_t desc_in_use;
  761. u_int32_t desc_alloc_fails;
  762. u_int32_t ce_ring_full;
  763. u_int32_t dma_map_error;
  764. /* MSDUs given to the txrx layer by the management stack */
  765. ol_txrx_stats_elem mgmt;
  766. struct {
  767. /* TSO applied jumbo packets received from NW Stack */
  768. ol_txrx_stats_elem tso_pkts;
  769. /* Non - TSO packets */
  770. ol_txrx_stats_elem non_tso_pkts;
  771. /* TSO packets : Dropped during TCP segmentation*/
  772. ol_txrx_stats_elem tso_dropped;
  773. /* TSO Descriptors */
  774. u_int32_t tso_desc_cnt;
  775. } tso;
  776. struct {
  777. /* TSO applied jumbo packets received from NW Stack */
  778. ol_txrx_stats_elem sg_pkts;
  779. /* Non - TSO packets */
  780. ol_txrx_stats_elem non_sg_pkts;
  781. /* TSO packets : Dropped during TCP segmentation*/
  782. ol_txrx_stats_elem sg_dropped;
  783. /* TSO Descriptors */
  784. u_int32_t sg_desc_cnt;
  785. } sg;
  786. struct {
  787. /* packets enqueued for flow control */
  788. u_int32_t fl_ctrl_enqueue;
  789. /* packets discarded for flow control is full */
  790. u_int32_t fl_ctrl_discard;
  791. /* packets sent to CE without flow control */
  792. u_int32_t fl_ctrl_avoid;
  793. } fl_ctrl;
  794. } tx;
  795. struct {
  796. /* MSDUs given to the OS shim */
  797. ol_txrx_stats_elem delivered;
  798. /* MSDUs forwarded from the rx path to the tx path */
  799. ol_txrx_stats_elem forwarded;
  800. /* MSDUs in which ipv4 chksum error detected by HW */
  801. ol_txrx_stats_elem ipv4_cksum_err;
  802. /* MSDUs in which tcp chksum error detected by HW */
  803. ol_txrx_stats_elem tcp_ipv4_cksum_err;
  804. /* MSDUs in which udp chksum error detected by HW */
  805. ol_txrx_stats_elem udp_ipv4_cksum_err;
  806. /* MSDUs in which tcp V6 chksum error detected by HW */
  807. ol_txrx_stats_elem tcp_ipv6_cksum_err;
  808. /* MSDUs in which UDP V6 chksum error detected by HW */
  809. ol_txrx_stats_elem udp_ipv6_cksum_err;
  810. } rx;
  811. struct {
  812. /* Number of mcast received for conversion */
  813. u_int32_t num_me_rcvd;
  814. /* Number of unicast sent as part of mcast conversion */
  815. u_int32_t num_me_ucast;
  816. /* Number of multicast frames dropped due to dma_map failure */
  817. u_int32_t num_me_dropped_m;
  818. /*
  819. * Number of multicast frames dropped due to allocation
  820. * failure
  821. */
  822. u_int32_t num_me_dropped_a;
  823. /* Number of multicast frames dropped due to internal failure */
  824. u_int32_t num_me_dropped_i;
  825. /* Number of me buf currently in use */
  826. u_int32_t num_me_buf;
  827. /* Number of me buf frames to self mac address */
  828. u_int32_t num_me_dropped_s;
  829. /* Number of me buf in use in non pool based allocation*/
  830. u_int32_t num_me_nonpool;
  831. /* Number of me buf allocated using non pool based allocation*/
  832. u_int32_t num_me_nonpool_count;
  833. } mcast_enhance;
  834. };
  835. struct ol_ath_dbg_rx_rssi {
  836. uint8_t rx_rssi_pri20;
  837. uint8_t rx_rssi_sec20;
  838. uint8_t rx_rssi_sec40;
  839. uint8_t rx_rssi_sec80;
  840. };
  841. struct ol_ath_radiostats {
  842. uint64_t tx_beacon;
  843. uint32_t be_nobuf;
  844. uint32_t tx_buf_count;
  845. uint32_t tx_packets;
  846. uint32_t rx_packets;
  847. int32_t tx_mgmt;
  848. uint32_t tx_num_data;
  849. uint32_t rx_num_data;
  850. int32_t rx_mgmt;
  851. uint32_t rx_num_mgmt;
  852. uint32_t rx_num_ctl;
  853. uint32_t tx_rssi;
  854. uint32_t tx_mcs[10];
  855. uint32_t rx_mcs[10];
  856. uint32_t rx_rssi_comb;
  857. struct ol_ath_dbg_rx_rssi rx_rssi_chain0;
  858. struct ol_ath_dbg_rx_rssi rx_rssi_chain1;
  859. struct ol_ath_dbg_rx_rssi rx_rssi_chain2;
  860. struct ol_ath_dbg_rx_rssi rx_rssi_chain3;
  861. uint64_t rx_bytes;
  862. uint64_t tx_bytes;
  863. uint32_t tx_compaggr;
  864. uint32_t rx_aggr;
  865. uint32_t tx_bawadv;
  866. uint32_t tx_compunaggr;
  867. uint32_t rx_overrun;
  868. uint32_t rx_badcrypt;
  869. uint32_t rx_badmic;
  870. uint32_t rx_crcerr;
  871. uint32_t rx_phyerr;
  872. uint32_t ackRcvBad;
  873. uint32_t rtsBad;
  874. uint32_t rtsGood;
  875. uint32_t fcsBad;
  876. uint32_t noBeacons;
  877. uint32_t mib_int_count;
  878. uint32_t rx_looplimit_start;
  879. uint32_t rx_looplimit_end;
  880. uint8_t ap_stats_tx_cal_enable;
  881. uint8_t self_bss_util;
  882. uint8_t obss_util;
  883. uint32_t tgt_asserts;
  884. int16_t chan_nf;
  885. uint32_t rx_last_msdu_unset_cnt;
  886. int16_t chan_nf_sec80;
  887. uint64_t wmi_tx_mgmt;
  888. uint64_t wmi_tx_mgmt_completions;
  889. uint32_t wmi_tx_mgmt_completion_err;
  890. uint32_t peer_delete_req;
  891. uint32_t peer_delete_resp;
  892. uint32_t rx_mgmt_rssi_drop;
  893. uint32_t tx_retries;
  894. uint32_t rx_data_bytes;
  895. uint32_t tx_frame_count;
  896. uint32_t rx_frame_count;
  897. uint32_t rx_clear_count;
  898. uint32_t cycle_count;
  899. uint32_t phy_err_count;
  900. uint32_t chan_tx_pwr;
  901. };
  902. /*
  903. * Enumeration of PDEV Configuration parameter
  904. */
  905. enum _ol_ath_param_t {
  906. OL_ATH_PARAM_TXCHAINMASK = 1,
  907. OL_ATH_PARAM_RXCHAINMASK = 2,
  908. OL_ATH_PARAM_AMPDU = 6,
  909. OL_ATH_PARAM_AMPDU_LIMIT = 7,
  910. OL_ATH_PARAM_AMPDU_SUBFRAMES = 8,
  911. OL_ATH_PARAM_TXPOWER_LIMIT2G = 12,
  912. OL_ATH_PARAM_TXPOWER_LIMIT5G = 13,
  913. OL_ATH_PARAM_LDPC = 32,
  914. OL_ATH_PARAM_VOW_EXT_STATS = 45,
  915. OL_ATH_PARAM_DYN_TX_CHAINMASK = 73,
  916. OL_ATH_PARAM_BURST_ENABLE = 77,
  917. OL_ATH_PARAM_BURST_DUR = 78,
  918. OL_ATH_PARAM_BCN_BURST = 80,
  919. OL_ATH_PARAM_DCS = 82,
  920. #if UMAC_SUPPORT_PERIODIC_PERFSTATS
  921. OL_ATH_PARAM_PRDPERFSTAT_THRPUT_ENAB = 83,
  922. OL_ATH_PARAM_PRDPERFSTAT_THRPUT_WIN = 84,
  923. OL_ATH_PARAM_PRDPERFSTAT_THRPUT = 85,
  924. OL_ATH_PARAM_PRDPERFSTAT_PER_ENAB = 86,
  925. OL_ATH_PARAM_PRDPERFSTAT_PER_WIN = 87,
  926. OL_ATH_PARAM_PRDPERFSTAT_PER = 88,
  927. #endif
  928. /* UMAC_SUPPORT_PERIODIC_PERFSTATS */
  929. OL_ATH_PARAM_TOTAL_PER = 89,
  930. /* set manual rate for rts frame */
  931. OL_ATH_PARAM_RTS_CTS_RATE = 92,
  932. /* co channel interference threshold level */
  933. OL_ATH_PARAM_DCS_COCH_THR = 93,
  934. /* transmit error threshold */
  935. OL_ATH_PARAM_DCS_TXERR_THR = 94,
  936. /* phy error threshold */
  937. OL_ATH_PARAM_DCS_PHYERR_THR = 95,
  938. /*
  939. * The IOCTL number is 114, it is made 114, inorder to make the IOCTL
  940. * number same as Direct-attach IOCTL.
  941. * Please, don't change number. This IOCTL gets the Interface code path
  942. * it should be either DIRECT-ATTACH or OFF-LOAD.
  943. */
  944. OL_ATH_PARAM_GET_IF_ID = 114,
  945. /* Enable Acs back Ground Channel selection Scan timer in AP mode*/
  946. OL_ATH_PARAM_ACS_ENABLE_BK_SCANTIMEREN = 118,
  947. /* ACS scan timer value in Seconds */
  948. OL_ATH_PARAM_ACS_SCANTIME = 119,
  949. /* Negligence Delta RSSI between two channel */
  950. OL_ATH_PARAM_ACS_RSSIVAR = 120,
  951. /* Negligence Delta Channel load between two channel*/
  952. OL_ATH_PARAM_ACS_CHLOADVAR = 121,
  953. /* Enable Limited OBSS check */
  954. OL_ATH_PARAM_ACS_LIMITEDOBSS = 122,
  955. /* Acs control flag for Scan timer */
  956. OL_ATH_PARAM_ACS_CTRLFLAG = 123,
  957. /* Acs Run time Debug level*/
  958. OL_ATH_PARAM_ACS_DEBUGTRACE = 124,
  959. OL_ATH_PARAM_SET_FW_HANG_ID = 137,
  960. /* Radio type 1:11ac 0:11abgn */
  961. OL_ATH_PARAM_RADIO_TYPE = 138,
  962. OL_ATH_PARAM_IGMPMLD_OVERRIDE, /* IGMP/MLD packet override */
  963. OL_ATH_PARAM_IGMPMLD_TID, /* IGMP/MLD packet TID no */
  964. OL_ATH_PARAM_ARPDHCP_AC_OVERRIDE,
  965. OL_ATH_PARAM_NON_AGG_SW_RETRY_TH,
  966. OL_ATH_PARAM_AGG_SW_RETRY_TH,
  967. /* Dont change this number it as per sync with DA
  968. Blocking certian channel from ic channel list */
  969. OL_ATH_PARAM_DISABLE_DFS = 144,
  970. OL_ATH_PARAM_ENABLE_AMSDU = 145,
  971. OL_ATH_PARAM_ENABLE_AMPDU = 146,
  972. OL_ATH_PARAM_STA_KICKOUT_TH,
  973. OL_ATH_PARAM_WLAN_PROF_ENABLE,
  974. OL_ATH_PARAM_LTR_ENABLE,
  975. OL_ATH_PARAM_LTR_AC_LATENCY_BE = 150,
  976. OL_ATH_PARAM_LTR_AC_LATENCY_BK,
  977. OL_ATH_PARAM_LTR_AC_LATENCY_VI,
  978. OL_ATH_PARAM_LTR_AC_LATENCY_VO,
  979. OL_ATH_PARAM_LTR_AC_LATENCY_TIMEOUT,
  980. OL_ATH_PARAM_LTR_TX_ACTIVITY_TIMEOUT = 155,
  981. OL_ATH_PARAM_LTR_SLEEP_OVERRIDE,
  982. OL_ATH_PARAM_LTR_RX_OVERRIDE,
  983. OL_ATH_PARAM_L1SS_ENABLE,
  984. OL_ATH_PARAM_DSLEEP_ENABLE,
  985. /* radar error threshold */
  986. OL_ATH_PARAM_DCS_RADAR_ERR_THR = 160,
  987. /* Tx channel utilization due to AP's tx and rx */
  988. OL_ATH_PARAM_DCS_USERMAX_CU_THR,
  989. /* interference detection threshold */
  990. OL_ATH_PARAM_DCS_INTR_DETECT_THR,
  991. /* sampling window, default 10secs */
  992. OL_ATH_PARAM_DCS_SAMPLE_WINDOW,
  993. /* debug logs enable/disable */
  994. OL_ATH_PARAM_DCS_DEBUG,
  995. OL_ATH_PARAM_ANI_ENABLE = 165,
  996. OL_ATH_PARAM_ANI_POLL_PERIOD,
  997. OL_ATH_PARAM_ANI_LISTEN_PERIOD,
  998. OL_ATH_PARAM_ANI_OFDM_LEVEL,
  999. OL_ATH_PARAM_ANI_CCK_LEVEL,
  1000. OL_ATH_PARAM_DSCP_TID_MAP = 170,
  1001. OL_ATH_PARAM_TXPOWER_SCALE,
  1002. /* Phy error penalty */
  1003. OL_ATH_PARAM_DCS_PHYERR_PENALTY,
  1004. #if ATH_SUPPORT_DSCP_OVERRIDE
  1005. /* set/get TID for sending HMMC packets */
  1006. OL_ATH_PARAM_HMMC_DSCP_TID_MAP,
  1007. /* set/get DSCP mapping override */
  1008. OL_ATH_PARAM_DSCP_OVERRIDE,
  1009. /* set/get HMMC-DSCP mapping override */
  1010. OL_ATH_PARAM_HMMC_DSCP_OVERRIDE = 175,
  1011. #endif
  1012. #if ATH_RX_LOOPLIMIT_TIMER
  1013. OL_ATH_PARAM_LOOPLIMIT_NUM,
  1014. #endif
  1015. OL_ATH_PARAM_ANTENNA_GAIN_2G,
  1016. OL_ATH_PARAM_ANTENNA_GAIN_5G,
  1017. OL_ATH_PARAM_RX_FILTER,
  1018. #if ATH_SUPPORT_HYFI_ENHANCEMENTS
  1019. OL_ATH_PARAM_BUFF_THRESH = 180,
  1020. OL_ATH_PARAM_BLK_REPORT_FLOOD,
  1021. OL_ATH_PARAM_DROP_STA_QUERY,
  1022. #endif
  1023. OL_ATH_PARAM_QBOOST,
  1024. OL_ATH_PARAM_SIFS_FRMTYPE,
  1025. OL_ATH_PARAM_SIFS_UAPSD = 185,
  1026. OL_ATH_PARAM_FW_RECOVERY_ID,
  1027. OL_ATH_PARAM_RESET_OL_STATS,
  1028. OL_ATH_PARAM_AGGR_BURST,
  1029. /* Number of deauth sent in consecutive rx_peer_invalid */
  1030. OL_ATH_PARAM_DEAUTH_COUNT,
  1031. OL_ATH_PARAM_BLOCK_INTERBSS = 190,
  1032. /* Firmware reset control for Bmiss / timeout / reset */
  1033. OL_ATH_PARAM_FW_DISABLE_RESET,
  1034. OL_ATH_PARAM_MSDU_TTL,
  1035. OL_ATH_PARAM_PPDU_DURATION,
  1036. OL_ATH_PARAM_SET_TXBF_SND_PERIOD,
  1037. OL_ATH_PARAM_ALLOW_PROMISC = 195,
  1038. OL_ATH_PARAM_BURST_MODE,
  1039. OL_ATH_PARAM_DYN_GROUPING,
  1040. OL_ATH_PARAM_DPD_ENABLE,
  1041. OL_ATH_PARAM_DBGLOG_RATELIM,
  1042. /* firmware should intimate us about ps state change for node */
  1043. OL_ATH_PARAM_PS_STATE_CHANGE = 200,
  1044. OL_ATH_PARAM_MCAST_BCAST_ECHO,
  1045. /* OBSS RSSI threshold for 20/40 coexistence */
  1046. OL_ATH_PARAM_OBSS_RSSI_THRESHOLD,
  1047. /* Link/node RX RSSI threshold for 20/40 coexistence */
  1048. OL_ATH_PARAM_OBSS_RX_RSSI_THRESHOLD,
  1049. #if ATH_CHANNEL_BLOCKING
  1050. OL_ATH_PARAM_ACS_BLOCK_MODE = 205,
  1051. #endif
  1052. OL_ATH_PARAM_ACS_TX_POWER_OPTION,
  1053. /*
  1054. * Default Antenna Polarization MSB 8 bits (24:31) specifying
  1055. * enable/disable ; LSB 24 bits (0:23) antenna mask value
  1056. */
  1057. OL_ATH_PARAM_ANT_POLARIZATION,
  1058. /* rate limit mute type error prints */
  1059. OL_ATH_PARAM_PRINT_RATE_LIMIT,
  1060. OL_ATH_PARAM_PDEV_RESET, /* Reset FW PDEV*/
  1061. /* Do not crash host when target assert happened*/
  1062. OL_ATH_PARAM_FW_DUMP_NO_HOST_CRASH = 210,
  1063. /* Consider OBSS non-erp to change to long slot*/
  1064. OL_ATH_PARAM_CONSIDER_OBSS_NON_ERP_LONG_SLOT = 211,
  1065. OL_ATH_PARAM_STATS_FC,
  1066. OL_ATH_PARAM_QFLUSHINTERVAL,
  1067. OL_ATH_PARAM_TOTAL_Q_SIZE,
  1068. OL_ATH_PARAM_TOTAL_Q_SIZE_RANGE0,
  1069. OL_ATH_PARAM_TOTAL_Q_SIZE_RANGE1,
  1070. OL_ATH_PARAM_TOTAL_Q_SIZE_RANGE2,
  1071. OL_ATH_PARAM_TOTAL_Q_SIZE_RANGE3,
  1072. OL_ATH_PARAM_MIN_THRESHOLD,
  1073. OL_ATH_PARAM_MAX_Q_LIMIT,
  1074. OL_ATH_PARAM_MIN_Q_LIMIT,
  1075. OL_ATH_PARAM_CONG_CTRL_TIMER_INTV,
  1076. OL_ATH_PARAM_STATS_TIMER_INTV,
  1077. OL_ATH_PARAM_ROTTING_TIMER_INTV,
  1078. OL_ATH_PARAM_LATENCY_PROFILE,
  1079. OL_ATH_PARAM_HOSTQ_DUMP,
  1080. OL_ATH_PARAM_TIDQ_MAP,
  1081. OL_ATH_PARAM_DBG_ARP_SRC_ADDR, /* ARP DEBUG source address*/
  1082. OL_ATH_PARAM_DBG_ARP_DST_ADDR, /* ARP DEBUG destination address*/
  1083. OL_ATH_PARAM_ARP_DBG_CONF, /* ARP debug configuration */
  1084. OL_ATH_PARAM_DISABLE_STA_VAP_AMSDU, /* Disable AMSDU for station vap */
  1085. #if ATH_SUPPORT_DFS && ATH_SUPPORT_STA_DFS
  1086. OL_ATH_PARAM_STADFS_ENABLE = 300, /* STA DFS is enabled or not */
  1087. #endif
  1088. #if QCA_AIRTIME_FAIRNESS
  1089. OL_ATH_PARAM_ATF_STRICT_SCHED = 301,
  1090. OL_ATH_PARAM_ATF_GROUP_POLICY = 302,
  1091. #endif
  1092. #if DBDC_REPEATER_SUPPORT
  1093. OL_ATH_PARAM_PRIMARY_RADIO,
  1094. OL_ATH_PARAM_DBDC_ENABLE,
  1095. #endif
  1096. OL_ATH_PARAM_TXPOWER_DBSCALE,
  1097. OL_ATH_PARAM_CTL_POWER_SCALE,
  1098. #if QCA_AIRTIME_FAIRNESS
  1099. OL_ATH_PARAM_ATF_OBSS_SCHED = 307,
  1100. OL_ATH_PARAM_ATF_OBSS_SCALE = 308,
  1101. #endif
  1102. OL_ATH_PARAM_PHY_OFDM_ERR = 309,
  1103. OL_ATH_PARAM_PHY_CCK_ERR = 310,
  1104. OL_ATH_PARAM_FCS_ERR = 311,
  1105. OL_ATH_PARAM_CHAN_UTIL = 312,
  1106. #if DBDC_REPEATER_SUPPORT
  1107. OL_ATH_PARAM_CLIENT_MCAST,
  1108. #endif
  1109. OL_ATH_PARAM_EMIWAR_80P80 = 314,
  1110. OL_ATH_PARAM_BATCHMODE = 315,
  1111. OL_ATH_PARAM_PACK_AGGR_DELAY = 316,
  1112. #if UMAC_SUPPORT_ACFG
  1113. OL_ATH_PARAM_DIAG_ENABLE = 317,
  1114. #endif
  1115. #if ATH_SUPPORT_VAP_QOS
  1116. OL_ATH_PARAM_VAP_QOS = 318,
  1117. #endif
  1118. OL_ATH_PARAM_CHAN_STATS_TH = 319,
  1119. /* Passive scan is enabled or disabled */
  1120. OL_ATH_PARAM_PASSIVE_SCAN_ENABLE = 320,
  1121. OL_ATH_MIN_RSSI_ENABLE = 321,
  1122. OL_ATH_MIN_RSSI = 322,
  1123. OL_ATH_PARAM_ACS_2G_ALLCHAN = 323,
  1124. #if DBDC_REPEATER_SUPPORT
  1125. OL_ATH_PARAM_DELAY_STAVAP_UP = 324,
  1126. #endif
  1127. /* It is used to set the channel switch options */
  1128. OL_ATH_PARAM_CHANSWITCH_OPTIONS = 327,
  1129. OL_ATH_BTCOEX_ENABLE = 328,
  1130. OL_ATH_BTCOEX_WL_PRIORITY = 329,
  1131. OL_ATH_PARAM_TID_OVERRIDE_QUEUE_MAPPING = 330,
  1132. OL_ATH_PARAM_CAL_VER_CHECK = 331,
  1133. OL_ATH_PARAM_NO_VLAN = 332,
  1134. OL_ATH_PARAM_CCA_THRESHOLD = 333,
  1135. OL_ATH_PARAM_ATF_LOGGING = 334,
  1136. OL_ATH_PARAM_STRICT_DOTH = 335,
  1137. OL_ATH_PARAM_DISCONNECTION_TIMEOUT = 336,
  1138. OL_ATH_PARAM_RECONFIGURATION_TIMEOUT = 337,
  1139. OL_ATH_PARAM_CHANNEL_SWITCH_COUNT = 338,
  1140. OL_ATH_PARAM_ALWAYS_PRIMARY = 339,
  1141. OL_ATH_PARAM_FAST_LANE = 340,
  1142. OL_ATH_GET_BTCOEX_DUTY_CYCLE = 341,
  1143. OL_ATH_PARAM_SECONDARY_OFFSET_IE = 342,
  1144. OL_ATH_PARAM_WIDE_BAND_SUB_ELEMENT = 343,
  1145. OL_ATH_PARAM_PREFERRED_UPLINK = 344,
  1146. OL_ATH_PARAM_PRECAC_ENABLE = 345,
  1147. OL_ATH_PARAM_PRECAC_TIMEOUT = 346,
  1148. OL_ATH_COEX_VER_CFG = 347,
  1149. OL_ATH_PARAM_DUMP_TARGET = 348,
  1150. OL_ATH_PARAM_PDEV_TO_REO_DEST = 349,
  1151. OL_ATH_PARAM_DUMP_CHAINMASK_TABLES = 350,
  1152. OL_ATH_PARAM_DUMP_OBJECTS = 351,
  1153. OL_ATH_PARAM_ACS_SRLOADVAR = 352,
  1154. OL_ATH_PARAM_MGMT_RSSI_THRESHOLD = 353,
  1155. OL_ATH_PARAM_EXT_NSS_CAPABLE = 354,
  1156. OL_ATH_PARAM_MGMT_PDEV_STATS_TIMER = 355,
  1157. OL_ATH_PARAM_TXACKTIMEOUT = 356,
  1158. OL_ATH_PARAM_ICM_ACTIVE = 357,
  1159. OL_ATH_PARAM_NOMINAL_NOISEFLOOR = 358,
  1160. OL_ATH_PARAM_CHAN_INFO = 359,
  1161. OL_ATH_PARAM_ACS_RANK = 360,
  1162. OL_ATH_PARAM_TXCHAINSOFT = 361,
  1163. OL_ATH_PARAM_WIDE_BAND_SCAN = 362,
  1164. OL_ATH_PARAM_CCK_TX_ENABLE = 363,
  1165. OL_ATH_PARAM_PAPI_ENABLE = 364,
  1166. OL_ATH_PARAM_ISOLATION = 365,
  1167. OL_ATH_PARAM_MAX_CLIENTS_PER_RADIO = 366,
  1168. };
  1169. /* Enumeration of PDEV Configuration parameter */
  1170. enum _ol_hal_param_t {
  1171. OL_HAL_CONFIG_DMA_BEACON_RESPONSE_TIME = 0
  1172. };
  1173. #endif
  1174. /* Bitmasks for stats that can block */
  1175. #define EXT_TXRX_FW_STATS 0x0001
  1176. #endif