cdp_txrx_stats_struct.h 50 KB

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