Commit Graph

1016 Commits

Author SHA1 Message Date
Yu Wang
a4791d8279 qcacld-3.0: add build flag for network package timestamping
Network package timestamping is optional for TSF feature,
to make it configurable, add a new build flag
WLAN_FEATURE_TSF_PLUS_SOCK_TS.
This flag will be set only when CONFIG_WLAN_SYNC_TSF_PLUS
is enabled and CONFIG_WLAN_SYNC_TSF_PLUS_DISABLE_SOCK_TS
is not.

Change-Id: I413e85fadf93264cd41c2739b6d870aa08d60efb
CRs-Fixed: 3027378
2021-09-10 15:36:13 -07:00
Vevek Venkatesan
4d80c88564 qcacld-3.0: fix race condition in HL IPA Rx buf SMMU map/unmap
While Rx buffers are getting umapped from net rx context and
if IPA pipes are enabled at same time from MC thread context,
this is leading to race condition and IPA SMMU map/unmap is
going out of sync, in adrestea targets.

To fix this introducing IPA SMMU map lock and sync map/unmap.

Change-Id: Ida4c321d94f9640135c67210c69edb355d827c86
CRs-Fixed: 3021027
2021-08-31 10:08:54 -07:00
Yu Tian
25c1a53711 qcacld-3.0: Keep using 4 RX threads for platform with no IPA
For platforms that don't have IPA module, 4 RX rings can be
enabled to map to 4 RX threads. This Change is to implement a
feature flag to separate the number of threads used for
different platforms.

Change-Id: I23744ca6333f29667b0860f386dc9fc45f29abe4
CRs-Fixed: 3018613
2021-08-23 15:43:57 -07:00
Karthik Kantamneni
e649071fbe qcacld-3.0: Don't start fisa fse flush timer in suspend state
Currently CMEM FISA FSE flush work timer can be triggered
in suspend sequence, this may lead to starting timer even
it is pending to executed.

To avoid this check if flush is allowed before starting the timer.

Change-Id: Ie4a8386a7a7c7ae8c2fba97cae65578ae56b0b4b
CRs-Fixed: 3015719
2021-08-17 18:03:10 -07:00
Yeshwanth Sriram Guntuka
5308b1abd3 qcacld-3.0: Use ini values for datapath prealloc
The memory allocation for srngs and tx/rx descriptors
are done during prealloc using macros. This could
potentially result in OOB access if the srngs sizes
and tx/rx descriptor num of elements are increased
via ini config.

Fix is to use ini values to update the srng sizes or
num of tx/rx descriptors for appropriate memory alloc
during dp prealloc.

Change-Id: Iaeac3833fd8e13df6baa9452a7d7f194b86a8bd3
CRs-Fixed: 3012648
2021-08-16 10:34:34 -07:00
Vevek Venkatesan
d26b38d254 qcacld-3.0: call CDP API for pkt_log_exit from CDS layer
Once pkt_log_con_service success in cds_pre_enable,
in case of any further failure, pkt_log_exit cleanup is
not done, so calling CDP interface API for pkt_log_exit.

Change-Id: Ibddc99fb47109a73de095f068694b2548849f14d
CRs-Fixed: 2978390
2021-08-14 23:06:43 -07:00
Yu Tian
2af4d0a937 qcacld-3.0: use adaptive timeout value for rx thread flush
When vdev down flag is set, rx thread needs to flush the
pending frames in a fixed timeout value. Overall scheduler
timeout value is 10s, fixed timeout for each thread is 4s,
so if more than two threads timeout happens, scheduler timeout
may happen and lead to crash. Change to use adaptive timeout
for each thread to make overall threads wait time less than 10s.

Change-Id: If8acdaf1cac9d776e15d3020c8152101eae74a0c
CRs-Fixed: 2973947
2021-06-30 18:51:44 -07:00
Manjunathappa Prakash
add10158ba qcacld-3.0: Add support for additional REO rings for Hamilton
Hamilton supports 4 additional REO rings to cater to increased
throughput. Enable additional REO rings.

Change-Id: I5a527724220cf898994e71b48cee577e3c538f9f
2021-06-30 13:47:05 -07:00
Yeshwanth Sriram Guntuka
b4377be446 qcacld-3.0: Do not do PN check in case of WEP security
In WEP connection, IV values used for consecutive packets
could be random and need not be monotonically increasing
or consecutive in case of fragments. This could result in
incorrect drop of fragments.

