Commit Graph

332 Commits

Author SHA1 Message Date
Varsha Mishra
0d2ec58510 qcacmn: Fill metadata for sawf feature
Fill metadata for transmission in lithium and berrylium
when sawf is enabled.

Change-Id: Icc76ca7b8310c21a98e7f01984d4901afba0526c
CRs-Fixed: 3138558
2022-03-02 01:28:33 -08:00
Amit Mehta
8aa367acfa qcacmn: Print ring information in htt srng init and cfg
As part of debug enhancement Print ring information in
htt srng init and htt srng cfg

Change-Id: I59a7831b6ded1028b3a8f246656e982ae7de5b86
CRs-Fixed: 3133836
2022-02-28 17:44:15 -08:00
Basamma Yakkanahalli
e85fbce095 qcacmn: change to configure and handle undecoded metadata capture
Added change:
1. Set/reset RXDMA MON STATUS ring filter setting and send HTT
   message to capture undecoded frame
2. Handle undecoded frame to update cdp_rx_indication_ppdu structure
   from hal ppdu_info rx status and generate WDI event to deliver it
   to upper layer

Change-Id: I14485f28333b113b5a2fab639611551c2b08af2b
2022-02-18 04:53:18 -08:00
Ripan Deuri
831995f9ca qcacmn: Add default queue map config message handler
Add default queue map config msg handler. This msg is sent by the target
in response to a default queue map request.

Change-Id: Id08e0b175172614514b9fb2dcabcc5f7f068896f
CRs-Fixed: 3126854
2022-02-17 06:25:05 -08:00
Naga
03c268ac2d qcacmn: Fix to receive correct buffer address
Fix to receive correct descriptor buffer address
for tx monitor

Fix to send correct filter settings enabled

Disabled default filter display log level to debug.

Change-Id: I7ca1b1110cdcb10ca65ab8c414c19a81f1f4d331
CRs-Fixed: 3121965
2022-02-14 07:12:25 -08:00
Amir Patel
28ecc1a2f1 qcacmn: Add RxMON global enable support
Add RxMON global enable support for WKK

Change-Id: If732318788821303441a5db9ebe21bd2d56b3679
CRs-Fixed: 3123532
2022-02-04 19:55:36 -08:00
Amir Patel
2219ac036c qcacmn: Use appropriate srng id in htt_srng_setup and ring_selction_cg
Use appropriate srng id in htt_srng_setup and ring_selction_cg
for WKK monitor

Change-Id: Ibe04f51f787e6fa3fe0b9d8a8c6a54a33f673139
2022-01-10 23:53:51 -08:00
Naga
a78c5cfb98 qcacmn: Filter settings for monitor 2.0
Filter setting for monitor 2.0

Change-Id: I008c38977952767b9901705f0cf667178f38a786
CRs-Fixed: 3087759
2022-01-10 22:14:07 -08:00
Naga
7798784bc5 qcacmn: Fixes for compilation issues
- Fixes for compilation issues after enabling
  monitor 2.0 support.
- change copyright year for all files in the chain.

Change-Id: I885e257bd8ca83850656d8a1f408c1bc34920d7a
CRs-Fixed: 3086483
2022-01-10 06:24:34 -08:00
Rakesh Pillai
125174cdd1 qcacmn: Initialize only one RXDMA Monitor Status ring
For WCN7850, the first mac (i.e.. MAC0) is capable of
2G/5G and 6G data transfer. Hence initialize and use
only on RXDMA monitor status ring.

Change-Id: Idb6e23a887a9ed32a52dd54765e5ed3c6a12df06
CRs-Fixed: 3094138
2021-12-28 10:51:54 -08:00
Sai Rupesh Chevuru
b43e679a58 qcacmn: Multicast support for MLO
Multicast support for MLO
1. Following functions are newly added.
	dp_rx_igmp_handler()
	dp_tx_mlo_mcast_handler_be()
	dp_rx_mlo_mcast_handler_be()
	dp_mlo_get_mcast_primary_vdev()

Change-Id: If215f843369e6e2621ef302b924e524c86f0d30b
2021-12-16 05:35:30 -08:00
Rakesh Pillai
63233c05dd qcacmn: Initialize only 1 RXDMA DST ring for WCN7850
WCN7850 has only one RXDMA DST ring, as opposed to other
lithium family chipsets, which had 2 RXDMA DST ring.

Refactor the code to pick the number of rxdma destination
rings from CFG context.

