Wykres commitów

132 Commity

Autor SHA1 Wiadomość Data
Yeshwanth Sriram Guntuka
8a2c60e8f5 qcacmn: Add debug info support for rx descriptors
Add debug info support for rx descriptors to log
the caller func name and timestamp in replenish
and free scenario.

Change-Id: I1d9b855d14f705094f241bae653f33a94d0e39b7
CRs-Fixed: 2677288
2020-05-13 12:39:51 -07:00
Ankit Kumar
8156bbf7fd qcacmn: Add sg formation check
Add check for sg formation.
Only enable chfrag_cont and msdu_continuation if reo
error code is HAL_RX_WBM_ERR_SRC_REO or rxdma_err_code
is HAL_RXDMA_ERR_UNENCRYPTED.

Also chain all nbuf in case of sg in separate buffer
and finally loop through that. This is added because
sometime we dont get desc in sync with hw.
To avoid such mismatch, this buffer is added.
We will process nbuf only when all msdus has been
received.

Change-Id: I3b154a68955db61f3acaa0cb8d130c8918a3d450
CRs-Fixed: 2672126
2020-05-05 00:51:56 -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
Yeshwanth Sriram Guntuka
7dad533e6c qcacmn: Handle scattered msdu in OOR error scenario
In OOR error handling scenario, msdu is spread across
two nbufs. Due to this, there is a mismatch between
msdu count fetched from MPDU desc detatils and count
fetched from rx link descriptor.

Fix is to create frag list for the case where msdu
is spread across multiple nbufs.

Change-Id: I1d600a0988b373e68aad6ef815fb2d775763b7cb
CRs-Fixed: 2665963
2020-04-28 03:59:14 -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
Rakesh Pillai
d1f8fbb225 qcacmn: Clear the peer when it is deleted
The peer rx packets should be flushed when
deleting the peer and its state should be reset
to DISCONNECT, when deleting the peer.

If the state of peer is not set to DISCONNECT,
then the flushing of rx packets for the peer
which is being deleted will call the rx callback
and submit these packet to the stack, which can
cause unwanted behaviour.

This way the UMAC does not need to specifically
call clear peer before deleting the peer.

Change-Id: I3b5a737126350a361d968f6349aef6291b2e3f56
CRs-Fixed: 2659629
2020-04-14 19:03:58 -07:00
Varsha Mishra
4c39342f6a qcacmn: Lockless access of reo destination rings
Remove lock to access REO destination rings because 4 rings are
accessed in 4 individual cores.

Change-Id: Ia3f92cc5136dbdbeea1e9cda8d52b474356a3e1a
CRs-Fixed: 2660901
2020-04-11 07:35:07 -07:00
Jinwei Chen
b3e587db52 qcacmn: Support RX 2K jump/OOR frame handling from REO2TCL ring
Support RX 2K jump/OOR frame handling from REO2TCL ring.
(a) configure REO error destination ring register to route 2K jump
/OOR frame to REO2TCL ring.
(b) for 2K jump RX frame, only accept ARP frame and drop others,
meanwhile, send delba action frame to remote peer once receive first
2K jump data.
(c) for OOR RX frame, accept ARP/EAPOL/DHCP/IPV6_DHCP frame, otherwise
drop it.

Change-Id: I7cb33279a8ba543686da4eba547e40f86813e057
CRs-Fixed: 2631949
2020-03-24 19:58:16 -07:00
Nisha Menon
3e5b005e4e qcacmn: Break up DMA mem alloc for HW desc banks in multi pages
Break up the 2MB descriptor bank memory allocations for WBM
idle link ring. Use multiple page allocation and populate the
WBM idle link descriptor ring with physical addresses of each
DMA page allocated in the descriptor bank.
This is to ensure that no requests for contiguous memory
allocations are made that might result in allocation failures.

For MCL set the page size to 4KB and leave it to max_alloc_size
cfg ini param for WIN specific code.

Change-Id: Iec30321044827c0174366cc02df25a42d38309e0
CRs-Fixed: 2565817
2020-02-18 16:38:43 -08:00
nobelj
7cc67e504f qcacmn: Support mgmt packet peer filter based on mac address
RA mac address is used to support tx capture mgmt peer filter.

Change-Id: I895034723d4b75557ad33f55adc017d1caa3a40d
2020-02-13 10:19:49 -08:00
Sravan Goud
dbf2ff57bc qcacmn: Do not process rxdma err decrypt frames
Do not process or drop rxdma error decrpt frames. In case of
decrypt error the decryption is not proper and Rx OLE gets
corrupted bytes. So accessing these can lead to invalid buffers.

