Commit Graph

19784 Commits

Author SHA1 Message Date
Krunalsinh Padhar
d3e95e7607 qcacmn: Send rf path WMI command
Prepare and Send WMI command to fw to set the rf path. Also, add module
ID for rf path switch for qdf log prints.

CRs-Fixed: 3568221
Change-Id: I7ef0ffe66eaed837424699641d3e5b8537cd0304
2023-08-04 02:49:21 -07:00
Shivam Kumar
f7142b0fd4 qcacmn: add/remove recommended error/debug print
add/remove recommended error/debug print

Change-Id: I2c5e2ed73fbc4299289b0d6c3059c514ef5052e9
CRs-Fixed: 3528661
2023-08-03 22:43:05 -07:00
Shivam Kumar
f337d69b2a qcacmn: add/remove recommended error/debug print
add/remove recommended error/debug print

Change-Id: I23075a7e5a0512ac9a5d87748f1ef75e4a799fe1
CRs-Fixed: 3528661
2023-08-03 22:42:53 -07:00
Ripan Deuri
9e376fe3d8 qcacmn: Disable FW AST indication for WDS peer
Disable FW AST indication for WDS peer.

Change-Id: Ib2a34fe458841ae00c06be599d9620f4210e9148
CRs-Fixed: 3577688
2023-08-03 13:18:18 -07:00
Basamma Yakkanahalli
0c9830a0c5 qcacmn: Additional RNR Cache to support 11BE and legacy TBTT info
Added additional RNR cache to support legacy and 11BE TBTT info.

Change-Id: I000c990e0cb4388a66c773672b47825acdd66153
CRs-Fixed: 3570430
2023-08-03 13:18:06 -07:00
Amir Patel
8af70480b3 qcacmn: Fix compilation issues
Fix compilation issues when QCA_KMEM_CACHE_SUPPORT
is not defined

CRs-Fixed: 3577327
Change-Id: I0715e6d5702aab793823a0b42c1eea5322eadb74
2023-08-03 13:17:47 -07:00
Aravind Kishore Sukla
348c432963 qcacmn: Enable CFG80211_MULTI_AKM_CONNECT_SUPPORT from kernelv6.0
Current code supports CFG80211_MULTI_AKM_CONNECT_SUPPORT only for
v5.15 kernel.

Enable this feature support from kernelv6.0 by default.

Change-Id: Ie0d36c6e6d286a432bcaa99ee905858e70297ba1
CRs-Fixed: 3577264
2023-08-03 10:04:39 -07:00
Guru Pratap Sharma
202f03603c qcacmn: Adding WLAN_VDEV_RATEMASK_TYPE_EHT in vdev ratemask type
Adding WLAN_VDEV_RATEMASK_TYPE_EHT in vdev ratemask type enum

Change-Id: I3a75b02eb059bd8c7f504ce46685f9c038a75c82
CRs-Fixed: 3573994
2023-08-03 10:04:27 -07:00
jingxiang ge
6b70bdc5b0 qcacmn: restructure function in target_if_free_psoc_tgt_info
Restructure memory free function so both win&mcl can call
it. to avoid memory free mismatch.

Change-Id: I31634f94421f30d74d2eaad44e5df089d489d67f
CRs-Fixed: 3572976
2023-08-03 10:04:15 -07:00
Jeevan Kukkalli
2e35a8785e qcacmn: Fix lite mon deallocation
Lite monitor deallocation should happen before mon rings deinit.
Call lite monitor dealloc function before mon rings deinit

Change-Id: I9b93945ccc092ff524555e8a4aa9cd2e3877f70f
CRs-Fixed: 3578630
2023-08-03 10:04:02 -07:00
Shreedhar Parande
15f840d145 qcacmn: Create bridge peer under bridge vdev
Create and attach bridge peer under bridge vdev for 4-link
MLD.

If there are no bridge VDEVs, fall back to existing mechanism.

