-
-
Notifications
You must be signed in to change notification settings - Fork 274
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
111 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
include $(TOPDIR)/rules.mk | ||
|
||
PKG_NAME:=mt76 | ||
PKG_RELEASE=5 | ||
PKG_RELEASE=1 | ||
|
||
PKG_LICENSE:=GPLv2 | ||
PKG_LICENSE_FILES:= | ||
|
||
PKG_SOURCE_URL:=https://github.com/openwrt/mt76 | ||
PKG_SOURCE_PROTO:=git | ||
PKG_SOURCE_DATE:=2023-05-13 | ||
PKG_SOURCE_VERSION:=969b7b5ebd129068ca56e4b0d831593a2f92382f | ||
PKG_MIRROR_HASH:=d28869591d1cb9a967b72f5cd8215c7b2c3388b7b31147b7b18c797018ab8ffb | ||
PKG_SOURCE_DATE:=2024-01-18 | ||
PKG_SOURCE_VERSION:=f77188160441d5f77f08dd517632ae3f60c653b0 | ||
PKG_MIRROR_HASH:=133a5e44624fe1933c893ee0b8ac75a847753f3490c26518c2ed9798f9ef53e0 | ||
|
||
PKG_MAINTAINER:=Felix Fietkau <[email protected]> | ||
PKG_USE_NINJA:=0 | ||
|
@@ -264,22 +264,37 @@ endef | |
|
||
define KernelPackage/mt7922-firmware | ||
$(KernelPackage/mt76-default) | ||
DEPENDS+=+kmod-mt7921-common | ||
TITLE:=MediaTek MT7922 firmware | ||
endef | ||
|
||
define KernelPackage/mt792x-common | ||
$(KernelPackage/mt76-default) | ||
TITLE:=MediaTek MT792x wireless driver common code | ||
HIDDEN:=1 | ||
DEPENDS+=+kmod-mt76-connac +@DRIVER_11AX_SUPPORT | ||
FILES:= $(PKG_BUILD_DIR)/mt792x-lib.ko | ||
endef | ||
|
||
define KernelPackage/mt792x-usb | ||
$(KernelPackage/mt76-default) | ||
TITLE:=MediaTek MT792x wireless driver USB code | ||
HIDDEN:=1 | ||
DEPENDS+=+kmod-mt792x-common +kmod-mt76-usb +@DRIVER_11AX_SUPPORT | ||
FILES:= $(PKG_BUILD_DIR)/mt792x-usb.ko | ||
endef | ||
|
||
define KernelPackage/mt7921-common | ||
$(KernelPackage/mt76-default) | ||
TITLE:=MediaTek MT7615 wireless driver common code | ||
TITLE:=MediaTek MT7921 wireless driver common code | ||
HIDDEN:=1 | ||
DEPENDS+=+kmod-mt76-connac +kmod-mt7921-firmware +@DRIVER_11AX_SUPPORT | ||
DEPENDS+=+kmod-mt792x-common +kmod-mt7921-firmware +@DRIVER_11AX_SUPPORT +kmod-hwmon-core | ||
FILES:= $(PKG_BUILD_DIR)/mt7921/mt7921-common.ko | ||
endef | ||
|
||
define KernelPackage/mt7921u | ||
$(KernelPackage/mt76-default) | ||
TITLE:=MediaTek MT7921U wireless driver | ||
DEPENDS+=+kmod-mt76-usb +kmod-mt7921-common | ||
DEPENDS+=+kmod-mt792x-usb +kmod-mt7921-common | ||
FILES:= $(PKG_BUILD_DIR)/mt7921/mt7921u.ko | ||
AUTOLOAD:=$(call AutoProbe,mt7921u) | ||
endef | ||
|
@@ -300,6 +315,38 @@ define KernelPackage/mt7921e | |
AUTOLOAD:=$(call AutoProbe,mt7921e) | ||
endef | ||
|
||
define KernelPackage/mt7996e | ||
$(KernelPackage/mt76-default) | ||
TITLE:=MediaTek MT7996E wireless driver | ||
DEPENDS+=@PCI_SUPPORT +kmod-mt76-connac +kmod-hwmon-core | ||
FILES:= $(PKG_BUILD_DIR)/mt7996/mt7996e.ko | ||
AUTOLOAD:=$(call AutoProbe,mt7996e) | ||
endef | ||
|
||
define KernelPackage/mt7925-common | ||
$(KernelPackage/mt76-default) | ||
TITLE:=MediaTek MT7925 wireless driver common code | ||
HIDDEN:=1 | ||
DEPENDS+=+kmod-mt792x-common +@DRIVER_11AX_SUPPORT +kmod-hwmon-core | ||
FILES:= $(PKG_BUILD_DIR)/mt7925/mt7925-common.ko | ||
endef | ||
|
||
define KernelPackage/mt7925u | ||
$(KernelPackage/mt76-default) | ||
TITLE:=MediaTek MT7925U wireless driver | ||
DEPENDS+=+kmod-mt792x-usb +kmod-mt7925-common | ||
FILES:= $(PKG_BUILD_DIR)/mt7925/mt7925u.ko | ||
AUTOLOAD:=$(call AutoProbe,mt7921u) | ||
endef | ||
|
||
define KernelPackage/mt7925e | ||
$(KernelPackage/mt76-default) | ||
TITLE:=MediaTek MT7925e wireless driver | ||
DEPENDS+=@PCI_SUPPORT +kmod-mt7925-common | ||
FILES:= $(PKG_BUILD_DIR)/mt7925/mt7925e.ko | ||
AUTOLOAD:=$(call AutoProbe,mt7921e) | ||
endef | ||
|
||
define Package/mt76-test | ||
SECTION:=devel | ||
CATEGORY:=Development | ||
|
@@ -390,6 +437,12 @@ ifdef CONFIG_PACKAGE_kmod-mt7915e | |
NOSTDINC_FLAGS += -DCONFIG_MT798X_WMAC | ||
endif | ||
endif | ||
ifdef CONFIG_PACKAGE_kmod-mt792x-common | ||
PKG_MAKE_FLAGS += CONFIG_MT792x_LIB=m | ||
endif | ||
ifdef CONFIG_PACKAGE_kmod-mt792x-usb | ||
PKG_MAKE_FLAGS += CONFIG_MT792x_USB=m | ||
endif | ||
ifdef CONFIG_PACKAGE_kmod-mt7921-common | ||
PKG_MAKE_FLAGS += CONFIG_MT7921_COMMON=m | ||
endif | ||
|
@@ -402,6 +455,18 @@ endif | |
ifdef CONFIG_PACKAGE_kmod-mt7921e | ||
PKG_MAKE_FLAGS += CONFIG_MT7921E=m | ||
endif | ||
ifdef CONFIG_PACKAGE_kmod-mt7996e | ||
PKG_MAKE_FLAGS += CONFIG_MT7996E=m | ||
endif | ||
ifdef CONFIG_PACKAGE_kmod-mt7925-common | ||
PKG_MAKE_FLAGS += CONFIG_MT7925_COMMON=m | ||
endif | ||
ifdef CONFIG_PACKAGE_kmod-mt7925u | ||
PKG_MAKE_FLAGS += CONFIG_MT7925U=m | ||
endif | ||
ifdef CONFIG_PACKAGE_kmod-mt7925e | ||
PKG_MAKE_FLAGS += CONFIG_MT7925E=m | ||
endif | ||
|
||
define Build/Compile | ||
+$(KERNEL_MAKE) $(PKG_JOBS) \ | ||
|
@@ -579,9 +644,15 @@ $(eval $(call KernelPackage,mt7981-firmware)) | |
$(eval $(call KernelPackage,mt7986-firmware)) | ||
$(eval $(call KernelPackage,mt7921-firmware)) | ||
$(eval $(call KernelPackage,mt7922-firmware)) | ||
$(eval $(call KernelPackage,mt792x-common)) | ||
$(eval $(call KernelPackage,mt792x-usb)) | ||
$(eval $(call KernelPackage,mt7921-common)) | ||
$(eval $(call KernelPackage,mt7925-common)) | ||
$(eval $(call KernelPackage,mt7921u)) | ||
$(eval $(call KernelPackage,mt7921s)) | ||
$(eval $(call KernelPackage,mt7921e)) | ||
$(eval $(call KernelPackage,mt7925u)) | ||
$(eval $(call KernelPackage,mt7925e)) | ||
$(eval $(call KernelPackage,mt7996e)) | ||
$(eval $(call KernelPackage,mt76)) | ||
$(eval $(call BuildPackage,mt76-test)) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
diff --git a/mac80211.c b/mac80211.c | ||
index cc9e9ff1..9b29340d 100644 | ||
--- a/mac80211.c | ||
+++ b/mac80211.c | ||
@@ -4,7 +4,11 @@ | ||
*/ | ||
#include <linux/sched.h> | ||
#include <linux/of.h> | ||
+#if LINUX_VERSION_IS_LESS(6,6,0) | ||
#include <net/page_pool.h> | ||
+#else | ||
+#include <net/page_pool/helpers.h> | ||
+#endif | ||
#include "mt76.h" | ||
|
||
#define CHAN2G(_idx, _freq) { \ | ||
diff --git a/mt76.h b/mt76.h | ||
index d2ead585..bb9002d8 100644 | ||
--- a/mt76.h | ||
+++ b/mt76.h | ||
@@ -15,6 +15,10 @@ | ||
#include <linux/average.h> | ||
#include <linux/soc/mediatek/mtk_wed.h> | ||
#include <net/mac80211.h> | ||
+#if LINUX_VERSION_IS_GEQ(6,6,0) | ||
+#include <net/page_pool/helpers.h> | ||
+#endif | ||
+ | ||
#include "util.h" | ||
#include "testmode.h" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters