mt76: backport rx buffer allocation fix from r46409
[15.05/openwrt.git] / package / kernel / mt76 / patches / 100-dma-fix-rx-buffer-allocation-size.patch
1 From: Felix Fietkau <nbd@openwrt.org>
2 Date: Sat, 18 Jul 2015 17:51:24 +0200
3 Subject: [PATCH] dma: fix rx buffer allocation size
4
5 Signed-off-by: Felix Fietkau <nbd@openwrt.org>
6 ---
7
8 --- a/dma.c
9 +++ b/dma.c
10 @@ -158,7 +158,7 @@ mt76_dma_rx_fill(struct mt76_dev *dev, s
11         while (q->queued < q->ndesc - 1) {
12                 int offset = mt76_rx_buf_offset(dev);
13  
14 -               buf = kzalloc(len, GFP_ATOMIC);
15 +               buf = kzalloc(q->buf_size, GFP_ATOMIC);
16                 if (!buf)
17                         break;
18