Commit Graph

163 Commits

Author SHA1 Message Date
Bing Sun
7fcc2ebd13 qcacmn: Fix issue when getting rnr
When getting rnr IE information, instead of getting rnr pointer through
input parameter,  we can just return rnr pointer.

Change-Id: I57f683eb86bb813018a38fa3a6286e9b6e40037f
CRs-Fixed: 3025194
2021-08-31 12:23:26 -07:00
Himanshu Batra
df25501b83 qcacmn: Fill ML info while getting active connect/disconnect request
Fill ML info while getting active connect/disconnect request

Change-Id: Ifdbfacab64bfcc144ac3f2afb68854f2108e729d
CRs-Fixed: 3022005
2021-08-25 13:07:19 -07:00
Vivek
a32acb5027 qcacmn: Send connect/disconnect response for flushed connect/disconnect
Send connect/disconnect response for flushed connect/disconnect

Change-Id: I23df9c249bdcba0530dcee33c2a09534869815b0
CRs-Fixed: 3008838
2021-08-23 00:18:24 -07:00
abhinav kumar
a368b81e70 qcacmn: From connection manager filter only ESS type of AP
ESS (Extended Service Set) operating mode allows wireless
device to roam anywhere within the area covered by multiple
APs.

IBSS (Independent Basic Service Set) allows wireless device
to connect in peer-to-Peer mode only.

Fix is to allow connection manager module to filter only
those AP(s) which is/are part of ESS network.

Change-Id: I9536557daa624b9e44505efa0e0720e47b645517
CRs-Fixed: 3015220
2021-08-19 11:30:39 -07:00
bings
7f36fdf121 qcacmn: Check bssid before creating bss peer
Add NULL pointer check when getting bssid

Change-Id: Ie8bba89b3b4125fe58329d2a5d56aba4a6d0bcb3
CRs-Fixed: 3010236
2021-08-14 23:07:09 -07:00
Himanshu Batra
9406f72b3d qcacmn: Update the correct bit index for ML IE
Update the correct bit index for ML IE control field

Change-Id: I8b2dcf70fd2ee83ae24eeba8359798499c0b7c74
2021-08-12 10:45:26 -07:00
Will Huang
69f69de187 qcacmn: Enable check_6ghz_security by default
It is mandatory request to check security mode in 6Ghz band,
so enable check_6ghz_security by default. Keep default disable
for WIN as requested.

Change-Id: Idcc4cb9add98ad4bda8e4357e83460ca25221692
CRs-Fixed: 3006930
2021-08-12 00:55:56 -07:00
Ashish Kumar Dhanotiya
518f0daeb1 qcacmn: Add aliasing for INI names
Currently driver has only one name for an INI, with
this change add second name as well for few INIs based on
new requirement.

Change-Id: I67bd50652c3be7912c516b81d40f6a1ea7a7b90a
CRs-Fixed: 3007172
2021-08-10 15:39:24 -07:00
sheenam monga
296e2e7722 qcacmn: Do not reset OCV from RSN cap if AP is non-OCV
Currently driver reset self OCV capability from RSN based
on AP capability which is not required as it may lead to
failure of wifi-cert test case 15.1 that is sta should
advertise self OCV capability irrespective of AP capability.

Fix is not to reset OCV from rsn based on AP
capability to support OCV.

Change-Id: I24cda586ae0f364bb4eb2936985194e01f74875b
CRs-Fixed: 3002963
2021-08-09 13:08:38 -07:00
bings
4ea9496323 qcacmn: Pass mld address and assoc link info when creating bss peer
MLO sta needs mld mac and assoc link information to create bss peer
Get mld address and assoc link info from connection manager and pass
it to bss peer creation.

Change-Id: I147ac8365f3c99c6231df589ac17d39122d57362
CRs-Fixed: 2987496
2021-08-05 15:13:41 -07:00
bings
fe21212247 qcacmn: API to get rnr IE according to cm id
API to get rnr IE according to cm id

