Commit grafiek

306 Commits

Auteur SHA1 Bericht Datum
nwzhao
ca9a332c4a qcacmn: [DP]TWT stats feature: add WMI Support for TWT stats event
Add WMI support for WMI_TWT_SESSION_STATS_EVENTID. This event
contains stats for a given TWT session.

Change-Id: I01d5f7b30da803ee713a14c1d1124b8af7161bca
CRs-Fixed: 2609951
2020-08-05 02:17:19 -07:00
Yeshwanth Sriram Guntuka
01c7242aca qcacmn: Update tx completion cb prototype to pass tx status
Update tx completion callback prototype to pass tx
status also as argument.

Change-Id: I33413a0943ec8050d6c8ae6b2ef3592d593cb063
CRs-Fixed: 2682028
2020-07-22 11:55:38 -07:00
Aniruddha Paul
1b7f50b096 qcacmn: Update the Tx/Rx Delay histograms
Update the Host Tx/Rx per packet delay histogram

Change-Id: I40c3c05b2eb90427bd83783f13f2a7a3df41d232
2020-07-17 21:25:58 -07:00
Mohit Khanna
42a8d7ef31 qcacmn: Add P2P UDP/TCP checksum offload INI entry
Add support to enable disable TCP/UDP checksum offload for P2p modes.

CRs-Fixed: 2725395
Change-Id: Id482649e501a8f9a8900a92e3e03a48f0e99603c
2020-07-12 01:49:34 -07:00
syed touqeer pasha
f2d33c938b qcacmn: Handle insufficient headroom
If headroom is insufficient during ppdu metadata receive,
reallocate headroom.

Change-Id: Ib3c5295ce73eaab5a5ff6b37f0f37361e7135b9c
2020-07-09 03:03:49 -07:00
Yu Tian
0b0c3e3c7a qcacmn: fix index overflow when tso seg large
In some cases, TSO segment may larger than 255.
If use uint8 as the loop index, tx logic will
overflow and sending the last segment repeatly,
then lead to buffer double free. Change index
variable to uint32

CRs-Fixed: 2722918

Change-Id: I156a5d8b8a3895e4f7bfc53cf5561f51ca8b06ca
2020-07-08 08:59:16 -07:00
Himanshu Batra
6ca574196e qcacmn: Add TX support for Extended Mcopy mode
Currently, mcopy mode delivers first msdu per-ppdu to upper layer,
add support for Extended mcopy mode to deliver first
msdu per-MPDU.

Change-Id: I8f3f7fb023e9d9140d0be31520d34103a3505ebb
CRs-Fixed: 2701514
2020-07-02 05:55:51 -07:00
Ananya Gupta
aab74f76ee qcacmn: Check peer before accessing vdev in tx_comp_handler
Race Condition is observed as tx_comp_handler is
accessing vdev pointer while its getting freed up
parallelly.
To fix this, peer value is checked before accessing vdev.
If peer	is null, vdev is not accessed and the function is
returned.

Change-Id: I05c93c54e2dbb3f40c5c053591d2d66c6143f656
CRs-Fixed: 2708390
2020-06-23 00:28:03 -07:00
Mohit Khanna
97200aab9c qcacmn: Add NAN TX checksum offload INI entry
Currently there is a single INI item tcp_udp_checksumoffload to enable
or disable this feature for all the adapters. In some cases, we want to
be able to enable this feature selectively for NAN mode.

Add nan_tcp_udp_checksumoffload ini item to enable or disable checksum
offload feature specifically for NAN mode. If
nan_tcp_udp_checksumoffload is 'true' and tcp_udp_checksumoffload is
false, hardware checksum offload will be enabled only for the NAN
adapter and not for other adapters.

CRs-Fixed: 2693638
Change-Id: I6e255ce68ddc7b01ebdefe4e5e8d2c985388fefe
2020-06-16 12:20:20 -07:00
Yeshwanth Sriram Guntuka
b725ca6210 qcacmn: Update few connectivity stats on tx completion
Update connectivity related tx_host_fw_sent and
tx_ack_count stats on tx completion.

