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
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 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
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
Move the vdev and vdev_lock to dp_link, since
dp_link corresponds to objmgr vdev now.
Change-Id: Id1ef27911c4eaa3434fc2719a8f5951f00d31116
CRs-Fixed: 3518896
Currently dp_intf is create on adapter level,
but corresponds to vdev. ML connection can have
multiple links for same adapter.
Hence introduce a new data structure dp_link,
which corresponds to the vdev, whereas dp_intf
now corresponds only to adapter/netdev.
Change-Id: Ia2bba89f425b64b4e404f6866a54fe0f6e05ad6d
CRs-Fixed: 3518894
Currently FISA max aggregation count is fixed 16, but some
platforms can support different max aggregation count.
So while sending HTT FISA config if F.W is capable of programming
dynamic msdu aggregation sizes, then select max aggregation count
based on target type and send it to F.W.
Change-Id: Ic5212536024a3ceb0b2c4ad111172870f1825969
CRs-Fixed: 3542509
Change the cfg enablement check APIs (currently FISA),
to static inline, in order to avoid function call
every time to check if the feature is enabled or not.
Change-Id: Ie541313c1b0a7512f71a6189a706871e57b3145e
CRs-Fixed: 3540739
Currently FISA accesses the dp_soc (converged DP soc handle)
for various misc info (like hal_soc handle etc). Since these
information are now stored in the non-converged DP component,
there is no need to access dp_soc.
Cleanup the access to dp_soc (converged DP soc handle) in
the FISA path.
Change-Id: I6f373eb1ee57933d631237f7281c99bfceb100c3
CRs-Fixed: 3512048
Add CDP APIs to send FISA related HTT msgs from the
non-converged DP component.
Change-Id: Ie8dcb5d68497ac0de4c0781c981ede2239df0a78
CRs-Fixed: 3512045