Commit Graph

57 Commits

Author SHA1 Message Date
Kai Chen
a8cf59455e qcacmn: Add stats on OFDMA and MU-MIMO packet
Add MCS, NSS, MPDU FCS OK, MPDU FCS ERR stats
classified by SU, OFDMA and MU-MIMO.

Change-Id: I3ade03acc06bd924fdeb8dfcaf6b18fb01f01d68
2019-12-01 19:16:58 -08:00
Guisen Yang
17b5fed005 qcacmn: Change the print format for a size_t variable
A build error happens if "%lu" is applied to a size_t variable.
Change the format to "%zu" in dp_print_tso_stats().

Change-Id: Ib9e7ff5de91a8d5de091f8adae003f0ce0258acb
CRs-Fixed: 2560138
2019-11-18 00:45:58 -08:00
Nisha Menon
98c4dd401b qcacmn: Fix for SMMU fault on reo cmd desc address
Memory leak fixed in dp_rx_tid_delete_wifi3 in the case
where update cmd send fails. Add the desc to the front of
free desc list and set a flag to ensure that the update
cmd is resent from delete rx_tid callback. In the same
callback ensure that the update cmd desc is sent out first
and then proceed to free other descs by sending out the
flush cache cmd for each of those descs.

If the flush cache cmd is not sent successfully to REO,
add the REO descriptor back to the free desc list and
defer the deletion to the callback function. This update
is made under MCL feature flag REO_DESC_DEFER_FREE.

Add a soc level stat to indicate the reo send cmd failures.

Change-Id: I4e4cf47223d5325a53f2df22571895489d033ba3
CRs-Fixed: 2551028
2019-11-10 23:58:50 -08:00
Venkata Sharath Chandra Manchala
8a4812f7fc qcacmn: Enable TSO Stats for Lithium based products
Add support to account for TSO jumbo packets on the
Tx path and print the statistics using dumpStats 3.

Change-Id: I6cc446df5c84e3ac436d922935fcd559e0704ec5
CRs-Fixed: 2356244
2019-10-28 07:11:53 -07:00
Mohit Khanna
80002653b1 qcacmn: Check for ring approaching full during RX
Check if REO ring is near full at the end of dp_rx_process. In case the
ring is near full, reap the packets in the ring (and replenish, send to
upper layer) until the quota allows. Ignore the HIF yield time
limit in such cases.

This change is needed to prevent back pressure from the REO ring(in case
it gets full). Backpressure from REO ring (to LMAC) may lead to a
watchdog and eventually a FW crash. Hence, avoid such a scenario by
reaping as many packets as the 'quota' allows when the REO ring is in
aforementioned condition.

A sid-effect of this change would be that at times the RX softirq may run
longer (till the quota limit) than the configured HIF yield time.
However, this logic is not expected to kick-in in perf builds. The issue
is reported for a defconfig build where lots debug options are enabled
in the kernel which can slow the processing down.

Change-Id: I2eb6544c159ec5957d10386b1750fd96473fe13a
CRs-Fixed: 2540964
2019-10-23 12:04:39 -07:00
Pavankumar Nandeshwar
b86ddaf205 qcacmn: Handle wbm_internal_error in tx completions
Handle wbm_internal_error in tx completions by releasing
associated descriptors and buffers.

Change-Id: I94d334c90c0514674323430fe53da72fb5424576
2019-10-23 10:32:33 -07:00
Ruben Columbus
da4d1b37e3 qcacmn: tx completion handler with invalid release source
added stats counter to check invalid release reason other than
FW and TQM in tx completion path.
added assert to make sure host is not releasing descriptors with NULL
address.

Change-Id: I3a30bd0f0c3954ed6435489d9b21f16201d1b840
2019-09-29 04:50:13 -07:00
Mainak Sen
f3053eb1d1 qcacmn: Add fields for Tx TQM and FW exception drops
VoW stats should contain fields to count TQM and FW exception
drops

