Commit Graph

491 Commits

Author SHA1 Message Date
Jianmin Zhu
a4c7f4f50a qcacld-3.0: Fix roam to legacy failed
When roam to legacy, need keep legacy way to get bssid and freq.

Change-Id: If38e5e28fcc9bc783b10a234d673f4eba32aa61c
CRs-Fixed: 3284986
2022-09-08 14:00:12 -07:00
Jianmin Zhu
56608e95ec qcacld-3.0: Fix assert for race condition
When disconnect from wpa_supplicant and cm event from F/W happen at same
time, supplicant holds cm cm_req_lock and wait rsp of p2p cleanup roc from
scheduler thread until 2 sec timeout, sheduler thread is blocked to wait
for cm_req_lock.

When wmi peer delete of vdev0 is not sent within 1.2 sec after host send
wmi peer delete of vdev1, firmware will assert.

To fix it, don't wait rsp of p2p cleanup roc when disconnect by async way.

Change-Id: I877b7a446dfd12f621dad5049a67574359bdd322
CRs-Fixed: 3285115
2022-09-08 14:00:06 -07:00
Srinivas Dasari
284ee6b50b qcacld-3.0: Add link entry to policy_mgr upon legacy to MLO roam
Currently, link entry is not added to connection_list of
policy_mgr in case of legacy to MLO roaming. This causes
policy_mgr to miss track of the MLO link.
Check if the connection entry is present in the policy mgr
for the link vdev id and add an entry if it's not present.

Change-Id: Ib19f3616a3384670f1faef20c39476a2bcac2588
CRs-Fixed: 3274435
2022-09-06 13:46:26 -07:00
Jianmin Zhu
b905ea4fac qcacld-3.0: Fix race condition between supplicant and driver
There is a race condition issue between supplicant and driver thread.
1.	Suppliant disable F/W roaming.
2.	Supplicant Invoked roaming.
3.	Driver reported roam completed to supplicant before EV_ROAM_DONE.
4. 	Supplicant tried to enabled roaming, failed for vdev ROAMING state.
5.	Roaming completed, but RSO kept disabled for supplicant disabled
	roaming flag not cleared.
6. 	F/W roaming kept disabled until next disconnect and reconnect.

To fix it, driver don't report roam completed event to supplicant until
vdev changed from ROAMING to CONNECTED.

Change-Id: I8f0db74b5dce69ea355fde2c43edaf6419c87eb0
CRs-Fixed: 3280727
2022-09-06 04:23:18 -07:00
Jianmin Zhu
2a7d4c1cee qcacld-3.0: Fix wrong bssid and freq after mlo roaming
For mlo AP, bssid in wmi_roam_synch_event_fixed_param of
WMI_ROAM_SYNCH_EVENT is AP MLD addr, when use it as link addr,
failed to register peer and set peer as connected, so all Tx
are not allowed including EAPOL.
Fix it by getting AP link addr and frequency of each link from
setup_links_param array of WMI_ROAM_SYNCH_EVENT.

Copy link info from roam sync event to connect response before notify
os_if roam complete, os_if will send link info from connect response
to wpa_supplicant, supplicant will use it to add MLO Link KDE(s) into
EAPOL-Key 2/4.

Change-Id: I87833784a4e0b9240725223069c55fb0db3bc88f
CRs-Fixed: 3277878
2022-08-31 21:10:02 -07:00
Amruta Kulkarni
7a2871544b qcacld-3.0: RSO enable for open and secure connection
Currently rso enable for open and secure connection is handled
incorrectly.
For secure connection roaming should be enabled
after key exchange is complete.
For open connection rso enable is done twice.

Fix is for enabling roam offload for open and secure connection.

Change-Id: I0abde2a6001f176c97e4aa59947260a50c48e6cc
CRs-Fixed: 3271248
2022-08-31 16:03:54 -07:00
Amruta Kulkarni
7ad653825e qcacld-3.0: Single link ML connection
Currently if link specific probe response generation fails
STA keeps sending probe requests until proper probe response
is received or join timeout failure. This results in ML
connection failure

