Add code to process lmac rings in polling.
Lmac rings can be switched between polling and interrupts
by using lmac_polled_mode flag in dp_soc.
Change-Id: I231e906930c9b42100a2df3e52acac97deba1c34
Created a new interrupt mask for msi chipsets so that both ahb
and pci chipsets can work together.
Change-Id: I78d1b9641e58f07d1582152c691c5ae29e6ddb03
Setting interrupt mode in dp_soc_init as setting it in
dp_soc_attach is resulting in interrupt mode not set on
subsequent wifi down/up. soc_attach is called only in case
of wifi unload/load and not in case of wifi down/up.
Adding interrupt mode setting in soc_init helps in setting
correct interrupt mode in case of wifi down/up.
Change-Id: I9e6ad94e42b7bc2bf84f832ece8dc8779e335905
There is excessive console logging in case of peer or vdev
null in mic error handling and wbm err processing in softirq
context which is delaying the interrupt to get enable and as a
result host is slow in reaping the wbm2sw3 ring. This leads to
wbm2sw3 ring full back pressure at FW and finally FW asserts.
As part of this change reduce reduce the error logging level from
err to info and for MSM info goes to the wifi logger logs and not
to the console.
Change-Id: I9b8be1feee5e807cecbe307b24a323e2b0ae631a
CRs-Fixed: 2596656
If two back to back HTT msg sending happened in short time,
the second HTT msg source SRNG HP writing has chance to fail,
this has been confirmed by HST HW.
For monitor mode, HTT msg for monitor status ring configuration
is the last msg for sending, if the 2nd HTT msg for monitor status ring
sending failed, HW won't provide anything into 2nd monitor status ring.
as a WAR, add some delay before 2nd HTT msg start sending, > 2us is
required per HST HW, delay 100 us for safe.
Change-Id: Id2a5a8798fde79267f9d6f9ba23d8ed54a400aa7
CRs-Fixed: 2597248
Currently in lithium FW is not always in datapath. As a result
can not provide all the wlan vendor extended stats. So as part
of this host provides some of the extended stats.
Change-Id: I876b6e905f7e25b7088f80f07e55e26a7a409241
CRs-Fixed: 2594797
There is a chance of leak of RX buffers if peer disconnects
while we are in middle for processing the list of MSDUs in a
AMSDU
Change-Id: I0081ec96da95ea570903dbd5d91c866c8c141667
Add a check to validate invalid_peer_head_msdu before accessing
to avoid NULL dereference.
Change-Id: I9218bdd1100b48a32240546f380b1437ae72c406
CRs-Fixed: 2585651
Channel Frequency Response(CFR) captures FFT bins corresponding to a PPDU
received and this is relayed to user space application. Since FFT bins
alone will not be meaningful, additional information about the PPDU such
as Peer addr, BW, NSS, etc are extracted from multiple PPDU status TLVs
and passed on to userspace along with CFR data.
Host RX monitor status ring is configured during CFR enable and the host
subscribes to relevant PPDU TLVs that provides all necessary information
for CFR data correlation.
Change-Id: Ia8080fe96c330db42d371634ba4363eb36c05402
CRs-Fixed: 2593416
The printk buffer is protected by a global raw spinlock for readers
and writers. This restricts the contexts that are allowed to
access the buffer. So large latencies exists when printing to
kmsg done with QDF trace levels WARN, INFO, ERROR. This results
in roaming KPI for maximum transition time exceeding the expected
100ms.
So change info/err prints to debug prints in roaming path
to reduce delays in roaming time.
Change-Id: I9cdf043da6e88d735ab39812e74ed24784ceede3
CRs-Fixed: 2594867
crash scenario:
a. dp_tx_vdev_detach will reset the vdev of TX desc to NULL
by dp_tx_desc_flush.
b. in the meantime, if TX completion is coming and when all TX desc
is recycled, the pool will be freed if pool status is invalid before.
c. invalid TX desc accessing will happen in (a).
add TX desc pool lock protection in dp_tx_desc_flush.
Change-Id: I65c570aa6a3044a478dbe51bbf396cf24612f675
CRs-Fixed: 2595755
REO CMD send failure floods the console with error logs.
Ratelimit the error log for REO CMD send failure
and increment stats to keep track of the number of
failures.
CRs-Fixed: 2593996
Change-Id: Id415a17b1ba1f4c044bf34eb31e81e2cea825f80
Currently wlan host will re-inject defrag data with RBM 6 to
REO, this data buffer will go to REO-->REO2SW4-->IPA-->FW2RXDMA,
fix below issue introduced by this RX buffer path.
a. FW assert due to FW2RXDMA DMA address not 4 bytes aligned.
b. host skb double allocation due to qdf_nbuf_linearize() for frag skb.
c. Invalid RBM 6 for fragment RX due to RX buffer resue.
Change-Id: I36d831fc14b6b9aa0cea32682823de348f7eecd3
CRs-Fixed: 2591453
In vdev to vdev roaming on HKv2 we can have dp peer on
different LMACs with same mac address. To get the right
peer on PDEV use id match while searching from hash table
Change-Id: I60b4d7018120c9bd6a56913822ce42f24598184a
Check for vdev_id mismatch to deliver NBUFs to stack to avoid
hold peer reference while giving nbuf list to stack
Change-Id: Ic475e00d5b1793ada7b26b7af3322ca2fa51836f
Link descriptor were getting freed by the pointer
of the previous freed link descriptor. This patch
fixes by copying the address of the current in a
local descriptor info and using it to free the
current.
Change-Id: I95e137ba5b1f0ad21b0e6fb39f6671e1d5b65ba6
CRs-Fixed: 2577624
Currently cdp ops are given pdev/vdev/peer
handle as its arguments, which is directly
accessed in those APIs. This can cause a
race-condition in access of the respective
handles if it has been deleted in parallel.
Hence as a part of cdp convergence, pass only
the pdev_id or vdev_id or peer mac address,
which will be used to get the respective handles,
and hence avoiding the unwanted access of the
handles if it has been deleted.
- txrx_peer_unmap_sync_cb_set
- txrx_fw_stats_get
- txrx_get_ctrl_pdev_from_vdev
- txrx_get_mon_vdev_from_pdev
Change-Id: I4472dc0905edb7700acb4401b117c8876ba455f3
CRs-Fixed: 2541460
Change cmn_ops APIs to replace pdev, vdev and peer
dp handles with pdev_id, vdev_id and peer mac address
along with dp soc handle
Change-Id: I5716a87cad56b1dfe8dd56f193bbb6ff923a6af1
Use dp_info_rl instead of QDF_TRACE when handling tx completion status to
avoid excessive logging when vdev is destroyed in the another thread.
Change-Id: I1044c6d747ba1c7036664fe0265ec4855b7b4c47
CRs-Fixed: 2591486
Block ack and ack frame is composed and sent to up
layer after a unicast packet to AP is received for
tx capture feature.
Change-Id: I4b6bb35fa093432539d15d09a93f85a8ec700b34
when lot of fragment frame with invalid peer_id indicated to
host through reo exception ring, excessive logging cause srng
lock hold long time.
degrade log level as a WAR to avoid excessive logging.
Change-Id: Iffb18ad723d1ac5955868cc8ec99bb0198785ee5
CRs-Fixed: 2584610
as we are overriding bar ppdu information, we need bar start/end
timestamp and duration.
added resp_type, mprot_type, rts_success and rts_failure in
cdp completion user.
Change-Id: I53c215e948fad8d079e1d4c40ec07d34aff1fefe
remove multiple update of tid for same ppdu stats.
tid is populated from user rate, completion common and
ack ba status tlv. As tid from ack ba status tlv comes wrong
for non-qos tid. we remove the tid populate in ack ba status tlv.
Change-Id: Ia8b0004fc329bf0fecc1a622e199635034c213a7
Currently in dp_rx_wbm_err_process, we donot handle
HAL_REO_ERR_BAR_FRAME_2K_JUMP and HAL_REO_ERR_BAR_FRAME_OOR REO errors.
Add support for the same.
Change-Id: I22147fcd2d531c1e08214626796994593ffeb3a6
CRs-Fixed: 2580876
expected tlv bitmap can't be guaranteed as different ppdu frame has
different expected tlv bitmap. Check last tlv before sending stats
as tlv are coming from firmware in sequential order.
retry counter is not populate correctly, only successful
completion ppdu status get update
Change-Id: Ia4b71371bbf38996df9dbb67746078d5fbd628a1
Degrade log level from ERROR to INFO_HIGH to prevent excessive
logging into dmesg console.
Change-Id: Ic0ef72cf2564ed2354b3db4d6e09e7ac7c832560
CRs-Fixed: 2582400
Memory is freed and allocated only during
wifi load and unload in case of WIN and not
during wifi up/down
Calling dp_tx_soc_detach unconditionally
was leading to memory free in wifi down
path and when wifi up was issued the
memory which was freed was never allocated
Call dp_tx_soc_detach conditonaly only for
MCL in dp_soc_cmn_cleanup and for WIN in
dp_soc_detach using dp_soc_reinit flag which
is set for WIN during wifi unload
Change-Id: I9da34f7945d65a34e719c7db58da13e85ae3d228
Change cdp_host_stats_ops, cdp_wds_ops, cdp_raw_ops
and cdp_pflow_ops APIs to replace pdev, vdev and peer
dp handles with pdev_id, vdev_id and peer mac address
along with dp soc handle.
Change-Id: Ia956882535cc04e57a006905d46ccfe9d95bb731
Correct the debug message to print the appropriate
ring id when backpressure events are reported
Change-Id: I4cb2af9c802469ecd0c38bdd3789439048de876f
CRs-Fixed: 2556208
Reset ba_status to inactive irrespective of tid update status to make
sure the ba_status reset successfully.
And also use pe_err_rl instead of pe_err to avoid excessive logging.
Change-Id: Ifc6adc166b5093742b34dd7d74924f9d54146ea4
CRs-Fixed: 2577663
crash scenario:
a. pktlog is enabled, the timer mon_reap_timer is active,
reap mon_status_ring hal desc periodically.
b. rx_desc status pool is freed in dp_rx_pdev_mon_detach() when do
dp_pdev_deinit() while the mon_reap_timer is still active until
dp_rxdma_ring_cleanup() free it.
c. during the timeslot between dp_rx_pdev_mon_detach() and
dp_rxdma_ring_cleanup(), if some hal desc is pending to be
processed on mon_status_ring, invalid accessing to rx_desc_status
pool happened.
solution:
if pktlog is enabled, stop mon_reap_timer ahead of
dp_rx_pdev_mon_detach() in dp_pktlogmod_exit().
Change-Id: I91b16a88a5e4390587925d6eb2840b3ec1ec2187
CRs-Fixed: 2579817
Currently defragmented packets use HAL_RX_BUF_RBM_SW1_RBM as the RBM
value for the defragmented packets which are re-injected into REO.
Thus, if REO encounters any error while handling these packets, they
would end up in WBM2SW1 ring (via WBM), which is managed by the FW. The
FW will eventually recycle these buffers back to RXDMA via its refill
process. As a part of defragmentation, host does a 802.11 -> 802.3
header conversion. This is resulting in an address which is not 4
byte aligned. Hence, when RXDMA tries to use these addresses (after FW
recycles them), it may lead to issues.
Change the RBM value of the defragmented buffers which are
re-injected. Now, if REO ends up throwing an error for these
packets, they wll end up in WBM2SW3, which is managed by the host.
The host can then drop these packets and replenish RXDMA with 4 byte
aligned buffers (via FW).
Change-Id: I9d9c25385978d5be855699feb28d292c6f3fffdd
CRs-Fixed: 2572483
Crash scenario:
a. monitor mode dp_vdev is freed in dp_vdev_detach_wifi3 without
checking whether any dp_peer is associated.
b. monitor mode self dp_peer do peer clean up when HTT peer
unmap MSG received, invalid accessing to dp_vdev as it has been
freed in step (a).
Check if there is dp_peer associated for monitor mode dp_vdev,
skip dp_vdev free, when all dp_peer is freed, dp_delete_pending_vdev
will free dp_vdev.
Change-Id: Iea4b0efc6e7bbd4109d9cd0b109dfddf727a9fff
CRs-Fixed: 2576604
Local peer_id is being cleaned up across DP, HDD and PS/WMA.
So, any references to local peer_id/sta_id will be replaced
by peer mac address and all interactions between the layers
will be based on peer mac address.
Cleanup local peer id usage from DP APIs.
Change-Id: I930e1c6a09092a373c093239632d6f310fee18e2
CRs-Fixed: 2529041
Local peer_id is being cleaned up across DP, HDD and PS/WMA.
So, any references to local peer_id/sta_id will be replaced
by peer mac address and all interactions between the layers
will be based on peer mac address.
Cleanup unusued DP APIs which are based on local peer_id.
Change-Id: Idd95bc640ca7e36a427be7202935034d4ed58979
CRs-Fixed: 2529026
Remove pdev and vdev control path handles from data path.
Instead send pdev_id and vdev_id along with opaque soc
handle in ol_if_ops.
Change-Id: I6ee083f07e464f283da0d70ada70a4e10e18e1b2
Avoid freeing flow_pool_array_lock when it is
not created. So free flow_pool_array_lock in 2
ways:
1. When dp_soc_cmn_setup fails free the flow_pool_array
lock only if it is created and then close the dp
soc handle.
2. As flow_pool_array_lock is created in dp_soc_cmn_setup
as part of dp_pdev_attach_wifi3 init sequence free the
lock only in the dp_soc_cmn_cleanup as part of the
dp_pdev_detach_wifi3 deinit sequence.
Change-Id: Ie3e11da0bc0854fa550c5d417ca3c0bc9e2593b1
CRs-Fixed: 2565603
Increment pdev->num_tx_outstanding when
tx_desc is allocated and decrement tx_desc when tx_desc
is released. During runtime pm suspend, WOW PAUSE
is sent to firmware only if there are no
pending num_tx_outstanding descriptors.
Change-Id: I54aaa4d8a37b8cd47de1701a315bb0735c9739d2
CRs-Fixed: 2567689