Commit Graph

33 Commitit

Tekijä SHA1 Viesti Päivämäärä
Ankit Kumar
8f311b08dd qcacmn: Drop frame if msdu len received is Zero
In monitor destination ring, sometime buffer with
msdu_len zero is observed.
Drop frame if msdu len is zero.

Change-Id: I327e180a52ec5f4e0d9fc2d0391262cba0dbe09d
2020-11-17 23:18:49 -08: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
Ankit Kumar
1f4a0ce9e6 qcacmn: Handle MPDU having more than QDF_NBUF_MAX_FRAGS MSDU
Handle case in mon dest ring buffer processing,
where one MPDU can have more than QDF_NBUF_MAX_FRAGS MSDU.

Change-Id: If09099814b7f701efbaa20b1406958ad97d64829
CRs-Fixed: 2788919
2020-10-15 21:23:23 -07:00
Yeshwanth Sriram Guntuka
9c4530907a qcacmn: Adjust frag len in Mon mode considering l2 hdr offset
In Monitor mode, frag len is not adjusted taking l2 hdr
padding into consideration. This will result in inclusion
of l2 hdr padding length twice in skb len and would cause
skb expansion due to length exceeding 2048 bytes.

Fix is to adjust frag len taking l2 hdr padding into
consideration.

Change-Id: I31d57621bc71c51ff581a30adb654cd7b9448443
CRs-Fixed: 2781177
2020-09-22 00:43:04 -07:00
Ankit Kumar
30f857cb67 qcacmn: MCopy and lite monitor feature handling in case of frag
Add logic to handle mcopy and lite monitor feature
in case of frag.

Change-Id: I45fcbd22b1dcb1f68ee93a69f29fbac85cb0aafa
2020-09-10 21:00:55 -07:00
Harsh Kumar Bijlani
12c7f7a08b qcacmn: Change max headroom for monitor destination buffer
Macro MAX_MONITOR_HEADER is used to specify the max. headroom size for
different buffer rings. With the monitor frag feature, macro
DP_RX_MON_MAX_MONITOR_HEADER is required to specify the headroom size for
the monitor destination buffers as per the the approch being used.

Change-Id: Ic4c0132292008942d7d443235e5f54d7eaa77e74
CRs-Fixed: 2772048
2020-09-10 17:03:28 -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
Ankit Kumar
1f948cbb6b qcacmn: Process mon dest buffer via nr_frag
Process mon destination buffer via nr_frags
if RX_MON_MEM_FRAG is enabled.

Change-Id: If49132b129e01f6a248544134ac9d9457aa2072d
CRs-Fixed: 2741789
2020-08-11 16:08:03 -07:00
Rakesh Pillai
94c0917f49 qcacmn: Monitor mode improvements
Move the srng history to hif context.

Process the monitor ring only for the lmac
corresponding to the configured monitor channel.

Add the timer and srng history for monitor mode.

Change-Id: I4e5e49ad5e657b55bfafbb40ef5f59496277cb40
CRs-Fixed: 2690530
2020-07-01 07:50:55 -07:00
Tallapragada Kalyan
c053dca35b qcacmn: change minimum buffers in rxdma monitor buffer ring
With the init/de-init FR we set the minimum buffers
needed in monitor buffer ring to be 8, because the low
threshold by FW is set to 32 the MPDU TLVs are not DMA'd
to monitor status ring, this resulted in NAC feature
regressed. hence changing it from 8 to 64

Change-Id: Id39dce59686b7416bdc6156798ff7f948dff8da6
CRs-Fixed: 2683633
2020-05-12 15:36:20 -07:00
phadiman
1f3652debc qcacmn: Datapath init-deinit changes
Do a logical split of dp_soc_attach and
dp_pdev_attach into Allocation and initialization
and dp_soc_detach and dp_pdev_detach into
de-initialization and free routines

Change-Id: I23bdca0ca86db42a4d0b2554cd60d99bb207a647
2020-05-02 21:59:42 -07:00
Amir
76ab3fc618 qcacmn: Change monitor ring reap sequence for qcn9000
For qcn9000 in case of monitor mode, reap monitor destination
ring first and status ring later to avoid backpressure
on monitor destination ring

