Commit Graph

291 Commits

Author SHA1 Message Date
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
Amir Patel
0bfdc54393 qcacmn: Drain Rx monitor workqueue
Drain Rx monitor workqueue on wifi down

CRs-Fixed: 3186360
Change-Id: I524b08338da1f2a4567c17551a8b44d420ca3455
2022-05-02 14:08:50 -07:00
Jeevan Kukkalli
025fca08e6 qcacmn: Subscribe for ppdu_start_user_info TLV
Subscribe for ppdu_start_user_info TLV for
lite monitor mode in WKK.

Change-Id: I4ffc09ae11905f8d784bf388889b317055ec6357
CRs-Fixed: 3185558
2022-05-02 07:31:13 -07:00
Harsh Kumar Bijlani
cfe5ee5060 qcacmn: Add support for Tx MIMO and OFDMA stats for Waikiki
Add support for Tx MIMO and OFDMA stats for Waikiki.

Change-Id: I54de5ff93841c98fde1dc4b4eda743748dab4bbb
CRs-Fixed: 3181946
2022-04-29 09:01:29 -07:00
Jeevan Kukkalli
bf5043dc92 qcacmn: set appropriate rx packet offset
Set appropriate rx packet offset when full pkt is
subscribed in litemon case.

Change-Id: I1b1149b5105ce2b61c6e6ddc7841c21ce0b7870c
CRs-Fixed: 3183047
2022-04-29 00:57:59 -07:00
Adwait Nayak
94eec2edd6 qcacmn: Fix to process the RX_PPDU_END_STATUS_DONE TLV
RX_PPDU_END_STATUS_DONE TLV is not being processed, since Host
is not copying the last byte from the payload.
Add code to copy the full payload from status frag and process
it to the upper layer.

Change-Id: I51d03f5664b2944008936e3711f2ba74bcfde89c
CRs-Fixed: 3179137
2022-04-28 15:46:24 -07:00
KARTHIK KUMAR T
1bc325d4f3 qcacmn: calculate RSSI DBM in WKIKI
Add rssi dbm support bit for rssi_comb calculation
using parameters received from the fw.

Change-Id: Ice57ed69db74852a8b03752632bae747c043e93d
CRs-Fixed: 3183406
2022-04-28 11:51:10 -07:00
Amir Patel
df1a9d566a qcacmn: Subscribe for ppdu_start_user_info TLV
Subscribe for ppdu_start_user_info TLV for statistics and
monitor mode in WKK.

Change-Id: I019ddc665fd42bc872054b895a164aaec840bf79
CRs-Fixed: 3181602
2022-04-27 00:50:51 -07:00
KARTHIK KUMAR T
c7acbbd7ba qcacmn: calculate RSSI in DBM
calculate rssi_comb and rssi per chain values using
parameters received from the fw.

Change-Id: Ide56549c7d7ee9bde609dc6764013d509f7ccac0
CRs-Fixed: 3157484
2022-04-25 04:12:10 -07:00
KARTHIK KUMAR T
21fcb24a2c qcacmn: Add RSSI specific parameters in mon pdev
RSSI calibration parameters are received as part
of WMI event from FW, update these parameters to
monitor pdev via CDP interface.

Change-Id: I5060795918571763ad467aae93729040fbca96a1
CRs-Fixed: 3147897
2022-04-22 07:26:51 -07:00
Amir Patel
c94599395b qcacmn: Update correct filters for monitor mode
Update correct filters for monitor mode

Change-Id: If0e8b7397289c3d453d3a8c9a87db79f921909c9
CRs-Fixed: 3178839
2022-04-22 07:26:45 -07:00
Jeevan Kukkalli
cedb0f2795 qcacmn: Handle lite monitor frames
Call function to process mpdus when lite monitor
feature is enabled

Change-Id: I0df722a92e91bddc09a84dce2bc2aa6a67548045
CRs-Fixed: 3173953
2022-04-22 03:10:57 -07:00
aloksing
9cc1b3a305 qcacmn: Get RU details in MIMO case
Get NSS, MCS and RU size from PPDU_START_USER_INFO TLVs.

Change-Id: I5898a46a52e8a1eb25e3cf54e7dfe50c503e1b68
CRs-Fixed: 3167954
2022-04-21 04:33:31 -07:00
Jeevan Kukkalli
19c030e751 qcacmn: Enable smart monitor on wkk
Enable smart moniotr operations to add/delete
NAC clients and to get NAC client rssi value.

Change-Id: Ifc933d474da15101293cf3e1c07261917fb634f9
CRs-Fixed: 3169256
2022-04-20 03:12:47 -07:00
Jeevan Kukkalli
af7c896bdc qcacmn: Add lite mon rx filter setup/reset functions
Add function to setup/reset lite monitor filters
whenever lite monitor mode is enabled/disabled
respectively through cmd line.
Also add function to configure rx header tlv dma length.

Change-Id: Ia5d8bc36e1d033b3e15737bb6b9854f6a7cdd5df
CRs-Fixed: 3143570
2022-04-20 03:12:41 -07:00
Neha Bisht
6064df8467 qcacmn: Update code with peer_extended_stats instead of rdk_stats
With new configuration changes for enable_peer_extended stats, update
code to peer_extended_stats naming for clean codebase.

Change-Id: I97a7ee331042232098382683fefebd05e6b099c3
CRs-Fixed: 3149920
2022-04-20 01:37:59 -07:00
Harsh Kumar Bijlani
9aa4e0f9f5 qcacmn: Add subscription for PPDU_START_USER_INFO TLV
In Beryllium architecture, PPDU_START_USER_INFO TLV carries
the user specific info for each user in a given ppdu.