Change-Id: I32187bcc849fbe36200967bb7f88dfa56c22c3dc
CRs-Fixed: 3574491
2023-08-03 10:03:49 -07:00
Sai Pavan Akhil Remella
ef71aa4c26 qcacmn: Handle TWT enable/disable failure status
When HOST based TWT is triggered from userspace, while disabling
congestion based TWT, disable/enable TWT may fail due to ongoing
roam operations in firmware. These changes return error code EBUSY
in failure case in vendor command context to userspace.

Change-Id: I3da64b6ea4dcf08cf80966cd7639d8945fe46417
CRs-Fixed: 3520189
2023-08-03 03:41:42 -07:00
Sheenam Monga
024eb9d419 qcacmn: Add support to deregister CP callback
Currently, get_infra_cp_stats callback of
infra_cp_stats_req_context is not updated to
NULL after processing the command.

Deregister get_infra_cp_stats callback
function after processing CP stats command.

Change-Id: I916a9432acd7f97aabe0db8ea1cae4228362a8f1
CRs-Fixed: 3577645
2023-08-03 03:41:31 -07:00
Himanshu Batra
c290e36c21 qcacmn: Setup max BA value for tids for mesh peers during peer add
Setup max BA value for tids for mesh peers during peer add

Change-Id: Ia18f5d65db819d87b81c217e5e11fba3316b8d16
CRs-Fixed: 3536290
2023-08-03 03:41:19 -07:00
Gaurav Saini
a211d644c5 qcacmn: Finding ast entry based on vdev
Currently,  ast entry is not found when VDEV ALL
is there. Change is finding the ast entry when
particular vdev is passed and, also when vdev
all is passed.

Change-Id: Ib71b843c74b9a64cb15f221577ee8e2d30614973
CRs-Fixed: 3575721
2023-08-02 17:59:04 -07:00
Karthik Kantamneni
bb6139453b qcacmn: Fix accessing unused CE channel ctrl register in WCN6450
Currently host is programming IDX_UPD_EN for all the CE
channels even though which are not used by host.

Fix this by programming CE ctrl register which are
used by host.


Change-Id: Ic0c133d87c688257ef2047bcb177228e25369aed
CRs-Fixed: 3575870
2023-08-02 11:42:59 -07:00
Vinod Kumar Pirla
1ad86188f4 qcacmn: Avoid uninitialized access from all conditional branches
Stack variable 'mlme_info' in cm_connect_complete() can lead to
uninitialized access if BSSID in 'resp' function argument is NULL.

Initialize the variable to avoid unanticipated results.

Change-Id: Id9db244c8168740e4d5c0d71959b578551773bb6
CRs-Fixed: 3576785
2023-08-02 04:55:38 -07:00
Aasir Rasheed
7dc944d192 qcacmn: Remove crypto keys in case of reset
Currently, host driver removes crypto keys based
on pdev create or delete. But these keys are not
valid across connections. So, free the crypto keys
upon new candidate selection/new connect request.

This change is to free crypto keys if there is new
candidate selection or another connection request.

Change-Id: Ifaa8786efab09f6b753a6355f249ccb3018da097
CRs-Fixed: 3568173
2023-08-02 04:55:26 -07:00
Vinod Kumar Pirla
35ea97c560 qcacmn: Enhancements for link switch connect
Introduce following for link switch disconnect:
    1) Connect request source.
    2) Connect request reason.

If the set MAC address response for new link is successful, post
connection on new link and transition the link switch state to
connecting. If the status of connection is successful, update
the state to link switch complete or else directly go for
deserializing link switch command and posting response to FW.

Based on the final state of link switch at the time of sending
FW response, send the appropirate status of link switch and reset
the state of link switch to idle post FW notify.

Don't unlink BSS incase of failure in connection.

Don't indicate connect results to userspace.

As we are already in serialization due to link switch,
don't serialize/deserialize connection command if it
is due to link switch.

Incase of race condition between link switch connect and
userspace connect/disconnect always abort link switch connect.

