Commit Graph

61 Commits

Author SHA1 Message Date
Bapiraju Alla
b88a049cb7 qcacmn: Don't unlink the BSS for ML VDEV connect failure
Currently driver is doing unlink BSS when there is a connect failure.
This will cause an issue, for 2G+5G ML connection.
  1) Connect on 5G link failed due to Auth failure
  2) Connect on next candidate (2G) is success and FW is in SMM
  3) Partner link(5G) connect will fail due to 5G scan entry won't
     be found in SMM mode.

To avoid this, don't unlink the BSS for ML VDEV connect failure.

Change-Id: Icaa8c736d9038c971b5c3d459fd4af5a833bdc80
CRs-Fixed: 3129726
2022-03-02 04:19:22 -08:00
Bapiraju Alla
6bb2ad7c5b qcacmn: Get partner vdev using vdev ID instead of link ID
While notifying the ML connection status to the supplicant, partner vdev
information will be filled in the connect response. This partner vdev info
is populated using partner link IDs. This may cause issues since it is
not guaranteed that link id information in the partner vdev is valid while
notifying the connection status to the supplicant.

To address this, get partner vdev information using vdev ID instead of
link ID.

Change-Id: I5e45b038b1fe5b6ab9c6bbb514eefb0ad4c39e66
CRs-Fixed: 3117702
2022-02-23 11:10:35 -08:00
Himanshu Batra
66883847fb qcacmn: Ignore ML IE if vdev is created without MLD context
Ignore ML IE if vdev is created without MLD context

Change-Id: I7992bbbc92e177ab84c44751844fa8a9a8a986dc
2022-02-02 00:47:32 -08:00
Bapiraju Alla
76caeb9b44 qcacmn: Use target if component for VDEV manager response path
Currently, VDEV manager responses are using legacy path instead of
target_if, vdev_mgr and os_if components. As the driver implementation
is planned for converged model, legacy implementation will be moved to
the respective components.

To avoid rework, Use target_if, vdev_mgr and os_if components to process
the FW responses corresponding to the vdev manager.

Change-Id: I778f6de93481fc730383e8f8e1c604f173947d69
CRs-Fixed: 3093776
2021-12-23 00:54:35 -08:00
Himanshu Batra
f9b5d6b536 qcacmn: Get ML Info from connect req
Get ML Info from connect req

Change-Id: I90c200aff32d88dd934aaa11893f58a37448ffb9
2021-12-01 01:40:27 -08:00
Abhishek Singh
3915bd37fb qcacmn: Drop disconnect req in INIT state
In case the vdev is already disconnected, the indication to
the upper layer, would have been sent as part of previous
disconnect/connect failure.

If the upper layer is in process of connecting, sending
the disconnect indication back again may cause it to incorrectly
think it as connect failure. So sending a disconnect indication
again is not advisable.

So if a new disconnect is received in INIT state, drop the
disconnect and return failure.

Also remove osif_cm_reset_id_and_src() from osif disconnect
to avoid race between disconnect complete of old disconnect
and new disconnect request. With osif_cm_reset_id_and_src()
old disconnect might also get dropped in osif and with this
fix new disconnect will also get dropped, so make sure that
last/old disconnect indication is sent to upper layer.

Change-Id: Icf7352d8904473329edff9ec124c6197f214f88b
CRs-Fixed: 3074093
2021-11-19 02:03:55 -08:00
Himanshu Batra
b21d96305e qcacmn: Modify MLO disconnect handling
Modify MLO disconnect handling to issue disconnect on all links in
parallel
Also modify connect resp to accommodate ml info in connect resp

Change-Id: I57575c6ce7c8ebff7770f862dc81e7dfd20aa42d
2021-11-11 00:37:03 -08:00
Bapiraju Alla
055acf7a87 qcacmn: Notify partner links info in connect response to the supplicant
Fill ML partners info in connect response structure of the connect
notification to the supplicant.

Change-Id: I3b972254138d0f00ef63f2b4d336d142e6d5e2ae
CRs-Fixed: 3036325
2021-11-03 11:31:38 -07:00
Himanshu Batra
4aa4060acf qcacmn: Update assoc resp ie len and ptr in connect response
Update assoc resp ie len and ptr in connect response

