mt76: fix build failure on linux kernel 6.6
[openwrt/staging/stintel.git] / package / kernel / mt76 / patches / 100-fix-build-on-linux-kernel-6.6.patch
1 --- a/mac80211.c
2 +++ b/mac80211.c
3 @@ -4,7 +4,9 @@
4 */
5 #include <linux/sched.h>
6 #include <linux/of.h>
7 +#if LINUX_VERSION_CODE < KERNEL_VERSION(6,6,0)
8 #include <net/page_pool.h>
9 +#endif
10 #include "mt76.h"
11
12 #define CHAN2G(_idx, _freq) { \
13 --- a/mt76.h
14 +++ b/mt76.h
15 @@ -13,6 +13,9 @@
16 #include <linux/leds.h>
17 #include <linux/usb.h>
18 #include <linux/average.h>
19 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,6,0)
20 +#include <net/page_pool/helpers.h>
21 +#endif
22 #include <linux/soc/mediatek/mtk_wed.h>
23 #include <net/mac80211.h>
24 #include "util.h"