Commit Graph

304 Commits

Author SHA1 Message Date
Qun Zhang
eed1953b12 qcacld-3.0: Update LFR2 self reassoc failure processing
Update LFR2 self reassoc failure processing:
1. remove lim_send_switch_chnl_params() from
lim_restore_pre_reassoc_state() when self reassoc failure
to avoid this race condition: one one hand host let FW do
restart, and on the other hand VDEV sm transition to stop
state. Otherwise VDEV sm cannot handle EV_START_RESP event
correcly.
2. register .mlme_vdev_sta_disconn_start callback with
cleanupTrigger eLIM_HOST_DISASSOC.
3. when self reassoc fail, notify reassoc failure reason
to CM SM so that CM SM can trigger CM_DISCONNECT_REQ, then
invoke .mlme_vdev_sta_disconn_start doing cleanup action.

Change-Id: Icb68202e9f72fcbe3e0e4d3e9006a65a73123692
CRs-Fixed: 3109987
2022-02-23 08:36:31 -08:00
Pragaspathi Thilagaraj
2a2b1d00c1 qcacld-3.0: Fix logging level for prints during roaming
Change the logging level of prints that occur during roaming
happens.

Change-Id: I54706d93a30441e48a0e3cb03d7373d2e5b50fee
CRs-Fixed: 3133890
2022-02-20 02:49:00 -08:00
Srinivas Dasari
db3c1a98e5 qcacld-3.0: Wait for RSO stop response from firmware
Firmware doesn't expect any vdev commands from host while RSO stop
is happening. It sends a response to the RSO_STOP command once
it's done with cleanup. Host needs to run a timer after sending
RSO stop command to firmware and wait for a maximum of 6 seconds
for the response. Host can stop the timer and allow the commands
to firmware in the below cases,
1. RSO_STOP response with success status
2. RSO_STOP response with HO_FAIL status followed by
   HO_FAIL event: Host needs to wait till HO_FAIL event is received

If firmware doesn't send any response in the 6 seconds wait, issue
a recovery to help to check the firmware state.

Also, set WMI_ROAM_SCAN_MODE_FLAG_REPORT_STATUS always when MLO is
supported while sending RSO_STOP to firmware. It's sent only
in case of wpa_supplicant disabled roaming currently.

Change-Id: I8182e60beb9288dba23cc72e978dc781c8ab1707
CRs-Fixed: 3106023
2022-02-18 23:21:06 -08:00
Amruta Kulkarni
921ba7c9f4 qcacld-3.0: Handling for RSO STOP with MLO
During mlo disconnect link vdev disconnect is processed
before assoc vdev.FW expects RSO stop before vdev stop/down
on any vdev.Changes made to handle sending RSO stop on assoc
vdev during disconnect.

Change-Id: I727cedffa4a11f991fd38aa8253c2176271f7b89
CRs-Fixed: 3126419
2022-02-11 02:57:15 -08:00
Srinivas Girigowda
7ea8a92863 qcacld-3.0: Add support for TWT Get_traffic_stats
Add support for TWT Get_traffic_stats command in TWT component.

Change-Id: I927ce90e1dd6b5cc047d99fcd7b54a16a34ca4ed
CRs-Fixed: 3085887
2022-02-11 00:23:23 -08:00
Srinivas Girigowda
22c05ef081 qcacld-3.0: Add support for TWT get_status
In TWT component, add support for TWT get_status command
i.e when host wants to query current status of TWT sessions.

Change-Id: Ib43009e5f6a90c589db25f78e1ca43563f2950fe
CRs-Fixed: 3085483
2022-02-11 00:23:14 -08:00
Srinivas Girigowda
8d529074a0 qcacld-3.0: Add TWT nudge support to componentization
In TWT component, add support for TWT nudge command
i.e when host wants to suspend the TWT session.

Change-Id: I176fdaf0f2ccc2d0656f9108484fc80b409268ef
CRs-Fixed: 3085999
2022-02-11 00:23:05 -08:00
Srinivas Girigowda
82b323d139 qcacld-3.0: Add TWT resume support to componentization
Add TWT resume support to componentization.