Change-Id: I31f175da43fe1548aa9621320339bd242c8d67d1
2021-09-23 21:35:14 -07:00
Sai Rupesh Chevuru
8efe41f904 qcacmn: Call cfg80211 functions with context aware allocation flags
There are instances in the code where the response is sent from the
driver to the kernel indicating the allocation flags which is
used by the kernel to allocate memory
In those situations, we should pass the allocation flags based on
the context in which the response is sent.
Send the response with the right allocation flags to the kernel.

Change-Id: I39ade12bd3603acf622a9ca49b4d1d0b79da4585
CRs-Fixed: 3037225
2021-09-17 13:48:14 -07:00
Vivek
0d98962c76 qcacmn: Validate assoc request/response IE
Validate assoc request and response IE pointer
and length before sending the connect response
to the cfg80211 layer, else if there is a mismatch
between assoc request and response IE and length,
it would result in a panic.

CRs-Fixed: 3029994
Change-Id: I6bb285719c9749cb8c42306a95c392a01555d67f
2021-09-17 05:54:12 -07:00
Vivek
f8167f4dbc qcacmn: Call cfg80211 functions with context aware allocation flags
There are instances in the code where the response is sent from the
driver to the supplicant indicating the allocation flags which is
used by the supplicant to allocate memory.

In those situations, we should pass the allocation flags based on
the context in which the response is sent.

Send the response with the right allocation flags to the supplicant.

Change-Id: I85f1c29fc66ba51a9f9c645692712c3a25b7fed1
CRs-Fixed: 2987552
2021-07-26 13:54:14 -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
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
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
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
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
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
d269165345 qcacmn: Set value for locally_generated flag for disconnect response
Set value for locally_generated flag for disconnect response based on
disconnect req source

Change-Id: I4f693be98ca10a5f883f1a9349ed50876679e723
CRs-Fixed: 2880520
2021-03-01 22:50:10 -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
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
Ashish Kumar Dhanotiya
e6a652dcc7 qcacmn: Fix connect status and allow connect with null assoc IE
Currently driver rejects connect request if assoc ie length
is 0 or assoc ie is NULL which results in connect failure.

To avoid above issue do not reject connect request if
assoc ie is NULL. Also fix the connect status to send the
proper status code instead of WLAN_STATUS_UNSPECIFIED_FAILURE.

Change-Id: Icb775a88780350fa589ae8db65abdd79980558c6
CRs-Fixed: 2869967
2021-02-08 02:06:43 -08:00
Abhishek Singh
f49b0e6e4d qcacmn: Fix compilating issue in printing fils info
Fix compilating issue in printing fils info.

Change-Id: Ibeca5324df91d1444f387c658f7e84c1fa4dbd81
CRs-Fixed: 2866766
2021-02-01 23:00:25 -08:00
Abhishek Ambure
35135ea9a1 qcacmn: Fix the FILS params set
Host updates proper FILS param set i.e. username, auth_type and
is_fils_connection in the FILS response.

Change-Id: I0c30325bc7d620aa286aae0dd299dec9b26219ff
CRs-Fixed: 2865060
2021-01-29 08:17:50 -08:00
Abhishek Singh
fb8d6c3859 qcacmn: Fix unlink bss is success case
In connection success case the unlink BSS is not required, so
add the status check.

Change-Id: If5e2d02b37865267a096f01f0835bdccbc8e1c3d
CRs-Fixed: 2860102
2021-01-22 20:52:19 -08:00
Abhishek Singh
47108a8af2 qcacmn: Fix mcast cipher for WEP
Fix the param pass to get mcast cipher for WEP.

Change-Id: I25c24d86ffae7d0e4e03d1bf7a9457321a5de9d1
CRs-Fixed: 2859770
2021-01-22 12:07:37 -08:00
gaurank kathpalia
bd8eeecda6 qcacmn: Add missing params for the fils connection
Add missing params for the fils connection.

Change-Id: I7442670c30d7ddee201c2bc328372513302f971d
CRs-Fixed: 2857905
2021-01-21 17:04:45 -08:00
Santosh Anbu
6cc0d45bfd qcacmn: Fix connect resp struct params
Fix connect resp params.
-- Fix length of the assoc req and assoc resp
-- Remove unused params from connect resp

Change-Id: I992b1bf1037bb4a09ecd37501420168c29de8187
CRs-Fixed: 2857372
2021-01-21 03:43:40 -08:00
Himanshu Batra
6e59547918 Revert "qcacmn: Fix connect resp struct params"
Revert "qcacmn: Fix connect resp struct params"

