Check the return status of the osif->rx function and in case
of failure drop the skb. This is needed when OOR error frame
is received and if the frame was not delivered to stack it
needs to be dropped.
Add error counter to periodic stats to determine how many Rx
packets were rejected or were dropped since deliver to
stack failed.
Add the new status check for delivering rx frames to stack
under MCC specific flag - DELIVERY_TO_STACK_STATUS_CHECK.
Change-Id: I9b1c795f168774669783cc601e68003a7747a279
CRs-Fixed: 2672498
Move dp_tx_peer_init before dp_peer check to init for
bss_peers as well for MCAST packets. Add TSF timestamp
for wbm completion path in TX Capture feature.
Change-Id: I7da500671e2c22a937cae8770ce5357b9bbe5364
Do a logical split of dp_soc_attach and
dp_pdev_attach into Allocation and initialization
and dp_soc_detach and dp_pdev_detach into
de-initialization and free routines
Change-Id: I23bdca0ca86db42a4d0b2554cd60d99bb207a647
Fix the skb leak in dp_rx_process where rx descriptor cookie
validity fails. This skb should be cleaned up as part of the
rx desc and nbuf free function called during the driver unload.
However this will ensure that the skb released and added rx desc
added to the free list during dp_rx_process itself.
Add skb map, unmap functions, line numbers and if the nbuf is
mapped or unmapped to the nbuf tracking table. This debug info
will be logged once the skb is leaked.
Change-Id: I52dbf38922be20fc0aaea380e0e572af16de773e
CRs-Fixed: 2662992
Lot of checks in Tx completion path are for special handlings
such as when ol stats are enabled some protective debug checks etc..
Add a logic to fast free of buffer at transmit completion.
If extended stats not enabled(Typically needed for enterprise cases)
do the buffer free faster. This is controlled through a flag.
Change-Id: I04873b5e3643d8e93e5b248fcaf23504dcb7624f
Since the peer unmap handler removes all the associated
wds ast entries, the redundant API dp_peer_flush_ast_entry
can be removed.
Change-Id: Ib8fc19e846e07f9a60c73530cac66d357a00fd98
For HTT messages (no matter they are test commands or not) which do not
have FW responses, tag them for runtime PM feature so that corresponding
usage count will be decrement right after sending them through HTC to
avoid usage count mismatch. Tag the missing ones in this change.
Change-Id: I3f78d21a5a490db6dff0dd2786d87c3ced66180c
CRs-fixed: 2672301
Currently, mcopy mode delivers first msdu(fcs_passed 128 bytes) per-ppdu
to upper layer, add support for Extended mcopy mode to deliver first
msdu(128 bytes) per-MPDU(fcs_passed).
Change-Id: Ib345fc14a8d468788b9de78516d27e8dff24caa4
CRs-Fixed: 2644175
crash scenario:
(1) during dp_vdev_detach_wifi3(), it will reset related outstanding
TX desc vdev pointer to NULL.
(2) In the meantime, if this vdev TX completion is received from HW,
dp_non_std_tx_comp_free_buff() do nothing for nbuf due to null vdev,
leak will happen.
add error handling in dp_non_std_tx_comp_free_buff() to fix it.
Change-Id: I942a3d690711c60e8299d86562f08f0fb77f0b32
CRs-Fixed: 2670186
Do batched invalidate of tx completion descriptor to avoid
unnecessary D-cache miss for 32 byte size descriptor.
Change-Id: Ia580fe78dcef5b36f117aaad171a2df6d0e34966
In OOR error handling scenario, msdu is spread across
two nbufs. Due to this, there is a mismatch between
msdu count fetched from MPDU desc detatils and count
fetched from rx link descriptor.
Fix is to create frag list for the case where msdu
is spread across multiple nbufs.
Change-Id: I1d600a0988b373e68aad6ef815fb2d775763b7cb
CRs-Fixed: 2665963
Split dp_rx_pdev_attach into dp_rx_pdev_desc_pool_alloc,
dp_rx_pdev_desc_pool_init, dp_rx_pdev_buffers_alloc and
dp_rx_pdev_detach into dp_rx_pdev_desc_pool_free, dp_rx
_pdev_desc_pool_deinit, dp_rx_pdev_buffers_free APIs
This split is made because dp_pdev_init is introduced
as part of this FR and these APIs will be called from
dp_pdev_init/dp_pdev_deinit or dp_pdev_attach/dp_pdev_
detach accordingly to maintain the symmetry to DP init
and deinit path
Change-Id: Ib543ddae90b90f4706004080b1f2b7d0e5cfbfbc
CRs-Fixed: 2663595
Split dp_mon_link_desc_pool_setup to alloc and init APIs and
dp_mon_link_desc_pool_cleanup to deinit and free APIs
This split is made because dp_pdev_init is introduced
as part of this FR and these APIs will be called from
dp_pdev_init/dp_pdev_deinit or dp_pdev_attach/dp_pdev_
detach accordingly to maintain the symmetry to DP init
and deinit path
Change-Id: I36b2a98bd317010124916e0b2779938eba3883ea
CRs-Fixed: 2663595
Split dp_hw_link_desc_pool_setup into dp_hw_link_desc_pool_alloc,
dp_hw_link_desc_pool_init and dp_hw_link_desc_ring_init APIs, and
likewise split dp_hw_link_desc_pool_cleanup into deinit, ring_deinit
and dp_hw_link_desc_pool_free APIs
This split is made because dp_pdev_init is introduced
as part of this FR and these APIs will be called from
dp_pdev_init/dp_pdev_deinit or dp_pdev_attach/dp_pdev_
detach accordingly to maintain the symmetry to DP init
and deinit path
Change-Id: I1682a59847db5d3441e85b00768667066bf5edf2
CRs-Fixed: 2663595
Split dp_srng_setup into dp_srng_alloc and dp_srng_init
likewise split dp_srng_cleanup into dp_srng_deinit and
dp_srng_free
This split is made because dp_pdev_init is introduced
as part of this FR and these APIs will be called from
dp_pdev_init/dp_pdev_deinit or dp_pdev_attach/dp_pdev_
detach accordingly to maintain the symmetry to DP init
and deinit path
Change-Id: I421fbd5bce074af6f75c147742f44e03568e6403
CRs-Fixed: 2663595
For qcn9000 in case of monitor mode, reap monitor destination
ring first and status ring later to avoid backpressure
on monitor destination ring
Change-Id: I4e1931afe0453221f1326ca7bdb7f0273cc7363d
CRs-Fixed: 2670656
Restrict DMA Map/UnMap upto buffer size for packets in rx process.
This gives 2-3% cpu gain in peak throughput.
Change-Id: Iaf5e9f6f734d80b6d2c234bd8e679cf2a81c7e2c
CRs-Fixed: 2660698
Decouple IPA TCLring and IPA WBM completion ring size from regular
Tx TCLring and WBM completion ring size configuration.
This is required as there is limitation on IPA GSI rin size
configuration.
Change-Id: I689d0e8ca72f069c5b68dc1789358e091c554d30
CRs-Fixed: 2665010
Size of the TLVs have changed across generation of chipsets
Offset values need to be configured into DMA register for preheader DMA
Added APIs to get offsets of each TLV based on chip type
Change-Id: Ic011332cbf3a1017f324f246e47c9e2c91441c70
Validate number of wds entries deleted during peer unmap
handling with the number which firmware has sent in
peer unmap message, which indicates the number of
wds ast entries deleted by firmware after peer delete.
Change-Id: I09e1c41bab19cd023e7a83baf1e90d51aab4229e
CRs-fixed: 2667445
1) Modified MSI interrupt mask for QCN9000 so that rx and tx
interrupts can be decoupled.
2) Removed lmac interrupts from polling mode and switched
them to msi interrupts. Added MSI masks for lmac rings.
3) Enable monitor mode LWM interrupt. This was already enabled in
integrated ahb interrupts but missing in msi. Replenish buffers in
RXDMA refill ring based on low threshold interrupts in addition to
regular Rx processing. Also made interrupt batch counter threshold as 8
for monitor status ring since ppdu end interrupts are not available in
PCI chipset and require srng msi interrupts to reap monitor status ring
Change-Id: I5c84b14d6b0a9c26fb3f0d67c349e79751a60861
In current monitor status ring implementation,
on pdev_attach, (srng->num_entires – 1) entries
(to keep one entry slot between hp and tp)
are replenished and last entry is not replenished to HW.
With qcn9000 monitor mode HW enhancements, status and destination ring
can be made lock-stepped.
for qcn9000 lock step is achieved by making monitor status ring
follow the monitor destination reap for a PPDU
However in existing flow during attach monitor status replenish logic
do not fill last entry but is filled up during first subsequent reap.
for first ppdu, i.e. after reaping destination ring,
when status ring is reaped, as first entry (hp = srng->num_entires – 1)
in status ring is NULL, so lock-stepping is not achieved.
To address this issue for qcn9000 as well as HK:
a. Replenish last entry in monitor status ring during attach
b. Modify src srng peek API to peek it from hp+1 entry
c. Introduce new HAL API get cur desc and move next
d. Remove WAR to skip status ring entries if DMA is not done
Change-Id: I60b8e7c075253d37e6b849a9b24f473c5afce82c
CRs-Fixed: 2626049
- For directly connected peers, during peer de-auth,
a Single Peer delete request to the FW from host
should delete all AST entries attached to the peer.
- This optimization is aimed at optimizing host-fw
handshake messages
Change-Id: Iaebe2022f90ef9a10a6a0f37b21c409cf9e9ea39
CRs-fixed: 2647242
Enable monitor destination ring interrupt to fix
packet is getting stuck in monitor mode.
Fix and add monitor mode debug count
Change-Id: I74efdcf6a4373dd73e373285c8cd3aa5757cd0b2
During dp_tx_hw_enqueue writing into HW SRNG,
if devcie is already runtime suspended, set the
SRNG_FLUSH_EVENT, so that it will be flushed
as part of dp runtime resume callback.
Change-Id: I95e74844cf74eb4f73862da3da9d93422f1eea8c
CRs-Fixed: 2664660
The cleanup done in case of pdev attach failure
does not deinitialize the IPA tx and rx buffers.
Also the tx descriptors are not freed in this
cleanup path.
Due to this, the tx descriptors and IPA tx/rx
buffers memory is neither freed not unmapped.
Fix this pdev attach failure cleanup path to
avoid memory leaks.
Change-Id: I570e3618f0f48f56749466fce5bcba5a4ef1c161
CRs-Fixed: 2663036
Retrieve peer from mac address to avoid accessing peer
even if peer is deleted.
Change-Id: I1c9740fc5d3090ef296c4dc4a5afe7022e83dca5
CRs-Fixed: 2663836
The peer rx packets should be flushed when
deleting the peer and its state should be reset
to DISCONNECT, when deleting the peer.
If the state of peer is not set to DISCONNECT,
then the flushing of rx packets for the peer
which is being deleted will call the rx callback
and submit these packet to the stack, which can
cause unwanted behaviour.
This way the UMAC does not need to specifically
call clear peer before deleting the peer.
Change-Id: I3b5a737126350a361d968f6349aef6291b2e3f56
CRs-Fixed: 2659629
For wlan stop modules any pending vdevs flush happens as part
of pdev deinit. If in case of any peer ref count leak, driver
is stuck in dp_pdev_flush_pending_vdevs as the vdev is not getting
cleaned up. This is due to vdev's peer is not deleted. So during
force flush of vdev's peers set the ref count to one before peer
unmap handler.
Change-Id: Ie54996522eac870d00ea7a75c8db40a1cce09d2d
CRs-Fixed: 2658032
If tx capture, sniffer are not enabled, mgmt nbuf is freed.
It is causing use-after-free in bpr enabled case
Added change to free only when bpr is disabled
Change-Id: Ia56254ca371cd9fbc21f5d58fac7ea96792d0bee
CRs-Fixed: 2663098
For 4 core CPU system, Tx access can be made lockless by associating
one Tx ring per CPU. Three Tx DATA rings and one SW2TX command ring
can be used for sending data to Tx.
Change-Id: I6e38cad52dffa4e46ff2b736cd6b949d061fa2a4
Invalid peer handler does double free of nbuf and leads to crash.
To avoid this make nbuf->next NULL before calling dp_rx_null_q_desc_handle.
Change-Id: Ia3f92cb5136dbdbfeb1e9cda8a52c474456a4e0c
CRs-Fixed: 2655792
Read ini param 'full_mon_mode' and enable full
monitor mode support for qcn9000
CRs-Fixed: 2655293
Change-Id: I6550765246f6541453006fe2db28e01c8e06670c
Remove lock to access REO destination rings because 4 rings are
accessed in 4 individual cores.
Change-Id: Ia3f92cc5136dbdbeea1e9cda8d52b474356a3e1a
CRs-Fixed: 2660901
In pdev deinit path tx_desc->vdev can be NULL
in dp_tx_comp_free_buf use soc->osdev to unmap instead
of vdev
Change-Id: I8b390656d482fed3c8c85d928860222a88325ca1
During the packet transfer from HOST to Transmit Classifier Layer,
if NAWDS is enabled, send peer id of NAWDS peer.
This is to avoid re-injection from FW to Host.
Change-Id: Ic0e5c46fff3bbe1a3e8ea3a01986478c925452f5
CRs-Fixed: 2628703
Update QCA_NAPI_DEF_SCALE_BIN_SHIFT for defconfig builds to
the same value as the perf build.
Move the WLAN ext irqs to gold cores for defconfig builds.
Disable cpu isolation before moving the IRQs to gold cores.
Add the ability to move IRQs to gold cores when the cpus
hotplug in.
Change-Id: I4cfecd02a1a2200dc99adee9a324b90c877c13fd
CRs-Fixed: 2638820
The dp_should_timer_irq_yield should return the
status DP_TIMER_NO_YIELD when no yield condition
has been met. Currently its returning the status
DP_TIMER_TIME_EXHAUST which causes the timer to yield
before the expected time.
Fix the return status from dp_should_timer_irq_yield
Change-Id: Ia57aae635789f34e79285c27f5312ea38e07df5c
CRs-Fixed: 2659900
Return DP_SW2HW_MACID if per_pdev_lmac is set.
This is needed when we need to get target pdev_id without
doing pdev lookup.
Change-Id: If83f29bbcf23175708ba7eaf58e01e040ccb5a45
This mode is supported through hw_mode_id 7. A special mode for
IPQ8074 platform alone to bring up single pdev alone on 2G mode.
FW would advertise the mode 7 support through the WMI service
ready message and this mode will be the default mode for AP-HK10 alone.
Added preferred_hw_mode and target_pdev_id into dp structures so that
they can be used to configure the dp rings for this particular mode.
Also changed the lmac_id to target_pdev_id mapping for mode 7.
Change-Id: I3aae46fea13132eebaf7d37cff68ef517253d229