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
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
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
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
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
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
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
pass rx/tx client information as WLAN4 CONS/PROD instead
of WLAN1_CONS/PROD to support Geona offload.
Change-Id: Ia856b0ad8ca075b2fbda6f581e5523f4483edd28
CRs-Fixed: 3025173
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Do not intrabss forward fragmented EAPOL frames that have
DA different from the SAP vdev mac addr.
Change-Id: I4145227c9b02fe8cec86ef4ffc3bc2025f906923
CRs-Fixed: 2888467
Modify check to ensure packet number is consecutive for
fragments and drop the fragments if the check fails.
Change-Id: Ica24f65aff65ca58bb010c876f27964b5b2bae6a
CRs-Fixed: 2860242
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
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