Commit Graph

221 Commits

Author SHA1 Message Date
Jeevan Kukkalli
d6a41c39a8 qcacmn: Reduce log level to avoid excess prints
Reduce log level to avoid excess prints on
console.

Change-Id: I0b3390af2f93a6930df9cfba17cd246d3dfc193c
CRs-Fixed: 3239664
2022-07-18 19:23:13 -07:00
Amrit Sahai
9ea6f8dc13 qcacmn: Add support for rx stats from REO block
Add support for rx stats from REO block in IPA use case.

Change-Id: I90a6f57507838645dea9095615f378bd5a3a6ffc
CRs-Fixed: 3231322
2022-07-18 17:45:10 -07:00
Amir Patel
09ae481644 qcacmn: Use page_frag_cache to avoid fragmentation
Use page_frag_cache to avoid memory fragmentation
in WKK RxMON

CRs-Fixed: 3234833
Change-Id: I2e42a41999694a91b0f3f9386a1ad0c691bf5caf
2022-07-15 05:01:37 -07:00
Amrit Sahai
7cc4edf06c qcacmn: Add support for TX stats in IPA use case
Add support for TX stats in IPA use case

Change-Id: Ie7d2c6d27219c49dc09bcacc65851b0c37fc337e
CRs-Fixed: 3231035
2022-07-15 02:56:18 -07:00
Shwetha G K
2c87e51684 qcacmn: Apply CFR filter on top of default config
Changes to fetch the default monitor ring config and then
apply CFR filter settings on top of it instead of overwriting
the default one.

CRs-Fixed: 3241818
Change-Id: I7b9d1c9560fd665e0f6418176e6dd3642450442f
2022-07-14 14:49:01 -07:00
Harsh Kumar Bijlani
82708b0aab qcacmn: Use static memory for ppdu_info in Rx monitor
a. to avoid dynamic memory allocation of ppdu_info per-pkt path
which is leading fragmentation, use statically  allocated
ppdu_info.
b. Disable rxmon workqueue processing as statically allocated
ppdu_info is being used.

Change-Id: Idbcd49863954582349900a414bb1aa80f68aab72
CRs-Fixed: 3239974
2022-07-12 08:56:49 -07:00
Nandha Kishore Easwaran
bd880419d7 qcacmn: Set only required dtlvs and utlvs
Subscribe only for the required downstream and upstream tlvs instead
of subscribing for all the tlvs. Also set only the required word mask
configuration

Change-Id: I998d0bf3b331bf2d5227bbba4b5962bcba80a2e5
CRs-Fixed: 3238211
2022-07-12 02:30:56 -07:00
Harsh Kumar Bijlani
836a658783 qcacmn: Return failure when mpdu is NULL
Return failure when mpdu is NULL

Change-Id: Ie4d27e5bdb8bc56d869ad10628deeacd51ecc605
CRs-Fixed: 3235962
2022-07-09 12:33:44 -07:00
Harsh Kumar Bijlani
eb56570ae1 Revert "qcacmn: Use qdf flex mem to allocate rx ppdu info"
This reverts commit I2318f6c5f33e5337f6398263d6717da698be7c92.

Change-Id: Ia60fe6ddb66623761c11398d89d6039c66994b66
CRs-Fixed: 3235962
2022-07-08 19:47:28 +05:30
Harsh Kumar Bijlani
1f40cb6ec2 Revert "qcacmn: Initialize ppdu info flex mem pool during pdev attach"
This reverts commit I7970ab056e600ccfe28ae1ccdc50a66d5ae0ade8.

Change-Id: I1837ddb8840a4f567890991d41fbeb78d8d8e0de
CRs-Fixed: 3235962
2022-07-08 19:06:06 +05:30
KARTHIK KUMAR T
0365423471 qcacmn: update RSSI specific parameters in mon pdev
Update RSSI specific parameter from beryllium
specific path to common path as part of
extending feature for lithium also.
RSSI calibration parameters are received as part
of WMI event from FW, update these parameters to
monitor pdev via CDP interface.

