Commit Graph

19909 Commits

Author SHA1 Message Date
Yu Tian
5040e12d35 qcacmn: call fw diag drain before complete ce tasks
FW diag drain may wake up delay reg write WQ, and this
happens after ce tasks completion check. Change is to
make FW diag drain operation before complete check.

Change-Id: I209c88cc5c2d5cb3b3195d1ae08b4c0c29903fa5
CRs-Fixed: 3591738
2023-08-26 02:39:51 -07:00
Shreedhar Parande
0394351f22 qcacmn: Do not reset linkid for bridge vap
Link ID for the bridge vap is set during creation.
However during mlo ap vdev attach, it gets overwritten by 0.

Due to this, during 2.4 GHz link removal using ml-reconfig,
2.4 GHz linkid and bridge vap as primary vaps linkid matches
which leads to full disconnection of the peer.

To fix this, retain previously set linkid for bridge vap.

Change-Id: I28a3da110aa6427ae7024fe173ae04c5a6bebe41
CRs-Fixed: 3592545
2023-08-26 02:39:40 -07:00
Srikanth Marepalli
9bd38fc965 qcacmn: Define QCA vendor attribute for high RSSI roam trigger threshold
Define an attribute for high RSSI roam trigger threshold. STA is
expected to trigger roam if the current connected AP's RSSI gets above
this high RSSI threshold. STA's roam attempt on high RSSI threshold aims
to find candidates from other better Wi-Fi bands.

Change-Id: Ie0323ff990e2679fd9768d2242730f7369cdb64f
CRs-Fixed: 3586127
2023-08-26 02:39:29 -07:00
Vinod Kumar Myadam
151331ba76 qcacmn: Validate num_links before accessing data
In util_parse_rv_info_from_linkinfo, accessing the array of data
without validating the index of the array will cause OOB issue.

Add check with the maximum size of the array before accessing the
data.

Change-Id: Ie8b33c83fa1cd18cfbfcb6c7a82b79ddd86e8808
CRs-Fixed: 3580821
2023-08-26 02:39:18 -07:00
Amit Mehta
fcf4ae51f3 qcacmn: Add changes to update band info in nbuf cb
Add changes to update band info into nbuf cb for
connectivity logging.

Change-Id: Iec5e91fe6b39a9a0f8a7a37d4945914d7a9e748f
CRs-Fixed: 3571823
2023-08-25 18:06:06 -07:00
Amit Mehta
6f26807730 qcacmn: Add band in nbuf priv cb
Add band in nbuf priv cb

Change-Id: I0e740609982eaafc3678b8d17db77a6d8eeed5de
CRs-Fixed: 3598829
2023-08-25 18:05:56 -07:00
Aditya Kodukula
16020acc91 qcacmn: Include structures having qdf_bitmap member
Currently kernel-doc script doesn't support qdf_bitmap
struct member. So, all structure which has qdf_bitmap
member are excluded.

Support for qdf_bitmap has been added to kernel-doc script.
So, include all structures which have qdf_bitmap.

Change-Id: I95095d458152a0285a24fba398b46effd94525db
CRs-Fixed: 3598814
2023-08-25 15:15:15 -07:00
Venkateswara Naralasetty
a641238d80 qcacmn: Enable wlan datapath CE IRQ affine
Set affinity to assign WLAN CE datapath IRQs to perf clusters
based on the INI config.

Change-Id: I63f96bc6b434af2e322ef277096e5547cfa6835a
CRs-Fixed: 3590583
2023-08-25 15:15:04 -07:00
Manikanta Pubbisetty
9d8d909ff1 qcacmn: Fix truncation issues due to typecast in QDF time APIs
Currently there is an issue wrt truncation in the __qdf_system_time_after()
& __qdf_system_time_after_eq() QDF APIs where the input system ticks
(jiffies) which are of type unsigned long are getting truncated due to
typecast to long before comparison. Due to this typecasting, there is
likelihood of a wrong comparison resulting in wrong actions being
taken in the caller.

Typecast the result of the comparison instead to fix this problem.