Change is to continue with single link ML connection if probe
response generation for link/s by clearing partner link information.

Change-Id: Ia969501a3bdd1ac70e14f3a0eafd0752207b66da
CRs-Fixed: 3238861
2022-08-31 16:03:47 -07:00
Srinivas Dasari
e85f7f098c qcacld-3.0: Set the RSO state before sending cmds to firmware
Currently, switch_to_rso_stop happens based on the
current state check and the expected state is
RSO_ENABLED/ROAMING_IN_PROGRESS/ROAM_SYNC_IN_PROGRESS.
The thread(e.g. user thread) that is sending rso_stop to
firmware might have got the expected state value when
it has read the state and proceeded with commands needed
to send to firmware. ROAM_SCAN_MODE is one of these commands
and firmware sends a response for the same. The response
gets processed in scheduler thread.

The expected sequence as per the current implementation is,
1. Check the current RSO state and proceed if it's any of
   RSO_ENABLED/ROAMING_IN_PROGRESS/ROAM_SYNC_IN_PROGRESS.
2. Send all commands corresponds to switch_to_rso_stop to fw
3. Set the new state to RSO_STOPPED
4. In scheduler thread, get response for
   ROAM_SCAN_MODE(one of the commands sent in step2) and
   proceed from RSO state RSO_STOPPED
5. scheduler thread sets the state to DEINIT.

But the user thread may get suspended while sending commands
to firmware (step2) and may get resumed after step4. The new
sequence could be,
1. Check the current RSO state and proceed if it's any of
   RSO_ENABLED/ROAMING_IN_PROGRESS/ROAM_SYNC_IN_PROGRESS.
2. Send some commands corresponds to switch_to_rso_stop and
   thread gets suspended. Assume it has sent ROAM_SCAN_MODE.
3. In scheduler thread, get response for
   ROAM_SCAN_MODE(one of the commands sent in step2) and
   proceed from RSO state RSO_ENABLED.
4. As part of step-3, scheduler thread moves the state to
   RSO_STOPPED and then to RSO_DEINIT.
5. User thread gets resumed and sets the new state
   to RSO_STOPPED. This leaves the RSO state in invalid
   state even after disconnect.

Set the state to RSO_STOPPED before sending any commands
to firmware. This is to ensure the state is not corrupted by
the scheduler thread.

Change-Id: I4d43508bdee2b33caba28579939fffdebfab121d
CRs-Fixed: 3278047
2022-08-31 14:31:42 -07:00
Amruta Kulkarni
d7bed8d11c qcacld-3.0: Set dp peer flags for single link ML roaming
In case of single link mlo roaming, set both dp peer flags
is_first_link and is_primary_link to 1, then datapath will
create MLD peer.

Change-Id: I935c42b2c3eaa558028d45bdbf502007723f656c
CRs-Fixed: 3271224
2022-08-27 18:20:02 -07:00
Pragaspathi Thilagaraj
74d3b5dbcb qcacld-3.0: Enable SAE auth cache api for Diag logging
SAE authentication frames during roaming should be cached and
printed after roam scan done print. This support is not present
in diag logging.
Enable SAE auth frame caching for diag logging.

Change-Id: I205bd2fd1c91253d1e6aaf3361857baf67ccd6fd
CRs-Fixed: 3254216
2022-08-27 15:15:33 -07:00
Jianmin Zhu
e3ff91adef qcacld-3.0: Don't treat assoc req as reassoc req
Add a flag to indicate assoc req is used for this roaming,
don't treat assoc req as reassoc req.

Change-Id: I3a13985b6b173892fbe281668d07f7179d1c364c
CRs-Fixed: 3274314
2022-08-27 13:48:14 -07:00
Bing Sun
082f9da230 qcacld-3.0: Add support for WPA3 LFR2 roaming
On some projects, LFR3 roaming is not supported due to
limitation of FW memory, thus, add support for WPA3 LFR2
roaming.