Change-Id: Ie350b52021c36802b82d6cb5f6f441fe1bd10458
CRs-Fixed: 3556529
2023-08-02 04:55:17 -07:00
Vinod Kumar Pirla
a147f231ea qcacmn: Use VDEV response timer in PSOC for MAC update
Use the VDEV response timer infrastructure to hold MAC address update
requests sent to FW on VDEV which is in link switch progress.

As post disconnect and sending set MAC address request, the scheduler
thread is exited and to notify MLO mgr about set MAC address update
complete (or either timer expiry due to FW response timeout) and
further the link switch process based on response.

This code is only applicable for Link switch VDEV MAC address update
path. For MAC update request from userspace still use the same path
without starting the timer as for those wait event is already in place.

Change-Id: Ice3e6f7b00f0d9d08d6aa62ee9c1e4d183142358
CRs-Fixed: 3556517
2023-08-02 04:55:03 -07:00
Vinod Kumar Pirla
a61df6019c qcacmn: Update VDEV MAC addr after link switch disconnect
After receiving link switch disconnect completion indication
from connection manager, update the VDEV's MAC address to new
link's address to support link specific OTA frames exchange.

Introduce new dispatcher API to call from VDEV MLME, if the
VDEV for which MAC address response received is in link
switch in progress, then deliver the response to MLO mgr,
or else deliver it directly to OSIF.

Handle the FW response for link switch set MAC address in
MLO manager and if the set MAC addr response is successful,
update OSIF about the new MAC address to perform cleanup on
old link and initialize fields in new link.

If the response is successful, transition the link switch to
initiate connection or else abort link switch.

Change-Id: Ic330dca84e602909cc5ddf7e134809c0e0345a17
CRs-Fixed: 3556506
2023-08-02 04:54:52 -07:00
Vinod Kumar Pirla
b41d140574 qcacmn: Enhancements for link switch disconnect
Introduce following for link switch disconnect:
   1) Disconnect source.
   2) Disconnect reason.
   3) Link switch BIT in CM_ID to identify link switch request

Don't notify link switch disconnect to initiate disconnect on
other connect VDEV of MLO mgr.

Don't notify userspace if the disconnect request is due to
link switch.

Don't notify netdev to stop queues on link switch disconnect.

Don't flush any pending disconnect/connect request on complete
of link switch disconnect request.

Don't attempt to serialize/deserialize disconnect command
if it is a link switch command ID due to either disconnect request,
disconnect complete or disconnect request flush.

Before start of link switch set the VDEV flag as MLO link VDEV
to leverage the disconnect/connect checks for link VDEV and
restore the flag at the end of link switch. This will impact
when link switch on assoc VDEV is received for which initially
the flag is not set.

Check status of link switch disconnect done API to either
proceed further in link switch or terminate the link switch.
If any userspace disconnect and link switch disconnect race
condition, always abort link switch disconnect and notify
failure to FW.

Change-Id: I6ec2a850d49f5ec6df2ec868c290f19203cd8c88
CRs-Fixed: 3556481
2023-08-02 04:54:41 -07:00
Vinod Kumar Pirla
cbf4cdb23c qcacmn: Link Switch start notifier callback registration
Move the MLO MGR in UMAC to core and dispatcher directories.
Introduce function prototype of callback and provide
dispatcher API for components interested in link switch
to register callback.
Introduce API to register and unregister callback for
link switch.

Change-Id: I14a64f61ab1269f1d46b7aff03d20b820d1cd8d9
CRs-Fixed: 3556465
2023-08-02 04:54:30 -07:00
Karthik Kantamneni
c88b38afa1 qcacmn: Fix RBM id assignment for Rx buffers in Rhine
Currently RBM id is not assigned properly for RX buffers
in Rhine architecture. Fix this by assigning RBM id during
soc attach in Rhine.

Change-Id: I8f3a781bfaf81366417107f4bd3da61b142ca1e2
CRs-Fixed: 3573342
2023-08-01 20:30:36 -07:00
Sheenam Monga
2ae076f0e6 qcacmn: Avoid assigning NULL to double pointer
Currently infra_cp_stats_req_context of psoc
cp object is assigned to **context which may
cause issue when infra_cp_stats_req_context
is NULL because without allocating memory to
**context, *context is being accessed.

