Commit Graph

291 Commits

Author SHA1 Message Date
Jeevan Kukkalli
4759d79767 qcacmn: Update MPDU start and MSDU end wmask during filter setup
Update the MPDU start and MSDU end word mask while setting
up rx monitor filter.

Change-Id: I17c5d809300cd2d4fc8d3b63d5e8a3d40f599a7a
CRs-Fixed: 3145449
2022-03-23 13:01:35 -07:00
Jeevan Kukkalli
2676f31aad qcacmn: Update dma length and mpdu logging during filter setup
Update dma length and mpdu logging for different packet
types while setting up monitor filter

Change-Id: I408860f15686c7999655c1e84dce5a3f7ffbbed7
CRs-Fixed: 3145400
2022-03-23 13:01:29 -07:00
Amir Patel
3b816d7013 qcacmn: Fix monitor dest srng init in case of splitphy
1. pass appropriate pdev_id as ring_num for srng init
2. Increase max rings for monitor destination rings

CRs-Fixed: 3152722
Change-Id: I36aa2f4e8e5d7fa41ee90a39593cbb8cdf86ec44
2022-03-23 03:32:22 -07:00
Jeevan Kukkalli
925aca8a6b qcacmn: Initialize smart monitor filter reset function
Initialize smart monitor filter reset function during
ops registration

Change-Id: Ifc96a25675da1b05aa6a314cbad9df8a67ec6219
CRs-Fixed: 3153322
2022-03-22 23:25:37 -07:00
Naga
9ad28af16e qcacmn: Remove redundant field for rxmon global enable
Remove redundant field for rxmon global enable
and fix writing global enable field to correct
dword

Change-Id: I4efc0da559dce873bcb8721aeb0d7b7410b39dd9
CRs-Fixed: 3150784
2022-03-22 03:25:09 -07:00
Amir Patel
a799953c57 qcacmn: Handle buffer continuation in RxMON
for a PPDU monitor status can be split across multiple status buffers,
If status buffer continuation is carried in next NAPI budget,
store ppdu status buffers to process in next reap context.

Change-Id: Id00646fa4edb55f3540e23ad327952bf0f5d9889
CRs-Fixed: 3147113
2022-03-11 10:35:10 -08:00
Subrat Dash
20b758944f qcacmn: Decouple FEATURE_PERPKT_INFO from MESH_MODE_SUPPORT
The per packet info feature can be enbaled to support enhanced
stats independent of mesh mode.

Change-Id: I852e7a958c520901b6f418d30deb53fa2f68fb68
CRs-Fixed: 3079000
2022-03-08 05:37:52 -08:00
Amir Patel
b37c8d9550 qcacmn: Handle empty, flush and truncated ppdu in RxMON
In case of empty HW descriptor, sw cookie is not valid.
Instead, HW reports ppdu_drop_cnt, mpdu_drop_cnt and
tlv_drop_cnt.
Do not process sw desc, if it's empty HW desc indication.

In case of flush and trucanted PPDU, status buffer need to be discard,
added handling for same.

Change-Id: I1219f71645072bb9e0e80ff271fa354f305c7961
CRs-Fixed: 3144525
2022-03-07 02:16:44 -08:00
aloksing
7148dfedf8 qcacmn: Handle enhanced stats from Rx monitor path in Waikiki
Update enhanced stats from Rx monitor path in Waikiki.
Populate mpdu_retry_cnt, sw_peer_id, mpdu_ok_byte_cnt and
mdpu_err_byte_cnt from PPDU_END_USER_STATS TLV.
Fix KW issue.

Change-Id: I055ff84f6304ba71b09a9a75b8420183ab6e9d8a
CRs-Fixed: 3134900
2022-03-03 04:56:34 -08:00
Amir Patel
193246d3d3 qcacmn: Add core Rx monitor processing
Add core Rx monitor processing

CRs-Fixed: 3074352
Change-Id: I984fff721d671de6f62d6d9e6e13bd80c543ea8e
2022-03-03 03:38:18 -08:00
Amir Patel
f78b0ccc9c qcacmn: Add workqueue infrastructure for Rx monitor processing
Add workqueue infrastructure for Rx monitor processing