Fix is to not do PN check in case of WEP security.

Change-Id: I8bfe16f3bf68752f4279b3fae1cf485a3abc1af7
CRs-Fixed: 2977416
2021-06-28 07:22:29 -07:00
Yeshwanth Sriram Guntuka
e4322f1e96 qcacld-3.0: 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: 2942099
2021-06-23 14:08:51 -07:00
Jinwei Chen
7fef8c3b3c qcacld-3.0: Add HW cookie conversion support
Add HW cookie conversion support for wcn7850 soc.

Change-Id: I2adedb13bcaeebb1715b391f790b639d422e08f6
CRs-Fixed: 2929512
2021-06-21 17:10:05 -07:00
Manikanta Pubbisetty
ed4167e111 qcacld-3.0: compare FSE metadata when REO ID mismatches
When an existing flow is evicted, there is chance that the
REO ID of the newly added flow and the inflight packets of the
evicted flow mismatch. In such cases, check the FSE metadata of
the flow with that of the packet instead of triggering a BUG().

Change-Id: I7412055101fb72f7b28db615672e88837d79e8d3
CRs-Fixed: 2968500
2021-06-17 13:51:35 -07:00
Rakesh Pillai
7fdb9e21a7 qcacld-3.0: Refactor fisa packet history for BE
Refactor fisa history to not directly access "struct rx_pkt_tlvs". This
is needed since rx_pkt_tlv size may be different for Li and Be
architectures.

CRs-Fixed: 2891099
Change-Id: If7359680538128c7b093aef9f2991756a2f753f7
2021-06-04 10:43:32 -07:00
Rakesh Pillai
7f45b14f24 qcacld-3.0: Add rx tlv access changes
Add the changes in FISA/pkt-capture APIs due to the
modifications in the hal APIs to get rx tlv params.

Change-Id: I5b1827079ca2e056da0db5e396ca90aec57f559b
CRs-Fixed: 2888534
2021-06-04 10:43:31 -07:00
Rakesh Pillai
b3e1a44d0b qcacld-3.0: Init-Deinit changes for WCN7850
Changes to initialize/deinitalize WCN7850 from HDD layer.

CRs-Fixed: 2888534
Change-Id: Ia9e44f9fe0b4b6977c55c380756af0656203e4f5
2021-06-04 10:43:31 -07:00
Qun Zhang
086ebbc79e qcacld-3.0: notify TKIP mic failure to upper layer under fragement case
It's also needed to notify supplicant when TKIP michael mic failure was
detected under fragement case, so supplicat can start 60s protect policy
for association.

Change-Id: I9383d653ac957425e09a60a2f495e575741d073a
CRs-Fixed: 2942680
2021-06-02 15:54:12 -07:00
Ananya Gupta
c5ab429e08 qcacld-3.0: Increase timeout for vdev_del_event
Race condition occurred as rx_thread did not get scheduled
before timeout and gro flush happened in vdev context. At
the same time, rx thread got scheduled and add skb to the
napi queue resulting in crash.
To fix this, Increase the timeout value so rx_thread gets
time to wake up, do gro flush and reset the vdev_del_event.

Change-Id: I2075eda91b1568cce3083869f510fc212dd721f8
CRs-Fixed: 2949803
2021-06-02 11:40:39 -07:00
Karthik Kantamneni
ac8b9aa535 qcacld-3.0: Fix use after free during RX thread enqueue
Currently nbuf is being used to get gso segments after enqueue
to DP RX thread, this will lead to use after free issue because
RX thread may process and even free the buffer by the time nbuf
is accessed for getting gso segments in enqueue/softirq context.

Fix this by updating gso segments before nbuf enqueue to DP RX thread.

Change-Id: I2cc93bf9a44e2d487c1a6d474349cf5c0c5db76a
CRs-Fixed: 2958132
2021-06-02 02:51:40 -07:00
Karthik Kantamneni
f70b8c0564 qcacld-3.0: Handle Flow init ts and reo id mismatch info
When flow is added in CMEM path init time stamp is not
handled, so initialize flow init time stamp in CMEM path.

Add Fisa error print during reo id mismatch, print flow
and nbuf details which helps to debug the issue even if
local stack variables are not available in dump.

Change-Id: Ibcc44bd8558cc687279bb34267d60b9882d33a24
CRs-Fixed: 2946825
2021-05-31 07:47:20 -07:00
Karthik Kantamneni
37eb787c99 qcacld-3.0: Cleanup debug prints in refill thread
Cleanup debug prints in refill thread main loop API.

