Commit Graph

245 Commitit

Tekijä SHA1 Viesti Päivämäärä
Srinivas Girigowda
afd51dc121 qcacmn: Add local packet capture type based filtering
For the control frames regenerated by the host driver based on the
TxMon TLV, add the local packet capture type based filtering.

Change-Id: If6b47368ce36524e1c84c51c298278ced671b915
CRs-Fixed: 3531895
2023-07-18 22:55:44 -07:00
Jinwei Chen
6081fb19d6 qcacmn: Support dp monitor desc pool memory pre-allocation
Support dp monitor desc pool memory pre-allocation.

Change-Id: I7edd766a3f02be76c1e7342ac6a55c02b43474fa
CRs-Fixed: 3544435
2023-07-08 01:26:16 -07:00
Jeevan Kukkalli
89792f7221 qcacmn: Add check for invalid mon rx header
Add check for invalid rx header before processing
TLVs.

Change-Id: I57d3ff6ccc45723eb9b1ef7f048a5ea5a3718e50
CRs-Fixed: 3527793
2023-06-23 04:37:01 -07:00
Balaji Pothunoori
4bc335300f qcacmn: Fix compilation errors
dp_htt_process_smu_ppdu_stats_tlv API is defined inside
QCA_ENHANCED_STATS_SUPPORT along with WLAN_FEATURE_PKT_CAPTURE_V2
protection but API is called with WLAN_FEATURE_PKT_CAPTURE_V2.

There is a compilation error
a. if WLAN_FEATURE_PKT_CAPTURE_V2 is defined and if
QCA_ENHANCED_STATS_SUPPORT is not set.
b. if REMOVE_PKT_LOG and WLAN_FEATURE_PKT_CAPTURE_V2 is set.

This change is to move dp_htt_process_smu_ppdu_stats_tlv
out of QCA_ENHANCED_STATS_SUPPORT and add WLAN_FEATURE_PKT_CAPTURE_V2
protection to avoid compilation errors.

Change-Id: I50093ede0530afa34f501210e5a53fa88e61d863
CRs-Fixed: 3528736
2023-06-20 06:39:09 -07:00
Jeevan Kukkalli
aa280d43e6 qcacmn: Handle duplicate pkt desc in wkk monitor path
Sometimes we receive duplicate packet buffer descriptors.
This results in corruption of descriptor freelist.
Add check to handle duplicate packet monitor descriptors.

Change-Id: I1dd33575fba78a7816063c40bf29ba41f9bcf226
CRs-Fixed: 3519326
2023-06-16 15:03:34 -07:00
Kenvish Butani
8ab3e327e2 qcacmn: Fix the OOM issue seen in ol_stats disable path
currently in disable ol_stats path, if disable ol_stats
is triggered for any pdev, then due to MLO link stats we
disable ol_stats on all pdev's. if the pdev deinit is
already happened then we skip disabling it and dont send
h2t complete free nbuf message, creating OOM. Fix is to
remove the pdev deinit check and disable ol_stats only
for particular pdev and not pdev of MLO.

Change-Id: I6171c6f545ed823cdec211c6ac00b8e0ff93211a
CRs-Fixed: 3511913
2023-06-09 13:50:25 -07:00
Harsh Kumar Bijlani
e0e7eaeba6 qcacmn: Optimize Tx and Rx monitor stats update code
Optimize Tx and Rx monitor stats update code by replacing
multiple if checks with switch case statements

Change-Id: I07dd7784dccdfe0cf0e1ade822746d0c6f55cd95
CRs-Fixed: 3511037
2023-06-07 07:01:06 -07:00
aloksing
a0805fb4d0 qcacmn: Fix double free of frags
When decap type is invalid, freeing nbuf and while next monitor
buffer tlv picking last nbuf from queue. which has allocated frags
and valid data. expecting MPDU END TLV for previous mpdu
before monitor buffer tlv to allocate new nbuf.

Set rx_hdr_rcvd to false when we receive invalid decap type.

