Commit Graph

83 Commits

Author SHA1 Message Date
Himanshu Batra
80db72a890 qcacmn: Add changes to support link_id param in cfg80211_disconnected
As part of MLO dynamic link deletion handling, cfg80211_disconnected is
taking link_id as an argument.
Add changes to support link_id param in cfg80211_disconnected.

Change-Id: Ia312b5e5768ba9abb11675839e912d4819a2fa86
CRs-Fixed: 3315102
2022-11-19 20:11:05 -08:00
David Oladunjoye
25cb050e32 qcacmn: Add lock to Set/clear WLAN_VDEV_FEXT2_MLO_STA_LINK flag
Currently, this MLO flag is being set/clear without regard for
concurrency. We need to lock the vdev when updating these values to
prevent race condition.

Change-Id: Ied90d62f10f6f12a35eeac3060dd0fae7d0c6cfd
CRs-Fixed: 3305558
2022-10-21 21:31:17 -07:00
Yu Wang
093c816d05 qcacmn: print SSID with QDF_SSID_FMT and QDF_SSID_REF
To protect user privacy, print SSID with QDF_SSID_FMT
and QDF_SSID_REF, then SSID will be hide in logs if
anonymization is enabled.

Change-Id: Ifad0ccd76bd1184a9b1d20f3d7fa4455df924843
CRs-Fixed: 3291826
2022-10-18 11:57:53 -07:00
Amruta Kulkarni
319456fee7 qcacmn: Add callback api to send stored keys
For STA MLO connection, the AP can send M1 right after assoc
response on assoc link, which will trigger sending keys to FW
for mlo links, but it can happen that wmi_peer_assoc is not
sent for mlo link until this time.
Current code does not have handling for this case.

To solve this, store the link vdev keys and send them once
link vdev is connected.

Change-Id: I882da96280711ca9cfa4d6ba852fda4a8b6d7a77
CRs-Fixed: 3293692
2022-10-12 23:22:44 -07:00
Jeff Johnson
8aa059674f qcacmn: os_if: Fix misspellings
Fix misspellings in os_if/...

Change-Id: I15604af98007e6ed4a7bc91abc9c07dfed1276fc
CRs-Fixed: 3304690
2022-10-11 14:23:11 -07:00
Amruta Kulkarni
f1da02acc9 qcacmn: Release vdev reference to avoid leak
Currently vdev reference is not released in api
osif_send_roam_auth_mlo_links_events().

To solve this release vdev reference to avoid leak.

Change-Id: Idc766925f5cd71cbdd577ee7b67abffc35130dd9
CRs-Fixed: 3305547
2022-10-06 16:53:03 -07:00
Amruta Kulkarni
c3051031c5 qcacmn: Send roam auth mlo links event
After mlo roaming is complete send roam auth mlo links
event to kernel.
Also populate cfg roam info structure with mlo link info.

Change-Id: I8710e3a53f05c50b7b276d87a39411cb43d0983f
CRs-Fixed: 3279967
2022-09-27 16:23:16 -07:00
Jianmin Zhu
fb43cc12b8 qcacmn: Fix scan with random address failed since wdev is connected
Reproduce steps:
1.	Connect from OSIF success, wdev->connected = true;
2.	Disconnect from target if and reassoc from OSIF happens back to
	back.
3.	Disconnect event is not sent to kernel, wdev->connected keeps
	true, isn't cleared.
4.	Connect from OSIF failed too, wdev->connected keeps true,  isn't
	cleared.
5.	Scan with random address failed since wdev->connected is true.

To fix it, if connect req was a reassoc req and received in not connected
state for race between disconnect from target if and reassoc connect from
OSIF, set reassoc_in_non_connected to send disconnect instead of
connect rsp to kernel to cleanup kernel flags like: wdev->connected.

change-Id: Ibbe38da14e9339b49589216250453b76c7387b57
CRs-Fixed: 3290496
2022-09-22 02:21:43 -07:00
Mohammed Ahmed
fa6e07082f qcacmn: add psoc null pointer check to wlan_objmgr_get_peer_by_mac
Current code directly passes the result of wlan_vdev_get_psoc(vdev) to
wlan_objmgr_get_peer_by_mac, without null pointer checking, which can
result in null pointer dereferencing.
To fix this issue, add checking of the psoc pointer before passing,
and add verification inside wlan_objmgr_get_peer_by_mac.

Change-Id: Iaf0e2535c3a584db788ddc621745c66c296fe08f
CRs-Fixed: 3277651
2022-08-29 22:19:33 -07:00
Jianmin Zhu
640ab03114 qcacmn: Don't treat assoc req as reassoc req
Add a flag to indicate assoc req is used for this roaming,
don't treat assoc req as reassoc req.

Change-Id: I58f357b5581ca71e97841f1d7e0f3daad5d60970
CRs-Fixed: 3273877
2022-08-27 12:09:14 -07:00
Deeksha Gupta
fc9e906e6d qcacmn: Add osif api to get assoc link net device
As per single netdev design, after roaming is completed on link
vdev retrieve assoc link net device and use that for roamed indication
Add osif callback api to hdd to get assoc link net device

