コミットグラフ

332 コミット

作成者 SHA1 メッセージ 日付
Debasis Das
a420fc8730 qcacmn: Dont unmap cloned ME buf's before freeing
For ME, cloned nbuf's are not mapped.Hence,these
should not be unmapped before freeing.

Change-Id: I998cd4924781944754a81df7d3675c0a34dc10a0
2020-10-28 05:05:35 -07:00
Rakesh Pillai
b91fda62d9 qcacmn: Increment skb users for TSO pkt before enqueue of first segment
TSO packet segments are enqueued to the HW individually.
The skb users count is incremented for each additional
segment, so that it is freed only when the TX completion
for the last segment is received.

Currently the skb users is incremented for the additional
TSO segments after the previous segment has been enqueued
to the HW. Due to this, there is a chance for the tx
completion for the first TSO segment to be received even
before the skb users is incremented to account for the
remaining TSO segments, thereby leading to use-after-free
scenarios.

Fix this by incrementing the skb users for additional
TSO segment before enqueueing the previous TSO segment
to the HW.

Change-Id: Idebc28719ba6f0223d5454e15c3cde349803816e
CRs-Fixed: 2801777
2020-10-22 22:10:52 -07:00
Varsha Mishra
ca0cf99f1d qcacmn: FR-64493 WDS Extended support
Use AST override feature to send out multicast packet in
4 address format. Pass per packet peer_id from osif layer.

Change-Id: Ic86120169c89e7972caa3cc8c967de72670314d0
CRs-Fixed: 2775051
2020-09-19 10:25:26 -07:00
Debasis Das
82de94ec39 qcacmn: Free cloned nbufs in error condition
While sending me packets, if failure is encountered
either while preparing tx desc or while enqueuing
to h/w,the cloned nbuf's must be freed.The unmap
must be done only if the failure is encountered
for all the me buffers.

Change-Id: I08dbae1fa1820b4fb31119f65e939aead829321b
2020-09-17 21:09:10 -07:00
Debasis Das
c1184913b7 qcacmn: Ensure nbuf count is less than no of segs
While preparing raw packets for transmission, the count
of nbuf belonging to one mpdu must be less than the
number of segments.This makes sure the frags array inside
seg_info does not go out of bounds.

Change-Id: I7fffba7f64da274aa73c558cfc63d90f4419a04d
2020-09-17 21:09:07 -07:00
Ankit Kumar
bdddeb7c22 qcacmn: Add frame vdev id check in tx
Drop frame if it is not for the vap, to which
client is connected.
Enable this check only for ap.

Change-Id: I33d7eb79267490bdb8697e4e45f789e9f6279f0e
CRs-Fixed: 2756304
2020-09-16 09:30:33 -07:00
Debasis Das
26833e494d qcacmn: Unmap previously mapped frags in case of failure
While creating sg frames,if map fails for a fragment,
the previously mapped fragments must be unmapped.
Also, the nbuf mapping should happen for headlength.

Change-Id: I218efa60be7100a661da7bc3783fa25e5203a273
2020-09-16 04:51:55 -07:00
Rakesh Pillai
c013de5747 qcacmn: Fix the identifier names for SWLM
The identifiers for SWLM are named incorrectly.
Fix these incorrect naming in SWLM.

Change-Id: I107c22df96c65997a349c0dc1a746e06f1c5b5fa
2020-09-11 16:17:46 -07:00
Rakesh Pillai
156a7ecfc0 qcacmn: Coalesc the tx head pointer writes
Add the support to coalesc the tx head pointer
register writes to reduce the number of PCIe
writes.

Change-Id: I4fea22464c2bf6930bac42dab72c1c2fc5fa18e2
CRs-Fixed: 2769017
2020-09-10 01:04:25 -07:00
Rakesh Pillai
21af5ba8cf qcacmn: Add data structures for SWLM
Add the necessary data structures for the
software latency manager.

