💐 Sync 2026-01-19 10:48:25
This commit is contained in:
775
Makefile
Normal file
775
Makefile
Normal file
@@ -0,0 +1,775 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=mt76
|
||||
PKG_RELEASE=2
|
||||
|
||||
PKG_LICENSE:=BSD-3-Clause-Clear
|
||||
PKG_LICENSE_FILES:=
|
||||
|
||||
PKG_SOURCE_URL:=https://github.com/openwrt/mt76
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_DATE:=2025-11-06
|
||||
PKG_SOURCE_VERSION:=eb567bc7f9b692bbf1ddfe31dd740861c58ec85b
|
||||
PKG_MIRROR_HASH:=7cfe242a5494cdf5d8e8eea86633778a525717528bcce70aedef96eee5594383
|
||||
|
||||
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
||||
PKG_USE_NINJA:=0
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
||||
PKG_CONFIG_DEPENDS += \
|
||||
CONFIG_PACKAGE_kmod-mt76-usb \
|
||||
CONFIG_PACKAGE_kmod-mt76x02-common \
|
||||
CONFIG_PACKAGE_kmod-mt76x0-common \
|
||||
CONFIG_PACKAGE_kmod-mt76x0u \
|
||||
CONFIG_PACKAGE_kmod-mt76x2-common \
|
||||
CONFIG_PACKAGE_kmod-mt76x2 \
|
||||
CONFIG_PACKAGE_kmod-mt76x2u \
|
||||
CONFIG_PACKAGE_kmod-mt7603 \
|
||||
CONFIG_PACKAGE_CFG80211_TESTMODE
|
||||
|
||||
STAMP_CONFIGURED_DEPENDS := $(STAGING_DIR)/usr/include/mac80211-backport/backport/autoconf.h
|
||||
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/cmake.mk
|
||||
|
||||
CMAKE_SOURCE_DIR:=$(PKG_BUILD_DIR)/tools
|
||||
CMAKE_BINARY_DIR:=$(PKG_BUILD_DIR)/tools
|
||||
|
||||
define KernelPackage/mt76-default
|
||||
SUBMENU:=Wireless Drivers
|
||||
DEPENDS:= \
|
||||
+kmod-mac80211 \
|
||||
+@DRIVER_11AC_SUPPORT \
|
||||
+@KERNEL_PAGE_POOL \
|
||||
@!TARGET_uml
|
||||
endef
|
||||
|
||||
define KernelPackage/mt76
|
||||
SUBMENU:=Wireless Drivers
|
||||
TITLE:=MediaTek MT76x2/MT7603 wireless driver (metapackage)
|
||||
DEPENDS:= \
|
||||
+kmod-mt76-core +kmod-mt76x2 +kmod-mt7603
|
||||
endef
|
||||
|
||||
define KernelPackage/mt76-core
|
||||
$(KernelPackage/mt76-default)
|
||||
TITLE:=MediaTek MT76xx wireless driver
|
||||
HIDDEN:=1
|
||||
FILES:=\
|
||||
$(PKG_BUILD_DIR)/mt76.ko
|
||||
endef
|
||||
|
||||
define KernelPackage/mt76-usb
|
||||
$(KernelPackage/mt76-default)
|
||||
TITLE:=MediaTek MT76xx wireless driver USB support
|
||||
DEPENDS += +kmod-usb-core +kmod-mt76-core
|
||||
HIDDEN:=1
|
||||
FILES:=\
|
||||
$(PKG_BUILD_DIR)/mt76-usb.ko
|
||||
endef
|
||||
|
||||
define KernelPackage/mt76x02-usb
|
||||
$(KernelPackage/mt76-default)
|
||||
TITLE:=MediaTek MT76x0/MT76x2 USB wireless driver common code
|
||||
DEPENDS+=+kmod-mt76-usb +kmod-mt76x02-common
|
||||
HIDDEN:=1
|
||||
FILES:=$(PKG_BUILD_DIR)/mt76x02-usb.ko
|
||||
endef
|
||||
|
||||
define KernelPackage/mt76x02-common
|
||||
$(KernelPackage/mt76-default)
|
||||
TITLE:=MediaTek MT76x0/MT76x2 wireless driver common code
|
||||
DEPENDS+=+kmod-mt76-core
|
||||
HIDDEN:=1
|
||||
FILES:=$(PKG_BUILD_DIR)/mt76x02-lib.ko
|
||||
endef
|
||||
|
||||
define KernelPackage/mt76x0-common
|
||||
$(KernelPackage/mt76-default)
|
||||
TITLE:=MediaTek MT76x0 wireless driver common code
|
||||
DEPENDS+=+kmod-mt76x02-common
|
||||
HIDDEN:=1
|
||||
FILES:=$(PKG_BUILD_DIR)/mt76x0/mt76x0-common.ko
|
||||
endef
|
||||
|
||||
define KernelPackage/mt76x0e
|
||||
$(KernelPackage/mt76-default)
|
||||
TITLE:=MediaTek MT76x0E wireless driver
|
||||
DEPENDS+=@PCI_SUPPORT +kmod-mt76x0-common
|
||||
FILES:=\
|
||||
$(PKG_BUILD_DIR)/mt76x0/mt76x0e.ko
|
||||
AUTOLOAD:=$(call AutoProbe,mt76x0e)
|
||||
endef
|
||||
|
||||
define KernelPackage/mt76x0u
|
||||
$(KernelPackage/mt76-default)
|
||||
TITLE:=MediaTek MT76x0U wireless driver
|
||||
DEPENDS+=+kmod-mt76x0-common +kmod-mt76x02-usb
|
||||
FILES:=\
|
||||
$(PKG_BUILD_DIR)/mt76x0/mt76x0u.ko
|
||||
AUTOLOAD:=$(call AutoProbe,mt76x0u)
|
||||
endef
|
||||
|
||||
define KernelPackage/mt76x2-common
|
||||
$(KernelPackage/mt76-default)
|
||||
TITLE:=MediaTek MT76x2 wireless driver common code
|
||||
DEPENDS+=+kmod-mt76-core +kmod-mt76x02-common
|
||||
HIDDEN:=1
|
||||
FILES:=$(PKG_BUILD_DIR)/mt76x2/mt76x2-common.ko
|
||||
endef
|
||||
|
||||
define KernelPackage/mt76x2u
|
||||
$(KernelPackage/mt76-default)
|
||||
TITLE:=MediaTek MT76x2U wireless driver
|
||||
DEPENDS+=+kmod-mt76x2-common +kmod-mt76x02-usb
|
||||
FILES:=\
|
||||
$(PKG_BUILD_DIR)/mt76x2/mt76x2u.ko
|
||||
AUTOLOAD:=$(call AutoProbe,mt76x2u)
|
||||
endef
|
||||
|
||||
define KernelPackage/mt76x2
|
||||
$(KernelPackage/mt76-default)
|
||||
TITLE:=MediaTek MT76x2 wireless driver
|
||||
DEPENDS+=@PCI_SUPPORT +kmod-mt76x2-common
|
||||
FILES:=\
|
||||
$(PKG_BUILD_DIR)/mt76x2/mt76x2e.ko
|
||||
AUTOLOAD:=$(call AutoProbe,mt76x2e)
|
||||
endef
|
||||
|
||||
define KernelPackage/mt7603
|
||||
$(KernelPackage/mt76-default)
|
||||
TITLE:=MediaTek MT7603 wireless driver
|
||||
DEPENDS+=@PCI_SUPPORT +kmod-mt76-core
|
||||
FILES:=\
|
||||
$(PKG_BUILD_DIR)/mt7603/mt7603e.ko
|
||||
AUTOLOAD:=$(call AutoProbe,mt7603e)
|
||||
endef
|
||||
|
||||
define KernelPackage/mt76-connac
|
||||
$(KernelPackage/mt76-default)
|
||||
TITLE:=MediaTek MT7615/MT79xx wireless driver common code
|
||||
HIDDEN:=1
|
||||
DEPENDS+=+kmod-mt76-core
|
||||
FILES:= $(PKG_BUILD_DIR)/mt76-connac-lib.ko
|
||||
endef
|
||||
|
||||
define KernelPackage/mt76-sdio
|
||||
$(KernelPackage/mt76-default)
|
||||
TITLE:=MediaTek MT7615/MT79xx SDIO driver common code
|
||||
HIDDEN:=1
|
||||
DEPENDS+=+kmod-mt76-core +kmod-mmc
|
||||
FILES:= $(PKG_BUILD_DIR)/mt76-sdio.ko
|
||||
endef
|
||||
|
||||
define KernelPackage/mt7615-common
|
||||
$(KernelPackage/mt76-default)
|
||||
TITLE:=MediaTek MT7615 wireless driver common code
|
||||
HIDDEN:=1
|
||||
DEPENDS+=@PCI_SUPPORT +kmod-mt76-core +kmod-mt76-connac +kmod-hwmon-core
|
||||
FILES:= $(PKG_BUILD_DIR)/mt7615/mt7615-common.ko
|
||||
endef
|
||||
|
||||
define KernelPackage/mt7615-firmware
|
||||
$(KernelPackage/mt76-default)
|
||||
TITLE:=MediaTek MT7615e firmware
|
||||
DEPENDS+=+kmod-mt7615e
|
||||
endef
|
||||
|
||||
define KernelPackage/mt7615e
|
||||
$(KernelPackage/mt76-default)
|
||||
TITLE:=MediaTek MT7615e wireless driver
|
||||
DEPENDS+=@PCI_SUPPORT +kmod-mt7615-common
|
||||
FILES:= $(PKG_BUILD_DIR)/mt7615/mt7615e.ko
|
||||
AUTOLOAD:=$(call AutoProbe,mt7615e)
|
||||
endef
|
||||
|
||||
define KernelPackage/mt7622-firmware
|
||||
$(KernelPackage/mt76-default)
|
||||
TITLE:=MediaTek MT7622 firmware
|
||||
DEPENDS+=+kmod-mt7615e
|
||||
endef
|
||||
|
||||
define KernelPackage/mt7663-firmware-ap
|
||||
$(KernelPackage/mt76-default)
|
||||
TITLE:=MediaTek MT7663e firmware (optimized for AP)
|
||||
endef
|
||||
|
||||
define KernelPackage/mt7663-firmware-sta
|
||||
$(KernelPackage/mt76-default)
|
||||
TITLE:=MediaTek MT7663e firmware (client mode offload)
|
||||
endef
|
||||
|
||||
define KernelPackage/mt7663-usb-sdio
|
||||
$(KernelPackage/mt76-default)
|
||||
TITLE:=MediaTek MT7663 USB/SDIO shared code
|
||||
DEPENDS+=+kmod-mt7615-common
|
||||
HIDDEN:=1
|
||||
FILES:= \
|
||||
$(PKG_BUILD_DIR)/mt7615/mt7663-usb-sdio-common.ko
|
||||
endef
|
||||
|
||||
define KernelPackage/mt7663s
|
||||
$(KernelPackage/mt76-default)
|
||||
TITLE:=MediaTek MT7663s wireless driver
|
||||
DEPENDS+=+kmod-mt76-sdio +kmod-mt7615-common +kmod-mt7663-usb-sdio
|
||||
FILES:= \
|
||||
$(PKG_BUILD_DIR)/mt7615/mt7663s.ko
|
||||
AUTOLOAD:=$(call AutoProbe,mt7663s)
|
||||
endef
|
||||
|
||||
define KernelPackage/mt7663u
|
||||
$(KernelPackage/mt76-default)
|
||||
TITLE:=MediaTek MT7663u wireless driver
|
||||
DEPENDS+=+kmod-mt76-usb +kmod-mt7615-common +kmod-mt7663-usb-sdio
|
||||
FILES:= $(PKG_BUILD_DIR)/mt7615/mt7663u.ko
|
||||
AUTOLOAD:=$(call AutoProbe,mt7663u)
|
||||
endef
|
||||
|
||||
define KernelPackage/mt7915-firmware
|
||||
$(KernelPackage/mt76-default)
|
||||
TITLE:=MediaTek MT7915 firmware
|
||||
DEPENDS+=+kmod-mt7915e
|
||||
endef
|
||||
|
||||
define KernelPackage/mt7915e
|
||||
$(KernelPackage/mt76-default)
|
||||
TITLE:=MediaTek MT7915e wireless driver
|
||||
DEPENDS+=@PCI_SUPPORT +kmod-mt76-connac +kmod-hwmon-core +kmod-thermal +@DRIVER_11AX_SUPPORT +@KERNEL_RELAY
|
||||
FILES:= $(PKG_BUILD_DIR)/mt7915/mt7915e.ko
|
||||
AUTOLOAD:=$(call AutoProbe,mt7915e)
|
||||
endef
|
||||
|
||||
define KernelPackage/mt7916-firmware
|
||||
$(KernelPackage/mt76-default)
|
||||
DEPENDS+=+kmod-mt7915e
|
||||
TITLE:=MediaTek MT7916 firmware
|
||||
endef
|
||||
|
||||
define KernelPackage/mt7981-firmware
|
||||
$(KernelPackage/mt76-default)
|
||||
DEPENDS:=@TARGET_mediatek_filogic
|
||||
TITLE:=MediaTek MT7981 firmware
|
||||
endef
|
||||
|
||||
define KernelPackage/mt7986-firmware
|
||||
$(KernelPackage/mt76-default)
|
||||
DEPENDS:=@TARGET_mediatek_filogic
|
||||
TITLE:=MediaTek MT7986 firmware
|
||||
endef
|
||||
|
||||
define KernelPackage/mt7921-firmware
|
||||
$(KernelPackage/mt76-default)
|
||||
TITLE:=MediaTek MT7921 firmware
|
||||
endef
|
||||
|
||||
define KernelPackage/mt7922-firmware
|
||||
$(KernelPackage/mt76-default)
|
||||
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 MT7921 wireless driver common code
|
||||
HIDDEN:=1
|
||||
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-mt792x-usb +kmod-mt7921-common
|
||||
FILES:= $(PKG_BUILD_DIR)/mt7921/mt7921u.ko
|
||||
AUTOLOAD:=$(call AutoProbe,mt7921u)
|
||||
endef
|
||||
|
||||
define KernelPackage/mt7921s
|
||||
$(KernelPackage/mt76-default)
|
||||
TITLE:=MediaTek MT7921S wireless driver
|
||||
DEPENDS+=+kmod-mt76-sdio +kmod-mt7921-common
|
||||
FILES:= $(PKG_BUILD_DIR)/mt7921/mt7921s.ko
|
||||
AUTOLOAD:=$(call AutoProbe,mt7921s)
|
||||
endef
|
||||
|
||||
define KernelPackage/mt7921e
|
||||
$(KernelPackage/mt76-default)
|
||||
TITLE:=MediaTek MT7921e wireless driver
|
||||
DEPENDS+=@PCI_SUPPORT +kmod-mt7921-common
|
||||
FILES:= $(PKG_BUILD_DIR)/mt7921/mt7921e.ko
|
||||
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 +@DRIVER_11AX_SUPPORT \
|
||||
+@KERNEL_RELAY +@DRIVER_11BE_SUPPORT
|
||||
FILES:= $(PKG_BUILD_DIR)/mt7996/mt7996e.ko
|
||||
AUTOLOAD:=$(call AutoProbe,mt7996e)
|
||||
endef
|
||||
|
||||
define KernelPackage/mt7992-firmware
|
||||
$(KernelPackage/mt76-default)
|
||||
TITLE:=MediaTek MT7992 firmware
|
||||
DEPENDS+=+kmod-mt7996e
|
||||
endef
|
||||
|
||||
define KernelPackage/mt7992-23-firmware
|
||||
$(KernelPackage/mt76-default)
|
||||
TITLE:=MediaTek MT7996 firmware (2+3 antenna variant)
|
||||
DEPENDS+=+kmod-mt7996e
|
||||
endef
|
||||
|
||||
define KernelPackage/mt7996-firmware-common
|
||||
$(KernelPackage/mt76-default)
|
||||
TITLE:=MediaTek MT7996 firmware (common files)
|
||||
HIDDEN:=1
|
||||
endef
|
||||
|
||||
define KernelPackage/mt7996-firmware
|
||||
$(KernelPackage/mt76-default)
|
||||
TITLE:=MediaTek MT7996 firmware
|
||||
DEPENDS+=+kmod-mt7996e +kmod-mt7996-firmware-common
|
||||
endef
|
||||
|
||||
define KernelPackage/mt7996-233-firmware
|
||||
$(KernelPackage/mt76-default)
|
||||
TITLE:=MediaTek MT7996 firmware (2+3+3 antenna variant)
|
||||
DEPENDS+=+kmod-mt7996e +kmod-mt7996-firmware-common
|
||||
endef
|
||||
|
||||
define KernelPackage/mt7925-firmware
|
||||
$(KernelPackage/mt76-default)
|
||||
TITLE:=MediaTek MT7925 firmware
|
||||
DEPENDS+=+kmod-mt7925e
|
||||
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 +@DRIVER_11BE_SUPPORT
|
||||
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,mt7925u)
|
||||
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,mt7925e)
|
||||
endef
|
||||
|
||||
define Package/mt76-test
|
||||
SECTION:=devel
|
||||
CATEGORY:=Development
|
||||
TITLE:=mt76 testmode CLI
|
||||
DEPENDS:=kmod-mt76-core +libnl-tiny
|
||||
endef
|
||||
|
||||
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/libnl-tiny
|
||||
|
||||
NOSTDINC_FLAGS := \
|
||||
$(KERNEL_NOSTDINC_FLAGS) \
|
||||
-I$(PKG_BUILD_DIR) \
|
||||
-I$(STAGING_DIR)/usr/include/mac80211-backport/uapi \
|
||||
-I$(STAGING_DIR)/usr/include/mac80211-backport \
|
||||
-I$(STAGING_DIR)/usr/include/mac80211/uapi \
|
||||
-I$(STAGING_DIR)/usr/include/mac80211 \
|
||||
-include backport/autoconf.h \
|
||||
-include backport/backport.h
|
||||
|
||||
ifdef CONFIG_PACKAGE_MAC80211_MESH
|
||||
NOSTDINC_FLAGS += -DCONFIG_MAC80211_MESH
|
||||
endif
|
||||
|
||||
ifdef CONFIG_PACKAGE_CFG80211_TESTMODE
|
||||
NOSTDINC_FLAGS += -DCONFIG_NL80211_TESTMODE
|
||||
PKG_MAKE_FLAGS += CONFIG_NL80211_TESTMODE=y
|
||||
endif
|
||||
|
||||
ifdef CONFIG_PACKAGE_kmod-mt76-usb
|
||||
PKG_MAKE_FLAGS += CONFIG_MT76_USB=m
|
||||
endif
|
||||
ifdef CONFIG_PACKAGE_kmod-mt76x02-common
|
||||
PKG_MAKE_FLAGS += CONFIG_MT76x02_LIB=m
|
||||
endif
|
||||
ifdef CONFIG_PACKAGE_kmod-mt76x02-usb
|
||||
PKG_MAKE_FLAGS += CONFIG_MT76x02_USB=m
|
||||
endif
|
||||
ifdef CONFIG_PACKAGE_kmod-mt76x0-common
|
||||
PKG_MAKE_FLAGS += CONFIG_MT76x0_COMMON=m
|
||||
endif
|
||||
ifdef CONFIG_PACKAGE_kmod-mt76x0e
|
||||
PKG_MAKE_FLAGS += CONFIG_MT76x0E=m
|
||||
endif
|
||||
ifdef CONFIG_PACKAGE_kmod-mt76x0u
|
||||
PKG_MAKE_FLAGS += CONFIG_MT76x0U=m
|
||||
endif
|
||||
ifdef CONFIG_PACKAGE_kmod-mt76x2-common
|
||||
PKG_MAKE_FLAGS += CONFIG_MT76x2_COMMON=m
|
||||
endif
|
||||
ifdef CONFIG_PACKAGE_kmod-mt76x2
|
||||
PKG_MAKE_FLAGS += CONFIG_MT76x2E=m
|
||||
endif
|
||||
ifdef CONFIG_PACKAGE_kmod-mt76x2u
|
||||
PKG_MAKE_FLAGS += CONFIG_MT76x2U=m
|
||||
endif
|
||||
ifdef CONFIG_PACKAGE_kmod-mt7603
|
||||
PKG_MAKE_FLAGS += CONFIG_MT7603E=m
|
||||
endif
|
||||
ifdef CONFIG_PACKAGE_kmod-mt76-connac
|
||||
PKG_MAKE_FLAGS += CONFIG_MT76_CONNAC_LIB=m
|
||||
endif
|
||||
ifdef CONFIG_PACKAGE_kmod-mt76-sdio
|
||||
PKG_MAKE_FLAGS += CONFIG_MT76_SDIO=m
|
||||
endif
|
||||
ifdef CONFIG_PACKAGE_kmod-mt7615-common
|
||||
PKG_MAKE_FLAGS += CONFIG_MT7615_COMMON=m
|
||||
endif
|
||||
ifdef CONFIG_PACKAGE_kmod-mt7615e
|
||||
PKG_MAKE_FLAGS += CONFIG_MT7615E=m
|
||||
ifdef CONFIG_TARGET_mediatek_mt7622
|
||||
PKG_MAKE_FLAGS += CONFIG_MT7622_WMAC=y
|
||||
NOSTDINC_FLAGS += -DCONFIG_MT7622_WMAC
|
||||
endif
|
||||
endif
|
||||
ifdef CONFIG_PACKAGE_kmod-mt7663-usb-sdio
|
||||
PKG_MAKE_FLAGS += CONFIG_MT7663_USB_SDIO_COMMON=m
|
||||
endif
|
||||
ifdef CONFIG_PACKAGE_kmod-mt7663s
|
||||
PKG_MAKE_FLAGS += CONFIG_MT7663S=m
|
||||
endif
|
||||
ifdef CONFIG_PACKAGE_kmod-mt7663u
|
||||
PKG_MAKE_FLAGS += CONFIG_MT7663U=m
|
||||
endif
|
||||
ifdef CONFIG_PACKAGE_kmod-mt7915e
|
||||
PKG_MAKE_FLAGS += CONFIG_MT7915E=m
|
||||
ifdef CONFIG_TARGET_mediatek_filogic
|
||||
PKG_MAKE_FLAGS += CONFIG_MT798X_WMAC=y
|
||||
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
|
||||
ifdef CONFIG_PACKAGE_kmod-mt7921u
|
||||
PKG_MAKE_FLAGS += CONFIG_MT7921U=m
|
||||
endif
|
||||
ifdef CONFIG_PACKAGE_kmod-mt7921s
|
||||
PKG_MAKE_FLAGS += CONFIG_MT7921S=m
|
||||
endif
|
||||
ifdef CONFIG_PACKAGE_kmod-mt7921e
|
||||
PKG_MAKE_FLAGS += CONFIG_MT7921E=m
|
||||
endif
|
||||
ifdef CONFIG_PACKAGE_kmod-mt7996e
|
||||
PKG_MAKE_FLAGS += CONFIG_MT7996E=m
|
||||
ifdef CONFIG_TARGET_airoha_an7581
|
||||
PKG_MAKE_FLAGS += CONFIG_MT76_NPU=y
|
||||
PKG_MAKE_FLAGS += CONFIG_MT7996_NPU=y
|
||||
NOSTDINC_FLAGS += -DCONFIG_MT76_NPU
|
||||
NOSTDINC_FLAGS += -DCONFIG_MT7996_NPU
|
||||
endif
|
||||
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) \
|
||||
$(PKG_MAKE_FLAGS) \
|
||||
M="$(PKG_BUILD_DIR)" \
|
||||
NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \
|
||||
modules
|
||||
$(MAKE) -C $(PKG_BUILD_DIR)/tools
|
||||
endef
|
||||
|
||||
define Build/Install
|
||||
:
|
||||
endef
|
||||
|
||||
define Package/kmod-mt76/install
|
||||
true
|
||||
endef
|
||||
|
||||
define KernelPackage/mt76x0-common/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/mediatek
|
||||
cp \
|
||||
$(PKG_BUILD_DIR)/firmware/mt7610e.bin \
|
||||
$(1)/lib/firmware/mediatek
|
||||
endef
|
||||
|
||||
define KernelPackage/mt76x2-common/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware
|
||||
cp \
|
||||
$(PKG_BUILD_DIR)/firmware/mt7662_rom_patch.bin \
|
||||
$(PKG_BUILD_DIR)/firmware/mt7662.bin \
|
||||
$(1)/lib/firmware
|
||||
endef
|
||||
|
||||
define KernelPackage/mt76x0u/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/mediatek
|
||||
ln -sf mt7610e.bin $(1)/lib/firmware/mediatek/mt7610u.bin
|
||||
endef
|
||||
|
||||
define KernelPackage/mt76x2u/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/mediatek
|
||||
ln -sf ../mt7662.bin $(1)/lib/firmware/mediatek/mt7662u.bin
|
||||
ln -sf ../mt7662_rom_patch.bin $(1)/lib/firmware/mediatek/mt7662u_rom_patch.bin
|
||||
endef
|
||||
|
||||
define KernelPackage/mt7603/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware
|
||||
cp $(if $(CONFIG_TARGET_ramips_mt76x8), \
|
||||
$(PKG_BUILD_DIR)/firmware/mt7628_e1.bin \
|
||||
$(PKG_BUILD_DIR)/firmware/mt7628_e2.bin \
|
||||
,\
|
||||
$(PKG_BUILD_DIR)/firmware/mt7603_e1.bin \
|
||||
$(PKG_BUILD_DIR)/firmware/mt7603_e2.bin \
|
||||
) \
|
||||
$(1)/lib/firmware
|
||||
endef
|
||||
|
||||
define KernelPackage/mt7615-firmware/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/mediatek
|
||||
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/mediatek
|
||||
endef
|
||||
|
||||
define KernelPackage/mt7622-firmware/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/mediatek
|
||||
cp \
|
||||
$(PKG_BUILD_DIR)/firmware/mt7622_n9.bin \
|
||||
$(PKG_BUILD_DIR)/firmware/mt7622_rom_patch.bin \
|
||||
$(1)/lib/firmware/mediatek
|
||||
endef
|
||||
|
||||
define KernelPackage/mt7663-firmware-ap/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/mediatek
|
||||
cp \
|
||||
$(PKG_BUILD_DIR)/firmware/mt7663_n9_rebb.bin \
|
||||
$(PKG_BUILD_DIR)/firmware/mt7663pr2h_rebb.bin \
|
||||
$(1)/lib/firmware/mediatek
|
||||
endef
|
||||
|
||||
define KernelPackage/mt7663-firmware-sta/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/mediatek
|
||||
cp \
|
||||
$(PKG_BUILD_DIR)/firmware/mt7663_n9_v3.bin \
|
||||
$(PKG_BUILD_DIR)/firmware/mt7663pr2h.bin \
|
||||
$(1)/lib/firmware/mediatek
|
||||
endef
|
||||
|
||||
define KernelPackage/mt7915-firmware/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/mediatek
|
||||
cp \
|
||||
$(PKG_BUILD_DIR)/firmware/mt7915_wa.bin \
|
||||
$(PKG_BUILD_DIR)/firmware/mt7915_wm.bin \
|
||||
$(PKG_BUILD_DIR)/firmware/mt7915_rom_patch.bin \
|
||||
$(1)/lib/firmware/mediatek
|
||||
endef
|
||||
|
||||
define KernelPackage/mt7916-firmware/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/mediatek
|
||||
cp \
|
||||
$(PKG_BUILD_DIR)/firmware/mt7916_wa.bin \
|
||||
$(PKG_BUILD_DIR)/firmware/mt7916_wm.bin \
|
||||
$(PKG_BUILD_DIR)/firmware/mt7916_rom_patch.bin \
|
||||
$(1)/lib/firmware/mediatek
|
||||
endef
|
||||
|
||||
define KernelPackage/mt7981-firmware/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/mediatek
|
||||
cp \
|
||||
$(PKG_BUILD_DIR)/firmware/mt7981_wa.bin \
|
||||
$(PKG_BUILD_DIR)/firmware/mt7981_wm.bin \
|
||||
$(PKG_BUILD_DIR)/firmware/mt7981_rom_patch.bin \
|
||||
$(1)/lib/firmware/mediatek
|
||||
endef
|
||||
|
||||
define KernelPackage/mt7986-firmware/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/mediatek
|
||||
cp \
|
||||
$(PKG_BUILD_DIR)/firmware/mt7986_wa.bin \
|
||||
$(PKG_BUILD_DIR)/firmware/mt7986_wm_mt7975.bin \
|
||||
$(PKG_BUILD_DIR)/firmware/mt7986_wm.bin \
|
||||
$(PKG_BUILD_DIR)/firmware/mt7986_rom_patch_mt7975.bin \
|
||||
$(PKG_BUILD_DIR)/firmware/mt7986_rom_patch.bin \
|
||||
$(1)/lib/firmware/mediatek
|
||||
endef
|
||||
|
||||
define KernelPackage/mt7921-firmware/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/mediatek
|
||||
cp \
|
||||
$(PKG_BUILD_DIR)/firmware/WIFI_MT7961_patch_mcu_1_2_hdr.bin \
|
||||
$(PKG_BUILD_DIR)/firmware/WIFI_RAM_CODE_MT7961_1.bin \
|
||||
$(1)/lib/firmware/mediatek
|
||||
endef
|
||||
|
||||
define KernelPackage/mt7922-firmware/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/mediatek
|
||||
cp \
|
||||
$(PKG_BUILD_DIR)/firmware/WIFI_MT7922_patch_mcu_1_1_hdr.bin \
|
||||
$(PKG_BUILD_DIR)/firmware/WIFI_RAM_CODE_MT7922_1.bin \
|
||||
$(1)/lib/firmware/mediatek
|
||||
endef
|
||||
|
||||
define KernelPackage/mt7925-firmware/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/mediatek/mt7925
|
||||
cp \
|
||||
$(PKG_BUILD_DIR)/firmware/mt7925/WIFI_MT7925_PATCH_MCU_1_1_hdr.bin \
|
||||
$(PKG_BUILD_DIR)/firmware/mt7925/WIFI_RAM_CODE_MT7925_1_1.bin \
|
||||
$(1)/lib/firmware/mediatek/mt7925
|
||||
endef
|
||||
|
||||
define KernelPackage/mt7992-firmware/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/mediatek/mt7996
|
||||
cp \
|
||||
$(PKG_BUILD_DIR)/firmware/mt7996/mt7992_dsp.bin \
|
||||
$(PKG_BUILD_DIR)/firmware/mt7996/mt7992_eeprom.bin \
|
||||
$(PKG_BUILD_DIR)/firmware/mt7996/mt7992_eeprom_2i5i.bin \
|
||||
$(PKG_BUILD_DIR)/firmware/mt7996/mt7992_eeprom_2i5e.bin \
|
||||
$(PKG_BUILD_DIR)/firmware/mt7996/mt7992_rom_patch.bin \
|
||||
$(PKG_BUILD_DIR)/firmware/mt7996/mt7992_wa.bin \
|
||||
$(PKG_BUILD_DIR)/firmware/mt7996/mt7992_wm.bin \
|
||||
$(1)/lib/firmware/mediatek/mt7996
|
||||
endef
|
||||
|
||||
define KernelPackage/mt7992-23-firmware/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/mediatek/mt7996
|
||||
cp \
|
||||
$(PKG_BUILD_DIR)/firmware/mt7996/mt7992_dsp_23.bin \
|
||||
$(PKG_BUILD_DIR)/firmware/mt7996/mt7992_eeprom_23.bin \
|
||||
$(PKG_BUILD_DIR)/firmware/mt7996/mt7992_eeprom_23_2i5i.bin \
|
||||
$(PKG_BUILD_DIR)/firmware/mt7996/mt7992_rom_patch_23.bin \
|
||||
$(PKG_BUILD_DIR)/firmware/mt7996/mt7992_wa_23.bin \
|
||||
$(PKG_BUILD_DIR)/firmware/mt7996/mt7992_wm_23.bin \
|
||||
$(1)/lib/firmware/mediatek/mt7996
|
||||
endef
|
||||
|
||||
define KernelPackage/mt7996-firmware-common/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/mediatek/mt7996
|
||||
cp \
|
||||
$(PKG_BUILD_DIR)/firmware/mt7996/mt7996_dsp.bin \
|
||||
$(1)/lib/firmware/mediatek/mt7996
|
||||
endef
|
||||
|
||||
define KernelPackage/mt7996-firmware/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/mediatek/mt7996
|
||||
cp \
|
||||
$(PKG_BUILD_DIR)/firmware/mt7996/mt7996_eeprom.bin \
|
||||
$(PKG_BUILD_DIR)/firmware/mt7996/mt7996_eeprom_2i5i6i.bin \
|
||||
$(PKG_BUILD_DIR)/firmware/mt7996/mt7996_rom_patch.bin \
|
||||
$(PKG_BUILD_DIR)/firmware/mt7996/mt7996_wa.bin \
|
||||
$(PKG_BUILD_DIR)/firmware/mt7996/mt7996_wm.bin \
|
||||
$(1)/lib/firmware/mediatek/mt7996
|
||||
endef
|
||||
|
||||
define KernelPackage/mt7996-233-firmware/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/mediatek/mt7996
|
||||
cp \
|
||||
$(PKG_BUILD_DIR)/firmware/mt7996/mt7996_eeprom_233.bin \
|
||||
$(PKG_BUILD_DIR)/firmware/mt7996/mt7996_eeprom_233_2i5i6i.bin \
|
||||
$(PKG_BUILD_DIR)/firmware/mt7996/mt7996_rom_patch_233.bin \
|
||||
$(PKG_BUILD_DIR)/firmware/mt7996/mt7996_wa_233.bin \
|
||||
$(PKG_BUILD_DIR)/firmware/mt7996/mt7996_wm_233.bin \
|
||||
$(1)/lib/firmware/mediatek/mt7996
|
||||
endef
|
||||
|
||||
define Package/mt76-test/install
|
||||
mkdir -p $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/mt76-test $(1)/usr/sbin
|
||||
endef
|
||||
|
||||
define Build/InstallDev
|
||||
mkdir -p $(STAGING_DIR_IMAGE)
|
||||
$(CP) $(PKG_BUILD_DIR)/firmware/mt7981_eeprom_mt7976_dbdc.bin $(STAGING_DIR_IMAGE)/
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,mt76-core))
|
||||
$(eval $(call KernelPackage,mt76-usb))
|
||||
$(eval $(call KernelPackage,mt76x02-usb))
|
||||
$(eval $(call KernelPackage,mt76x02-common))
|
||||
$(eval $(call KernelPackage,mt76x0-common))
|
||||
$(eval $(call KernelPackage,mt76x0e))
|
||||
$(eval $(call KernelPackage,mt76x0u))
|
||||
$(eval $(call KernelPackage,mt76x2-common))
|
||||
$(eval $(call KernelPackage,mt76x2u))
|
||||
$(eval $(call KernelPackage,mt76x2))
|
||||
$(eval $(call KernelPackage,mt7603))
|
||||
$(eval $(call KernelPackage,mt76-connac))
|
||||
$(eval $(call KernelPackage,mt76-sdio))
|
||||
$(eval $(call KernelPackage,mt7615-common))
|
||||
$(eval $(call KernelPackage,mt7615-firmware))
|
||||
$(eval $(call KernelPackage,mt7622-firmware))
|
||||
$(eval $(call KernelPackage,mt7615e))
|
||||
$(eval $(call KernelPackage,mt7663-firmware-ap))
|
||||
$(eval $(call KernelPackage,mt7663-firmware-sta))
|
||||
$(eval $(call KernelPackage,mt7663-usb-sdio))
|
||||
$(eval $(call KernelPackage,mt7663u))
|
||||
$(eval $(call KernelPackage,mt7663s))
|
||||
$(eval $(call KernelPackage,mt7915-firmware))
|
||||
$(eval $(call KernelPackage,mt7915e))
|
||||
$(eval $(call KernelPackage,mt7916-firmware))
|
||||
$(eval $(call KernelPackage,mt7981-firmware))
|
||||
$(eval $(call KernelPackage,mt7986-firmware))
|
||||
$(eval $(call KernelPackage,mt7921-firmware))
|
||||
$(eval $(call KernelPackage,mt7922-firmware))
|
||||
$(eval $(call KernelPackage,mt7925-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,mt7992-firmware))
|
||||
$(eval $(call KernelPackage,mt7992-23-firmware))
|
||||
$(eval $(call KernelPackage,mt7996-firmware-common))
|
||||
$(eval $(call KernelPackage,mt7996-firmware))
|
||||
$(eval $(call KernelPackage,mt7996-233-firmware))
|
||||
$(eval $(call KernelPackage,mt76))
|
||||
$(eval $(call BuildPackage,mt76-test))
|
||||
@@ -0,0 +1,406 @@
|
||||
From 6434ec7449b854fbdf8b1cab9c142e67a0a8a9a4 Mon Sep 17 00:00:00 2001
|
||||
From: Roopni Devanathan <quic_rdevanat@quicinc.com>
|
||||
Date: Sun, 15 Jun 2025 13:53:09 +0530
|
||||
Subject: [PATCH] wifi: cfg80211/mac80211: Add support to get radio index
|
||||
|
||||
Currently, per-radio attributes are set on per-phy basis, i.e., all the
|
||||
radios present in a wiphy will take attributes values sent from user. But
|
||||
each radio in a wiphy can get different values from userspace based on
|
||||
its requirement.
|
||||
|
||||
To extend support to set per-radio attributes, add support to get radio
|
||||
index from userspace. Add an NL attribute - NL80211_ATTR_WIPHY_RADIO_INDEX,
|
||||
to get user specified radio index for which attributes should be changed.
|
||||
Pass this to individual drivers, so that the drivers can use this radio
|
||||
index to change per-radio attributes when necessary. Currently, per-radio
|
||||
attributes identified are:
|
||||
NL80211_ATTR_WIPHY_TX_POWER_LEVEL
|
||||
NL80211_ATTR_WIPHY_ANTENNA_TX
|
||||
NL80211_ATTR_WIPHY_ANTENNA_RX
|
||||
NL80211_ATTR_WIPHY_RETRY_SHORT
|
||||
NL80211_ATTR_WIPHY_RETRY_LONG
|
||||
NL80211_ATTR_WIPHY_FRAG_THRESHOLD
|
||||
NL80211_ATTR_WIPHY_RTS_THRESHOLD
|
||||
NL80211_ATTR_WIPHY_COVERAGE_CLASS
|
||||
NL80211_ATTR_TXQ_LIMIT
|
||||
NL80211_ATTR_TXQ_MEMORY_LIMIT
|
||||
NL80211_ATTR_TXQ_QUANTUM
|
||||
|
||||
By default, the radio index is set to -1. This means the attribute should
|
||||
be treated as a global configuration. If the user has not specified any
|
||||
index, then the radio index passed to individual drivers would be -1. This
|
||||
would indicate that the attribute applies to all radios in that wiphy.
|
||||
|
||||
Signed-off-by: Roopni Devanathan <quic_rdevanat@quicinc.com>
|
||||
Link: https://patch.msgid.link/20250615082312.619639-2-quic_rdevanat@quicinc.com
|
||||
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
---
|
||||
mac80211.c | 3 ++-
|
||||
mt76.h | 3 ++-
|
||||
mt7603/main.c | 5 +++--
|
||||
mt7615/main.c | 11 +++++++----
|
||||
mt76x0/main.c | 2 +-
|
||||
mt76x0/mt76x0.h | 2 +-
|
||||
mt76x02.h | 4 ++--
|
||||
mt76x02_util.c | 4 ++--
|
||||
mt76x2/pci_main.c | 6 +++---
|
||||
mt76x2/usb_main.c | 2 +-
|
||||
mt7915/main.c | 13 ++++++++-----
|
||||
mt7921/main.c | 8 +++++---
|
||||
mt7925/main.c | 8 +++++---
|
||||
mt792x.h | 3 ++-
|
||||
mt792x_core.c | 3 ++-
|
||||
mt7996/main.c | 11 +++++++----
|
||||
16 files changed, 53 insertions(+), 35 deletions(-)
|
||||
|
||||
--- a/mac80211.c
|
||||
+++ b/mac80211.c
|
||||
@@ -1936,7 +1936,8 @@ void mt76_sw_scan_complete(struct ieee80
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mt76_sw_scan_complete);
|
||||
|
||||
-int mt76_get_antenna(struct ieee80211_hw *hw, u32 *tx_ant, u32 *rx_ant)
|
||||
+int mt76_get_antenna(struct ieee80211_hw *hw, int radio_idx, u32 *tx_ant,
|
||||
+ u32 *rx_ant)
|
||||
{
|
||||
struct mt76_phy *phy = hw->priv;
|
||||
struct mt76_dev *dev = phy->dev;
|
||||
--- a/mt76.h
|
||||
+++ b/mt76.h
|
||||
@@ -1598,7 +1598,8 @@ int mt76_get_sar_power(struct mt76_phy *
|
||||
void mt76_csa_check(struct mt76_dev *dev);
|
||||
void mt76_csa_finish(struct mt76_dev *dev);
|
||||
|
||||
-int mt76_get_antenna(struct ieee80211_hw *hw, u32 *tx_ant, u32 *rx_ant);
|
||||
+int mt76_get_antenna(struct ieee80211_hw *hw, int radio_idx, u32 *tx_ant,
|
||||
+ u32 *rx_ant);
|
||||
int mt76_set_tim(struct ieee80211_hw *hw, struct ieee80211_sta *sta, bool set);
|
||||
void mt76_insert_ccmp_hdr(struct sk_buff *skb, u8 key_id);
|
||||
int mt76_get_rate(struct mt76_dev *dev,
|
||||
--- a/mt7603/main.c
|
||||
+++ b/mt7603/main.c
|
||||
@@ -216,7 +216,7 @@ static int mt7603_set_sar_specs(struct i
|
||||
}
|
||||
|
||||
static int
|
||||
-mt7603_config(struct ieee80211_hw *hw, u32 changed)
|
||||
+mt7603_config(struct ieee80211_hw *hw, int radio_idx, u32 changed)
|
||||
{
|
||||
struct mt7603_dev *dev = hw->priv;
|
||||
int ret = 0;
|
||||
@@ -657,7 +657,8 @@ mt7603_sta_rate_tbl_update(struct ieee80
|
||||
}
|
||||
|
||||
static void
|
||||
-mt7603_set_coverage_class(struct ieee80211_hw *hw, s16 coverage_class)
|
||||
+mt7603_set_coverage_class(struct ieee80211_hw *hw, int radio_idx,
|
||||
+ s16 coverage_class)
|
||||
{
|
||||
struct mt7603_dev *dev = hw->priv;
|
||||
|
||||
--- a/mt7615/main.c
|
||||
+++ b/mt7615/main.c
|
||||
@@ -420,7 +420,7 @@ static int mt7615_set_sar_specs(struct i
|
||||
return mt76_update_channel(phy->mt76);
|
||||
}
|
||||
|
||||
-static int mt7615_config(struct ieee80211_hw *hw, u32 changed)
|
||||
+static int mt7615_config(struct ieee80211_hw *hw, int radio_idx, u32 changed)
|
||||
{
|
||||
struct mt7615_dev *dev = mt7615_hw_dev(hw);
|
||||
struct mt7615_phy *phy = mt7615_hw_phy(hw);
|
||||
@@ -784,7 +784,8 @@ static void mt7615_tx(struct ieee80211_h
|
||||
mt76_connac_pm_queue_skb(hw, &dev->pm, wcid, skb);
|
||||
}
|
||||
|
||||
-static int mt7615_set_rts_threshold(struct ieee80211_hw *hw, u32 val)
|
||||
+static int mt7615_set_rts_threshold(struct ieee80211_hw *hw, int radio_idx,
|
||||
+ u32 val)
|
||||
{
|
||||
struct mt7615_dev *dev = mt7615_hw_dev(hw);
|
||||
struct mt7615_phy *phy = mt7615_hw_phy(hw);
|
||||
@@ -972,7 +973,8 @@ mt7615_offset_tsf(struct ieee80211_hw *h
|
||||
}
|
||||
|
||||
static void
|
||||
-mt7615_set_coverage_class(struct ieee80211_hw *hw, s16 coverage_class)
|
||||
+mt7615_set_coverage_class(struct ieee80211_hw *hw, int radio_idx,
|
||||
+ s16 coverage_class)
|
||||
{
|
||||
struct mt7615_phy *phy = mt7615_hw_phy(hw);
|
||||
struct mt7615_dev *dev = phy->dev;
|
||||
@@ -984,7 +986,8 @@ mt7615_set_coverage_class(struct ieee802
|
||||
}
|
||||
|
||||
static int
|
||||
-mt7615_set_antenna(struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant)
|
||||
+mt7615_set_antenna(struct ieee80211_hw *hw, int radio_idx,
|
||||
+ u32 tx_ant, u32 rx_ant)
|
||||
{
|
||||
struct mt7615_dev *dev = mt7615_hw_dev(hw);
|
||||
struct mt7615_phy *phy = mt7615_hw_phy(hw);
|
||||
--- a/mt76x0/main.c
|
||||
+++ b/mt76x0/main.c
|
||||
@@ -57,7 +57,7 @@ out:
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mt76x0_set_sar_specs);
|
||||
|
||||
-int mt76x0_config(struct ieee80211_hw *hw, u32 changed)
|
||||
+int mt76x0_config(struct ieee80211_hw *hw, int radio_idx, u32 changed)
|
||||
{
|
||||
struct mt76x02_dev *dev = hw->priv;
|
||||
|
||||
--- a/mt76x0/mt76x0.h
|
||||
+++ b/mt76x0/mt76x0.h
|
||||
@@ -48,7 +48,7 @@ void mt76x0_chip_onoff(struct mt76x02_de
|
||||
|
||||
void mt76x0_mac_stop(struct mt76x02_dev *dev);
|
||||
|
||||
-int mt76x0_config(struct ieee80211_hw *hw, u32 changed);
|
||||
+int mt76x0_config(struct ieee80211_hw *hw, int radio_idx, u32 changed);
|
||||
int mt76x0_set_channel(struct mt76_phy *mphy);
|
||||
int mt76x0_set_sar_specs(struct ieee80211_hw *hw,
|
||||
const struct cfg80211_sar_specs *sar);
|
||||
--- a/mt76x02.h
|
||||
+++ b/mt76x02.h
|
||||
@@ -183,8 +183,8 @@ void mt76x02_wdt_work(struct work_struct
|
||||
void mt76x02_tx_set_txpwr_auto(struct mt76x02_dev *dev, s8 txpwr);
|
||||
void mt76x02_set_tx_ackto(struct mt76x02_dev *dev);
|
||||
void mt76x02_set_coverage_class(struct ieee80211_hw *hw,
|
||||
- s16 coverage_class);
|
||||
-int mt76x02_set_rts_threshold(struct ieee80211_hw *hw, u32 val);
|
||||
+ int radio_idx, s16 coverage_class);
|
||||
+int mt76x02_set_rts_threshold(struct ieee80211_hw *hw, int radio_idx, u32 val);
|
||||
void mt76x02_remove_hdr_pad(struct sk_buff *skb, int len);
|
||||
bool mt76x02_tx_status_data(struct mt76_dev *mdev, u8 *update);
|
||||
void mt76x02_queue_rx_skb(struct mt76_dev *mdev, enum mt76_rxq_id q,
|
||||
--- a/mt76x02_util.c
|
||||
+++ b/mt76x02_util.c
|
||||
@@ -548,7 +548,7 @@ void mt76x02_set_tx_ackto(struct mt76x02
|
||||
EXPORT_SYMBOL_GPL(mt76x02_set_tx_ackto);
|
||||
|
||||
void mt76x02_set_coverage_class(struct ieee80211_hw *hw,
|
||||
- s16 coverage_class)
|
||||
+ int radio_idx, s16 coverage_class)
|
||||
{
|
||||
struct mt76x02_dev *dev = hw->priv;
|
||||
|
||||
@@ -559,7 +559,7 @@ void mt76x02_set_coverage_class(struct i
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mt76x02_set_coverage_class);
|
||||
|
||||
-int mt76x02_set_rts_threshold(struct ieee80211_hw *hw, u32 val)
|
||||
+int mt76x02_set_rts_threshold(struct ieee80211_hw *hw, int radio_idx, u32 val)
|
||||
{
|
||||
struct mt76x02_dev *dev = hw->priv;
|
||||
|
||||
--- a/mt76x2/pci_main.c
|
||||
+++ b/mt76x2/pci_main.c
|
||||
@@ -54,7 +54,7 @@ int mt76x2e_set_channel(struct mt76_phy
|
||||
}
|
||||
|
||||
static int
|
||||
-mt76x2_config(struct ieee80211_hw *hw, u32 changed)
|
||||
+mt76x2_config(struct ieee80211_hw *hw, int radio_idx, u32 changed)
|
||||
{
|
||||
struct mt76x02_dev *dev = hw->priv;
|
||||
|
||||
@@ -99,8 +99,8 @@ mt76x2_flush(struct ieee80211_hw *hw, st
|
||||
{
|
||||
}
|
||||
|
||||
-static int mt76x2_set_antenna(struct ieee80211_hw *hw, u32 tx_ant,
|
||||
- u32 rx_ant)
|
||||
+static int mt76x2_set_antenna(struct ieee80211_hw *hw, int radio_idx,
|
||||
+ u32 tx_ant, u32 rx_ant)
|
||||
{
|
||||
struct mt76x02_dev *dev = hw->priv;
|
||||
|
||||
--- a/mt76x2/usb_main.c
|
||||
+++ b/mt76x2/usb_main.c
|
||||
@@ -50,7 +50,7 @@ int mt76x2u_set_channel(struct mt76_phy
|
||||
}
|
||||
|
||||
static int
|
||||
-mt76x2u_config(struct ieee80211_hw *hw, u32 changed)
|
||||
+mt76x2u_config(struct ieee80211_hw *hw, int radio_idx, u32 changed)
|
||||
{
|
||||
struct mt76x02_dev *dev = hw->priv;
|
||||
int err = 0;
|
||||
--- a/mt7915/main.c
|
||||
+++ b/mt7915/main.c
|
||||
@@ -449,7 +449,8 @@ out:
|
||||
return err;
|
||||
}
|
||||
|
||||
-static int mt7915_config(struct ieee80211_hw *hw, u32 changed)
|
||||
+static int mt7915_config(struct ieee80211_hw *hw, int radio_idx,
|
||||
+ u32 changed)
|
||||
{
|
||||
struct mt7915_dev *dev = mt7915_hw_dev(hw);
|
||||
struct mt7915_phy *phy = mt7915_hw_phy(hw);
|
||||
@@ -913,7 +914,8 @@ static void mt7915_tx(struct ieee80211_h
|
||||
mt76_tx(mphy, control->sta, wcid, skb);
|
||||
}
|
||||
|
||||
-static int mt7915_set_rts_threshold(struct ieee80211_hw *hw, u32 val)
|
||||
+static int mt7915_set_rts_threshold(struct ieee80211_hw *hw, int radio_idx,
|
||||
+ u32 val)
|
||||
{
|
||||
struct mt7915_dev *dev = mt7915_hw_dev(hw);
|
||||
struct mt7915_phy *phy = mt7915_hw_phy(hw);
|
||||
@@ -1109,7 +1111,8 @@ mt7915_offset_tsf(struct ieee80211_hw *h
|
||||
}
|
||||
|
||||
static void
|
||||
-mt7915_set_coverage_class(struct ieee80211_hw *hw, s16 coverage_class)
|
||||
+mt7915_set_coverage_class(struct ieee80211_hw *hw, int radio_idx,
|
||||
+ s16 coverage_class)
|
||||
{
|
||||
struct mt7915_phy *phy = mt7915_hw_phy(hw);
|
||||
struct mt7915_dev *dev = phy->dev;
|
||||
@@ -1121,7 +1124,7 @@ mt7915_set_coverage_class(struct ieee802
|
||||
}
|
||||
|
||||
static int
|
||||
-mt7915_set_antenna(struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant)
|
||||
+mt7915_set_antenna(struct ieee80211_hw *hw, int radio_idx, u32 tx_ant, u32 rx_ant)
|
||||
{
|
||||
struct mt7915_dev *dev = mt7915_hw_dev(hw);
|
||||
struct mt7915_phy *phy = mt7915_hw_phy(hw);
|
||||
@@ -1699,7 +1702,7 @@ mt7915_twt_teardown_request(struct ieee8
|
||||
}
|
||||
|
||||
static int
|
||||
-mt7915_set_frag_threshold(struct ieee80211_hw *hw, u32 val)
|
||||
+mt7915_set_frag_threshold(struct ieee80211_hw *hw, int radio_idx, u32 val)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
--- a/mt7921/main.c
|
||||
+++ b/mt7921/main.c
|
||||
@@ -626,7 +626,7 @@ void mt7921_set_runtime_pm(struct mt792x
|
||||
mt76_connac_mcu_set_deep_sleep(&dev->mt76, pm->ds_enable);
|
||||
}
|
||||
|
||||
-static int mt7921_config(struct ieee80211_hw *hw, u32 changed)
|
||||
+static int mt7921_config(struct ieee80211_hw *hw, int radio_idx, u32 changed)
|
||||
{
|
||||
struct mt792x_dev *dev = mt792x_hw_dev(hw);
|
||||
struct mt792x_phy *phy = mt792x_hw_phy(hw);
|
||||
@@ -915,7 +915,8 @@ void mt7921_mac_sta_remove(struct mt76_d
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mt7921_mac_sta_remove);
|
||||
|
||||
-static int mt7921_set_rts_threshold(struct ieee80211_hw *hw, u32 val)
|
||||
+static int mt7921_set_rts_threshold(struct ieee80211_hw *hw, int radio_idx,
|
||||
+ u32 val)
|
||||
{
|
||||
struct mt792x_dev *dev = mt792x_hw_dev(hw);
|
||||
|
||||
@@ -1096,7 +1097,8 @@ mt7921_stop_sched_scan(struct ieee80211_
|
||||
}
|
||||
|
||||
static int
|
||||
-mt7921_set_antenna(struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant)
|
||||
+mt7921_set_antenna(struct ieee80211_hw *hw, int radio_idx,
|
||||
+ u32 tx_ant, u32 rx_ant)
|
||||
{
|
||||
struct mt792x_dev *dev = mt792x_hw_dev(hw);
|
||||
struct mt792x_phy *phy = mt792x_hw_phy(hw);
|
||||
--- a/mt7925/main.c
|
||||
+++ b/mt7925/main.c
|
||||
@@ -758,7 +758,7 @@ void mt7925_set_runtime_pm(struct mt792x
|
||||
mt7925_mcu_set_deep_sleep(dev, pm->ds_enable);
|
||||
}
|
||||
|
||||
-static int mt7925_config(struct ieee80211_hw *hw, u32 changed)
|
||||
+static int mt7925_config(struct ieee80211_hw *hw, int radio_idx, u32 changed)
|
||||
{
|
||||
struct mt792x_dev *dev = mt792x_hw_dev(hw);
|
||||
int ret = 0;
|
||||
@@ -1219,7 +1219,8 @@ void mt7925_mac_sta_remove(struct mt76_d
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mt7925_mac_sta_remove);
|
||||
|
||||
-static int mt7925_set_rts_threshold(struct ieee80211_hw *hw, u32 val)
|
||||
+static int mt7925_set_rts_threshold(struct ieee80211_hw *hw, int radio_idx,
|
||||
+ u32 val)
|
||||
{
|
||||
struct mt792x_dev *dev = mt792x_hw_dev(hw);
|
||||
|
||||
@@ -1438,7 +1439,8 @@ mt7925_stop_sched_scan(struct ieee80211_
|
||||
}
|
||||
|
||||
static int
|
||||
-mt7925_set_antenna(struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant)
|
||||
+mt7925_set_antenna(struct ieee80211_hw *hw, int radio_idx,
|
||||
+ u32 tx_ant, u32 rx_ant)
|
||||
{
|
||||
struct mt792x_dev *dev = mt792x_hw_dev(hw);
|
||||
struct mt792x_phy *phy = mt792x_hw_phy(hw);
|
||||
--- a/mt792x.h
|
||||
+++ b/mt792x.h
|
||||
@@ -413,7 +413,8 @@ void mt792x_sta_statistics(struct ieee80
|
||||
struct ieee80211_vif *vif,
|
||||
struct ieee80211_sta *sta,
|
||||
struct station_info *sinfo);
|
||||
-void mt792x_set_coverage_class(struct ieee80211_hw *hw, s16 coverage_class);
|
||||
+void mt792x_set_coverage_class(struct ieee80211_hw *hw, int radio_idx,
|
||||
+ s16 coverage_class);
|
||||
void mt792x_dma_cleanup(struct mt792x_dev *dev);
|
||||
int mt792x_dma_enable(struct mt792x_dev *dev);
|
||||
int mt792x_wpdma_reset(struct mt792x_dev *dev, bool force);
|
||||
--- a/mt792x_core.c
|
||||
+++ b/mt792x_core.c
|
||||
@@ -601,7 +601,8 @@ void mt792x_sta_statistics(struct ieee80
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mt792x_sta_statistics);
|
||||
|
||||
-void mt792x_set_coverage_class(struct ieee80211_hw *hw, s16 coverage_class)
|
||||
+void mt792x_set_coverage_class(struct ieee80211_hw *hw, int radio_idx,
|
||||
+ s16 coverage_class)
|
||||
{
|
||||
struct mt792x_phy *phy = mt792x_hw_phy(hw);
|
||||
struct mt792x_dev *dev = phy->dev;
|
||||
--- a/mt7996/main.c
|
||||
+++ b/mt7996/main.c
|
||||
@@ -644,7 +644,7 @@ static int mt7996_set_key(struct ieee802
|
||||
return err;
|
||||
}
|
||||
|
||||
-static int mt7996_config(struct ieee80211_hw *hw, u32 changed)
|
||||
+static int mt7996_config(struct ieee80211_hw *hw, int radio_idx, u32 changed)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@@ -1370,7 +1370,8 @@ unlock:
|
||||
rcu_read_unlock();
|
||||
}
|
||||
|
||||
-static int mt7996_set_rts_threshold(struct ieee80211_hw *hw, u32 val)
|
||||
+static int mt7996_set_rts_threshold(struct ieee80211_hw *hw, int radio_idx,
|
||||
+ u32 val)
|
||||
{
|
||||
struct mt7996_dev *dev = mt7996_hw_dev(hw);
|
||||
int i, ret = 0;
|
||||
@@ -1590,7 +1591,8 @@ unlock:
|
||||
}
|
||||
|
||||
static void
|
||||
-mt7996_set_coverage_class(struct ieee80211_hw *hw, s16 coverage_class)
|
||||
+mt7996_set_coverage_class(struct ieee80211_hw *hw, int radio_idx,
|
||||
+ s16 coverage_class)
|
||||
{
|
||||
struct mt7996_dev *dev = mt7996_hw_dev(hw);
|
||||
struct mt7996_phy *phy;
|
||||
@@ -1604,7 +1606,8 @@ mt7996_set_coverage_class(struct ieee802
|
||||
}
|
||||
|
||||
static int
|
||||
-mt7996_set_antenna(struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant)
|
||||
+mt7996_set_antenna(struct ieee80211_hw *hw, int radio_idx,
|
||||
+ u32 tx_ant, u32 rx_ant)
|
||||
{
|
||||
struct mt7996_dev *dev = mt7996_hw_dev(hw);
|
||||
int i;
|
||||
Reference in New Issue
Block a user