Change-Id: Id0143d934379d8831c58160aa357817c05fcbc71
CRs-Fixed: 2657703
2020-06-10 23:58:58 -07:00
Chaoli Zhou
47e9c6a997 qcacmn: Fix htt_status & A_STATUS map dp status wrong issue
The packet tx complete status from wlan fw define in htt_tx_status
doesn't match with packet trace feature used in qdf_dp_tx_rx_status,
Meanwhile A_STATUS also doesn't convert to correct qdf_dp_tx_rx_status,
so add two according APIs to fix it

Change-Id: Ic250175dd270632f40af14ad9499ddcafbb3033b
2020-06-01 05:23:26 -07:00
Chaithanya Garrepalli
1d144f88bd qcacmn: store peer_id instead of peer_ids array in dp_peer
In lithium a peer will have only single peer_id hence remove
peer_ids array from dp_peer structure

Change-Id: Ib98270b7fd98f1199b862e4608f990687914b7cc
2020-05-29 13:13:37 -07:00
Yeshwanth Sriram Guntuka
6159db7efa qcacmn: Reset tx desc as part of flow pool delete
Tx desc flow pool for the vdev is not deleted as part
of disconnection due to tx_desc pending to be processed
in tx comp ring. Hdd_stop is triggered immediately after
this causing dp vdev detach. In parallel, the tx desc
from the tx comp ring is processed, wherein stale vdev
address is derefernced to get dp soc causing page fault.

Fix is to reset tx desc by setting the vdev to NULL as
part of dp_tx_delete_flow_pool and also reset count to
zero in dp_tx_comp_handler before ring desc process loop.

Change-Id: I66f718668ba84f89106d09e624d9593f89479e55
CRs-Fixed: 2683874
2020-05-15 00:36:54 -07:00
Prathyusha Guduri
dcb2fc98f6 qcacmn: Add Tx desc limit check for exception packets
Soc level exception descriptors limit is sent from FW in WMI service
ready TLV. Using that to check for exception packets limit

Change-Id: I99d20ecbb6a5bfd61b5a8a205775d34749eae880
2020-05-13 06:46:01 -07:00
Christopher Chopp
6b17c700d4 qcacmn: Add TSF timestamp to MCAST pkts in TX Cap
Move dp_tx_peer_init before dp_peer check to init for
bss_peers as well for MCAST packets. Add TSF timestamp
for wbm completion path in TX Capture feature.

Change-Id: I7da500671e2c22a937cae8770ce5357b9bbe5364
2020-05-03 13:43:45 -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
Radha Krishna Simha Jiguru
41c0716617 qcacmn: Add a change to do fast transmit completion
Lot of checks in Tx completion path are for special handlings
such as when ol stats are enabled some protective debug checks etc..
Add a logic to fast free of buffer at transmit completion.
If extended stats not enabled(Typically needed for enterprise cases)
do the buffer free faster. This is controlled through a flag.

Change-Id: I04873b5e3643d8e93e5b248fcaf23504dcb7624f
2020-04-30 01:51:07 -07:00
Jinwei Chen
446ac2d46e qcacmn: fix TX TDLS discover frame nbuf leak issue
crash scenario:
(1) during dp_vdev_detach_wifi3(), it will reset related outstanding
TX desc vdev pointer to NULL.
(2) In the meantime, if this vdev TX completion is received from HW,
dp_non_std_tx_comp_free_buff() do nothing for nbuf due to null vdev,
leak will happen.

add error handling in dp_non_std_tx_comp_free_buff() to fix it.

Change-Id: I942a3d690711c60e8299d86562f08f0fb77f0b32
CRs-Fixed: 2670186
2020-04-28 05:42:05 -07:00
Neha Bisht
9aa9221c98 qcacmn: Do Batched invalidate of tx completion descriptor
Do batched invalidate of tx completion descriptor to avoid
unnecessary D-cache miss for 32 byte size descriptor.

