提交图

640 次代码提交

作者 SHA1 备注 提交日期
Vinod Kumar Myadam
cc6e9e8d8a qcacmn: Fix un-initialize structure variable
Un-initialize structure variable causes prevent issue.

Initialize structure variable with zero in all fields of the
structure in cm_update_link_channel_info

Change-Id: Ib249bcb56b189b1529daeeb4be9f694c5a3ecae3
CRs-Fixed: 3788234
2024-04-19 08:36:58 -07:00
Jianmin Zhu
8b53a70981 qcacmn: Fix bss peer leak for link switch when LL-SAP existed
Hit following issue of link switch when LL-SAP existed.
1. Link switch was received on VDEV-1 (partner link).
   a. Link switch cmd was added to serial active queue, existing peer
      was deleted as part of link switch disconnect.
   b. Link switch connect started but got deferred due to LL-SAP Bearer
      switch transition, when WLAN_CM_SM_EV_BEARER_SWITCH_COMPLETE
      received, a new connect cmd was added to serial pending queue,
      link switch was blocked here.

2. Disconnect from userspace was received
   a. The disconnect on VDEV-1 here notified MLO-manager to terminate
      ongoing link switch.
   b. Link switch confirmation was sent to F/W as failure.
   c. link switch cmd was removed from serial active queue.

3. Connect cmd queued in #1.b was activated and moved VDEV-1 state to
connecting.
   a. New peer got created but PE session wasn't yet created.
   b. Disconnect from #2.a changed the VDEV-1 state from connecting to
      disconnecting.
   c. While processing the disconnect in #3.b, peer delete for the peer
   created in #3.a didn’t happen as disconnect didn’t proceed when pe
   session not found.

To fix it, for link switch, don't add new connect cmd to serial queue
after LL-SAP Bearer switch since link switch cmd is queued already.

1. Link switch is received on VDEV-1 (partner link).
   a. links witch cmd was added serial active queue, existing peer
      gets deleted as part of link switch disconnect.
   b. Link switch connect starts but gets deferred due to LL-SAP Bearer
      switch transition, WLAN_CM_SM_EV_CONNECT_ACTIVE is sent after
      WLAN_CM_SM_EV_BEARER_SWITCH_COMPLETE received, bss peer creat cmd
      is sent to F/W.

2. Disconnect from userspace is received when link switch unfinished.
   a. The disconnect on VDEV-1 here notified MLO-manager to terminate
      ongoing link switch.
   b. If BSS peer created, mlme_cm_bss_peer_delete_req will be called to
	delete it.
   c. Link switch confirmation is sent to F/W as failure.
   d. link switch cmd is removed from serial active queue.

Change-Id: I13ba820bd0240d062c7cd47ec0e53ae1a27d5b58
CRs-Fixed: 3752437
2024-04-19 06:27:37 -07:00
CNSS_WLAN Service
4004081535 Merge "qcacmn: Use only partner links with valid scan entry" into wlan-cmn.driver.lnx.2.0.14 2024-04-19 04:18:22 -07:00
Jianmin Zhu
864dae22f3 qcacmn: Disable partner link which has same mac or id with assoc link
In RNR of bad AP beacon, partner link has same link id and bssid as assoc
link of same MLD.

To fix it, disable partner link which has same mac or id as assoc link
of same MLD.

Change-Id: Ieda1807b5ed13559c847f2d39035a9acb2e4232f
CRs-Fixed: 3772848
2024-04-08 21:06:45 -07:00
Surya Prakash Sivaraj
99f24676b4 qcacmn: Use only partner links with valid scan entry
If the scan entries for a non-tx profile MBSSID partner links
are not present at the time of candidate selection, then
host driver generates the scan entry for the missing partner
link from the assoc response.

The assoc response from the AP has PMKID in the RSN(some APs
do not include RSN IE in assoc resp).In this case, the RSN
along with PMKID gets inherited into the scan cache of the
missing partner and this leads to mismatch between M3 and
scan entry RSN causing disconnection.