CRs-Fixed: 3074291
Change-Id: I9b898c0101bf3e294e06cd2d491a0eecb47ec765
2022-03-03 03:38:12 -08:00
Amir Patel
f17d789fa6 qcacmn: Add Waikiki monitor HAL processing
Add Waikiki monitor HAL processing

CRs-Fixed: 3073467
Change-Id: I2b1768b827f34785effed6c076a099628870e2a5
2022-03-03 03:38:05 -08:00
aloksing
482fba652b qcacmn: Increment pkt type for WKK
Define DOT11_BE as per Rx tlv
Increment pkt type for WKK

CRs-Fixed: 3121279
Change-Id: Id4bf93e5dcda08cc7fccfe3f8f06b00e5b29d4e3
2022-03-03 03:37:57 -08:00
Arunpandi K
ec3bfd9dc9 qcacmn: Adding validation to check monitor rings
There is a possible race condition that target_start can be
called during load unload leading to htt_srng_setup being
called before monitor srngs are initialized. This check will
prevent the srng_setup_call from soc_start. The rings will
subsequently be initialized when monitor modle is loaded.

Change-Id: Ie697b45425e38e6d709b7466bb495a20bef4f820
CRs-Fixed: 3125255
2022-03-01 23:00:09 -08:00
Basamma Yakkanahalli
831a3ce7d5 qcacmn: Drop undecoded frames err mask not configured
1. Drop the received undecoded frame if error code
   abort reason not matched with configured error mask.
2. Reset phy error mask during undecoded capture mode reset.

Change-Id: I162ac1b60ceb5a4b5a87ff2d2186f2e67815f580
CRs-Fixed: 3134562
2022-03-01 07:07:38 -08:00
Basamma Yakkanahalli
70f4513196 qcacmn: Add support for undecoded frame error stats
Display phyrx aborted undecoded frame count and the aborted
reason statistics as part of pdev rx mon stats.

Change-Id: Ia86074e62af3179855734b47801715abd1899fe1
CRs-Fixed: 3123540
2022-03-01 07:07:33 -08:00
nobelj
f0064e8e52 qcacmn: Waikiki tx monitor packet construction
Added function to construct packet and send to stack
after parsing.

Change-Id: I4621eb24840253db261aea63079e27f744f92698
CRs-Fixed: 3115608
2022-03-01 05:39:37 -08:00
nobelj
dffdb7c215 qcacmn: Add support to send tx monitor packet to stack
Add support,
1. Deferred tx monitor processing
2. update radiotap headers and
3. skeleton flow for tx monitor to send each mpdu per user to
stack.

Change-Id: I0809a2fe06a9dc001f6da20a5c4a689244bf9a85
CRs-Fixed: 3115608
2022-03-01 05:39:31 -08:00
Harsh Kumar Bijlani
caf5400575 qcacmn: Changes to enable and disable enhanced stats for Waikiki
Changes to enable and disable enhanced stats for Waikiki

Change-Id: I6e3a747f31abda9cfcefec3156327295412088b5
CRs-Fixed: 3138098
2022-02-28 17:44:09 -08:00
Harsh Kumar Bijlani
c1b9ccd925 qcacmn: Update enhanced Tx stats from Tx HTT PPDU completion path
Update enhanced Tx stats from Tx HTT PPDU completion path in WKK.
Define and use function pointers for architecture specific
functionality.

Change-Id: I4ba443647dbd81c83e899c0f88c5d9a4cc695e14
CRs-Fixed: 3132255
2022-02-28 17:44:03 -08:00
Harsh Kumar Bijlani
bd7a797898 qcacmn: Add flag in dp_mon_soc_be to avoid double deinit
Add flag in dp_mon_soc_be to avoid double deinit

Change-Id: Ie3f5f9fe3880311b169504c8f4c9861efcf1c4d3
CRs-Fixed: 3138172
2022-02-28 16:12:27 -08:00
Basamma Yakkanahalli
bfde0ca01b qcacmn: Fix bkp on monitor dest ring when disable undecoded capture
During undecoded mode capture reset expected to reset
only phy error filter flags. But disabled monitor mode
capture filters as well. This resulted a backpressure
in monitor mode destination ring.
Added an appropriate check to disable only phy error
filter without disturbing monitor mode filter setting.

