Commit Graph

31 Commits

Author SHA1 Message Date
Harsh Kumar Bijlani
eb56570ae1 Revert "qcacmn: Use qdf flex mem to allocate rx ppdu info"
This reverts commit I2318f6c5f33e5337f6398263d6717da698be7c92.

Change-Id: Ia60fe6ddb66623761c11398d89d6039c66994b66
CRs-Fixed: 3235962
2022-07-08 19:47:28 +05:30
Jeevan Kukkalli
e0231b2771 qcacmn: Handle invalid decap type during rx mon tlv processing
- Handle scenario where decap type may be invalid when
  buff address tlv is received.
- Add check for min number of frags during restitch process.
- Minor fixes during rx mon tlv processing.

Change-Id: I0120d97e297701362183189e29c1d5df91affdc1
CRs-Fixed: 3216050
2022-07-06 01:02:13 -07:00
Amir Patel
59b643e25f qcacmn: Use qdf flex mem to allocate rx ppdu info
To avoid fragmentation, use qdf flex mem framework
to allocate rx ppdu info

CRs-Fixed: 3230970
Change-Id: I2318f6c5f33e5337f6398263d6717da698be7c92
2022-07-04 01:14:15 -07:00
Nandha Kishore Easwaran
db03569b0e qcacmn: Remove type option from peer config
Remove type option from peer config as host doesn't have to track the
state of peer. State transition between associated and non-associated
peer is seamlessly taken care in FW and no host intervention is
needed.

Change-Id: If85ff68878fb2284ff28ff93320ca009377a90e6
CRs-Fixed: 3221274
2022-06-29 09:32:57 -07:00
Amir Patel
debe4c7ecf qcacmn: Fix issues from monitor path
a. Fix memleak issue due to RX_HDR not received for a MPDU
b. Compute appropriate packet offset for non-decapped packets
c. Add correct DMA_LEN while adding a frag to SKB.
d. Add debug stats

Change-Id: Ie946f79df94df05789220b97c159c60d608bf1b2
CRs-Fixed: 3213698
2022-06-28 12:17:51 -07:00
Yu Wang
a9461beb20 qcacmn: refine the APIs for reap timer of monitor status ring
Since more than one components depend on reap timer of
monitor status ring, add bitmap to record the trigger
sources of the timer and refine the APIs/calling functions
accordingly.

With this change:
When a new start request comes, if the source is
CDP_MON_REAP_SOURCE_ANY, skip bit set, and start timer
if any bit has been set in the bitmap; while for the
other sources, set the bit and start timer if the bitmap
is empty before that.

When a new stop request comes, if the source is
CDP_MON_REAP_SOURCE_ANY, skip bit clear, and stop timer
if any bit has been set in the bitmap; while for the
other sources, clear the bit and stop timer if the bitmap
is empty after that.

Change-Id: Idaa7837c4b93b247ff2236aa5072d309fa9548c2
CRs-Fixed: 3190347
2022-06-13 22:54:46 -07:00
Jeevan Kukkalli
ec2838ac4d qcacmn: Make lite mon enum generic
-Some of the lite monitor enums can be used outside of
 lite monitor feature, make such enums generic.
-Some enums are redundant, remove such enums and make use
 of existing ones

Change-Id: I5125384ac5c4c55a57998fb5be5ee1ecb3e61147
CRs-Fixed: 3190754
2022-05-25 04:55:51 -07:00
Jeevan Kukkalli
660a0d7e2c qcacmn: Add stats to count mpdu dropped due to ppdu id mismatch
During frequent channel changes in corner case we observe
that mpdu ppdu id does not match dest ring curring ppdu id.
Such mpdus are dropped. Add stats to count such dropped mpdus.

Change-Id: If52e81f4e718ce0d7f83a41f4f0121394525b9df
CRs-Fixed: 3144784
2022-05-20 14:21:26 -07:00
Jeevan Kukkalli
bf5043dc92 qcacmn: set appropriate rx packet offset
Set appropriate rx packet offset when full pkt is
subscribed in litemon case.

Change-Id: I1b1149b5105ce2b61c6e6ddc7841c21ce0b7870c
CRs-Fixed: 3183047
2022-04-29 00:57:59 -07:00
KARTHIK KUMAR T
21fcb24a2c qcacmn: Add RSSI specific parameters in mon pdev
RSSI calibration parameters are received as part
of WMI event from FW, update these parameters to
monitor pdev via CDP interface.

Change-Id: I5060795918571763ad467aae93729040fbca96a1
CRs-Fixed: 3147897
2022-04-22 07:26:51 -07:00
Jeevan Kukkalli
af7c896bdc qcacmn: Add lite mon rx filter setup/reset functions
Add function to setup/reset lite monitor filters
whenever lite monitor mode is enabled/disabled
respectively through cmd line.
Also add function to configure rx header tlv dma length.

