浏览代码

mt76: fix build failure on linux kernel 6.6

A commit introduced in kernel 6.6 has splitted page_pool.h into
several headers. Thus the included header must be modified for a
successful build.

Ref: a9ca9f9ceff3 (page_pool: split types and declarations from
page_pool.h)

Signed-off-by: Weijie Gao <[email protected]>
Weijie Gao 1 年之前
父节点
当前提交
504cf50eea
共有 1 个文件被更改,包括 24 次插入0 次删除
  1. 24 0
      package/kernel/mt76/patches/100-fix-build-on-linux-kernel-6.6.patch

+ 24 - 0
package/kernel/mt76/patches/100-fix-build-on-linux-kernel-6.6.patch

@@ -0,0 +1,24 @@
+--- a/mac80211.c
++++ b/mac80211.c
+@@ -4,7 +4,9 @@
+  */
+ #include <linux/sched.h>
+ #include <linux/of.h>
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6,6,0)
+ #include <net/page_pool.h>
++#endif
+ #include "mt76.h"
+ 
+ #define CHAN2G(_idx, _freq) {			\
+--- a/mt76.h
++++ b/mt76.h
+@@ -13,6 +13,9 @@
+ #include <linux/leds.h>
+ #include <linux/usb.h>
+ #include <linux/average.h>
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,6,0)
++#include <net/page_pool/helpers.h>
++#endif
+ #include <linux/soc/mediatek/mtk_wed.h>
+ #include <net/mac80211.h>
+ #include "util.h"