Change-Id: I71a81b8e9cc9428b5c727d77c0eeec5bb23a2b42
2019-09-09 07:08:34 -07:00
Tallapragada Kalyan
d92f598f75 qcacmn: Pass pdev to dp_peer_stats_notify API
Pass pdev to dp_peer_stats_notify API instead of de-referencing
this from peer structure.

Change-Id: I5dc679283f5822f44b4140aefb3aee44a826c720
CRs-Fixed: 2500647
2019-09-04 11:31:12 -07:00
Rakesh Pillai
836b6690cb qcacmn: reduce log level for mon status ring tlv-tag error
STATUS_DONE is missing sometimes in monitor status ring,
but logging for each entry in the ring increases the time
for which the hal_ring access lock is held. If there are
many entries in the monitor status ring, this can lead to
the hal ring access lock being held for too long and cause
inconsistencies.

Reduce the logging level of the tlv tag STATUS_DONE errors
and have a counter for the cases when this happens.

CRs-Fixed: 2502422
Change-Id: Ica77ce62bbe2c6b7691d638ac44ab0452dd2fd97
2019-08-27 20:59:22 -07:00
Mohit Khanna
c42d8036c9 qcacmn: Donot forward MDNS packets for NAN vdev
MDNS packets if forwarded for a NAN vdev can lead to potential flooding
of the air interface. Hence donot forward them.

Change-Id: Idfdedfb0b5b553745440587448230013f3b56a7d
CRs-Fixed: 2503360
2019-08-16 08:23:00 -07:00
Kai Chen
4b4e8b48cf qcacmn: change debug print and add ring stuck count
change debug print and add counter for monitor destination
ring stuck

Change-Id: I79b4d3b957303334717fd04bfddf754e303e69db
2019-08-16 08:22:57 -07:00
Sumeet Rao
c4fa4df717 qcacmn: Add a new feature to support tagging of IPv4/v6 flows
Tags are programmed using wlanconfig commands. Rx IPv4/v6
TCP/UDP packets matching a 5-tuple are tagged using HawkeyeV2 hardware.
Tags are populated in the skb->cb in the REO/exception/monitor data
path and sent to upper stack

CRs-Fixed: 2502311
Change-Id: I7c999e75fab43b6ecb6f9d9fd4b0351f0b9cfda8
2019-08-07 11:28:21 -07:00
nobelj
1453164d24 qcacmn: add per user RX stats in Rx PPDU struct
1)Add per user RX stats in Rx PPDU struct
2)Add per RU size counters in wifistats/iwpriv txrx_stats 10
3)Modified RX ppdu indication structure.

CRs-fixed: 2458732
Change-Id: Id8f3d6cce97503c0529642c4f5d66f3bbc59785d
2019-08-05 23:27:05 -07:00
nobelj
7b0e27336e qcacmn: Fix OFDMA stats counter
user info with delayed ba stats are stored and stats are updated later
on receiving BAR.

Change-Id: I574dd94d5a7db2160953b5d5d302eff18f4f8648
2019-08-05 16:46:06 -07:00
Prathyusha Guduri
abac9eedad qcacmn: Add tx sw internode queue ini config
Add tx sw internode queue ini config that is used by NSS offload mode

Change-Id: I8236a289aa33aaa6bfd1af2ff326438042636139
2019-07-29 04:31:13 -07:00
Prathyusha Guduri
aed67e197c qcacmn: Add tx device limit
Add tx device limit configurable from INI.
This is used to limit the overall tx descriptors used in the device

Change-Id: I51e9611ca14bdc146de914317b38b98329130c9f
2019-07-29 04:31:05 -07:00
Prathyusha Guduri
36ce817b7e qcacmn: Add dp_tx_desc_limits ini config
Add dp_tx_desc_limit for 5G high, 2G and 5G low to limit the
number of software tx_desc to be allocated.