Change-Id: I3e6d81591e9a7739050445e4a67d81626febf68f
CRs-Fixed: 3085995
2022-02-11 00:22:55 -08:00
Srinivas Girigowda
0142156257 qcacld-3.0: Add TWT pause support to componentization
In TWT component, add support for TWT pause command
i.e when host wants to suspend the TWT session.

Change-Id: I8a60bb40fe9d37121d700f246b91e3211af66189
CRs-Fixed: 3085990
2022-02-11 00:22:45 -08:00
Srinivas Girigowda
d7e3efed33 qcacld-3.0: Add support for get twt capabilities
Add support for get twt capabilities.

Change-Id: I5ac2ac597b92fd683afe97604b4e7dcda518ec39
CRs-Fixed: 3085572
2022-02-11 00:22:35 -08:00
Srinivas Girigowda
297fb98ed9 qcacld-3.0: Add SAP twt teardown support to componentization
Add SAP twt teardown support to componentization.
i.e to terminate the TWT session.

Change-Id: Idc12c564f3fb078aee4ff11831008d06876047e6
CRs-Fixed: 3085562
2022-02-11 00:22:27 -08:00
Srinivas Girigowda
b4132f35eb qcacld-3.0: Add support for TWT concurrency
Add support for TWT concurrency.

Change-Id: I859c5764a6828e60554978104fd747ec5ac2a058
CRs-Fixed: 3085555
2022-02-11 00:22:12 -08:00
Srinivas Girigowda
96132d1c52 qcacld-3.0: Add TWT notify support to componentization
Add TWT notify support to componentization.

Change-Id: I44afb4a0d045916e9ca0f29924330de3a5d95859
CRs-Fixed: 3085549
2022-02-11 00:22:05 -08:00
Srinivas Girigowda
fa14a0ad6b qcacld-3.0: Add TWT sta teardown support to componentization
Add TWT sta teardown support to componentization.

Change-Id: I5a0f05105aad1aa92257af47f50913ae1e61730a
CRs-Fixed: 3085543
2022-02-11 00:21:58 -08:00
Srinivas Girigowda
5fd6f2b7d8 qcacld-3.0: Add TWT setup support to componentization
Add TWT setup support to TWT componentization
i.e to setup TWT session.

Change-Id: Ic79be278b264634d1d54759950167547d0daf1ef
CRs-Fixed: 3085483
2022-02-11 00:21:51 -08:00
Srinivas Girigowda
0737e8caec qcacld-3.0: TWT cfg params initialization
Initialize TWT psoc cfg params with the cfg.ini values.

Change-Id: I326239d4f3f146113871fb3700fa82260988d697
CRs-Fixed: 3085507
2022-02-11 00:21:22 -08:00
Srinivas Girigowda
38fe8b7acb qcacld-3.0: umac: Add TWT componentization public structs and files
Add TWT componentization public structs, files and skeleton code
i.e add new dispatcher APIs, target_if callbacks.

Change-Id: I21fd6f5c3e92f8ea725771c20cd6dfdb560b2bf3
CRs-Fixed: 3085430
2022-02-11 00:20:54 -08:00
Krupali Dhanvijay
aaf60192cf qcacld-3.0: Add support to configure 6G roam scan dwell time
Add ini support to configure 6GHz active and passive
scan dwell time and send this to firmware
to be used for LFR scans via WMI_ROAM_SCAN_MODE.

Based on these values, firmware will use host sent values
else use hardcoded values.

Currently firmware uses hardcoded values to configure 6Ghz
roam scan dwell time. With this change user can configure
it using INI.

Change-Id: I90e79ad59eef7f73faa0b9dfd2d38b65aca12285
CRs-Fixed: 3116861
2022-02-10 07:08:46 -08:00
Srinivas Dasari
d045b6f8d5 qcacld-3.0: Update roam complete to modules only for MLO sta vdev
MLO roam sync happens first for link vdevs and then for sta vdev.
Update roam_sync-complete data to other modules(if_mgr, osif,
TDLS, P2P, firmware,..) only for sta vdev. Skip the same for all
link vdevs.