Change-Id: Ia5d8bc36e1d033b3e15737bb6b9854f6a7cdd5df
CRs-Fixed: 3143570
2022-04-20 03:12:41 -07:00
aloksing
2c977089aa qcacmn: Get puncture type from puncture pattern
Populate punctured pattern from WIFIPHYRX_COMMON_USER_INFO_E
And get puncture type from puncture pattern.

Change-Id: I3a5ba4c7c478d15cf3c3cfdcfd0573775ae342ca
CRs-Fixed: 3166010
2022-04-13 05:18:17 -07:00
Jeevan Kukkalli
7f9da4ae12 qcacmn: Add lite monitor set/get functions
-Add lite monitor tx/rx filter config set/get fucntions
-Add lite monitor tx/rx peer config set/get functions

Change-Id: I47cc1085c64468b8a0fada871e2f5d3707ca7063
CRs-Fixed: 3078298
2022-04-05 10:11:03 -07:00
Basamma Yakkanahalli
70f4513196 qcacmn: Add support for undecoded frame error stats
Display phyrx aborted undecoded frame count and the aborted
reason statistics as part of pdev rx mon stats.

Change-Id: Ia86074e62af3179855734b47801715abd1899fe1
CRs-Fixed: 3123540
2022-03-01 07:07:33 -08:00
Harsh Kumar Bijlani
a8a078e59a qcacmn: Define macro for maximum mcs value for 11AX and 11BE
Define macro for maximum mcs values for 11AX and 11BE.
Also move bandwidth enums to cdp header file.

Change-Id: Ic24b9fa459b160702fa35162955c6bcdf678c97f
CRs-Fixed: 3134964
2022-02-28 11:38:54 -08:00
Pooventhiran G
886ce189d0 qcacmn: Track PN failures with relevant stats
When validating MMIE, if PN error is found, track it using relevant
statistics. Defined WMI_HOST_RXERR_PN to flag such PN errors.

Change-Id: Icb1fe9a653f67611539b5cb463adfceadedae38e
2022-02-02 03:16:24 -08:00
Yeshwanth Sriram Guntuka
7e9e7e4bcd qcacmn: Use the appropriate desc pool for mon status ring
In dp_mon_status_srng_drop_for_mac, the rx_desc pool
used for status ring is dest ring desc pool which is
not the appropriate one.

Fix is to use the appropriate desc pool for mon status
ring.

Change-Id: I6f178354789212b375a7a541366bef590a925568
CRs-Fixed: 2800658
2020-10-24 15:45:50 -07:00
Yeshwanth Sriram Guntuka
c5a9883e25 qcacmn: Drop packets from RXDMA2SW ring on the non-monitoring MAC
In monitor mode, if channel is initially configured from 5G
band and then moved to channel from 2G band, packets are still
received on MAC-0 RXDMA2SW ring since IMPS is disabled for both
MACs. Since driver reaps only MAC-1 RXDMA2SW ring, ring full
condition is hit for the MAC-0 ring causing ring backpressure.

Fix is to drop packets received on the non-monitoring MAC
ring.

Change-Id: I49cb276827f4a06791183ee3fe8c88ba84df085d
CRs-Fixed: 2791341
2020-10-19 07:08:01 -07:00
Amir
376724d4f9 qcacmn: Add WAR to skip status ring entry
STATUS_BUFFER_DONE tlv written in first word for a status
buffer indicates that DMA is done for that status ring entry.

In existing implementation, for a status ring entry if
STATUS_BUFFER_DONE tlv is not written by HW, we poll on to status ring
entry until DMA is done by HW.

During lmac reset it may happnen that HW will not write STATUS_BUFFER_DONE
tlv in status buffer, in that case we end up polling infinitely leading
to backpressure on monitor status ring.

As per MAC team's suggestion, when HP + 1 entry is peeked and if DMA
is not done and if HP + 2 entry's DMA done is set,
replenish HP + 1 entry and start processing in next interrupt.
If HP + 2 entry's DMA done is not set,
poll onto HP + 1 entry DMA done to be set.

CRs-Fixed: 2740988
Change-Id: Ieef667f0bb4a47e74fc320c93243c637409f47f0
2020-08-26 14:32:13 -07:00
Kai Chen
ee26d03b10 qcacmn: resolve issue on updating protocol tag
Skip protocol tag updating from msdu end TLV protocol tag meta data
when there is RXDMA REO entrance push error on monitor destination ring.
The attention and msdu end TLV is not updated reliably when there
is RXDMA REO entrance push error such as FCS error on monitor
destination ring.