Change-Id: I80888049a243c0d37e08377d89a6aa44e75a8850
CRs-Fixed: 2973554
2022-08-21 20:50:17 -07:00
Surya Prakash Sivaraj
20f32531a3 qcacld-3.0: Fix SAE whitelist SSID roam failure
In whitelist roaming, the roam offload event is sent
for an BSSID with different SSID, however host driver
copies the connected bssid in the external auth event
to the userspace. This leads to preauth failure.

Cache the ssid from the beacon received as part of the
roam frame event before every roam auth offload event
and use that ssid for external auth events to userspace.

Change-Id: I634992baf0c98054897707aaf3b1265e17d46f04
CRs-Fixed: 3262859
2022-08-16 09:14:28 -07:00
Pragaspathi Thilagaraj
d66eab7ba7 qcacld-3.0: Fix order of BTM frame logging
Reorder the BTM logging according to the below
scenarios:

Scenario 1: Roaming to AP2 and BTM query is sent to AP2.
1. Connected to AP1.
2. <Low RSSI> triggered roam to AP2. Successful roam to AP2.
==== Roam stats event 1 with full TLV case with AP1
(scan_type == partial, roam_trigger = low rssi) ====
3. BTM query to AP2 after 1sec.
4. BTM req from AP2
5. BTM resp to AP2
==== Roam stats event 2 with full TLV case having AP2 BTM info
(scan_type ==NO_SCAN, roam_trigger = BTM) ====

Scenario 2: Connected to AP1, send BTM query to AP1
==== Roam stats event 1 with full TLV case having AP1 BTM info
(scan_type ==NO_SCAN, roam_trigger = BTM) ====

Scenario 3: BTM request initiated by the AP
1. Connected to AP1.
2. AP1 sends BTM request with disassoc imminent set.
3. Roam scan is triggered.
4. BTM response to AP1
5. Roam to AP2.
==== Roam stats event 1 with full TLV case having AP1 BTM info
(scan_type = full or partial, roam_trigger = BTM) ====

6. Send BTM query to roamed AP2.
7. AP2 sends BTM req.
8. Send BTM resp to AP2
==== Roam stats event 2 with full TLV case having AP2 BTM info
(scan_type=NO_SCAN, roam_trigger = BTM) ====

Change-Id: I4571cbe75397fb795046abe8711571264ed98a65
CRs-Fixed: 3260060
2022-08-15 20:44:01 -07:00
vijaraj
98152442f6 qcacld-3.0: Incorrect TX status in logging after Roaming
In the api cm_roam_mgmt_frame_event(), TX status is sent
without conversion to the userspace resulting in
wrong value of tx status during logging.

Correct this by converting the tx status value before
sending to userspace in order for userspace to properly
evaluate the tx status.

Change-Id: Ie4b6b8bff5e8b9c88edfaf303ce6a4ae370edd67
CRs-Fixed: 3250473
2022-08-15 20:43:56 -07:00
Ashish Kumar Dhanotiya
2490a83a25 qcacld-3.0: Add support to get feature set info
Based on the new requirement, add support to get requested
feature set info from different feature components.

Change-Id: I1bfc097c8ae8c4ab678d4dc07b7932cf3272d851
CRs-Fixed: 3262868
2022-08-12 18:55:15 -07:00
Jianmin Zhu
5a9556bf4b qcacld-3.0: Update linkspeed state to F/W for roaming protocol part
To avoid unmeaningful roaming, when low RSSI trigger,
only roam when rx linkspeed is also bad.
Steps:
1. F/W indicates feature supported by:
	wmi_service_linkspeed_roam_trigger_support
2. App sets vdev rx link speed threshold by vendor cmd.
3. Bus_bw_work gets rx link speed from data path periodically.
4. If found rx link speed change from good to poor, or poor to good, send
	to F/W.
5. F/W low rssi roaming is triggered only when both RSSI and link speed are
	poor.

Change-Id: I56829e42b26e407dd8e989a870aee2b3ea406232
CRs-Fixed: 3261996
2022-08-12 08:24:53 -07:00
Deeksha Gupta
446d532959 qcacld-3.0: Check disconnect state while fetching MLO vdev_id
In wlan_cm_mlo_update_disconnecting_vdev_id(), add an extra
check of wlan_cm_is_vdev_disconnecting with
wlan_cm_get_active_req_type, to check the vdev state as well,
along with the active_cm_id flag.