Change-Id: Ia580fe78dcef5b36f117aaad171a2df6d0e34966
2020-04-28 05:42:01 -07:00
Vevek Venkatesan
00689c8b2f qcacmn: set SRNG_FLUSH_EVENT if runtime suspended
During dp_tx_hw_enqueue writing into HW SRNG,
if devcie is already runtime suspended, set the
SRNG_FLUSH_EVENT, so that it will be flushed
as part of dp runtime resume callback.

Change-Id: I95e74844cf74eb4f73862da3da9d93422f1eea8c
CRs-Fixed: 2664660
2020-04-18 22:32:36 -07:00
Radha Krishna Simha Jiguru
c4ae3d34b6 qcacmn: Add support for lock less access of Tx rings
For 4 core CPU system, Tx access can be made lockless by associating
one Tx ring per CPU. Three Tx DATA rings and one SW2TX command ring
can be used for sending data to Tx.

Change-Id: I6e38cad52dffa4e46ff2b736cd6b949d061fa2a4
2020-04-13 21:16:09 -07:00
Chaithanya Garrepalli
e6632c32fb qcacmn: use soc osdev for unmap in dp_tx_comp_free_buf
In pdev deinit path tx_desc->vdev can be NULL
in dp_tx_comp_free_buf use soc->osdev to unmap instead
of vdev

Change-Id: I8b390656d482fed3c8c85d928860222a88325ca1
2020-04-11 01:31:31 -07:00
Shivani Soni
3ba8fe5a21 qcacmn: NAWDS Tx reinject optimization
During the packet transfer from HOST to Transmit Classifier Layer,
if NAWDS is enabled, send peer id of NAWDS peer.
This is to avoid re-injection from FW to Host.

Change-Id: Ic0e5c46fff3bbe1a3e8ea3a01986478c925452f5
CRs-Fixed: 2628703
2020-04-09 05:21:43 -07:00
Radha Krishna Simha Jiguru
bfbf27a6e6 qcacmn: Enable SW2TCL_CMD ring for data
Enable SW2TCL_CMD ring for data on QCN9000, QCA8074 V2/V1
and IPQ6018 targets.

Enabled 4th Tx ring for data enqueue to HW.
Transmit completions for packets from CPU0 and CPU3 are routed to
WBM2SW Completion ring 2.
WB2SW completion ring2 is mapped to CPU3.

Change-Id: Ied4c4704e1f8623e909ad45c547a611de26c7ec5
2020-04-08 08:19:05 -07:00
Jingxiang Ge
e7d41574f3 qcacmn: Add dbgid for each runtime put/get
This is to enhance statics for runtime put/get, which is
to detect if there is mismatch for usage_count.

Change-Id: I24cddb9d10e4cb675c8375cbd0f589c7718bd680
CRs-Fixed: 2647972
2020-04-07 01:20:41 -07:00
Radha Krishna Simha Jiguru
1167fc9bd4 qcacmn: Restrict DMA Map/UnMap upto skb tail
Restrict DMA Map/UnMap upto tail of the packet during transmission
and transmit completion.

Change-Id: I5659d1bff967e529bb4408b5a7be5e6737726a32
2020-04-03 01:48:03 -07:00
Yeshwanth Sriram Guntuka
0ffde7142a qcacmn: Add support to track per peer no ack counts
Add support to track no ack count for different protocol
packets per peer.

Change-Id: I32f04eb3817c1b6c4806c8bb0230db3a71fadb5e
CRs-Fixed: 2643532
2020-04-01 00:21:41 -07:00
Radha Krishna Simha Jiguru
403408b8c9 qcacmn: rearrange initializations in dp_tx_send
Avoid memzeo of seg_info and msdu_info removing from default standard path
qdf_ktime_to_msg(qdf_ktime_get());  -- moved under a flag
Eth_hdr access made inside the Mcast enhancement check.

