Commit Graph

304 Commits

Author SHA1 Message Date
Deeksha Gupta
785ab5431d qcacld-3.0: Fix status overwrite by disconnect req
Fix status overwrite by disconnect req if
WLAN_CM_SM_EV_ROAM_INVOKE_FAIL fail

Change-Id: I014965faf89c3bf8efc8b2036fc0f0466239fc19
CRs-Fixed: 2969763
2021-06-16 16:50:51 -07:00
Srinivas Dasari
ff58fd853b qcacld-3.0: Wait for key install in SAE/OWE as well
EAPOL handshake is done by wpa_supplicant in initial connection
and WPA3 roaming as well. Driver is supposed to wait for EAPOL
handshake/key complete timeout after getting roam sync indication
from firmware. But this wait is skipped with the change
change-id : Ie4f06cfcb066ae245de024b62da586aade783aec.
Add the same check again.

Change-Id: I437c6be15d7c1a3775a177c2da6c581d417c2533
CRs-Fixed: 2963548
2021-06-14 03:10:44 -07:00
Utkarsh Bhatnagar
d6a03bf7e0 qcacld-3.0: Refactor LFR3 code to use cm api
Refactor csr_roam_pmkid_req_callback to use
mlme_cm_osif_pmksa_candidate_notify and move other
unused API under CM flag.

Change-Id: I835d54804f733eddff48de38e4c545a87f34bb30
CRs-Fixed: 2965602
2021-06-10 10:21:35 -07:00
Jianmin Zhu
8ef9b522a7 qcacld-3.0: Failed to roam to all band after dual sta enabled
For dual sta case, if vdev0 disconnected before vdev2 disconnected, vdev0
PCL cmd retained vdev level, after vdev0 reconnected first, just allowed
intra band in PCL, only can roam in intra band.
Fix: When vdev disconnect, reset it's PCL cmd to pdev level.

Change-Id: I3ed3ec398cfe1a17d07ce716c27026b9660305bd
CRs-Fixed: 2960194
2021-06-09 03:14:54 -07:00
Utkarsh Bhatnagar
3e95b94add qcacld-3.0: Fix bssid printing in preauth logic
Fix bssid printing in preauth logic by adding space before printing
the bssid.

Change-Id: I32becd76be24f9c7f21dc72034f5a1ca26c90bbd
CRs-Fixed: 2964158
2021-06-08 18:17:14 -07:00
Amruta Kulkarni
b294c04540 qcacld-3.0: Fix possible OOB access
Add check to fix possible out of bound array access

Change-Id: I621441bbdc41ce58f444b221eba086ab2f0b2e5a
CRs-Fixed: 2960525
2021-06-08 13:18:12 -07:00
Pragaspathi Thilagaraj
22019b0a18 qcacld-3.0: Add support to retain WTC params across disconnection
The WTC parameters are stored in MLME vdev private object.
So the parameters are cleared once vdev delete is done.

Move the WTC parameters to psoc->mlme_cfg to retain the
values across disconnections.

Change-Id: Icecfbef19af994f8a05622501d435bfb63beca50
CRs-Fixed: 2959715
2021-06-08 01:08:17 -07:00
Srikanth Marepalli
e4323e039d qcacld-3.0: Enhance the EAPOL handshake offload INI per AKM
Existing INI disable_4way_hs_offload is defined as a boolean
that controls the EAPOL Handshake to be offloaded to Firmware or
Not. There is no way to specify the EAPOL offload per AKM.

Hence extended the support of EAPOL handshake offload to firmware
per AKM by converting this INI to a bitmap integer.
With ini value as 0 by default Firmware takes care of 4-way HS
during roam for all AKMs except for SAE and OWE. If
this ini value is 1 then Host takes care of EAPOL for all AKMs.

Having the backward compatibility, added a new value to ini.
If this ini value is set to 2 and also if the SAE EAPOL offload
service bit is set by Firmware then the behavior is same as ini
with 0 except that Firmware takes care of 4-way HS for SAE roam
as well. And for OWE it is still handled by supplicant.

To achieve this, new roam offload flag is introduced to indicate
Firmware about SAE roam EAPOL offload, So that in Roam sync
indication Firmware will inform the status as connected but not
authenticated so that supplicant can take care of 4-way EAPOL HS.