Change-Id: I20d475c02690043e969bc7a78605809b8c6814ae
CRs-Fixed: 3084440
2021-12-15 08:43:59 -08:00
Harsh Kumar Bijlani
21fb667866 qcacmn: Correct the offsets & byte cnt computation in HTT stats
Offsets used by host for HTT stats are not aligned as per the
structure declaration given in file htt.h .
Make change to use the correct offsets to get the correct stats.

Also make change for byte count computation.

Also make cleanup changes for FR65817.

Change-Id: I8bc6164cc4994c49536d7277779f25b258be1592
CRs-Fixed: 3082742
2021-12-06 21:13:41 -08:00
Harsh Kumar Bijlani
356b9766fd qcacmn: Host<->FW HTT interface for HW vdev stats in BE
Define the interface for Host and FW communication required for
configuration of HW vdev stats in BE architecture and add handler
for vdev stats received from FW.

Change-Id: I5f6a703596bd1fbb5e27e6261befda25aa0c3e12
CRs-Fixed: 3067843
2021-11-30 00:58:11 -08:00
Adwait Nayak
c96961a186 qcacmn: FR65980: Add MLO timestamp support for pktlog
Whenever firmware receives the sync interrupt, it would
update the MLO offset to the scratch registers. Additionally,
firmware also sends a HTT message.

The values from the HTT message are copied into two structures:
1. into the dp_pdev structure, for monitor mode usage
2. into the scn structure for updating the pktlog header
    A new WDI event is introduced for MLO timestamp sync into
    pktlog header. Host sends the WDI event once it receives
    htt msg and the data gets parsed in the pktlog handler and
    eventually pktlog header gets updated with those values.

Whenever pktlog memory is being filled, the latest value from scn
structure is filled into the pktlog header. Upon receiving a new
HTT message, the value in the scn structure is updated and
subsequently into the pktlog records as well. All the 8 bytes
from the HTT message are required to calculate the MLO timestamp
offset. The calculation of MLO timestamp offset is to be taken
care by the PKTLOG parsing script.

Change-Id: If1d40b4a889e58b358f0feae692958bca2b8e1de
CRs-Fixed: 3074184
2021-11-26 10:13:16 -08:00
Devender Kumar
30482aa5c4 qcacmn: Change buffer replenishment model for SDX+Pine
For IPQ products, there is 1 refill ring which is of hardware type
and host replenishes the buffers onto this ring so that hardware can
use these buffers for Rx.

In IPA offload mode, the buffer replenishment model is different from
the one mentioned above. There are 3 refill rings, out of which,
2 are software refill rings (1 for host and 1 for IPA), and last ring
is hardware ring given to FW.
Ring given to IPA is to refill the buffers after processing the
regular Rx packets and ring given to host is to refill the buffers
after processing of exception packets. Since there are 2 entities to
refill the buffers, the hardware ring given to FW multiplexes these 2
software rings and provides the buffers to hardware.

Make changes to follow above replenishment model for SDX+Pine
integration.

Change-Id: I0d9e4ec811a3023a258e0a6b9ee22ccdffcebafa
CRs-Fixed: 3049633
2021-11-19 03:22:08 -08:00
Rakesh Pillai
2069fa6cdd qcacmn: Handle htt peer map/unmap v3
Add the handler for processing the htt
peer map/unamp v3 and MLO peer map/unmap msgs.

Change-Id: Ie2ab0b76e7aee566ca3b9637b83fd7a14718ab01
CRs-Fixed: 3039326
2021-10-15 13:13:22 -07:00
Naga
c46ec16889 qcacmn: Add change to modify if to ifdef
Add change to modify if to ifdef

Change-Id: I49e3841deb4168cbbc4e0a4f045413717aa97d2a
CRs-Fixed: 3050747
2021-10-12 02:29:35 -07:00
Naga
e1a6f926ed qcacmn: Add new HTT msg support for BE
- Add support htt msg for HTT_H2T_MSG_TYPE_TX_RING_SELECTION_CFG
  msg configuration
- Add support for configurable length dma
  per packet type for rx monitor.
- Add support for wordmask subscription for rx monitor.
- Add support for per packet msdu/mpdu logging config.
- Add support for tx monitor tlv subscription.
- Dummy APIs for 2.0 filter configuration

Change-Id: I36b18c03eff452537c2f051b24275b81ab98ebae
CRs-Fixed: 2991330
2021-10-12 02:29:05 -07:00
Harsh Kumar Bijlani
2cd98c7974 qcacmn: Restrict length of pdev backpressure event list
In current architecture, when host receives backpressure
event from FW, it prints pdev_id, ring_id, hp and tp values
for that ring in the tasklet context.
In same context, memory to hold the information of other
rings is allocate,  which then put into the list maintained
at pdev level and work is scheduled for printing this info.

