Skip to content

Commit

Permalink
ath9k: Fix bug in accessing skb->data of rx frame for edma
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Vasanthakumar Thiagarajan authored and John W. Linville committed Jun 2, 2010
1 parent 9f167f6 commit 5c6dd92
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/wireless/ath/ath9k/recv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1094,6 +1094,7 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp)
enum ath9k_rx_qtype qtype;
bool edma = !!(ah->caps.hw_caps & ATH9K_HW_CAP_EDMA);
int dma_type;
u8 rx_status_len = ah->caps.rx_status_len;

if (edma)
dma_type = DMA_BIDIRECTIONAL;
Expand Down Expand Up @@ -1121,7 +1122,7 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp)
if (!skb)
continue;

hdr = (struct ieee80211_hdr *) skb->data;
hdr = (struct ieee80211_hdr *) (skb->data + rx_status_len);
rxs = IEEE80211_SKB_RXCB(skb);

hw = ath_get_virt_hw(sc, hdr);
Expand Down

0 comments on commit 5c6dd92

Please sign in to comment.