To fix this, mark all the MBSSID partners without scan entries
as invalid links at the time of candidate shortlisting. Score
and connect to only non-tx candidates with valid scan entries.

Remove the probe response generation from assoc response logic.

Change-Id: I342519490ead2a2e91426439cf47e65c61b53aed
CRs-Fixed: 3766047
2024-03-28 23:03:01 -07:00
Vinod Kumar Pirla
3ea1cbb97c qcacmn: Introduce APIs to save peer create and destroy hist
Add new structures, enums and APIs to enhance driver support
to store peer create and destroy history in PSOC.

Add new list to MLME's PSOC object to hold entries.

Change-Id: I22b8d559e9981a93dc4891d563586dc13245aff9
CRs-Fixed: 3738897
2024-03-28 01:38:03 -07:00
Vinod Kumar Pirla
a43a03d5b7 qcacmn: New field to save number of FW roamed links
Add new field to hodl number of links FW roamed
to from roam sync indication.

Change-Id: Ie855a4725eb20d2696de7b7e88e67b870fb918c6
CRs-Fixed: 3755825
2024-03-28 00:22:34 -07:00
Jianmin Zhu
54e0332947 qcacmn: Generate all possible unique candidates for MLO AP
For mlo candidate, need generate all possible unique candidates, and try
to connect one by one by sort of score.

For single MLO AP 5 GHz + 6 GHz + 2 GHz
 generates all possible unique candidates as following:
 1. 6 GHz + 2 GHz + 5 GHz
 2. 6 GHz + 2 GHz
 3. 6 GHz + 5 GHz
 4. 6 GHz
 5. 5 GHz + 2 GHz
 6. 5 GHz
 7. 2 GHz

Since standby link doesn't contribute to MLO candidate score,
to assure 3 links candidate is tried before 2 links generated,
insert generated candidate after original candidate.

Change-Id: I6c92b02e47563fc9b15e37fcec2ab7025a6554a3
CRs-Fixed: 3750735
2024-03-25 19:48:01 -07:00
Surya Prakash Sivaraj
7062447879 qcacmn: Ignore PCL scoring for non-DBS STA
HW is non-DBS. SAP is UP in 6 GHz. Now, when a STA connection is
attempted, the pcl for the second connection would have SAP SCC
channel with highest priority, all the 5 GHz channels with 2nd
highest priority and the 6 GHz channels with least priority.
Therefore, even if there is a strong 6 GHz candidate for STA, the
5 GHz candidate would be chosen and the SAP moves to SCC in 5 GHz.

To fix this, ignore the pcl scoring for the non-DBS concurrency
cases as the SAP can move to the channel of the best STA interface.

If the SAP is in legacy band, and if still a 6 GHz STA is chosen,
then the legacy SAP would be torn down. So, give STA the best
possible in non-DBS case.

Change-Id: I08d1acbe7805dcf7137534347406ffdf539ff0aa
CRs-Fixed: 3748694
2024-03-18 10:46:06 -07:00
Aasir Rasheed
6e6bab3a81 qcacmn: Use MLMR and MLSR bss type for vendor_roam_score_algo
Currently, Host driver is using only MLMR bss type for
vendor_roam_score_algorithm.

Due to recent change in host driver via
Change-Id: I01338dbbc0845e6f6284e4a374f5ad0a5cada334, Host driver
is using this api policy_mgr_2_freq_always_on_same_mac for
evaluating sbs or dbs frequency which in turn returns MLSR for
frequency 5 GHz and 6 GHz opposed to MLMR earlier.

This change is to use both the bss types MLMR and MLSR for
the evaluation vendor_roam_score_algorithm.

Change-Id: I72b0d5e5b2daf498a434c05b503ea8aebc65be74
CRs-Fixed: 3742619
2024-03-18 00:36:47 -07:00
Surya Prakash Sivaraj
9c831dd988 qcacmn: Support dynamic FILS enablement for dual SAP
For Dual SAP(legacy SAP + 6 GHz SAP), WFA  HE-4.1.1 cert
case requires the following:
a) If Dual SAP is enabled, the 6 GHz SSID should be
discovered via the RNR IE of the colocated legacy SAP.
b) If a co-located neighbor is present, the  6 GHz SAP
should not send FD or unsolicited probe responses.

