diff options
author | Johannes Berg <johannes.berg@intel.com> | 2010-08-27 14:26:52 +0300 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-08-27 13:27:07 -0400 |
commit | 3ffc2a905b1faae4c0fe39d66f0752c3a4cbb3c7 (patch) | |
tree | d50902e1e171877e4fb034e36c837f16984ab9b4 /net/mac80211/tx.c | |
parent | 7d64b7cc1fc33bab24567903a93f699d11649c0b (diff) | |
download | op-kernel-dev-3ffc2a905b1faae4c0fe39d66f0752c3a4cbb3c7.zip op-kernel-dev-3ffc2a905b1faae4c0fe39d66f0752c3a4cbb3c7.tar.gz |
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.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index a6ac9fd..31a8903 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -947,6 +947,8 @@ ieee80211_tx_h_stats(struct ieee80211_tx_data *tx) static ieee80211_tx_result debug_noinline ieee80211_tx_h_encrypt(struct ieee80211_tx_data *tx) { + struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx->skb); + if (!tx->key) return TX_CONTINUE; @@ -960,10 +962,16 @@ ieee80211_tx_h_encrypt(struct ieee80211_tx_data *tx) return ieee80211_crypto_ccmp_encrypt(tx); case WLAN_CIPHER_SUITE_AES_CMAC: return ieee80211_crypto_aes_cmac_encrypt(tx); + default: + /* handle hw-only algorithm */ + if (info->control.hw_key) { + ieee80211_tx_set_protected(tx); + return TX_CONTINUE; + } + break; + } - /* not reached */ - WARN_ON(1); return TX_DROP; } |