Change-Id: I80d59d419555864d6c9712e0d93efce0a6c203e4
CRs-Fixed: 3262543
2022-08-11 03:15:21 -07:00
Amruta Kulkarni
37a60702d1 qcacld-3.0: Reset roam band value to default
When Roam control config is disabled reset roam band
value to default.

Change-Id: I5efc7b0c05604ed30f8c3c4f7ff48481f9211e61
CRs-Fixed: 3259399
2022-08-09 11:17:24 -07:00
Surya Prakash Sivaraj
ba05c22b03 qcacld-3.0: Fix FT-FILS roaming failure
The AP rejects the FILS-IM association request with reason
"Invalid IE format". In the assoc request, two problems are
seen:
    1. The RSN IE has a junk group management cipher suite.
    2. FILS HLP container IE is fragmented, and the fragment
       IE does not immediately follow the HLP container IE.

In the assoc request, the RSN IE encoded in the authentication
is unpacked and the PMKID is replaced with the pmkr1 name
derived at the end of FILS authentication. Currently, the
existing PMKID in the RSN IE is replaced only if the group
management cipher is present. In non-802.11w case, the new
PMKID is appended at the end of existing PMKID, and leads to
improper IE format.

To fix this, replace the existing PMKID whenever PMKID is
present.

To fix invalid HLP container IE format, encode the HLP
container and its fragment IEs together in the assoc request.

Also, inorder to get the pmksa match from the crypto table for
a FT-FILS, fill both ssid and cache ID. Without cache id, the
cached entry is not updated with MDIE.

Change-Id: I654b5527a726eb7872b90fb19a3d97623f3caa68
CRs-Fixed: 3233081
2022-07-21 21:09:18 -07:00
VIJAY RAJ
702557e085 qcacld-3.0: Roam reason and sub-reason code conversion during diag logging
Wrong value of Roam reason and sub-reason code is sent to
userspace via diag logging.

Convert the value of reason and sub-reason code to qca
specific code before sending it to userspace

Change-Id: Iebdc5f8673e2da6a208a89caca9a742202256bcc
CRs-Fixed: 3236178
2022-07-19 03:33:41 -07:00
VIJAY RAJ
bcf0e588e7 qcacld-3.0: Incorrect bssid value during Roam Result logging
In the cm_roam_result_info_event() api, for roam result the
current AP bssid is sent instead of candidate AP.

Correct this to send candidate AP bssid during roam result
logging.

Change-Id: I4b1d4634faa3fbf3e7b32af8c13d4b444d26c505
CRs-Fixed: 3237021
2022-07-18 17:44:18 -07:00
Jianmin Zhu
ab5022192c qcacld-3.0: Fix issue uapsd AC is 0 when set enable_twt 0
After WLAN_TWT_CONV_SUPPORTED enabled, TWT variables are moved from
COMP_MLME to COMP_TWT, APIs are updated too, hdd_update_tgt_twt_cap
just intersects enable_twt and twt_requestor of COMP_TWT instead of
COMP_MLME, legacy variable mlme_cfg->he_caps.dot11_he_cap.twt_request
isn't controlled by ini enable_twt now.

Change-Id: I71bb09704fd96591f37019ebbb77733cff04af25
CRs-Fixed: 3229121
2022-07-07 14:24:16 -07:00
VIJAY RAJ
e96efd0496 qcacld-3.0: Send BTM and EAPOL event logs through netlink
BTM and EAPOL events are sent through the vendor event to
the supplicant

Modify the BTM and EAPOL event log flow through the diag
event to the supplicant in order to maintain single
logging infrastructure

Change-Id: I1e21d1192be059cc48189bc57aacbc314d5297bc
CRs-Fixed: 3219065
2022-07-05 12:40:30 -07:00
VIJAY RAJ
8d4332bc1b qcacld-3.0: Send Roam Diag event logs through netlink
Roam Diag logs are sent through the vendor event to the supplicant.