Change-Id: I4e35d873db6d1ad03d86694a8d36decffe409a0e
CRs-Fixed: 3231120
2022-07-08 01:20:55 -07:00
Amir Patel
e7422a7db6 qcacmn: Initialize ppdu info flex mem pool during pdev attach
To avoid memory fragmentation during wifi down/up,
initialize ppdu info flex mem pool during pdev attach
instead of pdev init.

CRs-Fixed: 3235962
Change-Id: I7970ab056e600ccfe28ae1ccdc50a66d5ae0ade8
2022-07-07 02:38:25 -07:00
Jeevan Kukkalli
e0231b2771 qcacmn: Handle invalid decap type during rx mon tlv processing
- Handle scenario where decap type may be invalid when
  buff address tlv is received.
- Add check for min number of frags during restitch process.
- Minor fixes during rx mon tlv processing.

Change-Id: I0120d97e297701362183189e29c1d5df91affdc1
CRs-Fixed: 3216050
2022-07-06 01:02:13 -07:00
Shwetha G K
56d67b3e32 qcacmn: Configure monitor ring for CFR on Waikiki
Changes to configure the rxdma ring for CFR. Move existing
API of legacy chipsets to dp_mon_1.0 and add Waikiki
specific API in dp_mon_2.0.

CRs-Fixed: 3231265
Change-Id: Id7276bb7bb7f58461c7e10a0695c3e78a1c39b0c
2022-07-05 03:18:57 -07:00
Amir Patel
e8e39b89fc qcacmn: Set RX_HDR TLV length to 64 for monitor mode
Current RX_HDR length for monitor mode is 128,
Set RX_HDR TLV length to 64.

CRs-Fixed: 3234813
Change-Id: If0c1caf1ca29a8417c7e816c83dbff9e580347b2
2022-07-04 10:16:23 -07:00
Amir Patel
59b643e25f qcacmn: Use qdf flex mem to allocate rx ppdu info
To avoid fragmentation, use qdf flex mem framework
to allocate rx ppdu info

CRs-Fixed: 3230970
Change-Id: I2318f6c5f33e5337f6398263d6717da698be7c92
2022-07-04 01:14:15 -07:00
Nandha Kishore Easwaran
5f4c385251 qcacmn: Subtype filtering for selfen frames
Add subtype filtering support for self gen frames in
tx monitor.

Change-Id: I6bd81a4f096d9e23b6c01f4bb421443ac86a87fa
CRs-Fixed: 3230710
2022-07-03 23:25:00 -07:00
Srinivas Girigowda
6d056b9959 qcacmn: Add support for Mango device id
Add support for Mango device id.

Change-Id: I2b32a39e258caab408723db77f132af364dc6b04
CRs-Fixed: 3232512
2022-07-02 09:55:56 -07:00
Rakesh Pillai
d5536dade3 qcacmn: Add history to track monitor status buffer
Add history to track the monitor status buffer entry.
Currently the below 3 events are added:
- Monitor status buffer reap from ring
- Buffer enqueue to a local list
- Buffer dequeue from local list for parsing.

Change-Id: I7c17070ffee25a9a9dc4af0b48bfa8808e18887d
CRs-Fixed: 3225647
2022-07-01 16:24:22 -07:00
Nandha Kishore Easwaran
8dd2d4f808 qcacmn: Fill up the lite monitor vdev
Fill up the lite monitor vdev which is needed to deliver the
tx monitor frames to the configured vap.

Change-Id: I298abde095fef44e67a741f48f2f73a6998efc7a
CRs-Fixed: 3226335
2022-06-30 10:54:40 -07:00
Jeevan Kukkalli
61279b8b22 qcacmn: Properly increment msg word during rx tlv filter config
Properly increment message word variable while forming rx ring
selection config htt message. Message word should point to
appropriate word before calling individual feature config funcs,
this will help to track exact message word position in calling
function.

Change-Id: Iad6c446ac91fdb5be9286f4fa076847e1728dc74
CRs-Fixed: 3219549
2022-06-29 18:53:46 -07:00
Amir Patel
debe4c7ecf qcacmn: Fix issues from monitor path
a. Fix memleak issue due to RX_HDR not received for a MPDU
b. Compute appropriate packet offset for non-decapped packets
c. Add correct DMA_LEN while adding a frag to SKB.
d. Add debug stats