In scenarios of heavy load, where the backpressure events
are continuously triggered, the list can grow to a bigger
one and printing of ring stats for all of these events can
be a heavy CPU hit.

As an optimization, restrict the depth of the list to 16
by checking the size of list when backpressure event is
received from FW. When list size reaches the max value (16),
then remove the entry from head and insert the new entry at tail.

Also in the worker thread, fetch only 1 entry from the list for
printing and schedule the work again if the list is not empty.

Change-Id: If4291b9d5ebee1e3d1eea80bbd0134faf090b2b8
CRs-Fixed: 3049635
2021-10-08 02:36:17 -07:00
sandhu
18fe5c3f02 qcacmn: Add dp functionality to support stats sysfs
Add dp functionality to collect stats for sysfs buffer.
Add both host and fw stats.

Change-Id: I64f84804d36cccec9d701925d96cc7ee96943b7a
CRs-Fixed: 3035864
2021-10-05 02:51:27 -07:00
Pavankumar Nandeshwar
6b1d142d98 qcacmn: Enable wds changes in Beryllium
wds in Beryllium is managed by hardware.
Make use of hardware managedwds and disable
the corresponding wds handling done in host
for Beryllium.

Change-Id: I39f23cb40c6c5f85ada8ce59c92ff2855bb18da3
2021-09-30 15:15:25 -07:00
Harsh Kumar Bijlani
f366355211 qcacmn: Correct the HTT config parameters for Pine full monitor mode
For Pine full monitor configuration to FW, HTT config parameters are
incorrect. Make change to use correct config parameters.

Change-Id: I964c8a28cea36b4e1e93c106540412c8cbfc7f29
CRs-Fixed: 3029362
2021-09-04 07:58:08 -07:00
Devender Kumar
c182e1e3e9 qcacmn: Use sw_peer_id instead of ast_index to get peer
In order to support flow overide feature,
AST table has to be split between RxPCU and DDR.
With this split, RX monitor cannot make use of
ast_index to fetch peer as it is not from DDR.
So make use of sw_peer_id to fetch peer.
This sw_peer_id is derived from RX_MPDU_STAT_START_TLV

Change-Id: Ib2a003a2640fded3287c318d2ad59fd3127af9b6
CRs-fixed: 3004363
2021-08-12 08:29:37 -07:00
aloksing
b158abe417 qcacmn: API renaming for monitor module
Add prefix dp for all monitor APIs
Add mon_debug/mon_info/mon_err for logs

Change-Id: I71d49f6bcacd77f5695269817fed83337169227b
CRs-Fixed: 3006497
2021-08-12 05:32:47 -07:00
aloksing
c60b9619a3 qcacmn: Conditionally compile monitor related features and issue fixes
PATCH[7/7]:
This patch consists following changes:
 -Conditionally compile all monitor destination ring related code
  Macro used QCA_MONITOR_PKT_SUPPORT
 -Add QCA_ENHANCED_STATS_SUPPORT macro to conditionally compile
  enhanced stats support
 -Use QCA_MCOPY_SUPPORT and QCA_TX_CAPTURE_SUPPORT macros
  to conditionally compile MCOPY and Tx capture features
  respectively
 -Use QCN_IE macro to conditionally compile BPR
  feature
 -Use QCA_ADVANCE_MON_FILTER_SUPPORT macro to conditionally
  compile advance monitor filter feature
 -Fix vdev attach issue for special and smart monitor vap
 -Fix status ring initialization issue.

Change-Id: I0deaa28a9a54bf34b0f41e6dd510fdd8d4992db2
CRs-Fixed: 2983780
2021-07-30 21:51:26 -07:00
aloksing
53fe7000ba qcacmn: Move monitor related fields from soc/pdev to mon_soc/mon_pdev
PATCH[6/7]:
This patch consists following changes:
 -Move monitor related pdev variables to struct dp_mon_pdev
 -Move monitor relted soc variables to struct dp_mon_soc
 -Move cookie to monitor link desc va to monitor file
 -Add APIs to access monitor related variables
 -Add dummy APIs to build without monitor support.

Change-Id: I032a480b1383d061f984cee3ba6b10ac7a0ff350
CRs-Fixed: 2983781
2021-07-30 21:51:21 -07:00
aloksing
e7cc727374 qcacmn: Move core monitor and monitor dependent feature func
PATCH[4/7]:
This patch consists following changes:
 - Move core monitor and monitor dependent feature functions
   to monitor file
 - Move enhanced stats functions from htt to monitor file
 - Move vdev set monitor mode rings function to monitor file
 - Create and initialize relevant funct ptrs
 - Initialize cdp monitor related ops.

