Commit Graph

1042 Commits

Author SHA1 Message Date
Karthik Kantamneni
545b3b934e qcacld-3.0: Implement SWLM support for MULTI TX queue traffic
Currently SWLM is supported for single queue based traffic,
enhancing the SWLM to support multi queue based traffic.

Change-Id: If2d80e8122bbc972af0bba70e7a3f4c1da000c77
CRs-Fixed: 3161166
2022-03-30 01:13:07 -07:00
Karthik Kantamneni
4ceea0ebe4 qcacld-3.0: Fix REO ID mismatch issue in fisa flow aggregation
Currently during fisa flow aggregation REO ID check is done to
make sure all the flow packets are received in same REO and to avoid
out of order reception. But if RX packet matches CCE rules REO ID
is selected based on CCE rules since they have higher priority.
In this case ignore RX packet for FISA aggregation and do not panic.

Change-Id: I09b5c9fc4ecff7223d0034921e8923776ae4bf3b
CRs-Fixed: 3153104
2022-03-30 01:13:01 -07:00
Ananya Gupta
3b5eb6874f qcacld-3.0: check vdev del event when processing rx thread
If many packets are queued into rx thread, processing
the packets can delay the vdev del event processing.
To fix this, check for vdev_del_event when processing
packets and if vdev del event is set, do gro flush
and continue packet processing.

Change-Id: I589e53f55f11c7ad8d71c532c47ae2584e5db2a7
CRs-Fixed: 3152037
2022-03-28 09:26:02 -07:00
Prakash Manjunathappa
61641f0ec8 qcacld-3.0: Make 1:1 mapping of REO to rx_thread
Remove CONFIG_WLAN_FEATURE_REDUCE_RX_THREADS compile flag.
Keep num rx_thread dependent on rx REO rings, 1 rx_thread for
each rx REO ring. It is controlled via INI dp_reo_rings_map.

Change-Id: I701e5cec79a8968b540c9437fe297ca1db8cd5d3
CRs-Fixed: 3048265
2022-03-14 22:31:00 -07:00
Amit Mehta
22de5a5cf9 qcacld-3.0: Affine refill thread to performance cluster
Currently refill thread is not getting chance to update
refill buffer pool, which is causing the increase in
rx thread time.
To fix issue move refill thread to performace cluster.

Change-Id: I839352ff09da692f801e97f7938a67ab8f09742b
CRs-Fixed: 3138081
2022-03-07 05:06:05 -08:00
Karthik Kantamneni
d4a3b8fa64 qcacld-3.0: Fix reo id mismatch in fisa path
Currently when reo id mismatch check is done there is
possiblity of flow getting evicted same time this may
lead to false alarm. To avoid this race condition reo id
mismatch check is done under lock protection.

Change-Id: I7d3ac25ec8c806677697242a0fd3fa338c0a6ad2
CRs-Fixed: 3129761
2022-02-19 04:43:55 -08:00
Amit Mehta
6a0733117a qcacld-3.0: Reduce lock held time
Currently we process and free the nbuf from
queue while holding a lock for the complete duration.
There might be a case when there are many packets pending
in the queue. This might cause the issue when we held the lock
and other process waits for lock.

So as part of the fix only perform the nbuf unlink inside the
lock and move the processing and free part outside the lock.

Change-Id: Iea0cabecc25ce90c189454b288421b1e720777f2
CRs-Fixed: 3125790
2022-02-10 14:02:52 -08:00
Karthik Kantamneni
0474a821f1 qcacld-3.0: Add peer to inactive list based on unmap ref count
Currently dp peer is being added to inactive list during force
delete, but there is possiblity of peer getting freed up if
unmap ref count is not pending and leading to double free during
pdev cleanup.

To avoid this add the peer to inactive list only if unmap ref
count is pending.

Change-Id: Ib55a92dd36c4ec4a26d3103896ca31ff3d845148
CRs-Fixed: 3110728
2022-01-18 05:50:23 -08:00
sandhu
afc4244d94 qcacld-3.0: Remove IP from code
Remove qualcomm IP from code