Change-Id: If3ef8e9f41f32dff30773aeb939256920c515800
CRs-Fixed: 3137636
2022-02-28 10:19:54 -08:00
Jinwei Chen
6a194730ae qcacmn: rename dp_is_hw_dbs_enable function
dp_is_hw_dbs_enable() is checking DBS and update number of
MAC rings value, current function name makes confusion.
rename it to dp_update_num_mac_rings_for_dbs().

Change-Id: I82540a943445560a99e27067e58d59035147208b
CRs-Fixed: 3131546
2022-02-23 22:45:48 -08:00
Naga
cf11e93c66 qcacmn: Fix pool size while initializing descriptors
Fix pool size while initializing monitor
descriptors

Change-Id: Icb02e096399f02dd36e74db3aab862de0a81befe
CRs-Fixed: 3134570
2022-02-23 12:28:51 -08:00
aloksing
0de5f8943a qcacmn: filter setup for enhanced statistics
setup/reset filter to enable/disable enhanced statistics for WKK.

CRs-Fixed: 3121252
Change-Id: Ib6d7653144b0f962e5f0f3330ab1a0ff25cf1802
2022-02-21 06:41:28 -08:00
Basamma Yakkanahalli
3498dbc3a6 qcacmn: Add support to configure phy error mask
The monitor status ring is configured for filtering
in undecoded phy error packets. Each phy error can
be controlled using a specific error mask configuration.

Added below cfg80211tool command to configure phy error
mask for filtering undecoded phy error packets.

cfg80211tool wifix set_phyrx_error_mask mask_0to31 mask_32to63
cfg80211tool wifix get_phyrx_error_mask

Change-Id: I5e4f6a49458cc534d6d1d0f7f2a7424f3cc747b4
2022-02-18 04:53:23 -08:00
Basamma Yakkanahalli
e85fbce095 qcacmn: change to configure and handle undecoded metadata capture
Added change:
1. Set/reset RXDMA MON STATUS ring filter setting and send HTT
   message to capture undecoded frame
2. Handle undecoded frame to update cdp_rx_indication_ppdu structure
   from hal ppdu_info rx status and generate WDI event to deliver it
   to upper layer

Change-Id: I14485f28333b113b5a2fab639611551c2b08af2b
2022-02-18 04:53:18 -08:00
nobelj
df4a101c0e qcacmn: process tx monitor per ppdu status buffer
Add skeleton code for handling tx monitor per ppdu status buffer.

Change-Id: Idfb4e038007e0a45cb1a4805270453cc01cd986e
2022-02-18 01:27:43 -08:00
Rakesh Pillai
595926af77 qcacmn: Handle monitor buffer allocation failure
Currently the monitor buffers allocation is attempted
for 2 RXDMA monitor status/destination rings.
For certain targets, eg KIWI, there is only one RXDMA
monitor status/destination ring, and the monitor buffer
allocation for the second ring fails. This return status
is not handled properly.

Fix the monitor buffer allocation to use the number of
rxdma rings from cfg context and handle the return status
properly.

Change-Id: I86718dbd790d96d794963b17a4c9bdf32792d854
CRs-Fixed: 3128299
2022-02-15 17:28:24 -08:00
Naga
03c268ac2d qcacmn: Fix to receive correct buffer address
Fix to receive correct descriptor buffer address
for tx monitor

Fix to send correct filter settings enabled

Disabled default filter display log level to debug.

Change-Id: I7ca1b1110cdcb10ca65ab8c414c19a81f1f4d331
CRs-Fixed: 3121965
2022-02-14 07:12:25 -08:00
Amrit Sahai
0d99e0240d qcacmn: change the log level to debug for monitor filters
change the log level to debug for monitor filters

Change-Id: I9f00be2de4abc9f62f8e370292844884d429872f
2022-02-14 07:12:19 -08:00
Harsh Kumar Bijlani
4645b94dbc qcacmn: Disable MO filters for enhanced stats and smart monitor
MO stands for Monitor Other which is a filter setting specified by
host to hardware to receive TLVs for non-associated clients.

