]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: mt76: use GFP_DMA32 for page_pool buffer allocation
authorPeter Chiu <chui-hao.chiu@mediatek.com>
Wed, 8 Oct 2025 10:41:49 +0000 (12:41 +0200)
committerFelix Fietkau <nbd@nbd.name>
Mon, 24 Nov 2025 13:37:53 +0000 (14:37 +0100)
Set GFP_DMA32 flag for page_pool buffers allocation since the hw relies
on 32-bit DMA addresses for WED offloading.

Tested-by: Daniel Pawlik <pawlik.dan@gmail.com>
Tested-by: Matteo Croce <teknoraver@meta.com>
Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek.com>
Co-developed-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://patch.msgid.link/20251008-wed-fixes-v1-2-8f7678583385@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mt76.h

index e0a036b03b03231218ceb01b275b69fc647211a3..37e1d9e249327d8c80686ac0bdfbae3c0347e72a 100644 (file)
@@ -1877,7 +1877,8 @@ mt76_get_page_pool_buf(struct mt76_queue *q, u32 *offset, u32 size)
 {
        struct page *page;
 
-       page = page_pool_dev_alloc_frag(q->page_pool, offset, size);
+       page = page_pool_alloc_frag(q->page_pool, offset, size,
+                                   GFP_ATOMIC | __GFP_NOWARN | GFP_DMA32);
        if (!page)
                return NULL;