Change-Id: I9c8fcd4b095580548b8251818d0f6823df7a52aa
CRs-Fixed: 3274570
2022-08-26 14:21:12 -07:00
Rohan Dutta
1f9ff41325 qcacmn: set partner link op-class
Update partner link op-class in station mode

Change-Id: I8d6908253e78adebabab724e7fd89737906367d2
CRs-Fixed: 3206442
2022-08-04 03:55:35 -07:00
Arun Kumar Khandavalli
1630cd3afe qcacmn: Indicate the connect response through new kernel model
Add changes to indicate the connect response for the ml association.

Change-Id: Id59b00992356c9e66a7442e5351bf9372f055f8f
CRs-Fixed: 3241844
2022-08-02 01:15:00 -07:00
Aravind Kishore Sukla
d7c3414ca0 qcacmn: Add back port flag for multi AKM connect support
Add logic to set back port flag based on Linux kernel version
for multi AKM connect support.

Change-Id: Ia2365afc678edf025f63d4d3c0fc963c97193eb8
CRs-Fixed: 3246135
2022-07-27 07:22:47 -07:00
Deeksha Gupta
b75f0b1100 qcacmn: Fill mlo connect resp parameter if connection is successful
In connect resp, while sending the connect resp indication to supplicant
fill mlo parameters only if connect resp status is successful

Change-Id: Ifa1baf34deaffff68e98b81bd20a4939aaec170f
CRs-Fixed: 3250884
2022-07-25 08:22:04 -07:00
Arun Kumar Khandavalli
db02916cc1 qcacmn: Add new cfg80211 wrapper api's Multi link operation
Add new cfg80211 wrapper api's to support single link multi wdev
operation.

Change-Id: Idf245df7a96a85afe5ff1aac5829423d0bee5b85
CRs-Fixed: 3235154
2022-07-05 09:01:26 -07:00
abhinav kumar
edd1669c23 qcacmn: Handle vendor control command and event
WMI_ROAM_GET_VENDOR_CONTROL_PARAM_CMDID: Add support
for a new roam command to get vendor control parameters
from FW. Host needs to send proper param ID in command
(from enum WMI_ROAM_GET_VENDOR_CONTROL_PARAM_ID)
to get corresponding INI value from FW.

WMI_ROAM_GET_VENDOR_CONTROL_PARAM_EVENTID:
Add support for a new roam event to get param value
from FW. FW sends this event upon receiving
WMI_ROAM_GET_VENDOR_CONTROL_PARAM_CMDID command.

Change-Id: Ic7b3badb14daff183dd36927b4dae6bbc036e6cd
CRs-Fixed: 3225166
2022-06-25 01:08:55 -07:00
Aravind Kishore Sukla
e84ac077e5 qcacmn: Update connect request crypto parameters
Update the connect request crypto parameters based
on the new kernel changes to increase the size of the
akm_suites array in connect request

Change-Id: I6e9cecdb6fa02da5f2b2e238780d3f0fb389c8a2
CRs-Fixed: 3214567
2022-06-24 03:55:06 -07:00
Edayilliam Jayadev
40dacfa471 qcacmn: Count MLO vdevs in a pdev
Count the MLO vdevs in a pdev. WLAN_VDEV_FEXT2_MLO feature
flag in vdev object is set for all MLO vdevs. Simple solution is
to increment/decrement the count on every set/clear of
WLAN_VDEV_FEXT2_MLO feature flag. Since this feature flag will be
set/clear at multiple places for a given vdev, this approach
will lead to wrong MLO vdev count. To fix this we need to
increment/decrement the count on first set/first clear of
WLAN_VDEV_FEXT2_MLO flag. Add a lock also to prevent the race
conditions.

CRs-Fixed: 3106235
Change-Id: Ice7edde04553088fbb7c9b769508d441ccd6e4bf
2022-05-11 05:53:18 -07:00
Deeksha Gupta
aaee26bbb5 qcacmn: Rename bss to bssid in struct cfg80211_mlo_link_params
Rename bss to bssid in struct cfg80211_mlo_link_params

Change-Id: I6353f6879c7e531f4447906553044291a9caf799
CRs-Fixed: 3179562
2022-04-25 01:48:24 -07:00
Himanshu Batra
022ae0bb7f qcacmn: Avoid connect req for a 3 link MLD AP
Avoid connect req for a 3 link MLD AP

Change-Id: I7c2a1166f1d67b272f07bf62761cf850d9c2ee51
CRs-Fixed: 3165708
2022-04-08 07:20:27 -07:00
Surya Prakash Sivaraj
2fa9e5cab5 qcacmn: Add support for max 5 number of AKMs in connect req
Currently, host supports max 2 number of AKMs in connect req.

Add support for max 5 number of AKMs in connect req from
userspace.

Change-Id: I889124257c374092128e92f0f1eca1e1d0711f49
CRs-Fixed: 3151412
2022-03-29 14:12:07 -07:00
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