diff options
author | Jouni Malinen <jouni@qca.qualcomm.com> | 2015-01-24 12:52:08 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2015-01-27 05:09:13 -0500 |
commit | 56c52da2d554f081e8fce58ecbcf6a40c605b95b (patch) | |
tree | 9c28bdf5c73f2f2a3a6d87880a9422e6d16f9d30 /net/mac80211/main.c | |
parent | 2b2ba0db1c820d04d5143452d70012cd44d7b578 (diff) |
mac80111: Add BIP-CMAC-256 cipher
This allows mac80211 to configure BIP-CMAC-256 to the driver and also
use software-implementation within mac80211 when the driver does not
support this with hardware accelaration.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/main.c')
-rw-r--r-- | net/mac80211/main.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c index a5ad2d5bb29b..053a17c5023a 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c | |||
@@ -671,7 +671,8 @@ static int ieee80211_init_cipher_suites(struct ieee80211_local *local) | |||
671 | WLAN_CIPHER_SUITE_GCMP_256, | 671 | WLAN_CIPHER_SUITE_GCMP_256, |
672 | 672 | ||
673 | /* keep last -- depends on hw flags! */ | 673 | /* keep last -- depends on hw flags! */ |
674 | WLAN_CIPHER_SUITE_AES_CMAC | 674 | WLAN_CIPHER_SUITE_AES_CMAC, |
675 | WLAN_CIPHER_SUITE_BIP_CMAC_256, | ||
675 | }; | 676 | }; |
676 | 677 | ||
677 | if (local->hw.flags & IEEE80211_HW_SW_CRYPTO_CONTROL || | 678 | if (local->hw.flags & IEEE80211_HW_SW_CRYPTO_CONTROL || |
@@ -710,7 +711,7 @@ static int ieee80211_init_cipher_suites(struct ieee80211_local *local) | |||
710 | local->hw.wiphy->n_cipher_suites = ARRAY_SIZE(cipher_suites); | 711 | local->hw.wiphy->n_cipher_suites = ARRAY_SIZE(cipher_suites); |
711 | 712 | ||
712 | if (!have_mfp) | 713 | if (!have_mfp) |
713 | local->hw.wiphy->n_cipher_suites--; | 714 | local->hw.wiphy->n_cipher_suites -= 2; |
714 | 715 | ||
715 | if (!have_wep) { | 716 | if (!have_wep) { |
716 | local->hw.wiphy->cipher_suites += 2; | 717 | local->hw.wiphy->cipher_suites += 2; |
@@ -736,9 +737,9 @@ static int ieee80211_init_cipher_suites(struct ieee80211_local *local) | |||
736 | if (have_wep) | 737 | if (have_wep) |
737 | n_suites += 2; | 738 | n_suites += 2; |
738 | 739 | ||
739 | /* check if we have AES_CMAC */ | 740 | /* check if we have AES_CMAC, BIP-CMAC-256 */ |
740 | if (have_mfp) | 741 | if (have_mfp) |
741 | n_suites++; | 742 | n_suites += 2; |
742 | 743 | ||
743 | suites = kmalloc(sizeof(u32) * n_suites, GFP_KERNEL); | 744 | suites = kmalloc(sizeof(u32) * n_suites, GFP_KERNEL); |
744 | if (!suites) | 745 | if (!suites) |
@@ -755,8 +756,10 @@ static int ieee80211_init_cipher_suites(struct ieee80211_local *local) | |||
755 | suites[w++] = WLAN_CIPHER_SUITE_WEP104; | 756 | suites[w++] = WLAN_CIPHER_SUITE_WEP104; |
756 | } | 757 | } |
757 | 758 | ||
758 | if (have_mfp) | 759 | if (have_mfp) { |
759 | suites[w++] = WLAN_CIPHER_SUITE_AES_CMAC; | 760 | suites[w++] = WLAN_CIPHER_SUITE_AES_CMAC; |
761 | suites[w++] = WLAN_CIPHER_SUITE_BIP_CMAC_256; | ||
762 | } | ||
760 | 763 | ||
761 | for (r = 0; r < local->hw.n_cipher_schemes; r++) | 764 | for (r = 0; r < local->hw.n_cipher_schemes; r++) |
762 | suites[w++] = cs[r].cipher; | 765 | suites[w++] = cs[r].cipher; |