نمودار کامیت

150 کامیت‌ها

مولف SHA1 پیام تاریخ
Namita Nair
b50ceeee79 qcacmn: Defer IPA SMMU mapping to OPT_DP reserve
Currently, IPA SMMU map/unmap is called as part
of init. This causes every nbuf to be mapped
to IPA in the Rx path, causing throughputs
to drop. This change resolves the problem by
deferring the IPA SMMU map/unmap
call to OPT_DP filter reserve/release, as
nbuf needs to be mapped to IPA only in this scenario.

Change-Id: If198a6c5f22af58fdaf9d9c020c74b1f76002e37
CRs-Fixed: 3496679
2023-07-04 22:36:13 -07:00
nobelj
bcacfe9271 qcacmn: Add fix for encryption fragment ping
when station connected to AP in security type other than tkip header
size is incremented with security header length causing stack to
misunderstood the protocol and not responding to the ping.

additional security header added after decap is removed.

Change-Id: I521b0990fe9e5746a8c8cfb29de7064cf51d0687
CRs-Fixed: 3509594
2023-06-15 16:32:00 -07:00
Srinivas Girigowda
07bdb1114b qcacmn: Remove trailing comma/period from the DP logs
Remove trailing comma/period from the DP logs.

Change-Id: Ifdaf508157274c44f04e775c1883c4eaa2924c44
CRs-Fixed: 3492731
2023-05-18 18:42:28 -07:00
Srinivas Girigowda
48cf24b446 qcacmn: Remove trailing newline from the DP Logs
Remove trailing newline from the DP Logs.

Change-Id: Iaf54e57fb44cf7c15d82bd5c0ffb3fc7c3d04a2b
CRs-Fixed: 3492501
2023-05-18 18:42:08 -07:00
Karthik Kantamneni
82a1c01b88 qcacmn: Refactor unused RX code for SOFTUMAC platforms
In RX and defrag path some of the code in common files will
not be used by new SOFTUMAC based platform. So placing all
the unused code under SOFTUMAC macro and for better readability
clubbing all the code at one place in source file.

Change-Id: I6ff3997a42872a25fb020898f7fb1879746fc8e6
CRs-Fixed: 3382899
2023-03-04 13:22:29 -08:00
Karthik Kantamneni
609cff4e50 qcacmn: Make static API's as global to be used in other files
Make static API's as global so that they can be used in external
architecture specific related files.

Change-Id: Ida906d5dba18cc7c87a3965addf882eecfe55e0e
CRs-Fixed: 3382927
2023-03-04 08:52:13 -08:00
Jeff Johnson
8b86e068ec qcacmn: Fix dp/wifi3.0/dp_rx_defrag.* documentation
The kernel-doc script identified a large number of documentation
issues in dp/wifi3.0/dp_rx_defrag.[ch], so fix those issues. In
addition, there are a number of instances where public functions have
their implementation documented instead of having their interface
documented, so move that documentation.

Change-Id: I4080e4b614c5d1f0253afd06fc4eb650142b76d4
CRs-Fixed: 3373163
2023-02-16 01:43:31 -08:00
Mukul Dhiman
eb258890bc qcacmn: remove unused var in dp/wifi3.0/dp_rx_defrag.c
remove unused var and declarations in dp/wifi3.0/dp_rx_defrag.c

CRs-Fixed: 3284798
Change-Id: Ic463987cec34575465fb885a324b064c4bdc92d3
2023-01-08 23:17:15 -08:00
Yeshwanth Sriram Guntuka
34d893df39 qcacmn: IOMMU map and unmap RX buffers to LPASS SMMU CB
IOMMU map and unmap RX buffers into LPASS SMMU context
bank for LPASS to access RX buffers in direct link
usecases.

Change-Id: Ie72a008309e3abdf3fbc7198bb5d3af5e9497180
CRs-Fixed: 3356568
2022-12-22 00:45:12 -08:00
Chaithanya Garrepalli
67fa8470e3 qcacmn: WAR to avoid processing corrupted packet
In defrag path match addr1 with VAP mac address
and if there is mismatch do not process considering
it as corrupted packet