Change-Id: I4741d9606d9e3462b8dd4736e5612f4a3008000b
CRs-Fixed: 3591262
2023-08-25 09:07:16 -07:00
Shwetha G K
b2de6ec785 qcacmn: Consider FW provided invalid phase values
FW sets 0xFFFF as invalid phase delta in invalid cases.
Retain same in HOST as well. In case of valid phase, add the
ibf cal value to the delta & ensure the derived phase value
is in the range of 0 - 1024 indicating 0 - 360 degrees

CRs-Fixed: 3597123
Change-Id: Ie259eb6c34393688c987a18859aa5036aa28b9da
2023-08-25 09:07:05 -07:00
Vignesh U
36b33094be qcacmn: Move the generic regulatory function outside 6 GHz macro
The definition of the function reg_get_pdev_from_phy_id() is placed
inside the 6 GHz specific macro CONFIG_BAND_6GHZ.

The function is a generic function applicable for non-6 GHz platforms.
Move the definition outside the macro.

Change-Id: I899813268daec85f1393d83b593a7664ae4aaabd
CRs-Fixed: 3595223
2023-08-25 09:06:54 -07:00
Chunquan Luo
633bdcaa81 qcacmn: Switch static func of chan_width to common
Remove static from func target_if_phy_ch_width_to_wmi_chan_width
for it can be share at other place.

Change-Id: I2ec80040fbe61a7691b1ad8e7b6501eb154abb44
CRs-Fixed: 3578269
2023-08-25 06:05:15 -07:00
Venkateswara Naralasetty
b5028a76d4 qcacmn: Enable interrupts on RXDMA MONITOR STATUS ring for wcn6450
Enable interrupts in monitor mode for wcn6450.
Interrupt configuration related code is moved from dp_main.c file to
dp_rings_main.c file as part of 'Ie58eae34a2da77c2d63870fab74b9d2d9d49c14a'
as Evros does not use dp group interrupts.

Move back the interrupt configuration related code from dp_rings_main.c
to dp_main.c  to enable interrupts in monitor mode for wcn6450.

Change-Id: I7a3cbbe905072dad1cf38799ac6ef441281f78f9
CRs-Fixed: 3565734
2023-08-25 03:03:23 -07:00
Krunalsinh Padhar
b3727d63af qcacmn: Improve logging for ml_peer_count decrement
Added logs to make sure ml_peer_count has decremented every time mlo
peer is detached and catch rare instance when ml_peer_count is not
decremented properly.

Change-Id: Ic174a0bce22a8a85e9df4ccb840de023b45a7f9d
CRs-Fixed: 3580583
2023-08-24 21:15:24 -07:00
Chaithanya Garrepalli
a0e560c475 qcacmn: Add arch ops for get chip id API
Add arch ops for dp_mlo_chip_id to avoid access
of dp_soc_be struct for LI platforms

Change-Id: Idc7612ef3c517aa62668fe15e51b5e5ec74bb253
CRs-Fixed: 3582795
2023-08-24 04:18:49 -07:00
Arun Kumar Khandavalli
0979038391 qcacmn: Add backport flag support for netdev registration
Add backport flag support for enabling cfg80211 netdev
registration APIs.

Change-Id: Id76c938deb54837de85fbf3438c70a9b509adac8
CRs-Fixed: 3589954
2023-08-24 04:18:38 -07:00
Balaganapathy Palanisamy
b7aac4a3be qcacmn: Ignore ap vdev count initialization
Avoid ap vdev count initialization through mlo
bridge vdev.

Change-Id: Id8845f2499d2064ec768e90ffa6324bfde60d3d9
CRs-Fixed: 3592556
2023-08-24 04:18:27 -07:00
Chunquan Luo
df30eaaa50 qcacmn: QCA vendor attributes for updating roaming AP BSSID info
Add vendor attribute IDs QCA_WLAN_VENDOR_ATTR_ROAM_STATS_ORIGINAL_BSSID,
QCA_WLAN_VENDOR_ATTR_ROAM_STATS_CANDIDATE_BSSID, and
QCA_WLAN_VENDOR_ATTR_ROAM_STATS_ROAMED_BSSID for updating roaming AP
BSSID to user space to enable user space collecting the BSSID for
roaming issues.