Change-Id: Ibf55f0eef7ee6602b007de39a28f09c4622bd356
CRs-Fixed: 2769004
2020-09-10 01:04:20 -07:00
Mainak Sen
60cdb2185c qcacmn: Hlos tid override support in dp vdev
1. Add flag to support hlos id override feature in dp vdev
2. Update tid from nbuf->priority in dp_tx_send
3. Update tid to nbuf->priority in dp_rx_process

Change-Id: I66e8d77733a667f3f60b77e0d7bb444f7c5ad93d
2020-09-07 01:03:42 -07:00
phadiman
6510531b81 qcacmn: Remove dp_tx_pdev_detach API
dp_tx_pdev_detach API takes care of flushing
tx descriptors and multicast enhancement mem
cleanup

dp_pdev_deinit takes care of cleaning up the
above actions and dp_tx_pdev_detach is simply
a redundant piece of code

Hence remove dp_tx_pdev_detach API and call
dp_tx_desc_flush directly from dp_pdev_deinit

CRs-Fixed: 2769303
Change-Id: Ic798793e81eefc7dc905ca7552fdca13e9fddd8c
2020-09-05 10:27:22 -07:00
phadiman
dbb0787de4 qcacmn: Modify wlanstats context to RDK stats context
peer wlanstats context is used only for RDK Plume stats
but the name is misleading as wlan statistics

Hence rename peer's wlanstats_ctx to rdkstats_ctx and
the APIs the APIs around the same

CRs-Fixed: 2767192
Change-Id: I9e8955554b94fa29a3964fed729a95a4db67c8f6
2020-09-03 04:04:17 -07:00
Chaithanya Garrepalli
7db23eeca2 qcacmn: use batch peer reference in TX path
In Tx data path get the peer reference and use
until there is a peer_id mismatch. This is to avoid
per packet atomic operations

Change-Id: I59cdbef19001c694654f0967381a9242788d9cbc
2020-08-28 02:01:20 -07:00
Pavankumar Nandeshwar
0eeac59b4e qcacmn: VoW IGMP improvements
As part of the VoW IGMP improvements, which deals with
conversion of igmp packets to unicast packets, the
following changes are done when the new feature is enabled:

1. IGMP/MLD packets with special addresses (addresses not
   part of any multicast group) will be converted to all
   existing clients of the AP. These packets will be
   directly fed to igmp multicast to unicast conversion
   module.
2. The IGMP/MLD packets with group specific addresses will
   first go to multicast enhancement module, where they
   will be allowed to pass and will be converted to unicast.
3. The new feature will be enabled only when multicast
   enhancement feature is enabled, which will be ensured
   at the configuration level.
FR : 61063

Change-Id: I2fd5a67766c806432fbe1a12cb9654a3600100f5
2020-08-28 02:00:48 -07:00
Srinivas Girigowda
b100ced3c7 qcacmn: dp: Change %pM/QDF_MAC_ADDR_STR/ARRAY to QDF_MAC_ADDR_FMT/REF
Change %pM/QDF_MAC_ADDR_STR/ARRAY to QDF_MAC_ADDR_FMT/REF.

CRs-Fixed: 2760938
Change-Id: Ib7999b69f79a65a67e1d9f7e24a04b7a7da0aebf
2020-08-23 23:09:31 -07:00
Chaithanya Garrepalli
926912fe86 qcacmn: store vdev_id in tx desc instead of vdev pointer
In tx desc store vdev_id to avoid unprotected access of
vdev memory.

In tx path pass VDEV as argument to all APIs

In completion path get vdev from peer as vdev reference
in peer is protected with reference, in places where peer
is invalid get vdev object using vdev_id stored in tx desc
with a reference count

Change-Id: I364ebb51143218872c0bc6f856772ab1df00bb17
2020-08-21 11:42:28 -07:00
Chaithanya Garrepalli
ddc9e59e8f qcacmn: Add VDEV refcount debug support
Add debug support for VDEV refcount to take
refcount by module id and decrement corresponding
refcount with same module id

Change-Id: I15c075816994ba70155fefbc0bce208b20fb9a59
2020-08-20 10:07:32 -07:00
Chaithanya Garrepalli
a718007f03 qcacmn: increment vdev refcount for search by id
Add new API dp_vdev_get_ref_by_id() which will return vdev
pointer by holding a reference. Caller of this API has
to ensure that this reference is released by calling
dp_vdev_unref_delete() API