Add support for the above the cert case by configuring the
FD support for the 6 GHz SAP based on the operation of the
co-located SAP.

Change-Id: Ib1ea2794baf8786b7c042fc35130b6929abb947f
CRs-Fixed: 3732663
2024-03-12 02:04:33 -07:00
Jianmin Zhu
a1aaa5c775 qcacmn: Fix assert in cm_validate_partner_links
Uninitialized pointer partner_entry is deferenced wrongly in
Change-Id: Ib7e2f4cd43c8190c5e5fd0bb7786df41b022f518

Change-Id: I0cada18a043f4ed2f65697f81530b4169dc46dd2
CRs-Fixed: 3738263
2024-02-22 01:50:53 -08:00
Vinod Kumar Pirla
0d945daa64 qcacmn: Extend vdev stop and peer delete cmd for link switch
Enhance WMI command of existing peer delete and VDEV stop to
add new TLV to carry MLO params with link switch BIT set when
link switch is in progress.

Change-Id: I50b1aa48e4e2c976a56bcd3b75395eef6830e627
CRs-Fixed: 3663340
2024-02-18 22:37:29 -08:00
Abhinav Kumar
0e88ed7844 qcacmn: Add support to send chan info for standby link
As per new requirement, host should send proper values
to get_channel request from upper layer for standby link.

Upper layer can use these information to fetch CU values
for standby link and print on console.

Change-Id: I045b8c5a3035f96e55281bd31d3e0b8043df4cb7
CRs-Fixed: 3719534
2024-02-07 01:39:50 -08:00
Jianmin Zhu
4c64c692a1 qcacmn: Avoid MLO sta connect duplicated BSS
After legacy STA connected 1 link of MLO AP as 11ax, MLO STA connect
same MLO AP, 1 link connect will fail for bss peer existed, tx queue
will be disabled, other links can't be used at all.

To fix it, when MLO STA select candidate AP link, if peer with BSS link
addr exist, disable the link.

Change-Id: Ib7e2f4cd43c8190c5e5fd0bb7786df41b022f518
CRs-Fixed: 3715997
2024-02-02 19:33:08 -08:00
Jianmin Zhu
56b867e257 qcacmn: MBSSID profile count
Profile count information not sent to firmware
when DUT associated to TX BSS.

Populate profile count for TX BSS profile.

CRs-Fixed: 3633267
Change-Id: I08a13fe785dbbf66f7ec3394d7aa72f685438619
2024-02-01 19:51:30 -08:00
Pooja T C
e1c471c791 qcacmn: Skip non trans bssid look up for WIN driver alone
Issue:
TA of the MBSSID basic trigger always shows up as:
00:00:00:00:00:00, when the STA connected to Non-tx
VAP, due to which peers are not responding to the
basic trigger frames and getting more response
timeouts. This results into a dip in the throughput
(due to excessive retries).

Fix:
In AP solutions, it is expected that the non trans
bssid could be 00:00:00:00:00:00, during vdev MLME
up operation. Hnece, the updating the vdev up params
(trans bssid, profile index, profile number), should
not be dependent on the valid non trans bssid.
This condition is valid for STA solution, hence added
a opmode check specific for AP.

Change-Id: I766182c6dd0aba93d861800146eb44d3e3f6a706
CRs-Fixed: 3669310
2024-02-01 19:51:17 -08:00
Jianmin Zhu
9bc183ab64 qcacmn: Don't allow MLO SCC link
When MLO partner link and assoc link are on same frequency, F/W will
assert.

To fix it, don't allow partner link is on same frequency of assoc link.