Change-Id: I8b65a1768fad91fac7e427712d3ccf4586176f5f
CRs-Fixed: 2955029
2021-06-07 22:54:32 -07:00
Huashan Qu
4827a8421e qcacld-3.0: Fix some LFR2.0 issues for connection manager path
Fix some LFR2.0 issues for connection manager path as below:
1: Add ptr null pointer and len check before access
rsp->connect_ies.bcn_probe_rsp.
2: Remove aged AP threshold check so that roam process can find
candidate AP with more probability.
3: Set cm_ctx->vdev to cmd_info.vdev in
cm_remove_preauth_cmd_from_serialization().
4: Add more debug logs for preauth part.

Change-Id: I4b0766bba40e3ebc3d01bdd4ae59aec1ec3a21d9
CRs-Fixed: 2961151
2021-06-03 22:16:28 -07:00
Utkarsh Bhatnagar
26403151ff qcacld-3.0: Remove duplicate code in connection manager
Remove duplicate code in connection manager and call
same API from connect complete and roam complete.

Change-Id: If7e9e1069acb1dede9433d16ef96f37029ff716d
CRs-Fixed: 2960921
2021-06-03 14:52:56 -07:00
Utkarsh Bhatnagar
1169039038 qcacld-3.0: Send TDLS STA notify only when connect is success
Send TDLS STA notify only when connect is success.

This is required as incase connection, it will increment
tdls_soc_obj->set_state_info.set_state_cnt.
It that connection results in failure, then also, without
this check this count will increment.
For subsquent connections, in tdls_send_update_to_fw()
because of incremented count, it will be treated as
FW Set State is already sent and will not send it
which will result in FW crash while adding TDLS peer.

Change-Id: Ic3bedfb1357ac703f98d2d0285dcc85605bab97e
CRs-Fixed: 2955401
2021-06-02 13:48:12 -07:00
Utkarsh Bhatnagar
790223c7dd qcacld-3.0: Add pending changes for reassoc req
Add pending changes for reassoc req.

Change-Id: I805da0730be9f602fb04135f69c6f339ea8e2ac6
CRs-Fixed: 2958582
2021-06-02 04:51:56 -07:00
Pragaspathi Thilagaraj
73b225f611 qcacld-3.0: Add support for candidate AP RSSI in different bands
Currently in WTC mode the candidate AP RSSI threshold
configuration is applied for candidates on all band.

Add support to configure the candidate AP RSSI threshold for
different bands.

Change-Id: I94442c0f1bd3ea20dc2f5ebe893a9ead7fb8d890
CRs-Fixed: 2951610
2021-05-30 23:51:55 -07:00
Huashan Qu
6a958dfc46 qcacld-3.0: Cleanup roc and notify tdls when user disconnects sta
Only do cleanup roc request and notify tdls sta disconnect
when sta disconnection operation is from osif or north bound.

Change-Id: I1d0aa4f1cd8a23baca890228485f22124eeabf78
CRs-Fixed: 2954772
2021-05-28 01:46:57 -07:00
Huashan Qu
1557129851 qcacld-3.0: Add host roam preauth handling code for connection manager
Add host roam preauth handling code for connection manager.

Change-Id: Id97d716a6c47ba08b2e8ef5e3ed675c5dcf88ed8
CRs-Fixed: 2954515
2021-05-28 01:46:52 -07:00
Pragaspathi Thilagaraj
3073bb1391 qcacld-3.0: Don't send roam init for P2P vdev
Roam offload init command should be sent to firmware only
for STA mode. For P2P vdev, if roam init command is sent,
it causes abnormal target behavior.

Don't send roam init command if the vdev opmode is not
Station.

Change-Id: I0bfc3c6b4bc2eef7459b092101bc4d72c68761e5
CRs-Fixed: 2924563
2021-05-27 13:41:21 -07:00
Utkarsh Bhatnagar
045ed44dee qcacld-3.0: Move unused Lfr3 specific item under FEATURE_CM_ENABLE
Move unused Lfr3 specific item under ifndef FEATURE_CM_ENABLE.