Change-Id: I7e41762309740e4b705c58d9340ad20fb179172b
CRs-Fixed: 3582516
2023-08-24 04:18:15 -07:00
Guru Pratap Sharma
dbd510c42c qcacmn: handle integer underflow in util_gen_new_ie
handle integer underflow for subie_len in util_gen_new_ie

Change-Id: I2f73e5a7e0462100deae1e85e6a51f77bfc46b95
CRs-Fixed: 3582487
2023-08-24 01:26:59 -07:00
Edayilliam Jayadev
8d3856c308 qcacmn: Handle snapshot sanity failure
Gracefully handle the scenario of snapshot sanity failure.

Change-Id: Icd6fcd83da8ffcfd41e254dc90a94b08ab264b37
CRs-Fixed: 3593921
2023-08-24 01:26:48 -07:00
Nijun Gong
4cadebf03f qcacmn: try to allocate contiguous dma buffer
For some target like ROME, CE try to read more data than expected as
prefetch. For example in UDP TX case, when CE read a tx_desc(44 bytes)
located in host memory with SMMU mapped address 0x1025FFD4~0x1025FFFF,
SMMU will detect CE read beyond 0x1025FFFF to access 0x10260000. SMMU
fault will happen if 0x10260000 is not mapped to host memory.

To fix this issue, allocate contiguous dma buffer for all 1056 tx_descs,
which will map to contiguous SMMU address region.

CRs-Fixed: 3588459
Change-Id: Id0287b051f792f18d746baf39e1c66d076c9be3c
2023-08-24 01:26:38 -07:00
Karthik Kantamneni
8aa322295a qcacmn: Enhance latest HIF CE event history
Latest CE event history is helpful to analyze CE reaping
issues when dump is not available. Enhance latest HIF CE
event history to capture last two events, so that during
error situations more data is available to detect CE
reaping issues.

Change-Id: I503ec5c84ff02b967e1ce93954725ffd9866e93c
CRs-Fixed: 3590596
2023-08-23 19:37:19 -07:00
Pavankumar Nandeshwar
ad866ad37f qcacmn: Avoid asserts in dp related to HW interactions
Avoid asserts in data path which related to HW interactions
and instead use work arounds.

Change-Id: I86089d21c5be23784f8a077b085f3f3b8a2308e4
CRs-Fixed: 3564940
2023-08-23 10:33:18 -07:00
Kiran Venkatappa
42e618a774 qcacmn: Add support to send TWT IE in assoc/probe rsp
Add support to send TWT IE in assoc/probe rsp to fulfill WFA requirement
FW sends TWT IE in mgmt rx event for probe req and assoc req. Send this
IE in probe rsp and assoc rsp. This change takes care of extracting TWT
IE in mgmt rx event.

Change-Id: I1a97eb58c03f76c7ced31349dc0e3b4a908ceda0
CRs-Fixed: 3585625
2023-08-22 19:23:56 -07:00
uvignesh
2bd93270d4 qcacmn: Return the status of regulatory init_cc handlers
When setting the country from user space, the thread sleeps and waits for
the init_cc event to awake. Right now the thread is woken up only in 2
case:
(i) when the country configuration is success from FW and regulatory and,
(ii) when country configuration failed in FW.

The thread is not woken up if there is failure in regulatory. This is
leading to timeout which will assert the kernel. In order to handle all the
return errors from the regulatory init_cc event handler should execute and
the status should be returned to thread waiting for the init_cc event
irrespective of the status of the init_cc handler. In order to achieve
this, the following actions are taken:
(i) Introduce a new regulatory tx_ops set_wait_for_init_cc_response_event()
that will wake up the thread waiting for init_cc response and return the
status of the init_cc response handler.
(ii) Remove the tx_ops set_country_failed() which just sends the failure
status to the thread waiting for init_cc event. This will be handled by the
new tx_ops.
(iii) Send the status of init_cc handler using the new regulatory tx_ops.

