aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/tx.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2009-01-08 06:32:02 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-01-29 16:00:03 -0500
commit3cfcf6ac6d69dc290e96416731eea5c88ac7d426 (patch)
tree35bc626e2e3f7c37a7eb50c1f057adb4830eccc6 /net/mac80211/tx.c
parent765cb46a3fc856245ea68a7c961ac87c77e4ae2d (diff)
mac80211: 802.11w - Use BIP (AES-128-CMAC)
Add mechanism for managing BIP keys (IGTK) and integrate BIP into the TX/RX paths. Signed-off-by: Jouni Malinen <j@w1.fi> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/tx.c')
-rw-r--r--net/mac80211/tx.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 50c6c4fabea5..ad53ea9e9c77 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -425,6 +425,9 @@ ieee80211_tx_h_select_key(struct ieee80211_tx_data *tx)
425 tx->key = NULL; 425 tx->key = NULL;
426 else if (tx->sta && (key = rcu_dereference(tx->sta->key))) 426 else if (tx->sta && (key = rcu_dereference(tx->sta->key)))
427 tx->key = key; 427 tx->key = key;
428 else if (ieee80211_is_mgmt(hdr->frame_control) &&
429 (key = rcu_dereference(tx->sdata->default_mgmt_key)))
430 tx->key = key;
428 else if ((key = rcu_dereference(tx->sdata->default_key))) 431 else if ((key = rcu_dereference(tx->sdata->default_key)))
429 tx->key = key; 432 tx->key = key;
430 else if (tx->sdata->drop_unencrypted && 433 else if (tx->sdata->drop_unencrypted &&
@@ -453,6 +456,10 @@ ieee80211_tx_h_select_key(struct ieee80211_tx_data *tx)
453 tx->skb)) 456 tx->skb))
454 tx->key = NULL; 457 tx->key = NULL;
455 break; 458 break;
459 case ALG_AES_CMAC:
460 if (!ieee80211_is_mgmt(hdr->frame_control))
461 tx->key = NULL;
462 break;
456 } 463 }
457 } 464 }
458 465
@@ -808,6 +815,8 @@ ieee80211_tx_h_encrypt(struct ieee80211_tx_data *tx)
808 return ieee80211_crypto_tkip_encrypt(tx); 815 return ieee80211_crypto_tkip_encrypt(tx);
809 case ALG_CCMP: 816 case ALG_CCMP:
810 return ieee80211_crypto_ccmp_encrypt(tx); 817 return ieee80211_crypto_ccmp_encrypt(tx);
818 case ALG_AES_CMAC:
819 return ieee80211_crypto_aes_cmac_encrypt(tx);
811 } 820 }
812 821
813 /* not reached */ 822 /* not reached */