Change-Id: I003c07949e760ff4e64a7d22bfbefc25cc817ae2
CRs-Fixed: 3327977
2022-11-07 13:11:20 -08:00
Sai Rupesh Chevuru
63d8ecaa0f qcacmn: Fetch the reo qdesc from the peer
When compact rx tlv feature is enabled fetch the
reo qdesc from the peer instead of rx pkt tlvs.

Change-Id: Idc9eec559b71ebb2dc39ea1d648a384ea0eb9559
CRs-Fixed: 3311270
2022-10-16 21:43:15 -07:00
Tallapragada Kalyan
c2e702fbf9 qcacmn: use hal api to get the reo_destination ring size
use hal api to get the reo_destination ring size

Change-Id: I6710dda215a13fb0b61173f4da0d6e780423faab
CRs-Fixed: 3309725
2022-10-15 10:30:43 -07:00
Jeff Johnson
ebfbc0d927 qcacmn: dp: Fix misspellings
Fix misspellings in dp/...

Change-Id: I6ef7a19ee03104ae38a8a77e229b90aa80329592
CRs-Fixed: 3304682
2022-10-07 22:42:22 -07:00
Sai Rupesh Chevuru
136869a4c0 qcacmn: Avoid fetching of addr4 from the RX TLV
In defrag path will be receiving raw frames with wifi header,
instead of fetching the addr4 from the tlv, use it from wifi header

Change-Id: I516295660f39135225efd79c6b1bb0b93b1d81d3
CRs-Fixed: 3303206
2022-10-01 09:47:31 -07:00
Tallapragada Kalyan
27da15777b qcacmn: initialize BE specific HAL API callbacks
certain BE specific HAL APIs were only initialized for
KIWI chipset but not for WKK. Now moved all these APIs
under beryllium generic initialization.

These APIs are mainly used in de-frag pkt handling.

CRs-Fixed: 3294784
Change-Id: I6611f1b7ef80b432d24a490ba65880dd55539137
2022-09-26 02:04:24 -07:00
Devender Kumar
a85ce1152c qcacmn: Debug framework for SMMU buffer tracker for IPA offload
Debug framework for tracking the SMMU mapping and unmapping of
skb buffer when IPA offload is enable and IPA_SMMU_NBUF_TRACKER
is define.

CRs-Fixed: 3255423
change-Id: I8966097945b33cb866f4642b98b3d1a4beabfad7
2022-09-13 03:24:34 -07:00
Pavankumar Nandeshwar
67de6bcbfd qcacmn: Handle Umac post reset at host
Handle Umac post reset and post reset complete
events from firmware.

Change-Id: I76ac1b96f01f026535d31edcbd245b3643ecf6ee
CRs-Fixed: 3267222
2022-08-21 00:37:46 -07:00
Jinwei Chen
2e15ede864 qcacmn: fix rx de-frag issue for aes_ccmp security
In function dp_rx_defrag_ccmp_decap(), it will remove the 8 bytes
ccmp header for each fragment, but later at the end of dp_rx_defrag(),
8 bytes ccmp header will be removed again, then actual 8 bytes packet
data will be lost, de-frag failed.

Do not remove ccmp header in dp_rx_defrag_ccmp_decap() as it is not
necessary.

Change-Id: Ibf7beca38e9979a3203d4de702716c8e24e435fe
CRs-Fixed: 3263872
2022-08-12 22:46:58 -07:00
Amit Mehta
7e799fcbae qcacmn: Fix Rx packet logging issue
Currently while sending nbuf to rx fate logs
we are not removing rx tlv before sending nbuf
to logger which is causing issue of incorrect
packet type issue.

To Fix issue make changes to make sure that
rx tlv is removed and nbuf length is set

Change-Id: Ib56c8e009398b3410c43be910feb4048bfb06b54
CRs-Fixed: 3241828
2022-07-24 23:07:50 -07:00
David Oladunjoye
5c6ac7b887 qcacmn: dp: Replace fallthrough comment with attribute
-Wimplicit-fallthrough is being enabled by default. Some compilers
such as clang require the attribute instead of just a fallthrough comment.