CRs-Fixed: 3503694
Change-Id: I97ede9e52df580769b78afc767ba9528914b3ea5
2023-06-05 03:40:10 -07:00
Mukul Dhiman
24fcc62ef2 qcacmn: Fix ol_stats enable if MLO is disabled for BE platforms.
On BE Platforms, currently if MLO is disabled, ol_stats does not
get enable on any soc. Fix is to enable ol_stats on particular
soc if MLO is disabled

Change-Id: I715f06776eda9539f68f440f86e3a403a6b14fa5
CRs-Fixed: 3508711
2023-06-02 16:50:02 -07:00
Jeevan Kukkalli
958704d20e qcacmn: Make dp_rx_mon_append_nbuf function public
Function dp_rx_mon_append_nbuf is now accessed outside
the file where it is declared hence make it public

Change-Id: I6b596815a385ba367f70b9e5ea07c94520cca253
CRs-Fixed: 3488043
2023-05-29 12:54:57 -07:00
Aniruddha Mishra
ba55e0f2a8 qcacmn: Add Tx TLV Recording support
Add Tx TLV recording support for monitor 2.0
Also add support to control Rx and Tx TLV
recording

Change-Id: I27a0d2c9ea8bdfacd46e6b7188b45b08ed47bbcd
CRs-Fixed: 3422787
2023-05-16 11:43:14 -07:00
Srinivas Girigowda
08ea5c2b80 qcacmn: Add support for local packet capture running
Add support for local packet capture running.

Change-Id: Id954c57a32210c180a8e0f9107e2469f96491173
CRs-Fixed: 3415816
2023-05-10 11:51:09 -07:00
Srinivas Girigowda
13554f0cdc qcacmn: Add support for local packet capture stop
Add support for local packet capture stop.

Change-Id: Ib12574f5b418ea009ec35ef85e170bc8c592c86f
CRs-Fixed: 3415812
2023-05-10 11:50:54 -07:00
Srinivas Girigowda
d52311a2b1 qcacmn: Replace IEEE80211_* macros with with QDF_IEEE80211_* macros
IEEE80211_* macros are defined in WIN specific header file which is not
available on MCL side, Hence replace these macros with QDF_IEEE80211_*
macros available in common header file

Change-Id: Ic2caaebacd9edded23aebefab87cd82dbbb06974
CRs-Fixed: 3415721
2023-05-10 11:50:41 -07:00
Srinivas Girigowda
5d8e550bb7 qcacmn: Add support for local packet capture start
Add support for local packet capture start and relevant changes.

Change-Id: I709e41e0be09cf73e93694efc59bfefbf51fe359
CRs-Fixed: 3415788
2023-05-10 11:50:28 -07:00
Srinivas Girigowda
9c855c06e2 qcacmn: Separate out the implementation for RX 2.0 and TX 2.0
Separate out the common function implementing both RX 2.0 and TX 2.0
functionality in to RX 2.0 and TX 2.0 separate functions.

Change-Id: I29337aca9851dce1888a492a9534992277f595b5
CRs-Fixed: 3427301
2023-05-10 11:50:01 -07:00
Srinivas Girigowda
ce736a1d8d qcacmn: Rearrange the functions to appropriate files
Rearrange the functions to appropriate files based on TX and RX 2.0.

Change-Id: Ie8e562a7aecdc91257210b55a323dfe47e67878c
CRs-Fixed: 3427296
2023-05-10 11:49:36 -07:00
Srinivas Girigowda
0419d28f6e qcacmn: Move TX 2.0 code under WLAN_PKT_CAPTURE_TX_2_0 macro
Move TX 2.0 specific code under WLAN_PKT_CAPTURE_TX_2_0 macro.

Change-Id: I20bb1e49a902ec085fbc3df6828fef94a7c577d6
CRs-Fixed: 3415780
2023-05-10 11:48:59 -07:00
Srinivas Girigowda
ec3b9bdbce qcacmn: Move cmn code under QCA_MONITOR_2_0_SUPPORT to TX/RX 2.0 macro
Currently QCA_MONITOR_2_0_SUPPORT macro is used for both TX and RX 2.0.
but on MCC side, only RX 1.0 is supported and as part of this feature
TX 2.0 need to be supported.
Enabling QCA_MONITOR_2_0_SUPPORT will enable both RX 2.0 and TX 2.0, but
to support RX 1.0 and TX 2.0, we need to separate out code under
QCA_MONITOR_2_0_SUPPORT to TX and RX 2.0 macro.

