aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/rx.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/rx.c')
-rw-r--r--net/mac80211/rx.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 4c046af237e3..ece77766ea2b 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -424,6 +424,7 @@ ieee80211_rx_h_decrypt(struct ieee80211_txrx_data *rx)
424 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) rx->skb->data; 424 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) rx->skb->data;
425 int keyidx; 425 int keyidx;
426 int hdrlen; 426 int hdrlen;
427 ieee80211_txrx_result result = TXRX_DROP;
427 struct ieee80211_key *stakey = NULL; 428 struct ieee80211_key *stakey = NULL;
428 429
429 /* 430 /*
@@ -522,21 +523,22 @@ ieee80211_rx_h_decrypt(struct ieee80211_txrx_data *rx)
522 ieee80211_wep_is_weak_iv(rx->skb, rx->key)) 523 ieee80211_wep_is_weak_iv(rx->skb, rx->key))
523 rx->sta->wep_weak_iv_count++; 524 rx->sta->wep_weak_iv_count++;
524 525
525 /* either the frame will be decrypted or dropped */
526 rx->u.rx.status->flag |= RX_FLAG_DECRYPTED;
527
528 switch (rx->key->conf.alg) { 526 switch (rx->key->conf.alg) {
529 case ALG_WEP: 527 case ALG_WEP:
530 return ieee80211_crypto_wep_decrypt(rx); 528 result = ieee80211_crypto_wep_decrypt(rx);
529 break;
531 case ALG_TKIP: 530 case ALG_TKIP:
532 return ieee80211_crypto_tkip_decrypt(rx); 531 result = ieee80211_crypto_tkip_decrypt(rx);
532 break;
533 case ALG_CCMP: 533 case ALG_CCMP:
534 return ieee80211_crypto_ccmp_decrypt(rx); 534 result = ieee80211_crypto_ccmp_decrypt(rx);
535 break;
535 } 536 }
536 537
537 /* not reached */ 538 /* either the frame has been decrypted or will be dropped */
538 WARN_ON(1); 539 rx->u.rx.status->flag |= RX_FLAG_DECRYPTED;
539 return TXRX_DROP; 540
541 return result;
540} 542}
541 543
542static void ap_sta_ps_start(struct net_device *dev, struct sta_info *sta) 544static void ap_sta_ps_start(struct net_device *dev, struct sta_info *sta)