Change-Id: Ib01c7cd8d9c0bd0e7b4b48914576410aea6baa5c
CRs-Fixed: 3104553
2022-01-31 17:38:47 -08:00
Srinivas Dasari
6d7dd83436 qcacld-3.0: Abort roaming on link as well for MLO
Currently, roaming is not aborted in failure cases on
the link vdev and it's aborted only on primary vdev.
It results in link vdev not being cleaned up when roaming
fails due to some reason.

Change-Id: I0eb4b1da06a295935ff95be38228a5cacf127a73
CRs-Fixed: 3096648
2022-01-31 12:55:06 -08:00
Srinivas Dasari
071e0d2559 qcacld-3.0: Send LINK_DOWN event to CM upon MLO to legacy roaming
Host driver creates two vdev as part of initial connection.
If the connected AP supports MLO, both(sta and link) of the vdevs
would be moved to UP state.
Firmware sends roam sync indication to host when it roams to a
new AP. The event carries new AP info and the new AP could be
legacy AP. If the current AP is MLO and new(roamed) AP is non-MLO
AP, move the link vdev state to INIT as it's in UP state.

Change-Id: Idd9638ea446306b0309e5127f08e3dbc1ec9edc2
CRs-Fixed: 3106038
2022-01-31 12:55:00 -08:00
Amruta Kulkarni
a0d98934c7 qcacld-3.0: Handle more than one ROAM_SYNC_FRAME event
FW can send more than one wmi_roam_sync_frame_event_id before
roam sync event,change done in host code to handle this scenario.

Change-Id: I1ab02ed3e984948b8e57a2f9a2000b9f9493629c
CRs-Fixed: 3116569
2022-01-28 20:53:50 -08:00
Jianmin Zhu
cd9d714bbb qcacld-3.0: Consider connected AP for roaming candidate
If reassoc MAC from user space is broadcast MAC as:
"wpa_cli DRIVER FASTREASSOC ff:ff:ff:ff:ff:ff 0",
user space invoked roaming candidate selection will be based on firmware
score algorithm, current connection will be kept if current AP has highest
score. It is requirement from customer which can avoid ping-pong roaming.

Change-Id: I8de3e2a26a6f346c900157aa823205f849d233f7
CRs-Fixed: 3106276
2022-01-20 15:27:11 -08:00
Amruta Kulkarni
586338bcff qcacld-3.0: MLO roaming handling
CM, PE and WMA changes for mlo roaming
- Roam start and roam sync propogation updates.
- Handling connected link bitmap.
- Link specific assoc response generation
- WMA changes to handle add/remove peer
for mlo roaming scenarios.

Change-Id: I365a26ebb761d93dadd33c9fb8248c28e9eda94b
CRs-Fixed: 3033766
2022-01-19 15:30:15 -08:00
Liangwei Dong
f01e9fec4b qcacld-3.0: Fix hw mode update failure by roam sync event
Update HW mode change tlv information to wma/policy mgr.
Losing the information will cause FW/host out of sync.

Change-Id: I1ba9931d10617664da653e85335fade1352c3600
CRs-Fixed: 3109789
2022-01-19 12:34:56 -08:00
Yu Wang
95310d4c81 qcacld-3.0: handle ML scenario for PCL setting
Handle ML scenario for PCL setting.

Change-Id: Ida632bff8709e2467649d094de4b4074ff0f15d7
CRs-Fixed: 3107517
2022-01-19 05:39:12 -08:00
chunquan
51509a327f qcacld-3.0: Replace blacklist/whitelist for denylist/allowlist
Replace blacklist/whitelist with denylist/allowlist for
blacklist manager component. and replace blm with dlm.

Change-Id: I8dec146d8cb3b61dc891b72bea44704b8ab733fe
CRs-Fixed: 3087575
2022-01-14 03:50:03 -08:00
Amruta Kulkarni
24f04ca536 qcacld-3.0: Add api's to handle MLO Roaming
- New api's added to handle mlo roaming scenarios.
- Read and store link addr from wmi.

