aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/tx.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2010-08-27 07:26:52 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-08-27 13:27:07 -0400
commit3ffc2a905b1faae4c0fe39d66f0752c3a4cbb3c7 (patch)
treed50902e1e171877e4fb034e36c837f16984ab9b4 /net/mac80211/tx.c
parent7d64b7cc1fc33bab24567903a93f699d11649c0b (diff)
mac80211: allow vendor specific cipher suites
Allow drivers to specify their own set of cipher suites to advertise vendor-specific ciphers. The driver is then required to implement hardware crypto offload for it. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/tx.c')
-rw-r--r--net/mac80211/tx.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index a6ac9fd248f2..31a8903a45af 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -947,6 +947,8 @@ ieee80211_tx_h_stats(struct ieee80211_tx_data *tx)
947static ieee80211_tx_result debug_noinline 947static ieee80211_tx_result debug_noinline
948ieee80211_tx_h_encrypt(struct ieee80211_tx_data *tx) 948ieee80211_tx_h_encrypt(struct ieee80211_tx_data *tx)
949{ 949{
950 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx->skb);
951
950 if (!tx->key) 952 if (!tx->key)
951 return TX_CONTINUE; 953 return TX_CONTINUE;
952 954
@@ -960,10 +962,16 @@ ieee80211_tx_h_encrypt(struct ieee80211_tx_data *tx)
960 return ieee80211_crypto_ccmp_encrypt(tx); 962 return ieee80211_crypto_ccmp_encrypt(tx);
961 case WLAN_CIPHER_SUITE_AES_CMAC: 963 case WLAN_CIPHER_SUITE_AES_CMAC:
962 return ieee80211_crypto_aes_cmac_encrypt(tx); 964 return ieee80211_crypto_aes_cmac_encrypt(tx);
965 default:
966 /* handle hw-only algorithm */
967 if (info->control.hw_key) {
968 ieee80211_tx_set_protected(tx);
969 return TX_CONTINUE;
970 }
971 break;
972
963 } 973 }
964 974
965 /* not reached */
966 WARN_ON(1);
967 return TX_DROP; 975 return TX_DROP;
968} 976}
969 977