Commit Graph

42 Commits

Author SHA1 Message Date
Gururaj Pandurangi
61dfd77555 qcacld-3.0: Handle eMLSR STA concurrencies in policy mgr
Handle the following the eMLSR STA concurrency scenarios

1) eMLSR STA + SAP/P2P GO/NAN - Send a force disable link request to
FW on any one of the eMLSR links. FW will decide which link to disable.
2) eMLSR STA + STA/P2P Client - Send a force disable link request to
FW on any one of the eMLSR links. FW will decide which link to disable.
This action happens before vdev start of the new connection request.
3) eMLSR STA + TDLS - TDLS connection is not allowed since eMLSR STA is
given higher priority.
4) If there is already an existing connection, then eMLSR is not allowed.

Once the other connection goes down, the disabled eMLSR link is restored.
The concurrency handling API is invoked from corresponding interface
manager APIs.

Change-Id: Ib7d5da5dcb8eb3ea16c6e50c8fcadc20972d7d05
CRs-Fixed: 3185078
2022-06-26 05:17:55 -07:00
David Oladunjoye
946c8f039a qcacld-3.0: cmn: 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: I7e38c098c58146dc2c762d86ff3eae97a21aa98b
CRs-Fixed: 3217408
2022-06-24 07:46:00 -07:00
Sheenam Monga
8076b56e37 qcacld-3.0: Add handling for four port connection
Add support to handle 2 sap and 1 ml sta link.
Currently, get pcl fails for fourth connection when
2 sap link and 1 ml sta link is present due to which
fourth connection is not allowed as pcl len is becoming 0.

Fix is to add handling for fourth connection when existing
concurrency is P2P/SAP + P2P+SAP + 1 ML STA link.

Change-Id: Ief969018da14096f758fea4bd06d17e7e8d039b7
CRs-Fixed: 3219328
2022-06-13 17:49:42 -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
Liangwei Dong
00c79e5785 qcacld-3.0: Add SAP P2P GO force SCC in same band
When SAP and GO home channels are in MCC in same band,
implement below requirement to avoid MCC:
1. SAP starts at first and GO starts later, then SAP will
  force SCC to GO's home channel after GO starts up.
2. GO starts at first and SAP starts later, then SAP will
  force SCC to GO's home channel during starting up.
3. SAP and GO SCC in same band, SAP changes channel to
  the other channel in same band, GO will follow SAP and
  move to SAP home channel.
4. SAP and GO SCC in same band, GO changes channel to the
  other channel in same band, SAP will follow GO and move
  to GO home channel.

And all the force SCC cases, if the target channel of force
SCC is not supported by the SAP or GO, then driver will
select other band's channel for the interface.

Change-Id: I7b24f3a972a401fd144a0c81dc19bd48ba224d85
CRs-Fixed: 3176087
2022-05-26 13:34:04 -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
12e3558871 qcacld-3.0: Call enable/disable link APIs from connect/disconnect/roam
Call enable/disable link APIs from connect/disconnect/roam etc.

Cleanup policy_mgr_handle_sap_mlo_sta_concurrency and
policy_mgr_handle_sap_plus_ml_sta_connect API as
policy_mgr_handle_sap_cli_go_ml_sta_up_csa and
policy_mgr_re_enable_ml_sta_on_p2p_sap_down will take care of
ML STA + SAP/P2P cases.

Also optimize policy_mgr_handle_ml_sta_link_concurrency to consider
only ML STA+STA cases and called from connect/disconnect/roam etc.

Change-Id: Ib8b9b2a490832ea5cbe1d86e58009e1437b331b9
CRs-Fixed: 3189685
2022-05-24 00:57:18 -07:00
Jyoti Kumari
eafa02c574 qcacld-3.0: Skip STA connect on 6G or 5G indoor chan if SAP is up
Currently STA can scan and come up on 6Ghz or 5Ghz indoor channel
if hardware is non-dbs and SAP is present

As part of this change, do not allow STA to connect on 6Ghz and
5Ghz indoor channel for non-dbs hardware if SAP is present