Change-Id: I9b8f7410562b2c90ad802eddca9a482014e91010
CRs-Fixed: 2950141
2021-05-31 05:35:55 -07:00
Manikanta Pubbisetty
cd716119a6 qcacld-3.0: consider aggregated packets for packet drop
Currently, in the DP RX thread packet drop logic, the aggregated
packet as a whole is considered as one single packet. An aggregated
packet can hold anywhere between 2-16 packets, considering it as
a single packet will make the entire drop logic incorrect.

Consider all packets in the aggregate while computing the number of
enqueues & dequeues to fix the problem.

Change-Id: I70e65bcdfdbaf7821b36606ac6eeae61eaca7406
CRs-Fixed: 2948104
2021-05-19 12:43:52 +05:30
Manikanta Pubbisetty
4af598a24d qcacld-3.0: add TX packet threshold for DP SWLM
Add TX packet threshold while considering for TX write
coalescing. This helps improve low throughput TCP DL &
UL cases.

Change-Id: I9503a0b28a58dcaddbb08f3a98479bb31cd95285
CRs-Fixed: 2931051
2021-05-18 06:24:31 -07:00
Yeshwanth Sriram Guntuka
03ec0027f3 qcacld-3.0: Add support to flush fragments for a particular peer
Add support for flushing fragments for a particular peer.

Change-Id: I91236d2edc73317380590458b974013a02e858a1
CRs-Fixed: 2860131
2021-05-13 06:19:43 -07:00
Yeshwanth Sriram Guntuka
7ccead5da9 qcacld-3.0: Do not intrabss fwd frag EAPOL frames in HL
Do not intrabss forward fragmented EAPOL frames that have
DA different from the SAP vdev mac addr when high latency
is enabled.

Change-Id: Idb6e6c001f4dae51c2181e70ab9adbbb964f0ee3
CRs-Fixed: 2942096
2021-05-12 14:31:13 -07:00
Yeshwanth Sriram Guntuka
62374f3883 qcacld-3.0: Do not intrabss forward fragmented EAPOL frames
Do not intrabss forward fragmented EAPOL frames that have
DA different from the SAP vdev mac addr.

Change-Id: I4145227c9b02fe8cec86ef4ffc3bc2025f906923
CRs-Fixed: 2888467
2021-05-12 12:30:49 -07:00
Yeshwanth Sriram Guntuka
5deab77487 qcacld-3.0: 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: Ica24f65aff65ca58bb010c876f27964b5b2bae6a
CRs-Fixed: 2860242
2021-05-12 12:30:45 -07:00
Yeshwanth Sriram Guntuka
403bc635eb qcacld-3.0: Drop mcast and plaintext frags in protected network
Multicast frames should not be fragmented and plaintext
frags should not be reassembeld in protected network.

Fix is to drop mcast frags and plaintext frags received
in protected network.

Change-Id: I98cf0715f5832f2f86f86b79dbdbc3a7c86dbfd0
CRs-Fixed: 2860245
2021-05-12 10:34:49 -07:00
Vevek Venkatesan
1822c0e153 qcacld-3.0: add Tx desc history in non-critical prealloc memory
Add the Tx desc history buffers into non-critical category of
prealloc memory.

Change-Id: I9e9b466a8e836cbc02ff7754e545b99b984cb02d
CRs-Fixed: 2936445
2021-05-06 13:49:40 -07:00
Karthik Kantamneni
d8e7921824 qcacld-3.0: Add TX HW desc history in pre alloc memory
Add TX HW descriptor history in pre alloc memory

Change-Id: I0a2756d7955bed04680d8d735c750012354b6ff7
CRs-Fixed: 2937355
2021-05-05 00:54:04 -07:00
Yeshwanth Sriram Guntuka
3bc9624d37 qcacld-3.0: Allocate memory for fisa pkt history separately
Fisa packet history is around 6KB for each sw fisa
flow entry and this is part of the dp_fisa_rx_sw_ft
structure. The total size of the SW FT as a result is
around 830KB and the higher order memory allocation via
kzalloc for this could fail in low/fragmented memory
scenarios.

Fix is to allocate memory for FISA pkt history separately
and attach it to the SW FT entry.

