Currently, there is a rcu stall when dp vdev obtained from
dp_soc does not match vdev present in fisa flow which has
same vdev_id.
To fix this, if vdev id matches for both the vdev, drop the
skb.
Change-Id: I8be4ea77bd0bdd3096ebbad627674f7b8a9801cf
CRs-Fixed: 3817471
When dp_link is allocated, the member variable is
not initialized correctly. Change is to give initial
value to avoid of crash.
Change-Id: I0d032b4a25f31768f2aa5e7161cc625abe867df5
CRs-Fixed: 3797243
Currently, when Rx monitor mode interface is coming up, STA is
not disconnected causing RXDMA ring to be used as both error ring
and destination ring. This is causing backpressure in RXDMA ring.
To fix this, issue disconnect for STA when Rx monitor mode is
being added.
Change-Id: I95e73edd80472a8aae9092ebdbce5e514b1cd531
CRs-Fixed: 3799325
Pointer 'dp_ctx' returned from call to function 'dp_psoc_get_priv'
may be NULL in below APIs:
1. dp_reset_tcp_delack
2. dp_bus_bandwidth_init
3. dp_bus_bandwidth_deinit
4. dp_bus_bw_compute_timer_try_start
5. dp_bus_bw_compute_timer_try_stop
6. ucfg_dp_set_cmn_dp_handle
7. __dp_bus_bw_compute_timer_start
Fix is to add NULL check for dp_ctx before use.
Change-Id: I5f9ea6ae8ce3bb13631ad9a2dfe25d9c3686a33b
CRs-Fixed: 3767091
As a part of vdev destroy is_dp_link_valid can return failure,
since the interface maybe down. This will lead to memory leak
since the dp_link memory won't be freed.
Fix this by replacing is_dp_link_valid with dp_link null check.
Change-Id: Ief03c1e42d62b4b89f1414f0c5642e592ee39fa2
CRs-Fixed: 3750214
Add magic number field in wlan_dp_link which is to
be used to identify the validity of dp_link.
Add logs in the dp_link free handler/callback.
Change-Id: I76e3149e1d72a9f5e69478734b6dbab5b4d8d922
CRs-Fixed: 3744331
Pointer 'dp_ctx' returned from call to function 'dp_psoc_get_priv'
may be NULL in below APIs:
ucfg_dp_set_hif_handle
ucfg_dp_update_config
ucfg_dp_get_rx_softirq_yield_duration
ucfg_dp_register_rx_mic_error_ind_handler
ucfg_dp_is_roam_after_nud_enabled
Fix is to add NULL check for dp_ctx before use.
Change-Id: I040f1a6ed92ad572e625663eee9ea1dd0c5e8530
CRs-Fixed: 3770367
Currently STA+Mon mode is not supported in LPC case
as both mode uses monitor interface to capture
packets. So to distinguish between two different
monitor modes export new API to store monitor interface flags
Change-Id: I463353a1a01f53d48e004f60c52c24f1d8084154
CRs-Fixed: 3739289
Currently default link update is only done in link switch
or dynamic mac address update case.
There is other scenario also where default link case become
inactive and update to DP will not happen.
So, to handle those scenarios, expert new API to update
DP default link.
CRs-Fixed: 3733584
Change-Id: Iab24c38c454cc5cb9f568de680531b38e4d3da45
FISA entry is updated by FISA RX and work queue, if the same
entry is hashed for different REO id, the lock may not work
as expected. Change is to hold the lock before work queue
waking up to prevent the race condition.
Change-Id: I16ba4439c1655bbb7bf83b13d9280cb3f7c56478
CRs-Fixed: 3674340
Currently the dp_link address is provided to CDP vdev
as a part of vdev register. Also, as per the vdev deletion
sequence, it is possible that dp_link can be destroyed
before CDP vdev is detached. This can lead to use-after-free
scenario when CDP vdev uses the osif_vdev handle (which is
the dp_link handle).
In order to fix this, do not free the dp_link till the CDP
vdev has been detached.
Change-Id: Ie5a1140a0d256b6115fa62e30e6bfd61d1dfc898
CRs-Fixed: 3696641
Peer state could be queried from both fast path and
slow path. Change separates this call and allows log
print from slow path call.
Change-Id: I888b67224752182b792e0165bd5cbacbb7e5f293
CRs-Fixed: 3691146
Currently during vdev delete host will flush threads in serial
order, which can take upto 20 seconds for 5 threads in defconfig
build (Per thread wait timeout is 4 seconds in defconfig build),
this is turn can result in timeout in caller function, which has
maximum wait timeout of 10 seconds.
To optimize first flush all the threads nbuf list, after
flushing all the thread nbuf list wait for event completion
on threads.
CRs-Fixed: 3673505
Change-Id: I0c2979e7b08f27872da048c4a709800fc46eb526
Check for NULL before accessing dp_ctx or DP SOC in
__dp_bus_bw_compute_timer_stop().
Change-Id: I0d2862c4688f83c3d5f561baaa6ce62e96cca9c3
CRs-Fixed: 3659080
After direct link WFDS QMI server is down, host driver
unmaps the IPCC MSI address. There is a possibility
where FW can still enqueue entries to direct link CE
resulting in a SMMU fault when CE HW raises interrupt
after copy operation.
Fix is to disable direct link CEs MSI on WFDS QMI
server down indication prior to unmapping the MSI
address.
CRs-Fixed: 3657146
Change-Id: I38ce3bcc143743884d5c464eae74c390bf32eab6
If ICMP is a fragment frame, the first fragment is routed to FW.
Other parts are routed to HW directly. This will lead fragment
out of order and some Network stack can't reassemble it. This
change is aimed to keep the ICMP notify FW logic, but route
the last fragment to FW, then the order can be kept.
CRs-Fixed: 3641824
Change-Id: If3e83943126a974d79f18824ff66b209cc4edd39
For the MLO SAP setup connection with legacy STA case,
the DA of the 2/4 or 4/4 EAPOL is possible with bssid
address(link address) not adapter address(mld address),
and we should not drop them inside driver.
So add this change to allow EAPOL to be delivered with
DA is equal to link address or mld address.
Change-Id: I629d24190a4fdef2ef6b3eddd76a345735ec0ff7
CRs-Fixed: 3650022
Excessive error logs in per packet path may flood the system with logs.
Avoid this by rate limiting excessive logs in DP component per packet
path.
Change-Id: I1c06db6e22eb5e234cee19b8c9968c8444792e6c
CRs-Fixed: 3648926
Currently in dp_get_transmit_mac_addr(), VDEV objmgr is referred without
incrementing the VDEV reference count, because of this there could be a
potential kernel NPE when VDEV deletion and dp_start_xmit() are in race.
Since taking VDEV references is discouraged in the per packet path due
to locking, a simple VDEV NULL check should solve the problem considering
the fact that DP VDEV object is already protected by
dp_intf::num_active_task.
Change-Id: I52229dc589feada1b1ffb261468915df88d1e486
CRs-Fixed: 3625809
Currently for rx packet delivery whether it is from monitor mode or
local packet capture path, is handled in NAPI softirq context and
netif_receive_skb() is called without disabling local bh.
In case of local packet capture, for tx packets after the tx_mon tlvs are
parsed, ppdu queue is handled in workqueue context and nbuf is passed
up the stack in rx_mon callback. Because the nbuf push type NAPI is used
this is causing 'BUG: using __this_cpu_add() in preemptible' for
nbuf coming from tx_mon workqueue context.
Fix is to identify the appropriate nbuf push type based on the context.
if caller is from softirq context then use DP_NBUF_PUSH_NAPI or
if caller is from non irq context use DP_NBUF_PUSH_BH_DISABLE.
Change-Id: I71b3be70febed1c077e7d4d36274a4805a33b722
CRs-Fixed: 3631536
In case of NAN, if the tput levels are between mid to high range then
apply next SNOC voting level.
Change-Id: Ifb77c8f627b5fc565767aac4baa3629b12a37582
CRs-Fixed: 3611715
Certain application, which send small packets with
critical info, are unable to process the FISA aggregated
UDP data.
Skip FISA aggregation for packets with UDP payload length
below 64 bytes.
Change-Id: I878f67688dd2b17cbd92322d8c51aedb4e7a5223
CRs-Fixed: 3613115
scenario:
(1) DP FST update node with dp_vdev A has been inserted into
DP FST update list, but FST update work has not been queued due
runtime PM or it has not been scheduled for long time.
(2) dp vdev A get deleted after disconnection, but DP FST node with
dp vdev A still exists in list.
(3) new connection established, DP FST update work get scheduled,
invalid accessing to stale dp vdev A in
dp_fisa_rx_get_dp_intf_for_vdev() and hit panic.
solution:
(1) re-queue DP FST update work when runtime PM resume.
(2) validate dp vdev in dp_fisa_rx_fst_update_work() before
using it.
Change-Id: I7073a9d744806c33ddb5a7cbe9f7960890511eec
CRs-Fixed: 3607437
Link switch notification now can be called multiple times
with different reason. Use notify reason to take appropriate
steps corresponding to state of link switch.
Change-Id: Ib3a37e887903305d9bb8472112e0d92520724835
CRs-Fixed: 3606670
During refill thread cleanup shutdown event is posted and
we wait for thread to handle the shutdown event and exit.
But while posting shutdown event if refill thread is in running
state then there is chance of shutdown event not getting handled
and thread cleanup will be waiting indefinitely for thread to
exit.
Change-Id: I45bdad8d6a85b110ed7c7e206d3c79c5c03e9d98
CRs-Fixed: 3599295
scenario:
fisa_flow->head_skb freed in dp_fisa_rx_get_flow_flush_vdev_ref(),
but fisa_flow_vdev returned from dp_fisa_rx_get_flow_flush_vdev_ref()
is not NULL, dp_rx_fisa_flush_udp_flow() will still try to deliver
fisa_flow->head_skb to stack, use after free.
return NULL if dp_fisa_rx_get_flow_flush_vdev_ref() has freed
fisa_flow->head_skb.
Change-Id: I5a467db63377e6b5f36c4bb1dfa0e3f35b73a442
CRs-Fixed: 3596691
Scenario:
(1) Host entered into system suspend.
(2) FW received DHCP Req and trigger WOW wake up.
(3) Host send WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID to FW.
(4) FW reinject RX DHCP Req to REO, send WMI_WOW_WAKEUP_HOST_EVENTID
to host.
(5) Since DP RX thread has been disabled, host DP receives DHCP Req
and do DHCP inspection directly, send DHCP indication message
to FW, but wmi_handle->is_target_suspended is true,
trigger crash.
(6) Host set wmi_handle->is_target_suspended to false only after receiving
WMI_WOW_WAKEUP_HOST_EVENTID.
Solution:
skip sending DHCP indication message if host suspended and DP RX
thread is not enabled, do not update sta_info->dhcp_nego_status,
then TX DHCP ACK won't do dp_post_dhcp_ind() in this case as well.
Change-Id: Ie4c414357ed7547ee9b882f3ec659bfe91b6b20d
CRs-Fixed: 3585743
If FISA is not enabled in config file, driver will
crash. Change adds error handling for no_support
return case.
Change-Id: I82e886a16f51e4e6db049b9224547b30bb9a10b4
CRs-Fixed: 3582517
Currently the FISA aggregation control flags, based on GRO
settings, are part of dp_vdev.
Move these FISA aggregation control flags to dp_intf,
since these controls are on an interface level, and not
on a per link level.
Change-Id: I93d0e215f8954376a96967cce6d533bd4be2d3a6
CRs-Fixed: 3574036
Support only D0 wow when direct link is up when XPAN feature
is up in WHC or P2P modes.
Change-Id: Ifbae57e4e1c8701950e7cecc095830a374603034
CRs-Fixed: 3559061
When FISA aggregated flow is flushed to n/w stack, there
is a vdev_id comparison between the flow and the head skb.
If this vdev_id check fails, the packets are dropped.
In case of MLO link switch during the FISA flow aggregation,
the packets might be received on different vdev (belonging to
the same MLD). Hence the vdev_id comparison will fail when
there is a MLO link switch in between the flow aggregation.
Since both the vdevs belong to the same MLD, add a MLD addr
validation to mitigate the above mentioned issue.
Change-Id: I0328dccff3f08da87f55758b469d773b9ea1169b
CRs-Fixed: 3568987
Dynamic mac address update is a special case, where the
(sta)connection can change without the vdevs corresponding
to an interface. The tx/rx happens on the def_link of the
dp_intf, which does not get reset in case of dynamic mac
addr update. Due to this, all the tx of packets might be
attempted on an invalid dp_link, leading to drop of all
the packets queued for TX.
Add support to reset the def_link of an interface during
dynamic mac address update.
Change-Id: I1e87c083f39b56525f69c225117bcce538931dbb
CRs-Fixed: 3570440
dp_tx_rx_collect_connectivity_stats_info expects dp_link
handle as an argument. Currently many of the direct callers
of this function is passing dp_intf as an argument to this func.
Fix this by passing dp_link as an argument to the function
dp_tx_rx_collect_connectivity_stats_info.
Change-Id: Icfedc1cc721de4ad0b536967dc32a6af53b86e9e
CRs-Fixed: 3571037
Currently datapath uses the vdev provided by UMAC for
tx of any packet. With the single-netdev-multi-vdev
model, there are chances that the vdev, in MLO case,
selected for packet TX in UMAC may not be the def_link
which datapath expects to use for tx/rx.
Hence, to mitigate, this issue, datapath will not use
the vdev provided by UMAC, but instead select a dp_link,
inside the dp_component, for tx/rx
Change-Id: I5ff4a79365b3426e1bcc6d4cac31a44058ee18db
CRs-Fixed: 3568989
Currently the opaque context passed to txrx_ops handlers
is incorrectly typecasted to dp_intf. The context being passed
is dp_link handle. This leads to unwanted memory access.
Fix this by correctly typecasting the context passed to
all the txrx_ops handlers as dp_link handle.
Change-Id: I587b12056625bb68e86ecb54118bb2f6bfa62bd9
CRs-Fixed: 3569531
Currently dp_rx_pkt_thread_enqueue_cbk passed dp_intf to
dp_rx_packet_cbk, though it expects the caller to pass
dp_link context. This leads to an invalid memory access
due to incorrect typecasting.
Fix this by passing the correct dp_link context to
dp_rx_packet_cbk.
Change-Id: If37fd18d49a6d5464e01c07160a1be612e564ffb
CRs-Fixed: 3568233
Currently in dp_txrx_init during dp_rx_refill_thread_init fail case
dp_txrx_handle is not freed which results in memory leak issue.
To fix the issue free dp_txrx_handle in dp_rx_refill_thread_init
fail case
Change-Id: I0804154519707d5d558940cccaa699f639ae6704
CRs-Fixed: 3563740
After moving to the single-netdev-multiple-vdev model,
the dp_link mac address needs to be updated as a part
of dynamic mac address update.
Add an ucfg API to update link mac address.
Change-Id: I96d3230f958c15cb576c881c02e60bd3a4fb0379
CRs-Fixed: 3563523
Add API to find the candidate for next default link.
This is used when the current default link is being
re-purposed or destroyed.
Change-Id: I98afd3ef2ac21d14ee6056f6329fbcf9a612959a
CRs-Fixed: 3519643