Change-Id: Ib2149f33c9faddd4194644033b61144a3043d21c
2021-01-18 23:52:12 -08:00
gaurank kathpalia
6dc7ecfcb8 qcacmn: Fix assignment of vdev in cm_ctx and few prints
Fix the assignment of vdev in cm_ctx and fix few prints.

Change-Id: I5d76ab2ca39a1a84b3987fd9cb566c2f08ecc399
CRs-Fixed: 2856499
2021-01-18 03:27:18 -08:00
gaurank kathpalia
9b7a248d36 qcacmn: Fix connect resp struct params
Fix connect resp params.
-- Fix length of the assoc req and assoc resp
-- Remove unused params from connect resp

Change-Id: I9ae7f4f155e16cd45dad2c99cc471773c9f12b84
CRs-Fixed: 2852445
2021-01-15 01:58:51 -08:00
Santosh Anbu
45a300ce7b qcacmn: Support roaming request to connection manager
Add change to support roaming request to connection manager.

Change-Id: I7f580e042522a245fc6a263d0e8f8b32b2f693f7
CRs-Fixed: 2845076
2021-01-11 01:52:47 -08:00
Abhishek Ambure
4fb0c8fccb qcacmn: Add support to save gtk and set hlp data
Host add support to save gtk and set hlp data from fils ie of connect
response.

Change-Id: I5e6b9882359697f09a0935a9c07f3427dbe04cc2
CRs-Fixed: 2849123
2021-01-07 23:29:05 -08:00
Santosh Anbu
d36905a34a qcacmn: Add null check for connect request bssid
Add null check for connect request bssid before copying the previous
bssid.

Change-Id: I5b674d99923335673cbcc3ddcbbbc4a6940bad47
CRs-Fixed: 2845808
2020-12-28 23:00:47 -08:00
Himanshu Batra
6df2698a64 qcacmn: Notify kernel if connect fails after cfg change
Notify kernel if connect fails after cfg change

Change-Id: I7cdf9adf5452204411566bd7ac52d67dcbe35481
2020-12-28 13:06:58 -08:00
Liangwei Dong
d4b3e3d043 qcacmn: Don't unlink connected bssid
In dual station case, wlan0 is connected to AP, wlan1
connects to the same ap and will get failed because two
interfaces can not connect to same band (same ap).
At present wlan1 will do unlink bss of ap after connect fail.
This may corrupt the bss tree in kernel because the bss is
still pointed by wlan0’s wdev -> current_bss.
Fix by avoid the unlink bss if the bss is still connected
in any interfaces.

Change-Id: I27c76eca2d4f130addabbdc2600f6959d24c8511
CRs-Fixed: 2837496
2020-12-16 09:55:49 -08:00
Abhishek Singh
1853c161d2 qcacmn: Add logic to ignore 6Ghz AP if security is not valid
Add logic to
- Check if connect req freq is 6Ghz and security
  is not allowed for 6Ghz, reject connect.
- Ignore 6Ghz APs if connect req security is invalid
  for 6Ghz

Also added user config key_mgmt_mask_6ghz mask
to allow specific AKMs, by default all are allowed.

Add added user config check_6Ghz_security to enable
security checks as per spec.

Change-Id: I37518731faa4de67a49853e5ac544efa3b3ce1d6
CRs-Fixed: 2813013
2020-11-12 03:28:37 -08:00
Himanshu Batra
50324c2260 qcacmn: Resolve compilation issues for CM
Resolve compilation issues for CM.

Change-Id: I3dc32cb327032ce59786e0d9ab922a8914e13ec3
CRs-Fixed: 2816317
2020-11-11 10:23:51 -08:00
Ashish Kumar Dhanotiya
3faf318e8c qcacmn: Add a check for vdev with bssid mac
There is a possibility that driver already has a vdev
with the mac address same as bssid, in this case sta
should not connect to this AP as it may lead to undefined
behavior.

To address above issue add a check to compare bssid with
already existing vdevs before connect start.

Along with above changes add few renaming changes also.

Change-Id: Ia12be0b392a01bf935b5261e505290064de68805
CRs-Fixed: 2809147
2020-11-04 17:02:00 -08:00
gaurank kathpalia
b8b58d8d12 qcacmn: Move disconnect wait logic from osif to connection mgr
Move disconnect wait logic from osif to connection mgr, so that
MLO/IF manager can use the wait logic for disconnect
during vdev delete.