Modify the Roam Scan start and Roam Candidate log flow through
the diag event to the supplicant in order to maintain single
logging infrastructure.

Change-Id: Idd85b46f72a481aa99e243c81952010d2779afaf
CRs-Fixed: 3218639
2022-07-05 12:40:24 -07:00
Surya Prakash Sivaraj
c01e68f5b4 qcacld-3.0: Send RSO update after set key failure
In multiple AKM suite roaming scenario, if the STA is
roaming from WPA3 to WPA2 AKM suite, during the roam sync the
rso config will have the PMK of previous WPA3 connection. The
RSO start for the new connection would plumb the PMK of WPA3 to
the FW. After the RSO is enabled, set_key from userspace will
update the proper PMK of the current WPA2 to the FW via
RSO Update.

Due to a race condition, the set_key from userspace can reach
driver before the RSO start is sent to the FW. In this case,
the RSO update(due to set_key) will fail. Therefore, the FW
will keep the WPA3 PMK(in RSO start) as the final PMK for
the WPA2 connection, leading to roam failures.
To fix this, if the set_key for the connected bssid is
received during Roam sync in progress, then mark the
set_key rejection in vdev and send RSO update to the
FW after RSO gets enabled.

Change-Id: Ibb5a4929212e6c2ccabf39136962d3a8e606ece9
CRs-Fixed: 3212800
2022-06-30 12:50:42 -07:00
abhinav kumar
85c8c8c9b8 qcacld-3.0: Allow Host to process ROAM_CONTROL_ENABLE vendor cmd
Allow Host to process ROAM_CONTROL_ENABLE vendor command
irrespective of WLAN_VENDOR_HANDOFF_CONTROL feature flag.

Change-Id: I1fb1b231a4273013bacd35e38436c12ae6566b1d
CRs-Fixed: 3230968
2022-06-30 03:06:03 -07:00
VIJAY RAJ
7b37f88e1d qcacld-3.0: Incorrect throughput value in Connectivity logging
In the api cm_roam_candidate_info_event(), the value of
throughput is sent in Mbps whereas throughput is expected
in Kbps

Correct this by converting the throughput to Kbps instead of
sending it in Mbps.

Change-Id: I0fe95efc3a02d43187ff2c0423813529687c2ee9
CRs-Fixed: 3224754
2022-06-29 09:32:30 -07:00
Jianmin Zhu
71d3e7c17c qcacld-3.0: Fix peer unmap failure due to invalid roam scan mode value
When supplicant disables firmware roam, RSO stop command with
roam scan mode value 4 is sent to firmware and this value 4
indicates the firmare to enable only Forced roam trigger(roam
invoke command from host). But before
ROAM_DEINIT(WMI_VDEV_PARAM_ROAM_FW_OFFLOAD with value zero) is
posted to firmware, the roam scan mode should be 0 or else there
could be potential peer unmap failures if firmware has already
started roam and disconnect is triggered from north bound or from
peer.
To avoid this, in the roam offload state machine handle the state
switch from RSO stopped to deinit if supplicant disabled roaming
flag is set and send RSO stop with roam scan mode value 0 to
firmware.

Change-Id: I6ff39f43bd75c95ed03c357a5602e25a5a0ffd92
CRs-Fixed: 3229082
2022-06-27 05:28:50 -07:00
abhinav kumar
b2c27b3103 qcacld-3.0: Handle vendor control command and event
WMI_ROAM_GET_VENDOR_CONTROL_PARAM_CMDID: Add support
for a new roam command to get vendor control parameters
from FW. Host needs to send proper param ID in command
(from enum WMI_ROAM_GET_VENDOR_CONTROL_PARAM_ID)
to get corresponding INI value from FW.

WMI_ROAM_GET_VENDOR_CONTROL_PARAM_EVENTID:
Add support for a new roam event to get param value
from FW. FW sends this event upon receiving
WMI_ROAM_GET_VENDOR_CONTROL_PARAM_CMDID command.