Change-Id: I6a18802d27f72235dc69d2eedb05f3e563d1b0f4
CRs-Fixed: 2997105
2022-01-13 01:11:30 -08:00
Amruta Kulkarni
f99679197f qcacld-3.0: Enable RSO for ML connection
For MLO connection, roaming is enabled
after ML link is up.

Change-Id: Ib042a9593bef9f287b92f0b256c942f8133a7f71
CRs-Fixed: 3098637
2022-01-12 01:50:58 -08:00
Jianmin Zhu
07775e1204 qcacld-3.0: Fix memleak for roam_synch_frame_event
When wmi_roam_synch_frame_event receieved from firmware, memory is
malloced to save probe rsp/reassoc req/reassoc rsp once extract event,
when copied to vdev rso_cfg->roam_sync_frame_ind, memory is malloc again,
and original memory isn't freed, memory leak happens.

To fix it, assure memory is only malloced once to save
probe rsp/reassoc req/reassoc rsp when handle wmi_roam_synch_frame_event.

Change-Id: I6b31378bcf624547fca9fd858268252fd22f533d
CRs-Fixed: 3107576
2022-01-11 19:40:45 -08:00
Amruta Kulkarni
fd56223aff qcacld-3.0: MLO roaming RSO changes
For MLO Roaming,
- RSO offload commands will be sent
to FW only on assoc vdev.
- Add new state for link vdev, will be
used only during roam sync.
Link vdev RSO state change : DEINIT -> MLO_ROAM_SYNCH -> DEINIT.

Change-Id: Ifb89e23fc48356ec8f0bc6a045f2dd4d81038076
CRs-Fixed: 3098570
2022-01-10 17:06:47 -08:00
Abhishek Singh
90fd31882d qcacld-3.0: Reject 5Ghz STA connection if SBS ML STA is connected
As in SBS ML STA, both links are on 5Ghz, reject the 5Ghz
non-ML STA connection, to avoid enabling same band roaming on
both STA.

Also do not allow the SBS ML STA, if a non-ML STA is present
on 5Ghz.

Allow it only if primary interface is set OR dual STA roaming
is disabled.

Change-Id: I20a23ed3b4d87c9acac5417a6f2d484fc80f47d6
CRs-Fixed: 3103246
2022-01-08 06:08:53 -08:00
Abhishek Singh
af5e1cfadb qcacld-3.0: Remove Unused RSO functions
Remove Unused functions wlan_cm_abort_rso and
sme_abort_roaming.

Change-Id: I3ff40cc7d526adea5cac61522c27142f7c73bcbe
CRs-Fixed: 3101169
2021-12-28 08:46:12 -08:00
Liangwei Dong
8e8d4ab6a5 qcacld-3.0: Add RSO state change logs
Add RSO state changing log to roam history log
so that help debug roam state change issues.

Change-Id: Ifb11013d83de6ee35241dd796df9a7ccbb1464e7
CRs-Fixed: 3094770
2021-12-27 01:03:45 -08:00
Liangwei Dong
fa125d8437 qcacld-3.0: Fix vdev ref count leak in cm_fw_roam_sync_req
Release vdev ref count if roam sync event is not handled
in connecting or disconnecting in cm_fw_roam_sync_req.

Change-Id: I2575116dc4ed6a4e3ae31dac2c80191d420eaf3e
CRs-Fixed: 3092988
2021-12-16 17:23:06 -08:00
Amruta Kulkarni
a32e3f1a0c qcacld-3.0: Add new files for mlo roaming
Add new files for mlo roaming and update Kbuild file.

Change-Id: I3e672a5e068648fd836ecccb0edbac084850f11d
CRs-Fixed: 3090925
2021-12-14 14:09:03 -08:00
Pragaspathi Thilagaraj
a700e95c62 qcacld-3.0: Fix RSO state change in disconnected state
When roaming has started and connect request from userspace
is received, disconnect is initiated as part of the connect
request and RSO stop->RSO Deinit is sent to firmware. But
before receiving the RSO stop, firmware posted the Roam Synch
indication to the host driver. While droping the roam
synch indication, the driver does abort roaming and as part of
that RSO state is changed to RSO enabled in connecting state.

