Free the Rx descriptors pool if there is a failure
in allocating memory for nbuf during
dp_pdev_rx_buffers_attach()
Change-Id: If4fcfcfdc2fe70c8c4753518ca020a7d8b0bd2b5
CRs-Fixed: 2464596
write module specific macros inside module/config and
use these inc files inside the kbuild of the module using those
macros.
Change-Id: Ide18770973f35d0e5c45e2474b24256107f40d8c
Add CDP support to update vdev stats from the higher
layers.
The CDP API takes a buffer which is then used to
update parts the cdp_vdev_stats structure depending
on the stats ID that is sent through the API.
This change adds support for vdev tx ingress stats
only. Extended support can be added as required
by adding a new stats ID.
Change-Id: I13d6fb946c8a3dbb0b499b7b026d83b080411d15
CRs-Fixed: 2384177
current Soc RX defrag lock create/destroy flow as below:
1. dp_soc_attach_wifi3
2. dp_pdev_attach_wifi3-->dp_soc_cmn_setup-->RX defrag lock create
3. dp_pdev_detach_wifi3 (no RX defrag lock detroy)
4. dp_soc_detach_wifi3 --->RX defrag lock destroy
here if step2 is skipped for some failure case, step4 will still
try to destroy RX defrag lock, panic happened.
add dp_soc_cmn_cleanup() function in step3, move RX defrag lock
destroy from step4 to step3 dp_pdev_detach_wifi3-->
dp_soc_cmn_cleanup, also move others like reo cmd lock, tx flow
control related lock.
Change-Id: Ic77ddf21e9cefc6d6b747aaad227c732fa2ae2c4
CRs-Fixed: 2447701
Currently the failure in dp_rx_pdev_mon_attach, during
dp_pdev_attach_wifi3, does not cleanup the rx buffers
and hence that memory is leaked.
Follow the proper cleanup sequence to avoid leaking
the rx buffer memory.
CRs-Fixed: 2451982
Change-Id: Idef308e11c46fe3e7ae9199a6fcf05ca83210b6b
Tx completion stats should be counted per wbm ring on tx completion
and not globally. Similarly, rx stats should be counter per reo ring.
Change-Id: I1e4af0d38b23e60de78ca03316861db08ff0811a
For MDM platforms, set default REO destination
ring to SW4 for STA vdev, which is same as SAP vdev.
Note that RX hashing is still enabled for STA vdev.
Also REO destination are run-time remapped when IPA
automony is enabled and disabled.
Change-Id: I49fa523673e7b736008679adec55821e198e8417
CRs-Fixed: 2456786
Move WDS feature specific APIs out of common code
as these features are WIN specific. Keep the usage inside
common code under feature specific flags.
Change-Id: Id907a5e22c27fc47e8314449e154525684a27e85
Add support to configure any HAL SRNG descriptor to
be allocated from cached memory area. This is to
optimize of CPU cycles spent on uncached
memory accesses. Also added prefetch of cached
descriptors
Change-Id: I2544e8596d48e2f5549bf687a764c16d73397545
CRs-fixed: 2267945
Peer delete request and response stats has been moved to per vap
stats. The time info on assoc, disassoc and deauth was already
cleaned up, but members in the dp_peer struct weren't removed.
Change-Id: Ie4a1b171178d8ad03abd76069cc0777802814993
CRs-Fixed: 2451766
For HTT PPDU Stats TLVs, if target has provided less data than expected,
pad the data with zeros until it matches the expected length and
process the TLV, instead of asserting.
This enables testing of different FW and Host versions during regression
analysis.
CRs-Fixed: 2451611
Change-Id: I79aaad8a6fde6d49510c3a212b21425ac784ad5c
Free the memory allocated for the pdev configuration parameters
during pdev detach so that there are no memory leaks
Change-Id: I856cc6e6082197e98ad105053f1e4cffc2d25c53
CRs-Fixed: 2444000
Allocate memory in multiple smaller chunks for dp_rx_desc_pool_alloc,
and link the pages instead of allocating one big contiguous memory to
avoid memory allocation failures.
Change-Id: Id81de10727555c4ca78963a6f01ed3b992ce9924
CRs-Fixed: 2443999
Currently cached rx buffer frames are forwarded to stack
at the time of successful association completion. If the
association with the AP is unsuccessful frames are not
flushed and this leads to memory leak. To fix this clear
the cached buffers at the time of peer deletion.
Change-Id: Icec36376f9588dba8114f855ac9719b5735512e8
CRs-Fixed: 2452030
1. Move statistics API's to dp_stats.c
2. Move DP_TRACE_STATS to DP_PRINT_STATS
as it is implemented based on target.
Change-Id: I62f3076a51ca35f0e12cdb0ff0230ea87c2baaf7
CRs-Fixed: 2453443
1. Set BSS peer for AP during peer-create and for STA in peer-map handler
2. Set Self peer in STA mode
3. Avoid tid cleanup in STA mode
4. Remove redundant selfmac checks in Rx
5. In MEC event handler add a check to ignore MEC events
when STA is not connected.
Change-Id: I2a34b4742d9dedaa0709c1f4c87f3a06b794f36b
To avoid higher order allocations, allocate extra
bytes for base address alignment only if unaligned
address is returned.
Change-Id: I185e58150952cd7e1ae0039e4382973465de5f68
If there's a HW duplicate rx descriptor from hardware,
it'll cause a NULL pointer issue in
__dma_inv_range in dp_rxdma_err_process.
In this case, skip procssing it as a workaround.
CRs-Fixed: 2398327
Change-Id: I5639e5fc9a3a06e6762448ec7cb2ea58d9ae8160
Move WIN specific structures out of common datapath, WDI_ENUM
into common datapath and remove WIN specific header files inclusion
Change-Id: I8a0d9db4970f3ea9d966337caf178ebce55c28c5
The following changes are made
-Yield dp_rx_process if poll time exceeds
-Yield dp_tx_comp_handler if poll time exceeds
-Interrupt statistics to track various interrupt contexts and
corresponding interrupt masks
-Add poll times histogram buckets to NAPI stats
Change-Id: I8c7a6bbbb97c7b3dd1dde6ac3a97113c433086a2
CRs-Fixed: 2423879
Deadlock happens when control path takes scn_lock and calls
dp_peer_unref_delete() which in tern tries to acquire peer_ref_mutex.
At the same time, if other core starts handling peer_unmap by acquiring
peer_ref_mutex and calls dp_reset_and_release_peer_mem() which in turn
calls ol_ath_node_free() and tries to acquire scn_lock leading to a
deadlock.
Fix this by unlocking peer_ref_mutex before calling
dp_reset_and_release_peer_mem().
Change-Id: I343a8ef8f0914f9245a06b2818c9cbbe1db5218f
CRs-Fixed: 2449878
Track PPDU Id history from monitor status and destination
rings, and display as part of monitor stats.
Change-Id: I7b8985f93b1cdb6eb5210bba5a65e9bfb617a710
1. Reduce trace level of stats from fatal to info_high
2. Move stats APIs to dp_stats.c
Change-Id: I0b27a254075610fbbafcc8b09b72403ccb83473a
CRs-Fixed: 2446189
1) Add one counter to track the invaild TX release source
2) Capture he descriptor that caused the issue
3) Print the invalid release source
CRs-Fixed: 2380964
Change-Id: I0dc410ae2e7c9df58ef53e3f20ca7979d086659e
Peer stats struct members initial value 0, so when other functions call
to update peer stats have 0 rssi value which updates mininum
rssi since its the least value. So initialize the rssi with invalid
value initially
Change-Id: Ife033598c7ac47a9a26595f97bff058570d3e91f
CRs-Fixed: 2403735
Add target specific HW header for ipq6018 compilation.
Remove the 8074 header dependencies for 6018 compilation.
Change-Id: I8e45e3e039a4596c6722538405dcd381918fa6b1
CCE stats are reported across rings today. Since HKv2 is a SMP, it
creates the possibility of missing stats when two or more CPUs are
updating the counters for the same protocol type. In order to avoid
this, we can either use locks or store stats on a per-CPU basis.
Since tagging happens on the core data path, locks are not preferred.
Instead, we use a per-ring counter, since each CPU operates on a REO
ring. Exception packets today go to Ring-0 (also normal rx Reo-0
go to Ring-0). Hence tags are maintained separately for exception
ring as well.
Change-Id: Ib01934619fb026bf64a8ac998eaec2d4df7f5a6e
CRs-Fixed: 2438143
Observed that when IPA offload is enabled, RX packets
are not routed correctly to IPA ring. Currently only
IX0 of REO_DESTINATION_CTRL_IX registers are remapped,
which only covers 3-bit reo_destination_indication of
range 0 to 7.
Fix is to remap REO_DESTINATION_CTRL_IX2|3 registers
so that reo_destination_indication of range 16 to
31 can also be routed REO2IPA ring when IPA offload
is enabled. Upon IPA offload is disabled, save values
of IX2 and IX3 are reset back to HW.
Change-Id: I3428b450ab10076d27c7628a3729e8cec088bd94
CRs-Fixed: 2434331
Deadlock happens when control path takes scn_lock and calls
cdp_peer_delete() which in turn tries to acquire vdev_list_lock.
If other core starts handling peer_unmap and holds vdev_list_lock
and tries to releases reference of control peer, which in turn
tries to acquire scn_lock leading to deadlock.
Pass vdev object intead of vdev id to dp_reset_and_release_peer_mem
which will avoid need for vdev_list_lock and fix thhis deadlock.
Change-Id: I805bb4958b9b5ec4b29d70ba67e7410572201a60
CRs-Fixed: 2426717
Add a sanity check to avoid sending a htt
txrx_stats request with an invalid mac_id
parameter to firmware.
Change-Id: Iae980bbffdcf6759b6d467849c5ebc65628f17ba
Crs-Fixed: 2438693
Currently frames will be dropped if it arrives before
peer is registered with data path module by control path.
So cache rx frames and flush them to the upper layer when
peer is registered at data path.
Change-Id: I086122fffdcf33e25ba57774ef944550cdd2fa20
CRs-Fixed: 2329308
With this feature, using appropriate commands, link layer, network layer,
transport layer and some of the application protocols can be tagged with
the user provided tag values for easier identification of protocols. The
supported protocols today are as follows.
ARP, DHCPv4, DHCPv6, DNS over TCP (v4), DNS over TCP (v6), DNS over UDP
(v4), DNS over UDP (v6), ICMPv4, ICMPv6, TCPv4, TCPv6, UDPv4,
UDPv6, IPv4, IPv6, EAP.
Receive packets are tagged by hardware. Tags are applied after the first
matching rule. Hence it is recommended that the rules are
programmed in such a way that tags are configured from application layer
to data link layer to get expected results.
Change-Id: Ibdc2bd2b78234f482074955e89fb93f05988eaca
FW assigns the pdev_id to lmac_id mapping for each platform(HK, CYP, etc).
This information is passed on to host via WMI_MAC_PHY_CAPABILITIES tlv.
Instead of hard-coding the mapping again in host, use the info sent by FW.
Change-Id: I01ad81e97a1b4aa1f0fea3951f6e8285a0f0c039
Currently we are upadting sojourn stats for all tid.
but rate stats maintains stats for only data tids 0-7.
updating stats for tid value exceeding 7 is leading it to
assert.
Update correct tx rate, rx rate and sojourn stats.
Change-Id: Ib2f5791aa7b8e85aac6283c46f58ce7e821a559b
CRs-Fixed: 2428648 2429575 2429575
Support WDI 3.0 SW path intra-bss forwarding. Major
difference for WDI 3.0 is the metadata info passed
from ipa driver in skb->cb[].
Previously intra-bss fwd decision is done by FW and
it passes fw_desc to IPA where IPA driver passes onto
WLAN driver. Now for WDI 3.0, FW is not involved in RX
path and SW path intra-bss fwd decision has to be done
in wlan driver.
Change-Id: Ibc2246620490905fd992a2df31cc6f241cc63592
CRs-Fixed: 2432831
Currently vdev deletion happens as a part of last
peer's unma and vdev creation happens in a different context invoked
by the upper layer in dp_vdev_attach_wifi3.
In a scenario when the old vdev is being deleted and a new one is being
created, with the same vdev id (e.g. P2p -> SAP transition), its
possible that the old and new vdevs co-exist in the pdev->vdev_list
at the same time. In such a case, the API (get_vdev_from_vdev_id) can
return the old stale vdev, even when a new vdev has been created. This
is not the expected behaviour.
Check for "delete.pending" flag before returning the vdev. If the flag
is set, skip that vdev.
Change some logging to dp_ logging functions.
CRs-Fixed: 2432430
Change-Id: Icadd84059dfbab12910678e5b24007010c15b6a8
Add a CDP function which processes the peer delete response
and deletes the static ast entry for the peer
Change-Id: Id646979ed07bd82609ca08e7ef3201382d07b1de
CRs-fixed: 2385115
Count of MSDUs Tx with AMPDU aggregation and
MSDUs without AMPDU aggregation is maintained. This
count is obtained from per ppdu stats.
Change-Id: I7c38846534bbe5f2fd0a9b3602a9d453e1c1f449
Add support to measure interrupt latencies, store them
in different "bins" and display the constructed histogram
through user command.
Change-Id: I268be6b39745d550ac7db5d321c2d1fdb2d17d41
CRs-Fixed: 2365812
In some cases, the msdu_len as retrieved fromm msdu_start TLV is
greater than RX_BUFFER_SIZE. In such cases, when qdf_nbuf_set_pktlen
is called, it will expand the skb to accommodate the bigger packet.
This makes the rx_tlv_hdr var invalid, since it continues to point to
the older skb->data. Access of this rx_tlv_hdr will cause exception.
Drop the packet if msdu_len > RX_BUFFER_SIZE. This is not expected while
reaping WBM RX Release ring.
Change-Id: I60890e4d3ee0afa451884d4df458eb50be280280
CRs-Fixed: 2426245
Filter out data packets from mon destination
ring in m_copy mode as we already receive
first 100 bytes of data in mon status ring
Change-Id: I09321aa42b850d7b3cdc0bda4c7c51f79a6f850e