Change-Id: If97e858b73aafaed0e21fc8f6e0337e467ce0ecc
2019-07-29 04:31:01 -07:00
Yue Ma
e92fe029df qcacmn: Do runtime pm sync resume when printing ring stats
Printing ring stats from requesting txrx stats needs access PCIe link
so make sure it is resumed by doing a sync resume if it is runtime PM
suspended. Also response of h2t_ext_stats_msg from FW is not guaranteed
so tag it properly so that in HTC layer, corresponding "put" API will
be called right after sending the packet.

Change-Id: Idc5797b38557ed5779d920c72200b9d28769ab58
CRs-fixed: 2487521
2019-07-27 18:21:26 -07:00
Surya Prakash Raajen
9a4f2c0ab3 qcacmn: Modify rssi_in_dbm's format specifier in print
Rssi_in_dbm has incorrect format specifier due to which
it returned large values,change it to correct specifier.

Change-Id: I06426e36b6abf5b915d039dfea8afd5d3aa06195
CRs-Fixed: 2490087
2019-07-25 11:03:24 -07:00
Shashikala Prabhu
0843438590 qcacmn: Use correct skb headroom size to update radiotap header
Size of rx_pkt_hdr tlv structure is used to check if there is enough
space in the SKB to add radiotap header.
The issue is seen due to a single SKB can hold the multiple TLVs and
the next subsequent SKB has the data. In this case, there is no headroom
available in the second SKB. Therefore crash seen while adding the
radiotap header in the second SKB.

To fix this issue, check if the SKB has enough headroom space. If not,
drop the frame.

Change-Id: Icd11f946c0aee974dde2ef21f59cfe3d8b87fa5d
CRs-Fixed: 2480719
2019-07-23 11:59:42 -07:00
Jinwei Chen
9d3f985a8d qcacmn: deliver RX data to stack evev if no peer found
Deliver RX data to stack even if no peer found, this is
needed for LFR roaming case like eapol data.

Change-Id: Ic81f29993fb4542847bd076042a13de6e9f18173
CRs-Fixed: 2468082
2019-07-19 02:48:23 -07:00
Jinwei Chen
63705259d2 qcacmn: fix dp_rx_defrag_add_last_frag peer tid array invalid access
In some case, HW will fill in unexpected peer_id into RX PKT TLV,
if this peer_id related peer is valid by coincidence, but actually
this peer won't do dp_peer_rx_init(like SAP Vdev self peer),
then invalid accessing to peer rx tid will happen.

do SW WAR that add checking about peer tid array, if not initialed,
free the rx nbuf.

Change-Id: Icf196b4f92eb341e1ace5128c681d24c41dff6cd
CRs-Fixed: 2468537
2019-07-08 08:48:31 -07:00
Chaitanya Kiran Godavarthi
8c880d3fd2 qcacmn: Handle AP and STA Tx stats separately
AP and STA stats need to be handled separately.

Change-Id: I105856d6d4ee39a116966eb3ff47775b54f08ef4
2019-07-01 22:30:58 -07:00
Mainak Sen
95101bb281 qcacmn: Remove CONFIG_WIN flag for VoW stats
Use V3_STATS_ENABLED flag instead of CONFIG_WIN

Change-Id: I1559d67f005c4cba2472970ea3bd49826c16a047
2019-06-20 14:45:24 -07:00
Mohit Khanna
3ba9372a50 qcacmn: Fix invalid sa_da_idx condition in RX path
Currenly this function, is_sa_da_idx_valid(), called from dp_rx_process
does not take MC/BC packets into account. For broadcast packets e.g.
DHCP offer packets from some APs, this check may fail (incorrectly).
Thus dropping the broadcast packet, when it should have been passed
on to the stack.

Fix is_sa_da_idx_valid function by taking MC/BC packets into account.

Change-Id: Ibbb34134e997e0d5394dfa654be84b9fa43434a3
CRs-Fixed: 2466839
2019-06-15 20:55:03 -07:00
Mainak Sen
7258660417 qcacmn: Disable print FW Dropped byte in offload
Disable printing TX FW remove byte counter for NSS offload mode

