aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/wpa.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/wpa.c')
-rw-r--r--net/mac80211/wpa.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/net/mac80211/wpa.c b/net/mac80211/wpa.c
index 108fe3e81e24..a07fd7484cdf 100644
--- a/net/mac80211/wpa.c
+++ b/net/mac80211/wpa.c
@@ -239,17 +239,16 @@ static int tkip_encrypt_skb(struct ieee80211_txrx_data *tx,
239 239
240 240
241ieee80211_txrx_result 241ieee80211_txrx_result
242ieee80211_tx_h_tkip_encrypt(struct ieee80211_txrx_data *tx) 242ieee80211_crypto_tkip_encrypt(struct ieee80211_txrx_data *tx)
243{ 243{
244 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) tx->skb->data; 244 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) tx->skb->data;
245 u16 fc; 245 u16 fc;
246 struct ieee80211_key *key = tx->key;
247 struct sk_buff *skb = tx->skb; 246 struct sk_buff *skb = tx->skb;
248 int wpa_test = 0, test = 0; 247 int wpa_test = 0, test = 0;
249 248
250 fc = le16_to_cpu(hdr->frame_control); 249 fc = le16_to_cpu(hdr->frame_control);
251 250
252 if (!key || key->conf.alg != ALG_TKIP || !WLAN_FC_DATA_PRESENT(fc)) 251 if (!WLAN_FC_DATA_PRESENT(fc))
253 return TXRX_CONTINUE; 252 return TXRX_CONTINUE;
254 253
255 tx->u.tx.control->icv_len = TKIP_ICV_LEN; 254 tx->u.tx.control->icv_len = TKIP_ICV_LEN;
@@ -491,17 +490,16 @@ static int ccmp_encrypt_skb(struct ieee80211_txrx_data *tx,
491 490
492 491
493ieee80211_txrx_result 492ieee80211_txrx_result
494ieee80211_tx_h_ccmp_encrypt(struct ieee80211_txrx_data *tx) 493ieee80211_crypto_ccmp_encrypt(struct ieee80211_txrx_data *tx)
495{ 494{
496 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) tx->skb->data; 495 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) tx->skb->data;
497 struct ieee80211_key *key = tx->key;
498 u16 fc; 496 u16 fc;
499 struct sk_buff *skb = tx->skb; 497 struct sk_buff *skb = tx->skb;
500 int test = 0; 498 int test = 0;
501 499
502 fc = le16_to_cpu(hdr->frame_control); 500 fc = le16_to_cpu(hdr->frame_control);
503 501
504 if (!key || key->conf.alg != ALG_CCMP || !WLAN_FC_DATA_PRESENT(fc)) 502 if (!WLAN_FC_DATA_PRESENT(fc))
505 return TXRX_CONTINUE; 503 return TXRX_CONTINUE;
506 504
507 tx->u.tx.control->icv_len = CCMP_MIC_LEN; 505 tx->u.tx.control->icv_len = CCMP_MIC_LEN;