Change-Id: I94d5f9d48f5cb853dc3ac9039f6140f23ab620cd
CRs-Fixed: 2953719
2021-05-27 03:46:29 -07:00
Utkarsh Bhatnagar
919f560858 qcacld-3.0: Fix HO fail handling when received without roam start
If HO fail/ roam abort is received without any roam start indication
the roam command will not be present in connection manager, so
continue with cleanup even when roam command is not present in these
cases.

Change-Id: I0ff3307b4d4ba96cc3b0c413fd0a41be47e9c588
CRs-Fixed: 2948064
2021-05-18 12:41:55 -07:00
Utkarsh Bhatnagar
76866c0712 qcacld-3.0: Use cm_is_open_mode() API to check for open security
Use cm_is_open_mode() API to check for open security.

Change-Id: I4d960ee781ee63e73f19f0d5e223fd49c01ba728
CRs-Fixed: 2947818
2021-05-18 08:29:05 -07:00
Lincoln Tran
2a0851b0ab qcacld-3.0: Use MLME channel list in connection manager
When updating the scan filter with valid channels, refer to the MLME
channel list instead of the policy manager list. The policy manager list
is used mainly for SAP related APIs.

Change-Id: I5530e5bcfd6b5c04063d7530fbc996ffca91df3f
CRs-fixed: 2946365
2021-05-15 10:50:37 -07:00
Abhishek Singh
39455350a3 qcacld-3.0: Add self reassoc and Hw mode change logic for LFR2
Add self reassoc and Hw mode change logic for LFR2.

Change-Id: I2c48f0d36d541df58b6d6c2448bfe526b60df142
CRs-Fixed: 2941794
2021-05-10 14:47:48 -07:00
Amruta Kulkarni
7c43640fdc qcacld-3.0: Allocate separate memory for set pmksa
In roam sync handling, pmksa memory is freed right after
set pmka entry is updated in crypto priv params instead
allocate separate buffer for crypto.

Change-Id: I337efcb29d2233b016f93cae7f4f23d3203786a6
CRs-Fixed: 2931162
2021-05-06 16:56:35 -07:00
Utkarsh Bhatnagar
cd22a0f327 qcacld-3.0: Add Reassoc req handling code for connection manager
Add Reassoc req handling code for connection manager.

Change-Id: I2735642df3132738993e801acdb6c9dcba1ac80f
CRs-Fixed: 2939872
2021-05-06 13:49:44 -07:00
lihual
5a8e94dad0 qcacld-3.0: Restart roam for LFR2 when there is no candidate
When the AP channel is changed, fw reports a suitable AP.
But it's skipped by host as it has same bssid as the one
currently associated. The same process repeats continually,
which result in fail to reconnect with the AP. To avoid this,
send BMISS indication to upper layer and restart roam.

Change-Id: Idfcb69f81ce72a4ab7ef0c105f3af40cb92c53d5
CRs-Fixed: 2913663
2021-05-06 03:31:00 -07:00
abhinav kumar
17a2fc170b qcacld-3.0: Update pmk cache entry for roamed AP
Consider two APs: AP1, AP2

Both APs configured with EAP 802.1x security mode
and OKC is enabled in both APs by default. Initially
DUT successfully associated with AP1, and generated
PMK1 by performing full EAP and added an entry for AP1
in pmk table. At this stage, pmk table has only one
entry for PMK1 (1. AP1-->PMK1).

Now DUT roams to AP2 using PMK1 (as OKC is enabled)
but session timeout happens on AP2 just before 4 way
handshake completion in FW. At this point of time DUT not
in authenticated state. Due to this DUT performs full EAP
with AP2 and generates PMK2. As there is no previous
entry of AP2 (AP2-->PMK1) in pmk table. When host gets
pmk delete command for BSSID of AP2, the BSSID match
fails. Hence host will not delete pmk entry of AP1 as well.

At this point of time, the PMK table has two entry
1. AP1-->PMK1 and 2. AP2 --> PMK2.

