Commit Graph

20274 Commits

Author SHA1 Message Date
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
KARTHIK KUMAR T
18c14aed56 qcacmn: Add code to solve the memory leak issue
Add code to solve the memory leak issue

Change-Id: Iecaf7423757cbb82ed4eb8e7f493669a2b76899a
CRs-Fixed: 3617258
2023-09-15 14:29:14 +05:30
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
Karthik Kantamneni
06dfff7c8d qcacmn: Avoid excessive logging in ath procfs read/write ops
Currently logs are being flooded during ath procfs read/write
operations. This excessive logging is causing wlan panic.

Fix this by changing log level from hif_info to hif_debug.
Since these logs printed are not required in normal use case
scenario, will be helpful only during debug purpose changed
log level to hif_debug.

Change-Id: If8ad1a8bf5c427e483c675192dcbd9ce42854ece
CRs-Fixed: 3615763
2023-09-14 11:44:32 +05:30
Krupali Dhanvijay
555d8a4776 qcacmn: Update set_disable_channel_list cmd for 6 GHz channels
Currently SET_DISABLE_CHANNEL_LIST command is used to disable
legacy channels only.

Update this command to accept frequency for all the bands along with
the channel numbers from legacy (2.4 GHz/5 GHz) and update the
channel state in secondary channel list also.

Change-Id: Iecc9f73dca65900d82a2f2a044cb854cea58c638
CRs-Fixed: 3601253
2023-09-13 22:28:19 -07:00
Rakesh Boyina
163480807f qcacmn: Add Extended MLD Capabilities And Operations in Basic ML IE
Add definitions for sub-fields in Extended MLD Capabilities And Operations
of Multi-Link IE

Initialize AAL params in Extended MLD CAP and OP subfield of Basic ML IE

Change-Id: I84dfd7e4682d1ed040c1158e09888ad193aabca2
CRs-Fixed: 3590364
2023-09-13 15:50:26 -07:00
Srikanth Marepalli
f8d554dc22 qcacmn: Send the user configured MFP state in RSO command
Currently the user configured MFP state that comes from the
userspace in connect request is not handled or processed.
Instead the RSN caps from assoc IE of connect request is inter-
sected with AP RSN caps and sent to Firmware using RSO command.
This RSN caps is used in FW in selecting a roam candidate, which
was causing the cross AKM (eg:SAE -> PSK) roam fail.
Hence, use the user configured MFP value in sending the RSN caps
to Firmware.

CRs-Fixed: 3606069
Change-Id: I3facfcf3616667b4749109d26d924c3fb1537494
2023-09-13 14:21:13 -07:00
Rahul Gusain
f0fc4d0daf qcacmn: Code refractor for ML debug id
Currently, in some API such as
"wlan_cfg80211_tdls_add_peer_mlo", when driver gets vdev, it is
MLO vdev, so it uses WLAN_MLO_MGR_ID ID, but when it tries to put
the vdev, since disconnection happens and mlo flag is cleared,
so it uses WLAN_OSIF_TDLS_ID ID which is non-ML vdev.
This causes release of vdev reference from different id for which
it never takes reference and result in crash.

To fix this, use same debug id throughout function. For that,
generalize the get_ml_vdev API by passing the debug id as
argument to the function.

Change-Id: I5800d207fdd17692297e71a0a9cdbcb86a4c5650
CRs-Fixed: 3608817
2023-09-13 14:21:02 -07:00
Aasir Rasheed
1bd26224ae qcacmn: Reconfigure the link info when csa is received
Reconfigure the link information structure for the partner
links and assoc link when a channel switch event is received.

Change-Id: I022bb6c6e2bcf43a1efaa6234e52648142b9fde2
CRs-Fixed: 3599451
2023-09-13 14:20:52 -07:00
Aasir Rasheed
760a93969c qcacmn: Implement handling of mlo standby csa
Implement handling of mlo sta standby csa beacon
and initiate the transmission of a link bss request
command tlv to the firmware for standby link.

Change-Id: Ibdf903c69757b47f301ab9fa7c563407915532d6
CRs-Fixed: 3605764
2023-09-13 14:20:44 -07:00
Pavankumar Nandeshwar
a9d8a404fc qcacmn: Handle special tx descriptor pool cases
Fix the missing special tx descriptor pool cases

