Merge "qcacmn: Add mgmt cipher in rsn ie"
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

commit
453a7c9510
@@ -135,10 +135,9 @@ typedef enum wlan_crypto_cap {
|
|||||||
WLAN_CRYPTO_CAP_WAPI_SMS4 = 11,
|
WLAN_CRYPTO_CAP_WAPI_SMS4 = 11,
|
||||||
WLAN_CRYPTO_CAP_WAPI_GCM4 = 12,
|
WLAN_CRYPTO_CAP_WAPI_GCM4 = 12,
|
||||||
WLAN_CRYPTO_CAP_KEY_MGMT_OFFLOAD = 13,
|
WLAN_CRYPTO_CAP_KEY_MGMT_OFFLOAD = 13,
|
||||||
WLAN_CRYPTO_CAP_PMF = 14,
|
WLAN_CRYPTO_CAP_PMF_OFFLOAD = 14,
|
||||||
WLAN_CRYPTO_CAP_PMF_OFFLOAD = 15,
|
WLAN_CRYPTO_CAP_PN_TID_BASED = 15,
|
||||||
WLAN_CRYPTO_CAP_PN_TID_BASED = 16,
|
WLAN_CRYPTO_CAP_FILS_AEAD = 16,
|
||||||
WLAN_CRYPTO_CAP_FILS_AEAD = 17,
|
|
||||||
} wlan_crypto_cap;
|
} wlan_crypto_cap;
|
||||||
|
|
||||||
typedef enum wlan_crypto_rsn_cap {
|
typedef enum wlan_crypto_rsn_cap {
|
||||||
|
@@ -334,7 +334,7 @@ static inline void wlan_crypto_put_be64(u8 *a, u64 val)
|
|||||||
HAS_MCAST_CIPHER((_param), WLAN_CRYPTO_CIPHER_WAPI_SMS4)
|
HAS_MCAST_CIPHER((_param), WLAN_CRYPTO_CIPHER_WAPI_SMS4)
|
||||||
|
|
||||||
#define RESET_MGMT_CIPHERS(_param) ((_param)->mgmtcipherset = 0)
|
#define RESET_MGMT_CIPHERS(_param) ((_param)->mgmtcipherset = 0)
|
||||||
#define SET_MGMT_CIPHER(_param, _c) ((_param)->mgmtcipherset |= (1<<(_c)))
|
#define SET_MGMT_CIPHER(_param, _c) ((_param)->mgmtcipherset = (1<<(_c)))
|
||||||
#define HAS_MGMT_CIPHER(_param, _c) ((_param)->mgmtcipherset & (1<<(_c)))
|
#define HAS_MGMT_CIPHER(_param, _c) ((_param)->mgmtcipherset & (1<<(_c)))
|
||||||
#define IS_MGMT_CIPHER(_c) ((_c == WLAN_CRYPTO_CIPHER_AES_CMAC) || \
|
#define IS_MGMT_CIPHER(_c) ((_c == WLAN_CRYPTO_CIPHER_AES_CMAC) || \
|
||||||
(_c == WLAN_CRYPTO_CIPHER_AES_CMAC_256) || \
|
(_c == WLAN_CRYPTO_CIPHER_AES_CMAC_256) || \
|
||||||
|
@@ -635,6 +635,7 @@ QDF_STATUS wlan_crypto_setkey(struct wlan_objmgr_vdev *vdev,
|
|||||||
key, macaddr, req_key->type);
|
key, macaddr, req_key->type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
wlan_crypto_set_mgmtcipher(crypto_params, req_key->type);
|
||||||
status = wlan_crypto_set_igtk_key(key);
|
status = wlan_crypto_set_igtk_key(key);
|
||||||
return status;
|
return status;
|
||||||
} else if (IS_FILS_CIPHER(req_key->type)) {
|
} else if (IS_FILS_CIPHER(req_key->type)) {
|
||||||
@@ -2392,26 +2393,23 @@ uint8_t *wlan_crypto_build_rsnie(struct wlan_objmgr_vdev *vdev,
|
|||||||
|
|
||||||
WLAN_CRYPTO_ADDSHORT(frm, crypto_params->rsn_caps);
|
WLAN_CRYPTO_ADDSHORT(frm, crypto_params->rsn_caps);
|
||||||
/* optional capabilities */
|
/* optional capabilities */
|
||||||
if (crypto_params->rsn_caps != 0 &&
|
if (crypto_params->rsn_caps & WLAN_CRYPTO_RSN_CAP_MFP_ENABLED) {
|
||||||
crypto_params->rsn_caps != WLAN_CRYPTO_RSN_CAP_PREAUTH){
|
/* PMK list */
|
||||||
|
WLAN_CRYPTO_ADDSHORT(frm, 0);
|
||||||
if (HAS_MGMT_CIPHER(crypto_params,
|
if (HAS_MGMT_CIPHER(crypto_params,
|
||||||
WLAN_CRYPTO_CIPHER_AES_CMAC)) {
|
WLAN_CRYPTO_CIPHER_AES_CMAC)) {
|
||||||
selcnt[0]++;
|
|
||||||
WLAN_CRYPTO_ADDSELECTOR(frm,
|
WLAN_CRYPTO_ADDSELECTOR(frm,
|
||||||
wlan_crypto_rsn_cipher_to_suite(
|
wlan_crypto_rsn_cipher_to_suite(
|
||||||
WLAN_CRYPTO_CIPHER_AES_CMAC));
|
WLAN_CRYPTO_CIPHER_AES_CMAC));
|
||||||
}
|
}
|
||||||
if (HAS_MGMT_CIPHER(crypto_params,
|
if (HAS_MGMT_CIPHER(crypto_params,
|
||||||
WLAN_CRYPTO_CIPHER_AES_GMAC)) {
|
WLAN_CRYPTO_CIPHER_AES_GMAC)) {
|
||||||
selcnt[0]++;
|
|
||||||
WLAN_CRYPTO_ADDSELECTOR(frm,
|
WLAN_CRYPTO_ADDSELECTOR(frm,
|
||||||
wlan_crypto_rsn_cipher_to_suite(
|
wlan_crypto_rsn_cipher_to_suite(
|
||||||
WLAN_CRYPTO_CIPHER_AES_GMAC));
|
WLAN_CRYPTO_CIPHER_AES_GMAC));
|
||||||
}
|
}
|
||||||
if (HAS_MGMT_CIPHER(crypto_params,
|
if (HAS_MGMT_CIPHER(crypto_params,
|
||||||
WLAN_CRYPTO_CIPHER_AES_CMAC_256)) {
|
WLAN_CRYPTO_CIPHER_AES_CMAC_256)) {
|
||||||
selcnt[0]++;
|
|
||||||
WLAN_CRYPTO_ADDSELECTOR(frm,
|
WLAN_CRYPTO_ADDSELECTOR(frm,
|
||||||
wlan_crypto_rsn_cipher_to_suite(
|
wlan_crypto_rsn_cipher_to_suite(
|
||||||
WLAN_CRYPTO_CIPHER_AES_CMAC_256));
|
WLAN_CRYPTO_CIPHER_AES_CMAC_256));
|
||||||
@@ -2419,7 +2417,6 @@ uint8_t *wlan_crypto_build_rsnie(struct wlan_objmgr_vdev *vdev,
|
|||||||
|
|
||||||
if (HAS_MGMT_CIPHER(crypto_params,
|
if (HAS_MGMT_CIPHER(crypto_params,
|
||||||
WLAN_CRYPTO_CIPHER_AES_GMAC_256)) {
|
WLAN_CRYPTO_CIPHER_AES_GMAC_256)) {
|
||||||
selcnt[0]++;
|
|
||||||
WLAN_CRYPTO_ADDSELECTOR(frm,
|
WLAN_CRYPTO_ADDSELECTOR(frm,
|
||||||
wlan_crypto_rsn_cipher_to_suite(
|
wlan_crypto_rsn_cipher_to_suite(
|
||||||
WLAN_CRYPTO_CIPHER_AES_GMAC_256));
|
WLAN_CRYPTO_CIPHER_AES_GMAC_256));
|
||||||
|
@@ -187,14 +187,8 @@ QDF_STATUS wlan_crypto_set_mgmtcipher(
|
|||||||
struct wlan_crypto_params *crypto_params,
|
struct wlan_crypto_params *crypto_params,
|
||||||
uint32_t value)
|
uint32_t value)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (HAS_CIPHER_CAP(crypto_params, WLAN_CRYPTO_CAP_PMF) ||
|
|
||||||
HAS_CIPHER_CAP(crypto_params, WLAN_CRYPTO_CAP_PMF_OFFLOAD)) {
|
|
||||||
SET_MGMT_CIPHER(crypto_params, value);
|
SET_MGMT_CIPHER(crypto_params, value);
|
||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
}
|
|
||||||
|
|
||||||
return QDF_STATUS_E_INVAL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user