Commit grafiek

134 Commits

Auteur SHA1 Bericht Datum
Amir
43b866f124 qcacmn: Free buffers if MPDU restitch fails
In case of monitor mode, if MPDU restitch fails,
Free all rxdma buffers from head msdu to tail msdu

Change-Id: I852b6095638578a48c07a6fb5d221ead40c5ffde
CRs-Fixed: 2657983
2020-10-30 11:01:53 -07: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
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
Srinivas Girigowda
a104d7b453 qcacmn: dp: Remove redundant __func__ from the logs
The logging macros implicitly takes care of embedding function name
in the log, hence there is no need to include __func__ again.
Getting rid of redundant __func__ reduces driver memory footprint.

Change-Id: I26bfac840ac6732ac83fb008db8e1702996eb21e
CRs-Fixed: 2774457
2020-09-15 02:45:47 -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
Ankit Kumar
5eb6324b3e qcacmn: Modify frag restitch param for frag based handling
Dont pass las_msdu as a param to restitch func for frag
approach as it doesn't contain valid value and is not used
in the restitch api.

Change-Id: I974a8ae5e6ce4a9bf04985cbd37e103700f48301
2020-09-03 15:25: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
Ankit Kumar
526bbe81de qcacmn: Handle frag based ops based on rx_Desc_pool flag
Rx desc pool have a flag to identify whether frag or nbuf
operation needs to be performed for alloc, map, prep and
free buffer for monitor dest buffer.

This flag will be set only for mon destination desc pool,
if RX_MON_MEM_FRAG feature is enabled.
In all other case, It will be set to Zero and default nbuf
operation will be taken.
This flag get initialized at the time of pdev rx_desc_pool
initialization and gets reset while pdev deinit.

Mon destination buffer will have support for frag if
RX_MON_MEM_FRAG flag is set.

Change-Id: I67c6c823ee4f114035b884c024a1a9054a40665b
CRs-Fixed: 2741757
2020-08-11 14:09:08 -07:00
Manikanta Pubbisetty
fa2844b787 qcacmn: DP RX changes for RX buffer pool support
DP RX changes to support RX buffer pool, this is a pre-allocated pool
of buffers which will be utilized during low memory conditions.

Change-Id: I8d89a865f989d4e88c10390861e9d4be72ae0299
CRs-Fixed: 2731517
2020-08-01 13:13:36 -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
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
Guisen Yang
4676e72c02 qcacmn: Change nbuf unmap API when free rx nbuf
The DMA Map/Unmap was restricted to buffer size in rx process.
But the Unmap API was not changed when free nbuf in rx desc,
apply the new unmap API.

Change-Id: Id10d746776aa9e41ef3425e166ba0207851358d6
CRs-Fixed: 2716690
2020-06-30 02:33:58 -07:00
Tallapragada Kalyan
9056ed8685 qcacmn: use proper replenish function for monitor buffer ring
use proper replenish function for monitor buffer ring
when it is called from monitor vap create

Change-Id: I2ee908f93d84eec262def264359ba4afce707976
2020-06-12 09:04:29 -07:00
Saket Jha
d30eab103c qcacmn: Create monitor mode spinlock and add null check
Due to changes in datapath init/deinit path, mon_lock spinlock was not
getting created. Create mon_lock spinlock during
dp_rx_pdev_mon_cmn_desc_pool_init.

Add null check to validate rx_tlv_header before calling
hal_rx_mpdu_start_tlv_tag_valid.

Change-Id: I41c781de29f2c8c05ec1bfa90f9c8f742f2539bf
CRs-Fixed: 2693687
2020-05-29 14:50:54 -07:00
Amir
61ea84b2cb qcacmn: Add full monitor attach/detach API
Add full monitor attach/detach API

Change-Id: I16b52d8ffe2949f43a18bb5d00c3997a1447dac4
CRs-Fixed: 2685408
2020-05-14 14:46:04 -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
phadiman
b133d310ec qcacmn: Split dp_rx_pdev_attach and dp_rx_pdev_detach
Split dp_rx_pdev_attach into dp_rx_pdev_desc_pool_alloc,
dp_rx_pdev_desc_pool_init, dp_rx_pdev_buffers_alloc and
dp_rx_pdev_detach into dp_rx_pdev_desc_pool_free, dp_rx
_pdev_desc_pool_deinit, dp_rx_pdev_buffers_free APIs