As part of this change, introduce separate macros for TX 2.0 and RX 2.0
and move the common code under both macros.

Change-Id: I7ef7e488800934291538a0bca9acd21e28901214
CRs-Fixed: 3415740
2023-05-10 11:48:32 -07:00
Harsh Kumar Bijlani
2be2bf6a69 qcacmn: Fix memory leaks in Rx monitor path
Fix the following 2 memory leaks in Rx monitor path:

1. When MPDU queue is empty and MON_BUF_ADDR_TLV is received,
   then free page fragment memory.

2. In case of small size packets, 1 MPDU can have more than
   2*QDF_NBUF_MAX_FRAGS fragments wherein each nbuf can have maximum of
   QDF_NBUF_MAX_FRAGS frags. In this case, add the frags to nbuf in the
   following way.

   parent_nbuf (QDF_NBUF_MAX_FRAGS frags attached)
	|
	| (fraglist)
	|
	----> tmp_nbuf1 (QDF_NBUF_MAX_FRAGS frags attached) ----> tmp_nbuf2
							    (next)

Change-Id: I54e8162bf0b9da8629a3c80d123421fbeaf8df11
CRs-Fixed: 3453676
2023-04-27 04:08:30 -07:00
Linux Build Service Account
93bac8788e Merge "qcacmn: Move mon mac filter func to mon ops structure" 2023-04-21 12:47:52 -07:00
Linux Build Service Account
956f3ba2c7 Merge "qcacmn: Fix pad byte place holder calculation" 2023-04-21 09:15:32 -07:00
Jeevan Kukkalli
a913b30811 qcacmn: Move mon mac filter func to mon ops structure
Monitor ops functions are different for version 1 and 2.
Move mon mac filter func ptr to mon ops structure so that
its initialized properly according to monitor version.

Change-Id: Ie07ae3b7d3e9923e463db503aaa8b3500c1e1eac
CRs-Fixed: 3456620
2023-04-19 08:08:00 -07:00
Srinivas Girigowda
3228443af7 qcacmn: Set Tx ring packet type flag properly
Currently, HTT Tx ring packet type flag is set as bitwise operation
which is incorrect and results in "Debug Assert Caught".

Set this CTRL and DATA packet type flag with a value of 1.

Change-Id: I62e89fe637441fcc680ea8d5fe8d157d8e7142ae
CRs-Fixed: 3415733
2023-04-14 08:24:44 -07:00
Srinivas Girigowda
7a5a84d777 qcacmn: Fix compile error 'address of array will always evaluate to true'
address of array 'tx_ppdu_info->hal_txmon.rx_user_status' will always
evaluate to 'true' [-Werror,-Wpointer-bool-conversion]

Change-Id: Ic148f34b82ce756eb07173b43f8f155a7b4a12d9
CRs-Fixed: 3415726
2023-04-14 08:24:33 -07:00
Jeevan Kukkalli
2d6a71891c qcacmn: Fix pad byte place holder calculation
Fix pad byte place holder calculation during restitch

Change-Id: I577a9efe750ef519d2279d5e7426334549550628
CRs-Fixed: 3464890
2023-04-13 17:18:37 +05:30
Sushant Butta
623d334801 qcacmn: Fix typo while getting ppdu_info
Use ppdu_free_list_elem while getting
free ppdu_info from kmem_cache.

Change-Id: I4ea921deb962dafd3f751954d6e7d2f1f98d3125
CRs-Fixed: 3455202
2023-04-06 10:38:34 -07:00
Aniruddha Mishra
dc75883972 qcacmn: Free buffer after processing flush_tlvs
Buffer was freed before processing the TLVs
(while flushing) leading to use after free access.

CRs-Fixed: 3425044
Change-Id: Ida3bcf9add95041c43b2b1e8e3450853bd0ed88c
2023-04-02 06:53:24 -07:00
Jeevan Kukkalli
785b786014 qcacmn: Reduce log level to avoid console flooding
Reduce log level to debug from error to avoid console flooding
when low mem condition is hit.