Change-Id: I1b29651682e9b7219d428c13d6d0ea299d6f81ba
CRs-Fixed: 3552823
2023-08-21 20:01:18 -07:00
Vinod Kumar Pirla
9e3a7ecb78 qcacmn: Allow disconnect req in INIT state for link switch
VDEV is moved to INIT state as part of link switch disconnect,
before set MAC address response is received, any disconnect
request on this VDEV will not be handled as VDEV is in INIT
state, if link switch is in progress then it will abort link
switch and starts link switch dequeue process.

If the new disconnect request is from userspace it will
increment the OSIF ops, but if link switch is on assoc VDEV
OSIF is notified to restore the adapter deflink as part of
link switch complete where it wait for all OSIF ops to
complete. This is a deadlock case where driver is waiting
for ops completion on same thread where ops is initiated.

To fix this issue, do not handle link switch dequeue on the
same thread, instead move the link switch state to abort
and when actual link switch thread comes it will flush from
serialization.

If userspace disconnect is not queued as VDEV is in INIT
state due to link switch, kernel won't be notified about
the disconnect as this notification is only done on assoc
VDEV and any further connect requests from supplicant gets
dropped in kernel saying already connected and supplicant
will immediately try disconnect which driver will again
drop as VDEV is in INIT state. To avoid this kernel-driver
out of sync, forcefully move VDEV to disconnecting state
and queue the disconnect request.

Change-Id: I116859601ebba21d44797e74e160b56532ef833c
CRs-Fixed: 3588936
2023-08-21 15:05:50 -07:00
Aravind Kishore Sukla
78d988e666 qcacmn: Reject partner link based on security check
For multi link connection there might be the case where
rsnxe of the AP is not present on the link vdev.
This causes the link vdev alone to downgrade to 11ax
mode and assoc vdev is in 11be dot11 mode.
So for vdev with ML peer, the dot11mode is 11ax,
which causes abnormal firmware behavior.

Reject the partner link that doesn’t pass the security
check and validate the next available partner link.
if none of the partner link passes the security check,
proceed connection with single link.

Change-Id: I080557027180c0566a1c284a93fcc4b69c61a9c8
CRs-Fixed: 3581189
2023-08-21 10:58:15 -07:00
Vinod Kumar Pirla
15b56b62e4 qcacmn: Move frame control values to header file
Move the frame control values used for link specific rsp
generation to a header file to access in other source files.

Change-Id: Ib531b9ae88604e98b9119efa610757dc5f399596
CRs-Fixed: 3586052
2023-08-21 10:58:03 -07:00
Krunalsinh Padhar
d0b7f167df qcacmn: Extend QCA vendor command to include more params for netdev events
Extend enum qca_wlan_vendor_attr_mlo_peer_prim_netdev_event to add MLD
MAC address, the number of links, and link info. Link info contains
ifindex and MAC address of each link of a non-AP MLD that was negotiated
in ML association.

CRs-Fixed: 3591427
Change-Id: I82adfc6a0c0cd31a2a322c09b25f93cfe9753343
2023-08-18 21:44:26 -07:00
Sheenam Monga
f02143c909 qcacmn: Change union to structure to handle multiple stats
Currently, If FW sends both mac and counter stats data then
some data may get overwritten as union of structures can
handle only one structure data at a time.

Change-Id: I30f82ac1b3965f504d268e39a2516f57edc6ce38
CRs-Fixed: 3592413
2023-08-18 21:44:15 -07:00
Amit Mehta
38997d7722 qcacmn: Fix format specifier for macro which uses BIT()
BIT() is unsigned long int, and is being printed using
an incorrect format specifier. This leads to a compilation
failure.

Fix the format specifier for macro which uses BIT().
also typecast the macro to unsigned long for CONFIG_SLUB_DEBUG_ON
case where IS_CE_DEBUG_ONLY_FOR_CRIT_CE is of type unsigned int.

Change-Id: I5a717fd45c80b8245522c895c36aaafd46592454
CRs-Fixed: 3591809
2023-08-18 21:44:05 -07:00
Rakesh Boyina
64dc3a4199 qcacmn: Add Max ML Peer ID support from target capability exchange
Add support to parse the Max ML Peer ID's parameter received from target
capabilities and update the parameter in global MLO context.

