Commit Graph

20097 Commits

Author SHA1 Message Date
Jeevan Kukkalli
bafd3ffd85 qcacmn: Use page frag cache to allocate page fragments
Use per pdev page frag cache to allocate page fragments
to efficiently use memory.

Change-Id: I8a16175ac72d56bcd9783ff0590710aa779454cb
CRs-Fixed: 3611781
2023-09-21 17:57:24 -07:00
Manikanta Pubbisetty
8993389ed1 qcacmn: Allocate buffers from WBUFF for fastpath CEs
Currently, buffers attached to fastpath CEs are not being allocated
from WBUFF. Since the buffers attached to the fastpath CEs are
re-usable in nature, allocating such buffers from WBUFF will have
added benefits like allocating from custom page frag cache which
reduces the memory used by the RX buffers.

Therefore, allocate RX buffers for fastpath CEs from WBUFF module.

Change-Id: Iaa913042473d60b184a767ece934bb9063ff4a7e
CRs-Fixed: 3581533
2023-09-21 17:57:14 -07:00
Priyadarshnee Srinivasan
d45510b2bf qcacmn: Fix the oplass cfi mismatch in AFC request
In this Change-ID I9e72c960fefe6fbdc106bb83fb240d84d8522b80, the
80P80 opclass is excluded if the device does not support 80P80
mode of operation. The exclusion of 80P80 opclass is done only
in the AFC request size calculation. In
reg_dmn_fill_6g_opcls_chan_lists(), 80P80 CFIs are added in the
opclass index of 320 MHz. Hence, 320 MHz opclass (137) contains
cfis 7, 23 (which is actually 80P80 CFIS) and this request is sent
to the AFC server. Since, the AFC server does not support 320 MHz
SP operation in CFIs 7, 23, it does not return opclass 137 in the
AFC response. Hence, AP is unable to come up on 320 MHz in SP
power mode.

To fix this issue, exclude 80P80 CFIs in
reg_dmn_fill_6g_opcls_chan_lists() API as well if the device does
not support 80P80 mode of operation.

Change-Id: I3114f52c45f575ba3693dadc0d2a3d42ed513f68
CRs-Fixed: 3593497
2023-09-21 14:36:36 -07:00
Amit Mehta
cf269aa28d qcacmn: Add hif and CE rings to SSR dump
Add hif and CE rings to SSR dump

Change-Id: I6a859f46c9a8cf5813ce26a163b30286969edf4a
CRs-Fixed: 3604906
2023-09-21 14:36:26 -07:00
Amit Mehta
34d88f5bfc qcacmn: print vdev id in failure case
Currently only peer mac address is logged if
failed to find peer, there is no log for vdev id.
If caller has passed wrong vdev_id from current
error print one can not identify the issue.

So to fix the issue add vdev id to error log
to check if vdev_id was passed correctly.

CRs-Fixed: 3616476
Change-Id: I3c500784e744f37dd8a1a2a7b84c7b94baf13149
2023-09-21 14:36:15 -07:00
Amit Mehta
4be2141852 qcacmn: Add fisa table to ssr dump
Add fisa table to ssr dump

Change-Id: Iebf98bfbcb990d21498e1a1946ebc8a0e0b31410
CRs-Fixed: 3604904
2023-09-21 14:36:03 -07:00
Krishna Rao
8dec8f1589 Revert "qcacmn: Protect the Transition Timeout D3.0 changes under D3.0 macro"
This reverts Change-Id I81555fe179a9bba9d871867c8544b566676b0314.

Reason for revert: IEEE802.11be draft 2.0 support has been deprecated.
Revert the commit in order to remove compile time support for 11be
draft 2.0 based EML Capability Transition Timeout subfield value of
11. This is a planned reversal since the compile time support was
intended to be a temporary facility for assisting in the transition to
11be draft 3.0.