This split is made because dp_pdev_init is introduced
as part of this FR and these APIs will be called from
dp_pdev_init/dp_pdev_deinit or dp_pdev_attach/dp_pdev_
detach accordingly to maintain the symmetry to DP init
and deinit path

Change-Id: Ib543ddae90b90f4706004080b1f2b7d0e5cfbfbc
CRs-Fixed: 2663595
2020-04-27 18:02:37 -07:00
phadiman
9798b16f3f qcacmn: Split dp_mon_link_desc_pool_setup to alloc and init APIs
Split dp_mon_link_desc_pool_setup to alloc and init APIs and
dp_mon_link_desc_pool_cleanup to deinit and free APIs

This split is made because dp_pdev_init is introduced
as part of this FR and these APIs will be called from
dp_pdev_init/dp_pdev_deinit or dp_pdev_attach/dp_pdev_
detach accordingly to maintain the symmetry to DP init
and deinit path

Change-Id: I36b2a98bd317010124916e0b2779938eba3883ea
CRs-Fixed: 2663595
2020-04-27 18:02:33 -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
Rakesh Pillai
590d880a1e qcacmn: Change the loglevel for link desc return failure
In monitor mode, the link descriptor return failure
can occur many times, due to the timer interval.
Logging each failure on the console floods it with
too many unnecessary logs.

Ratelimit the link descriptor return failure in monitor
mode and also change its log level to info.

Change-Id: I5709a33087c6d9271d4246f04ef1acd274fba0f1
CRs-Fixed: 2650480
2020-04-07 20:19:23 -07:00
Himanshu Batra
d7e15e64e0 qcacmn: Drop FCS error frames in mon dest ring in mcopy mode
In mon dest ring, for m_copy mode, MGMT packets are received with
FCS error.Due to which multiple skbs (Head_skb with
attached frag_list) for single MPDU are sent to upper stack.
Add fix to drop FCS error frames in mcopy mode.

Change-Id: I6fbf2ea2bfdc489b56a412ece3c644ba2ce87929
2020-04-07 07:46:27 -07:00
aloksing
4b45241915 qcacmn: Add check for NULL pointer
Pointer rx_msdu_link_desc returned from call to function
dp_rx_cookie_2_mon_link_desc which may be NULL and may be
de-referenced latter

CR-Fixed: 2645199
Change-Id: I9ccba61df9571fcc99c5d5493194d5ae43a71a7f
2020-03-31 04:11:00 -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
Pavankumar Nandeshwar
9b0c1271ed qcacmn: Initialized pdev id with default value 0xFF
pdev_id is being initialized with 0. Since 0 is valid pdev_id, though
pdev is not present for that id, it is being accessed.

Initialized pdev_id to 0xFF by default. Added checks on API to
detect valid pdev_id value corresponding to lmac_id

Change-Id: I2b2a38783615494ccc08e265702815f7e562214b
2020-03-17 03:11:13 -07:00
Kai Chen
b1a940fa76 qcacmn: Fix issue on block ACK on response to BAR
Fix the issue on block ACK on response to BAR frame.
Parse BAR frame received from monitor destination ring and
generate block ack frame from BAR frame and previous block
ACK frame.

Change-Id: Ifc242b3850630aa25827b003a1e2078a9228358a
2020-03-11 01:47:02 -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
Amit Shukla
fc8337d5de qcacmn: Add support for noACK frames
Intercept monitor destination path for NDPA frames,
use it to generate noack frames for tx capture.

Change-Id: Ia54196bd84729a7863954b6deec7e02b52f23556
CRs-Fixed: 2605672
2020-02-28 00:20:34 -08:00
Amir Patel
b8e9bcdf4c qcacmn: Read ppdu_id from reo_entrance ring
For qcn9000, As part HW enhancements, PPDU_ID is sent
in reo_entrance_ring descriptor instead of RX_MPDU_START
tlv. Add support to read ppdu id from descriptor.
Modify existing hal API hal_rx_hw_desc_get_ppduid_get ()
arguments to pass RxDMA ring HW descriptor.

Usage:
 a. Use hal_rx_hw_desc_get_ppduid_get () -
    to get ppdu id from rx_tlv_hdr or hw descriptor based on target.
    for qcn9000, this API gets ppdu_id from HW descriptor,
    for other platforms, gets ppdu_id from rx_tv_hdr
 b. Use hal_rx_get_ppdu_id () - to get ppdu_id from rx_tlv_hdr