Change the RSO state to RSO enabled only if roaming or roam synch
indication processing is in progress.

Change-Id: I7869d1a559884480708b9d1a493296a443364f0b
CRs-Fixed: 3089165
2021-12-08 20:47:30 -08:00
abhinav kumar
f778fdacef qcacld-3.0: Send proper PCL list to FW
Currently, the host does not check STA+STA concurrency
before sending VDEV/PDEV level PCL command to FW.

1. In case of STA Standalone connection, Host should send
PDEV level PCL commands to FW and marks all channels in PCL
as allowed.

2. In the case of STA + STA connection in MCC/SCC, Host
should send PDEV level PCL command for primary vdev id and
mark all channels in PCL as allowed.

3. In case of STA + STA connection in DBS, Host should
send VDEV level PCL command for both vdev id and via PCL
list host should make sure band is restricted to maintain
only DBS.

4. Initially STA + STA connection in DBS and then one STA
got disconnected. In this case, After disconnection Host
should send PDEV level PCL command for connected vdev id
and mark all channels in PCL as allowed.

Change-Id: I59cf5dfd1bf8fb26e360a8b0b5456fe05037376a
CRs-Fixed: 3084156
2021-12-07 22:39:03 -08:00
Jianmin Zhu
e7bf64ec36 qcacld-3.0: Fix allowlist roaming failed issue
ssid_allowed_list is cleared for each RSO stop.

To fix it, only clear ssid_allowed_list when disconnect, don't clear
it for each RSO stop.

Change-Id: I577191295d388ab92440d7bf65b6a0da6c342181
CRs-Fixed: 3087296
2021-12-06 16:22:05 -08:00
Yu Wang
987d406769 qcacld-3.0: skip frequency filtering for MLO STA scenario
If MLO STA is present, allow further STA connections to all
available bands/channels irrespective of existing STA
connection band.

Change-Id: Ic7da10b2e74645b73c579b38f43bb7e3105b6f55
CRs-Fixed: 3088656
2021-12-06 13:52:01 -08:00
Jyoti Kumari
d255c7165a qcacld-3.0: Use proper api to parse vendor specific IE
Use wlan_get_vendor_ie_ptr_from_oui() instead of
wlan_get_ext_ie_ptr_from_ext_id() to parse vendor specific
WFA Hotspot-2.0 IE

Change-Id: Ie9ee6c1f16d0eb83f52b7d9afa97f362f8400ff3
CRs-Fixed: 3080931
2021-12-06 06:26:28 -08:00
Jianmin Zhu
86a4abbf0f qcacld-3.0: Fix deadlock for race condition
When connect from wpa_supplicant and roam from F/W happens at same
time, supplicant hold cm cm_req_lock and wait rsp from scheduler
thread, sheduler thread is blocked to wait for cm_req_lock.

Change-Id: I6b9010972d29be9a32d3b85ee72891ed62b50801
CRs-Fixed: 3087169
2021-12-04 20:51:06 -08:00
Surya Prakash Sivaraj
6ae47b3e0b qcacld-3.0: Update preauth candidate entry to scan table
During SAE roam auth offload, update the beacon/probe response
frame coming from the FW via WMI_ROAM_FRAME_EVENTID into the
scan db.

When the bss info of the preauth candidate is unavailable in
the host/kernel scan entry, supplicant fails to determine the
proper SAE PWE config of the peer and the commit request fails.

Change-Id: Ia782ece7bebf8274f949fe9fb3b2a2882bf47597
CRs-Fixed: 3075458
2021-12-02 12:14:52 -08:00
Amruta Kulkarni
15760d2d1b qcacld-3.0: Fix double free in cm_roam_pmkid_request_handler
Currently memory allocated for structure roam_pmkid_req_event
is freed in two places causing usage after free.
Fix is to free memory only once in
target_if_pmkid_request_event_handler api.