Change-Id: Ied2bbcfd6a532209f8008499424f94acc41efc0e
CRs-Fixed: 2800990
2020-10-29 17:51:00 -07:00
Abhishek Ambure
58c169c64c qcacmn: Add proprietary status codes for disconnection
Host adds internal status code in enum wlan_status_code.

Change-Id: I17cdcee9f0df1e34cc13425a4f06985a418d5a8a
CRs-Fixed: 2799197
2020-10-28 15:33:28 -07:00
Abhishek Singh
7fd4d073bc qcacmn: Unlink BSS on connect timeout and peer/southbound disconnect
Unlink BSS on connect timeouts like AUTH/JOIN/ASSOC timeout and
in case of no candidate found. This is to avoid reconnect without
a scan.

Also remove entry if diconnect from peer or south bound disconnect
due to heartbeat failure, sta kickout etc.

Change-Id: Ie78c7e764e8c009a5d19ed5dda9c6b9bbf75196f
CRs-Fixed: 2798188
2020-10-23 10:03:21 -07:00
Ashish Kumar Dhanotiya
88efb959a6 qcacmn: Initialize osif and legacy callbacks for connection manager
Initialize osif callbacks to connection manager and add
legacy callbacks to osif and initialize these legacy callbacks
for connection manager.

Change-Id: Ic3e8bd6f55b6cdbbc8cdd5c9c3a6631e8d3bd83e
CRs-Fixed: 2797472
2020-10-21 07:20:51 -07:00
Abhishek Singh
2e046c6e96 qcacmn: Add params in connect req to pass non converged params
Add connect params in osif connect request to pass scan IE and other
params from legacy to be used in connect request.

Change-Id: I83721023362ff2405727316f090671468200b362
CRs-Fixed: 2793280
2020-10-14 01:17:12 -07:00
Ashish Kumar Dhanotiya
5da344f9b7 qcacmn: Resolve compilation issues in connection manager
Address compilation errors in connection manager.

Change-Id: I0ba9d93b64bbfe2ca4fd29e3726e1f22d70f8b54
CRs-Fixed: 2793583
2020-10-12 12:46:45 -07:00
Abhishek Singh
9d01a66a5e qcacmn: Add disconnect sync API to wait for disconnect to complete
Add sync API for disconnect to wait for disconnect to complete.
This can be used during vdev delete sequence to move the vdev and
connection manager SM to init state before VDEV is marked logically
deleted.

Change-Id: Id562e444cf1995d800b8268f906f811f143d0fc9
CRs-Fixed: 2790885
2020-10-07 12:48:56 -07:00
Ashish Kumar Dhanotiya
6bac5aefe2 qcacmn: Resolve compilation errors
Change Ic166c112189ef79a84f61d16e7e04a6334c61178 renames
few files for osif in connection manager, but does not
take care of the compilation issue after rename of the files.

Add a change to take care of the compilation errors in
connection manager module.

Change-Id: Icecb3f7aa625a65b835c15890fc019917e2b9446
CRs-Fixed: 2786828
2020-10-01 21:20:53 -07:00
Ashish Kumar Dhanotiya
7232e077f7 qcacmn: Update crypto params based on IEs for connect request
Currently connection manager does not update crypto params
of connect request based on RSN/WPA/WAPI IEs.

Add logic to update the connect params based on IEs.

Change-Id: I74aba3c061ed5fc203be7270dcc244f14718c781
CRs-Fixed: 2777574
2020-09-24 00:13:41 -07:00
Ashish Kumar Dhanotiya
05d0f49abd qcacmn: Rename osif files and functions for connection manager
The naming of the osif files and functions is not correct as
these files and functions include wlan_cfg80211 as prefix
instead of osif.
Correct file name and function name should contain the component
name first, followed by feature name followed by method.

Change-Id: Ic166c112189ef79a84f61d16e7e04a6334c61178
CRs-Fixed: 2780298
2020-09-21 12:22:43 -07:00
Abhishek Singh
e1fb6b17d4 qcacmn: Add reason code enum and prints in connect and disconnect
Add reason code enum and prints in connect and disconnect handlers,
also take care of the vendor reason code during disconnect resp.

Change-Id: I1298e0739bd08d7d43fcb3839a07459819207196
CRs-Fixed: 2778233
2020-09-20 21:53:39 -07:00