Change-Id: I5838227c12cde50cbb2a9da7a0d8056b8b9b7ef5
2020-02-13 05:54:15 -08:00
Shashikala Prabhu
03a9f5b19c qcacmn: Add framework to configure varying data/monitor buf size
Add a framework to configure varying buffer size for both data and monitor
buffers.
For example, with this framework, the user can configure 2K SKB for Data
buffers, monitor status rings, monitor descriptor rings, monitor
destination rings and 4K SKB for monitor buffers through compile time.

Change-Id: I212d04ff6907e71e9c80b69834aa07ecc6db4d2e
CRs-Fixed: 2604646
2020-01-29 18:08:33 -08:00
Rakesh Pillai
e3c018c0c7 qcacmn: Datapath changes for QCA6750
Add the datapath changes for supporting
the newly added IPCI bus type for QCA6750

CRs-Fixed: 2597326
Change-Id: I27e3e9f746eb383e85c7345150bda03320d041b9
2020-01-18 04:45:01 -08:00
Amit Shukla
1edfe5ae7c qcacmn: Data path changes for Dynamic Mode Change FR. Changes include-
1. Move all LMAC rings to SOC from pDEV
	2. Dynamically obtain lmac->pdev mapping while handling LMAC interrupts

Change-Id: Ib017d49243405b62fc34099c01a2b898b25341d0
2020-01-16 17:14:39 -08:00
Saket Jha
540da9a56c qcacmn: Add 6GHz Monitor Mode Support
Add monitor mode support to capture packets over 6GHz frequencies by
getting capture frequency from pdev.

Change freq type to qdf_freq_t.

Change-Id: I7b6edc43e254dc98a3c2939c369874bec9d16ddd
CRs-Fixed: 2568970
2020-01-15 11:30:21 -08:00
Aniruddha Paul
33fce952a9 qcacmn: Fix the next link descriptor read issue
Link descriptor were getting freed by the pointer
of the previous freed link descriptor. This patch
fixes by copying the address of the current in a
local descriptor info and using it to free the
current.

Change-Id: I95e137ba5b1f0ad21b0e6fb39f6671e1d5b65ba6
CRs-Fixed: 2577624
2019-12-30 05:53:14 -08:00
Jinwei Chen
3172ed4419 qcacmn: degrade log level in monitor dst processing
Degrade log level from ERROR to INFO_HIGH to prevent excessive
logging into dmesg console.

Change-Id: Ic0ef72cf2564ed2354b3db4d6e09e7ac7c832560
CRs-Fixed: 2582400
2019-12-12 18:17:36 +05:30
Surya Prakash Raajen
507b75ac5c qcacmn: Fix replenish size for monitor buffers during attach
Head_pointer == Tail_pointer is treated as ring empty and
Tail_pointer + 1 == head_pointer is treated as ring full,
hence replenish count should be num_entries-1 to avoid
buffer ring treated as empty or full.

Change-Id: I157834a86380bcd2f03679510357ad3ca5550374
CRs-Fixed: 2569491
2019-11-26 04:03:33 -08:00
Venkata Sharath Chandra Manchala
e69c9c2ac0 qcacmn: Add support for QCA6490
Add the following support for QCA6490:
1. Initialize the qca6490_hal_hw_txrx_ops
2. Initialize the hw_srng_table
3. Attach hal_qca6490_attach

Change-Id: Ic53c520ef804eb4fbe1434c704e9040c83011d3d
CRs-Fixed: 2522133
2019-10-17 15:12:14 -07:00
Venkata Sharath Chandra Manchala
84d5092701 qcacmn: Add hal_rx_hw_desc_get_ppduid_get API
Implement hal_rx_hw_desc_get_ppduid API based
on the chipset as the macro to retrieve
ppduid value is chipset dependent.

Change-Id: I7d3457d731ea486f04367f98f9f18d3f1c0fcfd7
CRs-Fixed: 2522133
2019-10-17 15:09:23 -07:00
Venkata Sharath Chandra Manchala
f05b2ae5c2 qcacmn: Add hal_rx_msdu_end_l3_hdr_padding_get API
Implement hal_rx_msdu_end_l3_hdr_padding_get API
based on the chipset as the macro to retrieve
sa_idx value is chipset dependent.