Change-Id: Idb3f942facf08fc26bde0fd9826db28955ca01d5
CRs-Fixed: 2613068
2020-02-10 15:13:42 -08:00
syed touqeer pasha
6997a37a1e qcacmn: Extract msdu end TLV information at once during Rx fast path
Rather than extracting msdu end pkt tlv information per field basis
during fast data path, extract msdu end pkt tlv information at once
and store in local structure.

Change-Id: I0877ba4f824d480cc0851c72090f010852d0d203
2020-02-05 02:28:41 -08:00
Sravan Goud
fbe04282e0 qcacmn: Drop nbuf if msdu done is not set
Drop the packet if msdu_done bit is not set while processing
rxdma err frames. This is not expected while reaping WBM RX
release ring.

Change-Id: I8776d15ea88319d7d955fdae90958648484dbda0
CRs-Fixed: 2603791
2020-02-04 19:34:50 -08:00
Nisha Menon
4f6336687c qcacmn: Add vdev callback null check in rxdma err processing
In the function that processes rxdma err frames add null check
before calling vdev callback function. If its valid then deliver
the skb to stack or free the skb.

Change-Id: I7c481eb8f702d9109c4a9f79db7e050ece6c3689
CRs-Fixed: 2607658
2020-01-30 11:15:55 -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
Jinwei Chen
0b92469595 qcacmn: fix invalid accessing to rx_tlv_hdr due to scattered msdu
long length msdu is received and looks this msdu is spread across
multiple nbufs, there is no corresbonding logic for this case.
qdf_set_pkt_len will invoke pskb_expand_head to renew skb->head
buffer, but the rx_tlv_hdr is still pointed to original skb->data
buffer, invalid accessing will happen.
  As a WAR, drop this msdu related nbufs after dp_rx_sg_create is done.

Change-Id: Iceb09fd04e4d768325018a8ddd4261ab4f75991a
CRs-Fixed: 2597927
2020-01-26 16:23:50 -08:00
Jinwei Chen
3222184e14 qcacmn: fix RX desc is using but freed back to pool
Crash scenario:
(1) frag data A is dropped and related RX desc A is replenished
and reused, but pdev->free_list_tail is still pointed to RX desc A.
(2) frag data B/C is coming, defrag fails then pdev->free_list_head
will point to B-->C RX desc, but pdev->free_list_tail still point to A.
(3) for defrag failing case, host only will replenish 1 RX buffer for
current case, RX desc B is replenished, while C will be free back to
RX desc pool.
(4) dp_rx_add_desc_list_to_free_list will set RX desc A-->next =
free_list, free_list point to C insted.
(5) when step (1) RX desc A replenished buffer indicated to host by
REO2Dst ring, RX desc A -->nbuf actually is pointed to another RX
desc, invalid skb accessing will happen.

Solution:
a. reset tail pointer in dp_rx_add_desc_list_to_free_list at last.
b. reset tail pointer same as head in dp_rx_add_to_free_desc_list
if head->next is NULL.
c. set correct rx_bufs number for replenish when dp_rx_defrag fails.

Change-Id: Ib297baea3605a09dd7d85d1f5ceb95db48a2e1f1
CRs-Fixed: 2603676
2020-01-25 07:43:47 -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
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
Ruben Columbus
073874c4aa qcacmn: tx peer capture filtering and discard
removing functions from cmn since they are used in component_dev

Change-Id: I3df5cf280a6922bb90284ee817e28009aa06db2b
2020-01-13 19:05:05 -08:00
Chaithanya Garrepalli
52511a17d1 qcacmn: check for vdev_id mismatch to deliver NBUFs to stack
Check for vdev_id mismatch to deliver NBUFs to stack to avoid
hold peer reference while giving nbuf list to stack

Change-Id: Ic475e00d5b1793ada7b26b7af3322ca2fa51836f
2019-12-31 01:24:43 -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
Mohit Khanna
918456b6c3 qcacmn: Use HAL_RX_BUF_RBM_SW3_RBM for defrag pkts
Currently defragmented packets use HAL_RX_BUF_RBM_SW1_RBM as the RBM
value for the defragmented packets which are re-injected into REO.
Thus, if REO encounters any error while handling these packets, they
would end up in WBM2SW1 ring (via WBM), which is managed by the FW. The
FW will eventually recycle these buffers back to RXDMA via its refill
process. As a part of defragmentation, host does a 802.11 -> 802.3
header conversion. This is resulting in an address which is not 4
byte aligned. Hence, when RXDMA tries to use these addresses (after FW
recycles them), it may lead to issues.