Fix is to validate infra_cp_stats_req_context
and assign only if context is not NULL.

Change-Id: I8281bd77a0b829fbfc6b25ba2ad688236bc75623
CRs-Fixed: 3575882
2023-08-01 20:30:25 -07:00
Pragaspathi Thilagaraj
4180a85d98 qcacmn: Reset PASN peer count properly
PASN peer count gets wrapped around during vdev delete and
gets caught in an infinite loop.

So reset PASN peer count in wifi pos module after delete all
peers

Change-Id: I489bc24ef8c7455a3f6c481529de89b3c3ac62f7
CRs-Fixed: 3573607
2023-08-01 20:30:13 -07:00
Aravind Kishore Sukla
db33c1e902 qcacmn: Downgrade connection to HE mode
STA is not able to connect to 11be non-WPA3 mode AP.

STA need to decide whether to connect in EHT or not at
the time of connection to AP based on security configuration.

Change-Id: I812f5c322d36ba44f63d4e27b5ec65a2846b3265
CRs-Fixed: 3404747
2023-08-01 20:30:03 -07:00
Jeevan Kukkalli
07824cbd75 qcacmn: Fix indentation
Fix indentation in status tlv processing function

Change-Id: Ie575c71ebdf3def30ec2a914cdca44442a6a9fa3
CRs-Fixed: 3575953
2023-08-01 20:29:53 -07:00
Amir Patel
98252fa466 qcacmn: Fix undefined symbol when QCA_KMEM_CACHE_SUPPORT is disabled
Fix undefined symbol when QCA_KMEM_CACHE_SUPPORT is disabled

CRs-Fixed: 3571636
Change-Id: I7c3aad7992c11b77533de055226d0d6455cbe4f5
2023-08-01 20:29:43 -07:00
Amir Patel
dae2d5c316 qcacmn: Adjust mon ring fill level based on num_entries
Adjust mon ring fill level based on num_entries in ring

Change-Id: Iaa6fa2f1c3742a60b5980bbf153ddc7b03733168
CRs-Fixed: 3575947
2023-08-01 20:29:33 -07:00
Shiva Krishna Pittala
ac7f260278 qcacmn: Migrate PTQM of BSS peer of a non-AP MLD upon ML AP removal
Before proceeding to the ML AP removal at the non-AP MLD, migrate the
PTQM of its BSS peer if it has the link to be removed as the primary.

Change-Id: I477538135186e4f1039bbdf83cfd0c826503f75f
CRs-Fixed: 3575221
2023-08-01 20:29:22 -07:00
syed touqeer pasha
3041fbd68f qcacmn: Handle HW coookie conversion disable in DS mode
Direct switch support to handle Rx cookie conversion
when HW cookie conversion is disabled.

Change-Id: I861d854fbeecc2c70e87be3f289915b7e915985d
CRs-Fixed: 3547681
2023-08-01 20:29:12 -07:00
Karthik Kantamneni
a671ff2ee1 qcacmn: Modify refill buff pool enqueue to use max_bufq_len
Currently Refill buffer pool enqueue is using POOL_SIZE
macro, but there is possibility of dynamically configuring
max pool size less than that. So use max_bufq_len which will
be configured dynamically during refill pool init instead of
POOL_SIZE macro.

Change-Id: I610b5dff71861254aa8b6d30e2c562bd7316e120
CRs-Fixed: 3575599
2023-08-01 20:29:01 -07:00
Liangwei Dong
adb0ec3b16 qcacmn: Fix duplicate process of link set event
Add flag in event response struct to indicate event processed
or not.
Use scheduler thread to process set link active event same as
other link switch and vdev event to avoid race condition.

