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>
This commit is contained in:
Vasanthakumar Thiagarajan 2010-05-20 14:34:47 -07:00 committed by John W. Linville
parent 9f167f6480
commit 5c6dd92177
1 changed files with 2 additions and 1 deletions

View File

@ -1094,6 +1094,7 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp)
enum ath9k_rx_qtype qtype; enum ath9k_rx_qtype qtype;
bool edma = !!(ah->caps.hw_caps & ATH9K_HW_CAP_EDMA); bool edma = !!(ah->caps.hw_caps & ATH9K_HW_CAP_EDMA);
int dma_type; int dma_type;
u8 rx_status_len = ah->caps.rx_status_len;
if (edma) if (edma)
dma_type = DMA_BIDIRECTIONAL; dma_type = DMA_BIDIRECTIONAL;
@ -1121,7 +1122,7 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp)
if (!skb) if (!skb)
continue; continue;
hdr = (struct ieee80211_hdr *) skb->data; hdr = (struct ieee80211_hdr *) (skb->data + rx_status_len);
rxs = IEEE80211_SKB_RXCB(skb); rxs = IEEE80211_SKB_RXCB(skb);
hw = ath_get_virt_hw(sc, hdr); hw = ath_get_virt_hw(sc, hdr);