mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 06:03:36 -04:00
qcacmn: Send the user configured MFP state in RSO command
Currently the user configured MFP state that comes from the userspace in connect request is not handled or processed. Instead the RSN caps from assoc IE of connect request is inter- sected with AP RSN caps and sent to Firmware using RSO command. This RSN caps is used in FW in selecting a roam candidate, which was causing the cross AKM (eg:SAE -> PSK) roam fail. Hence, use the user configured MFP value in sending the RSN caps to Firmware. Change-Id: I3facfcf3616667b4749109d26d924c3fb1537494 CRs-Fixed: 3606069
This commit is contained in:
parent
95eee69154
commit
f363c9105d
5 changed files with 67 additions and 1 deletions
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2017-2020 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
|
|
@ -918,6 +918,7 @@ enum wlan_status_code {
|
|||
#define WLAN_ASE_SHA256_PSK 0x100
|
||||
#define WLAN_ASE_WPS 0x200
|
||||
|
||||
#define RSN_CAP_MFP_DISABLED 0x00
|
||||
#define RSN_CAP_MFP_CAPABLE 0x80
|
||||
#define RSN_CAP_MFP_REQUIRED 0x40
|
||||
|
||||
|
|
|
|||
|
|
@ -312,6 +312,7 @@ struct wlan_crypto_pmksa {
|
|||
* @orig_ucastcipher: connection request unicast ciphers
|
||||
* @orig_mcastcipher: connection request multicast cipher
|
||||
* @orig_key_mgmt: connection request key mgmt
|
||||
* @orig_rsn_caps: connection request rsn_capability
|
||||
*
|
||||
* This structure holds crypto params for peer or vdev
|
||||
*/
|
||||
|
|
@ -327,6 +328,7 @@ struct wlan_crypto_params {
|
|||
uint32_t orig_ucastcipher;
|
||||
uint32_t orig_mcastcipher;
|
||||
uint32_t orig_key_mgmt;
|
||||
uint16_t orig_rsn_caps;
|
||||
};
|
||||
|
||||
typedef enum wlan_crypto_param_type {
|
||||
|
|
@ -341,6 +343,7 @@ typedef enum wlan_crypto_param_type {
|
|||
WLAN_CRYPTO_PARAM_ORIG_UCAST_CIPHER,
|
||||
WLAN_CRYPTO_PARAM_ORIG_MCAST_CIPHER,
|
||||
WLAN_CRYPTO_PARAM_ORIG_KEY_MGMT,
|
||||
WLAN_CRYPTO_PARAM_ORIG_RSN_CAP,
|
||||
} wlan_crypto_param_type;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -181,6 +181,9 @@ static QDF_STATUS wlan_crypto_set_param(struct wlan_crypto_params *crypto_params
|
|||
case WLAN_CRYPTO_PARAM_ORIG_KEY_MGMT:
|
||||
status = wlan_crypto_set_orig_key_mgmt(crypto_params, value);
|
||||
break;
|
||||
case WLAN_CRYPTO_PARAM_ORIG_RSN_CAP:
|
||||
status = wlan_crypto_set_orig_rsn_cap(crypto_params, value);
|
||||
break;
|
||||
default:
|
||||
status = QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
|
@ -297,6 +300,9 @@ static int32_t wlan_crypto_get_param_value(wlan_crypto_param_type param,
|
|||
case WLAN_CRYPTO_PARAM_ORIG_KEY_MGMT:
|
||||
value = wlan_crypto_get_orig_key_mgmt(crypto_params);
|
||||
break;
|
||||
case WLAN_CRYPTO_PARAM_ORIG_RSN_CAP:
|
||||
value = wlan_crypto_get_orig_rsn_cap(crypto_params);
|
||||
break;
|
||||
default:
|
||||
value = -1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -404,3 +404,36 @@ int32_t wlan_crypto_get_orig_key_mgmt(struct wlan_crypto_params *crypto_params)
|
|||
{
|
||||
return crypto_params->orig_key_mgmt;
|
||||
}
|
||||
|
||||
/**
|
||||
* wlan_crypto_set_orig_rsn_cap - called by ucfg to configure connection
|
||||
* request RSN capabilities in vdev
|
||||
* @crypto_params: pointer to crypto params structure
|
||||
* @value: bitmap value of all supported RSN capabilities
|
||||
*
|
||||
* This function gets called from ucfg to configure RSN caps in vdev
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS - in case of success
|
||||
*/
|
||||
QDF_STATUS
|
||||
wlan_crypto_set_orig_rsn_cap(struct wlan_crypto_params *crypto_params,
|
||||
uint32_t value)
|
||||
{
|
||||
crypto_params->orig_rsn_caps = value;
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* wlan_crypto_get_orig_rsn_cap - called by ucfg to get connection request
|
||||
* RSN capabilities from vdev
|
||||
* @crypto_params: pointer to crypto params structure
|
||||
*
|
||||
* This function gets called from ucfg to get supported RSN capabilities
|
||||
*
|
||||
* Return: bitmap value of all supported RSN caps
|
||||
*/
|
||||
int32_t wlan_crypto_get_orig_rsn_cap(struct wlan_crypto_params *crypto_params)
|
||||
{
|
||||
return crypto_params->orig_rsn_caps;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -256,4 +256,27 @@ wlan_crypto_set_orig_key_mgmt(struct wlan_crypto_params *crypto_params,
|
|||
* Return: bitmap value of all supported AKMs
|
||||
*/
|
||||
int32_t wlan_crypto_get_orig_key_mgmt(struct wlan_crypto_params *crypto_params);
|
||||
|
||||
/**
|
||||
* wlan_crypto_set_orig_rsn_cap - called by ucfg to configure
|
||||
* RSN cap in vdev
|
||||
* @crypto_params: pointer to crypto params
|
||||
* @value: bitmap value of all supported RSN cap
|
||||
*
|
||||
* This function gets called from ucfg to configure RSN cap in vdev
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS - in case of success
|
||||
*/
|
||||
QDF_STATUS wlan_crypto_set_orig_rsn_cap(struct wlan_crypto_params *crypto_params,
|
||||
uint32_t value);
|
||||
|
||||
/**
|
||||
* wlan_crypto_get_orig_rsn_cap - called by ucfg to get RSN cap from vdev
|
||||
* @crypto_params: pointer to crypto params
|
||||
*
|
||||
* This function gets called from ucfg to get supported RSN cap
|
||||
*
|
||||
* Return: bitmap value of all supported RSN cap
|
||||
*/
|
||||
int32_t wlan_crypto_get_orig_rsn_cap(struct wlan_crypto_params *crypto_params);
|
||||
#endif /* __WLAN_CRYPTO_PARAM_HANDLING_I_H_ */
|
||||
|
|
|
|||
Loading…
Reference in a new issue