From 168d7aa93d05e2ddd2b102c550e74943fec0b7a1 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Tue, 11 Oct 2011 17:31:57 +0300 Subject: [PATCH] --- yaml --- r: 278023 b: refs/heads/master c: 837cb97e5b72fb315e46d137d514720c62f371bf h: refs/heads/master i: 278021: f41784b1582ca1cb2e557350d1142e477dbc03bf 278019: ddaab1f276e04bed6a3f8fa12f4b8ec95c0fb8ac 278015: ed8239c17e0d30d93d94494d9c08efa0b369d23d v: v3 --- [refs] | 2 +- trunk/drivers/net/wireless/ath/ath6kl/cfg80211.c | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 9973daefdecf..f06e1839dab8 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: ff0b007573c70be88c4efd3c1d8b41e9ba9710b3 +refs/heads/master: 837cb97e5b72fb315e46d137d514720c62f371bf diff --git a/trunk/drivers/net/wireless/ath/ath6kl/cfg80211.c b/trunk/drivers/net/wireless/ath/ath6kl/cfg80211.c index 40a2d7a8b76a..16258c2ec403 100644 --- a/trunk/drivers/net/wireless/ath/ath6kl/cfg80211.c +++ b/trunk/drivers/net/wireless/ath/ath6kl/cfg80211.c @@ -121,6 +121,8 @@ static struct ieee80211_supported_band ath6kl_band_5ghz = { .bitrates = ath6kl_a_rates, }; +#define CCKM_KRK_CIPHER_SUITE 0x004096ff /* use for KRK */ + static int ath6kl_set_wpa_version(struct ath6kl *ar, enum nl80211_wpa_versions wpa_version) { @@ -217,6 +219,11 @@ static void ath6kl_set_key_mgmt(struct ath6kl *ar, u32 key_mgmt) ar->auth_mode = WPA_PSK_AUTH; else if (ar->auth_mode == WPA2_AUTH) ar->auth_mode = WPA2_PSK_AUTH; + } else if (key_mgmt == 0x00409600) { + if (ar->auth_mode == WPA_AUTH) + ar->auth_mode = WPA_AUTH_CCKM; + else if (ar->auth_mode == WPA2_AUTH) + ar->auth_mode = WPA2_AUTH_CCKM; } else if (key_mgmt != WLAN_AKM_SUITE_8021X) { ar->auth_mode = NONE_AUTH; } @@ -811,6 +818,12 @@ static int ath6kl_cfg80211_add_key(struct wiphy *wiphy, struct net_device *ndev, if (!ath6kl_cfg80211_ready(ar)) return -EIO; + if (params->cipher == CCKM_KRK_CIPHER_SUITE) { + if (params->key_len != WMI_KRK_LEN) + return -EINVAL; + return ath6kl_wmi_add_krk_cmd(ar->wmi, params->key); + } + if (key_index < WMI_MIN_KEY_INDEX || key_index > WMI_MAX_KEY_INDEX) { ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, "%s: key index %d out of bounds\n", __func__, @@ -1281,6 +1294,7 @@ static const u32 cipher_suites[] = { WLAN_CIPHER_SUITE_WEP104, WLAN_CIPHER_SUITE_TKIP, WLAN_CIPHER_SUITE_CCMP, + CCKM_KRK_CIPHER_SUITE, }; static bool is_rate_legacy(s32 rate)