Change-Id: I0341beed9059c4db2eba2cc481a797d67dd35b25
CRs-Fixed: 3442503
2023-03-31 06:06:54 -07:00
Nandha Kishore Easwaran
41d3710c17 qcacmn: Change monitor print to debug level
Change monitor print to debug level as this print causes flooding
and could potentially lead to CPU flooding.

Change-Id: I76cda51c9d3d0658ebd02b2112fba5310d8eb22c
CRs-Fixed: 3439802
2023-03-29 05:23:39 -07:00
Jeevan Kukkalli
34bcece450 qcacmn: Move cfr mon filter cdp func ptr to mon ops structure
Move cfr monitor filter cdp func ptr to cdp mon ops structure.
cfr monitor filter cdp function is different for 1.0 and 2.0
hence moving the func ptr to mon ops structure ensures that
func ptr is initialized appropriately.

Change-Id: I82b9c85e96f2f219521ae6ed908ade120081c748
CRs-Fixed: 3428791
2023-03-29 01:17:22 -07:00
Hariharan Ramanathan
7a22157418 qcacmn: Changes to make correct buffer allocation for monitor
Changes to allocate correct number of buffers for monitor during boot
time and allocate remaining buffers only when monitor vap is created.

Change-Id: I8a2cd7b6a20a281934c47ca0418904b426d17a4d
CRs-Fixed: 3432525
2023-03-22 10:30:05 -07:00
Jeevan Kukkalli
5b2792536c qcacmn: Move smart monitor cdp func ptrs to mon ops structure
Move smart monitor cdp func ptrs to cdp mon ops structure.
Smart monitor cdp functions are different for 1.0 and 2.0
hence moving the func ptrs to mon ops structure ensures that
func ptrs are initialized appropriately.

Change-Id: Ic827b44f36d76349f397e5b72dec0a127f90aa7a
CRs-Fixed: 3428778
2023-03-22 10:29:56 -07:00
Kenvish Butani
1e6fe4c3a2 qcacmn: Enable MLO Link Stats Support
1) Enable MLO Link Stats Support
2) Add Stats counter to capture Invalid Link ID
3) Fix the FW Recovery crash while ol_stats
   disable.

Change-Id: I1b5263ae024579c5ec2018f8082f0d03ffdf0030
CRs-Fixed: 3431319
2023-03-22 05:58:57 -07:00
Jeevan Kukkalli
96b25fe6e0 qcacmn: Fix compilation issue when rx tag stats macro is disabled
Fix compilation issue when WLAN_SUPPORT_RX_TAG_STATISTICS is
disabled.

Change-Id: I955af07214bcf7b9b2bba17c0f12eb18076c2a48
CRs-Fixed: 3436740
2023-03-22 05:58:37 -07:00
nobelj
0afe701ed5 qcacmn: Add fix to configure word mask
Add fix to configure tx monitor word mask.

Change-Id: Ica66f42de768398b1189dce3d5593c6fb884b35f
CRs-Fixed: 3437660
2023-03-20 23:22:35 -07:00
Nandha Kishore Easwaran
ba9a08a6fc qcacmn: Delete peers when tx monitor is disabled
Delete the litemon peers added when tx monitor is disabled.

Change-Id: If604e0c121690919ac8364f70e2a471df1b7f794
CRs-Fixed: 3412125
2023-03-17 09:13:20 -07:00
Himanshu Batra
21a548ada6 qcacmn: Rename WLAN_TELEMETRY_STATS_SUPPORT to WLAN_CONFIG_TELEMETRY_AGENT
Rename telemetry agent macro WLAN_TELEMETRY_STATS_SUPPORT to
WLAN_CONFIG_TELEMETRY_AGENT

Change-Id: I9b2feb33b32daf56e584ae04f260749c358c8ea4
CRs-Fixed: 3425567
2023-03-16 13:50:32 -07:00
Nobel Sharanyan Jeganathan
799d46a277 qcacmn: invoke hal api to populate word mask
Added hal api to populate word mask

