diff options
author | Sujith Manoharan <c_manoha@qca.qualcomm.com> | 2013-08-13 23:41:12 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-08-15 16:08:02 -0400 |
commit | 4a470647415276d43daf9238a5bd70acc2119555 (patch) | |
tree | 0c28ed6101a7624fbbf33df50768308e4ff90370 /drivers/net/wireless/ath/ath9k/recv.c | |
parent | 5871d2d787bc2fc45e43c9f8ecabdd2db37ad666 (diff) |
ath9k: Fix RX crypto processing
The keymiss events are valid only in the last descriptor
of a packet. Fix this by making sure that we return
early in case of chained descriptors.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/recv.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/recv.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c index f8cc2b3b38d9..b04a9711eb31 100644 --- a/drivers/net/wireless/ath/ath9k/recv.c +++ b/drivers/net/wireless/ath/ath9k/recv.c | |||
@@ -785,10 +785,6 @@ static bool ath9k_rx_accept(struct ath_common *common, | |||
785 | !test_bit(rx_stats->rs_keyix, common->ccmp_keymap)) | 785 | !test_bit(rx_stats->rs_keyix, common->ccmp_keymap)) |
786 | rx_stats->rs_status &= ~ATH9K_RXERR_KEYMISS; | 786 | rx_stats->rs_status &= ~ATH9K_RXERR_KEYMISS; |
787 | 787 | ||
788 | /* Only use error bits from the last fragment */ | ||
789 | if (rx_stats->rs_more) | ||
790 | return true; | ||
791 | |||
792 | mic_error = is_valid_tkip && !ieee80211_is_ctl(fc) && | 788 | mic_error = is_valid_tkip && !ieee80211_is_ctl(fc) && |
793 | !ieee80211_has_morefrags(fc) && | 789 | !ieee80211_has_morefrags(fc) && |
794 | !(le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_FRAG) && | 790 | !(le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_FRAG) && |
@@ -959,6 +955,10 @@ static int ath9k_rx_skb_preprocess(struct ath_softc *sc, | |||
959 | return -EINVAL; | 955 | return -EINVAL; |
960 | } | 956 | } |
961 | 957 | ||
958 | /* Only use status info from the last fragment */ | ||
959 | if (rx_stats->rs_more) | ||
960 | return 0; | ||
961 | |||
962 | /* | 962 | /* |
963 | * everything but the rate is checked here, the rate check is done | 963 | * everything but the rate is checked here, the rate check is done |
964 | * separately to avoid doing two lookups for a rate for each frame. | 964 | * separately to avoid doing two lookups for a rate for each frame. |
@@ -966,10 +966,6 @@ static int ath9k_rx_skb_preprocess(struct ath_softc *sc, | |||
966 | if (!ath9k_rx_accept(common, hdr, rx_status, rx_stats, decrypt_error)) | 966 | if (!ath9k_rx_accept(common, hdr, rx_status, rx_stats, decrypt_error)) |
967 | return -EINVAL; | 967 | return -EINVAL; |
968 | 968 | ||
969 | /* Only use status info from the last fragment */ | ||
970 | if (rx_stats->rs_more) | ||
971 | return 0; | ||
972 | |||
973 | if (ath9k_process_rate(common, hw, rx_stats, rx_status)) | 969 | if (ath9k_process_rate(common, hw, rx_stats, rx_status)) |
974 | return -EINVAL; | 970 | return -EINVAL; |
975 | 971 | ||