aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2011-07-13 15:37:36 +0000
committerFelix Fietkau <nbd@openwrt.org>2011-07-13 15:37:36 +0000
commite084d0e92adabc1a53e4e078c076e4427e8e2332 (patch)
tree2171ba22019739d54a1baf0ff8affd4db9c836ba /package
parent9ef09af36d37390fbc3d916ac3bfeb333c46df41 (diff)
downloadupstream-e084d0e92adabc1a53e4e078c076e4427e8e2332.tar.gz
upstream-e084d0e92adabc1a53e4e078c076e4427e8e2332.tar.bz2
upstream-e084d0e92adabc1a53e4e078c076e4427e8e2332.zip
ath9k: add some more fixes to the mic failure handling rework patch
SVN-Revision: 27607
Diffstat (limited to 'package')
-rw-r--r--package/mac80211/patches/550-ath9k_mmic_verify.patch35
1 files changed, 28 insertions, 7 deletions
diff --git a/package/mac80211/patches/550-ath9k_mmic_verify.patch b/package/mac80211/patches/550-ath9k_mmic_verify.patch
index 1918e11d7c..a6b2502bf2 100644
--- a/package/mac80211/patches/550-ath9k_mmic_verify.patch
+++ b/package/mac80211/patches/550-ath9k_mmic_verify.patch
@@ -24,12 +24,31 @@
if (!rx_stats->rs_datalen)
return false;
/*
-@@ -850,25 +853,9 @@ static bool ath9k_rx_accept(struct ath_c
+@@ -838,6 +841,11 @@ static bool ath9k_rx_accept(struct ath_c
+ if (rx_stats->rs_more)
+ return true;
+
++ mic_error = is_valid_tkip && !ieee80211_is_ctl(fc) &&
++ !ieee80211_has_morefrags(fc) &&
++ !(le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_FRAG) &&
++ (rx_stats->rs_status & ATH9K_RXERR_MIC);
++
+ /*
+ * The rx_stats->rs_status will not be set until the end of the
+ * chained descriptors so it can be ignored if rs_more is set. The
+@@ -845,30 +853,18 @@ static bool ath9k_rx_accept(struct ath_c
+ * descriptors.
+ */
+ if (rx_stats->rs_status != 0) {
+- if (rx_stats->rs_status & ATH9K_RXERR_CRC)
++ if (rx_stats->rs_status & ATH9K_RXERR_CRC) {
+ rxs->flag |= RX_FLAG_FAILED_FCS_CRC;
++ mic_error = false;
++ }
if (rx_stats->rs_status & ATH9K_RXERR_PHY)
return false;
-- if (rx_stats->rs_status & ATH9K_RXERR_DECRYPT) {
-+ if (rx_stats->rs_status & ATH9K_RXERR_DECRYPT)
+ if (rx_stats->rs_status & ATH9K_RXERR_DECRYPT) {
*decrypt_error = true;
- } else if (rx_stats->rs_status & ATH9K_RXERR_MIC) {
- bool is_mc;
@@ -39,7 +58,7 @@
- * decrypted using a valid TKIP key.
- */
- is_mc = !!is_multicast_ether_addr(hdr->addr1);
-
+-
- if (!ieee80211_is_ctl(fc) &&
- !ieee80211_has_morefrags(fc) &&
- !(le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_FRAG) &&
@@ -47,11 +66,13 @@
- rxs->flag |= RX_FLAG_MMIC_ERROR;
- else
- rx_stats->rs_status &= ~ATH9K_RXERR_MIC;
-- }
++ mic_error = false;
+ }
++
/*
* Reject error frames with the exception of
* decryption and MIC failures. For monitor mode,
-@@ -886,6 +873,18 @@ static bool ath9k_rx_accept(struct ath_c
+@@ -886,6 +882,18 @@ static bool ath9k_rx_accept(struct ath_c
}
}
}
@@ -70,7 +91,7 @@
return true;
}
-@@ -1940,6 +1939,9 @@ int ath_rx_tasklet(struct ath_softc *sc,
+@@ -1940,6 +1948,9 @@ int ath_rx_tasklet(struct ath_softc *sc,
sc->rx.rxotherant = 0;
}