Change-Id: I4118d288a312dc4a18182caf765b0ded014b985a
CRs-Fixed: 3556542
2023-08-18 18:11:11 -07:00
Uraj Sasan
85dafccb66 qcacmn: Handle bridge peer creation in WDS station
Handle case where device topology needs bridge peer.
So if the device have connection on two opposite links
create bridge peer on the central vap.
Sample topology:
AP
2 GHz<-->6 GHz MLO Links
STA topology
       (5 GHz Low VAP)
         chip0
      /         \
 (2 GHz VAP)chip1    chip2 (6 GHz VAP)
      \         /
         chip3
       (5 GHz High VAP)
In the above case we will have Bridge peer on either
5 GHz Low or 5 GHz High VAP

CRs-Fixed: 3575939
Change-Id: I923cc01b3c6e23099436a25565cbabab5a08d93c
2023-08-18 18:10:58 -07:00
Paul Zhang
674627f868 qcacmn: Fix use-after-free issue in util_scan_parse_mbssid
In some scenario, mbssid_info->prof_residue could be set to
true, hence mbssid_info->split_prof_continue will also be
set to true. Then for the next loop if buffer split_prof_start
is freed but split_prof_end does not reinitialize to NULL,
then use-after-free happens.

To address this issue, reinitialize split_prof_end properly
when split_prof_start is freed.

Change-Id: Iad7448868cfa4c2dd7922f6c1b2622cf20a6a28c
CRs-Fixed: 3583521
2023-08-18 18:10:48 -07:00
Priyadarshnee Srinivasan
7c029d5026 qcacmn: Remove trace_info debug under trace_debug
Remove QDF_TRACE_INFO_HIGH_NO_FL definition under
ifdef WLAN_LOG_DEBUG. QDF_TRACE_INFO_HIGH_NO_FL is added under
ifdef WLAN_LOG_INFO as a part of this change id
I879a9d917ff698aeb6b3e53a85c765a74a902b36.

Change-Id: If49c86432f2b3179ea097e7f1ee53e90a8b1adda
CRs-Fixed: 3586206
2023-08-18 18:10:38 -07:00
Pragaspathi Thilagaraj
088f88a3a3 qcacmn: Update version for some supported feature set
Update version for vendor request 1 and vendor request 2 as
below:
vendor_req_1_version: WMI_HOST_VENDOR1_REQ1_VERSION_4_00
vendor_req_2_version: WMI_HOST_VENDOR1_REQ2_VERSION_3_50

Change-Id: Ib8ff2596c415453c26de3d7d26dce5dceed30556
CRs-Fixed: 3589711
2023-08-18 18:10:28 -07:00
Kenvish Butani
b3f6de339b qcacmn: Move CDP common MLO ops under MLO Macro
Move CDP common MLO ops under MLO Macro

Change-Id: Icd1f13856091c973d213d0d90aabfe86bd588cdd
CRs-Fixed: 3590973
2023-08-18 18:10:17 -07:00
Amrit Sahai
f223bd29ee qcacmn: Add support for to_stack at link level
Add support for to_stack at link level

Change-Id: I794a1bd8ef78a3af15f006ac3306b1c9b23e457d
CRs-Fixed: 3571870
2023-08-18 18:10:07 -07:00
Ashish Kumar Dhanotiya
a0bd216fc8 qcacmn: Add support for LL_LT_SAP_MODE in policy mgr
Currently PM_LL_LT_SAP_MODE is not handled in policy manager.
With this change add support for PM_LL_LT_SAP_MODE in the policy
manager.

Change-Id: I7b893b04498957eb4a7e9f74c4b4395d4a823bf9
CRs-Fixed: 3536612
2023-08-17 21:01:54 -07:00
Abhishek Suryawanshi
a9e5f6f098 qcacmn: Added indices in QDF_MODULE_ID enum
Added indices in QDF_MODULE_ID enum in qdf_types.h file

Change-Id: Ie2ab6286b83a4c1b13b84b1c37e464dc6f8534ba
CRs-Fixed: 3576567
2023-08-17 18:07:14 -07:00
Rajeev Kumar
d2dec1752c qcacmn: add enter and exit debug logs for mgmt_txrx module
Add enter and exit debug logs for mgmt_txrx module to assist
in debugging timeout issues.