Change-Id: I4e1931afe0453221f1326ca7bdb7f0273cc7363d
CRs-Fixed: 2670656
2020-04-26 23:54:04 -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
Sravan Goud
35b8f761f9 qcacmn: Return correct rx refill buf ring
In dp_rxdma_get_mon_buf_ring returns mac id index of
rx_refill_buf_ring array. But for targets with only one
pdev only the zeroth index is initialized. This will lead
to replenish failures in case of monitor mode when mon dest
process of lmac ring with mac id 1. So return only index 0 of
rx refill buf ring.

Change-Id: I03a7e19ea8d976e19fe6482aff0080dfa4d5ec45
CRs-Fixed: 2638655
2020-03-20 20:37:05 -07:00
Amir Patel
605e44bf31 qcacmn: Move dp monitor inline APIs to header file
Move dp monitor inline APIs to header file from dp_rx_mon_dest.c
to dp_rx_mon.h to use it in component dev

CRs-Fixed: 2626054
Change-Id: I3a31dacd7d7e817f144708f9bda5536808080864
2020-03-03 18:54:37 -08:00
Aniruddha Paul
f9d2c0f54e qcacmn: Add common framework for mon filters
A framework is added where the filters for every
mode are stored on a radio instance. Whenever a mode comes
up, it stores the filters in the radio and calls a
common API which iterates through all the enabled
mode filters and loops through them to create a
superset of filters which is sent to HTT.

This framework can be extended for new feature addition
which set filters for the monitor status and monitor
destination rings.

Change-Id: I9b739af2086bbe261b65c57af0a5bd867294f30f
CRs-Fixed: 2585872
2020-02-03 04:23:05 -08:00
Pavankumar Nandeshwar
0ce3870654 qcacmn: Modify set 2 of ctrl_ops in dp to for umac-dp decoupling
Change set 2 of ctrl_ops APIs to replace pdev, vdev and peer
dp handles with pdev_id, vdev_id and peer mac address
along with dp soc handle

Change-Id: I3f180c9c360d564f0b229b447074ad23b7c0a737
2020-01-20 17:52:06 -08:00
Kiran Venkatappa
115309a008 qcacmn: Delay monitor buffers replenish to monitor VAP create
Monitor buffer are required only when monitor VAP is created. Allocate
these buffers only when montior VAP is created. This provides memory
savings when no monitor VAP is created/required.

Change-Id: I3ddaef00615f00fd13adb2789469a62f1a0af165
CRs-Fixed: 2491873
2019-07-24 21:43:36 -07:00
Rakesh Pillai
2529ae1c8a qcacmn: Add event history logs for datapath
Add support to log the important events in
datapath, which will help in debugging the
datapath issues.

IRQ handler, Napi poll and srng access start/end
are the events which are currently logged.

CRs-Fixed: 2457854
Change-Id: Iba105b0e79443b670a01a929f999f94e00ea92f2
2019-06-17 10:23:01 -07:00
Venkata Sharath Chandra Manchala
c61826c476 qcacmn: Cleanup statistics
1. Move statistics API's to dp_stats.c
2. Move DP_TRACE_STATS to DP_PRINT_STATS
   as it is implemented based on target.

Change-Id: I62f3076a51ca35f0e12cdb0ff0230ea87c2baaf7
CRs-Fixed: 2453443
2019-05-20 20:53:27 -07:00
Kai Chen
52ef33fca3 qcacmn: Support enhanced Rx capture
Support Rx capture mode to deliver first 128 bytes of
each MSDU, along with some meta data.

Change-Id: I1ffa8b1a029d46f68aa78520bacc019de8af7a82
2019-04-19 04:08:56 -07:00
Srinivas Girigowda
4468047f83 qcacmn: Remove references of cds_ieee80211_defines.h
The file cds_ieee80211_defines.h is removed as part of
Change-Id: I3b7a3f61f82ea15b7975fb5d143257c80382f20d.
Hence remove the references of this file.