CRs-Fixed: 3618130
Change-Id: I5f3a6b343d375184bd6cc7545af8918a3de27fac
2023-09-21 08:36:32 -07:00
Amit Mehta
68f9c374dc qcacmn: Change QDF_MAX_AVAILABLE_CPU value
Currently QDF_MAX_AVAILABLE_CPU value is 8 for QCA_CONFIG_SMP
case, This hard coded value can result in out of bound issue
if available CPUs are greater than 8.

So to fix issue define QDF_MAX_AVAILABLE_CPU value to NR_CPUS.

CRs-Fixed: 3618754
Change-Id: Ic493aac48ac4a4d2fd983a294d45d86bb062fb61
2023-09-21 08:36:20 -07:00
Adil Saeed Musthafa
1737ed366e qcacmn: Add _IS_ML flag attribute to the ADD_STA_NODE QCA vendor command
Add an attribute QCA_WLAN_VENDOR_ATTR_ADD_STA_NODE_IS_ML to the
ADD_STA_NODE command. If this attribute is set, it implies that the node
being added is an MLD node.

Change-Id: I5a8f7248847d14d87116592f0a6de3952aee8664
CRs-Fixed: 3594263
2023-09-21 00:00:29 -07:00
Srinivas Pitla
f1bb50be1b qcacmn: FT over DS association support
Add support for MLD MAC address table to MLD.
This MLD address table allows API to add/delete/find entries by MLD MAC
address. This framework would be used for implementing FT over DS,
where Assoc request is received by AP without receiving Auth request.

Change-Id: I3dbc4c0507f2113d2c0cc5e58f41d69243a4cfc8
CRs-Fixed: 3608944
2023-09-20 23:59:58 -07:00
Aditya Kodukula
7c2ddd6c3e qcacmn: Hide 4th and 5th bytes of MAC address
Currently in the driver, we hide 2nd, 3rd and 4th bytes of the
MAC address in GKI builds. Since 2nd and 3rd bytes are needed for
debugging, hide only 4th and 5th bytes of the MAC address.

Change-Id: Ia432bb0d40e0a09b56e581f192a810e727127d3a
CRs-Fixed: 3616774
2023-09-20 20:10:21 -07:00
Vijay Raj
cabdbfa0c8 qcacmn: Add API to populate parameter for connecting event logging
Introduce API to populate parameter for connecting event
logging in order to be printed after STA INFO
event.

Add wlan_cm_is_first_attempt() api in order to
restrict the logging of STA INFO and connecting
event to first connection attempt.

Change-Id: Ica4253eea71ba72ea5176f733402d0758797463b
CRs-Fixed: 3599759
2023-09-20 20:10:10 -07:00
Yu Wang
8aa054e666 qcacmn: add fields to record transmit timestamp in nbuf cb
Add field 'u.tx.pa_ts.ts_value' to store the driver ingress
timestamp, and field 'u.tx.dev.priv_cb_m.flag_ts_valid' to
indicate whether 'u.tx.pa_ts.ts_value' is available or not.
Both fields must be cleared before fragment mapping, to
avoid overlap with the filed 'u.tx.pa_ts.paddr'.

Change-Id: I645c3c27b0c519417f86e6346f4f018b8d87d701
CRs-Fixed: 3560477
2023-09-20 04:15:55 -07:00
Shashikala Prabhu
5ac8175db3 qcacmn: Use the correct data type to print the time value
The timestamp values in umac reset context saved using uint64_t data type.
Hence, use '%llu' to display these values.

Change-Id: Ifd1069d0d8fdb9c6e7d91bc087d064ef11e3aec4
CRs-Fixed: 3613628
2023-09-19 22:34:16 -07:00
Neha Bisht
012eaa6624 qcacmn: Handle release_src FW packets for ultrafast or ppeds paths
Handle completion of packets with release source as FW even if
ultrafast path flag FASTPPATH_SIMPLE or ppeds flag is set.

Change-Id: I3d6a4bf23000d2ccf0a1a8546a9db3dc63a793e6
CRs-Fixed: 3616109
2023-09-19 12:16:55 -07:00
Huashan Qu
8b628acc7f qcacmn: Add process for CONFIG_ARCH_STACKWALK defined condition
When CONFIG_ARCH_STACKWALK is defined, tracing threads function
qdf_print_thread_trace() will do nothing which is wrong.

