diff options
author | Vasanthakumar Thiagarajan <vasanth@atheros.com> | 2010-05-20 17:34:47 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-06-02 16:13:31 -0400 |
commit | 5c6dd921776946d12cbbae8ab92c5d6773b25810 (patch) | |
tree | 25dc1625e94225ade42c32a41011ba0b3c4174a5 | |
parent | 9f167f6480c87e22ce1b934cc839d1786b373b70 (diff) |
ath9k: Fix bug in accessing skb->data of rx frame for edma
Skip the rx status portion in skb->data before accessing ieee80211
frame header.
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/ath/ath9k/recv.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c index 3563e44553f9..978b4d91f931 100644 --- a/drivers/net/wireless/ath/ath9k/recv.c +++ b/drivers/net/wireless/ath/ath9k/recv.c | |||
@@ -1094,6 +1094,7 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp) | |||
1094 | enum ath9k_rx_qtype qtype; | 1094 | enum ath9k_rx_qtype qtype; |
1095 | bool edma = !!(ah->caps.hw_caps & ATH9K_HW_CAP_EDMA); | 1095 | bool edma = !!(ah->caps.hw_caps & ATH9K_HW_CAP_EDMA); |
1096 | int dma_type; | 1096 | int dma_type; |
1097 | u8 rx_status_len = ah->caps.rx_status_len; | ||
1097 | 1098 | ||
1098 | if (edma) | 1099 | if (edma) |
1099 | dma_type = DMA_BIDIRECTIONAL; | 1100 | dma_type = DMA_BIDIRECTIONAL; |
@@ -1121,7 +1122,7 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp) | |||
1121 | if (!skb) | 1122 | if (!skb) |
1122 | continue; | 1123 | continue; |
1123 | 1124 | ||
1124 | hdr = (struct ieee80211_hdr *) skb->data; | 1125 | hdr = (struct ieee80211_hdr *) (skb->data + rx_status_len); |
1125 | rxs = IEEE80211_SKB_RXCB(skb); | 1126 | rxs = IEEE80211_SKB_RXCB(skb); |
1126 | 1127 | ||
1127 | hw = ath_get_virt_hw(sc, hdr); | 1128 | hw = ath_get_virt_hw(sc, hdr); |