Change-Id: I443da8d7f5e1771dceb3386c4458b0da6a5e9476
CRs-Fixed: 3218236
2022-07-07 00:52:07 -07:00
Amit Mehta
6b576c65bb qcacmn: Add packet logging support for initial 32 packets
Add packet logging support by registering
Rx and Tx callback functions for packet logging of
initial 32 Tx and Rx packets.

Change-Id: I91b59b7c5f65f505e3ee730c497347be28955128
CRs-Fixed: 3224881
2022-06-23 07:03:56 -07:00
Pavankumar Nandeshwar
9979d1a189 qcacmn: Initialize txrx_ref_handle for whunt bypass
Initialize txrx_ref_handle for whunt bypass,
Which is complaining use of uninitialized txrx_ref_handle,
as it is not able to detect that txrx_ref_handle is
populated from another API.

Change-Id: I0f69cf4c8442a5655559622a5825d7af35b9ae5e
CRs-Fixed: 3127788
2022-02-11 04:13:31 -08:00
Varsha Mishra
6f6afd5755 qcacmn: Add code for ccmp decap
After ccm demic, remove ccmp header
In this TLV length worth of data needs to recopied.

Change-Id: I964167396a3c93b09c27b5acedb53638d8ff2baa
2022-02-10 01:38:04 -08:00
Pavankumar Nandeshwar
04bb406179 qcacmn: use txrx_peer in defrag and rx error paths
Use txrx_peer in defragmentation and rx error paths instead of
main dp peer.

Change-Id: I95bb2f672e49d0f6ddb94a093688b0fbce5e373d
CRs-Fixed: 3095637
2022-02-09 11:53:43 -08:00
Tallapragada Kalyan
b265fdd7fc qcacmn: introduce simple nbuf_free API in RX path
simple Alloc is being used in RX path which avoids
certain debug logic. during free of nbuf we should
avoid this debug logic else it will report it as
double free, this will be triggered only when debug
is enabled

Change-Id: Iadb40071fb733cc4de3291784df5075d5a099a8e
2022-02-02 12:06:34 -08:00
Ananya Gupta
e5a33cd5b6 qcacmn: Fix reo reinjection path
Add 2 hal soc ops, hal_msdu_desc_info_set and
hal_mpdu_desc_info_se for berilliyum datapath.
Attach hal_rx_msdu_ext_desc_info_get_ptr_be to its function
pointer.
Get reo queue descriptor address as a 5 byte value as in
beryllium datapath it is being obtained from rx packet tlv.

Change-Id: Ia58597384e1a3d5eec493b865a88bab4f209502d
CRs-Fixed: 3084532
2021-12-14 21:22:54 -08:00
Chaithanya Garrepalli
63cbee363b qcacmn: Correct RBM value when giving link_desc to HW
Use correct RBM value while giving back link descriptors
to HW from RX defrag path

Change-Id: I75eb41cd166dde2d26f32d3165ac52f732c83d82
2021-12-04 15:34:53 -08:00
Amit Mehta
08f31818b9 qcacmn: Extend tid_lock in rx defrag store fragment path
Currently, we are Flushing fragments for peer as part of rx defrag
clean up. There is the possibility that frag flush is called while
we are accessing frags in rx defrag store fragment path in parallel.
Which will cause access after the free issue.

Extending lock in rx defrag store fragment path to avoid any
parallel flush while accessing the frags.

Change-Id: I1e897b195f61d80ea6738e9a93f7bcaaa04adc97
CRs-Fixed: 3065414
2021-11-12 03:13:21 -08:00
Ananya Gupta
182d1268cc qcacmn: Unlock tid_lock after status check
There is a race condition as tid_lock is unlocked early in
dp_rx_defrag_store_fragment and descriptors are replenished
from dp_peer_flush_frags and same descriptor is again
being replenished in fragmented path.
To resolve this, extending lock period till all the operations
on tid.head_frag_desc are done.

Change-Id: I6d2abb2119e3bebf739de9e41334d58ba87ee391
CRs-Fixed: 3068165
2021-11-12 03:13:16 -08:00
Ananya Gupta
122bc19864 qcacmn: Fix REO reinjection path in hamilton DP
Add HAL APIs to fix REO reinjection path in hamilton DP