Fix is to add process for function qdf_print_thread_trace() when
CONFIG_ARCH_STACKWALK is defined. It's the similar implementation
as 'Change-Id: I99643e1b93251de7453f511d13f5a4a39c56f99c'.

Change-Id: I199c3401e08cf91118106959d16c378fa038e3ac
CRs-Fixed: 3618369
2023-09-19 12:16:44 -07:00
Jianmin Zhu
dfe6f3cf0a qcacmn: Fix SCAN RANDOMIZATION failed for connected state
When F/W triggered roaming and wpa supplicant reassoc happen back to back,
disconnect may happen at last, but set send_disconnect flag of connect rsp
to true for last candidate, not for first candidate.
with Change-Id: I850c20cdfeb0c8423d074094f97c83599e43b409, first candidate
connect rsp is sent to kernel, kernel connected state isn’t cleared,
so SCAN RANDOMIZATION is always blocked later.

To fix it, copy send_disconnect flag of connect rsp from last candidate
to first candidate, then disconnect event of first candidate will be
sent to kernel to clear connected state, SCAN RANDOMIZATION won't be
blocked.

Change-Id: Ib7c0ec5d9b8e99de8f2548718f12ecddc94c792e
CRs-Fixed: 3615898
2023-09-19 12:16:33 -07:00
Lin Bai
f2e5ceb88e qcacmn: Avoid redundant register read
In hal_write32_mb_confirm_retry(), hal_read32_mb() invoked
after hal_write32_mb_confirm() to confirm whether the write-op
executed successfully, which is not necessary in case it was
already confirmed in hal_write32_mb_confirm().

Avoid such redundant register read, if it is confirmed already.

Change-Id: Ib7c0ec5e9b8e99de8f2548718f12ecddc94c792e
CRs-Fixed: 3617529
2023-09-19 02:28:46 -07:00
aloksing
37f00a180c qcacmn: Add Word mask MPDU END TLV for monitor
Receiving MPDU end TLV length as 0
because TLV compaction is enabled and
wmask for mpdu end tlv is set to 0.

Adding word mask for MPDU END TLV.

Change-Id: If065cbf19f979734123a433e467a8a9bb8a1013a
CRs-Fixed: 3613053
2023-09-19 02:28:35 -07:00
Pavankumar Nandeshwar
50089ddecd qcacmn: Handle SG packets in null queue path for KIWI
Handle scatter gather packets in null queue path
for KIWI platform

Change-Id: I3ae3fb20bdddf8b8bf283982772205072dd20bc1
CRs-Fixed: 3609032
2023-09-18 20:29:00 -07:00
Neha Bisht
2e13c17be4 qcacmn: Add API to fetch ast entry by mac and ast type
Add API to fetch ast entry by mac and ast type

Change-Id: Ib8cfa5c269fd10c149804d02fcfae35e88c2a53f
CRs-Fixed: 3614965
2023-09-18 15:32:33 -07:00
Aravind Kishore Sukla
77cbd24eb2 qcacmn: Add check for rf_test_mode to connect in MLO open mode
Add check for rf_test_mode to connect in MLO open mode

Change-Id: Ie23b2c949497fb8f473fe772d68e85654d1baa7c
CRs-Fixed: 3611147
2023-09-18 15:32:23 -07:00
Jinwei Chen
643e1be5db qcacmn: use rssi_comb_ppdu for sniffer rssi
Use rssi_comb_ppdu of TLV WIFIPHYRX_RSSI_LEGACY_E
as RSSI reported in monitor mode on KIWI and HSP.

Change-Id: If9d0e5645c12874af32e43dae596602e446a44b0
CRs-Fixed: 3609169
2023-09-17 19:20:34 -07:00
Neha Bisht
29b42e6ee2 qcacmn: Add hlos_tid_override feature in fast_path for be
Add hlos_tid_override feature in fast_path for be