Change-Id: I03679bcf359a0f425aab7b9ea1c3cb6d84fbb0ca
CRs-Fixed: 3225160
2022-06-25 01:08:39 -07:00
Pragaspathi Thilagaraj
701003d5dd qcacld-3.0: Add support to print aid and btcoex field
Add new tags for reassociation request and reassociation
response. Parse the association id from roam stats event
and send it over the connectivity logging event

Add support to print AID and BT-COEX field.

Change-Id: I7926b5c69a84404b666acfd5e2db30426d085881
CRs-Fixed: 3221624
2022-06-24 18:21:00 -07:00
abhinav kumar
7e9e394af6 qcacld-3.0: Add a new INI RoamCU_6GRSSIRange
Add support to parse a new INI named
"bss_load_trigger_6g_rssi_threshold/RoamCU_6GRSSIRange"
and send its value to FW via WMI_ROAM_BSS_LOAD_CONFIG_CMDID.

Min, Max and default value of this INI:
Min: -120
Max: 0
Default: -70

Change-Id: I9aa99d887553de4022fc0a31dc0644601cd340d6
CRs-Fixed: 3225548
2022-06-24 07:45:49 -07:00
Deeksha Gupta
1d58140b54 qcacld-3.0: Avoid tacking CM lock after holding sme global lock
When STA receives a connect req (C1) and it requires hw mode
change. Now the hw mode change resp will take the SME global
lock and call connection manager API, which will try to
acquire CM lock.

But if before that one more connect req (C2) is received in
another thread which has acquired CM lock before C1 can
acquire it, and this connect req C2 will also flush the C1
from CM queue. Now if C2 also require hw mode change, which
also require to acquire SME global lock.

So both connect will wait for each other to complete, leading
to deadlock.

To fix this, from hw mode change response, break the context
(by posting to scheduler thread) so that sme global lock is
released and C2 is processed.

As C1 is already flushed by C2, on scheduler thread execution
once it get CM lock it will be dropped silently, and C2 will
proceed with connect.

Change-Id: I14efb0f21442edcae90a4abea20cb0b9e06a0758
CRs-Fixed: 3223786
2022-06-23 16:21:42 -07:00
Divyajyothi Goparaju
8515cfbc5a qcacld-3.0: Add bmiss timeout vdev set params
Currently host sends first, final bmiss count to fw

Add support for bmiss timeout(in seconds)
during wakeup as well as sleep state to fw.

Change-Id: Id748fabdff94f5fa3038bcea1b1cac733ac2dbe1
CRs-Fixed: 3224106
2022-06-23 12:57:59 -07:00
abhinav kumar
fbc86e2752 qcacld-3.0: Remove GET and SET ROAMSCANCONTROL driver cmd
GETROAMSCANCONTROL and SETROAMSCANCONTROL driver commands
will be deprecated from Android 13. So remove all logic
related to these driver commands in the host.

Change-Id: I05fafbec2b3f3b798c8c89d0c33b1dbf5c1b45d4
CRs-Fixed: 3225052
2022-06-22 01:00:56 -07:00
Jianmin Zhu
91d5304a24 qcacld-3.0: Allow eht in WMI_SCAN_CHAN_LIST_CMDID
Set WMI_CHAN_FLAG_ALLOW_EHT in WMI_SCAN_CHAN_LIST_CMDID to FW.

Change-Id: I72c050aff6d73d099cf3e19fd918598709e765fc
CRs-Fixed: 3221435
2022-06-18 19:12:08 -07:00
David Oladunjoye
75c1d7c753 qcacld-3.0: umac: Replace fallthrough comment with attribute
-Wimplicit-fallthrough is being enabled by default. Some compilers
such as clang require the attribute instead of just a fallthrough comment.

Change-Id: I7a04c8727121f58a5d6dcd575446c9acedea164b
CRs-Fixed: 3216248
2022-06-16 18:49:30 -07:00
Srinivas Dasari
7c1083a4ba qcacld-3.0: Enable roaming on both STAs in primary iface usecase
set_primary_vdev usecase in STA+STA concurrency is to use that
interface(e.g. wlan0) over the other interface(i.e. wlan1) for
data transfer.
Non-primary vdev use case is to check the quality of that link
and decide if data can be switched to it and make it primary.
It may get disabled if it's not going to become primary STA after
measuring the link quality for sometime or with few APs.