Change-Id: I01338dbbc0845e6f6284e4a374f5ad0a5cada334
CRs-Fixed: 3706613
2024-02-01 19:51:04 -08:00
Aasir Rasheed
6ecdcfe927 qcacmn: retry with same num links incase of assoc failure
Currently for any assoc failure the number of links part of the
association is reduced and retried with less number of partner links.

If the failure is due to "Association request rejected temporarily,
try again later" retry to the same with the same number
of partner links instead of downgrading the links.

Change-Id: Id2b50469a5265b0151c000b3bcead2db361ad152
CRs-Fixed: 3708221
2024-01-24 07:44:00 -08:00
Aasir Rasheed
924e277dd2 qcacmn: update check for informing partner bssid to kernel
Currently, Host driver is updating partner bssid to kernel
based on number of link. In some cases number of link may be zero
leading to not updating partner link bssid to kernel.

This change is to eliminate number of link check for updating
partner link BSSID to kernel.

Change-Id: I2e2704aeaea0db41c4d82792808cc8765290cc7c
CRs-Fixed: 3707662
2024-01-21 08:55:39 -08:00
Vinod Kumar Pirla
d2815cb9cf qcacmn: Remove serialization command priority on HO fail
On HO failure driver triggers internal disconnect and if
the existing connection is two link MLO, then disconnect
is issued first on partner VDEV and later on assoc VDEV.

To avoid STA+STA roaming conflict where STA2 roamed to
STA1's BSSID and STA1 resulted in HO failure and to
prioritize STA1 cleanup so that STA2 will not fail during
peer create.
The original change I379c03138b70580f44c2b96489ada030ec6fc20e

This is leading to cleaning up assoc VDEV first followed by
partner VDEV, but DP component removes the entry of DP peer
on assoc VDEV cleanup as the expectation is partner VDEV
gets cleaned first followed by assoc VDEV. This is causes
reference leak on the peer.

To address this issue don't prioritize disconnect for
HO Fail case.

Change-Id: I8d5abd0bb5ded49527ce851b9155ad22d7dcf5a8
CRs-Fixed: 3708018
2024-01-19 12:22:08 -08:00
Vinod Kumar Pirla
95b011605e qcacmn: Enhance allowed security modes for EHT via OEM cfg
Certain APs available to end users may allow EHT/MLO config
in non-WPA3 security modes (like WPA2). Current implementation
will not allow connection to such APs in EHT/MLO and instead
downgrades to 11ax mode.

OEMs may want to control this driver behavior via INI based
on the requirement. To allow connecting to such APs in EHT/MLO
a new INI is introduced as a bitmap. The default value of this
INI will not allow connection to any of those APs in EHT/MLO.

Change-Id: I3e657f3f4ba1f5efc9263cb90bcd1773233975ac
CRs-Fixed: 3693813
2024-01-11 13:09:30 -08:00
Vinod Kumar Pirla
c739c3b6cd qcacmn: Only allow partner links with matching RSN caps
Each link in MLO can have different RSN capabilities with
different AKMs, PMF capability, UC/MC cipher suites and so on.
For any choice of links for MLO connection, the AKMs of the
links should have one common AKM.

Eliminate partner links without overlapping AKMs from MLO
connection.
Modify partner link AKM to match assoc link AKM, so that
only overlapping AKM is chosen even though an AKM with
higher security exists for partner link.

Change-Id: I9573e938789a4b95ae824872845d31008861f6f2
CRs-Fixed: 3693814
2024-01-11 13:09:19 -08:00
Vinod Kumar Pirla
01e1c46c4e qcacmn: Generate ML prb rsp from assoc rsp
For non-TxMBSSID ML AP ML probe req may not receive any response
from MBSSID AP and later partner link may fail to connect as
scan entry is not present.
Introduce new flag to suggest whether the partner link scan entry
is present or not in the scan DB. If flag is set to true, generate
scan entry for such links.

Introduce new APIs which will generate ML probe resp using
the per-STA profile of partner link from assoc resp frame.

Introduce API to get the current candidate scan entry from
connect request.