Change-Id: I48ed8483225e35d8b898b0325eee398f74e41c97
CRs-Fixed: 3196247
2022-05-18 05:20:43 -07:00
Liangwei Dong
7bf14b97ea qcacld-3.0: Move SAP check_concurrent_intf to SAP IF mgr
In GO+SAP Case, SAP starts firstly, GO starts on same band
but different channel. SAP forces SCC check is done in
hdd_hostapd_sap_event_cb in the event handle of eSAP_START_BSS_EVENT.
But at the time the GO's connection entry is not added to
policy mgr list. It is added after WLAN_IF_MGR_EV_AP_START_BSS_COMPLETE
is received by SAP interface manager. SAP can't find the same
band GO's channel at this time.
Fix by move the SAP forces SCC check in SAP interface manager
after WLAN_IF_MGR_EV_AP_START_BSS_COMPLETE event is received.

Change-Id: I54663bdd887e3d591d7fd9ee7ce76572b1ef21f7
CRs-Fixed: 3176076
2022-04-20 05:46:37 -07:00
Utkarsh Bhatnagar
fea133e371 qcacld-3.0: Move MLO STA concurreny handling to Policy Mgr
Move MLO STA-SAP concurreny handling to Policy Mgr which
is present in CSR currently.
Also, Move MLO STA-STA concurreny handling to Policy Mgr
which was part of If Mgr currently.

Change-Id: I2b8de17c3d31b43ff1f6b81a7de07b88888d7fb5
CRs-Fixed: 3153393
2022-03-21 17:05:03 -07:00
Bing Sun
2950f903c9 qcacld-3.0: Do not send force inactivity if partner links are in quiet
If all the partner links are in quiet status, do not send force inactivity
on the link.

Change-Id: Icf5356f9d05e871dcf602e2382a1d150dd057aed
CRs-Fixed: 3101961
2022-02-11 04:13:12 -08:00
Jyoti Kumari
ffe9db4483 qcacld-3.0: Don't disable NAN if MLO connection presents
Don't disable NAN if MLO connection presents.

Change-Id: I698fdd69b14f9992cf9c2becfd50c80ec376a784
CRs-Fixed: 3120663
2022-02-02 18:20:04 -08:00
Abhishek Singh
301881e1c4 qcacld-3.0: Remove temporary comments from if_mgr API
Remove temporary comments from if_mgr_disable_roaming_on_vdev
and optimize it.

Change-Id: Iab36aff4779ac5761216e5abc596c8e980f9b059
CRs-Fixed: 3122127
2022-02-02 05:39:14 -08:00
Yu Wang
728e81e5a4 qcacld-3.0: handle MLO scenario for roam processing
Treat MLO STA as a single entity in roam processing:
only process roam related requests on assoc vdev.

Change-Id: Ida9665771e00236c491f58dc764cc6e470dcb6df
CRs-Fixed: 3104659
2022-01-13 17:07:17 -08:00
Abhishek Singh
c967f9d59f qcacld-3.0: Refactor if_mgr_handle_ml_sta_link_concurrency
Rename Legacy to non ML STA and MLO to ML STA in
if_mgr_handle_ml_sta_link_concurrency and related function.

Move if_mgr_get_ml_and_non_ml_sta_count to policy manager
util API. So that it can be used by other modules.

Change-Id: I61260ddf1c6008d8601efaac8d0e9e768e253499
CRs-Fixed: 3105269
2022-01-08 06:08:58 -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
Utkarsh Bhatnagar
7af2c5d1e7 qcacld-3.0: Fix force SCC logic to consider 1 inactive link
A MLO with 1 link not active will lead to HW mode as SMM instead
of SBS, so check and see if SBS MLO is present and take
decision as per it.

Change-Id: Ide487d56d6375892b91ab615b9ad314dba2c9991
CRs-Fixed: 3102349
2021-12-30 12:36:48 -08:00
Jianmin Zhu
b93dab5a6c qcacld-3.0: Fix assert for connect and roaming concurrency
In dual sta case, while vdev0 roaming,  vdev1 tried to connect and
stop vdev0 roam. in lim_process_assoc_rsp_frame,
lim_is_roam_synch_in_progress return false, hdr is parsed as invalid
addr, assert when access hdr->sa.