Change-Id: I963f9106e296a59cff5078c85a4accf63c7026dc
CRs-Fixed: 3572868
2023-08-01 09:38:15 -07:00
Karthik Kantamneni
838ed5edf5 qcacmn: Mark nbuf cb for offloads handled frames in Rhine
Mark nbuf cb if Rx packet is routed via offloads, this gives the
info whether particular packet rx ring routing info is correct or
whether packet has entered offloads layer and rerouted back.

Change-Id: Ib3ad71216c514381d0bce1fb4744550d91880254
CRs-Fixed: 3540537
2023-08-01 09:38:01 -07:00
Liangwei Dong
5a23527cfd qcacmn: Extract current active/inactive link bitmap
FW will report current active/inactive link bitmap for
each set link command. Extract them and save to respone
data struct.

Change-Id: I8513391fbf3b181c6182d6568d0ce8e83c627bc6
CRs-Fixed: 3564785
2023-07-31 23:55:45 -07:00
Vinod Kumar Pirla
af6cf93a07 qcacmn: FW Link switch request event handler and cnf resp
Once the FW sends the link switch request to host handle
the request from scheduler thread and send confirmation
back on completion of link switch process with status of
link switch (success/failure).

Add new serialization command type for link switch.

Introduce flags to get the current state of link switch
request, set the state to idle when no link switch in
progress or once the current link switch is completed.
Access to state is protected with MLO dev context lock.
Implement various helper API to:
    a) Transition link switch to next state.
    b) Get current state of link switch.
    c) To check whether any link switch is in progress.
    c) To check whether link switch is happening
       on assoc VDEV or not.

Introduce a new VDEV flag to suggest the VDEV is in
link switch process and also implement helper APIs to
set/get/clear this VDEV flag.
   a) The flag is set at start of link switch, once
      the FW request params are validated and before
      proceeding for link switch disconnect on VDEV.
   b) Clear the flag once the Link switch confirmation
      is sent to FW.

Validate the link switch request params:
     a) IEEE link ID's received.
     b) Check if new connection is part of MLO connection.
     c) Check if VDEV is MLO STA VDEV or not.
     d) Is VDEV in connected state or not, that means
        VDEV is not in transitioning state due to disconnect.
     e) Check if any link switch in progress on this MLD
     f) Current link ID of VDEV equals the FW params.

If validation is successful, serialize the link switch
command and in the serialization activation start the
actual link switch process.

Change-Id: Ie582650541054c8cf39aaa8316e86a7a40256a15
CRs-Fixed: 3556422
2023-07-31 19:38:48 -07:00
Shashikala Prabhu
10448e6108 qcacmn: Update channel list size to accommodate all the channels
A few RDPs can have 2 GHz + 6 GHz + Scan radio (2 GHz + 5 GHz + 6 GHz)
radios. In this case, the total number of channels are greater than
NUM_CHANNELS.

Hence, increase the channel array size by twice. And filter out  the
duplicate channels before sending the channel list to LOWI application.

Change-Id: If9d1676dab24b8e46f5303d5992aaa59ba1e67ce
CRs-Fixed: 3554676
2023-07-31 19:38:37 -07:00
Santosh Anbu
d8509c4df7 qcacmn: Remove hex dump in monitor tlv processing
Hex dump in monitor descriptor processing is causing high
CPU utilization. Since it is not advisable to add prints/debug
in per packet processing, remove hex dump debug log.

Change-Id: Ic98c3608a468cf4665ea94b1ebee725ca7121545
CRs-Fixed: 3571491
2023-07-31 19:38:27 -07:00
Santosh Anbu
3f3d1f352c qcacmn: Remove debug logs in monitor TLV processing
Debug logs in per packet tlv processing is causing high CPU utilization.
Remove these debug logs.

Change-Id: I520b3a83c7a5cafefe6f2d25d14ea5c1b9816b11
CRs-Fixed: 3571491
2023-07-31 19:38:19 -07:00
Priyadarshnee Srinivasan
ede405d4f8 qcacmn: Modify the debug levels of WMI prints
Modify the WMI debug level prints to reduce the
prints during bootup time.