Change-Id: I1c33956b01eb468afa26be5b0bfba634ee3a0aee
CRs-Fixed: 3675830
2024-01-10 09:54:22 -08:00
Vinod Kumar Pirla
da11474ac2 qcacmn: Add MLD addr filter in link VDEV candidate selection
Wireless environment may have APs with same BSSID but different
MLD address and if any APs BSSID is similar to the current
candidates affiliated partner link BSSID, then receiving beacon
or probe resp from such APs will override the affiliated link's
scan entry and the MLD address may be different or NULL if the
AP is non-ML.

If link VDEV connection starts and during candidate selection
it may find the scan entry of this other AP and attempt to drive
connection will lead to creating ML link VDEV's peer with
different MLD address than assoc VDEV's peer.

Enhance scan filter to match MLD address for link VDEV to avoid
such scan entry override.

Change-Id: I11c9b4efdf2d60e92482b296d731d613a200bf0e
CRs-Fixed: 3668326
2024-01-04 02:53:14 -08:00
Vijay Raj
f57a86b4b9 qcacmn: Fix Connecting log to print during connect failure
For the NO Candidate scenario, the connecting event is
not logged resulting in breaking the connectivity logging
mechanism sanity.

Add support to log CONNECTING connectivity log during
NO CANDIDATE found scenario in order to maintain the
logging mechanism sanity.

Change-Id: I534307802d28365ffea330e85b710074ab863c09
CRs-Fixed: 3678114
2023-12-29 07:03:09 -08:00
Asutosh Mohapatra
f4b53caa2a qcacmn: Handle ho failure for STA + STA roaming
Currently for STA + STA case, consider the below scenario:
1. Roam start received on vdev 2 & vdev 0. Vdev 2 roam
   serialization command becomes active and vdev 0 roam
   command is on the pending queue.
2. HO failure with AP0 received on vdev 2. This dequeues
   the vdev2 roam serialization command. Vdev0 roam command
   becomes active.
3. Roam synch indication received on vdev0 with peer AP as
   AP0 (which is the peer on vdev 2). So duplicate detection
   logic prevents same peer creation, so roam synch fails but
   its not indicated properly to firmware. This leads to
   disconnection of both the STAs.

To address the issue, first enqueue disconnect with high
priority set before removing roam command from serialization
so disconnect gets activated if roam was active for the
vdev.
Also while processing roam synch indication, check if peer is
found on different STA and send roam stop to fw so fw also
cleans up and initiates HO failure.

Change-Id: I379c03138b70580f44c2b96489ada030ec6fc20e
CRs-Fixed: 3686660
2023-12-21 02:23:02 -08:00
Vinod Kumar Pirla
4bf1baaed2 qcacmn: Include PID in SM history
Add PID name where SM events and transition
happened to help debug issues where the info
about which task started a certain event to
happen are crucial to rootcause the problem.

Change-Id: I208b46c6d0ec725ab0d9713bf2dd562c40719a24
CRs-Fixed: 3624811
2023-12-15 01:57:33 -08:00
Aasir Rasheed
3327d001de qcacmn: Increase priority for the 6 GHz + 2 GHz combination
Increase priority for the 6 GHz + 2 GHz combination,
even when 5 GHz + 6 GHz MLSR is enabled.

This modification aims to emphasize frequency prioritization for
frequency not on same mac.

Change-Id: I159c673b8f1d772e2f557df9e9811292a65a4bb6
CRs-Fixed: 3672983
2023-12-02 08:16:15 -08:00
Aasir Rasheed
eef8ab17ed qcacmn: Add check to enable/disable MLSR
Enable/disable 5GL+5GH MLSR by retrieving mlo_5gl_5gh_mlsr cfg
attribute.

Change-Id: I9250cdc09e462b74db93ae733f1b334e71696aea
CRs-Fixed: 3662649
2023-11-28 04:08:45 -08:00
Ravindra Konda
cfe516635d qcacmn: Increment bss score for valid bssid hint
Currently, Host driver assigns the maximum score for a valid BSSID hint.
However, when there are multiple candidates with same assoc link,
there is no distinction. To maintain priority, host driver host driver
needs to increment the ETP score in such cases.