Change-Id: I44cd80a4d07082f91cfdbfff9a9bc94d4c31bb86
2019-06-14 10:21:10 -07:00
Akshay Kosigi
fb0877f2d6 qcacmn: Use module specific kbuilds for config params
write module specific macros inside module/config and
use these inc files inside the kbuild of the module using those
macros.

Change-Id: Ide18770973f35d0e5c45e2474b24256107f40d8c
2019-06-12 20:04:12 -07:00
Ankit Kumar
2972a24c55 qcacmn: Ignore raw frame if is not of type Data
Non raw traffic gets enqueued to VAP in raw mode
and incorrect fc.type causes HW fault.
Lets proceed only if raw frame is of type data.

Change-Id: I9f0d608cd1b319feb9af642969b258aab813645f
CRs-Fixed: 2434391
2019-06-04 02:42:23 -07:00
Varsha Mishra
1f4cfb6c58 qcacmn: Fix tx completion and rx stats per wbm/reo ring
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
2019-05-31 07:40:18 -07:00
Chaithanya Garrepalli
d3d99db55b qcacmn: changes to read all MSDUs of MPDU in single reap
We need to read all MSDUs of MPDU in single reap for RAW mode
to prepare the complete SG list

Change-Id: Iaf2d0b9f32bf10181ce7646bf60c4d7e70aed36b
CRs-fixed: 2320143
2019-05-22 09:06:22 -07:00
Venkata Sharath Chandra Manchala
c61826c476 qcacmn: Cleanup statistics
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
2019-05-20 20:53:27 -07:00
Pranita Solanke
05862964ab qcacmn: Identify WIN/MCC specific features
Identify the WIN/MCC specific features. Move the features under feature
specific flags. Get rid of WIN/MCC specific code.

Change-Id: Iaf4e5befd7d574a20bea5c078201adbeac3b762c
2019-05-20 09:58:47 -07:00
Venkata Sharath Chandra Manchala
bedc0cd113 qcacmn: Move statistics to dp_stats file
Move dump_stats API to dp_stats.c file.

Change-Id: I7cc3f438c58bb8e2521b7042472dd8436f513e58
CRs-Fixed: 2451204
2019-05-14 18:39:54 -07:00
nobelj
debe2b3b9c qcacmn: support enhance TX capture
support TX capture mode to deliver msdu along with meta data.

Change-Id: Ic84416cc4892e37bfb831dada136a4ff6b615a61
2019-05-10 12:39:30 -07:00
Venkata Sharath Chandra Manchala
3dfc614c3e qcacmn: Reduce trace level for stats
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
2019-05-06 10:44:11 -07:00
Venkata Sharath Chandra Manchala
766b69acf5 qcacmn: Print OFDMA rate stats from firmware
Print OFDMA tx and rx rate stats received
from firmware as part of txrx_stats 9.

Change-Id: I081016480bdb0d161e33be7ee789497c43ad6cc0
CRs-Fixed: 2415731
2019-04-19 04:09:07 -07:00
Mohit Khanna
3d1e1b7602 qcacmn: Prevent rate stats from printing in kmsg
Do not print rate statistics on the console or kernel logs. Excessive
logging in kernel messages can lead to kernel panic.

Change DP_PRINT_STATS to not print in kernel logs.

Note that this is an interim solution. Ideally these prints from DP
module should be QDF_TRACE_LEVEL_DEBUG and logged to QXDM. Currently
DEBUG trace level is disabled for DP module.

Change-Id: I54af98eda0dd4ea53ae20f25ced6b03287d8b4e4
CRs-Fixed: 2414635
2019-03-24 12:58:12 -07:00
Shashikala Prabhu
550e69c726 qcacmn: Restrict the tx descriptors for low mem config
For low mem config, use user configured max tx descriptors to limit the
allocation of software tx descriptors.

Use dp_txrx_pflow_update_pdev_params function to print stats and to update
pdev param.

