cdp_txrx_stats_struct.h 47 KB

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