Ideally, if OKC is enabled then whenever timeout occurs in
a mobility domain, then the driver should clear all APs
cache entries related to that domain but as the BSSID
doesn't exist yet in the driver cache there is no way of
clearing the cache entries, without disturbing the legacy
roaming. Now security profile for both APs changed to FT-RSN.
DUT first disassociate with AP2 and successfully associated
with AP2 and perform full EAP and generates PMK3. DUT first
deletes PMK entry for AP2 and then adds a new entry for AP2.

At this point of time pmk table has two entry AP2--> PMK3
and AP1-->PMK1. Now DUT roamed to AP1 using
PMK3 but sends stale entry of AP1 (PMK1) to fw via RSO
command. This override PMK for both APs with PMK1
(as FW uses mlme session PMK for both APs in case of FT
roaming) and next time when FW try to roam to AP2 using
PMK1, AP2 rejects PMK1 (As AP2 is expecting PMK3) and
initiates full EAP with AP2, which is wrong.

Fix is to update pmk table entry for roamed AP1 with PMK3 value
comes to host via roam sync indication event.. By this host
override stale entry (if any) with the latest valid pmk for
that AP at a point of time.

Also add new api to get the sae single pmk ini value and
update the bss desc of single_pmk cap after intersecting the ini
value.

Change-Id: I12fecbae69d0d2a11f2a39eee6be960752d831bd
CRs-Fixed: 2889847
2021-05-03 15:03:10 -07:00
abhinav kumar
9ca87d9490 qcacld-3.0: Address corner scenarios for dual sta roaming
Address below corner scenarios for dual sta roaming:

1. Initialize primary interface vdev id
with WLAN_UMAC_VDEV_ID_MAX.

2. Enable roaming while processing set primary interface
vendor command irrespective of dual sta roam policy.

3. Disable mcc_adaptive_scheduler before sending
WMI_RESMGR_ADAPTIVE_OCS_ENABLE_DISABLE_CMDID to FW and
enable it if host receives dual sta policy as unbiased.

Change-Id: I8e5254c6f9053bd5fe7f925af4b577e76c9b9a2e
CRs-Fixed: 2928870
2021-04-26 10:01:30 -07:00
abhinav kumar
18dc7adec9 qcacld-3.0: Dont allow roaming on non primary STA iface
Presently the roaming design is to support roaming on
both the STA in DBS mode (with different bands).

With commit I60f6bdb7df4d9eece4fd14abe1fab2d5644d47f1,
Driver allow STA2 connection to any available AP(s).

So in case if STA2 connectes in MCC mode then host
should not allow roaming on non primary STA iface.

Change-Id: I84c77644c6023322ac77e307b06be70ec0f58ed5
CRs-Fixed: 2928804
2021-04-26 10:01:24 -07:00
abhinav kumar
09474f3886 qcacld-3.0: Don’t consider pcl weightage for STA conn
If there is more than one STA iface concurrently active
and one of them is marked as a primary iface. The host
received CONCURRENT_DUAL_STA_POLICY vendor command with
policy PREFER_PRIMARY. Then Don’t consider PCL weightage
for an STA connection. Due to this host/fw allows a new
connection either in DBS, SCC or in MCC.

Change-Id: I400165f8dd3ab7b94b2cb808f8b34b34d6d42fee
CRs-Fixed: 2929015
2021-04-26 10:01:08 -07:00
Utkarsh Bhatnagar
955173c481 qcacld-3.0: Fix few roaming issue for wake lock and scan
Reset scan reject params on roam abort and also if connect
lead to roam invoke release the wake lock as we do in legacy
case, if required roam invoke can use new wake lock.

Change-Id: Ieb870e2598687a1418e896d761f19a198a03a98f
CRs-Fixed: 2929311
2021-04-23 04:35:53 -07:00
Bapiraju Alla
feddfb47cb qcacld-3.0: Add missing implementation for 11be association
Currently below implementation is missing in the driver. So driver
is failing to associate in 11be. Add this implementation to support
11be association in the driver
  - Filling EHT IEs in probe response
  - Sending EHT mcs capabilities while creating the peer
  - Fix compilation issues when 11BE feature is enabled
  - Add the the 320MHZ to wma_chan_phy_mode

