mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 06:09:23 -04:00
Merge "qcacld-3.0: Update connect request crypto parameters" into wlan-cld3.driver.lnx.2.0.8.r3-rel
This commit is contained in:
commit
e89735c2c2
1 changed files with 17 additions and 69 deletions
|
|
@ -20513,7 +20513,23 @@ static bool wlan_hdd_is_akm_suite_fils(uint32_t key_mgmt)
|
|||
}
|
||||
}
|
||||
|
||||
static int
|
||||
hdd_get_num_akm_suites(const struct cfg80211_connect_params *req)
|
||||
{
|
||||
return req->crypto.n_akm_suites;
|
||||
}
|
||||
|
||||
static uint32_t*
|
||||
hdd_get_akm_suites(const struct cfg80211_connect_params *req)
|
||||
{
|
||||
return (uint32_t *)req->crypto.akm_suites;
|
||||
}
|
||||
|
||||
#ifdef CFG80211_MULTI_AKM_CONNECT_SUPPORT
|
||||
#define MAX_AKM_SUITES WLAN_CM_MAX_CONNECT_AKMS
|
||||
#else
|
||||
#define MAX_AKM_SUITES NL80211_MAX_NR_AKM_SUITES
|
||||
#endif
|
||||
/**
|
||||
* hdd_populate_crypto_akm_type() - populate akm type for crypto
|
||||
* @vdev: pointed to vdev obmgr
|
||||
|
|
@ -20533,64 +20549,9 @@ hdd_populate_crypto_akm_type(struct wlan_objmgr_vdev *vdev,
|
|||
uint32_t set_val = 0;
|
||||
wlan_crypto_key_mgmt akm;
|
||||
|
||||
if (req->crypto.n_connect_akm_suites) {
|
||||
for (i = 0; i < req->crypto.n_connect_akm_suites &&
|
||||
i < WLAN_CM_MAX_CONNECT_AKMS; i++) {
|
||||
akm = osif_nl_to_crypto_akm_type(
|
||||
req->crypto.connect_akm_suites[i]);
|
||||
|
||||
HDD_SET_BIT(set_val, akm);
|
||||
}
|
||||
|
||||
status = wlan_crypto_set_vdev_param(vdev,
|
||||
WLAN_CRYPTO_PARAM_KEY_MGMT,
|
||||
set_val);
|
||||
if (QDF_IS_STATUS_ERROR(status))
|
||||
hdd_err("Failed to set akm type %0x to crypto",
|
||||
set_val);
|
||||
|
||||
status = wlan_crypto_set_vdev_param(
|
||||
vdev, WLAN_CRYPTO_PARAM_ORIG_KEY_MGMT, set_val);
|
||||
if (QDF_IS_STATUS_ERROR(status))
|
||||
hdd_err("Failed to set original akm type %0x to crypto",
|
||||
set_val);
|
||||
} else {
|
||||
set_val = 0;
|
||||
/* Reset to none */
|
||||
HDD_SET_BIT(set_val, WLAN_CRYPTO_KEY_MGMT_NONE);
|
||||
wlan_crypto_set_vdev_param(vdev,
|
||||
WLAN_CRYPTO_PARAM_KEY_MGMT,
|
||||
set_val);
|
||||
wlan_crypto_set_vdev_param(vdev,
|
||||
WLAN_CRYPTO_PARAM_ORIG_KEY_MGMT,
|
||||
set_val);
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
hdd_get_num_akm_suites(const struct cfg80211_connect_params *req)
|
||||
{
|
||||
return req->crypto.n_connect_akm_suites;
|
||||
}
|
||||
|
||||
static uint32_t*
|
||||
hdd_get_akm_suites(const struct cfg80211_connect_params *req)
|
||||
{
|
||||
return (uint32_t *)req->crypto.connect_akm_suites;
|
||||
}
|
||||
#else
|
||||
static void
|
||||
hdd_populate_crypto_akm_type(struct wlan_objmgr_vdev *vdev,
|
||||
const struct cfg80211_connect_params *req)
|
||||
{
|
||||
QDF_STATUS status;
|
||||
uint32_t i = 0;
|
||||
uint32_t set_val = 0;
|
||||
wlan_crypto_key_mgmt akm;
|
||||
|
||||
if (req->crypto.n_akm_suites) {
|
||||
for (i = 0; i < req->crypto.n_akm_suites &&
|
||||
i < NL80211_MAX_NR_AKM_SUITES; i++) {
|
||||
i < MAX_AKM_SUITES; i++) {
|
||||
akm = osif_nl_to_crypto_akm_type(
|
||||
req->crypto.akm_suites[i]);
|
||||
|
||||
|
|
@ -20623,19 +20584,6 @@ hdd_populate_crypto_akm_type(struct wlan_objmgr_vdev *vdev,
|
|||
}
|
||||
}
|
||||
|
||||
static int
|
||||
hdd_get_num_akm_suites(const struct cfg80211_connect_params *req)
|
||||
{
|
||||
return req->crypto.n_akm_suites;
|
||||
}
|
||||
|
||||
static uint32_t*
|
||||
hdd_get_akm_suites(const struct cfg80211_connect_params *req)
|
||||
{
|
||||
return (uint32_t *)req->crypto.akm_suites;
|
||||
}
|
||||
#endif
|
||||
|
||||
static bool wlan_hdd_is_conn_type_fils(struct cfg80211_connect_params *req)
|
||||
{
|
||||
enum nl80211_auth_type auth_type = req->auth_type;
|
||||
|
|
|
|||
Loading…
Reference in a new issue