Change-Id: I6666a86a2402323a64472c79dc876077b622512a
CRs-Fixed: 3004089
2021-08-03 06:55:27 -07:00
Bapiraju Alla
e95a45c0f7 qcacmn: Update vdev mlme MAC address based on connection type
Management frames from STA should carry SA as link MAC address for ML
connection and net device address for non-ML connection.

To achieve this, update vdev mlme MAC address to link MAC address for
ML connection and to net dev MAC address for non-ML connection.

Change-Id: I2285a43882039dfc706fbf73a494cc09bcba19c7
CRs-Fixed: 2993031
2021-07-28 19:02:38 -07:00
Huashan Qu
3c98d7456d qcacmn: Use seperate event for HO/roaming disconnect for old AP
Use seperate event for HO/roaming disconnect for old AP, as
if a disconnect is received during roaming, the state is moved
to disconnect and thus WLAN_CM_SM_EV_DISCONNECT_DONE is handled
as a normal disconnect and does not clean up the roaming
contexts in VDEV and peer.

Change-Id: I10e616be435b16e1cff6666940171fef6b2b4065
CRs-Fixed: 2994558
2021-07-24 05:19:02 -07:00
Himanshu Batra
73f871654f qcacmn: CM changes for ML connection
CM changes for ML connection

Change-Id: I7718734b0f08c8e73702b2c1c7c297bf71b6b5e3
2021-07-20 08:28:42 -07:00
Abhishek Singh
6deea68417 qcacmn: Handle EV_DISCONNECT_ACTIVE event in roaming state
In the case of Roam Start sub-state, if a new connect/disconnect
is received, an internal disconnect/actual disconnect is queued
in serialization and then the state is changed to connecting
or disconnecting, but if the disconnect command becomes active
directly the EV_DISCONNECT_ACTIVE is received in roam substates
but is not handled.

As EV_DISCONNECT_ACTIVE is not handled the disconnect is not
processed and VDEV can remain in UP state while CM assuming that
the disconnect is completed will allow a new connection which
cause 2nd BSS peer creation.

Fix is to handle EV_DISCONNECT_ACTIVE event in Roam sub-states.

Change-Id: I30180db2e15af9b793e52e891f86d54c55b7b5e0
CRs-Fixed: 2986468
2021-07-12 02:28:11 -07:00
Bapiraju Alla
fccacb7dd3 qcacmn: Update BSS score calculation for 11be
Update BSS score calculation to consider 11be parameters

Change-Id: I4e017ccdc7e3e62f9962d6d369dd6aecd85e47fe
CRs-Fixed: 2961896
2021-07-07 11:24:38 -07:00
Bapiraju Alla
700ff4bdc8 qcacmn: Add INI configuration for MLO scoring params
Add INI parameters to configure MLO scoring parameters

Change-Id: Idbdb6194dcf5230a1e6cefbbaab472bb986fa6a4
CRs-Fixed: 2958676
2021-07-06 17:33:41 -07:00
Abhishek Singh
62fe3e3986 qcacmn: Trigger panic on CM active command timeout
Trigger panic on CM active command timeout.

Change-Id: I5013d2141dc2f0c9c9d1ed762b126e9d41fb7220
CRs-Fixed: 2983061
2021-07-06 06:53:47 -07:00
Abhishek Singh
04a8eb2045 qcacmn: Code cleanup for connection manager Macro
Code cleanup for connection manager Macro.

Change-Id: I1526187e5efc6f4e38265d617c0342b4c1ea1228
CRs-Fixed: 2978727
2021-06-29 01:33:15 -07:00
Abhishek Singh
bac1da61a7 qcacmn: Limit the max connect time to 30-35 sec
Limit the max connect time to 30-35 sec.

Change-Id: Ifdcd1620f0f9175f1ae157f39d10fd5322a24c40
CRs-Fixed: 2973145
2021-06-22 13:14:26 -07:00
Abhishek Singh
ce5d191d80 qcacmn: Refactor CM command timeouts and flush req list before deinit
Refactor connection manager command timeouts to handled unexpected
timeouts in VDEV/PEER SM.