Change-Id: Icc3f239fbb6874a07272618b1be84d613b8fdc84
CRs-Fixed: 3073862
2021-12-29 04:28:21 -08:00
chunquan
89d3e86717 qcacld-3.0: Send high 32bit addr for no smmu platform which fw need
Host send HTT_H2T_MSG_TYPE_WDI_IPA_CFG cmd to fw, need update
high 32bit addr for non-smmu platform which alloc physical
address more than 4G.
If alloc address is 0x1 5000 0000, it will cut off
bit32 ~ bit63, the value fw get is 0x5000 0000, the address
may be used by peripheral. When fw write addr 0x5000 0000,
assert will happen.

When this change compile on 32bit platform, it will error, for
right shift must less than system width.

Change-Id: If1e84cfdcd15494be3f7327986ff0e91ec7b2b3f
CRs-Fixed: 3097240
2021-12-26 04:26:56 -08:00
Rakesh Pillai
e98751c0c8 qcacld-3.0: Handle prototype changes for fst attach/detach
Handle the proto-type changes for below APIs:
- hal_rx_fst_attach
- hal_rx_fst_detach

Change-Id: I3a117d2520456e1df6844b5417f97fc8baf889c8
CRs-Fixed: 3073607
2021-12-21 11:40:49 -08:00
Balaji Pothunoori
d101ac52b4 qcacld-3.0: update timestamp for TX failed pkt to upper layer
Currently, wlan host driver only report timestamp for TX successful
packets to upper layer.
This change add support to report timestamp for TX failed pkt to
upper layer.

Change-Id: Ib9b021675ebd388107f8bf1a61703f2b6cebb882
CRs-Fixed: 3077222
2021-12-15 12:27:27 -08:00
chunquan
1fab5f2e75 qcacld-3.0: Send high 32bit addr for no smmu platform which fw need
Host send HTT_H2T_MSG_TYPE_WDI_IPA_CFG cmd to fw, need update
high 32bit addr for non-smmu platform which alloc physics
address more than 4G, like addr 0x1 5000 0000.It will cut
off bit32~bit63, fw get memory is 0x5000 0000, it's maybe
use for peripheral memory.when fw write addr 0x5000 0000,
it will meet some error.

Change-Id: Ic5c5c00c85bdf08e61c9ff0f539989d2e96bb153
CRs-Fixed: 3077016
2021-12-08 14:56:54 -08:00
Jinwei Chen
5ed9d1d796 qcacld-3.0: Revert FISA LRU deletion change
Revert FISA LRU deletion change as this change might cause RX skb
double free/indication in FISA path.

Change-Id: I1889a33db335715d17da36d1a02e8562d348cfe1
CRs-Fixed: 3083874
2021-12-01 04:22:40 -08:00
Jinwei Chen
0af30cef66 qcacld-3.0: Fix FISA dp_rx_sw_ft_lock uninitialized issue
Currently if INI dp_rx_fst_in_cmem is not enabled and FW not report
the capability of FSE in CMEM, FISA dp_rx_sw_ft_lock will not be
initialized which lead to panic.

initialize FISA dp_rx_sw_ft_lock by default if FISA is supported

Change-Id: I515b151b9a02665f51c30263ef6c6c9929edb392
CRs-Fixed: 3082642
2021-11-26 03:19:16 -08:00
Jinwei Chen
08460fc2b7 qcacld-3.0: Fix different flow RX packet aggregating on same fisa flow
Flow A packet is waiting napi_id 1 lock as it has passed metadata
and reo_id check in dp_add_nbuf_to_fisa_flow(), another flow B packet
FSE hash pointed to same FSE flow as flow A, but flow B packet is
coming from napi_id 2, current FISA LRU logic will allow flow B packet
hold napi_id 1 lock and update FSE flow to napi_id 2, then release
napi_id 1 lock. flow A and B packet will be added to same fisa flow,
skb double free or other issue will hit.

Move napi_id lock acquring before sanity check in
dp_add_nbuf_to_fisa_flow(), then different napi flow packet will
not be added to same FISA flow.

Change-Id: I2679972a0923d8cfba4f9d22182c1cc193b3f34f
CRs-Fixed: 3080877
2021-11-24 20:31:08 -08:00
Nakul Kachhwaha
aabf3d74ff qcacld-3.0: Fix Switch Case fallthrough compiler error
Adding fallthrough statement in switch case to
suppress compile time errors.