Change-Id: I12b6cc397d7eb626abdcdae001e92ef0d980e8a6
2020-03-24 02:41:53 -07:00
Radha Krishna Simha Jiguru
c13c930a62 qcacmn: Rearrange dp_tx_send_single
Rearrange dp_tx_send_single to avoid code duplication.

Change-Id: I35d9f9c36ffecd00931d58b9f66ebc809320963f
2020-03-24 02:41:37 -07:00
Neha Bisht
3b0a0f19ce qcacmn: Disable packet trace by default in per packet path
Disable packet trace by default in per packet path..

Change-Id: I04e998a997edac33eaf1328b71fb6eba675e54c7
2020-03-24 02:41:23 -07:00
Radha Krishna Simha Jiguru
d78c96c67c qcacmn: Restrict lock hold time in tx path
Restrict lock hold time in transmit path to only ring access time.
Also store lmac_id in vdev to avoid multi indirection.
Arrange fields in data structure for better alignment in data path access.

Change-Id: I1d32880ed88be486171be46281ec180d2a4906bf
2020-03-24 02:41:07 -07:00
Chaithanya Garrepalli
9668aeef28 qcacmn: Fix SG target assert issue
In SG mode use correct QDF apis to populate
the extension descriptor

Change-Id: I828d11481b013facb07f22a119ab9b3f35912f22
2020-03-06 08:37:20 -08:00
Ankit Kumar
2bf9b7a18a qcacmn: Initialize command/credit ring for qca8074 & qcn9000
Initialize command/credit ring for qca8074 & qcn9000.

Change-Id: I28087dd4d8f4afddd954c764c2e85da43eaf78f1
CRs-fixed: 2562649
2020-03-01 05:25:24 -08:00
Aditya Sathish
041409f98f qcacmn: Add 6GHz support for chan/freq/band usage in mesh mode
Currently mesh mode uses channel numbering which is derived
from APIs that don't support 6GHz channels numbering due to the
overloading of 6GHz channels with 2.4GHz and 5GHz.

Add support to obtain the correct channel number (and auxiliary
information like band and frequency) through the new APIs that
support 6GHz.

Change-Id: Ib0b39ebae2a22bd6b2b5d17b9058c3c2100e0d59
CRs-Fixed: 2605229
2020-02-20 08:32:09 -08:00
Pavankumar Nandeshwar
0d8578f313 qcacmn: Check the max value for max desc before using
Check the max value for max desc extracted from cfg
before using it for actual allocation of tx descs.

Change-Id: I9bd6c88f136870a42596afbf25328965fce959be
CRs-fixed: 2614329
2020-02-19 08:43:54 -08:00
Saket Jha
a4a994242f qcacmn: TX Optimization
Memory optimization of unused TX rings by not configuring rings that are
not being used. Configure 2 rings for host in the case of IPA, instead
of configuring 3. If IPA is disabled then configure only 1 set of TX
rings for host.

Change-Id: I251606c728f3020a13e45e8c8386970c8a641f0a
CRs-Fixed: 2530572
2020-02-12 02:38:17 -08:00
Adil Saeed Musthafa
bbc4de06d7 qcacmn: per-peer protocol count tracking
Maintain packet counters for each peer based on protocol. Following 3
protocols are supported
* ICMP (IPv4)
* ARP (IPv4)
* EAP

Change-Id: I56dd9bbedd7b6698b7d155a524b242e8cabd76c3
CRs-Fixed: 2604877
2020-02-04 14:17:14 -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
Pavankumar Nandeshwar
6c83405439 qcacmn: Modify set 1 of ctrl_ops to acheive umac-dp decoupling
Change set 1 of the 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: Iedf6dea2215d3d04b2212c71c8ec8c7328c559e8
2020-01-20 17:51:36 -08:00
Himanshu Batra
21ade1514e qcacmn: Componentize Multicast Enhancement
Remove dependency of ME on VAP layer and radio(ic) layer data
structure.

