nl80211: Use defines for NL80211_KEY_CIPHER values

This commit is contained in:
Jouni Malinen 2009-09-15 11:23:48 +03:00 committed by Jouni Malinen
parent d723bab4b3
commit 2aa5f84709

View file

@ -1882,18 +1882,21 @@ static int nl_add_key(struct nl_msg *msg, wpa_alg alg,
switch (alg) {
case WPA_ALG_WEP:
if (key_len == 5)
NLA_PUT_U32(msg, NL80211_KEY_CIPHER, 0x000FAC01);
NLA_PUT_U32(msg, NL80211_KEY_CIPHER,
WLAN_CIPHER_SUITE_WEP40);
else
NLA_PUT_U32(msg, NL80211_KEY_CIPHER, 0x000FAC05);
NLA_PUT_U32(msg, NL80211_KEY_CIPHER,
WLAN_CIPHER_SUITE_WEP104);
break;
case WPA_ALG_TKIP:
NLA_PUT_U32(msg, NL80211_KEY_CIPHER, 0x000FAC02);
NLA_PUT_U32(msg, NL80211_KEY_CIPHER, WLAN_CIPHER_SUITE_TKIP);
break;
case WPA_ALG_CCMP:
NLA_PUT_U32(msg, NL80211_KEY_CIPHER, 0x000FAC04);
NLA_PUT_U32(msg, NL80211_KEY_CIPHER, WLAN_CIPHER_SUITE_CCMP);
break;
case WPA_ALG_IGTK:
NLA_PUT_U32(msg, NL80211_KEY_CIPHER, 0x000FAC06);
NLA_PUT_U32(msg, NL80211_KEY_CIPHER,
WLAN_CIPHER_SUITE_AES_CMAC);
break;
default:
wpa_printf(MSG_ERROR, "%s: Unsupported encryption "