3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-21 22:09:23 +01:00

ie: Rename _BIP to _BIP_CMAC

This commit is contained in:
Denis Kenzior 2022-10-19 16:26:46 -05:00
parent 201b85e8da
commit 94ecdc799a
4 changed files with 17 additions and 15 deletions

View File

@ -428,7 +428,7 @@ uint32_t ie_rsn_cipher_suite_to_cipher(enum ie_rsn_cipher_suite suite)
return CRYPTO_CIPHER_WEP40;
case IE_RSN_CIPHER_SUITE_WEP104:
return CRYPTO_CIPHER_WEP104;
case IE_RSN_CIPHER_SUITE_BIP:
case IE_RSN_CIPHER_SUITE_BIP_CMAC:
return CRYPTO_CIPHER_BIP_CMAC;
default:
return 0;
@ -462,7 +462,7 @@ static bool ie_parse_cipher_suite(const uint8_t *data,
*out = IE_RSN_CIPHER_SUITE_WEP104;
return true;
case 6:
*out = IE_RSN_CIPHER_SUITE_BIP;
*out = IE_RSN_CIPHER_SUITE_BIP_CMAC;
return true;
case 7:
*out = IE_RSN_CIPHER_SUITE_NO_GROUP_TRAFFIC;
@ -625,7 +625,7 @@ static bool ie_parse_group_management_cipher(const uint8_t *data,
return r;
switch (tmp) {
case IE_RSN_CIPHER_SUITE_BIP:
case IE_RSN_CIPHER_SUITE_BIP_CMAC:
case IE_RSN_CIPHER_SUITE_NO_GROUP_TRAFFIC:
break;
default:
@ -746,7 +746,8 @@ static int parse_ciphers(const uint8_t *data, size_t len,
* management frame protection enabled
*/
if (out_info->mfpc)
out_info->group_management_cipher = IE_RSN_CIPHER_SUITE_BIP;
out_info->group_management_cipher =
IE_RSN_CIPHER_SUITE_BIP_CMAC;
RSNE_ADVANCE(data, len, 2);
@ -905,7 +906,7 @@ static bool ie_build_cipher_suite(uint8_t *data, const uint8_t *oui,
memcpy(data, oui, 3);
data[3] = 5;
return true;
case IE_RSN_CIPHER_SUITE_BIP:
case IE_RSN_CIPHER_SUITE_BIP_CMAC:
memcpy(data, oui, 3);
data[3] = 6;
return true;
@ -1115,7 +1116,7 @@ static int build_ciphers_common(const struct ie_rsn_info *info, uint8_t *to,
else if (!info->mfpc)
goto done;
else if (info->group_management_cipher ==
IE_RSN_CIPHER_SUITE_BIP)
IE_RSN_CIPHER_SUITE_BIP_CMAC)
goto done;
}
@ -1136,7 +1137,7 @@ static int build_ciphers_common(const struct ie_rsn_info *info, uint8_t *to,
goto done;
if (!force_group_mgmt_cipher && info->group_management_cipher ==
IE_RSN_CIPHER_SUITE_BIP)
IE_RSN_CIPHER_SUITE_BIP_CMAC)
goto done;
/* Group Management Cipher Suite */

View File

@ -329,7 +329,7 @@ enum ie_rsn_cipher_suite {
IE_RSN_CIPHER_SUITE_TKIP = 0x0004,
IE_RSN_CIPHER_SUITE_CCMP = 0x0008,
IE_RSN_CIPHER_SUITE_WEP104 = 0x0010,
IE_RSN_CIPHER_SUITE_BIP = 0x0020,
IE_RSN_CIPHER_SUITE_BIP_CMAC = 0x0020,
IE_RSN_CIPHER_SUITE_NO_GROUP_TRAFFIC = 0x0040,
};

View File

@ -157,8 +157,8 @@ enum ie_rsn_cipher_suite wiphy_select_cipher(struct wiphy *wiphy, uint16_t mask)
if (mask & IE_RSN_CIPHER_SUITE_TKIP)
return IE_RSN_CIPHER_SUITE_TKIP;
if (mask & IE_RSN_CIPHER_SUITE_BIP)
return IE_RSN_CIPHER_SUITE_BIP;
if (mask & IE_RSN_CIPHER_SUITE_BIP_CMAC)
return IE_RSN_CIPHER_SUITE_BIP_CMAC;
return 0;
}
@ -178,7 +178,7 @@ static bool wiphy_can_connect_sae(struct wiphy *wiphy)
* WPA3 Specification version 3, Section 2.3:
* A STA shall negotiate PMF when associating to an AP using SAE
*/
if (!(wiphy->supported_ciphers & IE_RSN_CIPHER_SUITE_BIP)) {
if (!(wiphy->supported_ciphers & IE_RSN_CIPHER_SUITE_BIP_CMAC)) {
l_debug("HW not MFP capable, can't use SAE");
return false;
}
@ -488,7 +488,7 @@ bool wiphy_can_transition_disable(struct wiphy *wiphy)
if (!(wiphy->supported_ciphers & IE_RSN_CIPHER_SUITE_CCMP))
return false;
if (!(wiphy->supported_ciphers & IE_RSN_CIPHER_SUITE_BIP))
if (!(wiphy->supported_ciphers & IE_RSN_CIPHER_SUITE_BIP_CMAC))
return false;
return true;
@ -1145,7 +1145,7 @@ static void wiphy_print_basic_info(struct wiphy *wiphy)
if (wiphy->supported_ciphers & IE_RSN_CIPHER_SUITE_TKIP)
len += sprintf(buf + len, " TKIP");
if (wiphy->supported_ciphers & IE_RSN_CIPHER_SUITE_BIP)
if (wiphy->supported_ciphers & IE_RSN_CIPHER_SUITE_BIP_CMAC)
len += sprintf(buf + len, " BIP");
l_info("%s", buf);
@ -1216,7 +1216,8 @@ static void parse_supported_ciphers(struct wiphy *wiphy, const void *data,
wiphy->supported_ciphers |= IE_RSN_CIPHER_SUITE_WEP104;
break;
case CRYPTO_CIPHER_BIP_CMAC:
wiphy->supported_ciphers |= IE_RSN_CIPHER_SUITE_BIP;
wiphy->supported_ciphers |=
IE_RSN_CIPHER_SUITE_BIP_CMAC;
break;
default: /* TODO: Support other ciphers */
break;

View File

@ -423,7 +423,7 @@ static const struct ie_rsne_info_test ie_rsne_info_test_6 = {
.pairwise_ciphers = IE_RSN_CIPHER_SUITE_CCMP,
.akm_suites = IE_RSN_AKM_SUITE_8021X,
.mfpc = true, /* Management frame protection is enabled, not required */
.group_management_cipher = IE_RSN_CIPHER_SUITE_BIP,
.group_management_cipher = IE_RSN_CIPHER_SUITE_BIP_CMAC,
};
static void ie_test_rsne_info(const void *data)