Change-Id: Iac1ab43eb1c4b98bd21bbb8a5741ee53034da2f1
CRs-Fixed: 2984635
2021-07-30 21:51:12 -07:00
Manoj Ekbote
190ff6c23e qcacmn: Retrieve BSS color from TLV
In Tx monitor code, BSS color needs to be retrieved
from the PPDU TLV so that it matches the value in
transmitted packet.

Change-Id: I6e1dce3992264ebea2db37b2d9c8f156a23df028
2021-07-11 02:15:44 -07:00
Vinay Adella
d86a4a60a2 qcacmn: Move NAPI stats to workqueue
When back pressure event comes from FW print NAPI stats in worker
theread to avoid cascading the issue by causing more latency in
processing the CE rings, due to the prints.

Change-Id: Ic846e06ae4b47f8ad46b269c8a175db7ed46b9bf
2021-07-06 11:55:17 -07:00
sandhu
9dc81d7965 qcacmn: Add HTT HTC tx completion based packet free
Add CE4 tx completion for htt htc packets. current logic
uses htt htc misc list to free packets.

Change-Id: Iea15d0dba544d3cc7581b11aa7ab7e5c0024133a
CRs-Fixed: 2630768
2021-05-17 18:56:02 -07:00
Yu Tian
73de559075 qcacmn: avoid of HTC buffer double free in HTC send failure case
HTC buffer is freed in enqueue failure case. Then it is requeued to
htt_htc_pkt_misclist also. In deinit flow, misclist entry should be
cleared, so buffer double free is hit in this stage. Make a change
to not requeue this frame to misclist.

Change-Id: I0211c4b548d7df7176ee72a83e21f8fcf7fa464c
CRs-Fixed: 2942972
2021-05-16 22:47:56 -07:00
Amir Patel
770ebeb20f qcacmn: Reduce log level to suppress print
For every channel change, a print is displayed onto console.
reduce log level to suppress print.

CRs-Fixed: 2921656
Change-Id: Ib300ecc17c09412aa6502cc45ec1c4b7da3b54ce
2021-05-11 05:54:28 -07:00
Chaithanya Garrepalli
970948916a qcacmn: print backpressure stats in work queue context
Avoid backpressure event prints in irq context and
defer work queue context

Change-Id: Ib68237d6a9930ead38f53aa89ec1d9e9a2f4147d
2021-04-29 14:29:33 -07:00
Ruben Columbus
5708cdac6f qcacmn: remove preamble from peer delayed stats
delete copy preamble from ppdu_desc to peer in data type case.
this will give mu_bar preamble of a data frame instead of ctrl frame.

this will not affect tx_capture given that preamble is copied to
phy_type in ppdu_desc from ppdu_desc preamble itself.

this should fix issue with pulling information from ppdu descriptor by
having data frames with low mcs. mcs was correct but preamble gave
impression that frame was a data but it was a ctrl frame.

Change-Id: Id82e6eb98af0e9488227bff43fc77f188eee77e3
2021-03-31 19:06:27 -07:00
Ruben Columbus
2216aa520b qcacmn: lock on queue
Adding lock for dp_txrx_ppdu_stats_handler given
that insertion and deletion happen in different cores.

Change-Id: Ic0102d615f02cbfed70acc1114a314426466638e
2021-03-18 13:47:18 -07:00
nobelj
5144f963ef qcacmn: Added field to get valid sequence number
sequence number populated from tlv are incorrect for some frames.
Firmware populate correct sequence number for management and control
frame either in payload or tlv itself.

added field to get valid sequence number.

Change-Id: I21b1c34c0d66cb46c3a0baaaa231c952de065534
2021-02-15 22:33:03 -08:00
Vulupala Shashank Reddy
1065dc8179 qcacmn: Refactor compilation flag of pkt capture mode
Refactor WLAN_FEATURE_PKT_CAPTURE_LITHIUM to WLAN_FEATURE_PKT_CAPTURE_V2
to remove hardware name from compilation flag.

Change-Id: I5a30b33d8bd6065d12e7c89c666c2f0cab66344e
CRs-Fixed: 2869827
2021-02-11 00:24:33 -08:00
Kai Chen
2667f112d8 qcacmn: Add CBF support for pktlog
Fix issue on enabling packet log.
Fix issue on logging CBF pkt in AP/STA mode.
Fix issue on setting data length 4 bytes aligned in pktlog header
, htt stats indication message header and Rx management TLV header.
Add CBF support for pktlog WMI enable command for firmware to enable
CBF receive.