Change-Id: Ie946f79df94df05789220b97c159c60d608bf1b2
CRs-Fixed: 3213698
2022-06-28 12:17:51 -07:00
Wu Gao
cd9a1b63a3 qcacmn: Fix compilation issue after enabled CONFIG_WDI_EVENT_ENABLE
This change fixed compilation issue when enabled two configures -
CONFIG_WDI_EVENT_ENABLE and CONFIG_REMOVE_PKT_LOG.

Change-Id: I121ea61bd3681b834a36c0bc8017b855897023a4
CRs-Fixed: 3223552
2022-06-25 03:03:44 -07:00
Tiger Yu
89e38bb46b qcacmn: Remove unused local variable mon_soc to fix compiling issue
Remove unused local variable mon_soc in the dp_pktlogmod_exit to
address the compiling issue when PKT log enabled.

Change-Id: I5de03433603988e6f8125285a58c141551d7a149
CRs-Fixed: 3225370
2022-06-24 02:07:12 -07:00
nobelj
9ed0445e60 qcacmn: tx monitor add support for hw generated response
tx monitor add support for hw generated response

Change-Id: I5e2cd1420051e940f9276e07e7da6ca539dd0d5a
CRs-Fixed: 3205855
2022-06-23 18:01:14 -07:00
Himanshu Batra
b11cdd3210 qcacmn: Resolve static analysis issue in BE monitor path
Resolve static analysis issue in BE monitor path

Change-Id: I8db589de1a8b80ec35e6135a5c84c9d45785741d
CRs-Fixed: 3214297
2022-06-23 05:17:25 -07:00
Himanshu Batra
99dbc9ca4b qcacmn: Update peer consumption stats before checking primary peer
In case of MLO, peer consumpiton stats are getting incremented only for
primary peer as the API was called after primary peer check.
Add fix to call the API before primary peer check so that the stats are
updated for all the link peers

Change-Id: I603e7a37564858e030d8f0f5f16792f516728f60
CRs-Fixed: 3222984
2022-06-19 21:17:17 -07:00
Nandha Kishore Easwaran
debafd9b7b qcacmn: Add subtype filtering support
Add subtype filtering support for tx lite monitor.

Change-Id: I330f98abdfad3b9134f824b794a016dbd46696be
CRs-Fixed: 3219324
2022-06-16 09:15:21 -07:00
Nandha Kishore Easwaran
362d0e1ef1 qcacmn: Check lite monitor condition in handler
Check lite monitor condition in Tx monitor handler function
and correspondingly take action to deliver the packets.

Change-Id: Idf352bd677f00daae0c8e4325ff6661c7a4f854b
CRs-Fixed: 3219324
2022-06-16 09:15:14 -07:00
Nandha Kishore Easwaran
7d3cd845de qcacmn: Add lite tx monitor filter setup API
Add API to iterate through all modes to set setup tx monitor based
features. Also added filter setup function for tx lite monitor mode.
Made additions to filter print functions and added the fields that
were missed.

Change-Id: I20070f75d800199199195f73b1e2a13b428d5672
CRs-Fixed: 3191619
2022-06-15 11:09:06 -07:00
Himanshu Batra
4a668c5271 qcacmn: Add check for ppdu_type while updating peer consumption
Add check for ppdu_type while updating peer consumption time for rx ppdu

Change-Id: If4e24649d4c73d8899dcc7faf34e135dea6e4065
CRs-Fixed: 3220040
2022-06-14 15:06:38 -07:00
Nandha Kishore Easwaran
7f485d5e89 qcacmn: Split tx and rx buffer add function
Split tx and rx monitor buffer add function so that
they can be indivudually called when lite monitor mode is enabled.

Change-Id: I9996d0261f1912237bd6fa45058d410698b9fa28
CRs-Fixed: 3206170
2022-06-14 01:37:47 -07:00
Yu Wang
a9461beb20 qcacmn: refine the APIs for reap timer of monitor status ring
Since more than one components depend on reap timer of
monitor status ring, add bitmap to record the trigger
sources of the timer and refine the APIs/calling functions
accordingly.

With this change:
When a new start request comes, if the source is
CDP_MON_REAP_SOURCE_ANY, skip bit set, and start timer
if any bit has been set in the bitmap; while for the
other sources, set the bit and start timer if the bitmap
is empty before that.