Change-Id: I948e87090dd68d2f5cf342e2115d672d2d772b6f
CRs-Fixed: 3079848
2021-11-24 01:14:18 -08:00
Jinwei Chen
21e1618550 qcacld-3.0: CLD change for cdp_pdev_attach
CLD change for cdp_pdev_attach

Change-Id: Ib4c536bc5d4a94ed0456e976cfc32b0ccdc9aa65
CRs-Fixed: 3077258
2021-11-23 03:54:59 -08:00
Ke Huang
9ef83a0f00 qcacld-3.0: change ipa client from wlan1 to wlan4 for genoa
pass rx/tx client information as WLAN4 CONS/PROD instead
of WLAN1_CONS/PROD to support Geona offload.

Change-Id: Ia856b0ad8ca075b2fbda6f581e5523f4483edd28
CRs-Fixed: 3025173
2021-11-13 21:50:49 -08:00
sandhu
df7838416c qcacld-3.0: Add fisa lru deletion support
Add fisa support to least recently used flow when adding a
new flow. if no empty entry in skid length window is found.
Delete and replace least recently used flow with new flow.

Change-Id: I3808d9b4570c8af698bb1ecafa19cbb2000bcae6
CRs-Fixed: 2954064
2021-10-29 12:03:35 -07:00
Jinwei Chen
3cd06e5ecf qcacld-3.0: RX packet FW reinjection check for FISA
For beryllium, use sw_exception bit to indentify is it FW
reinjected frame or not, if sw_exception bit is marked, then
skip FISA for these kind of frame.

Change-Id: I6ca74c244c366641a7bcfddff2834550b1e5b472
CRs-Fixed: 3056157
2021-10-28 10:21:10 -07:00
Rakesh Pillai
43079567db qcacld-3.0: Add proto-type changes for vdev/peer attach
Add the changes corresponding to the proto-type changes
for txrx_vdev_atfach and txrx_peer_attach for ol targets.

Change-Id: Ibf31e3d5dd7cdf8c47ab3fe9cfdcbfd5762dc18d
CRs-Fixed: 3053683
2021-10-15 13:12:59 -07:00
Karthik Kantamneni
f3f45e867e qcacld-3.0: Fix refill thread getting stuck in suspend state
Currently during wlan suspend DP refill thread is suspended first
then RX thread is suspended but if RX thread suspend fails then
refill thread should be resumed if not refill thread will be stuck
in suspend state forever.

To avoid refill thread getting stuck in suspend state, resume
refill thread when RX thread suspend failure is encountered.

Change-Id: I2dfdfa881bb3cb660b83067c796d3a833b86ef5f
CRs-Fixed: 3054903
2021-10-13 23:06:10 -07:00
Yu Tian
b88ef09eef qcacld-3.0: Move DP_RX_THREAD_WAIT_TIMEOUT out of HAL SLUB DEBUG macro
DP_RX_THREAD_WAIT_TIMEOUT is defined in one macro but
derefereced under another macro. Change is to align
the macro in-use.

Change-Id: I839b2b024c2b2301a585b6ca8016ac64fb3899f2
CRs-Fixed: 3055419
2021-10-13 11:05:10 -07:00
Yu Tian
fde4ddb2e0 qcacld-3.0: Add API to get TX pending in WoW state
This change is used to provide an API for PMO module to
check whether there are pending TX frames before HOST sends
wake up indication to FW. PMO module uses this to indicate
FW whehter to discard HWDTIM.

Change-Id: Iea4081e69c397ab87bc90f46b672631f4589f389
CRs-Fixed: 3046953
2021-10-11 08:06:22 -07:00
Yu Tian
7e6fd6556c qcacld-3.0: Add a yeild break in process rx buffer thread
Some events may send to change the behavior of DP rx thread.
When there are lots of packets pending in rx queue, thread loop
will not get a chance to check and process these events. Change
is aimed to give a yeild to allow checking of thread events.

Change-Id: Ibe64a1ee27086ba8e1ee8c8e9dd316c5fb4a8a42
CRs-Fixed: 3024332
2021-09-29 17:20:10 -07:00
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