Change-Id: Ib0067f32d7414be96503c4c67846c1312a59586e
2021-02-10 20:27:29 -08:00
Vijay Krishnan
4427314322 qcacmn: Setting up filters and destination ring for CBF logging
This change will set up monitor mode status and destination ring
filters for enbale CBF logging and will enable destination ring to
capture CBF frame. This change will get the CBF frame from the
destination ring and send it to the pktlog module for post processing
through WDI event. CBF is a compressed beamforming report.

Change-Id: I4cc419440ba8d60446dd1f01747340a89f023171
2021-01-29 16:48:58 -08:00
Ruben Columbus
2864444839 qcacmn: copying over mcs for delayed frames
mcs is copied over to already in used ppdu_desc
this prevents ppdu_desc to increase lower mcs counts during stats
process

Change-Id: Iec68438a86359ec791302ecf2eeaec4fbd941632
2021-01-26 01:36:40 -08:00
Surabhi Vishnoi
01c8d3f45f qcacmn: Add support for RX offload packets in packet capture mode
Add support to process RX offload packets in packet capture mode.
To distinguish rx offload packets from normal rx packets,
DP_PEER_METADATA_OFFLOAD bit is set in peer metadata, based on value
of this bit rx packet is delivered to stack or packet capture
component.

Change-Id: Ice656a0bc14efd0382c4949d695daa8e926ce41e
CRs-Fixed: 2856792
2021-01-22 16:12:18 -08:00
Tallapragada Kalyan
3ae6e993b4 qcacmn: add support for multi soc htt logger
add support for multi soc htt logger

Change-Id: Ic007fb2cdf8a504991b3e1b98cc49cb2a8246c52
2021-01-08 01:37:33 -08:00
Chaithanya Garrepalli
3ab152450d qcacmn: fix print format compilation errors
Fix print format compilation errors and remove
no-format compilation flag

Change-Id: I69cd0c2eedaa4f2b4189275bf639f48a2fa6b80b
2021-01-07 23:29:09 -08:00
Vulupala Shashank Reddy
86566328a2 qcacmn: Add WDI event for offload tx data for packet capture mode
Add WDI event and call wdi event handler to deliver offload tx
packets to packet capture mode.

Change-Id: I064ffaaebd13bcf2060d91c58a07b93ec741b133
CRs-Fixed: 2844731
2020-12-28 17:17:45 -08:00
Shikha Bakshi
f429625c5b qcacmn: Modify logs for QDF_MODULE_ID_DP_HTT
Add macros dp_htt_info, dp_htt_debug, dp_htt_err,etc. to define logs

Change-Id: I9226f3f7cabb4e861ff279ab239c6bc400a6c8cf
CRs-Fixed: 2830387
2020-12-18 09:36:38 -08:00
Neha Bisht
0e390d9bab qcacmn: Provide support for avg. phyrate stats
Provide support for average tx and rx phyrate statistics

Change-Id: Ib1c2d2c90ca6a8a0f1ac1bc08d9e1f89537cbb4d
2020-12-17 05:11:54 -08:00
Nandha Kishore Easwaran
1a0bc1efc4 qcacmn: Data path changes for big endian platform
Add reo ring descrptor swap in case of big endian platform.
Convert msi_data into little endian format before writing into
MSI_DATA register. Also change into little endian format while accessing
the shared LMAC registers.

Change-Id: I07f4ae4e6df4608201b63d325c2cbc37436d1592
2020-11-20 08:35:22 -08:00
Ananya Gupta
ea977dc41c qcacmn: Count htc packets failed or not freed in misclist
HTC packets were mapped but not unmapped or freed. As part of
hdd_wlan_stop_modules(), all nbufs will be freed in misclist
and TxQueue.
Adding debug change to count number of htc packets failed to
send and count number of nbufs in misclist are skipped when
freeing them.

Change-Id: I868621a67cf89d9b84e202843990f576973ec334
CRs-Fixed: 2807407
2020-11-09 00:57:56 -08:00
Shivani Soni
7eff827653 qcacmn: Update msg length for debugfs support for HTT stats
Update message length for debugfs support for HTT stats.
Max length will be 2048 to avoid mem leak issue.

Change-Id: I4688f4ae52d5dfc5317a1f8fe1ada334af2eb8c5
CRs-Fixed: 2792365
2020-10-14 03:25:13 -07:00