Update peer DB as per new design
peer_hash_table: add at peer_create and delete at peer delete
peer_id_to_obj_map: add at peer map and delete at peer unmap
peer_list: vdev level peer list add at peer create delete at
peer delete
Call dp_peer_cleanup() at unmap event
dp_peer_cleanup -> dp_peer_tx_cleanup -> Tx capture cleanup
|
---------> dp_peer_rx_cleanup -> Cleanup Rx REO TID queues &
defrag queue free
Introduce ref_cnt variable per VAP which will be
incremented and decremented at peer alloc and free. This counter
will be used to delay the vdev free if there are any active
peers for vdev exist in system
Change-Id: Iec13bceed0db0db71655fdbf6f96df8795b5077b
Remove the global soc->peer_ref_mutex lock to protect
peer access
Instead use granular locks to protect the individual
peer DBs
1) soc→peer_hash_lock : To protect peer hash table
2) soc→peer_map_lock : To protect id to objmap array
3) vdev→peer_list_lock : To protect vdev level peer list
Change-Id: I9f044c4d71fe1155817a2b22a5a050545ec37445
Peer wlanstats context was accessed directly from
PPDU cookie, with this approach the cookie pointer
may become stale if peer goes for deletion
Hence access the wlanstats context using CDP API
with stats context protection
CRs-Fixed: 2740261
Change-Id: I54c785325f8852ad422f05527b98ebca6e4d6cf0
Add allocation check failure before accessing index in
dp_soc_rx_history. In case of allocation failure for a particular ring,
continue with allocation and history recording of other rings.
Change-Id: Ifae46ddf38b3af271900651cdbba662325220ef9
CRs-Fixed: 2747891
In dp_srng_init, max_buffer_length and prefetch_timer are used
while uninitialized.
In dp_bucket_index, overrunning array cdp_sw_enq_delay leads to
out-of-bounds access.
In dp_rx_defrag_fraglist_insert, cur is first NULL checked but
cur is again set to qdf_nbuf_next and is accessed without
NULL check. Thus do a NULL check again before dereferencing
cur to avoid potential NULL pointer dereference.
In htt_t2h_stats_handler, soc could be NULL while cmn_init_done
is dereferenced. Thus fix it by NULL check soc first and then
dereference cmn_init_done.
Change-Id: Ie6a33347d34862f30ba04a10096d3892af7571d3
CRs-Fixed: 2751573
Add support to retrieve per PPDU phy tx duration without response time.
Add support to retrieve per User phy tx duration for MU-MIMO and OFDMA.
These metrics are useful for ATF stats feature. Stats processing done
only if atf stats flag is set.
CRs-Fixed: 2709102
Change-Id: I90db41aa45843808e07343a80750c154abbde9cd
Memory optimization of monitor status ring by allocating buffers during
replenish using alloc_skb (linux API).
It creates buffer of required size rather than 4k size(dev_alloc_skb)
Change-Id: I3ae5e403de28c4570f8ac3b50d3ca878a9e4b2f9
CRs-Fixed: 2733931
Currently when query REO stats, each time REO will response
cumulative REO stats per TID, while host side count them as
delta stats between each query.
Reset host stats to 0 before each query, and if query timeout
happened, use the last saved stats for this time query.
Change-Id: I29e986b3c8859f5c3d1b557d9cc980a52219d664
CRs-Fixed: 2743352
Remove self and BSS peer back pointers and added APIs to
get self and BSS peer from VDEV
These new APIs will iterate through peer list and return
the appropriate peer by taking a reference
Caller has to take care of releasing the reference
Change-Id: I550ff83d665f3ad0a185bea1a1e6270c5474ff07
Add WMI support for WMI_TWT_SESSION_STATS_EVENTID. This event
contains stats for a given TWT session.
Change-Id: I01d5f7b30da803ee713a14c1d1124b8af7161bca
CRs-Fixed: 2609951
Notification is sent in following two scenarios.
- After call to dp_peer_add_ast() if we are not expecting any
peer map event.
- When HTT peer map event is received.
Change-Id: Id926d1cec1ee64520b0368fcc5000988c24e0513
CRs-Fixed: 2745542
The rx rings are relatively of smaller size. Any
duplicate entry sent by hardware cannot be back-tracked
by just looking at the ring contents alone.
Hence add a history to track the entries for the
REO2SW, REO exception and SW2REO ring.
Change-Id: I9b0b311950d60a9421378ce0fcc0535be450f713
CRs-Fixed: 2739181
Add support to get device name and invoke debugfs init
on post attach so that device name is updated at that point.
Change-Id: I0e0a06cae4bef4d6e43c0295f5db99220b185df2
In monitor mode, the packets for 5GHz go to lmac ring 0 and for
2.4GHz packets go to lmac ring 1. But this is valid for DBS solution.
For single MAC solution, both 2G and 5G packets go to lmac ring 0.
Add mapping between channel band and lmac id ring and populate
this mapping table based on target type i.e DBS or Single MAC.
Change-Id: Iabc7c2088caca6fe4adef1da6d45945fc9a2716c
CRs-Fixed: 2728664
Allocate/Deallocated the peer extended object in the
peer_create() and peer_del() paths respectively.
Change-Id: I3e93e1ec85aefb22d3fb40d1b01bbd07d660aff5
Cleanup the code to fix the compile error while setting
CONFIG_REMOVE_PKT_LOG=y & CONFIG_WDI_EVENT_ENABLE=n
with Hasting
Change-Id: I493fbddec865fe20789022445b0f155201772119
Move the srng history to hif context.
Process the monitor ring only for the lmac
corresponding to the configured monitor channel.
Add the timer and srng history for monitor mode.
Change-Id: I4e5e49ad5e657b55bfafbb40ef5f59496277cb40
CRs-Fixed: 2690530
Adding support for enabling ini config to remap reo destination rings
for HK v1, HK v2, maple and pine platforms.
Change-Id: Id9d304521f32497e3acd845ddd2973b96b641516
Fix static analysis issue of rx_refill_buf_ring buffer overflow.
rx_refill_buf_ring length is different for WIN/MCL. For MCL length is 1,
WIN is 3. So rx_refill_buf_ring should always use index pdev->lmac_id to
replenish rx buffer for different MACs under MCL.
Change-Id: I00af069c09c01a81ae4aa54bad5beb79dc6fcff5
CRs-Fixed: 2703683
Currently there is a single INI item tcp_udp_checksumoffload to enable
or disable this feature for all the adapters. In some cases, we want to
be able to enable this feature selectively for NAN mode.
Add nan_tcp_udp_checksumoffload ini item to enable or disable checksum
offload feature specifically for NAN mode. If
nan_tcp_udp_checksumoffload is 'true' and tcp_udp_checksumoffload is
false, hardware checksum offload will be enabled only for the NAN
adapter and not for other adapters.
CRs-Fixed: 2693638
Change-Id: I6e255ce68ddc7b01ebdefe4e5e8d2c985388fefe
Add logs in driver to log current memory footprint
in init functions. Add wlan_mem_stats to sysfs node
in both perf and defconfig builds.
The stats are included under MCL feature
DCONFIG_WLAN_SYSFS_MEM_STATS.
Change-Id: I79c6d418a5762cddf52ab3bc0b0c93993fa7fd84
CRs-Fixed: 2635192
Update connectivity related tx_host_fw_sent and
tx_ack_count stats on tx completion.
Change-Id: Id0143d934379d8831c58160aa357817c05fcbc71
CRs-Fixed: 2657703
Peer ref count incremented in dp_request_rx_hw_stats
is not decremented back in case of error scenarios
resulting in possible ref leak and failure in peer
deletion.
Fix is to invoke dp_peer_unref_delete for error
scenarios in dp_request_rx_hw_stats error.
Change-Id: I81ecf60a97ff5c804445fd713ed779c478df8521
CRs-Fixed: 2706596
In monitor mode buffer replenish ring is accessed without
getting initialized for configuring low threshold value.
Add check to avoid uninitialized srng pointer access.
Change-Id: If5dc98d4c1db939ef762749392ec42d46a4ae1f3
CRs-Fixed: 2704586
Configure low threshold for monitor ring only when monitor
vap is created. This is needed to avoid spurious low threshold
interrupts on monitor ring since the low threshold condition always
evaluates to true.
Change-Id: I452c0ada84e0a4f18e410c865d8a6a7f50329aef
Configure the client as isolated peer if part of isolation
list while creating/associating the node or adding the peer
to the isolation list.
Do not forward the packets to and from clients in isolation
list instead accelerate to upper stack.
CRs-Fixed: 2689868
Change-Id: I67fd4dee0fb76c993746cdd66c70c241d407239a
In lithium a peer will have only single peer_id hence remove
peer_ids array from dp_peer structure
Change-Id: Ib98270b7fd98f1199b862e4608f990687914b7cc
dp_srng_setup was split into dp_srng_alloc and
dp_srng_init as part of lithium DP init and de
init improvements but the debug prints remain
unchanged
Rectify mistakes in debug prints accordingly
to match dp_srng_alloc or dp_srng_init
CRs-Fixed: 2696952
Change-Id: If6c41ffe80006852f9ac308ce65ceee69736fcb9
Make the monitor ring low threshold to half of that of
MON_BUF_MIN_ENTRIES. This is needed so that spurious interrupts
because of reaching low threshold is avoided.
Change-Id: Idfc5dda2e96ad69bf35c3ab4f5cf81931104504e
In dp_vdev_detach_wifi3(), the vdev_id_map[vdev_id] set to
null is happened before dp_rx_vdev_detach(). but the call back
done by dp_rx_vdev_detach still need to get the vdev pointer by
vdev_id, it will return NULL by current logic.
Move vdev_id_map[vdev_id] null setting after dp_rx_vdev_detach().
Change-Id: Ibaf506cfef83d68a21033e67395c37f53aeb4489
CRs-Fixed: 2681712
Added support to configure TSO and REO descriptors as part
of new datapath init-deint enhancement for ipq5018 target.
Change-Id: Ic6878dafa99cb09d6e45cf2d69de76cac0fe35c1
Soc level exception descriptors limit is sent from FW in WMI service
ready TLV. Using that to check for exception packets limit
Change-Id: I99d20ecbb6a5bfd61b5a8a205775d34749eae880
In dp_peer_teardown avoid setting the delete in progress
flag only for AP bss peer
For STA bss peer as CP always allocated new peer for peer_create
set delete in progress in teardown
Change-Id: Id769678895a0953e731ce040399af7bddd4c373d
In case of driver unload, there can be a race condition
since the timer for processing monitor status ring can run
in parallel to the unload time wow ack response handler,
which is also flushing all the monitor status ring entries.
To avoid this race condition, stop the monitor reap timer
as a part of target suspend, and process all the outstanding
entries in the montior status ring.
This will make sure that the monitor status ring is
processed from only one context at any given time.
Change-Id: If61327c73fdddc414b3957b69ae986f2a26bb803
CRs-Fixed: 2677812
Add check for sg formation.
Only enable chfrag_cont and msdu_continuation if reo
error code is HAL_RX_WBM_ERR_SRC_REO or rxdma_err_code
is HAL_RXDMA_ERR_UNENCRYPTED.
Also chain all nbuf in case of sg in separate buffer
and finally loop through that. This is added because
sometime we dont get desc in sync with hw.
To avoid such mismatch, this buffer is added.
We will process nbuf only when all msdus has been
received.
Change-Id: I3b154a68955db61f3acaa0cb8d130c8918a3d450
CRs-Fixed: 2672126
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
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
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