Change the RBM value of the defragmented buffers which are
re-injected. Now, if REO ends up throwing an error for these
packets, they wll end up in WBM2SW3, which is managed by the host.
The host can then drop these packets and replenish RXDMA with 4 byte
aligned buffers (via FW).

Change-Id: I9d9c25385978d5be855699feb28d292c6f3fffdd
CRs-Fixed: 2572483
2019-12-07 04:22:09 -08:00
Rakesh Pillai
534a143d8f qcacmn: Add support to flush rx packets for a vdev
When a particular vdev is deleted, the corresponding rx
packets which have been queued to the rx thread are not
flushed. Hence when such packets are submitted to the
network stack, the dev for this skb will be invalid,
since we have already freed the adapter.

Flush out the packets in the rx thread queues, before
deleting the vdev.

CRs-Fixed: 2543392
Change-Id: I2490d0f5ce965f62152613a17a59232521ca058f
2019-11-01 00:18:13 -07:00
Sumeet Rao
2b730bbc76 qcacmn: Reorganize protocol and flow tagging changes to wifi-host component
Reorganize protocol and flow tagging changes to wifi-host component.

CRs-Fixed: 2501573
Change-Id: Ic6bc9548fd8bb66c2f8bae4740a4dcad4002f720
2019-08-22 12:35:28 -07:00
Ruben Columbus
4319493562 qcacmn: ring backpressure handler
rxhost ring backpressure:
identifying rings causing rx backpressure after being notified
by FW message. Adding logs to be able to see at what state
the ap was after a backpressure event was triggered.
Adding radio stats (261) as well as napi stats for better
state description.
Change-Id: I395450be6faaf959f91729516a7b229c5b3396ce
2019-08-12 16:18:24 -07:00
Nandha Kishore Easwaran
5d3475b985 qcacmn: Initial changes for pine
Add device ID change and target type checks for pine.
Also remove memory war added for Hk emulation.

Change-Id: Idf531a48a03202d4fb241a92a1d671ee2b94cfbd
CRs-fixed: 2453899
2019-08-11 02:11:41 -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
Varsha Mishra
6e1760c2c4 qcacmn: Handling vlan tagged frames for multipass phrase feature
1. Remove vlan tag in tx and enqueue to hardware.
2. Add vlan tag in rx after peer-vlan_id lookup.

Change-Id: I932202540ac03cabdd20ffd4849fe759ea8a7abb
2019-07-29 09:55:41 -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
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
Akshay Kosigi
6eef9e3c6e qcacmn: Clean up DP API's
Remove DP API's which are not being used/defined.

Change-Id: I8a1ee7e3156873227131b526793f464ff4444312
CRs-Fixed: 2483400
2019-07-27 13:42:28 -07: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
Saket Jha
16d8432a3d qcacmn: Reduce log level to avoid console logging
Reducing the log level of debug log to avoid console logging
and instead get it on the cnss diag log.

Change-Id: Ie5a1eb6f45ffa97790d91528a173b16319ec760b
CRs-Fixed: 2486057
2019-07-16 18:40:26 -07:00
Saket Jha
7f89014195 qcacmn: Add WAR to ignore duplicate RX desc
Check if host is reaping a descriptor which is
already reaped then drop RX desc processing instead of asserting.
Macro DUP_RX_DESC_WAR added before dp_rx_dump_info_and_assert function
which does not assert for the case WAR is enabled.

Change-Id: I4f3c1cc16de79f2483cd415582970e093e81d465
CRs-Fixed: 2486057
2019-07-16 18:40:23 -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
Keyur Parekh
b8149a540c qcacmn: Fix for Not sending Deauth to non-authed STA
If any non authed clients send data packets then
AP should send Deauth Frames to STA. In Current code
we are finding VAP from pdev. And if MAC address are
same for VAPs on both radios then pdev will be wrong.
Because of that VDEV id was coming for non active VAP
and deauth frames were not going out of AP.

Change-Id: Ia28ea4143cec9c876313211962ab98b0e4028ee8
2019-06-10 02:37:43 -07:00
Amir Patel
cb99026ade qcacmn: Move WDS feature out of common code
Move WDS feature specific APIs out of common code
as these features are WIN specific. Keep the usage inside
common code under feature specific flags.

Change-Id: Id907a5e22c27fc47e8314449e154525684a27e85
2019-05-29 11:08:21 -07:00
Varun Reddy Yeturu
a7c21dc7f3 qcacmn: Allocate multi page memory for dp_rx_desc_pool_alloc
Allocate memory in multiple smaller chunks for dp_rx_desc_pool_alloc,
and link the pages instead of allocating one big contiguous memory to
avoid memory allocation failures.