Change-Id: I7296d7269c1b86ec38ea1668e8a0893335bbdb6f
CRs-Fixed: 2934487
2021-05-03 20:11:39 -07:00
Yeshwanth Sriram Guntuka
2b309943f4 qcacld-3.0: Mark rx/fisa history prealloc as non-critical
Mark rx and fisa history related allocations as non
critical for prealloc. This will ensure that prealloc
init can continue when memory alloc fails for the above
as these are only for debug purposes.

Change-Id: I94fc5c35a3a7a5dae3a4c97cf4ceca4eee7372ca
CRs-Fixed: 2936359
2021-05-03 00:50:47 -07:00
Karthik Kantamneni
75f53bc5a3 qcacld-3.0: Add rx refill ring history to pre-alloc memory
Add entries to pre-allocate memory region for
recording datapath rx refill ring history.

Change-Id: Icbb6d59b834ea7b8957406e68be72bf3072389bf
CRs-Fixed: 2930011
2021-04-29 04:37:30 -07:00
Chaoli Zhou
1b8cab61e9 qcacld-3.0: Support setting IpaUcTxBufCount to non power of 2
Since it has memory limitation on sdx platform,
also it need different TX buffer configuration for
different case, which require the IPA tx buffer
numbers to be configurable but not only be power
of 2. So did such change for Genoa to meet different
IPA TX buffer config.

Change-Id: I4482e8f37957d3bfcd82645cf0dec0257ad80e80
CRs-Fixed: 2865851
2021-04-27 09:14:04 -07:00
Ananya Gupta
15bf4db8e3 qcacld-3.0: Prealloc FISA Flow Table
Allocation failed as flow table size is huge.
To Fix this, moved the ft table to prealloc memory.

Change-Id: I27ee62b1bcfced563f45cb80e11978cb3dd46183
CRs-Fixed: 2926899
2021-04-23 02:05:54 -07:00
Yeshwanth Sriram Guntuka
8c5cd93a16 qcacld-3.0: Modify few ring and desc sizes for prealloc
Modify few ring and descriptor sizes for prealloc
to support the maximum values configured via ini.

Change-Id: Ifc2976c3f9ab271c7740d4a97470d455a8ee1ba7
CRs-Fixed: 2929143
2021-04-22 17:33:59 -07:00
Mohit Khanna
73a1e0a529 qcacld-3.0: Record pkt history in fisa path
Record per packet history in FISA aggregation path.

Change-Id: I737481343f6c8d19deb57d39adb64f3a10f7d6f7
CRs-Fixed: 2911868
2021-04-14 22:11:36 -07:00
Dustin Newman
dec9fd4086 qcacld-3.0: Reduce the log level alloc failure
Reduce the log level alloc failure since it is not fatal. Log the
requested size of memory instead of last ring size found in the
case of alloc failure.

CRs-Fixed: 2894342

Change-Id: Idfb0eec7421e4568008517e35b2fb928f09b6818
2021-03-18 16:41:42 -07:00
Gururaj Pandurangi
9996bc7175 qcacld-3.0: Remove feature flag WLAN_FEATURE_11W for pmf
Remove all of the conditional compilation for pmf since this
feature is mandatory for future scope from protocol point
of view.

Change-Id: Id3a2127e9ecb343ad2a0354dcbc331c22167d7fb
CRs-Fixed: 2852630
2021-03-18 00:39:42 -07:00
Jinwei Chen
20d8019747 qcacld-3.0: fix invalid net_dev accessing due to GRO flush timeout
scenario:
(1) KASAN is enabled and DP thread is slow to process and deliver
Rx packets to stack.
(2) vdev-2 do disconnection and flush Rx packets that belong to
vdev-2, but DP thread is busy with processing vdev-0 Rx pakcets
then no chance to do GRO flush for vdev-2, Rx flush timeout and
vdev-2 net_dev get freed, later when DP thread do GRO flush for
vdev-2 pakcets, invalid accessing to vdev-2 net_dev happened.

solution:
(1) increase Rx packets flush timeout from 1000 ms to 2000 ms.
(2) do extra GRO flush if timeout happened.

Change-Id: Iddc445d950eeb6cd2bd0b125bf87051e850abeb2
CRs-Fixed: 2894978
2021-03-10 16:34:16 -08:00
Alan Chen
073531fc1e qcacld-3.0: Update default values of INI items
Update default values of INI items to most commonly used values
in WCNSS_qcom_cfg.ini file on commercial devices.