Change-Id: Ice1fc2d70e339dc1d80fa6f34f37c5a7aa074be5
CRs-Fixed: 2522133
2019-10-17 15:07:13 -07:00
Venkata Sharath Chandra Manchala
43d563277d qcacmn: Add hal_rx_desc_is_first_msdu API
Implement hal_rx_desc_is_first_msdu API
based on the chipset as the macro to
retrieve first_msdu bit value is chipset
dependent.

Change-Id: I8e8a3aceb225b591b96e6f8453ffbebf1f78e529
CRs-Fixed: 2522133
2019-10-17 15:07:09 -07:00
Chaoli Zhou
fd20986e6a qcacmn: Fix runtime unknown symbol issue
In the sdx platform, WLAN monitor mode is disabed,
in other words, CONFIG_FEATURE_MONITOR_MODE_SUPPORT
will be set to n, but dp_mon_buf_delayed_replenish
hasn't be defineded if it set to n, which can cause the
runtime unknown symbol issue. So add the definition
for it.

Change-Id: Iec50f7cc5ed6f94e2f5a40fbc6594c2830d1359f
2019-08-29 00:24:31 -07:00
Kiran Venkatappa
a33e6a8ea7 qcacmn: Use correct mac_id for delayed mon replenish
mac_id is used to get rx_desc_pool for monitor ring and mac_for_pdev is
used for srng for monitor buf. Use appropriate id to get correct
combination of hw ring and sw desc for monitor rings.

Change-Id: I7e4467e9568056e55cbabfef8f97ce94ad9c1b1c
CRs-Fixed: 2512292
2019-08-21 23:46:08 -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
phadiman
797a49bc7d qcacmn: Fix incorrect access to mon buffer ring
Map mac_for_pdev appropriately for both MCL & WIN,
since MCL have multiple monitor buffer rings and
WIN just has one mon buffer ring, below API helps
identify accurate monitor buffer ring for both cases

CRs-Fixed: 2502051
Change-Id: I3929f3f7717d795850a41f4148397d87b0415118
2019-08-09 02:50:24 -07:00
Sumeet Rao
c4fa4df717 qcacmn: Add a new feature to support tagging of IPv4/v6 flows
Tags are programmed using wlanconfig commands. Rx IPv4/v6
TCP/UDP packets matching a 5-tuple are tagged using HawkeyeV2 hardware.
Tags are populated in the skb->cb in the REO/exception/monitor data
path and sent to upper stack

CRs-Fixed: 2502311
Change-Id: I7c999e75fab43b6ecb6f9d9fd4b0351f0b9cfda8
2019-08-07 11:28:21 -07:00
Mainak Sen
9550273ede qcacmn: Rx Sw Descriptor allocation should be configurable
To make Rx Software descriptor allocation configurable for each radio,
new ini variable is added.

Change-Id: Ifc5683629747a6fe8238c18448695abe91876ec5
2019-08-05 16:45:59 -07:00
Akshay Kosigi
8eda31cab3 qcacmn: Remove void ptr usage in HAL
Add code to replace usage of void pointers from
HAL layer and instead use appropriate opaque pointers

Change-Id: Id950bd9130a99014305738937aed736cf0144aca
CRs-Fixed: 2487250
2019-07-27 13:43:07 -07:00
Akshay Kosigi
a870c6181a qcacmn: Change to clean up of void pointers
Add code to cleanup usages of void pointer usages
in DP code.

Change-Id: I0736bcc0a547d858ed02f1ee59084a44e5fe4bec
CRs-Fixed: 2487249
2019-07-27 13:43:04 -07:00
Akshay Kosigi
0bca9fb200 qcacmn: Change to remove void pointer usage for HAL SRNG
Add code to remove void pointer usage for hal_srng
and use opaque pointer dp_hal_ring_t instead.

Change-Id: I6907f7376d7fe3c9180b8795bd96f49fead2ec64
CRs-Fixed: 2484404
2019-07-27 13:42:41 -07:00
Akshay Kosigi
91c56523d3 qcacmn: Remove void pointer usage for ring desc's
Make change to remove usage of void pointers for
ring descriptors and instead use a opaque pointer
dp_ring_desc_t.

Change-Id: Ia1e9a3da9eaa3cccf297b2135b52a72f2fe21431
CRs-Fixed: 2484409
2019-07-27 13:42:37 -07:00