Change-Id: Id81de10727555c4ca78963a6f01ed3b992ce9924
CRs-Fixed: 2443999
2019-05-23 20:35:07 -07:00
Tallapragada Kalyan
9e4b36fd89 qcacmn: Rx optimizations to improve small pkt perf
basically tried reading peer_id from peer structure
to avoid 1 cache-line miss per pkt and access mac address
from frame data for WDS only if WDS condition is valid.
The other optimization is to avoid accessing queue_mapping
field of skb for skb received which is at 140 offset
This again helps to avoid i cache miss.
Another place is to do a memcpy only when we intend to
add an ast entry.

Change-Id: I7e328060c505bc21419d045e77329c2cda9e3644
CRs-fixed: 2388857
2019-05-22 00:18:17 -07:00
Ankit Kumar
0ae4abc97b qcacmn: Replace QDF_DMA_BIDIRECTIONAL to QDF_DMA_FROM_DEVICE in rx
In Rx path, We really don't need to flush data and invalidate.
Hence replacing map/unmap flag to QDF_DMA_FROM_DEVICE.

Change-Id: I3de0c73e11a08a875114167a55fe9fe4432f1dd4
CRs-fixed: 2449712
2019-05-20 11:22:21 -07:00
Tallapragada Kalyan
7147b3ccbf qcacmn: RX optimization changes to reduce cache misses
certain fields are now retrieved from reo_destination
ring to nbuf cb. This avoids accessing the RX_TLVs
which are spread across two cache lines. This is
helping improve small pkt (64 byte) performance.

Change-Id: Iee95813356c3dd90ab2e8a2756913def89710fb1
CRs-Fixed: 2426703
2019-05-08 04:47:16 -07:00
Karunakar Dasineni
d8c7ad2228 qcacmn: Support per-ring CCE protocol tag stats
CCE stats are reported across rings today. Since HKv2 is a SMP, it
creates the possibility of missing stats when two or more CPUs are
updating the counters for the same protocol type. In order to avoid
this, we can either use locks or store stats on a per-CPU basis.
Since tagging happens on the core data path, locks are not preferred.
Instead, we use a per-ring counter, since each CPU operates on a REO
ring. Exception packets today go to Ring-0 (also normal rx Reo-0
go to Ring-0). Hence tags are maintained separately for exception
ring as well.

Change-Id: Ib01934619fb026bf64a8ac998eaec2d4df7f5a6e
CRs-Fixed: 2438143
2019-05-01 10:18:35 -07:00
Sravan Kumar Kairam
ebd627e195 qcacmn: Cache rx frames during dp peer register
Currently frames will be dropped if it arrives before
peer is registered with data path module by control path.
So cache rx frames and flush them to the upper layer when
peer is registered at data path.

Change-Id: I086122fffdcf33e25ba57774ef944550cdd2fa20
CRs-Fixed: 2329308
2019-04-27 06:44:19 -07:00
Karunakar Dasineni
142f9baf47 qcacmn: Add new feature to support protocol tags
With this feature, using appropriate commands, link layer, network layer,
transport layer and some of the application protocols can be tagged with
the user provided tag values for easier identification of protocols. The
supported protocols today are as follows.

ARP, DHCPv4, DHCPv6, DNS over TCP (v4), DNS over TCP (v6), DNS over UDP
(v4), DNS over UDP (v6), ICMPv4, ICMPv6, TCPv4, TCPv6, UDPv4,
UDPv6, IPv4, IPv6, EAP.

Receive packets are tagged by hardware. Tags are applied after the first
matching rule. Hence it is recommended that the rules are
programmed in such a way that tags are configured from application layer
to data link layer to get expected results.

Change-Id: Ibdc2bd2b78234f482074955e89fb93f05988eaca
2019-04-26 15:31:10 -07:00
Mohit Khanna
662379ff1e qcacmn: Remove RX_BUFFER_SIZE from dp_rx.h to fix compilation
RX_BUFFER_SIZE macro got introduced by mistake during rebase. The macro
is present in hal_rx.h. Removing the extra macro.

CRs-Fixed: 2382076

Change-Id: Ia66079d6d4543b4e3fd99e9f0c0376353a92aa9c
2019-04-03 14:23:09 -07:00
sumedh baikady
c2fa7c99c0 qcacmn: Deliver STP pkts from wbm exception path
Vlan tagged STP pkts are received in host from
wbm exception path with wifi parse error code.
This is delivered to stack. Stats added for wifi
parse error and vlan tagged stp pkt count.

Change-Id: I25af5ab403ee7a46b4abe2f60328314d61587b80
CRs-fixed: 2375575
2019-04-02 15:51:44 -07:00