Commit Graph

472 次程式碼提交

作者 SHA1 備註 提交日期
Liangwei Dong
cab8f71b14 qcacmn: unregister link switch cb before mlo global ctx deinit
Unregister mlo mgr link switch cb before mlo global ctx deinit
because the cb is maintained by global ctx.

Change-Id: I2bd95e74e9067e19db7448510bc6255c3bd7a1f3
CRs-Fixed: 3604403
2023-09-28 06:58:00 -07:00
Vinod Kumar Pirla
b1f923bc46 qcacmn: New substate for VDEV in INIT due to link switch
If connection fails, CM state will be moved to INIT state and
kernel will not be made aware of this connection failure in case
of link switch and treats the interface as if it is connected.
In such case kernel and host will be out of sync and because of
this if any disconnect request is received host will drop them
immediately as VDEV is in INIT state.

Introduce new substate of VDEV for INIT state. If VDEV moves to
INIT state either due to link switch disconnect or link switch
connect failure, instead of being in INIT-IDLE state move VDEV
to INIT-IDLE_DUE_TO_LINK_SWITCH. If any disconnect request is
received in INIT-IDLE_DUE_TO_LINK_SWITCH state then instead of
dropping the request forcefully queue the disconnect and proceed
for disconnect to notify kernel.

Drop link switch connect will be dropped if VDEV is not in
INIT-IDLE_DUE_TO_LINK_SWITCH state.

Change-Id: Ifb6b72f0720b95cf862e9a4ff756b6577a3e45fd
CRs-Fixed: 3617919
2023-09-27 13:09:42 -07:00
Jianmin Zhu
01c751d3fd qcacmn: Avoid NULL pointer deference
Validate sta_ctx->copied_conn_req before use to avoid NULL pointer
deference.

Change-Id: I0d46901f7709b1b6bcf63a7ca5178fb7ad90b33d
CRs-Fixed: 3621066
2023-09-26 14:41:22 -07:00
Uraj Sasan
3ed0c49f5e qcacmn: Clear the bridge context properly
Bridge context was not getting cleared properly which
was causing issue in connection of WDS STA. Make sure
to clear the bridge_sta_ctx and reset central vdev.

Change-Id: I397e5ffc1223bb0e60e67d8bc3e8c4d8bbbf7808
CRs-Fixed: 3618063
2023-09-25 20:17:21 -07:00
Surya Prakash Raajen
6bd218f3be qcacmn: Send standby pdev info to FW
Send standby pdev/radio which is expected to be up while
in powersave mode to FW, to switch master control for
timers.

Change-Id: I4b48d93859359d1b6aee0b9993fd1bd3bff863f2
CRs-Fixed: 3621705
2023-09-25 05:17:23 -07:00
Santosh Anbu
ae01803cfd qcacmn: Clear up bmap for vdev moving to UP_ACTIVE state
During MLO AP vdev partner bringup, SYNC_COMPL can be posted for a
vdev twice since the bitmap is not cleared after posting the event.
But is cleared only when the vdev exits the sync_wait state.

Hence add change to clear the bitmap before posting the event so
so that no other partner vdev will post the same event once again.

Change-Id: I15226b650e4dc51a379d97556f2f2ab62319adf7
CRs-Fixed: 3605598
2023-09-23 17:23:59 +05:30
Linux Build Service Account
38ceb24812 Merge "qcacmn: Parse Extended MLD CAP & OP of ML IE" 2023-09-22 11:09:35 -07:00
Aravind Kishore Sukla
bce140bd10 qcacmn: Add check to validate ml cap offset
Before passing ml cap offset, there is no proper
check for its validation, which may lead to OOB.

Add a check for its offset, before passing.

Change-Id: I5e5a10e8740b3cd3fcef2c6aef1f0a43c74818cd
CRs-Fixed: 3581103
2023-09-22 07:28:51 -07:00
Linux Build Service Account
bd7db3b28b Merge "qcacmn: Add Extended MLD Capabilities And Operations in Basic ML IE" 2023-09-22 01:14:01 -07:00
Linux Build Service Account
56346417b7 Merge "qcacmn: Rectify macro for Reconf ML IE STA Control size" 2023-09-22 01:13:48 -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
Krishna Rao
67aef668a0 qcacmn: Rectify macro for Reconf ML IE STA Control size
The macro for size in octets of STA Control field of Per-STA Profile
subelement in Basic variant Multi-Link element Link Info field was
being used for a similar purpose in Reconfiguration variant Multi-Link
element. Rectify this to use the correct corresponding macro for
Reconfiguration variant Multi-Link element processing.