Change-Id: I917dc064dbca5600fe3586ec08103fa62a1348ee
CRs-Fixed: 3100427
2021-12-28 04:06:56 -08:00
Utkarsh Bhatnagar
da01ec4d8c qcacld-3.0: Handle SAP + MLO_STA concurrency after MLO connect
Handle SAP + MLO_STA concurrency after MLO connect, by disabling
one of the SBS link if 2.4Ghz SAP is present.

Also if roam happen to non SBS MLO remove the disable restriction
of MLO.

Change-Id: I7d9503a01bb23cd06808b46c090f0dee39c96af6
CRs-Fixed: 3096310
2021-12-17 12:17:00 -08:00
Utkarsh Bhatnagar
c7e3610309 qcacld-3.0: Handle SAP + MLO STA concurrency
Handle SAP and MLO STA concurrency such as:

  1) If MLO STA is present with both links
     in 5/6 Ghz then SAP comes up on 2.4 Ghz,
     then Disable one of the links.

  2) If there is channel switch for sap from
     2.4 ghz to 5 ghz, then enable both the
     links as they were disabled by previous
     operations when sap was on 2.4 ghz.

  3) If MLO STA is present with both links in
     5/6 Ghz and SAP, which was present on
     2.4 ghz, stops then renable both the as
     one of the links were disabled because
     of sap on 2.4 ghz.
     Also, in case where MLO STA roamed from
     5 + 6 link to 2.4 + 5/6 link force scc
     will happen and the disabled link has
     to be enabled.
     Both links should only be enabled if mlo
     sta has more than one links.

Change-Id: I0fd0093b20336ae32325981589c399b44a44b64e
CRs-Fixed: 3092202
2021-12-16 07:17:42 -08:00
Utkarsh Bhatnagar
2c20f1dffa qcacld-3.0: Handle MLO STA + Legacy STA concurrencies
Handle MLO STA + Legacy STA concurrencies such that:

1) Don't disable any link if STA form SCC with any of the
   link.

2) Disable the link on the same MAC which can cause MCC.

   a) On non-SBS devices disable the ML link on the same
      band as STA, As the same band means the same MAC
      in non-SBS mode.
   b) On SBS devices, disable the ML link on the same MAC:
     - If STA freq is 2.4Ghz disable the 2.4Ghz link.
       If a 2.4Ghz link is not present, disable any of the
       5/6Ghz links (FW to decide the link depending on
       SBS mode, low share or high share).
     - If STA freq is 5Ghz and can lead to SBS with on of
       the link, disable the non-SBS link (link which will
       remain on the same MAC).
     - If STA freq is 5Ghz and cannot lead to SBS with
       one of the links, disable the link on the same MAC/
       band.

e.g:

 STA freq:    STA ML combo: NON SBS Action: SBS Action:
 ------------------------------------------------------------------
 2Ghz         2Ghz+5/6Ghz   Disable 2Ghz    Disable 2Ghz
 5Ghz         2Ghz+5/6Ghz   Disable 5Ghz    Disable 2.4Ghz
                                            if both 5Ghz lead
                                            to SBS, else
                                            disable 5Ghz

 5Ghz(lower)  5Ghz+6Ghz     Disable 5Ghz    Disable 5Ghz
 5Ghz(higher) 5Ghz+6Ghz     Disable 5Ghz    Disable 6Ghz
 2Ghz         5Ghz+6Ghz     Disable Any     Disable Any

Change-Id: Ie8ca51b5e108c1cfce1a02fc97f4849c617216b7
CRs-Fixed: 3090333
2021-12-15 11:07:34 -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
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
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
sheenam monga
14a98fd26d qcacld-3.0: Handle user initiate CSA in p2p go+go concurrency
If p2p go+go concurrency exist and g_enable_go_force_scc ini sets
to 2(liberal mode) then 1st p2p go channel should move to 2nd
p2p go channel after set key. Again, when user initiates CSA to
one p2p go then the force SCC doesn't happen to other p2p go.
But the expectation is all p2p go should move to same channel
which is initiated by user.

As part of fix, move all p2p go to same channel when user
initiates.

