diff options
author | Christian Lamparter <chunkeey@googlemail.com> | 2013-01-30 17:37:41 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-02-01 14:27:22 -0500 |
commit | 21fbbca3376f66edd010f5c76ea94e3353bf9a9e (patch) | |
tree | bfcdd46a5e8d72de8b8ba8f7ea002068cf9825bd | |
parent | cd435d561add96edc784bffa08ac447dabb387f8 (diff) |
ath9k: report A-MPDU status
The ath9k hardware reports whenever an frame was part
of an A-MPDU. MAC80211 already provides the necessary
API to pass this additional information along to
whomever needs it.
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ath9k.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/recv.c | 20 |
2 files changed, 22 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h index 67df8644fef6..21e2e42046fa 100644 --- a/drivers/net/wireless/ath/ath9k/ath9k.h +++ b/drivers/net/wireless/ath/ath9k/ath9k.h | |||
@@ -319,6 +319,8 @@ struct ath_rx { | |||
319 | struct ath_rx_edma rx_edma[ATH9K_RX_QUEUE_MAX]; | 319 | struct ath_rx_edma rx_edma[ATH9K_RX_QUEUE_MAX]; |
320 | 320 | ||
321 | struct sk_buff *frag; | 321 | struct sk_buff *frag; |
322 | |||
323 | u32 ampdu_ref; | ||
322 | }; | 324 | }; |
323 | 325 | ||
324 | int ath_startrecv(struct ath_softc *sc); | 326 | int ath_startrecv(struct ath_softc *sc); |
diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c index 2af6f19d2d2a..87497f3938b6 100644 --- a/drivers/net/wireless/ath/ath9k/recv.c +++ b/drivers/net/wireless/ath/ath9k/recv.c | |||
@@ -1123,6 +1123,24 @@ static int ath_process_fft(struct ath_softc *sc, struct ieee80211_hdr *hdr, | |||
1123 | #endif | 1123 | #endif |
1124 | } | 1124 | } |
1125 | 1125 | ||
1126 | static void ath9k_apply_ampdu_details(struct ath_softc *sc, | ||
1127 | struct ath_rx_status *rs, struct ieee80211_rx_status *rxs) | ||
1128 | { | ||
1129 | if (rs->rs_isaggr) { | ||
1130 | rxs->flag |= RX_FLAG_AMPDU_DETAILS | RX_FLAG_AMPDU_LAST_KNOWN; | ||
1131 | |||
1132 | rxs->ampdu_reference = sc->rx.ampdu_ref; | ||
1133 | |||
1134 | if (!rs->rs_moreaggr) { | ||
1135 | rxs->flag |= RX_FLAG_AMPDU_IS_LAST; | ||
1136 | sc->rx.ampdu_ref++; | ||
1137 | } | ||
1138 | |||
1139 | if (rs->rs_flags & ATH9K_RX_DELIM_CRC_PRE) | ||
1140 | rxs->flag |= RX_FLAG_AMPDU_DELIM_CRC_ERROR; | ||
1141 | } | ||
1142 | } | ||
1143 | |||
1126 | int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp) | 1144 | int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp) |
1127 | { | 1145 | { |
1128 | struct ath_buf *bf; | 1146 | struct ath_buf *bf; |
@@ -1329,6 +1347,8 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp) | |||
1329 | if ((ah->caps.hw_caps & ATH9K_HW_CAP_ANT_DIV_COMB) && sc->ant_rx == 3) | 1347 | if ((ah->caps.hw_caps & ATH9K_HW_CAP_ANT_DIV_COMB) && sc->ant_rx == 3) |
1330 | ath_ant_comb_scan(sc, &rs); | 1348 | ath_ant_comb_scan(sc, &rs); |
1331 | 1349 | ||
1350 | ath9k_apply_ampdu_details(sc, &rs, rxs); | ||
1351 | |||
1332 | ieee80211_rx(hw, skb); | 1352 | ieee80211_rx(hw, skb); |
1333 | 1353 | ||
1334 | requeue_drop_frag: | 1354 | requeue_drop_frag: |