Also flush the req list before deinit to avoid memleaks due to these
timout, if SM is not handled properly.

Change-Id: I6cd1857464691838c75b1ceda32f94ad4cda46a2
CRs-Fixed: 2971466
2021-06-18 17:06:18 -07:00
Lincoln Tran
0722a9b4cb qcacmn: Add MLO specific function definitions
Define the following functions for MLO operation:
Peer create and delete
STA/SAP up and down
VDEV create and delete
Is MLD AP or STA

Change-Id: I5c9b3276b8dbb4b2a3f055480cab4a865b8af946
CRs-fixed: 2935769
2021-06-17 07:19:31 -07:00
Huashan Qu
939218bd45 qcacmn: Refine QDF_STATUS_E_NOSUPPORT to QDF_STATUS_E_ALREADY
Refine QDF_STATUS_E_NOSUPPORT to QDF_STATUS_E_ALREADY in
cm_check_for_reassoc_hw_mode_change() as QDF_STATUS_E_NOSUPPORT shows
that no need to do action for hardware mode change,  it's not an
error or failure.

Change-Id: I6e977729f3c75cc23b921ea38728ff4c5aae7d75
CRs-Fixed: 2961362
2021-06-08 03:16:32 -07:00
Abhishek Singh
84138c387f qcacmn: Check AP support OCV before enable it
Add missing change I4ab3c956c3169b50a69c05d9ed1c36e055aeb586
in connection manager to disable OCV in STA RSN capability
if AP doesnt support it.

Change-Id: I84b666a489b8f2e410a4901b908f57edae86b5d4
CRs-Fixed: 2960828
2021-06-03 14:53:10 -07:00
Huashan Qu
3493643d20 qcacmn: Add host roam preauth handling code for connection manager
Add host roam preauth handling code for connection manager

Change-Id: Ie2ee72bb33fe5706349d1eb13208a0cfcd15aacf
CRs-Fixed: 2954506
2021-05-28 01:47:08 -07:00
Abhishek Singh
7ea47e200a qcacmn: Remove unused connect IEs from struct cnx_mgr
Remove unused connect IEs from struct cnx_mgr.

Change-Id: Ib137104e260899d8abc460b1b4213de7099a0e8d
CRs-Fixed: 2942865
2021-05-12 16:34:51 -07:00
Abhishek Singh
0170051831 qcacmn: Get current candidate from roam command for roam resp
In cm_update_scan_db_on_connect_success, the current candidate is
always retrieved from connect req even when the resp is for reassoc
this can lead to invalid pointer access.

Fix this by getting current candidate from roam command for reassoc
resp.

Change-Id: I99afc49abd7581cf43279654a5fe1e67e2448bd0
CRs-Fixed: 2941836
2021-05-11 01:44:03 -07:00
Huashan Qu
36af7eda02 qcacmn: Add self reassoc and Hw mode change logic for LFR2
Add self reassoc and Hw mode change logic for LFR2.

Change-Id: I366bd6ba3650343a2f829359a2a42695f089d121
CRs-Fixed: 2941760
2021-05-10 14:48:06 -07:00
Pragaspathi Thilagaraj
58a8a97272 qcacmn: Check the sae single pmk ini for scan entry
Currently when updating the single pmk capability for an AP,
the driver only changes for the sae single pmk OUI advertised
by the AP and not the ini value. This causes the crypto entry
for the AP to be updated with single pmk flag to true even when
the ini is disabled.

So check the sae single pmk ini also to update the scan entry
as sae single pmk bss.

Change-Id: I2ae16c8da5af397b041723f9d5a3b2d8a6e7c986
CRs-Fixed: 2935440
2021-05-03 15:03:22 -07:00
Kiran Kumar Lokere
eb4b6bf958 qcacmn: Update the security check mask for 6GHz AP
Update the security check mask value for 6GHz AP.