Change-Id: I1664e5a7d545d29c32b94e8e4831c71a9cc0ae23
CRs-Fixed: 3064245
2021-11-18 17:05:02 -08:00
Yu Wang
b4e1e2b18a qcacld-3.0: add concurrency checking for MLO STA
Update the concurrency policy for STA mode.
For an upcoming STA connection:
1. Disallow the 2nd STA connection if multiple STA connections are
   not allowed.
2. Allow the secondary MLO link when primary link is connected.
3. Disallow ML STA when ML STA/SAP is present.
4. Disallow the 3rd STA.
5. Allow for the other cases.

Change-Id: I70c41177b7a3a9aa9cbac0aaced08c6eafca2b6d
CRs-Fixed: 3012577
2021-11-07 22:52:37 -08:00
Utkarsh Bhatnagar
27e63bcaeb qcacld-3.0: STA SBS concurrency changes
In if_mgr_validate_candidate() adds SBS
check to allow a STA connection on SBS
channel when MCC is not allowed .

Change-Id: Ia8007a4beabf546ff293986124f4ef985ccaeacc
CRs-Fixed: 3052797
2021-10-14 10:16:12 -07:00
Bapiraju Alla
19856d1d3f qcacld-3.0: MLO connect path fixes
Fixes in this change include:
- Add debug prints
- Don't disable roaming in case of MLO link connection
- Minor compilation fixes

Change-Id: I0aa9e8b2fd634b6dba1926796d95db997946aac3
CRs-fixed: 3013039
2021-08-19 09:23:49 -07:00
abhinav kumar
a20ff6027f qcacld-3.0: Allow STA+STA to connect in MCC mode
In case of STA + STA or STA + P2P CLIENT concurrency
in MCC, no need to update the beacon interval while
processing connection on the second interface.

Currently, the driver only bypass beacon interval
validation for P2P CLIENT connection in case of
STA + P2P CLIENT concurrency in MCC.

Fix is to bypass beacon interval validation for the
second sta connection so that connection can happen
in MCC for STA + STA.

Change-Id: I4c3f8b1ed0b22f809a291eb88dfd95255cebe5e2
CRs-Fixed: 2934503
2021-04-29 17:40:25 -07:00
Lincoln Tran
7e240c6d84 qcacld-3.0: Fix call to get vdev mlme obj
In the validate beacon interval logic, there are a few calls to get the
vdev MLME object from the interface manager component. However,
the component does not have a vdev object, so get it from the MLME
component instead.

Change-Id: I7333edeb6f1f0d5669605fe9e3d4fb10745d1fa4
CRs-fixed: 2928798
2021-04-22 13:13:27 -07:00
Lincoln Tran
746140e284 qcacld-3.0: Migrate validate beacon interval API
Move the beacon interval validation logic from the CSR module to the
interface manager module.
Add a path to send events to the SAP event handler from the MLME
module.

Change-Id: Ia86f219b3f209b53e7818a80f95b2c0555550736
CRs-fixed: 2796676
2021-02-17 02:10:13 -08:00
Srinivas Dasari
a9a53ee19c qcacld-3.0: Handle NAN+STA reconnect concurrency
Currently, STA reconnect (e.g. reconnect to same BSSID) is handled
as STA+STA as part of NAN concurrency checks. This results in NAN
disable when reconnect is issued.
Check if the current incoming connection is on same vdev as
previous sta connection instance and disable NAN only if it's
different.
Handle NAN+SAP reenable in similar way.
Also, remove the redundant usage of NDI cleanup API
ucfg_nan_check_and_disable_unsupported_ndi in
if_mgr_connect_start.

Change-Id: Ia063a69bb2efdf1d51c6988b8905ceac0f454dab
CRs-Fixed: 2821352
2020-12-13 23:38:12 -08:00
Gururaj Pandurangi
370f376c02 qcacld-3.0: Modify connect start code in if mgr
Modify connect start code in interface manager by
moving disable roam and tdls link teardown notify
APIs from HDD to if mgr. Alongside, move tdls link
teardown notify API from HDD to if mgr in start bss API.
Also, move the tdls link teardown API to TDLS module from
HDD module as TDLS should manage the wait logic.