In case of enhanced stats and smart monitor, non-associated clients
are not considered and therefore disable filter settings for MO for
these features.

Change-Id: Ic533072ff668c7ab54188101a889882c4ee4ba4a
CRs-Fixed: 3123784
2022-02-13 23:25:42 -08:00
Amir Patel
e9abac8dc3 qcacmn: Fix memleak issue
Fix memleak issue from pktlog

Change-Id: I4665ce3891c94142aa27349f13669340036b6f98
CRs-Fixed: 3129139
2022-02-12 10:10:35 -08:00
Harsh Kumar Bijlani
b934da0701 qcacmn: Correct computation of retry_mpdus
Correct computation of retry_mpdus

Change-Id: Ic1c3ecb458dd371a46161e87727b35016bc78fb4
CRs-Fixed: 3115325
2022-02-10 00:17:16 -08:00
Harsh Kumar Bijlani
d8e05be641 qcacmn: Changes for vdev and pdev stats
Changes for vdev and pdev stats as per the new peer stats
re-organization architecture.

Change-Id: I48f9fb4b0915c40f4add83f2e2dd074cc97874fd
CRs-Fixed: 3092123
2022-02-09 11:55:12 -08:00
Harsh Kumar Bijlani
e8082534bd qcacmn: Changes to get and reset peer stats
Changes to get and reset peer stats as per the new peer stats
re-organization architecture and taking MLO scenario into
consideration.

Change-Id: I1c49e11d502585cc955ad087ffe3a606be23d83e
CRs-Fixed: 3092123
2022-02-09 11:55:06 -08:00
Harsh Kumar Bijlani
ce45e71913 qcacmn: Update stats in monitor peer in Tx HTT and Rx monitor path
Update stats in monitor peer in Tx HTT PPDU completion and
Rx monitor PPDU indication path.

Change-Id: Icfeb49fc6f1fa2c1f2648a9b4576f31a927c7ecd
CRs-Fixed: 3092123
2022-02-09 11:54:53 -08:00
Harsh Kumar Bijlani
eee813ad02 qcacmn: Initialization of stats in txrx_peer and monitor_peer
* Initialize stats in dp_txrx_peer and dp_monitor_peer as per
  the stats re-organization.
* Update peer calibrated stats on every timer expiry of 1 second.
* Define APIs to reset monitor_peer stats and to fetch rdkstats_ctx
  from monitor peer.
* Place check to make sure that monitor peer related APIs are
  are called only for legacy peer or MLO Link peer.
* Update peer based pktlog flag, tx and rx capture feature flags
  in monitor_peer.

Change-Id: Idadbe19e85d4a9fdf77fb6dabe0c8a4952b024b8
CRs-Fixed: 3092123
2022-02-09 11:54:14 -08:00
Harsh Kumar Bijlani
148f220408 qcacmn: Segregate stats among peer, txrx_peer & monitor_peer
Segregate the stats among dp_peer, dp_txrx_peer and dp_mon_peer
structures.

Segregation is done as per below:
 * Move stats updated in per pkt path to dp_txrx_peer
 * Consider stats updated purely in per pkt path as per_pkt_stats
 * Consider stats for which there is an alternate path of
   updation as extd_stats
 * Move delay stats and jitter stats to dp_txrx_peer
 * Maintain calibrated stats in dp_peer
 * Move rdkstats_ctx from dp_peer to dp_mon_peer
 * Move invalid peer from dp_pdev to dp_mon_pdev

As per the above segregation, if there is not support for
alternate path of stats updation, then stats in dp_txrx_peer is
combination of per_pkt_stats and extd_stats and dp_mon_peer
does not hold any stats.

If support is there, then dp_txrx_peer holds only per_pkt_stats and
dp_mon_peer holds extd_stats.

Change-Id: I2eb81d1b93a178985c05ff4f6557a173cc8a262d
CRs-Fixed: 3092123
2022-02-09 11:54:07 -08:00
Pavankumar Nandeshwar
9c6800383c qcacmn: Move per packet params to txrx_peer
Move the parameters from the dp_peer which are used
in per packet path to txrx_peer and params related
to monitor path to monitor peer.

