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.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 976b646a40de..ba94f58ba02e 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -528,7 +528,7 @@ ieee80211_rx_h_wep_weak_iv_detection(struct ieee80211_txrx_data *rx)
528 528
529 /* Check for weak IVs, if hwaccel did not remove IV from the frame */ 529 /* Check for weak IVs, if hwaccel did not remove IV from the frame */
530 if ((rx->local->hw.flags & IEEE80211_HW_WEP_INCLUDE_IV) || 530 if ((rx->local->hw.flags & IEEE80211_HW_WEP_INCLUDE_IV) ||
531 (rx->key->conf.flags & IEEE80211_KEY_FORCE_SW_ENCRYPT)) 531 !(rx->key->flags & KEY_FLAG_UPLOADED_TO_HARDWARE))
532 if (ieee80211_wep_is_weak_iv(rx->skb, rx->key)) 532 if (ieee80211_wep_is_weak_iv(rx->skb, rx->key))
533 rx->sta->wep_weak_iv_count++; 533 rx->sta->wep_weak_iv_count++;
534 534
@@ -553,7 +553,7 @@ ieee80211_rx_h_wep_decrypt(struct ieee80211_txrx_data *rx)
553 } 553 }
554 554
555 if (!(rx->u.rx.status->flag & RX_FLAG_DECRYPTED) || 555 if (!(rx->u.rx.status->flag & RX_FLAG_DECRYPTED) ||
556 (rx->key->conf.flags & IEEE80211_KEY_FORCE_SW_ENCRYPT)) { 556 !(rx->key->flags & KEY_FLAG_UPLOADED_TO_HARDWARE)) {
557 if (ieee80211_wep_decrypt(rx->local, rx->skb, rx->key)) { 557 if (ieee80211_wep_decrypt(rx->local, rx->skb, rx->key)) {
558 if (net_ratelimit()) 558 if (net_ratelimit())
559 printk(KERN_DEBUG "%s: RX WEP frame, decrypt " 559 printk(KERN_DEBUG "%s: RX WEP frame, decrypt "
@@ -897,8 +897,7 @@ ieee80211_rx_h_drop_unencrypted(struct ieee80211_txrx_data *rx)
897 * uploaded to the hardware. 897 * uploaded to the hardware.
898 */ 898 */
899 if ((rx->local->hw.flags & IEEE80211_HW_DEVICE_HIDES_WEP) && 899 if ((rx->local->hw.flags & IEEE80211_HW_DEVICE_HIDES_WEP) &&
900 (!rx->key || 900 (!rx->key || (rx->key->flags & KEY_FLAG_UPLOADED_TO_HARDWARE)))
901 !(rx->key->conf.flags & IEEE80211_KEY_FORCE_SW_ENCRYPT)))
902 return TXRX_CONTINUE; 901 return TXRX_CONTINUE;
903 902
904 /* Drop unencrypted frames if key is set. */ 903 /* Drop unencrypted frames if key is set. */