Add subscription for this TLV by host for enhanced stats use case.

Change-Id: Ia12c5c3ab36198e7cd40dad0c0d92b945d2b49c6
CRs-Fixed: 3166305
2022-04-19 13:21:55 -07:00
Amir Patel
19970ea217 qcacmn: Add MPDU restitch logic For Waikiki RxMON
a. For decapped frames, convert frames from 802.3 t 802.11
b. for non-decapped frames no conversion is needed
c. Apply radiotap header and deliver MPDU to osif layer

CRs-Fixed: 3074441
Change-Id: Ia03b4bad35d69aa292958782cd424f3df56dabbc
2022-04-19 05:17:25 -07:00
Harsh Kumar Bijlani
484198b257 qcacmn: Add MSDU counters to account for 11BE puncturing BW stats
Add MSDU counters to account for 11BE puncturing BW stats.

Change-Id: I2c1d420b8d8b4533dcbf64f206783c07555cac99
CRs-Fixed: 3171770
2022-04-19 01:27:03 -07:00
Amir Patel
67d1b9bf12 qcacmn: Skip duplicate destination ring desc in WKK RxMON
Skip duplicate destination ring desc in WKK RxMON

CRs-Fixed: 3162134
Change-Id: I38e7855a9d4fd19a4aaa476fbeeaa0c4a8e309e2
2022-04-13 09:11:37 -07:00
aloksing
2c977089aa qcacmn: Get puncture type from puncture pattern
Populate punctured pattern from WIFIPHYRX_COMMON_USER_INFO_E
And get puncture type from puncture pattern.

Change-Id: I3a5ba4c7c478d15cf3c3cfdcfd0573775ae342ca
CRs-Fixed: 3166010
2022-04-13 05:18:17 -07:00
Amir Patel
5f9d3d8f53 qcacmn: Flush monitor status buffer queue
Flush monitor status buffer queue in case of
flush or truncated PPDU

Change-Id: I79daa9054caf0ffc3658c8c41b759d9ce8cdf108
CRs-Fixed: 3160035
2022-04-12 09:00:32 -07:00
Harsh Kumar Bijlani
c41c8f1d8c qcacmn: Correct computation of tx.tx_rate and tx.last_tx_rate
Correct computation of tx.tx_rate and tx.last_tx_rate in Tx HTT
PPDU completion path.

Change-Id: I8dcc4913c651a2c90e0f1d153e4e09f02d7403d4
CRs-Fixed: 3167357
2022-04-11 16:30:38 -07:00
Harsh Kumar Bijlani
ad3d4de01a qcacmn: Use correct set of macros for Rx monitor dependent features
Use correct set of macros for Rx monitor dependent features.

Change-Id: I51833852811bb339afd284a1291460ec827fe6e5
CRs-Fixed: 3169125
2022-04-10 00:28:05 +08:00
Amir Patel
2ea0071499 qcacmn: Use 'end_offset' as delimiter for status buffer
parsing

HW desc provides 'end_offset' which can be used as delimiter
to identify status buffer boundary

Change-Id: I265ab328b80615fd2386402f0ea3797d124b8f8f
CRs-Fixed: 3157554
2022-04-08 04:29:12 -07:00
Srinivas Girigowda
c53ac4acce qcacmn: Add sanity check for dp_intr_id
Add sanity check for dp_intr_id in monitor flush ring.

Change-Id: I9562e837d898543152da111ca1c4bf9f0558092d
CRs-Fixed: 3166446
2022-04-07 01:18:50 -07:00
Jeevan Kukkalli
7f9da4ae12 qcacmn: Add lite monitor set/get functions
-Add lite monitor tx/rx filter config set/get fucntions
-Add lite monitor tx/rx peer config set/get functions

Change-Id: I47cc1085c64468b8a0fada871e2f5d3707ca7063
CRs-Fixed: 3078298
2022-04-05 10:11:03 -07:00
nobelj
9e0ab8e096 qcacmn: Add tx monitor flush/drop/truncated handling
Add support for tx monitor flush/drop/truncated handling
and few minor fixes from txmon

CRs-Fixed: 3158502
Change-Id: Ic13476984cd591a381941cfa1501307e9cca2b5a
2022-03-29 14:11:56 -07:00
Jeevan Kukkalli
53a654f2e8 qcacmn: Set log level to info
Log level was accidentally increased hence reducing log level
to info to avoid unnecessary prints on console.

Change-Id: Idbe495cbdc8a17112f034083c2f8ebf297dcdc6b
CRs-Fixed: 3157393
2022-03-29 12:22:24 -07:00
Amir Patel
ff310b9e8f qcacmn: Increase per ppdu max monitor status buffer count
Currently, max monitor status buffer count per ppdu is 32.
In case of multiclient test cases, number of status buffers per ppdu are
33 and leading to assert.
Increase per ppdu max monitor status buffer count 128 to take care of future
use cases like MU-MIMO, OFDMA.

Change-Id: I083304ef23a1d58af24062441d8ad9b2d229f7b1
CRs-Fixed: 3156689
2022-03-27 13:11:06 -07:00
Harsh Kumar Bijlani
e70d9e3eed qcacmn: Populate rate index in user specific rx ppdu indication
Populate rate index in user specific rx ppdu indication.
Also correct the computation of total retries in rx ppdu indication.

Change-Id: I07c55260def9d2f1490729b6390bca3d98085c63
CRs-Fixed: 3156428
2022-03-24 03:01:12 -07:00