Change-Id: I09fa31878563a3daaa7c5fde46327475829317b3
CRs-Fixed: 2811807
2020-11-20 13:11:00 -08:00
Amruta Kulkarni
a75187c965 qcacld-3.0: Use converged api's for roaming
In Interface manager, legacy roaming api's were used as roaming testing
was ongoing.Now testing is done so use converged roaming api's.
This will also resolve the KW warnings.

Change-Id: I9ef101e6ec02bb18c6f2f9a9fbdaa81dbe81f9a0
CRs-Fixed: 2798601
2020-10-20 19:26:53 -07:00
sheenam monga
fe95170ec6 qcacld-3.0: Handle sap restart after opportunistic timer start failure
Currently, If hadware is not dbs capable opportunistic timer
can not be started. In function if_mgr_connect_complete
policy_mgr_check_n_start_opportunistic_timer fails to start
opportunistic timer in case of non-dbs hw and sap restart
doesn't happen.

Fix is not to validate status returned by
policy_mgr_check_n_start_opportunistic_timer to restart sap
in case of non-dbs hardware.

Change-Id: I3308a5c10341950d51419907cc767c09f967b7b1
CRs-Fixed: 2792764
2020-10-12 15:06:22 -07:00
Lincoln Tran
d3f63c4fe8 qcacld-3.0: Fix potential NULL ptr dereference in if_mgr
The peer objmgr pointer in the if_mgr_roam module may be NULL if
there is no peer connected. Add check to see if pointer is NULL
before dereferencing it. Also modify logic to only check if the
vdev is in STA or P2P_CLI mode.

Change-Id: I7370ca5b9c74bd81f6e958cf740b6ee426f4faad
CRs-fixed: 2779831
2020-09-19 13:33:20 -07:00
Amruta Kulkarni
ea53232656 qcacld-3.0: Enable roaming on interface mgr
- Use sme roaming api's instead of converged
 roaming api's.
- Add debug logs in if mgr api's.
- Fix typo in Kbuild file.
- Fix compilation errors.
- Fix comments for readability.
- Update disconnect functions so parameter type matches.

Change-Id: Ia0adf6f79036e9348bf4ebb6237a5e25ef813a21
CRs-Fixed: 2774509
2020-09-14 09:55:10 -07:00
Lincoln Tran
53f7903389 qcacld-3.0: Add candidate validation to the if_mgr
Add the API to validate the BSS before roaming to it. This API will check
if other vdevs are already connected to the BSS, if concurrency is allowed,
and if channel is allowed for the current HW mode.
Keep the new changes under the interface_mgr feature flag.

Change-Id: I280e95b0a30c08fe4037295330628b79d22acf5f
CRs-fixed: 2774543
2020-09-12 01:59:43 -07:00
Gururaj Pandurangi
dc3821cefd qcacld-3.0: Add connect complete changes to if mgr
Add connect complete event handling API as part
of connection manager effort.

Change-Id: Ie1edfb1383ffdef97c7740d936256f7b89649e65
CRs-Fixed: 2760218
2020-09-11 21:15:44 -07:00
Lincoln Tran
49f4bf7e0d qcacld-3.0: Add disconnect changes to interface mgr
Add disconnect start and disconnect complete event handlers to
the interface manager.
Add disable roaming, enable roaming on connnected STA, and
enable roaming after P2P disconnect APIs.

This change is part of the connection manager effort.

Change-Id: Ib68b9ef9ff5b6541d7393bfbe6332a68b17bd587
CRs-fixed: 2760090
2020-09-09 16:19:49 -07:00
Amruta Kulkarni
a7c313b997 qcacld-3.0: Add start/stop bss changes in interface mgr
- Add start/stop bss event processing
- Add WLAN_INTERFACE_IF_MGR flag

Change-Id: I472a4534ee7bf95a10058595c85ec89eaf411670
CRs-Fixed: 2759981
2020-09-09 16:19:45 -07:00
Sandeep Puligilla
60352aed62 qcacld-3.0: Add interface manager module
- Add interface manager module files
- Add start_connect event processing
- Add stubs for start_connect_complete and start_bss
event processing API's

Change-Id: I24756336c6e6c9d7f3276e4039c0b7236233d45e
CRs-Fixed: 2759275
2020-08-26 12:13:26 -07:00