Skip to content

Commit

Permalink
mt76: add mt7615e support
Browse files Browse the repository at this point in the history
  • Loading branch information
coolsnowwolf committed Jul 16, 2019
1 parent b072ad4 commit 5587b29
Showing 1 changed file with 26 additions and 4 deletions.
30 changes: 26 additions & 4 deletions package/kernel/mt76/Makefile
Expand Up @@ -8,9 +8,9 @@ PKG_LICENSE_FILES:=

PKG_SOURCE_URL:=https://github.com/openwrt/mt76
PKG_SOURCE_PROTO:=git
PKG_SOURCE_DATE:=2019-04-03
PKG_SOURCE_VERSION:=b3a29655ae0bb1d75fc7f9cbebb9f37ebe3d341d
PKG_MIRROR_HASH:=
PKG_SOURCE_DATE:=2019-07-13
PKG_SOURCE_VERSION:=410923fa24de770c042ea816cff6c18b9b184a2d
PKG_MIRROR_HASH:=0f546ba43bb8212ec7851ac22f5d0d32e8dddb1b893aa6d0209c48488122df04

PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
PKG_BUILD_PARALLEL:=1
Expand All @@ -33,7 +33,7 @@ include $(INCLUDE_DIR)/package.mk
define KernelPackage/mt76-default
SUBMENU:=Wireless Drivers
DEPENDS:= \
+kmod-mac80211 @!LINUX_3_18 \
+kmod-mac80211 \
+@DRIVER_11AC_SUPPORT +@DRIVER_11N_SUPPORT +@DRIVER_11W_SUPPORT
endef

Expand Down Expand Up @@ -138,6 +138,15 @@ define KernelPackage/mt7603
AUTOLOAD:=$(call AutoProbe,mt7603e)
endef

define KernelPackage/mt7615e
$(KernelPackage/mt76-default)
TITLE:=MediaTek MT7615 wireless driver
DEPENDS+=@PCI_SUPPORT +kmod-mt76-core
FILES:=\
$(PKG_BUILD_DIR)/mt7615/mt7615e.ko
AUTOLOAD:=$(call AutoProbe,mt7615e)
endef

NOSTDINC_FLAGS = \
-I$(PKG_BUILD_DIR) \
-I$(STAGING_DIR)/usr/include/mac80211-backport/uapi \
Expand Down Expand Up @@ -181,6 +190,9 @@ endif
ifdef CONFIG_PACKAGE_kmod-mt7603
PKG_MAKE_FLAGS += CONFIG_MT7603E=m
endif
ifdef CONFIG_PACKAGE_kmod-mt7615e
PKG_MAKE_FLAGS += CONFIG_MT7615E=m
endif

define Build/Compile
+$(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" \
Expand Down Expand Up @@ -233,6 +245,15 @@ define KernelPackage/mt7603/install
$(1)/lib/firmware
endef

define KernelPackage/mt7615e/install
$(INSTALL_DIR) $(1)/lib/firmware
cp \
$(PKG_BUILD_DIR)/firmware/mt7615_cr4.bin \
$(PKG_BUILD_DIR)/firmware/mt7615_n9.bin \
$(PKG_BUILD_DIR)/firmware/mt7615_rom_patch.bin \
$(1)/lib/firmware
endef

$(eval $(call KernelPackage,mt76-core))
$(eval $(call KernelPackage,mt76-usb))
$(eval $(call KernelPackage,mt76x02-usb))
Expand All @@ -244,4 +265,5 @@ $(eval $(call KernelPackage,mt76x2-common))
$(eval $(call KernelPackage,mt76x2u))
$(eval $(call KernelPackage,mt76x2))
$(eval $(call KernelPackage,mt7603))
$(eval $(call KernelPackage,mt7615e))
$(eval $(call KernelPackage,mt76))

1 comment on commit 5587b29

@Masstone
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mark

Please sign in to comment.