Change-Id: Ie94a748d062b65824e5b1f8aba8b7f7d92e937aa
CRs-Fixed: 2405051
2019-02-26 21:18:36 -08:00
Anish Nataraj
e9d4c3bf33 qcacmn: Reorganise DP init-deinit path to reuse memory
Avoid memory fragmentation that happens during
attach-detach flow.
- Reuse transmit allocated static pool memory across soc up/down.
 These memories are allocated during soc attach.
- Reuse DP source ring memory, DP soc context, DP pdev context
  across soc up/down.
- Reorganise structure members of DP soc and DP pdev so that
  we can zero out structure members across soc up/down
- Add cdp soc init/deinit and cdp pdev init/deinit that
  will be active across soc up/down

Change-Id: I5732453f617bdc16995fda916b645c41845c3ecb
2018-11-30 03:40:43 -08:00
Venkata Sharath Chandra Manchala
8747958dff qcacmn: Enable Monitor Mode for QCA6390
Support Monitor Mode for QCA6390 as RXDMA1 block is
now removed.
1. Monitor buffers are now received on rxdma_err_dst_ring
2. RXDMA1 monitor status ring is moved to RXDMA0 monitor
   status ring
3. Msdu link descriptors are now returned to WBM descriptor
   release ring.
4. Reap the Monitor buffers and return it to SW Refill ring.
5. Use the same rx descriptor pool for regular and monitor data.

Change-Id: If41e5d13f942da2b97e5aab72b88ae344925ba67
CRs-Fixed: 2297300
2018-10-26 10:39:37 -07:00
chenguo
1b88046171 qcacmn: Add preamble only PPDU support in monitor mode
There are some particular PPDUs which have preamble only:
     * NDP frames
     * TB_PPDU frames
Add support to the above frames.

Change-Id: I7022433d3765575eaf28d7baf3a11e8b6ce13890
CRs-Fixed: 2275161
2018-08-09 14:34:17 -07:00
Venkata Sharath Chandra Manchala
30e442b026 qcacmn: Disable monitor mode for QCA6390
Setup monitor mode rings and allocate
descriptors only if QCA6390_MONITOR_MODE is
defined.

Change-Id: I9c9bdc1e325eda822a326d64d6445a7112083420
CRs-Fixed: 2271998
2018-07-13 02:58:41 -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
Manjunathappa Prakash
d9ce350f01 qcacmn: Initialize and reap both 2.4GHz and 5GHz MACs
Initialize MAC1 along with MAC0. 2.4GHz monitor mode operates on
MAC1 so initialize MAC1 and reap both MAC0 and MAC1.

Change-Id: Id281def37d460b224f5f571893266f193846fd0c
CRs-Fixed: 2176848
2018-03-20 15:54:58 -07:00
Pamidipati, Vijay
9e34025ada qcacmn: Add option to enable or disable accounting of Tx in NAPI budget
Add a division factor for number of tx completions to be accounted for in NAPI
budget. Fix the data type of budget to int to account for negative values.

Change-Id: I620af5537c5c1cdf3161da3a3c053a2c8bf777e8
CRs-Fixed: 2092526
2017-08-29 23:41:33 -07:00
Pramod Simha
e382ff88b9 qcacmn: Add RXDMA_DST ring support
Setup & process the RXDMA_DST ring to handle error frames
from RXDMA block. Pro-active fix to handle the WAR for
the WBM stuck issue seen when sending RX_FLUSH command.

Change-Id: Ibf56062da2cd9b5d447f1d43bbae5944426d88c8
CRs-Fixed: 2059870
2017-07-07 12:33:54 -07:00
Pratik Gandhi
3da3bc731c qcacmn: Smart Mesh-NAC filtering in rx data path
Perform software based smart mesh filtering on rx packets indicated
as error packets with invalid peer. All such packets from NAC
sent to umac through monitor interface.

Change-Id: I8e4b40f74088bb8820d6ab6681756835e400d4ef
CRs-Fixed: 2017269
2017-05-04 01:40:28 -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