Commit 640845a5 authored by Johannes Berg's avatar Johannes Berg Committed by David S. Miller

[MAC80211]: use RX_FLAG_DECRYPTED for sw decrypted as well

This makes mac80211 set the RX_FLAG_DECRYPTED flag for frames
decrypted in software allowing us to handle some things more
uniformly.
Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1990af8d
...@@ -522,6 +522,9 @@ ieee80211_rx_h_decrypt(struct ieee80211_txrx_data *rx) ...@@ -522,6 +522,9 @@ ieee80211_rx_h_decrypt(struct ieee80211_txrx_data *rx)
ieee80211_wep_is_weak_iv(rx->skb, rx->key)) ieee80211_wep_is_weak_iv(rx->skb, rx->key))
rx->sta->wep_weak_iv_count++; rx->sta->wep_weak_iv_count++;
/* either the frame will be decrypted or dropped */
rx->u.rx.status->flag |= RX_FLAG_DECRYPTED;
switch (rx->key->conf.alg) { switch (rx->key->conf.alg) {
case ALG_WEP: case ALG_WEP:
return ieee80211_crypto_wep_decrypt(rx); return ieee80211_crypto_wep_decrypt(rx);
...@@ -993,9 +996,8 @@ ieee80211_rx_h_drop_unencrypted(struct ieee80211_txrx_data *rx) ...@@ -993,9 +996,8 @@ ieee80211_rx_h_drop_unencrypted(struct ieee80211_txrx_data *rx)
if (unlikely(!(rx->fc & IEEE80211_FCTL_PROTECTED) && if (unlikely(!(rx->fc & IEEE80211_FCTL_PROTECTED) &&
(rx->fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_DATA && (rx->fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_DATA &&
(rx->fc & IEEE80211_FCTL_STYPE) != IEEE80211_STYPE_NULLFUNC && (rx->fc & IEEE80211_FCTL_STYPE) != IEEE80211_STYPE_NULLFUNC &&
(rx->key || rx->sdata->drop_unencrypted) && rx->sdata->drop_unencrypted &&
(rx->sdata->eapol == 0 || (rx->sdata->eapol == 0 || !ieee80211_is_eapol(rx->skb)))) {
!ieee80211_is_eapol(rx->skb)))) {
if (net_ratelimit()) if (net_ratelimit())
printk(KERN_DEBUG "%s: RX non-WEP frame, but expected " printk(KERN_DEBUG "%s: RX non-WEP frame, but expected "
"encryption\n", rx->dev->name); "encryption\n", rx->dev->name);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment