cdp_txrx_stats_struct.h 48 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549
  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. /* TID level VoW stats macros
  57. * to add and get stats
  58. */
  59. #define PFLOW_TXRX_TIDQ_STATS_ADD(_peer, _tid, _var, _val) \
  60. (((_peer)->tidq_stats[_tid]).stats[_var]) += _val
  61. #define PFLOW_TXRX_TIDQ_STATS_GET(_peer, _tid, _var, _val) \
  62. ((_peer)->tidq_stats[_tid].stats[_var])
  63. /*
  64. * Video only stats
  65. */
  66. #define PFLOW_CTRL_PDEV_VIDEO_STATS_SET(_pdev, _var, _val) \
  67. (((_pdev)->vow.vistats[_var]).value) = _val
  68. #define PFLOW_CTRL_PDEV_VIDEO_STATS_GET(_pdev, _var) \
  69. ((_pdev)->vow.vistats[_var].value)
  70. #define PFLOW_CTRL_PDEV_VIDEO_STATS_ADD(_pdev, _var, _val) \
  71. (((_pdev)->vow.vistats[_var]).value) += _val
  72. /*
  73. * video delay stats
  74. */
  75. #define PFLOW_CTRL_PDEV_DELAY_VIDEO_STATS_SET(_pdev, _var, _val) \
  76. (((_pdev)->vow.delaystats[_var]).value) = _val
  77. #define PFLOW_CTRL_PDEV_DELAY_VIDEO_STATS_GET(_pdev, _var) \
  78. ((_pdev)->vow.delaystats[_var].value)
  79. #define PFLOW_CTRL_PDEV_DELAY_VIDEO_STATS_ADD(_pdev, _var, _val) \
  80. (((_pdev)->vow.delaystats[_var]).value) += _val
  81. /*
  82. * Number of TLVs sent by FW. Needs to reflect
  83. * HTT_PPDU_STATS_MAX_TAG declared in FW
  84. */
  85. #define CDP_PPDU_STATS_MAX_TAG 14
  86. /* Different Packet Types */
  87. enum cdp_packet_type {
  88. DOT11_A = 0,
  89. DOT11_B = 1,
  90. DOT11_N = 2,
  91. DOT11_AC = 3,
  92. DOT11_AX = 4,
  93. DOT11_MAX = 5,
  94. };
  95. /* TID level Tx/Rx stats
  96. *
  97. */
  98. enum cdp_txrx_tidq_stats {
  99. /* Tx Counters */
  100. TX_MSDU_TOTAL_LINUX_SUBSYSTEM,
  101. TX_MSDU_TOTAL_FROM_OSIF,
  102. TX_MSDU_TX_COMP_PKT_CNT,
  103. /* Rx Counters */
  104. RX_MSDU_TOTAL_FROM_FW,
  105. RX_MSDU_MCAST_FROM_FW,
  106. RX_TID_MISMATCH_FROM_FW,
  107. RX_MSDU_MISC_PKTS,
  108. RX_MSDU_IS_ARP,
  109. RX_MSDU_IS_EAP,
  110. RX_MSDU_IS_DHCP,
  111. RX_AGGREGATE_10,
  112. RX_AGGREGATE_20,
  113. RX_AGGREGATE_30,
  114. RX_AGGREGATE_40,
  115. RX_AGGREGATE_50,
  116. RX_AGGREGATE_60,
  117. RX_AGGREGATE_MORE,
  118. RX_AMSDU_1,
  119. RX_AMSDU_2,
  120. RX_AMSDU_3,
  121. RX_AMSDU_4,
  122. RX_AMSDU_MORE,
  123. RX_MSDU_CHAINED_FROM_FW,
  124. RX_MSDU_REORDER_FAILED_FROM_FW,
  125. RX_MSDU_REORDER_FLUSHED_FROM_FW,
  126. RX_MSDU_DISCARD_FROM_FW,
  127. RX_MSDU_DUPLICATE_FROM_FW,
  128. RX_MSDU_DELIVERED_TO_STACK,
  129. TIDQ_STATS_MAX,
  130. };
  131. struct cdp_tidq_stats {
  132. uint32_t stats[TIDQ_STATS_MAX];
  133. };
  134. /* struct cdp_pkt_info - packet info
  135. * @num: no of packets
  136. * @bytes: total no of bytes
  137. */
  138. struct cdp_pkt_info {
  139. uint32_t num;
  140. uint64_t bytes;
  141. };
  142. /* struct cdp_pkt_type - packet type
  143. * @mcs_count: Counter array for each MCS index
  144. */
  145. struct cdp_pkt_type {
  146. uint32_t mcs_count[MAX_MCS];
  147. };
  148. /* struct cdp_tx_stats - tx stats
  149. * @cdp_pkt_info comp_pkt: Pkt Info for which completions were received
  150. * @cdp_pkt_info ucast: Unicast Packet Count
  151. * @cdp_pkt_info mcast: Multicast Packet Count
  152. * @cdp_pkt_info bcast: Broadcast Packet Count
  153. * @cdp_pkt_info nawds_mcast: NAWDS Multicast Packet Count
  154. * @nawds_mcast_drop: NAWDS Multicast Drop Count
  155. * @cdp_pkt_info tx_success: Successful Tx Packets
  156. * @tx_failed: Total Tx failure
  157. * @ofdma: Total Packets as ofdma
  158. * @stbc: Packets in STBC
  159. * @ldpc: Packets in LDPC
  160. * @retries: Packet retries
  161. * @non_amsdu_cnt: Number of MSDUs with no MSDU level aggregation
  162. * @amsdu_cnt: Number of MSDUs part of AMSDU
  163. * @tx_rate: Tx Rate
  164. * @last_tx_rate: Last tx rate for unicast packets
  165. * @last_tx_rate_mcs: Tx rate mcs for unicast packets
  166. * @mcast_last_tx_rate: Last tx rate for multicast packets
  167. * @mcast_last_tx_rate_mcs: Last tx rate mcs for multicast
  168. * @last_per: Tx Per
  169. * @rnd_avg_tx_rate: Rounded average tx rate
  170. * @avg_tx_rate: Average TX rate
  171. * @last_ack_rssi: RSSI of last acked packet
  172. * @tx_bytes_success_last: last Tx success bytes
  173. * @tx_data_success_last: last Tx success data
  174. * @tx_byte_rate: Bytes Trasmitted in last one sec
  175. * @tx_data_rate: Data Transmitted in last one sec
  176. * @sgi_count[MAX_GI]: SGI count
  177. * @nss[SS_COUNT]: Packet count for different num_spatial_stream values
  178. * @bw[MAX_BW]: Packet Count for different bandwidths
  179. * @wme_ac_type[WME_AC_MAX]: Wireless Multimedia type Count
  180. * @excess_retries_per_ac[WME_AC_MAX]: Wireless Multimedia type Count
  181. * @fw_rem: Discarded by firmware
  182. * @fw_rem_notx: firmware_discard_untransmitted
  183. * @fw_rem_tx: firmware_discard_transmitted
  184. * @age_out: aged out in mpdu/msdu queues
  185. * @fw_reason1: discarded by firmware reason 1
  186. * @fw_reason2: discarded by firmware reason 2
  187. * @fw_reason3: discarded by firmware reason 3
  188. * @mcs_count: MCS Count
  189. * @dot11_tx_pkts: dot11 tx packets
  190. * @an_tx_cnt: ald tx count
  191. * @an_tx_rates_used: ald rx rate used
  192. * @an_tx_bytes: ald tx bytes
  193. * @ald_txcount: ald tx count
  194. * @ald_lastper: ald last PER
  195. * @ald_max4msframelen: ald max frame len
  196. * @an_tx_ratecount: ald tx ratecount
  197. * @ald_retries: ald retries
  198. * @ald_ac_nobufs: #buffer overflows per node per AC
  199. * @ald_ac_excretries: #pkts dropped after excessive retries per node per AC
  200. * @rssi_chain: rssi chain
  201. * @inactive_time: inactive time in secs
  202. * @tx_ratecode: Tx rate code of last frame
  203. * @tx_flags: tx flags
  204. * @tx_power: Tx power latest
  205. * @is_tx_no_ack: no ack received
  206. * @is_tx_nodefkey: tx failed 'cuz no defkey
  207. * @is_tx_noheadroom: tx failed 'cuz no space
  208. * @is_crypto_enmicfail:
  209. * @is_tx_nonode: tx failed for no node
  210. * @is_tx_unknownmgt: tx of unknown mgt frame
  211. * @is_tx_badcipher: tx failed 'cuz key type
  212. * @ampdu_cnt: completion of aggregation
  213. * @non_ampdu_cnt: tx completion not aggregated
  214. * @failed_retry_count: packets failed due to retry above 802.11 retry limit
  215. * @retry_count: packets successfully send after one or more retry
  216. * @multiple_retry_count: packets successfully sent after more than one retry
  217. */
  218. struct cdp_tx_stats {
  219. struct cdp_pkt_info comp_pkt;
  220. struct cdp_pkt_info ucast;
  221. struct cdp_pkt_info mcast;
  222. struct cdp_pkt_info bcast;
  223. struct cdp_pkt_info nawds_mcast;
  224. uint32_t nawds_mcast_drop;
  225. struct cdp_pkt_info tx_success;
  226. uint32_t tx_failed;
  227. uint32_t ofdma;
  228. uint32_t stbc;
  229. uint32_t ldpc;
  230. uint32_t retries;
  231. uint32_t non_amsdu_cnt;
  232. uint32_t amsdu_cnt;
  233. uint32_t tx_rate;
  234. uint32_t last_tx_rate;
  235. uint32_t last_tx_rate_mcs;
  236. uint32_t mcast_last_tx_rate;
  237. uint32_t mcast_last_tx_rate_mcs;
  238. uint32_t last_per;
  239. uint32_t rnd_avg_tx_rate;
  240. uint32_t avg_tx_rate;
  241. uint32_t last_ack_rssi;
  242. uint32_t tx_bytes_success_last;
  243. uint32_t tx_data_success_last;
  244. uint32_t tx_byte_rate;
  245. uint32_t tx_data_rate;
  246. uint32_t tx_data_ucast_last;
  247. uint32_t tx_data_ucast_rate;
  248. struct cdp_pkt_type pkt_type[DOT11_MAX];
  249. uint32_t sgi_count[MAX_GI];
  250. uint32_t nss[SS_COUNT];
  251. uint32_t bw[MAX_BW];
  252. uint32_t wme_ac_type[WME_AC_MAX];
  253. uint32_t excess_retries_per_ac[WME_AC_MAX];
  254. struct {
  255. struct cdp_pkt_info fw_rem;
  256. uint32_t fw_rem_notx;
  257. uint32_t fw_rem_tx;
  258. uint32_t age_out;
  259. uint32_t fw_reason1;
  260. uint32_t fw_reason2;
  261. uint32_t fw_reason3;
  262. } dropped;
  263. struct cdp_pkt_info dot11_tx_pkts;
  264. uint32_t fw_tx_cnt;
  265. uint32_t fw_tx_rates_used;
  266. uint32_t fw_tx_bytes;
  267. uint32_t fw_txcount;
  268. uint32_t fw_max4msframelen;
  269. uint32_t fw_ratecount;
  270. uint32_t ac_nobufs[WME_AC_MAX];
  271. uint32_t rssi_chain[WME_AC_MAX];
  272. uint32_t inactive_time;
  273. uint32_t tx_ratecode;
  274. uint32_t tx_flags;
  275. uint32_t tx_power;
  276. /* MSDUs which the target sent but couldn't get an ack for */
  277. struct cdp_pkt_info is_tx_no_ack;
  278. /*add for peer and upadted from ppdu*/
  279. uint32_t ampdu_cnt;
  280. uint32_t non_ampdu_cnt;
  281. uint32_t failed_retry_count;
  282. uint32_t retry_count;
  283. uint32_t multiple_retry_count;
  284. uint32_t last_tx_rate_used;
  285. };
  286. /* struct cdp_rx_stats - rx Level Stats
  287. * @to_stack: Total packets sent up the stack
  288. * @rcvd_reo[CDP_MAX_RX_RINGS]: Packets received on the reo ring
  289. * @unicast: Total unicast packets
  290. * @multicast: Total multicast packets
  291. * @bcast: Broadcast Packet Count
  292. * @raw: Raw Pakets received
  293. * @nawds_mcast_drop: Total multicast packets
  294. * @mec_drop: Total MEC packets dropped
  295. * @pkts: Intra BSS packets received
  296. * @fail: Intra BSS packets failed
  297. * @mic_err: Rx MIC errors CCMP
  298. * @decrypt_err: Rx Decryption Errors CRC
  299. * @fcserr: rx MIC check failed (CCMP)
  300. * @wme_ac_type[WME_AC_MAX]: Wireless Multimedia type Count
  301. * @reception_type[MAX_RECEPTION_TYPES]: Reception type os packets
  302. * @mcs_count[MAX_MCS]: mcs count
  303. * @sgi_count[MAX_GI]: sgi count
  304. * @nss[SS_COUNT]: Packet count in spatiel Streams
  305. * @bw[MAX_BW]: Packet Count in different bandwidths
  306. * @non_ampdu_cnt: Number of MSDUs with no MPDU level aggregation
  307. * @ampdu_cnt: Number of MSDUs part of AMSPU
  308. * @non_amsdu_cnt: Number of MSDUs with no MSDU level aggregation
  309. * @amsdu_cnt: Number of MSDUs part of AMSDU
  310. * @bar_recv_cnt: Number of bar received
  311. * @rssi: RSSI of received signal
  312. * @last_rssi: Previous rssi
  313. * @rx_rate: Rx rate
  314. * @last_rx_rate: Previous rx rate
  315. * @rnd_avg_rx_rate: Rounded average rx rate
  316. * @avg_rx_rate: Average Rx rate
  317. * @dot11_rx_pkts: dot11 rx packets
  318. * @rx_bytes_last: last Rx success bytes
  319. * @rx_data_last: last rx success data
  320. * @rx_byte_rate: bytes received in last one sec
  321. * @rx_data_rate: data received in last one sec
  322. * @rx_retries: retries of packet in rx
  323. * @rx_mpdus: mpdu in rx
  324. * @rx_ppdus: ppdu in rx
  325. * @is_rx_tooshort: tooshort
  326. * @is_rx_decap: rx decap
  327. * @rx_ccmpmic: rx MIC check failed (CCMP)
  328. * @rx_tkipmic: rx MIC check failed (TKIP)
  329. * @rx_tkipicv: rx ICV check failed (TKIP)
  330. * @rx_wpimic: rx MIC check failed (WPI)
  331. * @rx_wepfail: rx wep processing failed
  332. * @rx_aggr: aggregation on rx
  333. * @rx_discard: packets discard in rx
  334. * @rx_ratecode: Rx rate code of last frame
  335. * @rx_flags: rx flags
  336. */
  337. struct cdp_rx_stats {
  338. struct cdp_pkt_info to_stack;
  339. struct cdp_pkt_info rcvd_reo[CDP_MAX_RX_RINGS];
  340. struct cdp_pkt_info unicast;
  341. struct cdp_pkt_info multicast;
  342. struct cdp_pkt_info bcast;
  343. struct cdp_pkt_info raw;
  344. uint32_t nawds_mcast_drop;
  345. struct cdp_pkt_info mec_drop;
  346. struct {
  347. struct cdp_pkt_info pkts;
  348. struct cdp_pkt_info fail;
  349. } intra_bss;
  350. struct {
  351. uint32_t mic_err;
  352. uint32_t decrypt_err;
  353. uint32_t fcserr;
  354. } err;
  355. uint32_t wme_ac_type[WME_AC_MAX];
  356. uint32_t reception_type[MAX_RECEPTION_TYPES];
  357. struct cdp_pkt_type pkt_type[DOT11_MAX];
  358. uint32_t sgi_count[MAX_GI];
  359. uint32_t nss[SS_COUNT];
  360. uint32_t bw[MAX_BW];
  361. uint32_t non_ampdu_cnt;
  362. uint32_t ampdu_cnt;
  363. uint32_t non_amsdu_cnt;
  364. uint32_t amsdu_cnt;
  365. uint32_t bar_recv_cnt;
  366. uint32_t rssi;
  367. uint32_t last_rssi;
  368. uint32_t rx_rate;
  369. uint32_t last_rx_rate;
  370. uint32_t rnd_avg_rx_rate;
  371. uint32_t avg_rx_rate;
  372. struct cdp_pkt_info dot11_rx_pkts;
  373. uint32_t rx_bytes_success_last;
  374. uint32_t rx_data_success_last;
  375. uint32_t rx_byte_rate;
  376. uint32_t rx_data_rate;
  377. uint32_t rx_retries;
  378. uint32_t rx_mpdus;
  379. uint32_t rx_ppdus;
  380. /*add for peer updated for ppdu*/
  381. uint32_t rx_aggr;
  382. uint32_t rx_discard;
  383. uint32_t rx_ratecode;
  384. uint32_t rx_flags;
  385. };
  386. /* struct cdp_tx_ingress_stats - Tx ingress Stats
  387. * @rcvd: Total packets received for transmission
  388. * @processed: Tx packets processed
  389. * @inspect_pkts: Total packets passed to inspect handler
  390. * @nawds_mcast: NAWDS Multicast Packet Count
  391. * @bcast: Number of broadcast packets
  392. * @raw_pkt: Total Raw packets
  393. * @dma_map_error: DMA map error
  394. * @num_seg: No of segments in TSO packets
  395. * @tso_pkt:total no of TSO packets
  396. * @non_tso_pkts: non - TSO packets
  397. * @dropped_host: TSO packets dropped by host
  398. * @dropped_target:TSO packets dropped by target
  399. * @sg_pkt: Total scatter gather packets
  400. * @non_sg_pkts: non SG packets
  401. * @dropped_host: SG packets dropped by host
  402. * @dropped_target: SG packets dropped by target
  403. * @dma_map_error: Dma map error
  404. * @mcast_pkt: total no of multicast conversion packets
  405. * @dropped_map_error: packets dropped due to map error
  406. * @dropped_self_mac: packets dropped due to self Mac address
  407. * @dropped_send_fail: Packets dropped due to send fail
  408. * @ucast: total unicast packets transmitted
  409. * @fail_seg_alloc: Segment allocation failure
  410. * @clone_fail: NBUF clone failure
  411. * @dropped_pkt: Total scatter gather packets
  412. * @desc_na: Desc Not Available
  413. * @ring_full: ring full
  414. * @enqueue_fail: hw enqueue fail
  415. * @dma_error: dma fail
  416. * @res_full: Resource Full: Congestion Control
  417. * @exception_fw: packets sent to fw
  418. * @completion_fw: packets completions received from fw
  419. * @cce_classified:Number of packets classified by CCE
  420. * @cce_classified_raw:Number of raw packets classified by CCE
  421. */
  422. struct cdp_tx_ingress_stats {
  423. struct cdp_pkt_info rcvd;
  424. struct cdp_pkt_info processed;
  425. struct cdp_pkt_info reinject_pkts;
  426. struct cdp_pkt_info inspect_pkts;
  427. struct cdp_pkt_info nawds_mcast;
  428. struct cdp_pkt_info bcast;
  429. struct {
  430. struct cdp_pkt_info raw_pkt;
  431. uint32_t dma_map_error;
  432. } raw;
  433. /* TSO packets info */
  434. struct {
  435. uint32_t num_seg;
  436. struct cdp_pkt_info tso_pkt;
  437. struct cdp_pkt_info non_tso_pkts;
  438. struct cdp_pkt_info dropped_host;
  439. uint32_t dropped_target;
  440. } tso;
  441. /* Scatter Gather packet info */
  442. struct {
  443. struct cdp_pkt_info sg_pkt;
  444. struct cdp_pkt_info non_sg_pkts;
  445. struct cdp_pkt_info dropped_host;
  446. uint32_t dropped_target;
  447. uint32_t dma_map_error;
  448. } sg;
  449. /* Multicast Enhancement packets info */
  450. struct {
  451. struct cdp_pkt_info mcast_pkt;
  452. uint32_t dropped_map_error;
  453. uint32_t dropped_self_mac;
  454. uint32_t dropped_send_fail;
  455. uint32_t ucast;
  456. uint32_t fail_seg_alloc;
  457. uint32_t clone_fail;
  458. } mcast_en;
  459. /* Packets dropped on the Tx side */
  460. struct {
  461. struct cdp_pkt_info dropped_pkt;
  462. struct cdp_pkt_info desc_na;
  463. uint32_t ring_full;
  464. uint32_t enqueue_fail;
  465. uint32_t dma_error;
  466. uint32_t res_full;
  467. /* headroom insufficient */
  468. uint32_t headroom_insufficient;
  469. } dropped;
  470. /* Mesh packets info */
  471. struct {
  472. uint32_t exception_fw;
  473. uint32_t completion_fw;
  474. } mesh;
  475. uint32_t cce_classified;
  476. uint32_t cce_classified_raw;
  477. };
  478. /* struct cdp_vdev_stats - vdev stats structure
  479. * @tx_i: ingress tx stats
  480. * @tx: cdp tx stats
  481. * @rx: cdp rx stats
  482. */
  483. struct cdp_vdev_stats {
  484. struct cdp_tx_ingress_stats tx_i;
  485. struct cdp_tx_stats tx;
  486. struct cdp_rx_stats rx;
  487. };
  488. /* struct cdp_peer_stats - peer stats structure
  489. * @tx: cdp tx stats
  490. * @rx: cdp rx stats
  491. */
  492. struct cdp_peer_stats {
  493. /* CDP Tx Stats */
  494. struct cdp_tx_stats tx;
  495. /* CDP Rx Stats */
  496. struct cdp_rx_stats rx;
  497. };
  498. /* struct cdp_interface_peer_stats - interface structure for txrx peer stats
  499. * @peer_hdl: control path peer handle
  500. * @last_peer_tx_rate: peer tx rate for last transmission
  501. * @peer_tx_rate: tx rate for current transmission
  502. * @peer_rssi: current rssi value of peer
  503. * @rssi_changed: denotes rssi is changed
  504. * @tx_packet_count: tx packet count
  505. * @rx_packet_count: rx packet count
  506. * @tx_byte_count: tx byte count
  507. * @rx_byte_count: rx byte count
  508. * @per: per error rate
  509. */
  510. struct cdp_interface_peer_stats {
  511. void *peer_hdl;
  512. uint32_t last_peer_tx_rate;
  513. uint32_t peer_tx_rate;
  514. uint32_t peer_rssi;
  515. uint32_t tx_packet_count;
  516. uint32_t rx_packet_count;
  517. uint32_t tx_byte_count;
  518. uint32_t rx_byte_count;
  519. uint32_t per;
  520. uint8_t rssi_changed;
  521. };
  522. /* Tx completions per interrupt */
  523. struct cdp_hist_tx_comp {
  524. uint32_t pkts_1;
  525. uint32_t pkts_2_20;
  526. uint32_t pkts_21_40;
  527. uint32_t pkts_41_60;
  528. uint32_t pkts_61_80;
  529. uint32_t pkts_81_100;
  530. uint32_t pkts_101_200;
  531. uint32_t pkts_201_plus;
  532. };
  533. /* Rx ring descriptors reaped per interrupt */
  534. struct cdp_hist_rx_ind {
  535. uint32_t pkts_1;
  536. uint32_t pkts_2_20;
  537. uint32_t pkts_21_40;
  538. uint32_t pkts_41_60;
  539. uint32_t pkts_61_80;
  540. uint32_t pkts_81_100;
  541. uint32_t pkts_101_200;
  542. uint32_t pkts_201_plus;
  543. };
  544. struct cdp_htt_tlv_hdr {
  545. /* BIT [11 : 0] :- tag
  546. * BIT [23 : 12] :- length
  547. * BIT [31 : 24] :- reserved
  548. */
  549. uint32_t tag__length;
  550. };
  551. #define HTT_STATS_SUBTYPE_MAX 16
  552. struct cdp_htt_rx_pdev_fw_stats_tlv {
  553. struct cdp_htt_tlv_hdr tlv_hdr;
  554. /* BIT [ 7 : 0] :- mac_id
  555. * BIT [31 : 8] :- reserved
  556. */
  557. uint32_t mac_id__word;
  558. /* Num PPDU status processed from HW */
  559. uint32_t ppdu_recvd;
  560. /* Num MPDU across PPDUs with FCS ok */
  561. uint32_t mpdu_cnt_fcs_ok;
  562. /* Num MPDU across PPDUs with FCS err */
  563. uint32_t mpdu_cnt_fcs_err;
  564. /* Num MSDU across PPDUs */
  565. uint32_t tcp_msdu_cnt;
  566. /* Num MSDU across PPDUs */
  567. uint32_t tcp_ack_msdu_cnt;
  568. /* Num MSDU across PPDUs */
  569. uint32_t udp_msdu_cnt;
  570. /* Num MSDU across PPDUs */
  571. uint32_t other_msdu_cnt;
  572. /* Num MPDU on FW ring indicated */
  573. uint32_t fw_ring_mpdu_ind;
  574. /* Num MGMT MPDU given to protocol */
  575. uint32_t fw_ring_mgmt_subtype[HTT_STATS_SUBTYPE_MAX];
  576. /* Num ctrl MPDU given to protocol */
  577. uint32_t fw_ring_ctrl_subtype[HTT_STATS_SUBTYPE_MAX];
  578. /* Num mcast data packet received */
  579. uint32_t fw_ring_mcast_data_msdu;
  580. /* Num broadcast data packet received */
  581. uint32_t fw_ring_bcast_data_msdu;
  582. /* Num unicat data packet received */
  583. uint32_t fw_ring_ucast_data_msdu;
  584. /* Num null data packet received */
  585. uint32_t fw_ring_null_data_msdu;
  586. /* Num MPDU on FW ring dropped */
  587. uint32_t fw_ring_mpdu_drop;
  588. /* Num buf indication to offload */
  589. uint32_t ofld_local_data_ind_cnt;
  590. /* Num buf recycle from offload */
  591. uint32_t ofld_local_data_buf_recycle_cnt;
  592. /* Num buf indication to data_rx */
  593. uint32_t drx_local_data_ind_cnt;
  594. /* Num buf recycle from data_rx */
  595. uint32_t drx_local_data_buf_recycle_cnt;
  596. /* Num buf indication to protocol */
  597. uint32_t local_nondata_ind_cnt;
  598. /* Num buf recycle from protocol */
  599. uint32_t local_nondata_buf_recycle_cnt;
  600. /* Num buf fed */
  601. uint32_t fw_status_buf_ring_refill_cnt;
  602. /* Num ring empty encountered */
  603. uint32_t fw_status_buf_ring_empty_cnt;
  604. /* Num buf fed */
  605. uint32_t fw_pkt_buf_ring_refill_cnt;
  606. /* Num ring empty encountered */
  607. uint32_t fw_pkt_buf_ring_empty_cnt;
  608. /* Num buf fed */
  609. uint32_t fw_link_buf_ring_refill_cnt;
  610. /* Num ring empty encountered */
  611. uint32_t fw_link_buf_ring_empty_cnt;
  612. /* Num buf fed */
  613. uint32_t host_pkt_buf_ring_refill_cnt;
  614. /* Num ring empty encountered */
  615. uint32_t host_pkt_buf_ring_empty_cnt;
  616. /* Num buf fed */
  617. uint32_t mon_pkt_buf_ring_refill_cnt;
  618. /* Num ring empty encountered */
  619. uint32_t mon_pkt_buf_ring_empty_cnt;
  620. /* Num buf fed */
  621. uint32_t mon_status_buf_ring_refill_cnt;
  622. /* Num ring empty encountered */
  623. uint32_t mon_status_buf_ring_empty_cnt;
  624. /* Num buf fed */
  625. uint32_t mon_desc_buf_ring_refill_cnt;
  626. /* Num ring empty encountered */
  627. uint32_t mon_desc_buf_ring_empty_cnt;
  628. /* Num buf fed */
  629. uint32_t mon_dest_ring_update_cnt;
  630. /* Num ring full encountered */
  631. uint32_t mon_dest_ring_full_cnt;
  632. /* Num rx suspend is attempted */
  633. uint32_t rx_suspend_cnt;
  634. /* Num rx suspend failed */
  635. uint32_t rx_suspend_fail_cnt;
  636. /* Num rx resume attempted */
  637. uint32_t rx_resume_cnt;
  638. /* Num rx resume failed */
  639. uint32_t rx_resume_fail_cnt;
  640. /* Num rx ring switch */
  641. uint32_t rx_ring_switch_cnt;
  642. /* Num rx ring restore */
  643. uint32_t rx_ring_restore_cnt;
  644. /* Num rx flush issued */
  645. uint32_t rx_flush_cnt;
  646. };
  647. /* == TX PDEV STATS == */
  648. struct cdp_htt_tx_pdev_stats_cmn_tlv {
  649. struct cdp_htt_tlv_hdr tlv_hdr;
  650. /* BIT [ 7 : 0] :- mac_id
  651. * BIT [31 : 8] :- reserved
  652. */
  653. uint32_t mac_id__word;
  654. /* Num queued to HW */
  655. uint32_t hw_queued;
  656. /* Num PPDU reaped from HW */
  657. uint32_t hw_reaped;
  658. /* Num underruns */
  659. uint32_t underrun;
  660. /* Num HW Paused counter. */
  661. uint32_t hw_paused;
  662. /* Num HW flush counter. */
  663. uint32_t hw_flush;
  664. /* Num HW filtered counter. */
  665. uint32_t hw_filt;
  666. /* Num PPDUs cleaned up in TX abort */
  667. uint32_t tx_abort;
  668. /* Num MPDUs requed by SW */
  669. uint32_t mpdu_requed;
  670. /* excessive retries */
  671. uint32_t tx_xretry;
  672. /* Last used data hw rate code */
  673. uint32_t data_rc;
  674. /* frames dropped due to excessive sw retries */
  675. uint32_t mpdu_dropped_xretry;
  676. /* illegal rate phy errors */
  677. uint32_t illgl_rate_phy_err;
  678. /* wal pdev continuous xretry */
  679. uint32_t cont_xretry;
  680. /* wal pdev continuous xretry */
  681. uint32_t tx_timeout;
  682. /* wal pdev resets */
  683. uint32_t pdev_resets;
  684. /* PhY/BB underrun */
  685. uint32_t phy_underrun;
  686. /* MPDU is more than txop limit */
  687. uint32_t txop_ovf;
  688. /* Number of Sequences posted */
  689. uint32_t seq_posted;
  690. /* Number of Sequences failed queueing */
  691. uint32_t seq_failed_queueing;
  692. /* Number of Sequences completed */
  693. uint32_t seq_completed;
  694. /* Number of Sequences restarted */
  695. uint32_t seq_restarted;
  696. /* Number of MU Sequences posted */
  697. uint32_t mu_seq_posted;
  698. /* Number of time HW ring is paused between seq switch within ISR */
  699. uint32_t seq_switch_hw_paused;
  700. /* Number of times seq continuation in DSR */
  701. uint32_t next_seq_posted_dsr;
  702. /* Number of times seq continuation in ISR */
  703. uint32_t seq_posted_isr;
  704. /* Number of seq_ctrl cached. */
  705. uint32_t seq_ctrl_cached;
  706. /* Number of MPDUs successfully transmitted */
  707. uint32_t mpdu_count_tqm;
  708. /* Number of MSDUs successfully transmitted */
  709. uint32_t msdu_count_tqm;
  710. /* Number of MPDUs dropped */
  711. uint32_t mpdu_removed_tqm;
  712. /* Number of MSDUs dropped */
  713. uint32_t msdu_removed_tqm;
  714. /* Num MPDUs flushed by SW, HWPAUSED, SW TXABORT (Reset,channel change) */
  715. uint32_t mpdus_sw_flush;
  716. /* Num MPDUs filtered by HW, all filter condition (TTL expired) */
  717. uint32_t mpdus_hw_filter;
  718. /* Num MPDUs truncated by PDG (TXOP, TBTT, PPDU_duration based on rate, dyn_bw) */
  719. uint32_t mpdus_truncated;
  720. /* Num MPDUs that was tried but didn't receive ACK or BA */
  721. uint32_t mpdus_ack_failed;
  722. /* Num MPDUs that was dropped due to expiry (MSDU TTL). */
  723. uint32_t mpdus_expired;
  724. /* Num MPDUs that was retried within seq_ctrl (MGMT/LEGACY) */
  725. uint32_t mpdus_seq_hw_retry;
  726. /* Num of TQM acked cmds processed */
  727. uint32_t ack_tlv_proc;
  728. /* coex_abort_mpdu_cnt valid. */
  729. uint32_t coex_abort_mpdu_cnt_valid;
  730. /* coex_abort_mpdu_cnt from TX FES stats. */
  731. uint32_t coex_abort_mpdu_cnt;
  732. /* Number of total PPDUs(DATA, MGMT, excludes selfgen) tried over the air (OTA) */
  733. uint32_t num_total_ppdus_tried_ota;
  734. /* Number of data PPDUs tried over the air (OTA) */
  735. uint32_t num_data_ppdus_tried_ota;
  736. /* Num Local control/mgmt frames (MSDUs) queued */
  737. uint32_t local_ctrl_mgmt_enqued;
  738. /* local_ctrl_mgmt_freed:
  739. * Num Local control/mgmt frames (MSDUs) done
  740. * It includes all local ctrl/mgmt completions
  741. * (acked, no ack, flush, TTL, etc)
  742. */
  743. uint32_t local_ctrl_mgmt_freed;
  744. /* Num Local data frames (MSDUs) queued */
  745. uint32_t local_data_enqued;
  746. /* local_data_freed:
  747. * Num Local data frames (MSDUs) done
  748. * It includes all local data completions
  749. * (acked, no ack, flush, TTL, etc)
  750. */
  751. uint32_t local_data_freed;
  752. /* Num MPDUs tried by SW */
  753. uint32_t mpdu_tried;
  754. /* Num of waiting seq posted in isr completion handler */
  755. uint32_t isr_wait_seq_posted;
  756. uint32_t tx_active_dur_us_low;
  757. uint32_t tx_active_dur_us_high;
  758. };
  759. struct cdp_htt_tx_pdev_stats_urrn_tlv_v {
  760. struct cdp_htt_tlv_hdr tlv_hdr;
  761. uint32_t urrn_stats[1]; /* HTT_TX_PDEV_MAX_URRN_STATS */
  762. };
  763. /* NOTE: Variable length TLV, use length spec to infer array size */
  764. struct cdp_htt_tx_pdev_stats_flush_tlv_v {
  765. struct cdp_htt_tlv_hdr tlv_hdr;
  766. uint32_t flush_errs[1]; /* HTT_TX_PDEV_MAX_FLUSH_REASON_STATS */
  767. };
  768. /* NOTE: Variable length TLV, use length spec to infer array size */
  769. struct cdp_htt_tx_pdev_stats_sifs_tlv_v {
  770. struct cdp_htt_tlv_hdr tlv_hdr;
  771. uint32_t sifs_status[1]; /* HTT_TX_PDEV_MAX_SIFS_BURST_STATS */
  772. };
  773. /* NOTE: Variable length TLV, use length spec to infer array size */
  774. struct cdp_htt_tx_pdev_stats_phy_err_tlv_v {
  775. struct cdp_htt_tlv_hdr tlv_hdr;
  776. uint32_t phy_errs[1]; /* HTT_TX_PDEV_MAX_PHY_ERR_STATS */
  777. };
  778. /* == RX PDEV/SOC STATS == */
  779. /* HTT_STATS_RX_SOC_FW_STATS_TAG */
  780. struct cdp_htt_rx_soc_fw_stats_tlv {
  781. struct cdp_htt_tlv_hdr tlv_hdr;
  782. /* Num Packets received on REO FW ring */
  783. uint32_t fw_reo_ring_data_msdu;
  784. /* Num bc/mc packets indicated from fw to host */
  785. uint32_t fw_to_host_data_msdu_bcmc;
  786. /* Num unicast packets indicated from fw to host */
  787. uint32_t fw_to_host_data_msdu_uc;
  788. /* Num remote buf recycle from offload */
  789. uint32_t ofld_remote_data_buf_recycle_cnt;
  790. /* Num remote free buf given to offload */
  791. uint32_t ofld_remote_free_buf_indication_cnt;
  792. };
  793. struct cdp_htt_rx_soc_fw_refill_ring_num_refill_tlv_v {
  794. struct cdp_htt_tlv_hdr tlv_hdr;
  795. /* Num total buf refilled from refill ring */
  796. uint32_t refill_ring_num_refill[1]; /* HTT_RX_STATS_REFILL_MAX_RING */
  797. };
  798. struct cdp_htt_rx_pdev_fw_ring_mpdu_err_tlv_v {
  799. struct cdp_htt_tlv_hdr tlv_hdr;
  800. /* Num error MPDU for each RxDMA error type */
  801. uint32_t fw_ring_mpdu_err[1]; /* HTT_RX_STATS_RXDMA_MAX_ERR */
  802. };
  803. struct cdp_htt_rx_pdev_fw_mpdu_drop_tlv_v {
  804. struct cdp_htt_tlv_hdr tlv_hdr;
  805. /* Num MPDU dropped */
  806. uint32_t fw_mpdu_drop[1]; /* HTT_RX_STATS_FW_DROP_REASON_MAX */
  807. };
  808. #define HTT_STATS_PHY_ERR_MAX 43
  809. struct cdp_htt_rx_pdev_fw_stats_phy_err_tlv {
  810. struct cdp_htt_tlv_hdr tlv_hdr;
  811. /* BIT [ 7 : 0] :- mac_id
  812. * BIT [31 : 8] :- reserved
  813. */
  814. uint32_t mac_id__word;
  815. /* Num of phy err */
  816. uint32_t total_phy_err_cnt;
  817. /* Counts of different types of phy errs
  818. * The mapping of PHY error types to phy_err array elements is HW dependent.
  819. * The only currently-supported mapping is shown below:
  820. *
  821. * 0 phyrx_err_phy_off Reception aborted due to receiving a PHY_OFF TLV
  822. * 1 phyrx_err_synth_off
  823. * 2 phyrx_err_ofdma_timing
  824. * 3 phyrx_err_ofdma_signal_parity
  825. * 4 phyrx_err_ofdma_rate_illegal
  826. * 5 phyrx_err_ofdma_length_illegal
  827. * 6 phyrx_err_ofdma_restart
  828. * 7 phyrx_err_ofdma_service
  829. * 8 phyrx_err_ppdu_ofdma_power_drop
  830. * 9 phyrx_err_cck_blokker
  831. * 10 phyrx_err_cck_timing
  832. * 11 phyrx_err_cck_header_crc
  833. * 12 phyrx_err_cck_rate_illegal
  834. * 13 phyrx_err_cck_length_illegal
  835. * 14 phyrx_err_cck_restart
  836. * 15 phyrx_err_cck_service
  837. * 16 phyrx_err_cck_power_drop
  838. * 17 phyrx_err_ht_crc_err
  839. * 18 phyrx_err_ht_length_illegal
  840. * 19 phyrx_err_ht_rate_illegal
  841. * 20 phyrx_err_ht_zlf
  842. * 21 phyrx_err_false_radar_ext
  843. * 22 phyrx_err_green_field
  844. * 23 phyrx_err_bw_gt_dyn_bw
  845. * 24 phyrx_err_leg_ht_mismatch
  846. * 25 phyrx_err_vht_crc_error
  847. * 26 phyrx_err_vht_siga_unsupported
  848. * 27 phyrx_err_vht_lsig_len_invalid
  849. * 28 phyrx_err_vht_ndp_or_zlf
  850. * 29 phyrx_err_vht_nsym_lt_zero
  851. * 30 phyrx_err_vht_rx_extra_symbol_mismatch
  852. * 31 phyrx_err_vht_rx_skip_group_id0
  853. * 32 phyrx_err_vht_rx_skip_group_id1to62
  854. * 33 phyrx_err_vht_rx_skip_group_id63
  855. * 34 phyrx_err_ofdm_ldpc_decoder_disabled
  856. * 35 phyrx_err_defer_nap
  857. * 36 phyrx_err_fdomain_timeout
  858. * 37 phyrx_err_lsig_rel_check
  859. * 38 phyrx_err_bt_collision
  860. * 39 phyrx_err_unsupported_mu_feedback
  861. * 40 phyrx_err_ppdu_tx_interrupt_rx
  862. * 41 phyrx_err_unsupported_cbf
  863. * 42 phyrx_err_other
  864. */
  865. uint32_t phy_err[HTT_STATS_PHY_ERR_MAX];
  866. };
  867. struct cdp_htt_rx_soc_fw_refill_ring_empty_tlv_v {
  868. struct cdp_htt_tlv_hdr tlv_hdr;
  869. /* Num ring empty encountered */
  870. uint32_t refill_ring_empty_cnt[1]; /* HTT_RX_STATS_REFILL_MAX_RING */
  871. };
  872. struct cdp_htt_tx_pdev_stats {
  873. struct cdp_htt_tx_pdev_stats_cmn_tlv cmn_tlv;
  874. struct cdp_htt_tx_pdev_stats_urrn_tlv_v underrun_tlv;
  875. struct cdp_htt_tx_pdev_stats_sifs_tlv_v sifs_tlv;
  876. struct cdp_htt_tx_pdev_stats_flush_tlv_v flush_tlv;
  877. struct cdp_htt_tx_pdev_stats_phy_err_tlv_v phy_err_tlv;
  878. };
  879. struct cdp_htt_rx_soc_stats_t {
  880. struct cdp_htt_rx_soc_fw_stats_tlv fw_tlv;
  881. struct cdp_htt_rx_soc_fw_refill_ring_empty_tlv_v fw_refill_ring_empty_tlv;
  882. struct cdp_htt_rx_soc_fw_refill_ring_num_refill_tlv_v fw_refill_ring_num_refill_tlv;
  883. };
  884. struct cdp_htt_rx_pdev_stats {
  885. struct cdp_htt_rx_soc_stats_t soc_stats;
  886. struct cdp_htt_rx_pdev_fw_stats_tlv fw_stats_tlv;
  887. struct cdp_htt_rx_pdev_fw_ring_mpdu_err_tlv_v fw_ring_mpdu_err_tlv;
  888. struct cdp_htt_rx_pdev_fw_mpdu_drop_tlv_v fw_ring_mpdu_drop;
  889. struct cdp_htt_rx_pdev_fw_stats_phy_err_tlv fw_stats_phy_err_tlv;
  890. };
  891. /* struct cdp_pdev_stats - pdev stats
  892. * @msdu_not_done: packets dropped because msdu done bit not set
  893. * @mec:Multicast Echo check
  894. * @mesh_filter: Mesh Filtered packets
  895. * @mon_rx_drop: packets dropped on monitor vap
  896. * @pkts: total packets replenished
  897. * @rxdma_err: rxdma errors for replenished
  898. * @nbuf_alloc_fail: nbuf alloc failed
  899. * @map_err: Mapping failure
  900. * @x86_fail: x86 failures
  901. * @low_thresh_intrs: low threshold interrupts
  902. * @rx_raw_pkts: Rx Raw Packets
  903. * @mesh_mem_alloc: Mesh Rx Stats Alloc fail
  904. * @tso_desc_cnt: TSO descriptors
  905. * @sg_desc_cnt: SG Descriptors
  906. * @desc_alloc_fail: desc alloc failed errors
  907. * @ip_csum_err: ip checksum errors
  908. * @tcp_udp_csum_err: tcp/udp checksum errors
  909. * @buf_freelist: buffers added back in freelist
  910. * @tx_i: Tx Ingress stats
  911. * @tx:CDP Tx Stats
  912. * @rx: CDP Rx Stats
  913. * @tx_comp_histogram: Number of Tx completions per interrupt
  914. * @rx_ind_histogram: Number of Rx ring descriptors reaped per interrupt
  915. * @ppdu_stats_counter: ppdu stats counter
  916. * @htt_tx_pdev_stats: htt pdev stats for tx
  917. * @htt_rx_pdev_stats: htt pdev stats for rx
  918. */
  919. struct cdp_pdev_stats {
  920. struct {
  921. uint32_t msdu_not_done;
  922. uint32_t mec;
  923. uint32_t mesh_filter;
  924. uint32_t mon_rx_drop;
  925. } dropped;
  926. struct {
  927. struct cdp_pkt_info pkts;
  928. uint32_t rxdma_err;
  929. uint32_t nbuf_alloc_fail;
  930. uint32_t map_err;
  931. uint32_t x86_fail;
  932. uint32_t low_thresh_intrs;
  933. } replenish;
  934. uint32_t rx_raw_pkts;
  935. uint32_t mesh_mem_alloc;
  936. uint32_t tso_desc_cnt;
  937. uint32_t sg_desc_cnt;
  938. /* Rx errors */
  939. struct {
  940. uint32_t desc_alloc_fail;
  941. uint32_t ip_csum_err;
  942. uint32_t tcp_udp_csum_err;
  943. } err;
  944. uint32_t buf_freelist;
  945. struct cdp_tx_ingress_stats tx_i;
  946. struct cdp_tx_stats tx;
  947. struct cdp_rx_stats rx;
  948. struct cdp_hist_tx_comp tx_comp_histogram;
  949. struct cdp_hist_rx_ind rx_ind_histogram;
  950. uint64_t ppdu_stats_counter[CDP_PPDU_STATS_MAX_TAG];
  951. struct cdp_htt_tx_pdev_stats htt_tx_pdev_stats;
  952. struct cdp_htt_rx_pdev_stats htt_rx_pdev_stats;
  953. };
  954. #ifndef BIG_ENDIAN_HOST
  955. typedef struct {
  956. uint64_t pkts;
  957. uint64_t bytes;
  958. } ol_txrx_stats_elem;
  959. #else
  960. struct ol_txrx_elem_t {
  961. uint64_t pkts;
  962. uint64_t bytes;
  963. };
  964. typedef struct ol_txrx_elem_t ol_txrx_stats_elem;
  965. #endif
  966. #ifndef CONFIG_MCL
  967. /**
  968. * @brief data stats published by the host txrx layer
  969. */
  970. struct ol_txrx_stats {
  971. struct {
  972. /* MSDUs received from the stack */
  973. ol_txrx_stats_elem from_stack;
  974. /* MSDUs successfully sent across the WLAN */
  975. ol_txrx_stats_elem delivered;
  976. struct {
  977. /* MSDUs that the host did not accept */
  978. ol_txrx_stats_elem host_reject;
  979. /* MSDUs which could not be downloaded to the target */
  980. ol_txrx_stats_elem download_fail;
  981. /*
  982. * MSDUs which the target discarded
  983. * (lack of mem or old age)
  984. */
  985. ol_txrx_stats_elem target_discard;
  986. /*
  987. * MSDUs which the target sent but couldn't get
  988. * an ack for
  989. */
  990. ol_txrx_stats_elem no_ack;
  991. /* MSDUs dropped in NSS-FW */
  992. ol_txrx_stats_elem nss_ol_dropped;
  993. } dropped;
  994. u_int32_t desc_in_use;
  995. u_int32_t desc_alloc_fails;
  996. u_int32_t ce_ring_full;
  997. u_int32_t dma_map_error;
  998. /* MSDUs given to the txrx layer by the management stack */
  999. ol_txrx_stats_elem mgmt;
  1000. struct {
  1001. /* TSO applied jumbo packets received from NW Stack */
  1002. ol_txrx_stats_elem tso_pkts;
  1003. /* Non - TSO packets */
  1004. ol_txrx_stats_elem non_tso_pkts;
  1005. /* TSO packets : Dropped during TCP segmentation*/
  1006. ol_txrx_stats_elem tso_dropped;
  1007. /* TSO Descriptors */
  1008. u_int32_t tso_desc_cnt;
  1009. } tso;
  1010. struct {
  1011. /* TSO applied jumbo packets received from NW Stack */
  1012. ol_txrx_stats_elem sg_pkts;
  1013. /* Non - TSO packets */
  1014. ol_txrx_stats_elem non_sg_pkts;
  1015. /* TSO packets : Dropped during TCP segmentation*/
  1016. ol_txrx_stats_elem sg_dropped;
  1017. /* TSO Descriptors */
  1018. u_int32_t sg_desc_cnt;
  1019. } sg;
  1020. struct {
  1021. /* packets enqueued for flow control */
  1022. u_int32_t fl_ctrl_enqueue;
  1023. /* packets discarded for flow control is full */
  1024. u_int32_t fl_ctrl_discard;
  1025. /* packets sent to CE without flow control */
  1026. u_int32_t fl_ctrl_avoid;
  1027. } fl_ctrl;
  1028. } tx;
  1029. struct {
  1030. /* MSDUs given to the OS shim */
  1031. ol_txrx_stats_elem delivered;
  1032. /* MSDUs forwarded from the rx path to the tx path */
  1033. ol_txrx_stats_elem forwarded;
  1034. /* MSDUs in which ipv4 chksum error detected by HW */
  1035. ol_txrx_stats_elem ipv4_cksum_err;
  1036. /* MSDUs in which tcp chksum error detected by HW */
  1037. ol_txrx_stats_elem tcp_ipv4_cksum_err;
  1038. /* MSDUs in which udp chksum error detected by HW */
  1039. ol_txrx_stats_elem udp_ipv4_cksum_err;
  1040. /* MSDUs in which tcp V6 chksum error detected by HW */
  1041. ol_txrx_stats_elem tcp_ipv6_cksum_err;
  1042. /* MSDUs in which UDP V6 chksum error detected by HW */
  1043. ol_txrx_stats_elem udp_ipv6_cksum_err;
  1044. } rx;
  1045. struct {
  1046. /* Number of mcast received for conversion */
  1047. u_int32_t num_me_rcvd;
  1048. /* Number of unicast sent as part of mcast conversion */
  1049. u_int32_t num_me_ucast;
  1050. /* Number of multicast frames dropped due to dma_map failure */
  1051. u_int32_t num_me_dropped_m;
  1052. /*
  1053. * Number of multicast frames dropped due to allocation
  1054. * failure
  1055. */
  1056. u_int32_t num_me_dropped_a;
  1057. /* Number of multicast frames dropped due to internal failure */
  1058. u_int32_t num_me_dropped_i;
  1059. /* Number of me buf currently in use */
  1060. u_int32_t num_me_buf;
  1061. /* Number of me buf frames to self mac address */
  1062. u_int32_t num_me_dropped_s;
  1063. /* Number of me buf in use in non pool based allocation*/
  1064. u_int32_t num_me_nonpool;
  1065. /* Number of me buf allocated using non pool based allocation*/
  1066. u_int32_t num_me_nonpool_count;
  1067. } mcast_enhance;
  1068. };
  1069. struct ol_ath_dbg_rx_rssi {
  1070. uint8_t rx_rssi_pri20;
  1071. uint8_t rx_rssi_sec20;
  1072. uint8_t rx_rssi_sec40;
  1073. uint8_t rx_rssi_sec80;
  1074. };
  1075. struct ol_ath_radiostats {
  1076. uint64_t tx_beacon;
  1077. uint32_t tx_buf_count;
  1078. int32_t tx_mgmt;
  1079. int32_t rx_mgmt;
  1080. uint32_t rx_num_mgmt;
  1081. uint32_t rx_num_ctl;
  1082. uint32_t tx_rssi;
  1083. uint32_t rx_rssi_comb;
  1084. struct ol_ath_dbg_rx_rssi rx_rssi_chain0;
  1085. struct ol_ath_dbg_rx_rssi rx_rssi_chain1;
  1086. struct ol_ath_dbg_rx_rssi rx_rssi_chain2;
  1087. struct ol_ath_dbg_rx_rssi rx_rssi_chain3;
  1088. uint32_t rx_overrun;
  1089. uint32_t rx_phyerr;
  1090. uint32_t ackRcvBad;
  1091. uint32_t rtsBad;
  1092. uint32_t rtsGood;
  1093. uint32_t fcsBad;
  1094. uint32_t noBeacons;
  1095. uint32_t mib_int_count;
  1096. uint32_t rx_looplimit_start;
  1097. uint32_t rx_looplimit_end;
  1098. uint8_t ap_stats_tx_cal_enable;
  1099. uint8_t self_bss_util;
  1100. uint8_t obss_util;
  1101. uint8_t ap_rx_util;
  1102. uint8_t free_medium;
  1103. uint8_t ap_tx_util;
  1104. uint8_t obss_rx_util;
  1105. uint8_t non_wifi_util;
  1106. uint32_t tgt_asserts;
  1107. int16_t chan_nf;
  1108. int16_t chan_nf_sec80;
  1109. uint64_t wmi_tx_mgmt;
  1110. uint64_t wmi_tx_mgmt_completions;
  1111. uint32_t wmi_tx_mgmt_completion_err;
  1112. uint32_t peer_delete_req;
  1113. uint32_t peer_delete_resp;
  1114. uint32_t rx_mgmt_rssi_drop;
  1115. uint32_t tx_frame_count;
  1116. uint32_t rx_frame_count;
  1117. uint32_t rx_clear_count;
  1118. uint32_t cycle_count;
  1119. uint32_t phy_err_count;
  1120. uint32_t chan_tx_pwr;
  1121. uint32_t be_nobuf;
  1122. uint32_t tx_packets;
  1123. uint32_t rx_packets;
  1124. uint32_t tx_num_data;
  1125. uint32_t rx_num_data;
  1126. uint32_t tx_mcs[10];
  1127. uint32_t rx_mcs[10];
  1128. uint64_t rx_bytes;
  1129. uint64_t tx_bytes;
  1130. uint32_t tx_compaggr;
  1131. uint32_t rx_aggr;
  1132. uint32_t tx_bawadv;
  1133. uint32_t tx_compunaggr;
  1134. uint32_t rx_badcrypt;
  1135. uint32_t rx_badmic;
  1136. uint32_t rx_crcerr;
  1137. uint32_t rx_last_msdu_unset_cnt;
  1138. uint32_t rx_data_bytes;
  1139. uint32_t tx_retries;
  1140. };
  1141. /*
  1142. * Enumeration of PDEV Configuration parameter
  1143. */
  1144. enum _ol_ath_param_t {
  1145. OL_ATH_PARAM_TXCHAINMASK = 1,
  1146. OL_ATH_PARAM_RXCHAINMASK = 2,
  1147. OL_ATH_PARAM_AMPDU = 6,
  1148. OL_ATH_PARAM_AMPDU_LIMIT = 7,
  1149. OL_ATH_PARAM_AMPDU_SUBFRAMES = 8,
  1150. OL_ATH_PARAM_TXPOWER_LIMIT2G = 12,
  1151. OL_ATH_PARAM_TXPOWER_LIMIT5G = 13,
  1152. OL_ATH_PARAM_LDPC = 32,
  1153. OL_ATH_PARAM_VOW_EXT_STATS = 45,
  1154. OL_ATH_PARAM_DYN_TX_CHAINMASK = 73,
  1155. OL_ATH_PARAM_BURST_ENABLE = 77,
  1156. OL_ATH_PARAM_BURST_DUR = 78,
  1157. OL_ATH_PARAM_BCN_BURST = 80,
  1158. OL_ATH_PARAM_DCS = 82,
  1159. #if UMAC_SUPPORT_PERIODIC_PERFSTATS
  1160. OL_ATH_PARAM_PRDPERFSTAT_THRPUT_ENAB = 83,
  1161. OL_ATH_PARAM_PRDPERFSTAT_THRPUT_WIN = 84,
  1162. OL_ATH_PARAM_PRDPERFSTAT_THRPUT = 85,
  1163. OL_ATH_PARAM_PRDPERFSTAT_PER_ENAB = 86,
  1164. OL_ATH_PARAM_PRDPERFSTAT_PER_WIN = 87,
  1165. OL_ATH_PARAM_PRDPERFSTAT_PER = 88,
  1166. #endif
  1167. /* UMAC_SUPPORT_PERIODIC_PERFSTATS */
  1168. OL_ATH_PARAM_TOTAL_PER = 89,
  1169. /* set manual rate for rts frame */
  1170. OL_ATH_PARAM_RTS_CTS_RATE = 92,
  1171. /* co channel interference threshold level */
  1172. OL_ATH_PARAM_DCS_COCH_THR = 93,
  1173. /* transmit error threshold */
  1174. OL_ATH_PARAM_DCS_TXERR_THR = 94,
  1175. /* phy error threshold */
  1176. OL_ATH_PARAM_DCS_PHYERR_THR = 95,
  1177. /*
  1178. * The IOCTL number is 114, it is made 114, inorder to make the IOCTL
  1179. * number same as Direct-attach IOCTL.
  1180. * Please, don't change number. This IOCTL gets the Interface code path
  1181. * it should be either DIRECT-ATTACH or OFF-LOAD.
  1182. */
  1183. OL_ATH_PARAM_GET_IF_ID = 114,
  1184. /* Enable Acs back Ground Channel selection Scan timer in AP mode*/
  1185. OL_ATH_PARAM_ACS_ENABLE_BK_SCANTIMEREN = 118,
  1186. /* ACS scan timer value in Seconds */
  1187. OL_ATH_PARAM_ACS_SCANTIME = 119,
  1188. /* Negligence Delta RSSI between two channel */
  1189. OL_ATH_PARAM_ACS_RSSIVAR = 120,
  1190. /* Negligence Delta Channel load between two channel*/
  1191. OL_ATH_PARAM_ACS_CHLOADVAR = 121,
  1192. /* Enable Limited OBSS check */
  1193. OL_ATH_PARAM_ACS_LIMITEDOBSS = 122,
  1194. /* Acs control flag for Scan timer */
  1195. OL_ATH_PARAM_ACS_CTRLFLAG = 123,
  1196. /* Acs Run time Debug level*/
  1197. OL_ATH_PARAM_ACS_DEBUGTRACE = 124,
  1198. OL_ATH_PARAM_SET_FW_HANG_ID = 137,
  1199. /* Radio type 1:11ac 0:11abgn */
  1200. OL_ATH_PARAM_RADIO_TYPE = 138,
  1201. OL_ATH_PARAM_IGMPMLD_OVERRIDE, /* IGMP/MLD packet override */
  1202. OL_ATH_PARAM_IGMPMLD_TID, /* IGMP/MLD packet TID no */
  1203. OL_ATH_PARAM_ARPDHCP_AC_OVERRIDE,
  1204. OL_ATH_PARAM_NON_AGG_SW_RETRY_TH,
  1205. OL_ATH_PARAM_AGG_SW_RETRY_TH,
  1206. /* Dont change this number it as per sync with DA
  1207. Blocking certian channel from ic channel list */
  1208. OL_ATH_PARAM_DISABLE_DFS = 144,
  1209. OL_ATH_PARAM_ENABLE_AMSDU = 145,
  1210. OL_ATH_PARAM_ENABLE_AMPDU = 146,
  1211. OL_ATH_PARAM_STA_KICKOUT_TH,
  1212. OL_ATH_PARAM_WLAN_PROF_ENABLE,
  1213. OL_ATH_PARAM_LTR_ENABLE,
  1214. OL_ATH_PARAM_LTR_AC_LATENCY_BE = 150,
  1215. OL_ATH_PARAM_LTR_AC_LATENCY_BK,
  1216. OL_ATH_PARAM_LTR_AC_LATENCY_VI,
  1217. OL_ATH_PARAM_LTR_AC_LATENCY_VO,
  1218. OL_ATH_PARAM_LTR_AC_LATENCY_TIMEOUT,
  1219. OL_ATH_PARAM_LTR_TX_ACTIVITY_TIMEOUT = 155,
  1220. OL_ATH_PARAM_LTR_SLEEP_OVERRIDE,
  1221. OL_ATH_PARAM_LTR_RX_OVERRIDE,
  1222. OL_ATH_PARAM_L1SS_ENABLE,
  1223. OL_ATH_PARAM_DSLEEP_ENABLE,
  1224. /* radar error threshold */
  1225. OL_ATH_PARAM_DCS_RADAR_ERR_THR = 160,
  1226. /* Tx channel utilization due to AP's tx and rx */
  1227. OL_ATH_PARAM_DCS_USERMAX_CU_THR,
  1228. /* interference detection threshold */
  1229. OL_ATH_PARAM_DCS_INTR_DETECT_THR,
  1230. /* sampling window, default 10secs */
  1231. OL_ATH_PARAM_DCS_SAMPLE_WINDOW,
  1232. /* debug logs enable/disable */
  1233. OL_ATH_PARAM_DCS_DEBUG,
  1234. OL_ATH_PARAM_ANI_ENABLE = 165,
  1235. OL_ATH_PARAM_ANI_POLL_PERIOD,
  1236. OL_ATH_PARAM_ANI_LISTEN_PERIOD,
  1237. OL_ATH_PARAM_ANI_OFDM_LEVEL,
  1238. OL_ATH_PARAM_ANI_CCK_LEVEL,
  1239. OL_ATH_PARAM_DSCP_TID_MAP = 170,
  1240. OL_ATH_PARAM_TXPOWER_SCALE,
  1241. /* Phy error penalty */
  1242. OL_ATH_PARAM_DCS_PHYERR_PENALTY,
  1243. #if ATH_SUPPORT_DSCP_OVERRIDE
  1244. /* set/get TID for sending HMMC packets */
  1245. OL_ATH_PARAM_HMMC_DSCP_TID_MAP,
  1246. /* set/get DSCP mapping override */
  1247. OL_ATH_PARAM_DSCP_OVERRIDE,
  1248. /* set/get HMMC-DSCP mapping override */
  1249. OL_ATH_PARAM_HMMC_DSCP_OVERRIDE = 175,
  1250. #endif
  1251. #if ATH_RX_LOOPLIMIT_TIMER
  1252. OL_ATH_PARAM_LOOPLIMIT_NUM,
  1253. #endif
  1254. OL_ATH_PARAM_ANTENNA_GAIN_2G,
  1255. OL_ATH_PARAM_ANTENNA_GAIN_5G,
  1256. OL_ATH_PARAM_RX_FILTER,
  1257. #if ATH_SUPPORT_HYFI_ENHANCEMENTS
  1258. OL_ATH_PARAM_BUFF_THRESH = 180,
  1259. OL_ATH_PARAM_BLK_REPORT_FLOOD,
  1260. OL_ATH_PARAM_DROP_STA_QUERY,
  1261. #endif
  1262. OL_ATH_PARAM_QBOOST,
  1263. OL_ATH_PARAM_SIFS_FRMTYPE,
  1264. OL_ATH_PARAM_SIFS_UAPSD = 185,
  1265. OL_ATH_PARAM_FW_RECOVERY_ID,
  1266. OL_ATH_PARAM_RESET_OL_STATS,
  1267. OL_ATH_PARAM_AGGR_BURST,
  1268. /* Number of deauth sent in consecutive rx_peer_invalid */
  1269. OL_ATH_PARAM_DEAUTH_COUNT,
  1270. OL_ATH_PARAM_BLOCK_INTERBSS = 190,
  1271. /* Firmware reset control for Bmiss / timeout / reset */
  1272. OL_ATH_PARAM_FW_DISABLE_RESET,
  1273. OL_ATH_PARAM_MSDU_TTL,
  1274. OL_ATH_PARAM_PPDU_DURATION,
  1275. OL_ATH_PARAM_SET_TXBF_SND_PERIOD,
  1276. OL_ATH_PARAM_ALLOW_PROMISC = 195,
  1277. OL_ATH_PARAM_BURST_MODE,
  1278. OL_ATH_PARAM_DYN_GROUPING,
  1279. OL_ATH_PARAM_DPD_ENABLE,
  1280. OL_ATH_PARAM_DBGLOG_RATELIM,
  1281. /* firmware should intimate us about ps state change for node */
  1282. OL_ATH_PARAM_PS_STATE_CHANGE = 200,
  1283. OL_ATH_PARAM_MCAST_BCAST_ECHO,
  1284. /* OBSS RSSI threshold for 20/40 coexistence */
  1285. OL_ATH_PARAM_OBSS_RSSI_THRESHOLD,
  1286. /* Link/node RX RSSI threshold for 20/40 coexistence */
  1287. OL_ATH_PARAM_OBSS_RX_RSSI_THRESHOLD,
  1288. #if ATH_CHANNEL_BLOCKING
  1289. OL_ATH_PARAM_ACS_BLOCK_MODE = 205,
  1290. #endif
  1291. OL_ATH_PARAM_ACS_TX_POWER_OPTION,
  1292. /*
  1293. * Default Antenna Polarization MSB 8 bits (24:31) specifying
  1294. * enable/disable ; LSB 24 bits (0:23) antenna mask value
  1295. */
  1296. OL_ATH_PARAM_ANT_POLARIZATION,
  1297. /* rate limit mute type error prints */
  1298. OL_ATH_PARAM_PRINT_RATE_LIMIT,
  1299. OL_ATH_PARAM_PDEV_RESET, /* Reset FW PDEV*/
  1300. /* Do not crash host when target assert happened*/
  1301. OL_ATH_PARAM_FW_DUMP_NO_HOST_CRASH = 210,
  1302. /* Consider OBSS non-erp to change to long slot*/
  1303. OL_ATH_PARAM_CONSIDER_OBSS_NON_ERP_LONG_SLOT = 211,
  1304. OL_ATH_PARAM_STATS_FC,
  1305. OL_ATH_PARAM_QFLUSHINTERVAL,
  1306. OL_ATH_PARAM_TOTAL_Q_SIZE,
  1307. OL_ATH_PARAM_TOTAL_Q_SIZE_RANGE0,
  1308. OL_ATH_PARAM_TOTAL_Q_SIZE_RANGE1,
  1309. OL_ATH_PARAM_TOTAL_Q_SIZE_RANGE2,
  1310. OL_ATH_PARAM_TOTAL_Q_SIZE_RANGE3,
  1311. OL_ATH_PARAM_MIN_THRESHOLD,
  1312. OL_ATH_PARAM_MAX_Q_LIMIT,
  1313. OL_ATH_PARAM_MIN_Q_LIMIT,
  1314. OL_ATH_PARAM_CONG_CTRL_TIMER_INTV,
  1315. OL_ATH_PARAM_STATS_TIMER_INTV,
  1316. OL_ATH_PARAM_ROTTING_TIMER_INTV,
  1317. OL_ATH_PARAM_LATENCY_PROFILE,
  1318. OL_ATH_PARAM_HOSTQ_DUMP,
  1319. OL_ATH_PARAM_TIDQ_MAP,
  1320. OL_ATH_PARAM_DBG_ARP_SRC_ADDR, /* ARP DEBUG source address*/
  1321. OL_ATH_PARAM_DBG_ARP_DST_ADDR, /* ARP DEBUG destination address*/
  1322. OL_ATH_PARAM_ARP_DBG_CONF, /* ARP debug configuration */
  1323. OL_ATH_PARAM_DISABLE_STA_VAP_AMSDU, /* Disable AMSDU for station vap */
  1324. #if ATH_SUPPORT_DFS && ATH_SUPPORT_STA_DFS
  1325. OL_ATH_PARAM_STADFS_ENABLE = 300, /* STA DFS is enabled or not */
  1326. #endif
  1327. #if QCA_AIRTIME_FAIRNESS
  1328. OL_ATH_PARAM_ATF_STRICT_SCHED = 301,
  1329. OL_ATH_PARAM_ATF_GROUP_POLICY = 302,
  1330. #endif
  1331. #if DBDC_REPEATER_SUPPORT
  1332. OL_ATH_PARAM_PRIMARY_RADIO,
  1333. OL_ATH_PARAM_DBDC_ENABLE,
  1334. #endif
  1335. OL_ATH_PARAM_TXPOWER_DBSCALE,
  1336. OL_ATH_PARAM_CTL_POWER_SCALE,
  1337. #if QCA_AIRTIME_FAIRNESS
  1338. OL_ATH_PARAM_ATF_OBSS_SCHED = 307,
  1339. OL_ATH_PARAM_ATF_OBSS_SCALE = 308,
  1340. #endif
  1341. OL_ATH_PARAM_PHY_OFDM_ERR = 309,
  1342. OL_ATH_PARAM_PHY_CCK_ERR = 310,
  1343. OL_ATH_PARAM_FCS_ERR = 311,
  1344. OL_ATH_PARAM_CHAN_UTIL = 312,
  1345. #if DBDC_REPEATER_SUPPORT
  1346. OL_ATH_PARAM_CLIENT_MCAST,
  1347. #endif
  1348. OL_ATH_PARAM_EMIWAR_80P80 = 314,
  1349. OL_ATH_PARAM_BATCHMODE = 315,
  1350. OL_ATH_PARAM_PACK_AGGR_DELAY = 316,
  1351. #if UMAC_SUPPORT_ACFG
  1352. OL_ATH_PARAM_DIAG_ENABLE = 317,
  1353. #endif
  1354. #if ATH_SUPPORT_VAP_QOS
  1355. OL_ATH_PARAM_VAP_QOS = 318,
  1356. #endif
  1357. OL_ATH_PARAM_CHAN_STATS_TH = 319,
  1358. /* Passive scan is enabled or disabled */
  1359. OL_ATH_PARAM_PASSIVE_SCAN_ENABLE = 320,
  1360. OL_ATH_MIN_RSSI_ENABLE = 321,
  1361. OL_ATH_MIN_RSSI = 322,
  1362. OL_ATH_PARAM_ACS_2G_ALLCHAN = 323,
  1363. #if DBDC_REPEATER_SUPPORT
  1364. OL_ATH_PARAM_DELAY_STAVAP_UP = 324,
  1365. #endif
  1366. /* It is used to set the channel switch options */
  1367. OL_ATH_PARAM_CHANSWITCH_OPTIONS = 327,
  1368. OL_ATH_BTCOEX_ENABLE = 328,
  1369. OL_ATH_BTCOEX_WL_PRIORITY = 329,
  1370. OL_ATH_PARAM_TID_OVERRIDE_QUEUE_MAPPING = 330,
  1371. OL_ATH_PARAM_CAL_VER_CHECK = 331,
  1372. OL_ATH_PARAM_NO_VLAN = 332,
  1373. OL_ATH_PARAM_CCA_THRESHOLD = 333,
  1374. OL_ATH_PARAM_ATF_LOGGING = 334,
  1375. OL_ATH_PARAM_STRICT_DOTH = 335,
  1376. OL_ATH_PARAM_DISCONNECTION_TIMEOUT = 336,
  1377. OL_ATH_PARAM_RECONFIGURATION_TIMEOUT = 337,
  1378. OL_ATH_PARAM_CHANNEL_SWITCH_COUNT = 338,
  1379. OL_ATH_PARAM_ALWAYS_PRIMARY = 339,
  1380. OL_ATH_PARAM_FAST_LANE = 340,
  1381. OL_ATH_GET_BTCOEX_DUTY_CYCLE = 341,
  1382. OL_ATH_PARAM_SECONDARY_OFFSET_IE = 342,
  1383. OL_ATH_PARAM_WIDE_BAND_SUB_ELEMENT = 343,
  1384. OL_ATH_PARAM_PREFERRED_UPLINK = 344,
  1385. OL_ATH_PARAM_PRECAC_ENABLE = 345,
  1386. OL_ATH_PARAM_PRECAC_TIMEOUT = 346,
  1387. OL_ATH_COEX_VER_CFG = 347,
  1388. OL_ATH_PARAM_DUMP_TARGET = 348,
  1389. OL_ATH_PARAM_PDEV_TO_REO_DEST = 349,
  1390. OL_ATH_PARAM_DUMP_CHAINMASK_TABLES = 350,
  1391. OL_ATH_PARAM_DUMP_OBJECTS = 351,
  1392. OL_ATH_PARAM_ACS_SRLOADVAR = 352,
  1393. OL_ATH_PARAM_MGMT_RSSI_THRESHOLD = 353,
  1394. OL_ATH_PARAM_EXT_NSS_CAPABLE = 354,
  1395. OL_ATH_PARAM_MGMT_PDEV_STATS_TIMER = 355,
  1396. OL_ATH_PARAM_TXACKTIMEOUT = 356,
  1397. OL_ATH_PARAM_ICM_ACTIVE = 357,
  1398. OL_ATH_PARAM_NOMINAL_NOISEFLOOR = 358,
  1399. OL_ATH_PARAM_CHAN_INFO = 359,
  1400. OL_ATH_PARAM_ACS_RANK = 360,
  1401. OL_ATH_PARAM_TXCHAINSOFT = 361,
  1402. OL_ATH_PARAM_WIDE_BAND_SCAN = 362,
  1403. OL_ATH_PARAM_CCK_TX_ENABLE = 363,
  1404. OL_ATH_PARAM_PAPI_ENABLE = 364,
  1405. OL_ATH_PARAM_ISOLATION = 365,
  1406. OL_ATH_PARAM_MAX_CLIENTS_PER_RADIO = 366,
  1407. #if defined(WLAN_DFS_PARTIAL_OFFLOAD) && defined(HOST_DFS_SPOOF_TEST)
  1408. OL_ATH_PARAM_DFS_HOST_WAIT_TIMEOUT = 367,
  1409. #endif
  1410. OL_ATH_PARAM_NF_THRESH = 368,
  1411. #ifdef OL_ATH_SMART_LOGGING
  1412. OL_ATH_PARAM_SMARTLOG_ENABLE = 369,
  1413. OL_ATH_PARAM_SMARTLOG_FATAL_EVENT = 370,
  1414. OL_ATH_PARAM_SMARTLOG_SKB_SZ = 371,
  1415. OL_ATH_PARAM_SMARTLOG_P1PINGFAIL = 372,
  1416. #endif /* OL_ATH_SMART_LOGGING */
  1417. #ifdef WLAN_DFS_PRECAC_AUTO_CHAN_SUPPORT
  1418. OL_ATH_PARAM_PRECAC_INTER_CHANNEL = 373,
  1419. OL_ATH_PARAM_PRECAC_CHAN_STATE = 374,
  1420. #endif
  1421. OL_ATH_PARAM_DBR_RING_STATUS = 375,
  1422. #ifdef QCN_ESP_IE
  1423. OL_ATH_PARAM_ESP_PERIODICITY = 376,
  1424. OL_ATH_PARAM_ESP_AIRTIME = 377,
  1425. OL_ATH_PARAM_ESP_PPDU_DURATION = 378,
  1426. OL_ATH_PARAM_ESP_BA_WINDOW = 379,
  1427. #endif /* QCN_ESP_IE */
  1428. OL_ATH_PARAM_CBS = 380,
  1429. OL_ATH_PARAM_DCS_SIM = 381,
  1430. OL_ATH_PARAM_CBS_DWELL_SPLIT_TIME = 382,
  1431. OL_ATH_PARAM_CBS_DWELL_REST_TIME = 383,
  1432. OL_ATH_PARAM_CBS_WAIT_TIME = 384,
  1433. OL_ATH_PARAM_CBS_REST_TIME = 385,
  1434. OL_ATH_PARAM_CBS_CSA = 386,
  1435. OL_ATH_PARAM_TWICE_ANTENNA_GAIN = 387,
  1436. OL_ATH_PARAM_ACTIVITY_FACTOR = 388,
  1437. OL_ATH_PARAM_CHAN_AP_RX_UTIL = 389,
  1438. OL_ATH_PARAM_CHAN_FREE = 390,
  1439. OL_ATH_PARAM_CHAN_AP_TX_UTIL = 391,
  1440. OL_ATH_PARAM_CHAN_OBSS_RX_UTIL = 392,
  1441. OL_ATH_PARAM_CHAN_NON_WIFI = 393,
  1442. #if PEER_FLOW_CONTROL
  1443. OL_ATH_PARAM_VIDEO_STATS_FC = 394,
  1444. OL_ATH_PARAM_VIDEO_DELAY_STATS_FC = 395,
  1445. #endif
  1446. OL_ATH_PARAM_ENABLE_PEER_RETRY_STATS = 396,
  1447. OL_ATH_PARAM_HE_UL_TRIG_INT = 397,
  1448. OL_ATH_PARAM_DFS_NOL_SUBCHANNEL_MARKING = 398,
  1449. /*
  1450. * Get the band that is tuned for low, high,
  1451. * full band freq range or it's 2g
  1452. */
  1453. OL_ATH_PARAM_BAND_INFO = 399,
  1454. OL_ATH_PARAM_BW_REDUCE = 400,
  1455. };
  1456. /* Enumeration of PDEV Configuration parameter */
  1457. enum _ol_hal_param_t {
  1458. OL_HAL_CONFIG_DMA_BEACON_RESPONSE_TIME = 0
  1459. };
  1460. #endif
  1461. /* Bitmasks for stats that can block */
  1462. #define EXT_TXRX_FW_STATS 0x0001
  1463. #endif