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
This commit is contained in:

committed by
Madan Koyyalamudi

parent
4b079efdfe
commit
e84ac077e5
@@ -120,61 +120,6 @@ static void osif_cm_set_auth_type(struct wlan_cm_connect_req *connect_req,
|
||||
QDF_SET_PARAM(connect_req->crypto.auth_type, crypto_auth_type);
|
||||
}
|
||||
|
||||
#ifdef CFG80211_MULTI_AKM_CONNECT_SUPPORT
|
||||
static void
|
||||
osif_cm_set_akm_params(struct wlan_cm_connect_req *connect_req,
|
||||
const struct cfg80211_connect_params *req)
|
||||
{
|
||||
uint32_t i = 0;
|
||||
wlan_crypto_key_mgmt akm;
|
||||
|
||||
/* Fill AKM suites */
|
||||
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]);
|
||||
QDF_SET_PARAM(connect_req->crypto.akm_suites, akm);
|
||||
}
|
||||
} else {
|
||||
QDF_SET_PARAM(connect_req->crypto.akm_suites,
|
||||
WLAN_CRYPTO_KEY_MGMT_NONE);
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
osif_cm_get_num_akm_suites(const struct cfg80211_connect_params *req)
|
||||
{
|
||||
return req->crypto.n_connect_akm_suites;
|
||||
}
|
||||
|
||||
static uint32_t*
|
||||
osif_cm_get_akm_suites(const struct cfg80211_connect_params *req)
|
||||
{
|
||||
return (uint32_t *)req->crypto.connect_akm_suites;
|
||||
}
|
||||
#else
|
||||
static void
|
||||
osif_cm_set_akm_params(struct wlan_cm_connect_req *connect_req,
|
||||
const struct cfg80211_connect_params *req)
|
||||
{
|
||||
uint32_t i = 0;
|
||||
wlan_crypto_key_mgmt akm;
|
||||
|
||||
/* Fill AKM suites */
|
||||
if (req->crypto.n_akm_suites) {
|
||||
for (i = 0; i < req->crypto.n_akm_suites &&
|
||||
i < NL80211_MAX_NR_AKM_SUITES; i++) {
|
||||
akm = osif_nl_to_crypto_akm_type(
|
||||
req->crypto.akm_suites[i]);
|
||||
QDF_SET_PARAM(connect_req->crypto.akm_suites, akm);
|
||||
}
|
||||
} else {
|
||||
QDF_SET_PARAM(connect_req->crypto.akm_suites,
|
||||
WLAN_CRYPTO_KEY_MGMT_NONE);
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
osif_cm_get_num_akm_suites(const struct cfg80211_connect_params *req)
|
||||
{
|
||||
@@ -186,13 +131,38 @@ osif_cm_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
|
||||
static void
|
||||
osif_cm_set_akm_params(struct wlan_cm_connect_req *connect_req,
|
||||
const struct cfg80211_connect_params *req)
|
||||
{
|
||||
uint32_t i;
|
||||
wlan_crypto_key_mgmt akm;
|
||||
|
||||
/* Fill AKM suites */
|
||||
if (req->crypto.n_akm_suites) {
|
||||
for (i = 0; i < req->crypto.n_akm_suites &&
|
||||
i < MAX_AKM_SUITES; i++) {
|
||||
akm = osif_nl_to_crypto_akm_type(
|
||||
req->crypto.akm_suites[i]);
|
||||
QDF_SET_PARAM(connect_req->crypto.akm_suites, akm);
|
||||
}
|
||||
} else {
|
||||
QDF_SET_PARAM(connect_req->crypto.akm_suites,
|
||||
WLAN_CRYPTO_KEY_MGMT_NONE);
|
||||
}
|
||||
}
|
||||
|
||||
static
|
||||
QDF_STATUS osif_cm_set_crypto_params(struct wlan_cm_connect_req *connect_req,
|
||||
const struct cfg80211_connect_params *req)
|
||||
{
|
||||
uint32_t i = 0;
|
||||
uint32_t i;
|
||||
QDF_STATUS status;
|
||||
wlan_crypto_cipher_type cipher = WLAN_CRYPTO_CIPHER_NONE;
|
||||
|
||||
@@ -519,7 +489,7 @@ void osif_update_partner_vdev_info(struct wlan_objmgr_vdev *vdev,
|
||||
struct mlo_partner_info partner_info)
|
||||
{
|
||||
struct wlan_objmgr_vdev *tmp_vdev;
|
||||
uint8_t i = 0;
|
||||
uint8_t i;
|
||||
|
||||
if (!vdev)
|
||||
return;
|
||||
|
Reference in New Issue
Block a user