Change-Id: Ie6a7539e77b805483c32cb7bcfbc3143f9ef8034
CRs-Fixed: 3610126
2023-09-13 14:20:33 -07:00
Nijun Gong
3b7d208620 qcacmn: set correct buflen value for int ini items
Currently buflen is not updated for int type, causing some
ini items can't be printed via sysfs command.

Change-Id: I86a991252e9fa4031959a51d6827976b6ac89c04
CRs-Fixed: 3612278
2023-09-13 14:20:22 -07:00
Yu Wang
46c1e8cd8d qcacmn: add nl80211 vendor event index for transmit latency stats
Add nl80211 vendor event index
QCA_NL80211_VENDOR_SUBCMD_TX_LATENCY_INDEX, which is used to report
per-link transmit latency statistics.

Change-Id: I62bb668ebf6b3d10c0100448eb41bde29540890d
CRs-Fixed: 3596760
2023-09-13 14:20:12 -07:00
Yu Wang
e60052bdcd qcacmn: define VENDOR_NLA_POLICY_NESTED_ARRAY for nested array policy
To enable support for nested array policy, define macro
VENDOR_NLA_POLICY_NESTED_ARRAY to take care of the version
compatibility.

Change-Id: I2d9e3079c0a6b34c61767ec50b0c404beb3240df
CRs-Fixed: 3596074
2023-09-13 14:20:02 -07:00
Ruben Columbus
4902c68f4d qcacmn: 4k skb buffer change
add new ini to configure skb size and change it in each place its used
correspondingly

Change-Id: Id00c6351bf6bc1b9df5e19064b2057dadd315e9b
CRs-Fixed: 3584462
2023-09-13 14:19:51 -07:00
David Oladunjoye
096449a4fe qcacmn: Get new scan capability
Host needs to check new scan is enabled on device before
sending scan request.
Changes are as follows:

-Add new scan bit to scan obj.
-Fetch new scan service bit from FW.
-Update new scan in scan obj based on service bit from FW.

Change-Id: I19d874e859208dcdb2476e0fd2fbd61fcc77e565
CRs-Fixed: 3509136
2023-09-13 09:33:00 -07:00
Gururaj Pandurangi
0b84f05679 qcacmn: Fix compilation warnings on x86
Fix the compilation warnings on x86.

Change-Id: Ic9edafc5b33462f5c96faa391e6441141aa09837
CRs-Fixed: 3591586
2023-09-12 23:35:21 -07:00
Amit Mehta
c73beace9b qcacmn: Fix direct return while calling dp_set_peer_freq
Currently from dp_set_peer_param while calling dp_set_peer_freq
there is direct return which can result in peer refleak. as there
is reference taken in dp_set_peer_param.

To fix the issue instead of direct return break and release reference.

Change-Id: Ic3cfe993de64566afc13157810b80d3b3b28d244
CRs-Fixed: 3608000
2023-09-12 23:35:10 -07:00
Gururaj Pandurangi
58f09f5f27 qcacmn: Add QCA vendor attribute for TTLM negotiation support type
Add a vendor attribute for an EHT DUT to configure the type of TID-To-Link
Mapping Negotiation Support for testing purposes.

Change-Id: I9e39fa1acfa07bf8e2514172adeed7a7d01f8abc
CRs-Fixed: 3608356
2023-09-12 23:35:00 -07:00
Amruta Kulkarni
7dd25ffe56 qcacmn: Add debug prints for Vdev start and peer assoc
Change is made to add debug prints for VDEV start
and peer assoc commands sent to FW.
This change is made to help with debugging logs.

CRs-Fixed: 3611450
Change-Id: I40a0991330edd4ba71b7b71f2f7cf36364f4f365
2023-09-12 23:34:49 -07:00
Mukul Dhiman
eed178035d qcacmn: add check before % operation
add check before % operation

Change-Id: I4189daf130470f5182a2dec3885a68c7ecf717ec
CRs-Fixed: 3603379
2023-09-12 14:43:25 -07:00
Jinwei Chen
ebc572b89c qcacmn: Support RX MPDU sequence logging from DP
tcp_seq_num and tcp_ack_num in qdf_nbuf_cb is not used
for Beryllium, repurpose them to store RX MPDU sequence
number. get RX mpdu sequence number from DP and store
it in qdf_nbuf_cb for logging later.

Change-Id: I3c21b383d827f12a1e1ec6202a5fc17804dddc1b
CRs-Fixed: 3610468
2023-09-12 14:43:14 -07:00
Jinwei Chen
3102185ee2 qcacmn: Support RX mpdu sequence logging
Support RX mpdu sequence logging for DHCP/EAPOL
/ARP/ICMP.