Change-Id: I8fa6f0bb8841de68e8dc205ffcb0fde264f1b0e0
CRs-Fixed: 2414452
2019-03-15 23:15:06 -07:00
Varsha Mishra
3e9d647162 qcacmn: Fixing display of Vow Stats
Adding more fields to vow stats display function.

Change-Id: Ic5227e994e55c0ebc99351051d5b409ba0c3f627
2019-03-15 23:15:02 -07:00
Mainak Sen
2e43fb26f0 qcacmn: Add support for displaying TID statistics
Framework is added to print per TID Video and delay statistics
Change-Id: Icdf825d0b90b6c698d20d80a16a65b11f4e385a0
2019-03-08 07:39:38 -08:00
Aditya Sathish
821e61be5e qcacmn: Replace %d specifier to %u for unsigned int variables
Replace %d specifier to %u for unsigned int variables in stats
outputs.

Previously, %d would cause uint32_t values to roll over to
negative values.

CRs-Fixed: 2402160
Change-Id: I3d3c02ac44a38d311e8e8e0e933af79f362f42b7
2019-02-25 14:14:23 -08:00
hangtian
fe681a5c2d qcacmn: Use qdf_mem_zero for zero initialization, dp part
Use qdf_mem_zero for zero initialization, dp part.

Change-Id: I8cd5d43b554bf355dfcff0463ba4acb6d22ba254
CRs-Fixed: 2378005
2019-02-21 01:46:39 -08:00
Jeffin Mammen
a6c50bd74e qcacmn: Send RSSI of the last ack to SON module
Send the RSSI of the last ack received to SON module.

Change-Id: I08d362676b4831beac36356fac332c379853ad99
CRs-Fixed: 2393401
2019-02-13 06:43:43 -08:00
Amir Patel
1ea85d4671 qcacmn: Add support for STA inactive time in Hawkeye
Currently there is not STA inactive time support for lithium.
Read inactive_time from htt_peer_stats_cmn_tlv by sending
HTT_DBG_EXT_STATS_PEER_INFO to firmware.
After sending command, wait on completion variable till
firmware to response, trigger completion upon firmware response.

CRs-Fixed: 2319219
Change-Id: I93e6343641ae5c72610a57dd6ba551cca0b010c1
2019-02-09 11:52:40 -08:00
Amir Patel
4cf16d6d96 qcacmn: Fix tx_stbc stat print issue
set str_buf index to zero before parsing stbc stats from tlv

CRs-Fixed: 2354728
Change-Id: I9100a762a1f40e0ef2fc76ad4a9286b4002a9a82
2018-12-03 04:15:15 -08:00
Chaithanya Garrepalli
32fcc2a194 qcacmn: add MU stats support in txrx_stats
Add support for MU stats in txrx_stats from
wifistats

Change-Id: I248d3bdf8ef49bbf68675f3b765faec6d405d5ea
CRs-fixed: 2298079
2018-10-16 06:25:35 -07:00
Aditya Sathish
ded018e406 qcacmn: Clean up dp component prints
Clean up datapath component prints by correcting trace levels for
regularly occurring prints and removing newlines from converged
print APIs since qdf_trace_msh appends them by default.

Change-Id: Ie8fe319fcb737720f7400a165e134b6a18bd15b5
CRs-Fixed: 2243843
2018-08-10 18:11:21 -07:00
Amir Patel
52c6b73468 qcacmn: Notify peer stats change to upper layer
Notify peer stats change to upper layer via WDI interface.

Change-Id: I4b9ea3ed98ba09b4afc03e3c3edc42ab9c9f3cba
CRs-Fixed: 2287145
2018-08-06 04:21:34 -07:00
Venkata Sharath Chandra Manchala
e37bc4601e qcacmn: Add stats counters to account for Error packets
Retrieve length from every htt msg to
parse the tlv's from the htt msg and also
add statistics counters to account for error
packets in Rx path.

Change-Id: I17105174734975dc0d5093c587697346a8ada725
CRs-Fixed: 2214594
2018-04-11 09:15:22 -07:00