Change-Id: Idc70e8437f89cb1cf4f6d35f924085409994714a
CRs-Fixed: 3064667
2021-12-01 04:22:46 -08:00
Utkarsh Bhatnagar
98fd330171 qcacld-3.0: Covert fw_phy_id to policy_mgr mac_id
In HW mode transition event for mac_freq_mapping,
fw sends pdev id for identifying mac in following
format:
	WMI_PDEV_ID_1ST 1 /* first pdev  (pdev 0) */
	WMI_PDEV_ID_2ND 2 /* second pdev (pdev 1) */
	WMI_PDEV_ID_3RD 3 /* third pdev  (pdev 2) */
Covert these PDEV_ID to the ones used in policy manager
used for filling current mac frequencies

Change-Id: I745de0278b1ddf627062163364b684745df5e4e7
CRs-Fixed: 3083289
2021-11-27 03:11:23 -08:00
Jianmin Zhu
e327eadc63 qcacld-3.0: Fix allowlist roaming failure
For allowlist roaming, EAPOL isn't offloaded for PMK changed, then
RSO is stopped and allowlist ssid is cleared in F/W, but when RSO
is restarted after EAPOL finished, allowlist ssid isn't reset to F/W,
so allowlist roaming will fail after that.

To fix it, when roam start or update cmd is sent to F/W: update
allowlist ssid and denylist to F/W.

Change-Id: Ia8ddc251767dfc04d9a6cfd1e7c1074ab0e88e96
CRs-Fixed: 3081226
2021-11-26 03:19:12 -08:00
abhinav kumar
70d9da5b2c qcacld-3.0: Send correct PCL to fw for STA+STA roaming
STA + STA DBS roaming rules are:
1. Roaming will be enabled on both interfaces.
2. Roaming bands are restricted to maintain only DBS.

While STA2 connection, the host sets VDEV level PCL for
vdev1 after association completion only and initializes
roam band mask after the 4-way handshake. So, when sending
PCL to FW value of roam band mask is 0, the host cannot
filter different band channels from STA2's PCL list.
This allows STA2 to roam to the different bands and violate
rule 2.

Fix is to make sure roaming bands are restricted to maintain
only DBS.

Change-Id: I1c9d2edb34f59e00c2fd14ea7894c324f9c64047
CRs-Fixed: 3075106
2021-11-19 23:43:41 -08:00
Amruta Kulkarni
8c81446ade qcacld-3.0: Log BSSID for roam result
In connectivity logging for ROAM RESULT log
bssid if ap type is Roamed AP in case of roaming
success and Current connected AP if roaming fails.
Also the vdev id field is not filled for mgmt frame
Tx and is always printed as 0.
Fill the vdev id for mgmt frame TX.

Change-Id: I7d6fe7ba47b508fadaf9b9872e644d8b737bf001
CRs-Fixed: 3068229
2021-11-19 04:35:07 -08:00
Jianmin Zhu
23cb8430a3 qcacld-3.0: Fix roam failed for SAP CSA concurrency
When vdev0 STA roamed to another channel, vdev1 SAP CSA for SCC
when ROAM_SYNCH_IN_PROG, will disable roam, but no RSO stop to F/W,
F/W RSO isn't disabled, but host vdev0 will enter RSO_STOPPED, host
F/W RSO state out of sync.
If vdev0 STA next roam sync come soon,  it won't be handled for host
RSO_STOPPED, neither roam sync complete nor disconnect will happen,
F/W will asert after wait roam sync complete timeout.

To fix it, Only do SAP CSA check after roam complete and RSO
reenabled, can avoid host F/W RSO state out of sync issue.

Change-Id: I77ccf30cac38f62c6ef8330c6da00364249b242e
CRs-Fixed: 3076935
2021-11-19 02:03:35 -08:00
Pragaspathi Thilagaraj
a3b3e83cca qcacld-3.0: Fix EAP length and roam candidate info
EAP length is of 2 bytes, but currently the attribute type
used is NLA_U8. This causes the EAP packets with length
greater than 255 to print invalid length.
For roam current AP, the roamed AP info is printed.

Use NLA_U16 attribute for the EAP length and fill
correct event type for the current connected AP.

Change-Id: I9b86055a4817163db17e469ca45b4a0044d5b2d6
CRs-Fixed: 3075012
2021-11-18 23:22:13 -08:00