Commit Graph

19986 Commits

Author SHA1 Message Date
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
KARTHIK KUMAR T
39bb6afc38 qcacmn: added MLO MCAST packet stats
added MLO MCAST packet stats in tx stats

Change-Id: I46ad1a94bf986d21a9b865d7531298e805abcda8
CRs-Fixed: 3582328
2023-08-16 13:36:26 -07:00
Mukul Dhiman
0ad05f4a1a qcacmn: aggregate vdev stats in to mlo ctxt at vdev detach
aggregate vdev stats in to mlo ctxt at vdev detach

Change-Id: I002e48e4b95a32a0ff58e3e1cc26ea97d94f7a5d
CRs-Fixed: 3572527
2023-08-16 02:17:17 -07:00
Namita Nair
f06f5e0791 qcacmn: Fix TX completion configurations
Currently when OPT_WIFI_DP is enabled, dp_tx_get_queue()
sets the ring_id always to one ring. This could potentially
affect the Tx data rates. This change is to ensure
all the Tx data rings are used.

Change-Id: Ib1ecf7f36f6967c0edf947d6310d6ae7caf43e5b
CRs-Fixed: 3577829
2023-08-16 02:17:06 -07:00
Adwait Nayak
9c55f0cc3c qcacmn: Add pdev_id for word mask subscription
Add missing argument pdev_id in dp_mon_rx_wmask_subscribe
to avoid compilation issue.

Change-Id: I3a13163d062c93f67ba0101b881f48ab239a585f
CRs-Fixed: 3551975
2023-08-15 17:52:55 -07:00
Adwait Nayak
7ce350b5a0 qcacmn: Do not enable word compaction for pktlog
Recently, Word compaction is by default enabled as part
of all monitor mode realated features. Due to which, while
parsing the pktlog data, multiple TLV parsing errors are seen.
Hence, with this change word compaction is disabled if pktlog
is enabled.

Change-Id: I35153f74da2de5978b225ced7f8c1112f3aff3b2
CRs-Fixed: 3551975
2023-08-15 17:52:45 -07:00
Nandha Kishore Easwaran
15812b8137 qcacmn: Optimize tx completion processing in fast path
Optimize tx completion processing in fastpath by adding the list of
tx descs to the free list directly instead of individually accessing
each descriptor and adding it to free list. This gives advantages of
not taking descriptor pool lock for each descriptor and rather takes
the lock only once when appending the whole list of descs to the
free list.

Also removed unused member shinfo_addr from tx_desc structure. Removal
of this member enables increase of flags type from u16 to u32 without
increasing the size of tx_desc structure. These changes improved peak
KPI by 2% in SFE mode.

Change-Id: I995de9cc08c866ad6e1cd1efc76ac2a35d40fb7c
CRs-Fixed: 3584578
2023-08-15 15:09:54 -07:00
Prakash Manjunathappa
fb7d334b7c qcacmn: Mitigate the slab allocation failures with __GFP_DIRECT_RECLAIM
__qdf_nbuf_frag_alloc fallback allocation using alloc_skb slab
allocation, use GFP_KERNEL flag which is inclusive of
__GFP_DIRECT_RECLAIM. This will mitigate the allocation failures.

Change-Id: Ib852bf0f812839f0a99093855cebc928d0c79fd1
CRs-Fixed: 3585716
2023-08-15 00:44:52 -07:00
Amit Mehta
b7b5ec0c8a qcacmn: Do not set ref count as 1 for MLD peer
During dp_vdev_flush_peers after peer unamp ref_cnt
for peer is set to 1. Which in case if peer unamp
for MLD peer is called before link peers from dp_vdev_flush_peers,
it will result in MLD peer delete before link peer.

To avoid MLD peer delete before Link peer, after peer unmap
in dp_vdev_flush_peers do not explicitly set ref_cnt as 1
for MLD peer.

Change-Id: If7ab63eb213dc482205f3847f0b32e246ca76d51
CRs-Fixed: 3585860
2023-08-15 00:44:40 -07:00
Namita Nair
aa4f14ce5a qcacmn: Add check to find IPA iface_ctx based on vdev_id
IPA APIs currently depend on the net_dev value to distinguish
between the IPA iface_contexts, during setup and cleanup calls.
Due to single net_dev multi vdev change, this check is not
valid anymore and causes overwrite of the IPA iface contexts.
This change adds a check to also compare the vdev_id along with
net_dev to properly distinguish between the iface contexts.

Change-Id: Ifa9bad267d26957f61f9c82644753278d2be1cd0
CRs-Fixed: 3576347
2023-08-14 21:57:59 -07:00
Surya Prakash Raajen
6aa15982ae qcacmn: Do mlo register only for mlo capable soc
Do mlo register only for mlo capable soc, since non mlo
chips also could be part of mlo capable target

Change-Id: Ibef1899257f60a00ba3933af44efdb736550b9e4
CRs-Fixed: 3582269
2023-08-14 18:57:18 -07:00
Shiva Krishna Pittala
f796368068 qcacmn: Remove the assumption of assoc link's presence post connection
With MLO link removal, AP can remove a link that happens to be the assoc
link for a given Non-AP MLD. So far, the Non-AP MLD has been using the
assoc link to interact with other layers and make various decisions.
Change those behaviors on a case-by-case basis.

CRs-Fixed: 3577559
Change-Id: Iaa001bdd2571bce424a953caa3197a99a6f84180
2023-08-14 18:57:08 -07:00
Amit Mehta
2c0fb4ffc6 qcacmn: Set enable_rpm earlier in hdd_wlan_start_modules
Currently enable_rpm is being set in hif_rtpm_start
which is called later in hdd_wlan_start_modules,
this can result in race between hif_rtpm_start
and hif_rtpm_put.