Change-Id: Ib535db413d5578840feed7fd18bb00e5e28cfb6f
CRs-Fixed: 2926471
2021-04-23 04:35:43 -07:00
abhinav kumar
0cf80481e1 qcacld-3.0: Allow STA2 connection to any available AP(s)
Currently, the driver restricts the connection of the 2nd
STA to channels on the other band of the 1st STA connected
band. As per the new requirement, the host should allow STA2
connection to any available AP(s), if primary iface is
configured.

Change-Id: I60f6bdb7df4d9eece4fd14abe1fab2d5644d47f1
CRs-Fixed: 2915733
2021-04-22 21:59:13 -07:00
Utkarsh Bhatnagar
d6fc151325 qcacld-3.0: clear pmkid cache when ap off
Add logic similar to I5d8ec9e9d4f8a44178b113d370799fe2bc0373fb
in connection manager to flush PMID on HB failure.

Change-Id: Id87b5774a18a377719c56d3f34dc31284f0a39a3
CRs-Fixed: 2928282
2021-04-21 11:03:35 -07:00
Amruta Kulkarni
d32aa6c182 qcacld-3.0: Add ssid info during roam sync
During roam sync add ssid infoemation in connect response structure.

Change-Id: I00c03305ddbfcf03397ad5e27fa3d5e52acdbb90
CRs-Fixed: 2919735
2021-04-13 11:52:15 -07:00
Abhishek Singh
e948157697 qcacld-3.0: Fix the PMK sent for 11r
As part of I418be56d452389a9f7b8d48e28f793567e81767a due to copy
paste error in cm_roam_scan_offload_fill_lfr3_config the pmk was
copied to rso_11i_info instead of rso_11r_info.

Fix this by copying pmk to rso_11r_info.

Change-Id: If4d1ea23ab4b4c43db3fac78fbfd43ad74a7e1b4
CRs-Fixed: 2920206
2021-04-09 20:50:27 -07:00
Pragaspathi Thilagaraj
1d6fac590c qcacld-3.0: Clear TWT context on receiving roam synch indication
The userspace doesn't expect TWT teardown or notify events after
roaming. So to clear the driver internal TWT context, for old
peer, call the mlme_init_twt_context() on roam synch complete.

Change-Id: If1e4fe2d79561885052caf8d5231d1c943f10c96
CRs-Fixed: 2912872
2021-04-07 19:28:59 -07:00
Will Huang
4d62bb1bc2 qcacld-3.0: Fix roaming/disconnect not sync issue
Change I588a56f4c96d137d3283b2dc57274de069ecb4ab changed
wlan_cm_abort_rso() return status from BUSY to FAILURE when roaming
in progress, it caused disconnect command not wait for roaming
complete/abort, and lead to abnormal data access.

Change-Id: I16004b006283c05ed94fb3ca4bc0e9376485aca7
CRs-Fixed: 2910443
2021-04-07 01:21:54 -07:00
Utkarsh Bhatnagar
f469d5b928 qcacld-3.0: Add connection record info in connection manager code
Add connection record info in connection manager code.

Change-Id: Idf61755eeaad5990223895b66487a08fc69bdfc3
CRs-Fixed: 2913983
2021-04-01 11:00:56 -07:00
Amruta Kulkarni
07ff785c3e qcacld-3.0: Fix param passed to sme_qos_csr_event and cm_remove_cmd
Fix to pass assoc_info instead of address of assoc_info
to sme_qos_csr_event_ind() and cm_remove_cmd()

Change-Id: I9f6c12870954c42f2b1e6250e7547c45a593cae8
CRs-Fixed: 2911027
2021-03-30 22:54:57 -07:00
Amruta Kulkarni
6c678097a0 qcacld-3.0: Support roam ho fail and roam invoke fail ind in CM
Add change to support roam ho fail and roam invoke fail
indication in connection manager.

Change-Id: I8e4fed2ca4b9c6e95da86b0c37e39da8f2bc4953
CRs-Fixed: 2906319
2021-03-25 22:23:16 -07:00
gaurank kathpalia
b8c690744f qcacld-3.0: Change the cm ext init function to pass ext ptr
Change the cm ext init function to pass ext ptr.