Change-Id: I8d9637a95c6191124372a7bdba119837e6553ed4
CRs-Fixed: 2930941
2021-04-28 16:42:04 -07:00
abhinav kumar
28138b7558 qcacmn: Don’t consider PCL weightage for STA iface
In case of one STA interface is active and/or the
secondary is about to come up. If host receives
CONCURRENT_DUAL_STA_POLICY vendor command with policy
PREFER_PRIMARY. Then don’t consider PCL weightage for
all subsequent STA connections. Due to this host/FW
allows all subsequent connections with the best
available candidate (either in DBS, SCC or in MCC).

Change-Id: Id200e1011ef8560b763ec1cbc3664666da6d395f
CRs-Fixed: 2915748
2021-04-26 10:01:49 -07:00
Abhishek Singh
7f449d83f1 qcacmn: Add null pointer handling in cm_get_first_roam_command
Add null check for the cm_ctx in cm_get_first_roam_command.

Change-Id: I1c9a666d845936e24c87d5560b158febb9ccc854
CRs-Fixed: 2929651
2021-04-22 23:56:24 -07:00
Kiran Kumar Lokere
10ec6a98fd qcacmn: Fix the issue with OWE AP scan in 6GHz
Check the RSNXE IE presence only for SAP key mgmt type.

Change-Id: I3c9df627589e351a30dc9899ccaa7f24e9516965
CRs-Fixed: 2924842
2021-04-22 19:43:28 -07:00
Kiran Kumar Lokere
dfb42ec511 qcacmn: Drop the invalid 6GHz security beacon from scan result
Validate the 6GHz AP beacon in the scan result for valid security
if user enables the 6GHz security checks.
Drop the beacon from scan result if valid security is not found.

Change-Id: I6e02e77cc996b4f4fb7dc7a1678990419a51c79e
CRs-Fixed: 2904741
2021-04-02 15:03:28 -07:00
Utkarsh Bhatnagar
9df8be508d qcacmn: Add sanity check for the command to remove in connection mgr
Add sanity check for the command to remove in connection mgr, as
by default in case of invalid cm id the disconnetc command is removed.

Also cm_id pointer passed in the cm_remove_cmd, may get freed as
part of cm_delete_req_from_list(), if its part of the cm_req.

Also move the add to ser logic for the roam sync to connect state
handling.

Change-Id: Ie69e8a65fc864a55c51d149570573e6f9aef4564
CRs-Fixed: 2911267
2021-03-31 08:08:38 -07:00
Amruta Kulkarni
3555f99129 qcacmn: 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: I2930f01119d87f8e94eae1a4b3d4003e50e1a45a
CRs-Fixed: 2906337
2021-03-25 22:23:28 -07:00
Himanshu Batra
add02fc7c9 qcacmn: Add public API for ext cm pointer
Add public API for ext cm pointer

Change-Id: I4208efd33e4fb09dfd3601c0ac5ca086d8ae3475
2021-03-25 09:44:06 -07:00
Amruta Kulkarni
5c1ca03ebe qcacmn: Support roam sync ind in CM
Add support for roam sync indication in
connection manager.

Change-Id: I750403aa0dfa6c615f9bca832898c63af608d28d
CRs-Fixed: 2901863
2021-03-24 09:48:18 -07:00
Amruta Kulkarni
f4891e164c qcacmn: Fix declaration of wlan_cm_set_candidate_advance_filter_cb
Fix wlan_cm_set_candidate_advance_filter_cb declaration.

Change-Id: I33582e5219552f90fc0c2a858dc3f5c6560762ee
CRs-Fixed: 2905202
2021-03-24 02:12:22 -07:00
Himanshu Batra
9fbf9e7de2 qcacmn: Support custom scan filter and candidate list sort
Add APIs to support customer scan filter and candidate list
sorting based on user perference