When a new stop request comes, if the source is
CDP_MON_REAP_SOURCE_ANY, skip bit clear, and stop timer
if any bit has been set in the bitmap; while for the
other sources, clear the bit and stop timer if the bitmap
is empty after that.

Change-Id: Idaa7837c4b93b247ff2236aa5072d309fa9548c2
CRs-Fixed: 3190347
2022-06-13 22:54:46 -07:00
Shwetha G K
d9668fdc72 qcacmn: ppdu_info handling for CFR
Changes to handle CFR information from ppdu_info in
enhanced stats disabled case.

In enhanced stats enabled case, CFR info is handled in
dp_rx_handle_ppdu_stats API.

CRs-Fixed: 3214538
Change-Id: I41ea6e080f5ede661eed06764939fe2feaa6102e
2022-06-10 21:50:53 -07:00
Himanshu Batra
768250e291 qcacmn: Add support for telemetry agent stats
For telemetry agent, some more statistic support is required.
Hence, add support for telemetry agent required stats.

Change-Id: Ieb2210a4a5dfe6fa0a0dd46a85f2d9ae483bb746
CRs-Fixed: 3210797
2022-06-07 03:29:51 -07:00
aloksing
ddad8e0543 qcacmn: Deregister stats handler before monitor pdev deinit
Module unload is getting trigered in between
Vap restart due to channel switch
while waiting in monitor module unload for 500ms VAPs are coming up.
And after wait, during monitor pdev deinit
HOST start receiving stats indication.
Monitor pdev is getting dettached while processing stats indication.

Move register/derester of stats handler to intr ops.

Change-Id: I821c144f54bfe78c567039ab57fcf1eac7cb4f46
CRs-Fixed: 3192980
2022-06-04 09:27:32 -07:00
Kai Chen
8cace9cda9 qcacmn: Adding mlo timestamp offset to tsf for radiotap
Adding MLO timestamp offset reported from firmware to tsf time for
radiotap header.

Change-Id: I2947dacf6c37214e60d70fcb3df4a5f9897356ac
CRs-Fixed: 3211179
2022-06-03 13:47:38 -07:00
Amir Patel
2f0a456ced qcacmn: Add sanity check to avoid out of bound memory access
Add sanity check to avoid out of bound memory access
for protocol and flow tag update in monitor ring

CRs-Fixed: 3206715
Change-Id: Ie326137db8a6c9c1ee1faab69627ecd5eb51ad3e
2022-06-03 01:52:11 -07:00
Rakesh Pillai
5fd598fac0 qcacmn: Fix monitor status TLV parsing
Currently, for kiwi, the tlv parsing from monitor
status buffer stops when it encounters MPDU_START
tlv. This happens since the return value after the
parsing of MPDU_START is not one amongst the allowed
return values for the tlv parsing to be continued.

Add MPDU_START tlv parsing return value to the allowed
return values, in order to continue the parsing of tlvs
from monitor status buffers.

Change-Id: I51cfecb7df8d8055a37e1b898419ec322dad63db
CRs-Fixed: 3203708
2022-06-01 00:01:55 -07:00
Amir Patel
da53418537 qcacmn: Add WAR to skip multiple ring entries
Add WAR to skip multiple ring entries in case if DMA is not
done for more than one entry in monitor status ring

CRs-Fixed: 3206692
Change-Id: Id24deb18d173e521efda38716244f375a409d7f5
2022-05-31 11:08:32 -07:00
Guisen Yang
370e3bd4e9 qcacmn: Fix build error when DISABLE_MON_CONFIG is defined
Fix below errors when the item DISABLE_MON_CONFIG is defined:
No return value for below two APIs:
dp_tx_mon_buf_refill() and dp_rx_mon_buf_refill()

CRs-Fixed: 3205083
Change-Id: If449616e30e75c23c7b25fb449a0ad8e501529aa
2022-05-30 05:16:42 -07:00
Nandha Kishore Easwaran
77f302907b qcacmn: Change tx mon ring sizes
Change tx monitor ring sizes and make minor fix when getting the
number of entries.