CRs-Fixed: 3618434
Change-Id: I05f0a2f6586f5378fbb9f4dd3422a70031fc4729
2023-09-19 10:07:04 -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
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
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
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
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
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
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
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
Pragaspathi Thilagaraj
1c1ebf792c qcacmn: Fix two enum members using same name
Fix the conflict between the host and fw enum
for mlo teardown reason.

CRs-Fixed: 3610563
Change-Id: I20638ed0cbe6b88e20f48815c236e92b833a34a9
2023-09-11 03:38:57 -07:00
Arun Kumar Khandavalli
0d54df03f9 qcacmn: Release mutex lock only once
In mlo_is_sta_csa_synced the mlo dev context lock is released
twice resulting in assert.

Release the mlo mutex once to avoid the assert

CRs-Fixed: 3598455
Change-Id: I1ceb797ddcaa8c57b8e7218c5b6aebf8d0136ab5
2023-09-09 22:45:32 -07:00
Aasir Rasheed
e4b28f875e qcacmn: Use mlo dev context to fetch link info
This change is to use ml dev context to fetch
link info, As ml dev context is available in both
vdev and psoc context. It's valid for both standby
and active links.

Change-Id: Ib705bd5a5a1144f980295331f5f26ba667906cf1
CRs-Fixed: 3568944
2023-09-09 19:32:34 -07:00
Vinod Kumar Pirla
f161aeba7c qcacmn: Defer disconnect req when link switch in progress
If link switch is in progress and no other disconnects are
pending in MLO manager sta ctx, save the new disconnect req
and move link switch state to abort. On link switch complete
schedule the pending disconnect in MLO manager.

In the scheduler callback for pending disconnect handling
add NULL check for disconnect request.

Change-Id: I4b144239eb1542cea934478643b6e53b371f2c93
CRs-Fixed: 3608727
2023-09-08 04:12:12 -07:00
Vinod Kumar Pirla
d968a41646 qcacmn: Do not serialize link switch for host force reason
In response to host set link request, FW might send link switch
request where FW will wait for response of link switch in order
to send response of set link. As set link is already in
serialization link switch will be in pending queue.
This will lead to dead lock case where set link in serialization
is waiting for FW response where FW is waiting for link switch
response which is in pending queue due to set link command.

To avoid this dead-lock, do not serialize link switch request
due to set link as FW will send the reason code as HOST_FORCE.

Change-Id: I338f6b4c90ceba5452ede77ad0237af7ddecb31f
CRs-Fixed: 3607164
2023-09-08 04:12:01 -07:00
Vinod Kumar Pirla
dcb8808eb6 qcacmn: Notify callbacks post link switch with status
Introduce new enum to hold the reason for invoking link switch
notify callback.

Notification happens in the following scenarios:
    a) On FW request received in host before serialization.
    b) Once link switch is serialized before link switch disconnect.
    c) On link switch complete but before removed from serialization.

Change-Id: Id502db935ccc3835ab8bb8fab8d89276abe0a243
CRs-Fixed: 3606668
2023-09-08 04:11:49 -07:00
Uraj Sasan
9487a4d77f qcacmn: Clear bridge_sta_ctx in MLO WDS STA
Clear bridge_sta_ctx during disconnect/connect failure.

There were issues in MLO WDS bridge STA mode when there was
multiple disconnect/connect failure, as the previous context
was not cleared and code logic was going into the earlier
state leading to issues.

Make sure to clear the context during disconnect and connect
failure so the STA context will be initialized properly.

CRs-Fixed: 3603610
Change-Id: I586ee44e7f4569693aa6c3550d1c5d94a1a9d3a7
2023-09-08 04:11:38 -07:00
Rakesh Boyina
f4b054cd11 qcacmn: Parse Extended MLD CAP & OP of ML IE
Include Extended MLD Capabilities & Operations subfield size
calculation in the calculation of Common Info Length of the
Basic Variant ML-IE parsing

Change-Id: I8fea9058dc37b7605827ef827a3ccba71be00982
CRs-Fixed: 3590364
2023-09-07 11:19:32 -07:00
Balaganapathy Palanisamy
0761c3f248 qcacmn: Add bridge vdev count under mlo dev
Add bridge vdev count under MLO dev context and
free dev context when all vdevs in mlo dev context
are freed