Change-Id: I9b5d46c7851a0afd4513f50c50c43baf26c29d0c
CRs-Fixed: 2896741
2021-03-17 11:06:36 -07:00
Abhishek Singh
00bb6dedcc qcacmn: Free crypto keys on connect active
Free crypto keys on connect active instead of disconnect complete,
to avoid race between south bound disconnect, leading to key free and
set key req from supplicant using the same key.

Change-Id: Idae5100d255b4df6b84425114cb66fa8d3b504e0
CRs-Fixed: 2897247
2021-03-11 11:59:03 -08:00
Amruta Kulkarni
64b096fde9 qcacmn: Support roam start and roam abort request in CM
Add support for roam start and roam abort request
in connection manager.

CRs-Fixed: 2882233
Change-Id: I5780e7f22363ee6014d39b0df9cb068b4afdd71c
2021-03-05 10:10:04 -08:00
Abhishek Singh
9b797fd035 qcacmn: Add logic to remove preauth and roam ser command
Add logic to remove preauth or roam command from serialization
depending on the state the roaming was in.

Change-Id: Ia381d040ce7e15a725eb2402896bf476d3236566
CRs-fixed: 2882994
2021-03-05 01:18:30 -08:00
Ashish Kumar Dhanotiya
ad9b0c99d0 qcacmn: Replace wlan_cm_roam_resp struct with wlan_cm_connect_resp
Structure wlan_cm_roam_resp and wlan_cm_connect_resp are identical
structures and in current code these structures are used for connect
and reassoc functionalities with different functions as these are
identical structures and only one structure can be used to reduce
the duplication of the code.

To address this code duplication issue replace wlan_cm_roam_resp
structure with wlan_cm_connect_resp.

Change-Id: I90949c25f46acd2fa78cebb70c9a04f0718b90c4
CRs-Fixed: 2875232
2021-03-04 06:37:09 -08:00
Himanshu Batra
311a257c9e qcacmn: Avoid NULL pointer dereferences
Add checks to avoid NULL pointer dereferences

Change-Id: I4b53936d6e08b5bb27c77dd9097a14c87d38f5a6
CRs-Fixed: 2887354
2021-02-26 11:50:35 -08:00
gaurank kathpalia
10469149f2 qcacmn: Optimize event_handled while handling events
Optimize event_handled while handling connection manager events.

Change-Id: I0e6604fe8757c4a812941e178dbcfe6b00d677eb
CRs-Fixed: 2885958
2021-02-25 07:36:03 -08:00
gaurank kathpalia
fffe13cbc9 qcacmn: Fix the pointer reset in cm_allocate_and_copy_ies_and_keys
In cm_allocate_and_copy_ies_and_keys instead of target's pointer
source's pointers are reset thus making the following code void

Fix this by resetting the target pointers which needs to be allocated
with new memory.

Change-Id: I4417492c43eb27833d365ec4aa644e07ed4eca51
CRs-fixed: 2884187
2021-02-24 01:51:45 -08:00
gaolez
76469c8aee qcacmn: Optimize congestion calculation logic
In current code logic, in case of channel utilization value is 0, the
congestion value treated as “not present” and give it a medium score.
This will cause a very clean channel get a medium score.
To fix the issue, need calculated congestion score from 1-100 and
not 0-100.

Change-Id: Iff030cf4a682d6e585d6f812a522cb8b6683cc44
CRs-Fixed: 2812978
2021-02-24 01:51:40 -08:00
Abhishek Singh
1c177a9a31 qcacmn: Remove #ifdef WLAN_FEATURE_INTERFACE_MGR from connection mgr
Remove #ifdef WLAN_FEATURE_INTERFACE_MGR from connection mgr, as
interface manager .h files take care of it.

Change-Id: I5b1e07beecd93c98429318372ed72fdf414712a4
CRs-fixed: 2878656
2021-02-23 05:31:13 -08:00
Amruta Kulkarni
d5cc294f49 qcacmn: Support roam invoke request in connection manager
Add support for roam invoke request in connection manager.

CRs-Fixed: 2869259
Change-Id: I618add058d39e9452530b1950cff57bfe6100448
2021-02-18 03:12:24 -08:00