Change-Id: Iad28dca3fa749f803829cd7a2e052578a5c579e8
CRs-Fixed: 3584331
2023-08-17 09:43:12 -07:00
Vinod Kumar Pirla
9319e99df8 qcacmn: Notify link switch status to FW in all error cases
Currently if host receives invalid link switch params from FW,
the request is dropped in host and reject status is not sent to FW.

Update link switch status to FW in all error cases.

Change-Id: If1ce5e30517d98c38e869baa1cfc620302b839b2
CRs-Fixed: 3588204
2023-08-17 01:39:49 -07:00
Krishna Rao
a1c589112a qcacmn: Update ML Reconfig TBTT docs and print per 11be D3.0
IEEE802.11be D3.0 has renamed the 'Delete Timer' subfield to 'AP
Removal Timer' in the STA Info field in per-STA profile in
Reconfiguration Multi-Link element. The earlier name did not correctly
reflect the AP removal operation and was a source of confusion.
Update documentation related to the erstwhile Delete Timer to indicate
the new name. Similarly, update a print related to this timer.

CRs-Fixed: 3589907
Change-Id: Ie5c9c4c8756057791095e87532e0e14bcf7ef133
2023-08-17 01:39:39 -07:00
Vignesh U
4da1bf7d8c qcacmn: Move uncommon regulatory APIs out of cmndev
The API reg_is_freq_txable() is not used by_REG_CLIENT devices and
should be moved out of converged code.

Move reg_is_freq_txable() and corresponding dispatcher API
wlan_reg_is_freq_txable() to unconverged code.

Change-Id: I1031a20d40ebcf30326c14901d413669206a8433
CRs-Fixed: 3568932
2023-08-17 01:39:27 -07:00
Azmath Mohammed
c0d6f0176e qcacmn: Add module_id check to avoid buffer overflow
Add module_id check to check to avoid the buffer overflow
of mod Array.

Change-Id: I73cfa1434d721e570df0414af8da35252ced5d7a
CRs-Fixed: 3589970
2023-08-16 22:35:55 -07:00
Surya Prakash Sivaraj
9cd7aef35e qcacmn: Use HT info to get operating bandwidth
APs can broadcast support for 20 & 40 MHz in the
HT cap IE and operate in 20 MHz also.

Therefore, use the extension channel offset field
of the HT info IE to identify the bandwidth of the
BSS.

Change-Id: I9987d45ec34ba3327b43ef70eb891d346e9e78c9
CRs-Fixed: 3587792
2023-08-16 19:16:42 -07:00
Venkateswara Naralasetty
c62ef80144 qcacmn: Change number of RXDMA_STATUS_RING allocations
Currently two RXDMA_STATUS rings are allocated for the station targets
irrespective of whether DBS supported or not. Only one RXDMA_STATUS_RING
being used for non-DBS targets like QCA6750 and WCN6450, hence change
the number of RXDMA_STATUS_RING allocations to 1 for non-DBS targets.

Change-Id: I4f14c8b5cee892979765f776b37d44e99ba2d558
CRs-Fixed: 3578733
2023-08-16 13:37:11 -07:00
nobelj
d754731461 qcacmn: Add start and end flag set for raw frame
For RAW frames, setting zero to start and end flag make difficult
to reconstruct amsdu frame.

Change-Id: I28ffb87682427c7986f98730d514a0421eae1972
CRs-Fixed: 3584549
2023-08-16 13:36:59 -07:00
Aakanksha Doda
074162a87a qcacmn: Remove number of vaps check in vdev detach from MLD context
Remove number of vaps check in vdev detach from MLD context.

Change-Id: I3f67534911582a0773da52fe7e800f32b1de831e
CRs-Fixed: 3585336
2023-08-16 13:36:49 -07:00
Kenvish Butani
e617b8791c qcacmn: Add Mcast Seq num in MLO dev ctx
Move multicast sequence number field from
dp_vdev_be to MLO device context struct.

Change-Id: I28c3a9f4480a5da5b622f9dd2a070ac25b9b6e5b
CRs-Fixed: 3586918
2023-08-16 13:36:38 -07:00