Change-Id: Ic13fdb1fa4104618d67f3f7aae25681951d78581
CRs-Fixed: 3422903
2023-03-16 01:33:31 -07:00
Pavankumar Nandeshwar
80d41dc9b4 qcacmn: Handle Umac reset for MLO case
1. Add an API to process trigger_umac_recovery T2H message.
2. Synchronize do_pre_reset, do_post_reset_start, do_post_reset_complete
   messages for all the SOCs and then process these messages in the host.
3. Synchronize pre_reset_done, post_reset_start_done,
   post_reset_complete_done for all the SOCs before sending it to FW.
4. Add a new state in host for trigger_umac_recovery message.
   Ignore back to back trigger_umac_recovery messages received from FW.

Change-Id: Id45d326d63e122834090844e83ad6cc7240f96af
CRs-Fixed: 3425833
2023-03-15 11:20:26 -07:00
nobelj
3618c82727 qcacmn: Increase capacity to store status buffer in tx monitor
In tx monitor, the maximum capacity to store status buffer is 64.
During high throughput scenario number of status buffer exceeds 64.

Change-Id: I5e8d1945773d2027a4adbc141fa868587e80acd1
CRs-Fixed: 3430126
2023-03-11 13:41:25 -08:00
Kenvish Butani
8984ecea8d qcacmn: Fix for crash during FW recovery
Fix for the crash seen during FW recovery
while doing disable ol_stats for all the
MLO pdev's

Change-Id: Ie7b037e2d124009658a01d2a00d0a74a784ac51f
CRs-Fixed: 3430134
2023-03-11 03:50:37 -08:00
Kenvish Butani
bad3898323 qcacmn: Ini and Config command Support for MLO Link Peer Stats
Add support to enable/disable MLO Link Peer stats through
ini and cfg80211tool enable_ol stats command

Change-Id: Id1229a149befa416d060e1b07eee150e6b295abf
CRs-Fixed: 3397721
2023-03-08 07:43:00 -08:00
nobelj
daa0ae6a5d qcacmn: Modify tx monitor mode change log level
Modified tx monitor mode change log level.

Change-Id: I97233c4c4c86c3af887ccb86b9de4f9174e469df
CRs-Fixed: 3409912
2023-03-07 14:49:50 -08:00
nobelj
20db7b641f qcacmn: Add initial support for word mask compaction
Add initial support for word mask compaction.

Change-Id: Ife05e355395fbc6c6804c34f62954a2b04a2cd03
CRs-Fixed: 3398292
2023-03-02 20:41:06 -08:00
Jeevan Kukkalli
7908154e77 qcacmn: Fix non-raw frag length issue
Subtract L2 header pad byte from frag length
while adding frag to skb

Change-Id: I6b3f710e8a7451de427640fdb92ac45ed97d8097
CRs-Fixed: 3414008
2023-03-01 05:45:12 -08:00
Aniruddha Mishra
cb82f44a0d qcacmn: Add null checks in Rx TLV recording APIs
Add null checks in Rx TLV recording APIs for updating index,
clearing buffer and init deinit.

Change-Id: Iab40bd3130c335924a4849516b71ebaaa88e84bb
CRs-Fixed: 3416657
2023-02-27 00:14:26 -08:00
nobelj
d794bc0885 qcacmn: Add support of EHT and USIG in tx monitor
Added support for EHT and USIG in tx monitor.

Change-Id: I1f6cc345ace19532cc356464c82476b084ca53dc
CRs-Fixed: 3386918
2023-02-26 19:12:52 -08:00
nobelj
40a27a9a55 qcacmn: Adding mlo timestamp offset to tx monitor tsf
Adding MLO timestamp offset reported from firmware to tsf time for
radiotap header populated in tx monitor.

Change-Id: I44f2c1a49d4d2b73ac9117319b72ba8635cb5b38
CRs-Fixed: 3398345
2023-02-23 03:45:13 -08:00
Aniruddha Mishra
a70effe5d4 qcacmn: Restructure Rx TLV recording
Restructured Rx TLV recording implementation.
Shifted definitions to monitor 2.0 files.

CRs-Fixed: 3410093
Change-Id: I083f3a37e5caff668976c9ca955926afe16a242d
2023-02-22 01:54:50 -08:00