Change-Id: I861ec17f0143df8e063cc245aa71195f0349b4a7
CRs-Fixed: 3598970
2023-09-05 15:14:40 -07:00
Shiva Krishna Pittala
91485c3e97 qcacmn: Don't return failure in MLO disconnect path for NULL assoc case
With MLO AP removal procedure, AP MLD can remove a link that happens to be
the assoc link for a given Non-AP MLD and the Non-AP MLD can continue to
function after that. In the existing implementation, Non-AP MLD is
returning failure in the MLO disconnect path if the assoc link is NULL, fix
the same.

Change-Id: Ib14c87da083a99f5350c9b73df2b31d08749ff0a
CRs-Fixed: 3604869
2023-09-03 14:41:13 -07:00
Kenvish Butani
31876041a5 qcacmn: Attach / Detach vdev from DP MLO Dev ctx
For ML-Repurpose usecase, Attach or Detach vdev
to DP MLO device context.

Change-Id: I67a31db07c68fc9988c504f12a075541907d7027
CRs-Fixed: 3598387
2023-09-03 10:42:31 -07:00
Krunalsinh Padhar
9c5f2ce5a8 qcacmn: Fix probable null dereference
Remove the debug prints that would cause null dereferencing.

Change-Id: I002e9b14945a2e1de62f94095847ea8886decad6
CRs-Fixed: 3604295
2023-09-02 05:09:38 -07:00
Vinod Kumar Pirla
caf1626286 qcacmn: On link switch don't change the state of ML peer
On disconnect ML peer state is set to disconnect initiated,
this helps to avoid sending multiple deauth/disassoc OTA
frames to AP on each VDEV.
If link switch fails the ML peer will be in this state so
for next userspace disconnect request deauth/disassoc frame
is not sent OTA and AP might not be aware of STA leaving the
network.

Do not change ML peer's state on VDEV link switch disconnect
to ML_PEER_DISCONN_INITIATED.

Change-Id: Icbbb46bbf78cea796a3a1e07754be3a626390ad0
CRs-Fixed: 3601739
2023-09-01 21:01:39 -07:00
Abhinav Kumar
88fa8a3f0b qcacmn: Send proper control mode value to upper layer
1. Upper layer sends QCA_WLAN_VENDOR_ATTR_LINK_STATE_CONTROL_MODE
vendor command to configure control mode in host/fw.
2. Host receives GET_ML_LINK_STATE driver command to return
control mode (configured at step 1) to upper layer.

Host should reply as a response of GET_ML_LINK_STATE with same
value of control mode configured at step 1 to upper layer.

Change-Id: I3b5cb3bec31957ee8479d7f366d1e360421a7573
CRs-Fixed: 3601735
2023-08-31 11:02:29 -07:00
Amruta Kulkarni
1684c8ceac qcacmn: T2LM timer changes
Currently the T2LM timer is maintained by host.
Code change made to add support to run the T2LM timer in FW.

CRs-Fixed: 3594141
Change-Id: I7eee4800f68b07d5492a0336e3fe8e0db17d2020
2023-08-31 11:02:17 -07:00
Kenvish Butani
744e92cc0c qcacmn: Cleanup MLO CDP API's for MLO Partner List
Cleanup MLO CDP API's for updating MLO Partner
list invoked from UMAC.

Change-Id: Id3a346ceb4b103410e1e89cbce25abcad9e4adc5
CRs-Fixed: 3588208
2023-08-30 01:38:23 -07:00
Pragaspathi Thilagaraj
7f18f6e441 qcacmn: Update self link address also after roaming
When updating the AP link address and channel info after
roaming, update the self link address also to the link switch
context on each vdev. This information will be fetched while
sending roam + auth event to userspace after roaming.

Change-Id: I363a5ee8d65bb21d84c15879996369f4e397f2a6
CRs-Fixed: 3589401
2023-08-30 01:37:59 -07:00
Uraj Sasan
127fb0fc7e qcacmn: Skip sending T2LM for bridge sta
Skip sending T2LM info to Target for bridge-sta topology

CRs-Fixed: 3598171
Change-Id: Iccbbef68431ca2d415e4f6127ea8231d85ded0e1
2023-08-28 05:44:15 -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
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
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
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
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
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
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
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