Change-Id: Ib9d0015993b9c84e047e12cb47dd92eebb84508e
CRs-Fixed: 3613823
2023-09-17 02:36:39 -07:00
Jinwei Chen
65fdbbce9a qcacmn: skip monitor reap timer if irq is enabled
For CFR test, monitor reap timer will start, meanwhile
irq for monitor status ring is also enabled, these two will
conflict and access mon_pdev->rx_status_q in the same time,
skb double free issue is reported.

If irq for monitor status ring has been enabled, skip to start
monitor reap timer which is unnecessary.

Change-Id: Ic015d370cb80604d7e4c261054ad529b64edca25
CRs-Fixed: 3614097
2023-09-17 02:36:28 -07:00
Aasir Rasheed
52662b6274 qcacmn: Prevent key install before receiving from user space
To prevent key installation in firmware before receiving the key from
user space. Currently, host receive the key in one thread
while simultaneously installing keys in a scheduler thread.

This change aims to resolve the synchronization issue by allowing key
installation only in one thread.

Change-Id: Ib5772cd2d0ed470756a4222aa9e11c356390f014
CRs-Fixed: 3591663
2023-09-16 07:46:23 -07:00
Namita Nair
aeee5c16cc qcacmn: Perform runtime and system resume before checking target state
During FILTER_RESERVE request of OPT_WIFI_DP perform both
runtime resume and system resume before checking target
suspend state.

Change-Id: I2ee92c28fb34f07e372f676f34c5561795bd9c37
CRs-Fixed: 3611474
2023-09-16 07:46:11 -07:00
Pavankumar Nandeshwar
df8baa952a qcacmn: Use correct parameters for call to dp_tx_desc_find
Use correct parameters for call to dp_tx_desc_find in
case of rh platform

Change-Id: Ic57c68fd134511d907fb966f7a089de1614ee464
CRs-Fixed: 3615517
2023-09-16 07:46:00 -07:00
Sushant Butta
37c16635b1 qcacmn: Set fast_tx flag when ol_stats are disabled
Set fast_tx when ol_stats are disabled in
ultra_fastpath to avoid Tx completion overhead.
And also includes following fixes:
cdp support to get jitter stats
cdp support to set/get vow stats
cdp support to get Sojourn Stats

Change-Id: I8bdb176edbdf210b4dedfaa117f058f57bd17241
CRs-Fixed: 3604215
2023-09-16 07:45:49 -07:00
Karunakar Dasineni
6bb232bd38 qcacmn: Fix negative shift operand
Fix to avoid negative shift.

Change-Id: Idff0836e7e5ded0aeca400b057790df26c1c67fd
CRs-Fixed: 3609048
2023-09-16 07:45:38 -07:00
jinbao liu
29b3272233 qcacmn: Remove RX_REFILL_BUFF_POOL_SIZE related MACROs
This change removes two MACROs: DP_RX_REFILL_BUFF_POOL_SIZE
and DP_RX_REFILL_THRD_THRESHOLD because they have been made
configurable. Thus, they can be customized as per platforms.

Change-Id: Iba63b6fc9c9a0be764d35882f60c61867f969afe
CRs-Fixed: 3602356
2023-09-15 21:10:03 -07:00
Yu Wang
f58ded2316 qcacmn: Add a QCA vendor sub command for transmit latency statistics
Add a new QCA vendor sub command QCA_NL80211_VENDOR_SUBCMD_TX_LATENCY to
configure, retrieve, and report per-link transmit latency statistics.

When used as a command, userspace configures transmit latency monitoring
and get the corresponding statistics of the last period. When used as a
command response, driver replies the get action from userspace with the
statistics of the last period. When used as an event, driver reports the
statistics periodically.

Change-Id: I46966cd6bbad2deed7b2ad81e730170625907f67
CRs-Fixed: 3603431
2023-09-15 21:09:53 -07:00
Vijay Raj
75a684099b qcacmn: Add support to handle WMI_MLO_LINK_STATE_SWITCH_EVENTID
Register event handler for WMI_MLO_LINK_STATE_SWITCH_EVENTID.
Add target if event handler for the
WMI_MLO_LINK_STATE_SWITCH_EVENTID event, and register
corresponding mlo manager callbacks.