Change-Id: Ia6d5b45d982280e572d28d1766a796b1e7ce1c60
CRs-Fixed: 3570322
2023-07-31 19:38:09 -07:00
Pragaspathi Thilagaraj
3efd94838f qcacmn: Add crypto changes to support roam sync key event
Change few static crypto API's to global.
Add support to add new crypto entry based on passing the entire
entry structure itself.

Change-Id: Id2e0a46bb8b44a834d17d2a04b0dc28fc881b4e3
CRs-Fixed: 3571796
2023-07-31 19:37:59 -07:00
Nandha Kishore Easwaran
72a6ff4b6e qcacmn: Fix tlv processing for Big endian mode
Fix tlv processing code for monitor mode in Big endian mode.
Changed all the 64bit tlv extraction apis and used 32 bit extraction apis.
This is needed in big endian mode since HW supports word swap option and
TLV has to be intepretted using 32bit extraction APIs.

TLV tag, userid and TLV len falls on the first 32 bit and hence using
both 32bit or 64 bit extraction APIs give same result.

Change-Id: I9b9ff78c79f21888964d405016c58c3b5988b254
CRs-Fixed: 3551002
2023-07-31 19:37:48 -07:00
Vinod Kumar Pirla
2ec28965cf qcacmn: Clear copied connect request IEs on disconnect
If non-ML type connection fails, then the connection IEs
copied in sta ctx are not cleared as VDEV is not ML VDEV.

Clear the IEs if connection fails irrespective of VDEV type.

Change-Id: I2a2ca155aadeb408e9a4a425d3f1f03f4dbfb867
CRs-Fixed: 3572185
2023-07-31 15:51:23 -07:00
Shiva Krishna Pittala
97684a103f qcacmn: Handle unmigrated clients during MLO AP removal
At the end of the link removal procedure, issue full disconnect of only
those ML peers that still have the removed link as primary TQM and there is
no ongoing PTQM migration of those peers.

Change-Id: I1a4c34313eb2cb49187c1d9b47e5918ada32ccf7
CRs-Fixed: 3550142
2023-07-31 12:20:26 -07:00
Vijay Raj
38f6a7af8d qcacmn: Add conversion for new twt notification and twt status codes
Introduce new twt statusconversion
HOST_ADD_TWT_STATUS_LINK_SWITCH_IN_PROGRESS and
HOST_ADD_TWT_STATUS_UNSUPPORTED_MODE_MLMR for
individual twt in 11be.

Change-Id: I76194ec0172d06c1b176e3afd3a5e66efdd12f4a
CRs-Fixed: 3568732
2023-07-31 05:43:23 -07:00
Sai Rupesh Chevuru
7157add22c qcacmn: Avoid wdi events for bss peer
As the bss peer is closely tied with the vdev creation
and deletion, listeners might be uninitialized and result
race conditions. send an event only to the connected peers.

Change-Id: Ia0ae063c92bba38d2fb67fe4eae84f5562991fa2
CRs-Fixed: 3574176
2023-07-31 02:12:38 -07:00
jingxiang ge
f8d1f8ac6f qcacmn: Extract aux device capability
Extract aux device capability from service ready ext2
event, and report such info to wma/mlme/hdd.

Change-Id: I888624fd3443118ba66fadd7a40fcce4f4b5d521
CRs-Fixed: 3549753
2023-07-30 22:45:25 -07:00
Shreedhar Parande
b4db727551 qcacmn: Add API for bridge vdev handing
Add APIs to populate, destroy and get bridge vdev count.

Also send bridge VDEV details in partner link info via
VDEV START command to target.

Change-Id: Iea155b09051b6724d07cf2b6052a07c1d3beb7e8
CRs-Fixed: 3567098
2023-07-30 22:45:14 -07:00
Mukul Dhiman
59ec56d44f qcacmn: add partner vdev debug prints in TXRX_AST_STATS
add partner vdev debug prints in TXRX_AST_STATS

Change-Id: Icf3cc557572519e43e3135e2b22ff457982a8d32
CRs-Fixed: 3571207
2023-07-30 19:08:19 -07:00