Change-Id: I73c6ec0aeb2f6d4bc72b366e22e9bc826f852426
CRs-Fixed: 3058549
2021-10-27 07:05:06 -07:00
Rakesh Pillai
57e2c01e5e qcacmn: Peer id parsing changes for beryllium
Take care of the MLO peer bit indication to be
concatenated with peer_id to access the peer map
object.

Change-Id: Ia603a728101e83829a8906d1b847f42389e78ca6
CRs-Fixed: 3039326
2021-10-15 13:13:27 -07:00
Jinwei Chen
5c85cfb5a0 qcacmn: cdp/dp peer change for MLO
cdp/dp peer change for MLO

Change-Id: I9b8eb741317a0dc7337aff7e773148892e531ba2
CRs-Fixed: 3031166
2021-10-15 13:13:12 -07:00
Chaithanya Garrepalli
3c3e5709ac qcacmn: Increse num TX rings for QCN9224
This change includes below
1) Changes needed to increase Tx rings to 4
2) Use WBM2SW4 ring for rx error in QCN9224
3) memset srng at alloc to avoid populating RBM_id
in per packet path and enable implicit RBM

Change-Id: Icbd5ac2378273b8f3c6adc41c611e29551fff22f
2021-10-13 13:12:19 -07:00
Amit Mehta
e1bfd2dbdc qcacmn: Acquire lock while accessing rx tid in rx defrag store fragment
Currently, we are Flushing fragments for peer as part of rx defrag
clean up. There is the possibility that frag flush is called while
we are accessing frags in rx defrag store fragment path in parallel.
Which will cause access after the free issue.

Adding lock in rx defrag store fragment path to avoid any
parallel flush while accessing the frags.

Change-Id: Ic27caab58429d776449f4b774eb7163ffa6215ac
CRs-Fixed: 2995156
2021-08-02 10:56:55 -07:00
Shikha Bakshi
6494ed4e55 qcacmn: PN check bypass required in WEP mode as welil
There is no consecutive PN number for fragments in
open/WEP security mode so no point of dropping such frames

Change-Id: If75a99cb89c6b0997e9b07afc582c4141c277bb8
2021-08-02 01:59:19 -07:00
nobelj
25acb759bf qcacmn: Fixes to enable LI & BE in a build
Changes to build Lithium and Beryllium together.
This is needed for WIN

Change-Id: I74c86803ea99fb17d1f73e8b9c4e7cf59751a707
2021-06-07 01:51:15 -07:00
Rakesh Pillai
872da9462b qcacmn: Datapath RX error handler for WCN7850
Add DP rx error handler changes for WCN7850.

Change-Id: I401f1b69eb107818e7aceb0a51279dab7f558b96
CRs-Fixed: 2891021
2021-06-05 15:10:50 -07:00
Yeshwanth Sriram Guntuka
548c146aa0 qcacmn: Add support for GCMP in rx de-fragmentation
GCMP header and MIC are not removed for received
fragments which will result in incorrect ethertype
and presence of LLC hdr in the data when the frames
are sent to network stack.

Fix is to add support for GCMP in rx de-fragmentation
path.

Change-Id: I83ed29a766e40e32f4b712342ebd40d08a2c65e0
CRs-Fixed: 2941879
2021-05-31 07:47:38 -07:00
Karthik Kantamneni
bbd65e7a59 qcacmn: Fix rx buffer IPA map/unmap for exception cases
IPA unmapping is skipped for WBM internal error case,
do IPA unmapping for rx buffer received in WBM error case.

While reinjecting RX buffer back to REO, software rx desc
unmapped field is not set in sequence which may lead to
map without unmap error in IPA module. So reset the unmapped
filed after IPA mapping is complete.

Change-Id: I42c1eaa1620f975d47ce2938c95b6b89dbbd3eca
CRs-Fixed: 2952671
2021-05-27 13:41:40 -07:00
Karthik Kantamneni
cfbfcf3b21 qcacmn: Fix race condition during IPA map/unmap handling
While Rx buffers are getting umapped from net rx context if IPA
pipes are enabled at same time from MC thread context this is
leading to race condition and IPA map/unmap is going out of sync.