Enable roaming on non-primary vdev also to find better AP.

Change-Id: I3205f1ee1b7da4aa813955308730949ccc70941f
CRs-Fixed: 3219633
2022-06-15 20:48:41 -07:00
Srinivas Dasari
25effcdd77 qcacld-3.0: Allow 2nd STA connect on any channel when ML STA exists
When an ML STA connection exists with more than one link and if
another STA connection is attempted, allow it. Disable the link
causing MCC with the new station after successful connection.
If there is only one link, reject the second STA connection.

Change-Id: I3cd95e0b425f5e1f96d75f226b058668f030151f
CRs-Fixed: 3218700
2022-06-15 17:05:09 -07:00
Srinivas Dasari
70e98be7ab qcacld-3.0: Don't skip RSO stop command if roaming is enabled
Currently, roaming state machine relies on the disconnect
sequence where link vdev gets disconnected first and then
assoc vdev. RSO stop is sent as part of link disconnection
and skipped for assoc vdev disconnection as the roaming
state machine is per ML than per link.
If link vdev connection hasn't happened due to some
reason (e.g. link not available in scan while connect, single link
ML connection), RSO stop command is not sent to firmware due
dependency on above sequence.
Check roam state while processing assoc vdev disconnect and send
RSO stop command to firmware if it's in enabled state to cleanup
the RSO state machine in firmware.

Change-Id: If3e9a579c0f3da27a337fbbffcaf0beb580bd8bd
CRs-Fixed: 3215155
2022-06-15 11:08:40 -07:00
Jyoti Kumari
72c3404391 qcacld-3.0: Handle TWT renegotiation failure case
Generally below process should happen in renegotiation failure
case.
1. TWT setup (successful)
2. TWT setup (renegotiation failure)
3. TWT teardown
4. TWT GET STATUS - 0(dialog ID) 0 0 0
5. TWT setup - successful

Since all WMI TWT events gets executed in WMI thread. So when
renegotiation failure case hits, driver sends TWT
teardown to firmware and waits for twt ack in worker thread.
In same worker thread TWT event needs to be processed.
TWT ack event will not process as it's waiting in same worker
thread and it will get timedout.

As part of fix, break the context in renegotiation and
send the teardown in the new worker context.

Change-Id: I13c8d44d6582e39d1cc2c2aa10a500fffbf150b1
CRs-Fixed: 3204750
2022-06-10 18:58:11 -07:00
Jianmin Zhu
7ab6928044 qcacld-3.0: Limit mlo link num and band by cfg
Limit mlo link num and band by psoc sta cfg mlo_support_link_num and
mlo_support_link_band.
If mlo_support_link_num is 1, only permit 1 mlo link, don't permit
partner link.
Disable both assoc link and partner link on disallowed band too.

Change-Id: I04f0725ceb0fb4e0bd14ca44ff1a870702b62285
CRs-Fixed: 3211973
2022-06-08 15:16:18 -07:00
VIJAY RAJ
26ad4c366c qcacld-3.0: Optimize logs in wlan_cm_is_roam_sync_in_progress
In api wlan_cm_is_roam_sync_in_progress(), the roam_sync
status is checked for every instance of
wlan_cm_is_roam_sync_in_progress resulting in excessive
printing of cm_is_vdev_roam_sync_inprogress logs

Add check to verify roam_sync status for STA mode which
results in trimming of cm_is_vdev_roam_sync_inprogress()
logs.

Change-Id: If0228edb90d718c7fde2b8f34e0003256cfd139b
CRs-Fixed: 3211915
2022-06-08 07:35:16 -07:00
Srinivas Dasari
5d5678b02d qcacld-3.0: Check if the freqs are on different mac for STA+STA
Currently, when driver receives connect request on secondary STA,
it checks if the secondary STA channel and first STA channel are
on different band to allow. This works fine for DBS solutions but
SBS solutions support same band(5GHz) channels on different MACs.
So, check if the secondary STA channel is on different mac to
allow connection.