Initialize txrx_peer and monitor peers.

Change-Id: I0449c67c1cd47deb76bc89b5ddc64174f6694eb0
CRs-Fixed: 3095637
2022-02-09 11:53:37 -08:00
Manoj Ekbote
5abebcd1a6 qcacmn: Add sanity check in rx monitor path
Check physical address of nbuf with ring addr. If they
don't match, move to the next descriptor. Activated with
build flag.

Change-Id: Ibd6b38679d677a59f14450db3224104396c88d2e
2022-02-09 02:06:30 -08:00
Devender Kumar
d70b48ed27 qcacmn: Use sw_peer_id instead of ast_index to get peer
In order to support flow overide feature,
AST table has to be split between RxPCU and DDR.
With this split, RX monitor cannot make use of
ast_index to fetch peer as it is not from DDR.
So make use of sw_peer_id to fetch peer.
This sw_peer_id is derived from RX_MPDU_STAT_START_TLV
Remove the spinlock on unsused variable i.e ast->lock.

These changes were overwritten by monitor segregation
effort, hence bringing back again.

Change-Id: I339f4296562e3b4dfd6f3a71102385e395f00268
CRs-Fixed: 3108200
2022-02-08 04:36:40 -08:00
Adwait Nayak
9a61b83a20 qcacmn: Fix issues in monitor path
1. Replenish path issue:

a. when number of required buffers passed to replenish API is '1',
host does not replenish '1' buffer.

b. If no. of available entries in ring are '0', return sw desc
   back to pool.

2. 32-bit compilation issue

3. Block ppdu desc deliver API when pktlog is enabled for BE

Change-Id: I79ebf1f84830b4c2f5e5b727e3e08c5ee1870898
2022-02-08 00:56:27 -08:00
Amir Patel
28ecc1a2f1 qcacmn: Add RxMON global enable support
Add RxMON global enable support for WKK

Change-Id: If732318788821303441a5db9ebe21bd2d56b3679
CRs-Fixed: 3123532
2022-02-04 19:55:36 -08:00
Amir Patel
8e96dd29e8 qcacmn: Disable Enhanced PPDU stats and low watermark interrupt
Disable Enhanced PPDU stats and low watermark interrupt for WKK

CRs-Fixed: 3120686
Change-Id: I8eecd2e17cb0748d1e7d15b28ce3d16f69fe81d5
2022-02-02 04:25:52 -08:00
Naga
6671e93774 qcacmn: set low threshold interrupt for wkk monitor
set low threshold interrupt for wkk monitor

Change-Id: Ifb29f570677874e34bcaed61d89aae30bd9494e8
CRs-Fixed: 3114973
2022-01-29 19:15:27 -08:00
Adwait Nayak
ada7af683e qcacmn: Fix for sending valid monitor filter setting to FW
Due to usage of lithium specific structure, the filter settings
were not getting reflected in the htt msg that is being sent to
FW. Usage of BE specific monitor pdev structure is helping out
in configuring the monitor filter settings for various modes.

Change-Id: Ie4a59ec16717d752c6c49624142966722bfacc08
CRs-Fixed: 3118596
2022-01-28 05:20:49 -08:00
nobelj
357bfbe52d qcacmn: Add support to Legacy tx monitor and Waikiki
Add function pointers to free buffer address stored in status buffer
and support tx monitor in legacy and Waikiki flow.

Change-Id: I28612d388009292ff751fe514183fb801909f485
2022-01-28 04:05:13 -08:00
Adwait Nayak
3541cb95dc qcacmn: Fix for monitor issue
Enable filter setting for RX monitor.

Change-Id: I6dfe285ac66dd238628cbb54b9e30bb80c8608a0
CRs-Fixed: 3118568
2022-01-27 10:53:28 -08:00
Adwait Nayak
71cb851a00 qcacmn: Filter setting and pktlog processing support
Add filter setting and pktlog processing support for
rx based pktlog.

Change-Id: I64b76759f348ef75b45b4166495aa733995de474
CRs-Fixed: 3109099
2022-01-26 11:00:07 -08:00