From: Luis R. Rodriguez Date: Tue, 2 Dec 2008 20:51:21 +0000 (-0800) Subject: ath9k: correct expected max RX buffer size X-Git-Tag: v2.6.27.8~77 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=0c089be68ac41ca6e0e38dea22af8b91c52d1ee0;p=karo-tx-linux.git ath9k: correct expected max RX buffer size commit b4b6cda2298b0c9a0af902312184b775b8867c65 upstream We should only tell the hardware its capable of DMA'ing to us only what we asked dev_alloc_skb(). Prior to this it is possible a large RX'd frame could have corrupted DMA data but for us but we were saved only because we were previously also pci_map_single()'ing the same large value. The issue prior to this though was we were unmapping a smaller amount which the prior DMA patch fixed. Signed-off-by: Bennyam Malavazi Signed-off-by: Luis R. Rodriguez Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/net/wireless/ath9k/recv.c b/drivers/net/wireless/ath9k/recv.c index 4d23827bdf7a..094158918b2a 100644 --- a/drivers/net/wireless/ath9k/recv.c +++ b/drivers/net/wireless/ath9k/recv.c @@ -52,7 +52,7 @@ static void ath_rx_buf_link(struct ath_softc *sc, struct ath_buf *bf) /* setup rx descriptors */ ath9k_hw_setuprxdesc(ah, ds, - skb_tailroom(skb), /* buffer size */ + sc->sc_rxbufsize, 0); if (sc->sc_rxlink == NULL)