Change-Id: If9cfe0f4605e31ab54b38a85fb9d38e9ca65871d
CRs-Fixed: 3212686
2022-06-04 13:41:51 -07:00
Jyoti Kumari
e526ca28f2 qcacld-3.0: Handle TWT for 11n case
When SAP and STA both are in 11n mode then STA doesn't populate
twt_req bit during assoc req. Because of this TWT commands failed.

As part of fix, check the below variable before setting twt_req
1. TWT requestor support from firmware
2. Enable TWT ini
3. TWT ini support in 11n
4. TWT requestor support from host

Set twt_requestor bit only if all above variable are set.

Change-Id: I77f2397f986b517cd5292109927eece7fdb4c7c1
CRs-Fixed: 3210015
2022-06-01 10:34:07 -07:00
Pragaspathi Thilagaraj
142cab9c7e qcacld-3.0: Check for allowed frequency during set pcl
Sta is not allowed to connect/roam in 6 GHz frequency or indoor
frequency in non-DBS target if SAP is active.
But STA roams to 6 GHz AP when SAP is active since the PCL allows
6 GHz frequency.

While populating PCL to firmware, check if 6 GHz and indoor
frequencies are allowed for non-dbs target and set the
weight appropriately if the channels are not allowed

Change-Id: I0e5fdc5b3c4177283d91cdfc58359336cc11910d
CRs-Fixed: 3205494
2022-05-29 06:03:57 -07:00
Srinivas Dasari
ed58b63609 qcacld-3.0: Fetch right vdev id to continue MLO link disconnect
When disconnected request started for an MLO connection,
link vdev gets disconnected first and then assoc vdev. So active
disconnect request is queued for link vdev first. As part of
RSO stop request-response handshake, the disconnect request is
cached and RSO stop request is sent to firmware. Disconnect is
supposed to resume for link vdev after getting the RSO stop
response . But currently, first MLO vdev gets checked if it
has active disconnect. This may fail to fetch the active
disconnect request if the first vdev in the list is assoc vdev
as it doesn't have active disconnect but link vdev has.
Check if it's a link vdev to resolve this and fetch active
disconnect req always.

Also, if there is only one link present(e.g. single link
connection or failed to connect the secondary link, etc.. ) in the
vdev_list, current release of vdev refs at the end of the API
wlan_cm_mlo_update_disconnecting_vdev_id() is not valid as it's
trying to release all links. Release only the links for which
reference is taken.

Change-Id: Idcb8a979dbdadafd4690e51a7301c4a7dfe82f73
CRs-Fixed: 3203969
2022-05-26 21:20:25 -07:00
Abhishek Singh
2b4bc8d5df qcacld-3.0: Add logic to disable a link during STA connect/roam
Add logic to disable a link vdev if concurrency doesn't allow it.
Send mlo_force_link_inactive in peer assoc for this and add
it in deleted table on connection complete.

Also disable the link if roam sync indication indicate
that link is disabled.

Change-Id: Ib0615308a669a5fd9d2b8ef6f8ab3f50953f658d
CRs-Fixed: 3192728
2022-05-24 00:57:24 -07:00
Abhishek Singh
f0ccd97d61 qcacld-3.0: Add disable ml link infra in policy manager
Add disabled links table and APIs to move and remove
vdevs from disabled links table.

Change-Id: I610bbd10e387a4bcd3a5d5c88c3dba5698878441
CRs-Fixed: 3181474
2022-05-23 22:06:05 -07:00
Aravind Kishore Sukla
c4337e7721 qcacld-3.0: Print 5Ghz channels and AP bssid in Roam result
During full scan only 2.4Ghz channels are printed.
Along with 2.4Ghz channels print 5Ghz channels.
so, use policy_mgr_get_connected_roaming_vdev_band_mask()
instead of policy_mgr_get_connected_vdev_band_mask()

After Roam result candidate or currently connected
AP bssid is not printed. so, printed candidate or
currently connected AP bssid by changing logic

Change-Id: I800ebdc033480b93150bdeb00a900c373ba333dc
CRs-Fixed: 3185092
2022-05-20 19:55:15 -07:00