Change-Id: I4d0c8e11a4049c01cd355b794d650cd3342293bf
CRs-Fixed: 2580388
2020-01-17 04:18:48 -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
Tallapragada Kalyan
fa6f80fcad qcacmn: use proper HAL abtraction APIs to get WBM internal error
the current HAL API is to read the WBM internal error
bit from the wbm release ring descriptor is always taking
HKv1 HW structure. But the wbm_internal_error bit
placement has changed from HKv2, for this reason we have
to use target specific HAL API.

Change-Id: I44789180754ca21ae59650b6d8620321a1f12569
2020-01-15 01:30:23 -08:00
Jinwei Chen
0181445b71 qcacmn: fix dp_tx_desc invalid accessing due to race condition
crash scenario:
  a. dp_tx_vdev_detach will reset the vdev of TX desc to NULL
by dp_tx_desc_flush.
  b. in the meantime, if TX completion is coming and when all TX desc
is recycled, the pool will be freed if pool status is invalid before.
  c. invalid TX desc accessing will happen in (a).

add TX desc pool lock protection in dp_tx_desc_flush.

Change-Id: I65c570aa6a3044a478dbe51bbf396cf24612f675
CRs-Fixed: 2595755
2020-01-04 22:12:21 -08:00
Pavankumar Nandeshwar
a234716d1d qcacmn: cmn_ops changes in datapath for umac-dp decoupling
Change cmn_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: I5716a87cad56b1dfe8dd56f193bbb6ff923a6af1
2019-12-27 03:24:59 -08:00
Tiger Yu
dc29b1f9d7 qcacmn: Limit logging when handling tx comp status if vdev is NULL
Use dp_info_rl instead of QDF_TRACE when handling tx completion status to
avoid excessive logging when vdev is destroyed in the another thread.

Change-Id: I1044c6d747ba1c7036664fe0265ec4855b7b4c47
CRs-Fixed: 2591486
2019-12-25 01:51:21 -08:00
Venkata Sharath Chandra Manchala
d62af87cc1 qcacmn: Increment/Decrement num_tx_outstanding
Increment pdev->num_tx_outstanding when
tx_desc is allocated and decrement tx_desc when tx_desc
is released. During runtime pm suspend, WOW PAUSE
is sent to firmware only if there are no
pending num_tx_outstanding descriptors.

Change-Id: I54aaa4d8a37b8cd47de1701a315bb0735c9739d2
CRs-Fixed: 2567689
2019-12-01 19:17:39 -08:00
Jinwei Chen
a9d46ad930 qcacmn: remove assert for invalid release source case
Remove host assert when receiving invalid release source entry from
WBM2SW0 ring.

Change-Id: Iae62ce3008024c55c1dde79e4dd0cd93d7e6f5a4
CRs-Fixed: 2571826
2019-12-01 19:17:10 -08:00
Mainak Sen
8bc9b42eb3 qcacmn: Loopback check for ucast frame after hmmc
Add a check to drop unicast frame being sent to same originating
VAP after hmmc conversion of IGMP control packets

Change-Id: Ic25812a7848af793075a0cb483100ebcf59d85b2
2019-12-01 19:16:31 -08:00
Rakesh Pillai
74368919c5 qcacmn: Ratelimit the tso descriptor alloc failure
In cases were all the tso tx descriptors are outstanding,
the alloc for any subsequent tso packet will fail.
This failure to get a tso tx descriptor floods the
console with failure logs.

Ratelimit the tso descriptor allocation failure and
increment the alloc failure in stats to get the exact
number of times the allocation failed.

CRs-Fixed: 2572580
Change-Id: I789788b917421be99df5435ad858d715ef0f5c8e
2019-12-01 17:42:07 -08:00