Change-Id: I4098c01251b4f4cb2e796d450c156ba8f2b9464d
2020-07-23 19:28:48 -07:00
Amir
d2e553e973 qcacmn: Add debug statistics for monitor mode
qcacmn: Add debug statistics for monitor mode

Change-Id: I3fe59af1c7f561bd22f502eb5b19265ecd49ee69
CRs-Fixed: 2677656
2020-05-07 08:44:20 -07:00
Kai Chen
93d8e4ae42 qcacmn: enable monitor destination ring interrupt
Enable monitor destination ring interrupt to fix
packet is getting stuck in monitor mode.
Fix and add monitor mode debug count

Change-Id: I74efdcf6a4373dd73e373285c8cd3aa5757cd0b2
2020-04-19 10:03:37 -07:00
Amir Patel
925a7d389c qcacmn: Add full monitor mode changes
Add following changes:
	a. Add CDP API to config full monitor mode
	b. HTT configuration changes
	c. Init/Deinit changes for full monitor mode resources

CRs-Fixed: 2632442
Change-Id: I06db5194031b3ea0f0c1e5deda20df4bc0faa0b9
2020-03-20 22:16:00 -07:00
Ruben Columbus
1bec34c1e4 qcacmn: add ppdu_desc to cdp_tx_indication_info
ppdu_desc contains more information that is relevant to radiotap.

Change-Id: Ie2d0d53027958edf0a1032b270b7a8339b849924
2019-12-23 01:20:33 -08:00
Rakesh Pillai
836b6690cb qcacmn: reduce log level for mon status ring tlv-tag error
STATUS_DONE is missing sometimes in monitor status ring,
but logging for each entry in the ring increases the time
for which the hal_ring access lock is held. If there are
many entries in the monitor status ring, this can lead to
the hal ring access lock being held for too long and cause
inconsistencies.

Reduce the logging level of the tlv tag STATUS_DONE errors
and have a counter for the cases when this happens.

CRs-Fixed: 2502422
Change-Id: Ica77ce62bbe2c6b7691d638ac44ab0452dd2fd97
2019-08-27 20:59:22 -07:00
Kai Chen
4b4e8b48cf qcacmn: change debug print and add ring stuck count
change debug print and add counter for monitor destination
ring stuck

Change-Id: I79b4d3b957303334717fd04bfddf754e303e69db
2019-08-16 08:22:57 -07:00
Karunakar Dasineni
4a6eff07b1 qcacmn: Track PPDU ID history for monitor rings
Track PPDU Id history from monitor status and destination
rings, and display as part of monitor stats.

Change-Id: I7b8985f93b1cdb6eb5210bba5a65e9bfb617a710
2019-05-06 14:58:32 -07:00
Karunakar Dasineni
700ad73754 qcacmn: WAR for duplicate buffers in monitor mode
WAR to discard duplicate indications (buffers and link descriptors)
from monitor DMA seen sometimes on RXDMA2SW ring.

Change-Id: I687b782f54fbbf85ae932ee833ac9263b5879ca6
2018-11-17 10:48:13 -08:00
Karunakar Dasineni
bb7848e5b6 qcacmn: Drop MPDUs for some RXDMA errors
Drop MPDUs received with rxdma_overflow_err, rxdma_flush
or rxdma_mpdu_length_err errors on monitor RXDMA2SW ring
since Rx TLVs are not populated properly by HW.

Change-Id: I3d4399f4c2b4bbe21e9f6b1b24369a633e964154
CRs-Fixed: 2233141
2018-05-19 10:56:55 -07:00
Kai Chen
783e038223 qcacmn: Add monitor mode ppdu and mpdu stats
Add monitor mode status ring ppdu stats and destination
ring ppdu/mpdu stats

Change-Id: I702172f40ffc0915b630dd3781a697199bdd20fd
2018-05-14 21:54:53 -07:00
Kai Chen
6eca1a62da qcacmn: Monitor mode configuration and processing
This change is for supporting monitor mode VAP.  All the monitor mode ring
is configured. The related monitor mode ring includes:
-monitor mode buffer ring
-monitor mode destination ring
-monitor mode status ring
-monitor mode link descriptor ring
The packet is not sent to monitor mode ring unless the monitor mode VAP is
configured. This release support Multiple VAP - AP/STA VAP plus Monitor
VAP configuration. The status ring is not used in this release. However,
the ring is tested and the ring is moving and there are TLV's in the ring.

Change-Id: I782ee0c3b998d8b3bbac79b5e7fdecdbff15fa93
CRs-Fixed: 2013049
2017-03-29 05:58:52 -07:00