b43: allocate receive buffers big enough for max frame len + offset

Otherwise, skb_put inside of dma_rx can fail...

https://bugzilla.kernel.org/show_bug.cgi?id=32042

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: stable@kernel.org

+2 -2
+1 -1
drivers/net/wireless/b43/dma.c
··· 1536 dmaaddr = meta->dmaaddr; 1537 goto drop_recycle_buffer; 1538 } 1539 - if (unlikely(len > ring->rx_buffersize)) { 1540 /* The data did not fit into one descriptor buffer 1541 * and is split over multiple buffers. 1542 * This should never happen, as we try to allocate buffers
··· 1536 dmaaddr = meta->dmaaddr; 1537 goto drop_recycle_buffer; 1538 } 1539 + if (unlikely(len + ring->frameoffset > ring->rx_buffersize)) { 1540 /* The data did not fit into one descriptor buffer 1541 * and is split over multiple buffers. 1542 * This should never happen, as we try to allocate buffers
+1 -1
drivers/net/wireless/b43/dma.h
··· 163 /* DMA engine tuning knobs */ 164 #define B43_TXRING_SLOTS 256 165 #define B43_RXRING_SLOTS 64 166 - #define B43_DMA0_RX_BUFFERSIZE IEEE80211_MAX_FRAME_LEN 167 168 /* Pointer poison */ 169 #define B43_DMA_PTR_POISON ((void *)ERR_PTR(-ENOMEM))
··· 163 /* DMA engine tuning knobs */ 164 #define B43_TXRING_SLOTS 256 165 #define B43_RXRING_SLOTS 64 166 + #define B43_DMA0_RX_BUFFERSIZE (B43_DMA0_RX_FRAMEOFFSET + IEEE80211_MAX_FRAME_LEN) 167 168 /* Pointer poison */ 169 #define B43_DMA_PTR_POISON ((void *)ERR_PTR(-ENOMEM))