Change-Id: I6c40bb54b96b94bec66d161ae924cd723720357d
CRs-Fixed: 2907938
2021-03-25 09:43:54 -07:00
Amruta Kulkarni
15ac4a4e5a qcacld-3.0: Support roam sync indication in CM
Add change to support roam synch indication
in connection manager.

Change-Id: I06b23ae085a5a86caf4fe04fe5929b86d8d5c543
CRs-Fixed: 2901858
2021-03-24 09:47:46 -07:00
Srinivas Dasari
84f2788e50 qcacld-3.0: Wait for RSO stop response only if roaming is enabled
When host driver receives RSO_STOP from userspace, HDD sends the
RSO_STOP down to lower layers and starts a wait for response upon
success status.
Below layers(connection mgr/CSR) ignore the RSO_STOP request and
return success if the current state is not RSO_ENABLED or
IN_PROGRESS. This keeps the HDD waiting for response and a timeout
happens after 2 seconds.
So, wait for RSO stop response only if roaming is in enabled state
to avoid this wait and timeout.

Change-Id: I3ed81c5da26ebe05d17fc37dc43665f1f7b7c8b2
CRs-Fixed: 2901494
2021-03-24 04:33:20 -07:00
Jianmin Zhu
a9e52b12a3 qcacld-3.0: Remove btm cap in SAE assoc req if SAE roaming disabled
Some legacy Helium firmware doesn't support SAE roaming, but btm cap is set
in associate request of DUT, then connected SAE AP thinks DUT supports btm,
AP will send btm request to DUT, DUT triggers roaming, but fails and
disconnects from current AP, users will complain this unexpected
disconnect.

Change-Id: Ife9860addef6898a518618f555158e7888ac74db
CRs-Fixed: 2884694
2021-03-17 20:31:43 -07:00
Bapiraju Alla
e899c9c52d qcacld-3.0: Increase max number of allowed whitelist SSIDs count
Increase MAX allowed number of whitelist SSIDs count to 8

Change-Id: Ic74abeb82876966ce4aedee9f7a4681f17217d63
CRs-Fixed: 2900486
2021-03-17 13:11:12 -07:00
Amruta Kulkarni
604d76d660 qcacld-3.0: Send roam score delta and min rssi params
When "wmi_service_configure_roam_trigger_param_support" service
bit is set populate roam score delta and min rssi parameters
and send via WMI_ROAM_ENABLE_DISABLE_TRIGGER_REASON_CMDID.

Change-Id: I3c7fc56a95c28c43992763be3351d91d9fd44041
CRs-Fixed: 2890148
2021-03-11 16:11:23 -08:00
Utkarsh Bhatnagar
9f9dc3d5ee qcacld-3.0: Cleanup the tCsrRoamConnectedProfile params
Cleanup the tCsrRoamConnectedProfile params

Change-Id: I6c6f9a8888eebc320191c88020a8ec19cd32c998
CRs-Fixed: 2896190
2021-03-10 19:12:16 -08:00
Utkarsh Bhatnagar
9131f1bc48 qcacld-3.0: Move prev ap info under connection manager macro
Move prev ap info and connected bss in connection manager
macro in csr session.

Change-Id: Ie2b8ecdbcf7134f93f908ba596c0398712da7ac8
CRs-Fixed: 2895259
2021-03-09 18:54:33 -08:00
Amruta Kulkarni
33a5b0a35d qcacld-3.0: Support roam start and roam abort request in CM
Add change to support roam start and roam abort request
in connection manager.

Change-Id: Ibc1f2887902e2020c93b2827f8ffa247001cfa5f
CRs-Fixed: 2882221
2021-03-05 10:09:51 -08:00
Utkarsh Bhatnagar
6664a74b45 qcacld-3.0: Fill op and ext rates in LIM
Fill operational and extended rates in LIM
instead of CSR as part of connection manager.

Change-Id: I9197e835703059d61bc67897a9670ff166460318
CRs-Fixed: 2892415
2021-03-05 07:32:00 -08:00
gaurank kathpalia
fac5527d3f qcacld-3.0: Remove join_resp from roam sync structure
Remove join_resp from roam sync structure.

Change-Id: Ifabd9383954394f00afce635c90dc54cc6cb5aa3
CRs-Fixed: 2891728
2021-03-04 11:04:58 -08:00