Change-Id: Iec458d88948556f7007d4fa33bf082c8ee089064
CRs-Fixed: 3206170
2022-05-30 03:56:22 -07:00
Amir Patel
bf92ed7b61 qcacmn: Add sanity check while adding a-msdu subframe header
1. Add sanity check before adding a-msdu subframe header
2. Add truncate MPDU handling

CRs-Fixed: 3191386
Change-Id: I11e6f971e470e486438ece9c4a7daef3df9f71ed
2022-05-26 01:32:33 -07:00
Harsh Kumar Bijlani
fa7624cb8a qcacmn: Set Rx monitor ring fill level to default on monitor soc init
Initially, 2K buffers (default) are allocated and Rx monitor ring fill
level is set to 2K at monitor soc attach and these buffers are used for
enhanced stats.

On monitor vap creation, additional 6K buffers are allocated and monitor
ring fill level is set to 8K.

On execution of wifi command after this, fill level is still set to 8K
and this results in monitor vap to operate with only 2K buffers.

Therefore add functionality to set the fill level to 2K (default) at
monitor soc init instead of monitor soc attach and also add sanity check
for num_req_buffers in the API dp_mon_buffers_replenish.

Change-Id: I0f4b269ab4ed05ed1f0223e3dc83d8675dab4860
CRs-Fixed: 3201411
2022-05-25 07:30:27 -07:00
Jeevan Kukkalli
ec2838ac4d qcacmn: Make lite mon enum generic
-Some of the lite monitor enums can be used outside of
 lite monitor feature, make such enums generic.
-Some enums are redundant, remove such enums and make use
 of existing ones

Change-Id: I5125384ac5c4c55a57998fb5be5ee1ecb3e61147
CRs-Fixed: 3190754
2022-05-25 04:55:51 -07:00
Jeevan Kukkalli
660a0d7e2c qcacmn: Add stats to count mpdu dropped due to ppdu id mismatch
During frequent channel changes in corner case we observe
that mpdu ppdu id does not match dest ring curring ppdu id.
Such mpdus are dropped. Add stats to count such dropped mpdus.

Change-Id: If52e81f4e718ce0d7f83a41f4f0121394525b9df
CRs-Fixed: 3144784
2022-05-20 14:21:26 -07:00
nobelj
ba3853e95f qcacmn: Add fix for tx monitor double free and other minor fixes
Add fix for tx monitor double free and other minor fixes like updating
channel frequency and channel number if it wasn't fetched properly,
fetch protection address only if it is valid.

Change-Id: I184e08080a47b903176b9df0a192f0b5eb0b2750
CRs-Fixed: 3184727
2022-05-19 00:20:12 -07:00
Harsh Kumar Bijlani
bf750e0364 qcacmn: Update peer_id with link peer_id in Rx monitor path for MLO
With MLO enabled, Rx monitor receives the sw_peer_id in the following
format in MPDU_START_TLV:
+---------------------------------------------------------------------+
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
+---------------------------------------------------------------------+
| CHIP ID | ML |                     PEER ID                          |
+---------------------------------------------------------------------+

For MLO station, sw_peer_id received in MPDU_START_TLV corresponds
to MLD peer. But for Rx monitor framework, link peer makes relevance.

Therefore, fetch and update the sw_peer_id with link peer_id in the
received ppdu in Rx monitor.

Change-Id: I8ffc32856fd364edbcec2d98c3f9e1f0643d40d1
CRs-Fixed: 3190668
2022-05-16 03:49:56 -07:00
Ruben Columbus
5ad83e6c56 qcacmn: new handler for pf tags
add tags straight from ppdu_info to headrom for mpdu
tags are positioned per msdu_index within mpdu headroom.

Change-Id: I4863a7929ffd2e0a5d7f91f31ab6059f2b882de4
CRs-Fixed: 3183692
2022-05-12 11:54:26 -07:00
Amir Patel
ca9379b181 qcacmn: Add fraglist to skb if num_frags exceeds MAX_FRAG
Add fraglist to skb if num_frags exceeds MAX_FRAG

CRs-Fixed: 3186124
Change-Id: I3112d63276fe00aea4fce2e287650078b1573d8a
2022-05-06 16:42:41 -07:00