To address kernel control flow integrity (CFI) issues related to type
mismatch, correct the return type of ol_txrx_pdev_attach_target().
Change-Id: Icb170ad1e57513519f3d9b122ab4feed6a4efcb8
CRs-Fixed: 2402963
To address kernel control flow integrity (CFI) issues related to type
mismatch, correct the return type of wdi_event_sub().
Change-Id: Id51c6523ddd5d6f5835f7aa08a3a7b2940d2c50b
CRs-Fixed: 2402961
To address kernel control flow integrity (CFI) issues related to type
mismatch, correct the return type of wdi_event_unsub().
Change-Id: I45d090cb4011ca659e30b2f7be6c2b7d32bbba4b
CRs-Fixed: 2402957
Packetdump invokes legacy data path API directly without
considering underlying HW:
1. ol_register_packetdump_callback
2. ol_deregister_packetdump_callback
Global pointer pdev_txrx_ctx will be casted to struct ol_txrx_pdev_t
always even Lithium (use struct dp_pdev) underlying, and overwrite
struct dp_pdev unexpected.
Wrap with cdp API to avoid.
Change-Id: I4f587c5378726b7cc4b340760f1112b054610da1
CRs-Fixed: 2400472
In ol_tx_flow_pool_map_handler, we will unpause all netif
queues. Unpausing will fail if any queue bitmap is not
cleared and pause_map remains non zero.
To avoid this, unpause priority queue before unpausing all
non priority queues.
Change-Id: If9a4e5d923b300aa03f01847da1ad64e8d6c61ef
CRs-Fixed: 2391158
Send the peer unmap conf commnad to FW for a peer_id only if
UNMAP for that peer_id is received either for three times if
RFS is enabled or one time if RFS is not enabled.
Change-Id: Idba2c406f7ad7d770fe8326e8a0d6ac7fab10252
CRs-Fixed: 2387480
Currently peer id is added to map unmap array with out
checking if its already added before. This leads to having
duplicate entries and host sends peer unmap conformation
to FW with duplicates which leads to FW assert. So check
if peer id exists before adding to the array.
Change-Id: Ifcf73145f241e8ad48ff0eba9d87880565e65bb6
CRs-Fixed: 2381577
There is race when unamp_timer_work and peer is deleted. Hold the
reference to peer while handling the peer_unmap_timer_work.
Change-Id: Ie6cef3f13e55ab7d2310f0fff4254cde3e3c96e1
CRs-Fixed: 2381036
There is a race condition while flushing the rx cache frames
from MC thread and same time from RX thread. So for rx cache
frames set QDF_NBUF_CB_RX_PEER_CACHED_FRM to avoid using gro
receive and use skb receive with local bh disable.
Change-Id: I5ece8ddf876d27ad3d24b0ba751fe3e3886608e2
CRs-Fixed: 2378342
Add DP RX Thread Stats support. Stats can be retrieved using iwpriv
dumpStats command.
Remove print from hdd_gro_rx_dp_thread function. This condition is
expected when gro is disabled on low throughput. Print is not needed.
CRs-Fixed: 2346997
Change-Id: I3619844b66e845184a4b8c77763bf9f2d2ea0a38
The CDP api cdp_tx_desc_thresh_reached should return true
if the available data path tx desc reaches threshold. But
this api returns wrong value in case of helium targets. Fix
this by returning correct value.
Change-Id: I571841ab1e4a4b24242fadc21bd13a85ef8da781
CRs-Fixed: 2378898
Macro HTT_TX_DESC_PADDR() is unused. Furthermore, it references
tx_descs fields which do not exist. Since it couldn't possibly be
used in its current form, remove the macro.
Change-Id: I62b2d7bc3291ba6c2dc486196076827cfc22d8ec
CRs-Fixed: 2375421
Add cdp api to check if tx desc pool available descriptor
threshold has reached.
Change-Id: I12cc38b56a68ca7ee8f4560677fcdabccb38928b
CRs-Fixed: 2369244
Discard msdu and do not try to access vdev and vdev->pdev, because in
some cases, vdev or vdev->pdev is already freed, but some packet just
received right after wmi vdev delete command is sent.
Change-Id: Ia38768d800da97e361ffa1688ce53c25be6cd597
CRs-Fixed: 2372557
The existing accessor macro NBUF_MAP_ID is obsoleted due to
restructuring of qdf_nbuf_cb.
Use new macro QDF_NBUF_CB_RX_MAP_IDX to access map_index.
Change-Id: I23650781cdd770f25b72a0a5fe55acc12d71cb64
CRs-Fixed: 2370724
Here rx_ring.refill_debt can become negative if filled count
returned from htt_rx_ring_fill_n() exceeds the rx_ring.refill_debt.
This is possible because inside htt_rx_ring_fill_n() we always refill
num = qdf_atomic_read(&pdev->rx_ring.refill_debt). Here we do not take
care of already served debt.
Taken care of above by subtracting debt_served from refill debt.
Change-Id: I0c154c978b711da2d8497c50f730619767787188
CRs-Fixed: 2365566
Change Ifbb38adba434aa19fade4838e30d39884b6e4615 ("qcacld-3.0: Remove
unnecessary includes from ol_if_athvar.h") removed the only place
where ol_params.h was referenced. Since this file is unused, remove
it.
Change-Id: I8c0e5335f30a0307e7ebac5d33828db41bb8156d
CRs-Fixed: 2366966
Fix 'for' loop initial declarations are only allowed in C99 or C11 mode
build error at SDX24.le.1.7 platform.
Change-Id: I08cc4ee7558f0b390a8c848828272497f517ef08
CRs-Fixed: 2365266
Add an argument to dump only last n dpt records of debug fs
dump_set_dpt_logs file.
Change-Id: I6ce96d1e57db773386e8ebc29436b33b2211a94f
CRs-Fixed: 2362507
After gerrit#2436786(which the Change-ID is
Ie64a05d795660d557d928cb9b874fa5e702f4f55), vdev in monitor mode
is removed from vdev list of pdev. So it is needed to use the new
cdp api, which is cdp_get_mon_vdev_from_pdev instead of
cdp_get_vdev_from_vdev_id in monitor mode to register vdev.
CRs-Fixed: 2350720
Change-Id: Idd36cdb09666783db2042f77708be4dcc6b9d82b
The definitions in file ol_ctrl_addba_api.h are unused, so remove the
file and remove the #include directive in the one place it appears.
Change-Id: I9056791b1a21dc8c8e113db2d49468e3abafab34
CRs-Fixed: 2364105
In monitor mode, pdev->self_peer is not updated before deleting the
peer in ol_txrx_peer_release_ref when peer ref_cnt becomes 0. This
leads the stale peer stored in pdev->self_peer. The pdev->self_peer
is not updated during peer creation due to this stale peer.
Update the pdev->self_peer to NULL when peer ref cnt becomes 0
Change-Id: Id09771a1a7c5a363cf3251af829ac8ff50d38a5b
CRs-Fixed: 2356492
The PERE_IP_HDR_ALIGNMENT_WAR feature does not apply to hardware
supported by this driver, and the code would not build correctly
if the feature was enabled, so completely remove the feature.
Change-Id: I4697e798dc57ab7e51c88d40e4d0f9a26a98de6d
CRs-Fixed: 2363232
Almost all of the definitions in txrx.h are obsolete. Rather than
remove the obsolete definitions and leave behind a file containing
only the two definitions that are used, move those useful definitions
to ol_txrx_types.h and completely remove txrx.h.
A side effect of this change is that a couple of unrelated files no
longer build because some of their dependencies were being met as a
side effect by txrx.h including other files. To solve the build issues
explicitly include the necessary header files where they are needed.
Change-Id: Ic3e3b36939e4ab04831d41a1e230bfab3da086a2
CRs-Fixed: 2363231
If FW supports new htt format include only payload length in
the header length.
Change-Id: Ia668d73dcae3eb4adc1a4cfb0498b34d8c38f522
CRs-Fixed: 2361564
Send WMI_PEER_UNMAP_CONF_CMDID to FW after getting all
UNMAPs for the peer. This will ensure synchronization
between MAP/UNMAP and same peer_id won't be used for
different MAC address until all UNMAPs are processed.
Change-Id: I2c7793b527d5dbab0f9571185e6c16e0c6b7fcc3
CRs-Fixed: 2357245
Add INI parameter "gEnablePeerUnmapConfSupport" to enable/disable
peer unmap confirmation support. When enabled Host will send
this support to the FW only if FW support is also enabled.
Default Value: False
Change-Id: Id368e61b5a99354e25a1fa2a0ff61b1262217521
CRs-Fixed: 2358126
DP RX thread is using an un-initialized lock during suspend/resume
routine. This lock is not needed as the code is executed only by a
single execution context.
Remove usage of un-initialized lock.
CRs-Fixed: 2351010
Change-Id: I656562fe3ca73a5044163008a44ffae416a6a7fa
When CONFIG_MOBILE_ROUTER is enabled there are build failures
due to improper featurization of mobile router, so fix the
featurization.
Change-Id: Ic9e1f608bc631409fbb5bcf84fc3f4520d69a7c9
CRs-Fixed: 2355786
Change Icdcfcdd10400aa2fad64441aa863087cc1c3766e use %llx to print
qdf_dma_addr_t. While qdf_dma_addr_t defined as 'unsigned long',
if without definition from kernel header.
Typecast DMA address to 'unsigned long long', before using %llx to
print DMA address directly.
Change-Id: Ic9527b494ac1aa2d47567a7dab5f0786913f4921
CRs-Fixed: 2355624
Current HTT_H2T messages from host driver does not have
consistency in message length set by host driver. Some
message types include HTC header length also within the
message length, while other types have message length
itself only.
Fix the same by sending same message format based on
firmware capability.
Change-Id: I885a21530a2d8f852387ae54cf7ee0751aad2516
CRs-Fixed: 2145560
This reverts commit 2459533, which fixes WDI 1.0 MCC SMMU fault
but it's only a partial fix. And we also need 2490501 to be a
complete fix. But 2490501 has regressions and leads to NULL
dereference, and it's reverted in 2517642 until a new complete
fix is ready.
Based on above, revert 2459533 and WDI 1.0 MCC SMMU datapath
will be a known issue.
Change-Id: I6444bfd8552906d889531b7e77ca6aa6b6fa7d6d
CRs-Fixed: 2352927
Compiler threw error as -Werror=int-to-pointer-cast when casting
DMA address to void pointer.
Use %llx to print DMA address directly.
Change-Id: Icdcfcdd10400aa2fad64441aa863087cc1c3766e
CRs-Fixed: 2350605
This reverts change I7d04e9b01fbd973601ee9e4e74c6bf4dd3d0f7bb
This patchset is causing wlan_ipa_nbuf_cb to be called even when ipa_ctx
is null. wlan_ipa_nbuf_cb should not be called for non-IPA packets. Also
there should be a NULL check for ipa_ctx in the function.
Reverting the change may lead to SMMU errors during AP-AP MCC mode.
CRs-Fixed: 2352812
Change-Id: I2f2382ca12a14a09ed124ccd18a7f450282c5975
1. Remove error prints for qdf_mem_malloc APIs.
2. Remove unnecessary __func__ from data path prints.
Change-Id: I6c4b110f626d84da055821c5f210a3d000b6ff15
CRs-Fixed: 2317315
For WDI 1.0 MCC TX, wlan driver is involved for TX and skb is
provided from IPA driver. With SMMU enabled, dma_addr is of
IPA domain. In such case, wlan driver needs to do DMA map
itself. After doing DMA map, an offset of frag_header
and ipa_header is added to the iova and skb->cb is updated
with the new iova. After TX completion, skb DMA unmap is done
but with the iova of the above offset included, which leads to
unmapped iova error.
Fix is to recalculate the iova and update skb->cb with new iova,
which has frag_header and ipa_header length removed.
Change-Id: I7d04e9b01fbd973601ee9e4e74c6bf4dd3d0f7bb
CRs-Fixed: 2338049
Put flow control setting in the flow_pool_lock, which can avoid
race condition between ol_tx_desc_free and ol_tx_desc_alloc.
This is a refine based on Ib60139fd94a4fb88c92a7f8aaf886ae9d3ca4c75.
Change-Id: I8d89323b5631039d7ff5a141775cc5825389c18b
CRs-Fixed: 2297190
SMMU fault is observed for WDI 1.0 MCC TX when SMMU is enabled.
Issue is that dma_addr passed from IPA driver is iova of IPA
domain. WLAN driver directly uses the iova to do transmission.
Since iova is not mapped in WLAN domain, SMMU fault occurs.
Fix is to map skb to WLAN domain for TX when SMMU is enabled.
Change-Id: I4c029a1e4dfff149e2784f5b95fe1f3cf3e3719e
CRs-Fixed: 2318537
Support Rate control and rate control update events
for pktlog by enabling the events in
WMI_PDEV_PKTLOG_ENABLE_CMDID message.
Change-Id: I9281fcd7c632ba19a84a6eb2c0dff49a172fd70d
CRs-Fixed: 2340635
Add descriptor timestamp debug info in ol_tx_desc_t and
add APIs to set these values.
Change-Id: I686fccff4268811474630dbea8369fabe82d1517
CRs-Fixed: 2333654
Add the basic infra for legacy DP CFG items and the APIs
to be used from other components.
Change-Id: If7ad0e02c65e04ea13a308e680c9ba3b3d84ae25
CRs-Fixed: 2324099
Some target which support sending mgmt frame based on htt would DMA
write this PMF tx frame buffer, it may cause smmu check permission
fault, set a flag to do special DMA map.
Change-Id: I3686be211374d2c316726fa3248dedce87c3faed
CRs-Fixed: 2332329
Doing the tx desc initialization earlier in ol_tx_hl_base to make sure
all msdu buffers have been mapped before msdu frame is freed if encouter
error.
Change-Id: Iefded014b4a179889e67fa7cc0e0c36e8218dd83
CRs-Fixed: 2337167