New lock soc->vdev_map_lock is introduced to protect
vdev id to object array

Change-Id: I883e328932e35ef31254125492dbae20cebe0e00
2020-08-20 10:07:28 -07:00
Mohit Khanna
27f16faa4d qcacmn: Exclude HTT metadata length when not in use during TX
Currently, when an extension descriptor is used during TX datapath, we
use HTT metadata length + msdu extension descriptor length, even we
do not fill HTT meta data. This is inefficient and hardware will end up
doing DMA of extra HTT metadata, even when not needed.
Include length of metadata in TCLdata command only if HTT metadata is
filled in.

Change-Id: Idd1b053c1c6bd8b39880efe5743980667454df0d
CRs-Fixed: 2738733
2020-08-17 22:02:35 -07:00
Chaithanya Garrepalli
e2b00339f3 qcacmn: add APIs to iterate the peers at vdev level
Add new APIs to iterate through the vdev peer list
by taking the peer reference.

A call back has to be passed to these APIs which will
be called for every peer in the lisst

dp_vdev_iterate_peer() -> iterates through peer_list of vdev
dp_pdev_iterate_peer() -> iterates through peer_list of all
                          vdevs in pdev
dp_soc_iterate_peer() -> iterates through peer_lists of all vdevs
                         in soc

Additonal APIs are added to for itearations where the callback
will be called outside the vdev->peer_list_lock, as these APIs
have additional memory allocations suggested to use only in case
the iteration need to happen outside lock

dp_vdev_iterate_peer_lock_safe()
dp_pdev_iterate_peer_lock_safe()
dp_soc_iterate_peer_lock_safe

Change-Id: I24632fe611355cc3e93b7f16d90913d4b8686ca9
2020-08-15 01:26:23 -07:00
Chaithanya Garrepalli
f4701f13ec qcacmn: remove peer backpointer in DP ast entry
Remove the peer backpointer in ast entry and store
peer_id instead

Assign peer_id in AST entry in AST MAP event,
also add the ast entry to peers ast list

In AST map & AST unmap APIs use ast find by vdev_id

Change-Id: I74d9828dc309149d98f6f577b5c8304cb087fd76
2020-08-15 01:26:17 -07:00
Chaithanya Garrepalli
fdc6a808ae qcacmn: add module id for peer reference
Add support to get the peer reference with module id

To help debug the peer reference related issues

Change-Id: Ie20c7e710b9784b52f2e0f3d7488509282528a00
2020-08-15 01:26:14 -07:00
Chaithanya Garrepalli
113841906c qcacmn: increment refcount for peer find by id
Use unified version of dp_peer_find_by_id API
which will take peer reference

Also use unified peer ref release API dp_peer_unref_delete

Change-Id: Ibb516a933020a42a5584dbbbba59f8d9b72dcaa4
2020-08-15 01:26:10 -07:00
Chaithanya Garrepalli
86d3df0605 qcacmn: use granular locks to protect peer structures
Remove the global soc->peer_ref_mutex lock to protect
peer access

Instead use granular locks to protect the individual
peer DBs

1) soc→peer_hash_lock : To protect peer hash table
2) soc→peer_map_lock : To protect id to objmap array
3) vdev→peer_list_lock : To protect vdev level peer list

Change-Id: I9f044c4d71fe1155817a2b22a5a050545ec37445
2020-08-15 01:26:03 -07:00
Yu Tian
a1264e5fea qcacmn: Fix static code analysis issues in DP
hdr_ptr is in skb_buffer data, it's assigned with 6B array,
use uint8_t point convert to avoid SA overflow warnning.

tid has asseration protect, but need to break execute to avoid
of SA warnning

Fix use-after-free of ast_entry

Change-Id: I0835f93291cf3da2b4fd57d8c9a90f20a60c11ee
CRs-Fixed: 2751678
2020-08-14 08:12:58 -07:00
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