Change-Id: I38eb8de76b06ae0b6ddbbe65ec850338ebabf2bd
CRs-Fixed: 3610446
2023-09-12 14:43:04 -07:00
Yu Tian
ce3c51dc44 qcacmn: Add more loop to drain CE7 logs before suspend
FW diag drain may got delayed and host may not clear
all the logs in one set. Change is aimed to give more
rounds to try to complete the pending logs before suspend.

Change-Id: I06433a464d96c3c9d96207f6da7a8ea513fcdc9e
CRs-Fixed: 3602039
2023-09-12 14:42:54 -07:00
Gururaj Pandurangi
a2df238f37 qcacmn: Add QCA vendor attribute to configure MLD ID in ML probe request
Add a vendor attribute for EHT testbed STA to configure MLD ID in the ML
Probe Request frame transmitted as part of host initiated scan request.

Change-Id: I759d147238f176a8aa1db62381528f81a92ba459
CRs-Fixed: 3605356
2023-09-12 14:42:44 -07:00
Gururaj Pandurangi
1183f9f58c qcacmn: QCA vendor test config attribute for MLO link powersave
Define a new QCA vendor test config attribute to configure powersave
on MLO links.

This attribute is used for testing purposes.

CRs-Fixed: 3605466
Change-Id: I67daaa5c774aea20f139a60f04758babbfe32319
2023-09-12 14:42:34 -07:00
Yu Wang
77608ba875 qcacmn: decouple TSF auto report from uplink delay feature
TSF auto report is a stand alone feature, which can
be used to sync TQM clock and TSF clock, more than
one features depend on it.
Introduce a new build flag WLAN_FEATURE_TSF_AUTO_REPORT
to decouple it from uplink delay feature.

Change-Id: I5c62bee08d44234dc4936b3c63f3060edec30df8
CRs-Fixed: 3560244
2023-09-12 14:42:24 -07:00
Adwait Nayak
af00744c5d qcacmn: Update tlv hdr size to 8 Bytes for QCA5332 and QCN6432
Issue:
TX Monitor feature is broken recently in mainline (12.4)
for both QCA5332 and QCN6432.

RCA:
As part of tx monitor processing, it is needed to iterate
through the status buffer queue to populate TX PPDU info.
Every TLV present in the status buffer is parsed one by
one. Moving from one to next TLV is done based on:
tlv + tlv length + tlv header size

And the TLV tag gets computed from the initial 4 Bytes of
the TLV; TLV tag is generally used for further TLV parsing
methodology at HOST.

In case of QCA5332 and QCN6432, the tlv header size should
be 8 Bytes, whereas it is 4 Bytes now. Hence, right after the
first TLV is parsed, we see the TLV tag being computed as 0
for the second TLV and since there is a miscalculation of
4 Bytes in every TLV parsing, all other TLV parsings are
improper. This is the reason why the TX DATA TLV is getting
invoked before TX MPDU START; which results into system crash.

Fix:
Update the TLV header size to 8 bytes

Change-Id: Ib2857ae55e309a78ed6ee9bdbe695ae6daa71a08
CRs-Fixed: 3588743
2023-09-11 15:51:07 -07:00
Srinivas Pitla
734c9fcae7 qcacmn: Add WMI service support for WSI stats info
This change adds service bit support for WSI stats
to FW

Change-Id: I06119c2196b951393e8bbbb82bd4a10436207d63
CRs-Fixed: 3601765
2023-09-11 15:50:57 -07:00
Aditya Sathish
25c27f83e0 qcacmn: Add support for WSI link info libraries
Add support to capture ingress and egress stats
in the MLO manager

Change-Id: Ife0acab15ba802c953cfcf3a720c6e54933ded5e
CRs-Fixed: 3601749
2023-09-11 15:50:46 -07:00
Sheenam Monga
80935a3f31 qcacmn: Try SLO if 2 link MLO connection fails
Currently, max retail for connection is set to 1
it means only 2 trials are allowed, in case of 2
link MLO AP logic works fine but for n link only
first 2 combinations will be tried and SLO will
not be tried as no of retries will exceed than max
trials.

Fix is to update max retries to num_of_mlo_link - 1,
so that all combination tll SLO can be tried.

Change-Id: Id3e1da733d77eae79f2389b98ee9a664e44e6a2c
CRs-Fixed: 3607628
2023-09-11 15:50:36 -07:00