To fix this introducing IPA mapping lock and IPA mapping need to
be handled with lock held.

Change-Id: I9fa71bdb6d4e4aa93fc795cc5dd472a181325991
CRs-Fixed: 2945063
2021-05-27 13:41:35 -07:00
Varsha Mishra
01c0c273d1 qcacmn: Drop fragmented multicast/broadcast frames
CVE-2020-26145
Broadcast and multicast frames should never be fragmented. Several devices
process broadcasted fragments as normal unfragmented frames. Moreover, some
devices accept plaintext fragmented broadcast or multicast frames in
protected Wi-Fi networks. An adversary can abuse this to inject packets
by encapsulating them in a fragmented plaintext broadcast frame. Even
unicast packets can be encapsulated in broadcast Wi-Fi frames and hence
be injected.

Change-Id: I3181a05e177cf9374a14edb748bc5001d058e0f3
CRs-Fixed: 2893212
2021-05-13 15:32:23 -07:00
Yeshwanth Sriram Guntuka
81c70ce74b qcacmn: Modify check to ensure consecutive PN for frags
Modify check to ensure packet number is consecutive for
fragments and drop the fragments if the check fails.

Change-Id: I2ca0ef6211594ba35aae894e6a385d3d5778bff6
CRs-Fixed: 2874369
2021-05-13 06:20:10 -07:00
Karthik Kantamneni
f93e080576 qcacmn: Rate limit tid not setup DP error log
There is possiblity of receiving fragmented packets just before
tid setup is done, so rate limit the tid not setup error log
to avoid excessive cosole logging.

Change-Id: I372d3904650fcbf2ad11313da1087da52a0d3dc6
CRs-Fixed: 2884897
2021-03-02 14:22:40 -08:00
Lihua Liu
74efc61848 qcacmn: Avoid using small buffer address
The memory below 0x2000 is reserved for the target use,
so any memory in this region should not used by host.
But on some third-party platforms, we observe such
memory is allocated for RX buffer, which cause HW/FW
NOC error, then RX is stuck. To address this,
re-allocate RX buffers when small buffer appear.

Change-Id: Iad118e82f3fe10f92cbf5f7388dc0960542fc03c
CRs-Fixed: 2707190
2021-02-04 06:43:41 -08:00
Himanshu Batra
ec2e7778ea qcacmn: Modify logs for QDF_MODULE_ID_CDP
Use macros like dp_cdp_debug, dp_cdp_err, dp_cdp_info to
print logs for QDF_MODULE_ID_CDP

Change-Id: I550eefa82c3417b8bf83378d4a9c6f382098fea6
CRs-Fixed: 2855937
2021-01-30 00:51:20 -08:00
Karthik Kantamneni
2c94590699 qcacmn: Fix MIC header calculation for MPDU fragmented packets
While performing MIC header check for MPDU fragmented packets
host is expecting last fragment will hold full 8bytes of MIC header,
but this is not true in case of MPDU level fragmentation since
MIC header is part of payload it can split across last two fragments.
Fix this logic by extracting MIC header from last two fragments in case
last fragment doesn't have full 8 bytes of MIC header.

Change-Id: I41aaa35d9a18ac0222ab55be6822f9c9d7f15982
CRs-Fixed: 2790661
2020-10-23 03:52:56 -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
Ananya Gupta
34c53389f7 qcacmn: Remove check for ring_desc in dp_rx_defrag_store_fragment
ring_desc is being validated in dp_rx_err_process before passing
the ring_desc to dp_rx_defrag_store_fragment.
Hence removing the additional checks for ring_desc.

Change-Id: Ib863ea4d512075beed58f09ff6167aa2a556efea
CRs-Fixed: 2771408
2020-09-11 07:36:54 -07:00
Rakesh Pillai
6b95713d00 qcacmn: Skip history record if memory allocation fails
Skip the recording of rx error ring and rx reinject
history if the memory allocation for the history
fails during the attach.

Change-Id: Ifa74937d0c37e6013ccaec851dab7d9e53057ac2
CRs-Fixed: 2767579
2020-09-03 01:58:39 -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