Currently, when a new ppdu is received, num_users per ppdu is
not getting cleared after every ppdu is processed. Hence, in OFDMA
cases the number of users increments for each ppdu and asserts when
number of users exceed the OFDMA_NUM_USERS.
To fix this, clear num_users when the ppdu is processed from status
ring in monitor mode.
Change-Id: If2598486338650342b83d65f2d5410a73c38c006
CRs-Fixed: 3664999
Currently there is no way to distinguish between
Local Packet Capture and STA+Mon mode as both mode
uses same monitor interface. So to distinguish between
two mode in local_packet_capture enable case use
mon_flags which can be passed during monitor interface
add time. If "flags otherbss" is passed during
monitor interface add driver will consider current mode
as STA+MON mode, LPC otherwise.
Change-Id: I56a724697bb187d0b809b6c43c7b5bf4b7d15ca7
CRs-Fixed: 3739438
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 add changes to store monitor interface flags
Change-Id: Ied43fa50adac200bed47a4044245baca4d6cc84f
CRs-Fixed: 3739291
Currently during local packet capture filter reset
mon_pdev monitor filters are not reset to default init
state, which can result in issue in STA+Mon case as
packets will not be routed to monitor rings.
So to fix the issue reset mon_pdev monitor filters
to init state on LPC filter reset.
Change-Id: I45c354381405427ef28eee6a31fae4f54c4ab5ab
CRs-Fixed: 3739278
Currently host does not maintain peer map and unmap
event count, due to which its difficult to check
if host has received peer unmap events for all peer map.
To fix the issue maintain peer map and unmap count and dump
stats in case of duplicate peer map event.
CRs-Fixed: 3707115
Change-Id: I8881cc35646ba4abcc9897b71ed462a5e2c3dfb4
Now only error counter is present in normal
datapath RX frame dropping. This change add
verbose log for easy debug.
CRs-Fixed: 3706290
Change-Id: Iae2fb9f6100109173921c4f1d43258a0722dc0de
A crash was observed as the desc sanity failure log
exceeded 500 logs per second.
Rate limited the ring descriptor log to fix this.
Change-Id: Ic0d13bc48d05bfb3e2b715e4881e0e8b0329f572
CRs-Fixed: 3715208
dp_peer_rx_reorder_queue_setup accepts a tid_bitmap as argument,
whereas the API dp_peer_rx_init_reorder_queue is passing only TID value.
This leads to rx_tid setup failure and thereby the BA window size is
set to 1 resulting in lower wlan throughput.
Fix this by passing the tid_bitmap to dp_peer_rx_reorder_queue_setup.
Change-Id: Ic8ab5615e0d2650e3077ed3a26ee68193ddc9787
CRs-Fixed: 3702382
Currently during runtime suspend, in dp_find_missing_tx_comp(),
TX descriptors are freed forcefully if the TX completions for
those descriptors do not arrive within 60 seconds.
In certain rare corner cases, there is a chance of TX buffer (that is
in the enqueue path) getting freed in the TX completion path due to
delayed completions. This results in NULL pointer dereference.
Following is the sequence of events for such a case,
1. dp_find_missing_tx_comp() frees a TX descriptor
2. Different buffer gets attached to the same TX descriptor
3. Delayed completion for the previous TX arrives and frees
the buffer in point 2.
Defer the free in dp_find_missing_tx_comp() when there is a delta in
HP/TP for the TX/COMP rings. If HP & TP are not same, then there is
high chance of processing the delayed completion beforehand, thus
avoiding the aforementioned race.
Change-Id: Ia835928f85ea0f79d0187a55333cb8959d0a72e9
CRs-Fixed: 3721341
This change is to update no. of dwords for htt_tx_msdu_desc_ext2_t
as new dwords have to be added by FW to pass
rx buffer address info to support opt_dp_ctrl.
Change-Id: I3edb0a32a1e340d715c00776254ab50aca93c4e0
CRs-Fixed: 3717471
After draining txrx rings there is possibility of reg work
getting triggered to update rings write pointer, this
might cause the reg work to execute later after suspend
complete and cause allow suspend and prevent suspend count
to go out of sync. So make sure all the txrx dependent
tasks are complete after drain.
Change-Id: I30b0696cef4499cc1e92b4556488b58037520184
CRs-Fixed: 3717885
Currently a fixed size array of 2K is used to hold the NBUF pointer
references for RX refill thread NBUFs. Since the queue length of the
NBUF queue is a compile time config, any length change beyond 2K
would result in overflow errors.
Allocate the memory for NBUF references dynamically instead to avoid
such overflow conditions.
Change-Id: I20680768faf20d7688ce33f68ce2aa2be2079be0
CRs-Fixed: 3707803
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: Iad2cc209e15fe95366cd606c5daa6233f2c5535e
CRs-Fixed: 3700370
Add vdev delete notify callback for DP vdev, which
is called when dp_vdev is freed. This will notify
the osif/non-cmn dp layer upon dp_vdev delete.
Change-Id: I22110ebd048066e84644c04b4903c50dd61c61a4
CRs-Fixed: 3696638
After received WoW ACK from FW, there should be some RX packets
coming and IRQ delayed, if these packets are not got processed,
FW UMAC will crash. Change adds an explicit check and abort suspend
if rings are not empty.
Change-Id: I758e1b71d0f5fc9be8cab1bea0f3db20c1698ecc
CRs-Fixed: 3693657
Currently Mon status ring resources allocation and cleanup
is not in sync, during cleanup we are freeing more than allocated
for single MAC solutions like QCA6750.
Fix this by cleaning mon status ring resources properly for single
mac QCA6750.
Change-Id: I8c8564d106fda29f7a6a36f887aa3adee9dc1edf
CRs-Fixed: 3693448
Sometimes when the stats of MLD_PEER is requested, Access
Violation may occur because peer_stats[1], which does not
exit, may be accessed. This change fixes this issue by
aggregating the stats of all link_peer into peer_stats[0].
Change-Id: Ib8138d4b95bef39b084756dd9f9ffae67967100a
CRs-Fixed: 3678284
When REO HW queue DMA maps failure, there is no
log output. Change will give more retires for such
map failure and output error log at last.
Change-Id: I11d6439b74fd4423441f3e0ce0ce18a4ee762e4b
CRs-Fixed: 3671197
This change optimizes rx reorder queue setup by using
tid_bitmap, which contains a group of tids, to set up
multi tids at a time instead of one tid after another.
Change-Id: I161b0c812c436ef79d2d1db693b8d0ac41505878
CRs-Fixed: 3661593
Currently if the msdu_done bit is not set in the
rx_pkt_tlvs, the buffer is unmapped and freed.
There was an issue seen where hardware accessed a
buffer address, which probably was delivered to driver
without DMA of data to the buffer (thereby unmapped
and freed before hw attempted second access). This
results in unwanted recovery.
Based on the above hypothesis, add a workaround
to skip the unmap-and-free of any buffer for which
the msdu_done bit was not set in the rx_pkt_tlv.
Also mark the corresponding rx_desc as in_err_state.
The rx_desc corresponding to such aforementioned
msdu_done failure msdus are stored in a rolling
list, where the old entry is force unmapped & freed
when a new entry needs to be added. This force
unmap-and-free of the oldest buffer gives an uncertain
amount of delay between it being reaped from rx ring and
actual unmap-and-free.
Change-Id: Ibf8f3c886118d532af818466cb46218d88146271
CRs-Fixed: 3667674
As per the current design, the rx_tids are shared across
all the link peers belonging to the same MLD. The rx_tids
are allocated and referenced from txrx_peer, which is common
for all the link peers.
But during the peer_setup, which happens during the initial
connection or during link switch, these rx_tids are being
initialized(or reinitialized) every time for each link peer.
This leads to a situation where:
1) The rx_tids may get re-initialized during the 2nd/3rd/subsequent
link peer setup, even after the BA session has been established via
the first link, thereby setting incorrect BA window size and other
BA parameters for all the non-first link peers. Even the BA session
status will be reset, which can lead to issues for fragmented packets
aggregation.
2) After link switch, when the new link peer is setup, it will be
setup with a default BA window size of 1, when the actual BA window
size has already been established earlier, thereby indicating
an incorrect BA window size for the switched-in link peer.
In order to mitigate the above mentioned issues, the full setup
of tids will only be done for first link peer. For all subsequent
link peers, only the re-order queue setup (wmi notification to fw)
will be done. Also, during the re-order queue setup for all the
non-first link peers, the BA window size will be updated from the
rx_tids in txrx_peer (if the BA session is active).
Change-Id: Ia3f7516ba6efd1014648ead1730712834f450c42
CRs-Fixed: 3657693
In case where WDS ast entry is added and next hop
peer is deleted even before PEER map for ast entry
is received free the AST entry
Change-Id: Id65a5649665588e98f85fd0f363bc7d114c56828
CRs-Fixed: 3650748
Ring IPA TX doorbell with HW HP value to avoid out-of-sync
scenarios between WLAN and IPA after IPA pipes are disabled
and then re-enabled.
CRs-Fixed: 3479426
Change-Id: Ia88c0228759e241722fe31fd1a252e70484684e9
Currently the local_link_id is assigned to each
link peer, during peer setup, with an incremental
number, based on the number of peer setup being
done for the link peers corresponding to the same MLD.
The above logic does not handle the link switch case,
where any particular link peer can be created and deleted
multiple times, thereby leading to 'n' number of peer
setups, each assigning an incremental number as the
local_link_id to the link peer. Due to this the local_link_id
value will exceed the MAX_MLO_LINKS ceiling value, and
when this local_link_id is used to set the frequency band
it leads to an out-of-bound array access.
In order to fix the above mentioned scenario, maintain
a mapping of link peer mac address to local_link_id inside
the txrx_peer (common for all link peers) and use this mapping
table to get the local_link_id. This will make sure that during
any link re-purpose, the link peer being setup will regain the
local_link_id which it was assigned during the first time it was
setup.
Change-Id: Ia78413efe328c81bab74b3a048214d3807b6c6c4
CRs-Fixed: 3658539
Ping fails if the AP VAP is not a part of
bridge as it missed the DA Peer checks
Fix is to move the check of MLO dev ctx
after DA peer validation
Change-Id: I3386bd6a4c9a3574893bc836278d9fb02254645b
CRs-Fixed: 3653128
Host can disable AST indication from FW for WDS peer.
In that case there will be a mismatch in AST entries deleted
by host and by FW. Add check to print mismatch when AST
indication is enabled.
Change-Id: If0fb6dce58a95403a0d67db8ca8cf94946455002
CRs-Fixed: 3654166
Currently when processing the WBM error entries, if there
is an nbuf sanity check failure, i.e. paddr in the srng
entry does not match the paddr from the rx_descriptor, then
the rx_desc flag "unmapped" is being set, without the nbuf
being unmapped and the rx_desc is getting added to the freelist.
This results in the rx_descriptor being replenished with a
new buffer, and the existing nbuf is leaked (without being unmapped).
In order to fix this issue, do not modify any fields of the
rx_desc, since it will be moved to err_state, due to the
sanity failure. Also this rx_desc will not be added to the
freelist, since it should not be replenished due to err_state.
Change-Id: I394cbf884488e75423ada2ad69087c5280bc0ab0
CRs-Fixed: 3656509
Currently if txrx_peer is NULL in Tx completion or rx process
band update will not happen, which will result in invalid band
issue during connectivity logging.
To fix the issue maintain local link id and use link id to
find link peer and update band information in nbuf cb
based on peer frequency.
Change-Id: Ia5a6001fbc167a497660dc7be39a3e641dd28896
CRs-Fixed: 3654696
Make sure that the global dp tx desc pools are cleaned
up only once during MLO umac reset.
Change-Id: Id6e0ac6532b11ffb9ea190b6ab4d481fb486d853
CRs-Fixed: 3647660
Currently SW writes a magic number in the tx completion
ring descriptor after reaping from the ring. This magic
number is used to determine, if the HP of the srng has been
updated without the contents of the ring descriptor has been
written.
There were cases of such stale entries observed and as a SW
workaround, add a logic to wait for a specific timeout for
the contents of the ring descriptor to be updated before
moving on to process subsequent ring entries.
Change-Id: I17c0dc0ac55ca81dee3c0825ce934d60ccb1a720
CRs-Fixed: 3648443
One instance of an issue was observed, where there's an
SMMU fault due to an access to paddr, which has been unmapped,
but is shown as active/mapped from the rx_desc data.
Save the paddr of the previous buffer attach to the rx
descriptor to aid in debug. This is to confirm if the
paddr has got updated after the last replenish.
Change-Id: Ib8318883b273be8b722cefec16d18b45daf679a7
CRs-Fixed: 3642902
Scenario:
STA connected to AP and another monitor interface is up,
monitor status ring filter will be configured. If TLV TAG
WIFIPHYRX_GENERIC_EHT_SIG_E is reported in monitor status
buffer, each single status buffer processing will add 1 to
ppdu_info->rx_status.num_eht_user_info_valid, but it never be
reset to 0 in this case. once > 4 times this kind of monitor
status buffer is processed, num_eht_user_info_valid will be
OOB of array ppdu_info->rx_status.eht_user_info.
Reset PPDU RX status when finished processing PPDU RX status.
Change-Id: Ie58e45b3a39b7b88b0f72df2ac3076ddf659147b
CRs-Fixed: 3649604
Issue is: During roaming when tx completion status for M2/M4 frames
are received before peer_id mapping is done, opmode is left to its
default value QDF_MAX_NO_OF_MODE. Because of this opmode value
connectivity log is skipped.
Fix is: In tx completion status path, if peer is NULL then derive
the vdev from the tx descriptor vdev_id, extract and set op_mode.
Change-Id: I4a15b01e792bf26276f529e64c67b0ba3ea5c9ac
CRs-Fixed: 3646119
Currently during error process band is updated if txrx_peer is valid.
but in current logic txrx_peer was retrieved later which will always
result in condition failure and will cause band not to be update.
To fix the issue move getting txrx_peer part before band update.
Change-Id: I3ebec6d695e25c2a19304e11ec780215a26dd016
CRs-Fixed: 3648441
In the case of MLO sta connection existing API won't be able
to find the mld peer resulting a traffic failure.
Use wrapper API to fetch the peer in multipass TX processing
which will search for both legacy and mld peer.
Change-Id: I161502aba224806914e54a3a04a06b75e52d65bb
CRs-Fixed: 3650259
As BE chipsets already have 4 TCL_DATA rings
do not allocate TCL credit ring to re-purpose as
TCL_DATA ring
Change-Id: Idf3adbd6394c1a07e48418484083a6aa8946f318
CRs-Fixed: 3636230
If IPA is enabled, index 1/2 in array soc->tx_comp_ring[] will
not be initialized, but initialize index 3/4 instead, if access
to index 1/2, NULL pointer dereference issue appeared.
use soc->num_tcl_data_rings as number of TX completion ring
wlan host interested, it differs between IPA enabled/disable case.
Change-Id: I92b4e2c9971f93136a9f4e60ae3de32140aa2477
CRs-Fixed: 3647677
Client utilization is computed as percentage. Round it
up to the closest integer value.
Change-Id: I324370db447fae8a462a146357b6a50510c7e0b7
CRs-Fixed: 3623584
Update the branch prediction compiler optimization flag for
rx avg rate calculation from unlikely to likely.
Change-Id: I0abe10d27070292995e07914e75b9a137c6c91b7
CRs-Fixed: 3628056