Add extract API for link state switch event parameters received
Call the diag event API from MLO manager post extracting the
event

Change-Id: Ib588ee87a5c37c6a34c86ce8cbf134a273c6461b
CRs-Fixed: 3610041
2023-09-15 21:09:43 -07:00
Namita Nair
429dc9c9e6 qcacmn: Ensure rx_desc->unmapped is set to 1 before releasing lock
Originally Change-Id: I9fa71bdb6d4e4aa93fc795cc5dd472a181325991
was brought in to fix a race condition between Rx buffers
map/unmapped in dp_ipa_handle_rx_buf_smmu_mapping() and at the
same time map/unmapped from dp rx replenish context.
The fix ensured that rx_desc is unmapped and rx_desc->unmapped=1
flag will be set atomically within a lock.

But Change-Id: Iadb40071fb733cc4de3291784df5075d5a099a8e
introduced a flaw by releasing the lock before setting the flag to 1.

This is currently causing race condition and causing double
unmap calls when IPA smmu pool unmap and dp_rx_replenish unmap
is running in parallel. This change will fix this issue, by setting
the flag before the lock is released.

Change-Id: I3533bb5f6cc0437395149cd3c718826ef0b482a3
CRs-Fixed: 3594252
2023-09-15 21:09:32 -07:00
Namita Nair
8de279eab8 qcacmn: Handle ipa_mapped flag correctly to prevent race
Currently soc->ipa_mapped flag is set to true only after all
the buffers are SMMU mapped to IPA. This leads to a race
window where Rx buffers routed to WLAN HOST in the replenish
path are not mapped to IPA, as the ipa_mapped flag is still
set to 0. The fix is to set the ipa_mapped flag to 1, right when
the IPA pipes are enabled, before waiting for the complete
buffer pool to be IPA SMMU mapped.
With this fix, RX buffers can be unmapped and mapped to IPA
domain in dp_pdev_rx_buffers_attach() and
dp_pdev_nbuf_alloc_and_map_replenish() in WLAN host RX path when
ipa pipes are enabled.

This change also renames ipa_mapped flag to ipa_map_allowed.

Change-Id: Ibbe50cb211f858a3372e31644df2f5e98f99a292
CRs-Fixed: 3569745
2023-09-15 21:09:22 -07:00
Namita Nair
1f2104b733 Revert "qcacmn: Initialize ipa_mapped to 1 in soc attach"
This reverts Change-Id: Idcb86db99f522959b639865f77178cd47a234277.

Change-Id: I3084631103fa3e1937605af5ed5e14b8348cef57
CRs-Fixed: 3569762
2023-09-15 21:09:12 -07:00
Surya Prakash Raajen
06a7a53dde qcacmn: Add support trap protocol tagged packets for trigger
Add support to trap protocol tagged packets for the unique
metadata to send it as trigger to standby application

Change-Id: I76644477d1df2a0851472283623c1dc3dbe19b8b
CRs-Fixed: 3608436
2023-09-15 21:09:01 -07:00
Himanshu Batra
f07920991b qcacmn: Check return value for scheduler post msg
Check return value for scheduler post msg for disconnect message

Change-Id: Ib6ebbd5d043cf48410ff902ec6eacbaf3a7f3c2a
CRs-Fixed: 3614968
2023-09-15 17:34:34 -07:00
Shailendra Singh
e5f0c4c549 qcacmn: Limit non-SRG PD threshold upto MAX allowed limit
Limit non-SRG PD threshold for upto minimum of MAX allowed limit
and AP advertised value and check AP nonSRG PD threshold
with correct signedness.
Change for debug print to display param value in hex.

Change-Id: I630aa894c856226a886161ced648073782f379bc
CRs-Fixed: 3598056
2023-09-15 17:34:23 -07:00
Surya Prakash Raajen
ff56ef27f4 qcacmn: Add mlo teardown support for standby active mode
Add mlo teardown support for standby active mode in
mlo setup sequences and wmi