Change-Id: Ibf1e22406951855a4e726fb8105913a53d3c33ee
CRs-Fixed: 2874758
2021-03-09 21:06:45 -08:00
Surabhi Vishnoi
5fd71222a8 qcacld-3.0: Fix incorrect condition for TSO frags in pkt capture
The number of fragments in TSO packet are assembled incorrectly
due to wrong loop condition in packet capture mode.
Fix the condition to assemble all segments of TSO packet
correctly in packet capture mode.

Change-Id: Ifd7be13e56c12b2cb4e6a5000b355c9fa972962d
CRs-Fixed: 2877021
2021-02-25 11:43:22 -08:00
Karthik Kantamneni
153db6d0a5 qcacld-3.0: Fix race during peer deletion in roaming scenario
There is possiblity of peer being accesed in rx napi context,
when peer is getting freed up at same time from scheduler
thread context in roaming scenario.

To avoid this race free up the peer when unmap handlers received
from F.W for all the peer ids.

Change-Id: Ia0b1fcc6b56e91efe914ca431aeac6e83b773a81
CRs-Fixed: 2867382
2021-02-25 04:03:22 -08:00
Karthik Kantamneni
e1a2e01968 qcacld-3.0: Check for TCP proto in bypass_fisa API
Check for TCP proto in bypass_fisa API and deliver nbuf without fisa.
This will avoid additional processing and helps to deliver nbuf earlier.

Change-Id: I26a78e1204ddebab3a6c6e852ce6d289106dd110
CRs-Fixed: 2884112
2021-02-24 08:14:32 -08:00
Karthik Kantamneni
99413b37c4 qcacld-3.0: Call qdf_check_state_before_panic with additional debug info
Call qdf_check_state_before_panic with caller function name and
line number details.

Change-Id: I9fb4b382576e52bc1ad7e316bd09e3124e8fce98
CRs-Fixed: 2857671
2021-02-18 07:46:42 -08:00
Karthik Kantamneni
7983966ef5 qcacld-3.0: Add RX refill thread infra to replenish RX buffers
Add Rx refill thread infrastructure to replenish RX buffer pool

Change-Id: I2553e0e35d251cf72e741321a2389f741f1bb485
CRs-Fixed: 2869355
2021-02-10 12:31:37 -08:00
Karthik Kantamneni
795d9dfab2 qcacld-3.0: Cleanup FISA debug macro
FISA debug macro is leading to unnecessary additional functional calls,
to avoid this cleaning up macro and pointing to nop when disabled.

Change-Id: I21ebd64f61e2c31736d55e2d17f588dbddbc15c7
CRs-Fixed: 2869361
2021-02-08 12:56:41 -08:00
Karthik Kantamneni
24bd39e7fc qcacld-3.0: Fix array out of bound access during fisa flush
Fisa flow entry napi id is initialized to invalid value,
which will cause out of bound access during fisa flush by vdev id.

Fix this by validating array index before access.

Change-Id: Ic7b1b1448194b75777f9dc392043275235caa7f7
CRs-Fixed: 2873033
2021-02-08 08:50:15 -08:00
sandhu
6c5b2f62c0 qcacld-3.0: Initialize fisa flow entry napi id to other than zero value
Zero initialization of Napi id can cause napi id zero context to flush
flow that are uninitialized. Which may cause a race condition if some
other napi context is using the uninitialized fisa flow entry during the
flow learning phase.

Change-Id: Iedca4ee112efa29c70a632c4a365e95f71e8f506
CRs-Fixed: 2864633
2021-02-05 00:30:43 -08:00
Karthik Kantamneni
2d3be81051 qcacld-3.0: Fix MIC verification in helium family
Currently MIC verification is not proper for fragmented packets,
fix MIC verification for helium family.

Change-Id: Iac95c579287bafedf6521b38f2c628fd08cca72d
CRs-Fixed: 2869483
2021-02-03 05:41:26 -08:00
Qun Zhang
c07607873c qcacld-3.0: Update deficient_desc when the TX pool is replenished
It's needed to update deficient_desc count when the deficient pools
are replenished, otherwise, when there are multiple interfaces and
do intetfaces on/off stress test, it's possible some interfaces will
run out of system tx pool descriptors when do ol_tx_flow_pool_resize,
and other interface can't get any available tx descriptors.

Change-Id: I07ded6c7f39637f6f2734edac5add8fef7bb8cf3
CRs-Fixed: 2857659
2021-02-02 19:02:38 -08:00