Change-Id: Id4b854f77b473870121fc9ec56276a0fc0b0439e
CRs-Fixed: 3663364
2023-11-21 22:50:21 +05:30
Jianmin Zhu
9ccd65d9d7 qcacmn: Add dummy API wlan_vdev_mlme_notify_set_mac_addr_response
Add dummy API wlan_vdev_mlme_notify_set_mac_addr_response if
WLAN_FEATURE_DYNAMIC_MAC_ADDR_UPDATE undefined.

CRs-Fixed: 3658861
Change-Id: I257b59353603d06ca9d36a1ac77eeed9c648d36d
2023-11-14 12:12:08 -08:00
Aasir Rasheed
f3cd9c9839 qcacmn: Refining connection handling for specific vendor
Currently, on host-side connection handling, it persisted
with the same candidate until it achieved SLO. Host driver
selection process factored in scores, with subsequent attempts
exploring all combinations until SLO, bypassing score
considerations.

When vendor roam score algorithm is enabled and association failure
happens while trying MLO connection with multiple link, then
retry with candidate having better etp score.

Logic :- Create all possible valid unique combination of candidate
	 Apply additional boost to 3 link candidate [20%]
	 Apply additional boost to 2 link DBS candidate [10%]
	 Retry with candidate based on etp score

Ex1:
Single AP1 3 link  6 GHz etp > 5 GHz etp > 2 GHz etp
AP1 6 GHz + 2 GHz + 5 GHz [link boost 20%]
AP1 6 GHz + 2 GHz         [DBS boost 10%]
AP1 6 GHz + 5 GHz
AP1 6 GHz
AP1 5 GHz + 2 GHz         [DBS boost 10%]
AP1 5 GHz
AP1 2 GHz

Ex2:
AP1 3link  6 GHz etp > 5 GHz etp > 2 GHz etp
AP2 SLO 2 GHz AP2 2 GHz etp > AP1 5 GHz etp

AP1 6 GHz + 2 GHz + 5 GHz [link boost 20%]
AP1 6 GHz + 2 GHz         [DBS boost 10%]
AP1 6 GHz + 5 GHz
AP1 6 GHz
AP1 5 GHz + 2 GHz         [DBS boost 10%]
AP2 2 GHz
AP1 5 GHz
AP1 2 GHz

Change-Id: I73edf31f9dd82cf82c8516e19df1538404f96435
CRs-Fixed: 3625114
2023-11-13 22:20:57 -08:00
Arun Kumar Khandavalli
ec02ba84e2 qcacmn: retry with same num links incase of assoc failure due to pmkid
Currently for any assoc failure the number of links part of the
association is reduced and retried with less number of partner links.

If the failure is due to PMKID retry to the same with the same number
of partner links instead of downgrading the links.

Change-Id: I65320d92b4b77d2ccfb20a05fbab2aa8377bb6fa
CRs-Fixed: 3653834
2023-11-13 22:20:31 -08:00
Vinod Kumar Pirla
1bfe0bb643 qcacmn: Disconnect VDEVs in IDLE_DUE_TO_LINK_SWITCH
Host driver moves VDEV SM to IDLE_DUE_TO_LINK_SWITCH any link
switch failure to handle events such as DISCONNECT_REQ which
gets dropped if the VDEV is in INIT state.

Disconnect request on any ML VDEV initiates disconnect on partner
VDEVs as well if they are either in connected or connecting state
but not if in IDLE_DUE_TO_LINK_SWITCH state. This leaves the VDEV
in this new IDLE_DUE_TO_LINK_SWITCH state instead of in INIT state.

Include VDEVs which are in IDLE_DUE_TO_LINK_SWITCH during partner
VDEV disconnect so that VDEV SM moves to INIT.