Change-Id: Iaa727527c53ff0ad6c7682e039ef23fa537e1ae0
CRs-Fixed: 3613367
2023-09-15 17:34:13 -07:00
Yu Wang
3f6e59aef9 qcacmn: add support for transmit latency stats
Add support for per-link transmit latency statistics

Change-Id: Iadb87deb6e19cd4d9f86565fe687c7d9a1f05679
CRs-Fixed: 3597028
2023-09-15 17:34:02 -07:00
Gangadhar Kavalastramath
48f4d53901 qcacmn: Configure STA with default non-SRG SR parameters
Currently, STA cannot perform SR when SAP does not include SR
IE in Beacon/Probe response/Assoc response.

This change is done to configure default non-SRG OBSS PD
parameters in FW in this case.

Change-Id: I8effbc31631267bd96a269e0bffff74139dafaf1
CRs-Fixed: 3607399
2023-09-15 17:33:51 -07:00
Amit Mehta
4d62f37743 qcacmn: Add nbuf history to SSR dump
Add nbuf history to SSR dump

Change-Id: I3a4b14ccf0c10007107b9a802b29a89fa7ac36fa
CRs-Fixed: 3604907
2023-09-15 07:44:08 -07:00
Harsh Kumar Bijlani
acb5e1d631 qcacmn: Add proper handling for failure cases
Add proper handling for failure cases

Change-Id: I5c54a8c0e38a034cc5abfc1bb3ec006841d5f273
CRs-Fixed: 3612145
2023-09-15 07:43:56 -07:00
Nandha Kishore Easwaran
46aca5dfc5 qcacmn: Add srng disable function for 5332
Add srng disable function for 5332. This is required for
umac reset feature. Also, Avoid srng disable for lmac
rings.

Change-Id: Ieccc86134ee4d1cc3cd8a31a62f8fdf3afd5faf9
CRs-Fixed: 3599325
2023-09-14 12:01:02 -07:00
Amrit Sahai
ce15cf8067 qcacmn: Optimize Event Based Mechanism to reduce delay
Wait for firmware response only if the response
is pending after posting the txrx stats query to firmware.

Change-Id: Ib300f97bc2cc08a2947be9021ff3e399191d1c8e
CRs-Fixed: 3599915
2023-09-14 08:42:03 -07:00
Nandha Kishore Easwaran
6a86e5ed40 qcacmn: Fix Big endian compilation
Fix big endian compilation.

Change-Id: I3e91de028e9faf86b40d95688712e859b3082575
CRs-Fixed: 3613025
2023-09-14 08:41:51 -07:00
Hariharan Basuthkar
612d025fdf qcacmn: Modify reg_get_subchannels_for_opclass to fix a compilation issue
When WLAN_FEATURE_11BE flag is disabled, if opclass is 137, the API
reg_get_subchannels_for_opclass chooses the nchans as 16.
But the maximum size of the subchannels buffer is 8.
This leads to an array out of bound access issue.

To fix this issue, modularize reg_get_subchannels_for_opclass by
adding a new subfunction reg_get_nsubchaneels_for_opclass to get the
nchans. The maximum nchans returned by reg_get_nsubchanels_for_opclass
is 8, if WLAN_FEATURE_11BE is disabled.

Change-Id: I50095768e4a232fa83f1bc69690f64a745eecb05
CRs-Fixed: 3607354
2023-09-14 04:45:30 -07:00
Shwetha G K
2c7b2d2388 qcacmn: Fix OOB issue
Changes to fix OOB issue seen util_scan_parse_beacon_frame.

CRs-Fixed: 3582496
Change-Id: I53244be54d31e87b55d0b44ce94315c8001f417d
2023-09-14 04:45:19 -07:00
Jeevan Kukkalli
29bda86420 qcacmn: Avoid double monitor rings deinit
Avoid redundant call to monitor rings deinit during
pdev deinit.

Change-Id: Ib298203b1fee5897371d9d5e13d0fb4abe118077
CRs-Fixed: 3613036
2023-09-14 04:45:07 -07:00