To fix the issue set enable_rpm earlier to avoid
race condition.

Change-Id: Iaa4ffda4eef3050f43ff5ca2bdba555abb8a0b47
CRs-Fixed: 3581962
2023-08-14 15:22:33 -07:00
Rahul Gusain
94ce1bb20d qcacmn: Exchange CSID cap and GTK param
To support group NDP security, WiFi-HAL and firmware introduces
two new parameters (csid_cap and gtk_required) in NDP initiator
request, responder requestor and NDP indication event.

Host driver will retrieve the CSID capabilities and GTK parameter
and parse it to firmware in NDP Initiator and Responder request
TLV. Also, driver extract these parameters from NDP indication TLV
and will pass to Wifi-HAL in vendor event.

Change-Id: I23483141219e4224bb76ed209aee46e131eaa747
CRs-Fixed: 3583154
2023-08-14 15:22:21 -07:00
Rahul Gusain
56ee84d4e4 qcacmn: Add QCA vendor attributes for NDP setup
QCA vendor extension is used for NDP setup. This defines the new
attributes QCA_WLAN_VENDOR_ATTR_NDP_CSIA_CAPABILITIES and
QCA_WLAN_VENDOR_ATTR_NDP_GTK_REQUIRED to support GTKSA, IGTKSA,
and BIGTKSA for NDP setup.

Change-Id: Iddd9d0f88d1d5d66fd72dc158801ad16c14f39e2
CRs-Fixed: 3583158
2023-08-14 15:22:09 -07:00
Jianmin Zhu
a36af132e6 qcacmn: Fix assert when send ll_stats during suspending
When WoW enable cmd has been sent to F/W, but no ack from F/W yet,
UNIFIED_LINK_STATS_GET_STA is sent over WMI, assert will happens.

To fix it, once WoW enable cmd has been sent to F/W, don't allow
UNIFIED_LINK_STATS_GET_STA sent over WMI.

Change-Id: I13271e88310bc510a9c7668d193f6e776554a442
CRs-Fixed: 3585971
2023-08-14 03:17:35 -07:00
Sachin Kohli
689990d5df qcacmn: Increasing PPE2TCL ring size
Increasing PPE2TCL ring size from 2K to 8K

Change-Id: I6b76a341ba99e522a86477ff48d50b2682c5974f
CRs-Fixed: 3576181
2023-08-14 03:17:24 -07:00
Jinwei Chen
dcad508db8 qcacmn: remove QDF_ASSERT warning for htc packets sending
If WMI cmd sending and runtime PM suspending happened at same time,
there is chance get_htc_send_packets_credit_based() report warning
to dmesg, this warning info is not much helpful.

Use one line print instead to avoid confusion.

Change-Id: Ia71657876b25cb180abba28b107553a99d015358
CRs-Fixed: 3583473
2023-08-13 23:59:46 -07:00
Aasir Rasheed
0cd3985fb6 qcacmn: Register pmo handler for twt
Register pmo handler for twt to prevent WMI from
crashing due to concurrent WMI_WOW_ENABLE_CMDID
and twt requester enable commands during suspend.

Change-Id: Ifeef52f7a758020e8599a056f9b3f03455e96def
CRs-Fixed: 3580088
2023-08-13 23:59:34 -07:00
Kenvish Butani
6939ceceb0 qcacmn: CDP API's to support MLO Dev context
Add support of CDP API's to create, attach,
detach and destroy MLO device context
structure in Datapath

Change-Id: I0c2019b70f12639de949ebe5bec44f1f202cff6b
CRs-Fixed: 3566879
2023-08-13 23:59:24 -07:00
Kenvish Butani
8e969e5393 qcacmn: Add Support for MLO device Context Struct
Add support for below operations for MLO device
context structure.
1) Allocate MLO device structure
2) Attach vdev to MLO device structure
3) Detach vdev from MLO device structure
4) Free MLO device structure

Change-Id: Ifc282a5a04657aa618e0dac6a64d118aa8a8f422
CRs-Fixed: 3566880
2023-08-13 23:59:12 -07:00
Kenvish Butani
ea4ddc65ed qcacmn: CP hooks to support MLO device Context Structure
Control Path hooks to create, attach, detach and destroy
DP MLO device context structure

Change-Id: Ib3fe459dfabb8b8971b92c0529e9df0093bf5342
CRs-Fixed: 3567004
2023-08-13 23:59:00 -07:00
Asutosh Mohapatra
b1ca37af64 qcacmn: Keep bonded channels enabled for SET_FCC_CHANNEL 0/2
Currently host disables all 6 GHz channels and keeps only
STA connected channel enabled. If STA bandwidth is greater
than 20 MHz kernel send disconnect as the bonded channels
are disabled.
Similarly for STA + SAP SCC case, if STA bandwidth is
20 MHz and SAP bandwidth is greater than 20 MHz kernel
sends stop_ap as the bonded channels are disabled.

To address above scenarios, for standalone STA case
keep the bonded channels enabled and for STA + SAP
SCC case keep the bonded channels enabled for STA and
SAP.

Change-Id: I1c4f7fea139ca36f5a61cc514eff779801db57ae
CRs-Fixed: 3580015
2023-08-13 23:58:49 -07:00
Aasir Rasheed
6d13d93bc8 qcacmn: Add api to check if vdev is tdls
Currently we are defining tdls vdev check only
for 11BE MLO defined macro, However there is a
need to return false if 11BE MLO is not defined.

This change is to check if vdev is tdls.

Change-Id: Ic44c66fcc585f3d091d21d40c106913db29b0a1e
CRs-Fixed: 3586960
2023-08-13 23:58:38 -07:00