Change-Id: I6e715c0bb94562be866e902009b3bfd7d2c60e8a
CRs-Fixed: 3659110
2023-11-13 01:35:35 -08:00
Surya Prakash Sivaraj
310d434001 qcacmn: Update the connect ies to prevent 40 MHz roam
If "override_ht20_40_24g" ini is set, the host driver disables
the HT40/HE40 caps for 2.4 GHz after connection via SET IE. The
firmware uses this for roam. However, if reassoc comes from userspace
with the HT40 cap different from the initial connect, then host
does not update the IEs based on new cap. This leads to mismatch
between user configuration and firmware roam.

To fix this, modify and send the HE40/HT40 caps via SET IE for
every connect request. Reset it after disconnection to the default
self cap.

Change-Id: I3de73d2ff2e5ebbbda530c29371edc0295ec608f
CRs-Fixed: 3655893
2023-11-07 19:05:22 -08:00
Chunquan Luo
460d8d6c0a qcacmn: Update channel info for MBSSID and MLO AP
Since sta don't send probe req to MBSSID AP, channel info in
link_info not update.
But station receive beacon and update info into scan_entry,
so when connect done, we can update link channel info from
scan_entry by bssid and freq.

Change-Id: Ie7058cf055847b709823a7ade89e074f718f03d6
CRs-Fixed: 3625825
2023-11-03 10:09:25 -07:00
Huashan Qu
ddbe56348d qcacmn: Add initialization value for bss_mld_addr
Add initialization value for bss_mld_addr in function
cm_check_and_prepare_roam_req().

Change-Id: Ic9ac9fd6f94343ff1bab8b45bac81e889a9dfe1f
CRs-Fixed: 3643137
2023-11-03 10:08:49 -07:00
Deeksha Gupta
bc1b9702dd qcacmn: In MLMR case don't set is_valid_link to false
In case of 2 link AP, partner link will be 1 instead of
2. As of now, driver set is_valid_link as false in
case of 2 partner link.

Fix is, set is_valid_link as false if partner link is 1.

CRs-Fixed: 3645066
Change-Id: Ib91baff1915b9b38a8144ad3f9c8cb113c450205
2023-10-26 22:35:44 -07:00
Jianmin Zhu
0bc515f777 qcacmn: Fix HE score 0 issue
HE score is directly dependent on prorated_pcnt value.
With Change-Id: I812f5c322d36ba44f63d4e27b5ec65a2846b3265,
In "cm_calculate_bss_score", prorated_pcnt is initialized as zero but value
is never updated. This leads to HE score as zero always.

To fix this, retrieve the prorated_pcnt value from "cm_calculate_ml_scores"
before calculating HE score.

Change-Id: I64ff207d8935c5b2440d6fba07adc534c30891c0
CRs-Fixed: 3634652
2023-10-23 15:55:02 -07:00
Pragaspathi Thilagaraj
310b6b1bfc qcacmn: Sort partner links for candidate given as BSSID hint also
For candidate entry which is given as bssid hint, the maximum
score CM_BEST_CANDIDATE_MAX_BSS_SCORE(20000) is given and no
other operations are performed. But for MLO connection
scenario, the best links should be chosen for association and
other links will go to standby.
This is not happening for candidate entry which is given as
bssid hint. So links with inferior score could be chosen as
partner links.

Sort the partner links based on score for candidate which is
given as BSSID hint also to choose partner links with better
score.

Change-Id: Iac50778b7e66c65727c788ace0885f5e88cb4159
CRs-Fixed: 3636673
2023-10-18 22:47:13 -07:00
Abhinav Kumar
4653c0ac9e qcacmn: Send proper freq during a connection failure
Currently host fills channel frequency in connect response
buffer either by frequency of selected candidate or
frequency present in connect request. Mostly upper layer
sends a connect request with frequency = 0. So in case if
connect request fails due to “no valid candidate found”
for connection and with reason "Unspec failure", host
sends frequency = 0 (present in connect req) to upper
layer via an event EVENT_CONNECTIVITY_LOG.

