Commit Graph

150 Commits

Author SHA1 Message Date
Amir Patel
04cc044ef2 qcacmn: Remove unnecessary prints
remove unnecessary print from monitor deinit path

Change-Id: Ia38d3e3739a0e8464e2fd702d1916b95a930e9f7
CRs-Fixed: 3287637
2022-09-14 05:21:54 -07:00
Sushant Butta
b1a6c9543b qcacmn: Optimizations for Tx monitor buffer allocations
Currently 2K Tx buffers are allocated at init time and 6K Tx
buffers are allocated at mon vap creation time.
Changes are done to move Tx buffer allocations to 0+8K model,
where allocations are done when enable cmd is triggered.

CRs-Fixed: 3284106
Change-Id: If0a112b8138f2be1db8f764fd7aa4ef12f274bb7
2022-09-12 11:53:54 -07:00
nobelj
5f09e5188b qcacmn: Add minor fix specific to tx monitor
Added minor fix,
a) Handle buffer allocation failed and
b) NULL check

Change-Id: Idaeb1d2b1e9bc613bfaf15b3e028e44846345e2f
CRs-Fixed: 3279243
2022-09-08 21:23:53 -07:00
Amir Patel
8a1be0ce9d qcacmn: Update Noise floor for monitor frames
Update Noise floor for monitor frames

Change-Id: I8fc81b189923130e2c040dea10e04fba92c58c57
CRs-Fixed: 3274706
2022-09-07 16:34:27 -07:00
Amir Patel
0fe7f4446b qcacmn: Optimize monitor mode memory utilization
a. Optimize ppdu_info memory
b. Use kmem cache for ppdu info allocation

CRs-Fixed: 3265620
Change-Id: Ieee040aa703aef8c5eee5e5a34a52ef18300b696
2022-09-06 10:23:43 -07:00
Amir Patel
ed6fc2b352 qcacmn: Add NULL pointer check
Add NULL pointer check at correct place
in monitor filter update

CRs-Fixed: 3279327
Change-Id: I5d9c44cf160de9acd4280774cc999931b8050ec3
2022-09-06 04:23:41 -07:00
aloksing
c31daef130 qcacmn: fix compilation issue without monitor support
Compilation is failing when Monitor support is disabled
Moved monitor related API and structure to monitor header files.

CRs-Fixed: 3257872
Change-Id: Ie1b3dc16b38c88bfd73fc89aaa395d4b57a61e5c
2022-08-31 16:04:27 -07:00
Jeff Johnson
88c15dadbb qcacmn: Fix misspelling "recevied"
Multiple instances of the misspelling "recevied" are present, so
replace them with the correct spelling "received."

Change-Id: Ibd7f4a136541be8aa98f5bee4db7f75af0271f53
CRs-Fixed: 3273526
2022-08-28 19:08:26 -07:00
Amir Patel
1885bbbc5e qcacmn: Fix pointer typecast issue
Fix pointer typecast issue in monitor

Change-Id: I45579fce49a7e2afacfc5462f208c01280c677d8
CRs-Fixed: 3257285
2022-08-18 23:08:25 -07:00
Jeevan Kukkalli
b207f0b859 qcacmn: Add space for PPDU id TLV in headroom
Aad additional space for PPDU id TLV in headroom
while forming monitor mpdu.

Change-Id: Ie033ee6dd196838aa63cc456794b55fd9b780531
CRs-Fixed: 3237248
2022-08-17 15:35:35 -07:00
Nandha Kishore Easwaran
9b81f6a195 qcacmn: Enable Subtype and PPDU filtering
Enable subtype filtering for all types of frames. Check the subtype
for all types of frames and drop the frames which are not requested.

Also enable PPDU level filtering by dropping the MPDUs after the first
MPDUs.

Change-Id: I94496ec278724a7023a79b50c2cd7a77b2707e74
CRs-Fixed: 3247309
2022-08-16 06:01:12 -07:00
Nandha Kishore Easwaran
0585386f57 qcacmn: Fix mpdu logging option in htt command
Fix the mpdu logging option in htt command so that msdu/mpdu
logging is correctly written into the register.

Change-Id: I98b8a1a78cc0cfae37e91e9e3e489ac54139ff75
CRs-Fixed: 3265015
2022-08-16 06:00:58 -07:00
nobelj
653cfeb7b7 qcacmn: Add fix for response timestamp and others minor fixes
Added fix,
a. To populate response timestamp from phy timestamp.
b. Based on window type swap address1 and address2 to match the sniffer.
c. For VHT frames, increment 1 to the received nss value.

Change-Id: I68dffadb609d82e2ad2cf433fcee2a76b0be98e7
CRs-Fixed: 3235718
2022-08-09 08:19:03 -07:00
Ruben Columbus
895c8bcde6 qcacmn: add tlv format to buffer along with debug mechanism
use msdu_count and index to occupy buffer headroom within mpdu.
new mechanism to debug buffer while using pf tags enabled

Change-Id: I1b7d8a1d7ec93f51869119294d2f0b14e3909fe9
CRs-Fixed: 3217284
2022-08-03 13:39:44 -07:00
Jeevan Kukkalli
2b76805c5a qcacmn: Handle FPMO filter configuration
Handle FPMO mode filter settings configured
from lite_mon tool.

Change-Id: I9bfe70101bae7c8f55c6db95d9c36f4c1d308e95
CRs-Fixed: 3235935
2022-08-02 05:16:18 -07:00
nobelj
7d3197b9a5 qcacmn: tx monitor populate stats information
add tx monitor stats information.

Change-Id: Iffc55c2a4fa5351140daeffac3a50dd6867f6ea1
CRs-Fixed: 3230286
2022-08-02 03:23:01 -07:00
Jeevan Kukkalli
f79e9cc3dc qcacmn: Make dp_mon_free_parent_nbuf function public
dp_mon_free_parent_nbuf() function is required to be
used outside of file dp_rx_mon_2.0.c hence make it
public.

Change-Id: I2c300362fee3610fce0109704ea1849333bf9715
CRs-Fixed: 3250904
2022-08-01 23:32:45 -07:00
Jeevan Kukkalli
9f2e4a34b8 qcacmn: Disable deprecated monitor functions
Disable deprecated monitor feature functions
in wkk.

Change-Id: I2ef2f6219d95a2728452faffafe9f20a30eb28d8
CRs-Fixed: 3243020
2022-08-01 08:54:21 -07:00
nobelj
09bc440ca9 qcacmn: Add support for tx monitor full buffer and minor fix
Add support and handle tx monitor full buffer payload and
other minior fix include change of name for uniformity.

Change-Id: If401ecd5e1c6263584fa7013df672459c883ca8b
CRs-Fixed: 3215244
2022-07-26 18:03:44 -07:00
Jeevan Kukkalli
384c456371 qcacmn: Pass appropriate parameter while adding rx frag
Fix frag len and frag offset parameter interchange issue
while adding rx frag.

Change-Id: I6680f66715b558a9e8f58665e65494a8cb3783cb
CRs-Fixed: 3246599
2022-07-21 02:38:57 -07:00
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
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
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
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
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
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
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
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
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