Fix is if frequency present in connect request use
frequency else use frequency hint present in connect
request to fill connect response buffer.

Change-Id: Ic6eaf6cd26587bd2051c4449038009f08b9e2fad
CRs-Fixed: 3638648
2023-10-18 00:52:52 -07:00
Liangwei Dong
a725261a81 qcacmn: Fix standby link removal fail
Add callback mlme_vdev_reconfig_notify_standby to cld code to
handle standby link removal.
For standby link, it is going to be removed by AP, so don't
start link removal timer for it. Force inactive it to avoid
link switch to it.

Change-Id: Iae8eebeb2263b0057026c0e80223ef5c6b68a41f
CRs-Fixed: 3640204
2023-10-17 15:53:25 -07:00
Rahul Gusain
de24a36639 qcacmn: Possible NULL vdev access in get_cm_ctx_fl
Currently in cm_get_cm_ctx_fl, if caller passes NULL vdev as an
argument, then it leads to crash in driver.

To avoid NULL access, add vdev null check.

Change-Id: I37e1d095829b84ee75cc89d8dcf5fbe312c25035
CRs-Fixed: 3632944
2023-10-17 15:53:15 -07:00
Santosh Anbu
0d9d0c4613 qcacmn: Initialize struct before using
Add change to initialize all members of the struct, as one of the member
is not updated in the callee function.
Coverity issue fix.

Change-Id: Ic0c2d70fa540fd81ae9094e49c2240ebd9b691b5
CRs-Fixed: 3632788
2023-10-14 00:01:08 -07:00
Ashish Kumar Dhanotiya
9a73106903 qcacmn: Add bearer switch request in connect path
If LL_LT_SAP is already present and if STA tries to
come up on same mac, then it may result in data loss
on LL_LT_SAP as STA will need ROC on the connection
channel for some time, to avoid these data loss during
STA connection, add logic to switch the bearer for LL_LT_SAP
data to non-wlan and once connection completes, switch back
the bearer to wlan.

Change-Id: Ic44cd77b9b5e569350d697c33260cf5cec3652e0
CRs-Fixed: 3627643
2023-10-11 14:42:44 -07:00
David Oladunjoye
d9fedf26a8 qcacmn: 2-link MLO Sap Simulation
Current SAP is unable to support multi-link MLO connection.
To unblock validation we simulate 2-link connection on SAP.

Changes are as follows:
	- Add support for multi-link during assoc
	- disable security check during assoc

Change-Id: I21b3de2298085d7e6676854a7be68608546ccc6c
CRs-Fixed: 3591638
2023-10-07 00:01:22 -07:00
Deeksha Gupta
78868f0a7e qcacmn: Add new API to clear the MLO MGR context
Add new API to clear the particular AP link info
from the MLO MGR context.

CRs-Fixed: 3616166
Change-Id: Ia3b69a58dd3d3687199ee58462d59ba76c24cd6d
2023-10-04 11:17:10 -07:00
Deeksha Gupta
379833c37a qcacmn: Enchance candidate scoring log prints
Enchance and Optimized candidate scoring log prints.

CRs-Fixed: 3625814
Change-Id: I9b6e148c5dc1b97ae179edee60d1b2d7ea792e84
2023-10-03 02:34:54 -07:00
Deeksha Gupta
5ebeb8ac41 qcacmn: In MLMR case don't set is_valid_link to false
When the vendor roam score algorithm is enabled in a
3 link connection scenario, driver currently sets
'is_valid_link" to 'false' in case of MLMR. Consequently,
this causes if AP advertise itself as 3 links,
but driver can only establish 2 link connection.

To fix this issue, When the vendor roam score algorithm
is enabled in MLMR case, instead of setting 'is_valid_link'
to 'false' for a particular partner link, the driver
should assign a 'total_score' of 0 to that link.
This helps us to make that link as a standby and inactive
link.

CRs-Fixed: 3623270
Change-Id: I80d6b052134c2c8c428745af4aa3a740499ee6e1
2023-10-01 12:36:25 -07:00