[][MAC80211][misc][Change revert patch for backports-5.15]

[Description]
Change revert patch for backports-5.15
Since mt7996 already merge into mt76 master tree, remove temp mt7996 source code.

[Release-log]
N/A

Change-Id: I28ec1a2b7ddf24b000bd05db5aee140d96a5a03d
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/6916254
diff --git a/autobuild_mac80211_release/mt7622_mt7915_mac80211/lede-branch-build-sanity.sh b/autobuild_mac80211_release/mt7622_mt7915_mac80211/lede-branch-build-sanity.sh
index 84251d0..d5c4dec 100755
--- a/autobuild_mac80211_release/mt7622_mt7915_mac80211/lede-branch-build-sanity.sh
+++ b/autobuild_mac80211_release/mt7622_mt7915_mac80211/lede-branch-build-sanity.sh
@@ -3,6 +3,7 @@
 #get the brach_name
 temp=${0%/*}
 branch_name=${temp##*/}
+backport_new=0
 
 #step1 clean
 #clean
@@ -16,7 +17,7 @@
 
 prepare_flowoffload
 
-prepare_mac80211
+prepare_mac80211 ${backport_new}
 
 prepare_final ${branch_name}
 
diff --git a/autobuild_mac80211_release/mt7986_mac80211/lede-branch-build-sanity.sh b/autobuild_mac80211_release/mt7986_mac80211/lede-branch-build-sanity.sh
index b5a507e..df47bd4 100755
--- a/autobuild_mac80211_release/mt7986_mac80211/lede-branch-build-sanity.sh
+++ b/autobuild_mac80211_release/mt7986_mac80211/lede-branch-build-sanity.sh
@@ -58,6 +58,10 @@
 		echo "CONFIG_FRAME_WARN=4096" >> ${BUILD_DIR}/target/linux/mediatek/mt7986/config-5.4
 	}
 
+	[ "$backport_new" = "1" ] && {
+		rm -rf ${BUILD_DIR}/package/kernel/mt76/patches/*revert-for-backports*.patch
+	}
+
 }
 
 #step1 clean
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/.config b/autobuild_mac80211_release/mt7988_mt7996_mac80211/.config
index 4580ab2..57a4783 100644
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/.config
+++ b/autobuild_mac80211_release/mt7988_mt7996_mac80211/.config
@@ -45,12 +45,9 @@
 # CONFIG_TARGET_mediatek_mt7623 is not set
 # CONFIG_TARGET_mediatek_mt7629 is not set
 # CONFIG_TARGET_mediatek_mt7986 is not set
-# CONFIG_TARGET_mediatek_mt7981 is not set
 CONFIG_TARGET_mediatek_mt7988=y
 CONFIG_TARGET_MULTI_PROFILE=y
 # CONFIG_TARGET_mediatek_mt7988_DEVICE_mediatek_mt7988a-gsw-10g-spim-nand is not set
-# CONFIG_TARGET_mediatek_mt7988_DEVICE_mediatek_mt7988a-gsw-10g-spim-nand-4pcie is not set
-# CONFIG_TARGET_mediatek_mt7988_DEVICE_mediatek_mt7988a-gsw-10g-sfp-spim-nand is not set
 # CONFIG_TARGET_mediatek_mt7988_DEVICE_mediatek_mt7988a-dsa-10g-spim-nand is not set
 # CONFIG_TARGET_mediatek_mt7988_DEVICE_mediatek_mt7988a-dsa-e2p5g-spim-nand is not set
 # CONFIG_TARGET_mediatek_mt7988_DEVICE_mediatek_mt7988a-dsa-i2p5g-spim-nand is not set
@@ -71,9 +68,7 @@
 CONFIG_TARGET_DEVICE_mediatek_mt7988_DEVICE_mediatek_mt7988a-dsa-10g-spim-nor=y
 CONFIG_TARGET_DEVICE_mediatek_mt7988_DEVICE_mediatek_mt7988a-dsa-e2p5g-spim-nand=y
 CONFIG_TARGET_DEVICE_mediatek_mt7988_DEVICE_mediatek_mt7988a-dsa-i2p5g-spim-nand=y
-# CONFIG_TARGET_DEVICE_mediatek_mt7988_DEVICE_mediatek_mt7988a-gsw-10g-sfp-spim-nand is not set
 CONFIG_TARGET_DEVICE_mediatek_mt7988_DEVICE_mediatek_mt7988a-gsw-10g-spim-nand=y
-# CONFIG_TARGET_DEVICE_mediatek_mt7988_DEVICE_mediatek_mt7988a-gsw-10g-spim-nand-4pcie is not set
 # end of Target Devices
 
 CONFIG_HAS_SUBTARGETS=y
@@ -182,7 +177,6 @@
 # CONFIG_BUILDBOT is not set
 CONFIG_SIGNED_PACKAGES=y
 CONFIG_SIGNATURE_CHECK=y
-CONFIG_DOWNLOAD_CHECK_CERTIFICATE=y
 
 #
 # General build options
@@ -432,10 +426,10 @@
 CONFIG_TARGET_INIT_SUPPRESS_STDERR=y
 # CONFIG_VERSIONOPT is not set
 CONFIG_PER_FEED_REPO=y
+CONFIG_FEED_mtk_openwrt_feed=y
 CONFIG_FEED_packages=y
 CONFIG_FEED_luci=y
 CONFIG_FEED_routing=y
-CONFIG_FEED_telephony=y
 
 #
 # Base system
@@ -447,7 +441,7 @@
 # CONFIG_PACKAGE_blockd is not set
 # CONFIG_PACKAGE_bridge is not set
 CONFIG_PACKAGE_busybox=y
-CONFIG_BUSYBOX_CUSTOM=y
+# CONFIG_BUSYBOX_CUSTOM is not set
 CONFIG_BUSYBOX_DEFAULT_HAVE_DOT_CONFIG=y
 # CONFIG_BUSYBOX_DEFAULT_DESKTOP is not set
 # CONFIG_BUSYBOX_DEFAULT_EXTRA_COMPAT is not set
@@ -983,8 +977,8 @@
 # CONFIG_BUSYBOX_DEFAULT_LAST is not set
 # CONFIG_BUSYBOX_DEFAULT_FEATURE_LAST_FANCY is not set
 # CONFIG_BUSYBOX_DEFAULT_LOSETUP is not set
-# CONFIG_BUSYBOX_DEFAULT_LSPCI is not set
-# CONFIG_BUSYBOX_DEFAULT_LSUSB is not set
+CONFIG_BUSYBOX_DEFAULT_LSPCI=y
+CONFIG_BUSYBOX_DEFAULT_LSUSB=y
 # CONFIG_BUSYBOX_DEFAULT_MDEV is not set
 # CONFIG_BUSYBOX_DEFAULT_FEATURE_MDEV_CONF is not set
 # CONFIG_BUSYBOX_DEFAULT_FEATURE_MDEV_RENAME is not set
@@ -1287,19 +1281,19 @@
 # CONFIG_BUSYBOX_DEFAULT_FEATURE_TC_INGRESS is not set
 # CONFIG_BUSYBOX_DEFAULT_TCPSVD is not set
 # CONFIG_BUSYBOX_DEFAULT_UDPSVD is not set
-# CONFIG_BUSYBOX_DEFAULT_TELNET is not set
-# CONFIG_BUSYBOX_DEFAULT_FEATURE_TELNET_TTYPE is not set
-# CONFIG_BUSYBOX_DEFAULT_FEATURE_TELNET_AUTOLOGIN is not set
+CONFIG_BUSYBOX_DEFAULT_TELNET=y
+CONFIG_BUSYBOX_DEFAULT_FEATURE_TELNET_TTYPE=y
+CONFIG_BUSYBOX_DEFAULT_FEATURE_TELNET_AUTOLOGIN=y
 # CONFIG_BUSYBOX_DEFAULT_FEATURE_TELNET_WIDTH is not set
-# CONFIG_BUSYBOX_DEFAULT_TELNETD is not set
-# CONFIG_BUSYBOX_DEFAULT_FEATURE_TELNETD_STANDALONE is not set
+CONFIG_BUSYBOX_DEFAULT_TELNETD=y
+CONFIG_BUSYBOX_DEFAULT_FEATURE_TELNETD_STANDALONE=y
 # CONFIG_BUSYBOX_DEFAULT_FEATURE_TELNETD_INETD_WAIT is not set
-# CONFIG_BUSYBOX_DEFAULT_TFTP is not set
+CONFIG_BUSYBOX_DEFAULT_TFTP=y
 # CONFIG_BUSYBOX_DEFAULT_FEATURE_TFTP_PROGRESS_BAR is not set
 # CONFIG_BUSYBOX_DEFAULT_FEATURE_TFTP_HPA_COMPAT is not set
 # CONFIG_BUSYBOX_DEFAULT_TFTPD is not set
-# CONFIG_BUSYBOX_DEFAULT_FEATURE_TFTP_GET is not set
-# CONFIG_BUSYBOX_DEFAULT_FEATURE_TFTP_PUT is not set
+CONFIG_BUSYBOX_DEFAULT_FEATURE_TFTP_GET=y
+CONFIG_BUSYBOX_DEFAULT_FEATURE_TFTP_PUT=y
 # CONFIG_BUSYBOX_DEFAULT_FEATURE_TFTP_BLOCKSIZE is not set
 # CONFIG_BUSYBOX_DEFAULT_TFTP_DEBUG is not set
 # CONFIG_BUSYBOX_DEFAULT_TLS is not set
@@ -1309,7 +1303,7 @@
 # CONFIG_BUSYBOX_DEFAULT_FEATURE_TRACEROUTE_USE_ICMP is not set
 # CONFIG_BUSYBOX_DEFAULT_TUNCTL is not set
 # CONFIG_BUSYBOX_DEFAULT_FEATURE_TUNCTL_UG is not set
-# CONFIG_BUSYBOX_DEFAULT_VCONFIG is not set
+CONFIG_BUSYBOX_DEFAULT_VCONFIG=y
 # CONFIG_BUSYBOX_DEFAULT_WGET is not set
 # CONFIG_BUSYBOX_DEFAULT_FEATURE_WGET_LONG_OPTIONS is not set
 # CONFIG_BUSYBOX_DEFAULT_FEATURE_WGET_STATUSBAR is not set
@@ -1357,7 +1351,7 @@
 CONFIG_BUSYBOX_DEFAULT_KILLALL=y
 # CONFIG_BUSYBOX_DEFAULT_KILLALL5 is not set
 # CONFIG_BUSYBOX_DEFAULT_LSOF is not set
-# CONFIG_BUSYBOX_DEFAULT_MPSTAT is not set
+CONFIG_BUSYBOX_DEFAULT_MPSTAT=y
 # CONFIG_BUSYBOX_DEFAULT_NMETER is not set
 CONFIG_BUSYBOX_DEFAULT_PGREP=y
 # CONFIG_BUSYBOX_DEFAULT_PKILL is not set
@@ -1502,904 +1496,6 @@
 # CONFIG_BUSYBOX_DEFAULT_FEATURE_IPC_SYSLOG is not set
 CONFIG_BUSYBOX_DEFAULT_FEATURE_IPC_SYSLOG_BUFFER_SIZE=0
 # CONFIG_BUSYBOX_DEFAULT_FEATURE_KMSG_SYSLOG is not set
-CONFIG_BUSYBOX_CONFIG_HAVE_DOT_CONFIG=y
-
-#
-# Settings
-#
-# CONFIG_BUSYBOX_CONFIG_DESKTOP is not set
-# CONFIG_BUSYBOX_CONFIG_EXTRA_COMPAT is not set
-# CONFIG_BUSYBOX_CONFIG_FEDORA_COMPAT is not set
-CONFIG_BUSYBOX_CONFIG_INCLUDE_SUSv2=y
-CONFIG_BUSYBOX_CONFIG_LONG_OPTS=y
-CONFIG_BUSYBOX_CONFIG_SHOW_USAGE=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_VERBOSE_USAGE=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_COMPRESS_USAGE is not set
-CONFIG_BUSYBOX_CONFIG_LFS=y
-# CONFIG_BUSYBOX_CONFIG_PAM is not set
-CONFIG_BUSYBOX_CONFIG_FEATURE_DEVPTS=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_UTMP is not set
-CONFIG_BUSYBOX_CONFIG_FEATURE_PIDFILE=y
-CONFIG_BUSYBOX_CONFIG_PID_FILE_PATH="/var/run"
-# CONFIG_BUSYBOX_CONFIG_BUSYBOX is not set
-# CONFIG_BUSYBOX_CONFIG_INSTALL_NO_USR is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_SUID is not set
-CONFIG_BUSYBOX_CONFIG_FEATURE_PREFER_APPLETS=y
-CONFIG_BUSYBOX_CONFIG_BUSYBOX_EXEC_PATH="/proc/self/exe"
-# CONFIG_BUSYBOX_CONFIG_SELINUX is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_CLEAN_UP is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_SYSLOG_INFO is not set
-CONFIG_BUSYBOX_CONFIG_FEATURE_SYSLOG=y
-
-#
-# Build Options
-#
-# CONFIG_BUSYBOX_CONFIG_STATIC is not set
-# CONFIG_BUSYBOX_CONFIG_PIE is not set
-# CONFIG_BUSYBOX_CONFIG_NOMMU is not set
-CONFIG_BUSYBOX_CONFIG_CROSS_COMPILER_PREFIX=""
-CONFIG_BUSYBOX_CONFIG_SYSROOT=""
-CONFIG_BUSYBOX_CONFIG_EXTRA_CFLAGS=""
-CONFIG_BUSYBOX_CONFIG_EXTRA_LDFLAGS=""
-CONFIG_BUSYBOX_CONFIG_EXTRA_LDLIBS=""
-# CONFIG_BUSYBOX_CONFIG_USE_PORTABLE_CODE is not set
-# CONFIG_BUSYBOX_CONFIG_STACK_OPTIMIZATION_386 is not set
-# CONFIG_BUSYBOX_CONFIG_STATIC_LIBGCC is not set
-
-#
-# Installation Options ("make install" behavior)
-#
-CONFIG_BUSYBOX_CONFIG_INSTALL_APPLET_SYMLINKS=y
-# CONFIG_BUSYBOX_CONFIG_INSTALL_APPLET_HARDLINKS is not set
-# CONFIG_BUSYBOX_CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS is not set
-# CONFIG_BUSYBOX_CONFIG_INSTALL_APPLET_DONT is not set
-CONFIG_BUSYBOX_CONFIG_PREFIX="./_install"
-
-#
-# Debugging Options
-#
-# CONFIG_BUSYBOX_CONFIG_DEBUG is not set
-# CONFIG_BUSYBOX_CONFIG_DEBUG_SANITIZE is not set
-# CONFIG_BUSYBOX_CONFIG_UNIT_TEST is not set
-# CONFIG_BUSYBOX_CONFIG_WERROR is not set
-# CONFIG_BUSYBOX_CONFIG_WARN_SIMPLE_MSG is not set
-CONFIG_BUSYBOX_CONFIG_NO_DEBUG_LIB=y
-# CONFIG_BUSYBOX_CONFIG_DMALLOC is not set
-# CONFIG_BUSYBOX_CONFIG_EFENCE is not set
-
-#
-# Library Tuning
-#
-# CONFIG_BUSYBOX_CONFIG_FEATURE_USE_BSS_TAIL is not set
-# CONFIG_BUSYBOX_CONFIG_FLOAT_DURATION is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_RTMINMAX is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_BUFFERS_USE_MALLOC is not set
-CONFIG_BUSYBOX_CONFIG_FEATURE_BUFFERS_GO_ON_STACK=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set
-CONFIG_BUSYBOX_CONFIG_PASSWORD_MINLEN=6
-CONFIG_BUSYBOX_CONFIG_MD5_SMALL=1
-CONFIG_BUSYBOX_CONFIG_SHA3_SMALL=1
-CONFIG_BUSYBOX_CONFIG_FEATURE_FAST_TOP=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_ETC_NETWORKS is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_ETC_SERVICES is not set
-CONFIG_BUSYBOX_CONFIG_FEATURE_EDITING=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_EDITING_MAX_LEN=512
-# CONFIG_BUSYBOX_CONFIG_FEATURE_EDITING_VI is not set
-CONFIG_BUSYBOX_CONFIG_FEATURE_EDITING_HISTORY=256
-# CONFIG_BUSYBOX_CONFIG_FEATURE_EDITING_SAVEHISTORY is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_REVERSE_SEARCH is not set
-CONFIG_BUSYBOX_CONFIG_FEATURE_TAB_COMPLETION=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_USERNAME_COMPLETION is not set
-CONFIG_BUSYBOX_CONFIG_FEATURE_EDITING_FANCY_PROMPT=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_EDITING_WINCH is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_EDITING_ASK_TERMINAL is not set
-# CONFIG_BUSYBOX_CONFIG_LOCALE_SUPPORT is not set
-# CONFIG_BUSYBOX_CONFIG_UNICODE_SUPPORT is not set
-CONFIG_BUSYBOX_CONFIG_FEATURE_NON_POSIX_CP=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_VERBOSE_CP_MESSAGE is not set
-CONFIG_BUSYBOX_CONFIG_FEATURE_USE_SENDFILE=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_COPYBUF_KB=4
-# CONFIG_BUSYBOX_CONFIG_FEATURE_SKIP_ROOTFS is not set
-CONFIG_BUSYBOX_CONFIG_MONOTONIC_SYSCALL=y
-CONFIG_BUSYBOX_CONFIG_IOCTL_HEX2STR_ERROR=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_HWIB is not set
-# end of Settings
-
-#
-# Applets
-#
-
-#
-# Archival Utilities
-#
-# CONFIG_BUSYBOX_CONFIG_FEATURE_SEAMLESS_XZ is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_SEAMLESS_LZMA is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_SEAMLESS_BZ2 is not set
-CONFIG_BUSYBOX_CONFIG_FEATURE_SEAMLESS_GZ=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_SEAMLESS_Z is not set
-# CONFIG_BUSYBOX_CONFIG_AR is not set
-# CONFIG_BUSYBOX_CONFIG_UNCOMPRESS is not set
-CONFIG_BUSYBOX_CONFIG_GUNZIP=y
-CONFIG_BUSYBOX_CONFIG_ZCAT=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_GUNZIP_LONG_OPTIONS is not set
-CONFIG_BUSYBOX_CONFIG_BUNZIP2=y
-CONFIG_BUSYBOX_CONFIG_BZCAT=y
-# CONFIG_BUSYBOX_CONFIG_UNLZMA is not set
-# CONFIG_BUSYBOX_CONFIG_LZCAT is not set
-# CONFIG_BUSYBOX_CONFIG_LZMA is not set
-# CONFIG_BUSYBOX_CONFIG_UNXZ is not set
-# CONFIG_BUSYBOX_CONFIG_XZCAT is not set
-# CONFIG_BUSYBOX_CONFIG_XZ is not set
-# CONFIG_BUSYBOX_CONFIG_BZIP2 is not set
-CONFIG_BUSYBOX_CONFIG_FEATURE_BZIP2_DECOMPRESS=y
-# CONFIG_BUSYBOX_CONFIG_CPIO is not set
-# CONFIG_BUSYBOX_CONFIG_DPKG is not set
-# CONFIG_BUSYBOX_CONFIG_DPKG_DEB is not set
-CONFIG_BUSYBOX_CONFIG_GZIP=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_GZIP_LONG_OPTIONS is not set
-CONFIG_BUSYBOX_CONFIG_GZIP_FAST=0
-# CONFIG_BUSYBOX_CONFIG_FEATURE_GZIP_LEVELS is not set
-CONFIG_BUSYBOX_CONFIG_FEATURE_GZIP_DECOMPRESS=y
-# CONFIG_BUSYBOX_CONFIG_LZOP is not set
-# CONFIG_BUSYBOX_CONFIG_UNLZOP is not set
-# CONFIG_BUSYBOX_CONFIG_LZOPCAT is not set
-# CONFIG_BUSYBOX_CONFIG_RPM is not set
-# CONFIG_BUSYBOX_CONFIG_RPM2CPIO is not set
-CONFIG_BUSYBOX_CONFIG_TAR=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_TAR_LONG_OPTIONS is not set
-CONFIG_BUSYBOX_CONFIG_FEATURE_TAR_CREATE=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_TAR_AUTODETECT is not set
-CONFIG_BUSYBOX_CONFIG_FEATURE_TAR_FROM=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_TAR_OLDGNU_COMPATIBILITY is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_TAR_OLDSUN_COMPATIBILITY is not set
-CONFIG_BUSYBOX_CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_TAR_UNAME_GNAME is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_TAR_NOPRESERVE_TIME is not set
-# CONFIG_BUSYBOX_CONFIG_UNZIP is not set
-# end of Archival Utilities
-
-#
-# Coreutils
-#
-CONFIG_BUSYBOX_CONFIG_BASENAME=y
-CONFIG_BUSYBOX_CONFIG_CAT=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_CATN is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_CATV is not set
-CONFIG_BUSYBOX_CONFIG_CHGRP=y
-CONFIG_BUSYBOX_CONFIG_CHMOD=y
-CONFIG_BUSYBOX_CONFIG_CHOWN=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_CHOWN_LONG_OPTIONS is not set
-CONFIG_BUSYBOX_CONFIG_CHROOT=y
-# CONFIG_BUSYBOX_CONFIG_CKSUM is not set
-# CONFIG_BUSYBOX_CONFIG_COMM is not set
-CONFIG_BUSYBOX_CONFIG_CP=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_CP_LONG_OPTIONS is not set
-CONFIG_BUSYBOX_CONFIG_CUT=y
-CONFIG_BUSYBOX_CONFIG_DATE=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_DATE_ISOFMT=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_DATE_NANO is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_DATE_COMPAT is not set
-CONFIG_BUSYBOX_CONFIG_DD=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_DD_SIGNAL_HANDLING=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_DD_THIRD_STATUS_LINE is not set
-CONFIG_BUSYBOX_CONFIG_FEATURE_DD_IBS_OBS=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_DD_STATUS is not set
-CONFIG_BUSYBOX_CONFIG_DF=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_DF_FANCY is not set
-CONFIG_BUSYBOX_CONFIG_DIRNAME=y
-# CONFIG_BUSYBOX_CONFIG_DOS2UNIX is not set
-# CONFIG_BUSYBOX_CONFIG_UNIX2DOS is not set
-CONFIG_BUSYBOX_CONFIG_DU=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K=y
-CONFIG_BUSYBOX_CONFIG_ECHO=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_FANCY_ECHO=y
-CONFIG_BUSYBOX_CONFIG_ENV=y
-# CONFIG_BUSYBOX_CONFIG_EXPAND is not set
-# CONFIG_BUSYBOX_CONFIG_UNEXPAND is not set
-CONFIG_BUSYBOX_CONFIG_EXPR=y
-CONFIG_BUSYBOX_CONFIG_EXPR_MATH_SUPPORT_64=y
-# CONFIG_BUSYBOX_CONFIG_FACTOR is not set
-CONFIG_BUSYBOX_CONFIG_FALSE=y
-# CONFIG_BUSYBOX_CONFIG_FOLD is not set
-CONFIG_BUSYBOX_CONFIG_HEAD=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_FANCY_HEAD=y
-# CONFIG_BUSYBOX_CONFIG_HOSTID is not set
-CONFIG_BUSYBOX_CONFIG_ID=y
-# CONFIG_BUSYBOX_CONFIG_GROUPS is not set
-# CONFIG_BUSYBOX_CONFIG_INSTALL is not set
-# CONFIG_BUSYBOX_CONFIG_LINK is not set
-CONFIG_BUSYBOX_CONFIG_LN=y
-# CONFIG_BUSYBOX_CONFIG_LOGNAME is not set
-CONFIG_BUSYBOX_CONFIG_LS=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_LS_FILETYPES=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_LS_FOLLOWLINKS=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_LS_RECURSIVE=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_LS_WIDTH=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_LS_SORTFILES=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_LS_TIMESTAMPS=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_LS_USERNAME=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_LS_COLOR=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_LS_COLOR_IS_DEFAULT=y
-CONFIG_BUSYBOX_CONFIG_MD5SUM=y
-# CONFIG_BUSYBOX_CONFIG_SHA1SUM is not set
-CONFIG_BUSYBOX_CONFIG_SHA256SUM=y
-# CONFIG_BUSYBOX_CONFIG_SHA512SUM is not set
-# CONFIG_BUSYBOX_CONFIG_SHA3SUM is not set
-
-#
-# Common options for md5sum, sha1sum, sha256sum, sha512sum, sha3sum
-#
-CONFIG_BUSYBOX_CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y
-CONFIG_BUSYBOX_CONFIG_MKDIR=y
-CONFIG_BUSYBOX_CONFIG_MKFIFO=y
-CONFIG_BUSYBOX_CONFIG_MKNOD=y
-CONFIG_BUSYBOX_CONFIG_MKTEMP=y
-CONFIG_BUSYBOX_CONFIG_MV=y
-CONFIG_BUSYBOX_CONFIG_NICE=y
-# CONFIG_BUSYBOX_CONFIG_NL is not set
-# CONFIG_BUSYBOX_CONFIG_NOHUP is not set
-# CONFIG_BUSYBOX_CONFIG_NPROC is not set
-# CONFIG_BUSYBOX_CONFIG_OD is not set
-# CONFIG_BUSYBOX_CONFIG_PASTE is not set
-# CONFIG_BUSYBOX_CONFIG_PRINTENV is not set
-CONFIG_BUSYBOX_CONFIG_PRINTF=y
-CONFIG_BUSYBOX_CONFIG_PWD=y
-CONFIG_BUSYBOX_CONFIG_READLINK=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_READLINK_FOLLOW=y
-# CONFIG_BUSYBOX_CONFIG_REALPATH is not set
-CONFIG_BUSYBOX_CONFIG_RM=y
-CONFIG_BUSYBOX_CONFIG_RMDIR=y
-CONFIG_BUSYBOX_CONFIG_SEQ=y
-# CONFIG_BUSYBOX_CONFIG_SHRED is not set
-# CONFIG_BUSYBOX_CONFIG_SHUF is not set
-CONFIG_BUSYBOX_CONFIG_SLEEP=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_FANCY_SLEEP=y
-CONFIG_BUSYBOX_CONFIG_SORT=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_SORT_BIG is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_SORT_OPTIMIZE_MEMORY is not set
-# CONFIG_BUSYBOX_CONFIG_SPLIT is not set
-# CONFIG_BUSYBOX_CONFIG_STAT is not set
-# CONFIG_BUSYBOX_CONFIG_STTY is not set
-# CONFIG_BUSYBOX_CONFIG_SUM is not set
-CONFIG_BUSYBOX_CONFIG_SYNC=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_SYNC_FANCY is not set
-CONFIG_BUSYBOX_CONFIG_FSYNC=y
-# CONFIG_BUSYBOX_CONFIG_TAC is not set
-CONFIG_BUSYBOX_CONFIG_TAIL=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_FANCY_TAIL=y
-CONFIG_BUSYBOX_CONFIG_TEE=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_TEE_USE_BLOCK_IO=y
-CONFIG_BUSYBOX_CONFIG_TEST=y
-CONFIG_BUSYBOX_CONFIG_TEST1=y
-CONFIG_BUSYBOX_CONFIG_TEST2=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_TEST_64=y
-# CONFIG_BUSYBOX_CONFIG_TIMEOUT is not set
-CONFIG_BUSYBOX_CONFIG_TOUCH=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_TOUCH_NODEREF is not set
-CONFIG_BUSYBOX_CONFIG_FEATURE_TOUCH_SUSV3=y
-CONFIG_BUSYBOX_CONFIG_TR=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_TR_CLASSES is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_TR_EQUIV is not set
-CONFIG_BUSYBOX_CONFIG_TRUE=y
-# CONFIG_BUSYBOX_CONFIG_TRUNCATE is not set
-# CONFIG_BUSYBOX_CONFIG_TTY is not set
-CONFIG_BUSYBOX_CONFIG_UNAME=y
-CONFIG_BUSYBOX_CONFIG_UNAME_OSNAME="GNU/Linux"
-# CONFIG_BUSYBOX_CONFIG_BB_ARCH is not set
-CONFIG_BUSYBOX_CONFIG_UNIQ=y
-# CONFIG_BUSYBOX_CONFIG_UNLINK is not set
-# CONFIG_BUSYBOX_CONFIG_USLEEP is not set
-# CONFIG_BUSYBOX_CONFIG_UUDECODE is not set
-# CONFIG_BUSYBOX_CONFIG_BASE32 is not set
-# CONFIG_BUSYBOX_CONFIG_BASE64 is not set
-# CONFIG_BUSYBOX_CONFIG_UUENCODE is not set
-CONFIG_BUSYBOX_CONFIG_WC=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_WC_LARGE is not set
-# CONFIG_BUSYBOX_CONFIG_WHOAMI is not set
-CONFIG_BUSYBOX_CONFIG_YES=y
-
-#
-# Common options
-#
-# CONFIG_BUSYBOX_CONFIG_FEATURE_VERBOSE is not set
-
-#
-# Common options for cp and mv
-#
-CONFIG_BUSYBOX_CONFIG_FEATURE_PRESERVE_HARDLINKS=y
-
-#
-# Common options for df, du, ls
-#
-CONFIG_BUSYBOX_CONFIG_FEATURE_HUMAN_READABLE=y
-# end of Coreutils
-
-#
-# Console Utilities
-#
-# CONFIG_BUSYBOX_CONFIG_CHVT is not set
-CONFIG_BUSYBOX_CONFIG_CLEAR=y
-# CONFIG_BUSYBOX_CONFIG_DEALLOCVT is not set
-# CONFIG_BUSYBOX_CONFIG_DUMPKMAP is not set
-# CONFIG_BUSYBOX_CONFIG_FGCONSOLE is not set
-# CONFIG_BUSYBOX_CONFIG_KBD_MODE is not set
-# CONFIG_BUSYBOX_CONFIG_LOADFONT is not set
-# CONFIG_BUSYBOX_CONFIG_SETFONT is not set
-# CONFIG_BUSYBOX_CONFIG_LOADKMAP is not set
-# CONFIG_BUSYBOX_CONFIG_OPENVT is not set
-CONFIG_BUSYBOX_CONFIG_RESET=y
-# CONFIG_BUSYBOX_CONFIG_RESIZE is not set
-# CONFIG_BUSYBOX_CONFIG_SETCONSOLE is not set
-# CONFIG_BUSYBOX_CONFIG_SETKEYCODES is not set
-# CONFIG_BUSYBOX_CONFIG_SETLOGCONS is not set
-# CONFIG_BUSYBOX_CONFIG_SHOWKEY is not set
-# end of Console Utilities
-
-#
-# Debian Utilities
-#
-# CONFIG_BUSYBOX_CONFIG_PIPE_PROGRESS is not set
-# CONFIG_BUSYBOX_CONFIG_RUN_PARTS is not set
-CONFIG_BUSYBOX_CONFIG_START_STOP_DAEMON=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_START_STOP_DAEMON_LONG_OPTIONS is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_START_STOP_DAEMON_FANCY is not set
-CONFIG_BUSYBOX_CONFIG_WHICH=y
-# end of Debian Utilities
-
-#
-# klibc-utils
-#
-# CONFIG_BUSYBOX_CONFIG_MINIPS is not set
-# CONFIG_BUSYBOX_CONFIG_NUKE is not set
-# CONFIG_BUSYBOX_CONFIG_RESUME is not set
-# CONFIG_BUSYBOX_CONFIG_RUN_INIT is not set
-# end of klibc-utils
-
-#
-# Editors
-#
-CONFIG_BUSYBOX_CONFIG_AWK=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_AWK_LIBM=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_AWK_GNU_EXTENSIONS=y
-CONFIG_BUSYBOX_CONFIG_CMP=y
-# CONFIG_BUSYBOX_CONFIG_DIFF is not set
-# CONFIG_BUSYBOX_CONFIG_ED is not set
-# CONFIG_BUSYBOX_CONFIG_PATCH is not set
-CONFIG_BUSYBOX_CONFIG_SED=y
-CONFIG_BUSYBOX_CONFIG_VI=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_VI_MAX_LEN=1024
-# CONFIG_BUSYBOX_CONFIG_FEATURE_VI_8BIT is not set
-CONFIG_BUSYBOX_CONFIG_FEATURE_VI_COLON=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_VI_YANKMARK=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_VI_SEARCH=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_VI_USE_SIGNALS=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_VI_DOT_CMD=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_VI_READONLY=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_VI_SETOPTS=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_VI_SET=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_VI_WIN_RESIZE=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_VI_ASK_TERMINAL=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_VI_UNDO is not set
-CONFIG_BUSYBOX_CONFIG_FEATURE_ALLOW_EXEC=y
-# end of Editors
-
-#
-# Finding Utilities
-#
-CONFIG_BUSYBOX_CONFIG_FIND=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_PRINT0=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_MTIME=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_MMIN=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_PERM=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_TYPE=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_EXECUTABLE is not set
-CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_XDEV=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_MAXDEPTH=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_NEWER=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_INUM is not set
-CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_EXEC=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_EXEC_PLUS is not set
-CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_USER=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_GROUP=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_NOT=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_DEPTH=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_PAREN=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_SIZE=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_PRUNE=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_QUIT is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_DELETE is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_EMPTY is not set
-CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_PATH=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_REGEX=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_LINKS is not set
-CONFIG_BUSYBOX_CONFIG_GREP=y
-CONFIG_BUSYBOX_CONFIG_EGREP=y
-CONFIG_BUSYBOX_CONFIG_FGREP=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_GREP_CONTEXT=y
-CONFIG_BUSYBOX_CONFIG_XARGS=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_XARGS_SUPPORT_QUOTES=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_XARGS_SUPPORT_REPL_STR is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_XARGS_SUPPORT_PARALLEL is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_XARGS_SUPPORT_ARGS_FILE is not set
-# end of Finding Utilities
-
-#
-# Init Utilities
-#
-# CONFIG_BUSYBOX_CONFIG_BOOTCHARTD is not set
-CONFIG_BUSYBOX_CONFIG_HALT=y
-CONFIG_BUSYBOX_CONFIG_POWEROFF=y
-CONFIG_BUSYBOX_CONFIG_REBOOT=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_WAIT_FOR_INIT is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_CALL_TELINIT is not set
-# CONFIG_BUSYBOX_CONFIG_INIT is not set
-# CONFIG_BUSYBOX_CONFIG_LINUXRC is not set
-# end of Init Utilities
-
-#
-# Login/Password Management Utilities
-#
-CONFIG_BUSYBOX_CONFIG_FEATURE_SHADOWPASSWDS=y
-# CONFIG_BUSYBOX_CONFIG_USE_BB_PWD_GRP is not set
-# CONFIG_BUSYBOX_CONFIG_USE_BB_CRYPT is not set
-# CONFIG_BUSYBOX_CONFIG_ADD_SHELL is not set
-# CONFIG_BUSYBOX_CONFIG_REMOVE_SHELL is not set
-# CONFIG_BUSYBOX_CONFIG_ADDGROUP is not set
-# CONFIG_BUSYBOX_CONFIG_ADDUSER is not set
-# CONFIG_BUSYBOX_CONFIG_CHPASSWD is not set
-CONFIG_BUSYBOX_CONFIG_FEATURE_DEFAULT_PASSWD_ALGO="md5"
-# CONFIG_BUSYBOX_CONFIG_CRYPTPW is not set
-# CONFIG_BUSYBOX_CONFIG_MKPASSWD is not set
-# CONFIG_BUSYBOX_CONFIG_DELUSER is not set
-# CONFIG_BUSYBOX_CONFIG_DELGROUP is not set
-# CONFIG_BUSYBOX_CONFIG_GETTY is not set
-CONFIG_BUSYBOX_CONFIG_LOGIN=y
-# CONFIG_BUSYBOX_CONFIG_LOGIN_SESSION_AS_CHILD is not set
-# CONFIG_BUSYBOX_CONFIG_LOGIN_SCRIPTS is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_NOLOGIN is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_SECURETTY is not set
-CONFIG_BUSYBOX_CONFIG_PASSWD=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_PASSWD_WEAK_CHECK=y
-# CONFIG_BUSYBOX_CONFIG_SU is not set
-# CONFIG_BUSYBOX_CONFIG_SULOGIN is not set
-# CONFIG_BUSYBOX_CONFIG_VLOCK is not set
-# end of Login/Password Management Utilities
-
-#
-# Linux Ext2 FS Progs
-#
-# CONFIG_BUSYBOX_CONFIG_CHATTR is not set
-# CONFIG_BUSYBOX_CONFIG_FSCK is not set
-# CONFIG_BUSYBOX_CONFIG_LSATTR is not set
-# CONFIG_BUSYBOX_CONFIG_TUNE2FS is not set
-# end of Linux Ext2 FS Progs
-
-#
-# Linux Module Utilities
-#
-# CONFIG_BUSYBOX_CONFIG_MODPROBE_SMALL is not set
-# CONFIG_BUSYBOX_CONFIG_DEPMOD is not set
-# CONFIG_BUSYBOX_CONFIG_INSMOD is not set
-# CONFIG_BUSYBOX_CONFIG_LSMOD is not set
-# CONFIG_BUSYBOX_CONFIG_MODINFO is not set
-# CONFIG_BUSYBOX_CONFIG_MODPROBE is not set
-# CONFIG_BUSYBOX_CONFIG_RMMOD is not set
-
-#
-# Options common to multiple modutils
-#
-# end of Linux Module Utilities
-
-#
-# Linux System Utilities
-#
-# CONFIG_BUSYBOX_CONFIG_ACPID is not set
-# CONFIG_BUSYBOX_CONFIG_BLKDISCARD is not set
-# CONFIG_BUSYBOX_CONFIG_BLKID is not set
-# CONFIG_BUSYBOX_CONFIG_BLOCKDEV is not set
-# CONFIG_BUSYBOX_CONFIG_CAL is not set
-# CONFIG_BUSYBOX_CONFIG_CHRT is not set
-CONFIG_BUSYBOX_CONFIG_DMESG=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_DMESG_PRETTY=y
-# CONFIG_BUSYBOX_CONFIG_EJECT is not set
-# CONFIG_BUSYBOX_CONFIG_FALLOCATE is not set
-# CONFIG_BUSYBOX_CONFIG_FATATTR is not set
-# CONFIG_BUSYBOX_CONFIG_FBSET is not set
-# CONFIG_BUSYBOX_CONFIG_FDFORMAT is not set
-# CONFIG_BUSYBOX_CONFIG_FDISK is not set
-# CONFIG_BUSYBOX_CONFIG_FINDFS is not set
-CONFIG_BUSYBOX_CONFIG_FLOCK=y
-# CONFIG_BUSYBOX_CONFIG_FDFLUSH is not set
-# CONFIG_BUSYBOX_CONFIG_FREERAMDISK is not set
-# CONFIG_BUSYBOX_CONFIG_FSCK_MINIX is not set
-# CONFIG_BUSYBOX_CONFIG_FSFREEZE is not set
-# CONFIG_BUSYBOX_CONFIG_FSTRIM is not set
-# CONFIG_BUSYBOX_CONFIG_GETOPT is not set
-CONFIG_BUSYBOX_CONFIG_HEXDUMP=y
-# CONFIG_BUSYBOX_CONFIG_HD is not set
-# CONFIG_BUSYBOX_CONFIG_XXD is not set
-CONFIG_BUSYBOX_CONFIG_HWCLOCK=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS is not set
-# CONFIG_BUSYBOX_CONFIG_IONICE is not set
-# CONFIG_BUSYBOX_CONFIG_IPCRM is not set
-# CONFIG_BUSYBOX_CONFIG_IPCS is not set
-# CONFIG_BUSYBOX_CONFIG_LOSETUP is not set
-CONFIG_BUSYBOX_CONFIG_LSPCI=y
-# CONFIG_BUSYBOX_CONFIG_LSUSB is not set
-# CONFIG_BUSYBOX_CONFIG_MDEV is not set
-# CONFIG_BUSYBOX_CONFIG_MESG is not set
-# CONFIG_BUSYBOX_CONFIG_MKE2FS is not set
-# CONFIG_BUSYBOX_CONFIG_MKFS_EXT2 is not set
-# CONFIG_BUSYBOX_CONFIG_MKFS_MINIX is not set
-# CONFIG_BUSYBOX_CONFIG_MKFS_REISER is not set
-# CONFIG_BUSYBOX_CONFIG_MKDOSFS is not set
-# CONFIG_BUSYBOX_CONFIG_MKFS_VFAT is not set
-CONFIG_BUSYBOX_CONFIG_MKSWAP=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_MKSWAP_UUID is not set
-# CONFIG_BUSYBOX_CONFIG_MORE is not set
-CONFIG_BUSYBOX_CONFIG_MOUNT=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_MOUNT_FAKE is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_MOUNT_VERBOSE is not set
-CONFIG_BUSYBOX_CONFIG_FEATURE_MOUNT_HELPERS=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_MOUNT_LABEL is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_MOUNT_NFS is not set
-CONFIG_BUSYBOX_CONFIG_FEATURE_MOUNT_CIFS=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_MOUNT_FLAGS=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_MOUNT_FSTAB=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_MOUNT_OTHERTAB is not set
-# CONFIG_BUSYBOX_CONFIG_MOUNTPOINT is not set
-# CONFIG_BUSYBOX_CONFIG_NSENTER is not set
-CONFIG_BUSYBOX_CONFIG_PIVOT_ROOT=y
-# CONFIG_BUSYBOX_CONFIG_RDATE is not set
-# CONFIG_BUSYBOX_CONFIG_RDEV is not set
-# CONFIG_BUSYBOX_CONFIG_READPROFILE is not set
-# CONFIG_BUSYBOX_CONFIG_RENICE is not set
-# CONFIG_BUSYBOX_CONFIG_REV is not set
-# CONFIG_BUSYBOX_CONFIG_RTCWAKE is not set
-# CONFIG_BUSYBOX_CONFIG_SCRIPT is not set
-# CONFIG_BUSYBOX_CONFIG_SCRIPTREPLAY is not set
-# CONFIG_BUSYBOX_CONFIG_SETARCH is not set
-# CONFIG_BUSYBOX_CONFIG_LINUX32 is not set
-# CONFIG_BUSYBOX_CONFIG_LINUX64 is not set
-# CONFIG_BUSYBOX_CONFIG_SETPRIV is not set
-# CONFIG_BUSYBOX_CONFIG_SETSID is not set
-CONFIG_BUSYBOX_CONFIG_SWAPON=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_SWAPON_DISCARD=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_SWAPON_PRI=y
-CONFIG_BUSYBOX_CONFIG_SWAPOFF=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_SWAPONOFF_LABEL is not set
-CONFIG_BUSYBOX_CONFIG_SWITCH_ROOT=y
-# CONFIG_BUSYBOX_CONFIG_TASKSET is not set
-# CONFIG_BUSYBOX_CONFIG_UEVENT is not set
-CONFIG_BUSYBOX_CONFIG_UMOUNT=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_UMOUNT_ALL=y
-# CONFIG_BUSYBOX_CONFIG_UNSHARE is not set
-
-#
-# Common options for mount/umount
-#
-CONFIG_BUSYBOX_CONFIG_FEATURE_MOUNT_LOOP=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_MOUNT_LOOP_CREATE is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_MTAB_SUPPORT is not set
-# CONFIG_BUSYBOX_CONFIG_VOLUMEID is not set
-# end of Linux System Utilities
-
-#
-# Miscellaneous Utilities
-#
-# CONFIG_BUSYBOX_CONFIG_ADJTIMEX is not set
-# CONFIG_BUSYBOX_CONFIG_BBCONFIG is not set
-# CONFIG_BUSYBOX_CONFIG_BC is not set
-# CONFIG_BUSYBOX_CONFIG_DC is not set
-# CONFIG_BUSYBOX_CONFIG_BEEP is not set
-# CONFIG_BUSYBOX_CONFIG_CHAT is not set
-# CONFIG_BUSYBOX_CONFIG_CONSPY is not set
-CONFIG_BUSYBOX_CONFIG_CROND=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_CROND_D is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_CROND_CALL_SENDMAIL is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_CROND_SPECIAL_TIMES is not set
-CONFIG_BUSYBOX_CONFIG_FEATURE_CROND_DIR="/etc"
-CONFIG_BUSYBOX_CONFIG_CRONTAB=y
-# CONFIG_BUSYBOX_CONFIG_DEVFSD is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_DEVFS is not set
-# CONFIG_BUSYBOX_CONFIG_DEVMEM is not set
-# CONFIG_BUSYBOX_CONFIG_FBSPLASH is not set
-# CONFIG_BUSYBOX_CONFIG_FLASH_ERASEALL is not set
-# CONFIG_BUSYBOX_CONFIG_FLASH_LOCK is not set
-# CONFIG_BUSYBOX_CONFIG_FLASH_UNLOCK is not set
-# CONFIG_BUSYBOX_CONFIG_FLASHCP is not set
-# CONFIG_BUSYBOX_CONFIG_HDPARM is not set
-# CONFIG_BUSYBOX_CONFIG_HEXEDIT is not set
-# CONFIG_BUSYBOX_CONFIG_I2CGET is not set
-# CONFIG_BUSYBOX_CONFIG_I2CSET is not set
-# CONFIG_BUSYBOX_CONFIG_I2CDUMP is not set
-# CONFIG_BUSYBOX_CONFIG_I2CDETECT is not set
-# CONFIG_BUSYBOX_CONFIG_I2CTRANSFER is not set
-# CONFIG_BUSYBOX_CONFIG_INOTIFYD is not set
-CONFIG_BUSYBOX_CONFIG_LESS=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_LESS_MAXLINES=9999999
-# CONFIG_BUSYBOX_CONFIG_FEATURE_LESS_BRACKETS is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_LESS_FLAGS is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_LESS_TRUNCATE is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_LESS_MARKS is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_LESS_REGEXP is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_LESS_WINCH is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_LESS_DASHCMD is not set
-CONFIG_BUSYBOX_CONFIG_LOCK=y
-# CONFIG_BUSYBOX_CONFIG_LSSCSI is not set
-# CONFIG_BUSYBOX_CONFIG_MAKEDEVS is not set
-# CONFIG_BUSYBOX_CONFIG_MAN is not set
-# CONFIG_BUSYBOX_CONFIG_MICROCOM is not set
-# CONFIG_BUSYBOX_CONFIG_MT is not set
-# CONFIG_BUSYBOX_CONFIG_NANDWRITE is not set
-# CONFIG_BUSYBOX_CONFIG_NANDDUMP is not set
-# CONFIG_BUSYBOX_CONFIG_PARTPROBE is not set
-# CONFIG_BUSYBOX_CONFIG_RAIDAUTORUN is not set
-# CONFIG_BUSYBOX_CONFIG_READAHEAD is not set
-# CONFIG_BUSYBOX_CONFIG_RFKILL is not set
-# CONFIG_BUSYBOX_CONFIG_RX is not set
-# CONFIG_BUSYBOX_CONFIG_SETFATTR is not set
-# CONFIG_BUSYBOX_CONFIG_SETSERIAL is not set
-CONFIG_BUSYBOX_CONFIG_STRINGS=y
-CONFIG_BUSYBOX_CONFIG_TIME=y
-# CONFIG_BUSYBOX_CONFIG_TS is not set
-# CONFIG_BUSYBOX_CONFIG_TTYSIZE is not set
-# CONFIG_BUSYBOX_CONFIG_UBIATTACH is not set
-# CONFIG_BUSYBOX_CONFIG_UBIDETACH is not set
-# CONFIG_BUSYBOX_CONFIG_UBIMKVOL is not set
-# CONFIG_BUSYBOX_CONFIG_UBIRMVOL is not set
-# CONFIG_BUSYBOX_CONFIG_UBIRSVOL is not set
-# CONFIG_BUSYBOX_CONFIG_UBIUPDATEVOL is not set
-# CONFIG_BUSYBOX_CONFIG_UBIRENAME is not set
-# CONFIG_BUSYBOX_CONFIG_VOLNAME is not set
-# CONFIG_BUSYBOX_CONFIG_WATCHDOG is not set
-# end of Miscellaneous Utilities
-
-#
-# Networking Utilities
-#
-CONFIG_BUSYBOX_CONFIG_FEATURE_IPV6=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_UNIX_LOCAL is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_PREFER_IPV4_ADDRESS is not set
-CONFIG_BUSYBOX_CONFIG_VERBOSE_RESOLUTION_ERRORS=y
-# CONFIG_BUSYBOX_CONFIG_ARP is not set
-# CONFIG_BUSYBOX_CONFIG_ARPING is not set
-CONFIG_BUSYBOX_CONFIG_BRCTL=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_BRCTL_FANCY=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_BRCTL_SHOW=y
-# CONFIG_BUSYBOX_CONFIG_DNSD is not set
-# CONFIG_BUSYBOX_CONFIG_ETHER_WAKE is not set
-# CONFIG_BUSYBOX_CONFIG_FTPD is not set
-# CONFIG_BUSYBOX_CONFIG_FTPGET is not set
-# CONFIG_BUSYBOX_CONFIG_FTPPUT is not set
-# CONFIG_BUSYBOX_CONFIG_HOSTNAME is not set
-# CONFIG_BUSYBOX_CONFIG_DNSDOMAINNAME is not set
-# CONFIG_BUSYBOX_CONFIG_HTTPD is not set
-CONFIG_BUSYBOX_CONFIG_IFCONFIG=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_IFCONFIG_STATUS=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_IFCONFIG_SLIP is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ is not set
-CONFIG_BUSYBOX_CONFIG_FEATURE_IFCONFIG_HW=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS=y
-# CONFIG_BUSYBOX_CONFIG_IFENSLAVE is not set
-# CONFIG_BUSYBOX_CONFIG_IFPLUGD is not set
-# CONFIG_BUSYBOX_CONFIG_IFUP is not set
-# CONFIG_BUSYBOX_CONFIG_IFDOWN is not set
-# CONFIG_BUSYBOX_CONFIG_INETD is not set
-CONFIG_BUSYBOX_CONFIG_IP=y
-# CONFIG_BUSYBOX_CONFIG_IPADDR is not set
-# CONFIG_BUSYBOX_CONFIG_IPLINK is not set
-# CONFIG_BUSYBOX_CONFIG_IPROUTE is not set
-# CONFIG_BUSYBOX_CONFIG_IPTUNNEL is not set
-# CONFIG_BUSYBOX_CONFIG_IPRULE is not set
-# CONFIG_BUSYBOX_CONFIG_IPNEIGH is not set
-CONFIG_BUSYBOX_CONFIG_FEATURE_IP_ADDRESS=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_IP_LINK=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_IP_ROUTE=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_IP_ROUTE_DIR="/etc/iproute2"
-# CONFIG_BUSYBOX_CONFIG_FEATURE_IP_TUNNEL is not set
-CONFIG_BUSYBOX_CONFIG_FEATURE_IP_RULE=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_IP_NEIGH=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_IP_RARE_PROTOCOLS is not set
-# CONFIG_BUSYBOX_CONFIG_IPCALC is not set
-# CONFIG_BUSYBOX_CONFIG_FAKEIDENTD is not set
-# CONFIG_BUSYBOX_CONFIG_NAMEIF is not set
-# CONFIG_BUSYBOX_CONFIG_NBDCLIENT is not set
-CONFIG_BUSYBOX_CONFIG_NC=y
-# CONFIG_BUSYBOX_CONFIG_NETCAT is not set
-# CONFIG_BUSYBOX_CONFIG_NC_SERVER is not set
-# CONFIG_BUSYBOX_CONFIG_NC_EXTRA is not set
-# CONFIG_BUSYBOX_CONFIG_NC_110_COMPAT is not set
-CONFIG_BUSYBOX_CONFIG_NETMSG=y
-CONFIG_BUSYBOX_CONFIG_NETSTAT=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_NETSTAT_WIDE=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_NETSTAT_PRG=y
-# CONFIG_BUSYBOX_CONFIG_NSLOOKUP is not set
-CONFIG_BUSYBOX_CONFIG_NSLOOKUP_OPENWRT=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_NSLOOKUP_OPENWRT_LONG_OPTIONS is not set
-CONFIG_BUSYBOX_CONFIG_NTPD=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_NTPD_SERVER=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_NTPD_CONF is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_NTP_AUTH is not set
-CONFIG_BUSYBOX_CONFIG_PING=y
-CONFIG_BUSYBOX_CONFIG_PING6=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_FANCY_PING=y
-# CONFIG_BUSYBOX_CONFIG_PSCAN is not set
-CONFIG_BUSYBOX_CONFIG_ROUTE=y
-# CONFIG_BUSYBOX_CONFIG_SLATTACH is not set
-# CONFIG_BUSYBOX_CONFIG_SSL_CLIENT is not set
-# CONFIG_BUSYBOX_CONFIG_TC is not set
-# CONFIG_BUSYBOX_CONFIG_TCPSVD is not set
-# CONFIG_BUSYBOX_CONFIG_UDPSVD is not set
-# CONFIG_BUSYBOX_CONFIG_TELNET is not set
-# CONFIG_BUSYBOX_CONFIG_TELNETD is not set
-CONFIG_BUSYBOX_CONFIG_TFTP=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_TFTP_PROGRESS_BAR=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_TFTP_HPA_COMPAT=y
-CONFIG_BUSYBOX_CONFIG_TFTPD=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_TFTP_GET=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_TFTP_PUT=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_TFTP_BLOCKSIZE=y
-CONFIG_BUSYBOX_CONFIG_TFTP_DEBUG=y
-# CONFIG_BUSYBOX_CONFIG_TLS is not set
-CONFIG_BUSYBOX_CONFIG_TRACEROUTE=y
-CONFIG_BUSYBOX_CONFIG_TRACEROUTE6=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_TRACEROUTE_VERBOSE=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_TRACEROUTE_USE_ICMP is not set
-# CONFIG_BUSYBOX_CONFIG_TUNCTL is not set
-# CONFIG_BUSYBOX_CONFIG_VCONFIG is not set
-# CONFIG_BUSYBOX_CONFIG_WGET is not set
-# CONFIG_BUSYBOX_CONFIG_WHOIS is not set
-# CONFIG_BUSYBOX_CONFIG_ZCIP is not set
-# CONFIG_BUSYBOX_CONFIG_UDHCPD is not set
-# CONFIG_BUSYBOX_CONFIG_DUMPLEASES is not set
-# CONFIG_BUSYBOX_CONFIG_DHCPRELAY is not set
-CONFIG_BUSYBOX_CONFIG_UDHCPC=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_UDHCPC_ARPING is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_UDHCPC_SANITIZEOPT is not set
-CONFIG_BUSYBOX_CONFIG_UDHCPC_DEFAULT_SCRIPT="/usr/share/udhcpc/default.script"
-# CONFIG_BUSYBOX_CONFIG_UDHCPC6 is not set
-
-#
-# Common options for DHCP applets
-#
-# CONFIG_BUSYBOX_CONFIG_FEATURE_UDHCP_PORT is not set
-CONFIG_BUSYBOX_CONFIG_UDHCP_DEBUG=0
-CONFIG_BUSYBOX_CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=80
-CONFIG_BUSYBOX_CONFIG_FEATURE_UDHCP_RFC3397=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_UDHCP_8021Q is not set
-# end of Networking Utilities
-
-#
-# Print Utilities
-#
-# CONFIG_BUSYBOX_CONFIG_LPD is not set
-# CONFIG_BUSYBOX_CONFIG_LPR is not set
-# CONFIG_BUSYBOX_CONFIG_LPQ is not set
-# end of Print Utilities
-
-#
-# Mail Utilities
-#
-# CONFIG_BUSYBOX_CONFIG_MAKEMIME is not set
-# CONFIG_BUSYBOX_CONFIG_POPMAILDIR is not set
-# CONFIG_BUSYBOX_CONFIG_REFORMIME is not set
-# CONFIG_BUSYBOX_CONFIG_SENDMAIL is not set
-# end of Mail Utilities
-
-#
-# Process Utilities
-#
-CONFIG_BUSYBOX_CONFIG_FREE=y
-# CONFIG_BUSYBOX_CONFIG_FUSER is not set
-# CONFIG_BUSYBOX_CONFIG_IOSTAT is not set
-CONFIG_BUSYBOX_CONFIG_KILL=y
-CONFIG_BUSYBOX_CONFIG_KILLALL=y
-# CONFIG_BUSYBOX_CONFIG_KILLALL5 is not set
-# CONFIG_BUSYBOX_CONFIG_LSOF is not set
-# CONFIG_BUSYBOX_CONFIG_MPSTAT is not set
-# CONFIG_BUSYBOX_CONFIG_NMETER is not set
-CONFIG_BUSYBOX_CONFIG_PGREP=y
-# CONFIG_BUSYBOX_CONFIG_PKILL is not set
-CONFIG_BUSYBOX_CONFIG_PIDOF=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_PIDOF_SINGLE is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_PIDOF_OMIT is not set
-# CONFIG_BUSYBOX_CONFIG_PMAP is not set
-# CONFIG_BUSYBOX_CONFIG_POWERTOP is not set
-CONFIG_BUSYBOX_CONFIG_PS=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_PS_WIDE=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_PS_LONG is not set
-# CONFIG_BUSYBOX_CONFIG_PSTREE is not set
-# CONFIG_BUSYBOX_CONFIG_PWDX is not set
-# CONFIG_BUSYBOX_CONFIG_SMEMCAP is not set
-CONFIG_BUSYBOX_CONFIG_BB_SYSCTL=y
-CONFIG_BUSYBOX_CONFIG_TOP=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_TOP_INTERACTIVE is not set
-CONFIG_BUSYBOX_CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_TOP_SMP_CPU is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_TOP_DECIMALS is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_TOP_SMP_PROCESS is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_TOPMEM is not set
-CONFIG_BUSYBOX_CONFIG_UPTIME=y
-# CONFIG_BUSYBOX_CONFIG_WATCH is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_SHOW_THREADS is not set
-# end of Process Utilities
-
-#
-# Runit Utilities
-#
-# CONFIG_BUSYBOX_CONFIG_CHPST is not set
-# CONFIG_BUSYBOX_CONFIG_SETUIDGID is not set
-# CONFIG_BUSYBOX_CONFIG_ENVUIDGID is not set
-# CONFIG_BUSYBOX_CONFIG_ENVDIR is not set
-# CONFIG_BUSYBOX_CONFIG_SOFTLIMIT is not set
-# CONFIG_BUSYBOX_CONFIG_RUNSV is not set
-# CONFIG_BUSYBOX_CONFIG_RUNSVDIR is not set
-# CONFIG_BUSYBOX_CONFIG_SV is not set
-# CONFIG_BUSYBOX_CONFIG_SVC is not set
-# CONFIG_BUSYBOX_CONFIG_SVOK is not set
-# CONFIG_BUSYBOX_CONFIG_SVLOGD is not set
-# end of Runit Utilities
-
-#
-# Shells
-#
-CONFIG_BUSYBOX_CONFIG_SH_IS_ASH=y
-# CONFIG_BUSYBOX_CONFIG_SH_IS_HUSH is not set
-# CONFIG_BUSYBOX_CONFIG_SH_IS_NONE is not set
-# CONFIG_BUSYBOX_CONFIG_BASH_IS_ASH is not set
-# CONFIG_BUSYBOX_CONFIG_BASH_IS_HUSH is not set
-CONFIG_BUSYBOX_CONFIG_BASH_IS_NONE=y
-CONFIG_BUSYBOX_CONFIG_SHELL_ASH=y
-CONFIG_BUSYBOX_CONFIG_ASH=y
-# CONFIG_BUSYBOX_CONFIG_ASH_OPTIMIZE_FOR_SIZE is not set
-CONFIG_BUSYBOX_CONFIG_ASH_INTERNAL_GLOB=y
-CONFIG_BUSYBOX_CONFIG_ASH_BASH_COMPAT=y
-# CONFIG_BUSYBOX_CONFIG_ASH_BASH_SOURCE_CURDIR is not set
-# CONFIG_BUSYBOX_CONFIG_ASH_BASH_NOT_FOUND_HOOK is not set
-CONFIG_BUSYBOX_CONFIG_ASH_JOB_CONTROL=y
-CONFIG_BUSYBOX_CONFIG_ASH_ALIAS=y
-# CONFIG_BUSYBOX_CONFIG_ASH_RANDOM_SUPPORT is not set
-CONFIG_BUSYBOX_CONFIG_ASH_EXPAND_PRMT=y
-# CONFIG_BUSYBOX_CONFIG_ASH_IDLE_TIMEOUT is not set
-# CONFIG_BUSYBOX_CONFIG_ASH_MAIL is not set
-CONFIG_BUSYBOX_CONFIG_ASH_ECHO=y
-CONFIG_BUSYBOX_CONFIG_ASH_PRINTF=y
-CONFIG_BUSYBOX_CONFIG_ASH_TEST=y
-# CONFIG_BUSYBOX_CONFIG_ASH_HELP is not set
-CONFIG_BUSYBOX_CONFIG_ASH_GETOPTS=y
-CONFIG_BUSYBOX_CONFIG_ASH_CMDCMD=y
-# CONFIG_BUSYBOX_CONFIG_CTTYHACK is not set
-# CONFIG_BUSYBOX_CONFIG_HUSH is not set
-# CONFIG_BUSYBOX_CONFIG_SHELL_HUSH is not set
-
-#
-# Options common to all shells
-#
-CONFIG_BUSYBOX_CONFIG_FEATURE_SH_MATH=y
-CONFIG_BUSYBOX_CONFIG_FEATURE_SH_MATH_64=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_SH_MATH_BASE is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_SH_EXTRA_QUIET is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_SH_STANDALONE is not set
-CONFIG_BUSYBOX_CONFIG_FEATURE_SH_NOFORK=y
-# CONFIG_BUSYBOX_CONFIG_FEATURE_SH_READ_FRAC is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_SH_HISTFILESIZE is not set
-# CONFIG_BUSYBOX_CONFIG_FEATURE_SH_EMBEDDED_SCRIPTS is not set
-# end of Shells
-
-#
-# System Logging Utilities
-#
-# CONFIG_BUSYBOX_CONFIG_KLOGD is not set
-CONFIG_BUSYBOX_CONFIG_LOGGER=y
-# CONFIG_BUSYBOX_CONFIG_LOGREAD is not set
-# CONFIG_BUSYBOX_CONFIG_SYSLOGD is not set
-# end of System Logging Utilities
-
 # CONFIG_PACKAGE_busybox-selinux is not set
 # CONFIG_PACKAGE_ca-bundle is not set
 # CONFIG_PACKAGE_ca-certificates is not set
@@ -2552,6 +1648,7 @@
 #
 # Boot Loaders
 #
+# CONFIG_PACKAGE_optee-mediatek is not set
 # end of Boot Loaders
 
 #
@@ -2583,6 +1680,8 @@
 # CONFIG_PACKAGE_make is not set
 # CONFIG_PACKAGE_meson is not set
 CONFIG_PACKAGE_mt76-test=y
+# CONFIG_PACKAGE_mt76-vendor is not set
+# CONFIG_PACKAGE_mwctl is not set
 # CONFIG_PACKAGE_ninja is not set
 CONFIG_PACKAGE_objdump=y
 # CONFIG_PACKAGE_packr is not set
@@ -2834,7 +1933,6 @@
 # CONFIG_PACKAGE_kmod-crypto-ecb is not set
 # CONFIG_PACKAGE_kmod-crypto-ecdh is not set
 # CONFIG_PACKAGE_kmod-crypto-echainiv is not set
-# CONFIG_PACKAGE_kmod-crypto-eip197 is not set
 # CONFIG_PACKAGE_kmod-crypto-fcrypt is not set
 CONFIG_PACKAGE_kmod-crypto-gcm=y
 CONFIG_PACKAGE_kmod-crypto-gf128=y
@@ -2843,6 +1941,7 @@
 CONFIG_PACKAGE_kmod-crypto-hmac=y
 # CONFIG_PACKAGE_kmod-crypto-hw-geode is not set
 # CONFIG_PACKAGE_kmod-crypto-hw-hifn-795x is not set
+# CONFIG_PACKAGE_kmod-crypto-hw-mtk is not set
 # CONFIG_PACKAGE_kmod-crypto-hw-padlock is not set
 # CONFIG_PACKAGE_kmod-crypto-hw-talitos is not set
 # CONFIG_PACKAGE_kmod-crypto-kpp is not set
@@ -3131,7 +2230,6 @@
 # CONFIG_PACKAGE_kmod-ipt-raw is not set
 # CONFIG_PACKAGE_kmod-ipt-raw6 is not set
 # CONFIG_PACKAGE_kmod-ipt-rpfilter is not set
-# CONFIG_PACKAGE_kmod-ipt-rtpengine is not set
 # CONFIG_PACKAGE_kmod-ipt-sysrq is not set
 # CONFIG_PACKAGE_kmod-ipt-tarpit is not set
 # CONFIG_PACKAGE_kmod-ipt-tee is not set
@@ -3485,7 +2583,6 @@
 #
 # Voice over IP
 #
-# CONFIG_PACKAGE_kmod-dahdi is not set
 # end of Voice over IP
 
 #
@@ -3525,7 +2622,6 @@
 # CONFIG_PACKAGE_kmod-ath9k-htc is not set
 # CONFIG_PACKAGE_kmod-b43 is not set
 # CONFIG_PACKAGE_kmod-b43legacy is not set
-# CONFIG_PACKAGE_kmod-besra is not set
 # CONFIG_PACKAGE_kmod-brcmfmac is not set
 # CONFIG_PACKAGE_kmod-brcmsmac is not set
 # CONFIG_PACKAGE_kmod-brcmutil is not set
@@ -3541,6 +2637,7 @@
 # CONFIG_PACKAGE_kmod-iwl3945 is not set
 # CONFIG_PACKAGE_kmod-iwl4965 is not set
 # CONFIG_PACKAGE_kmod-iwlwifi is not set
+# CONFIG_PACKAGE_kmod-lib80211 is not set
 # CONFIG_PACKAGE_kmod-libertas-sdio is not set
 # CONFIG_PACKAGE_kmod-libertas-spi is not set
 # CONFIG_PACKAGE_kmod-libertas-usb is not set
@@ -3743,6 +2840,7 @@
 # CONFIG_PACKAGE_libpython3 is not set
 # CONFIG_PACKAGE_micropython is not set
 # CONFIG_PACKAGE_micropython-lib is not set
+# CONFIG_PACKAGE_python-periphery is not set
 # CONFIG_PACKAGE_python-pip-conf is not set
 # CONFIG_PACKAGE_python3 is not set
 # CONFIG_PACKAGE_python3-aiohttp is not set
@@ -4586,35 +3684,6 @@
 # end of Sound
 
 #
-# Telephony
-#
-# CONFIG_PACKAGE_bcg729 is not set
-# CONFIG_PACKAGE_dahdi-tools-libtonezone is not set
-# CONFIG_PACKAGE_gsmlib is not set
-# CONFIG_PACKAGE_libctb is not set
-# CONFIG_PACKAGE_libfreetdm is not set
-# CONFIG_PACKAGE_libiksemel is not set
-# CONFIG_PACKAGE_libks is not set
-# CONFIG_PACKAGE_libosip2 is not set
-# CONFIG_PACKAGE_libpj is not set
-# CONFIG_PACKAGE_libpjlib-util is not set
-# CONFIG_PACKAGE_libpjmedia is not set
-# CONFIG_PACKAGE_libpjnath is not set
-# CONFIG_PACKAGE_libpjsip is not set
-# CONFIG_PACKAGE_libpjsip-simple is not set
-# CONFIG_PACKAGE_libpjsip-ua is not set
-# CONFIG_PACKAGE_libpjsua is not set
-# CONFIG_PACKAGE_libpjsua2 is not set
-# CONFIG_PACKAGE_libre is not set
-# CONFIG_PACKAGE_librem is not set
-# CONFIG_PACKAGE_libspandsp is not set
-# CONFIG_PACKAGE_libspandsp3 is not set
-# CONFIG_PACKAGE_libsrtp2 is not set
-# CONFIG_PACKAGE_signalwire-client-c is not set
-# CONFIG_PACKAGE_sofia-sip is not set
-# end of Telephony
-
-#
 # libimobiledevice
 #
 # CONFIG_PACKAGE_libimobiledevice is not set
@@ -4750,6 +3819,7 @@
 # CONFIG_PACKAGE_libgphoto2 is not set
 # CONFIG_PACKAGE_libgpiod is not set
 # CONFIG_PACKAGE_libgps is not set
+CONFIG_PACKAGE_libgsl=y
 # CONFIG_PACKAGE_libh2o is not set
 # CONFIG_PACKAGE_libh2o-evloop is not set
 # CONFIG_PACKAGE_libhamlib is not set
@@ -4777,6 +3847,7 @@
 # CONFIG_PACKAGE_libkeyutils is not set
 # CONFIG_PACKAGE_libkmod is not set
 # CONFIG_PACKAGE_libksba is not set
+CONFIG_PACKAGE_libkvcutil=y
 # CONFIG_PACKAGE_libldns is not set
 # CONFIG_PACKAGE_libleptonica is not set
 # CONFIG_PACKAGE_libloragw is not set
@@ -4873,7 +3944,6 @@
 # CONFIG_PACKAGE_libpkgconf is not set
 # CONFIG_PACKAGE_libpng is not set
 # CONFIG_PACKAGE_libpopt is not set
-# CONFIG_PACKAGE_libpri is not set
 # CONFIG_PACKAGE_libprotobuf-c is not set
 # CONFIG_PACKAGE_libpsl is not set
 # CONFIG_PACKAGE_libqmi is not set
@@ -4982,6 +4052,7 @@
 # CONFIG_PACKAGE_libwebsockets-full is not set
 # CONFIG_PACKAGE_libwebsockets-mbedtls is not set
 # CONFIG_PACKAGE_libwebsockets-openssl is not set
+# CONFIG_PACKAGE_libwpactrl is not set
 # CONFIG_PACKAGE_libwrap is not set
 # CONFIG_PACKAGE_libxerces-c is not set
 # CONFIG_PACKAGE_libxerces-c-samples is not set
@@ -5154,6 +4225,7 @@
 # CONFIG_PACKAGE_luci-app-lxc is not set
 # CONFIG_PACKAGE_luci-app-minidlna is not set
 # CONFIG_PACKAGE_luci-app-mjpg-streamer is not set
+CONFIG_PACKAGE_luci-app-mtk=y
 # CONFIG_PACKAGE_luci-app-mwan3 is not set
 # CONFIG_PACKAGE_luci-app-nextdns is not set
 # CONFIG_PACKAGE_luci-app-nft-qos is not set
@@ -5411,6 +4483,82 @@
 # end of Mail
 
 #
+# MTK Properties
+#
+
+#
+# Applications
+#
+# CONFIG_PACKAGE_1905daemon is not set
+# CONFIG_PACKAGE_8021xd is not set
+# CONFIG_PACKAGE_AFC is not set
+# CONFIG_PACKAGE_apcli_detectd is not set
+# CONFIG_PACKAGE_ated_ext is not set
+# CONFIG_PACKAGE_atenl is not set
+# CONFIG_PACKAGE_atf-fuzzer-tool is not set
+# CONFIG_PACKAGE_bluedroid is not set
+# CONFIG_PACKAGE_bndstrg_plus is not set
+CONFIG_PACKAGE_datconf=y
+CONFIG_PACKAGE_datconf-lua=y
+# CONFIG_PACKAGE_fwdd is not set
+# CONFIG_PACKAGE_hostapd-2.9 is not set
+# CONFIG_PACKAGE_l2ogre is not set
+# CONFIG_PACKAGE_mapd is not set
+CONFIG_PACKAGE_mii_mgr=y
+# CONFIG_PACKAGE_miniupnpd-1.6 is not set
+# CONFIG_PACKAGE_mtk-efuse-nl-tool is not set
+CONFIG_PACKAGE_regs=y
+# CONFIG_PACKAGE_sigma_daemon is not set
+# CONFIG_PACKAGE_sigma_dut is not set
+# CONFIG_PACKAGE_sigma_one is not set
+CONFIG_PACKAGE_switch=y
+# CONFIG_PACKAGE_uart_launcher is not set
+# CONFIG_PACKAGE_ufsd_tools is not set
+# CONFIG_PACKAGE_wapp is not set
+# CONFIG_PACKAGE_wificonf is not set
+# CONFIG_PACKAGE_wpa_supplicant-2.9 is not set
+# CONFIG_PACKAGE_wpa_supplicant-dev-11be is not set
+# end of Applications
+
+#
+# Drivers
+#
+# CONFIG_PACKAGE_kmod-atf-fuzzer is not set
+# CONFIG_PACKAGE_kmod-btmtk_uart is not set
+# CONFIG_PACKAGE_kmod-conninfra is not set
+# CONFIG_PACKAGE_kmod-gen4m is not set
+# CONFIG_PACKAGE_kmod-hw_nat is not set
+# CONFIG_PACKAGE_kmod-mapfilter is not set
+# CONFIG_PACKAGE_kmod-mt7915 is not set
+# CONFIG_PACKAGE_kmod-mt_hwifi is not set
+# CONFIG_PACKAGE_kmod-mt_wifi is not set
+# CONFIG_PACKAGE_kmod-mt_wifi7 is not set
+# CONFIG_PACKAGE_kmod-mtfwd is not set
+# CONFIG_PACKAGE_kmod-mtk-efuse-nl-drv is not set
+# CONFIG_PACKAGE_kmod-mtqos is not set
+# CONFIG_PACKAGE_kmod-ufsd_driver is not set
+# CONFIG_PACKAGE_kmod-warp is not set
+# CONFIG_PACKAGE_wifi-profile is not set
+# end of Drivers
+
+#
+# Libraries
+#
+# CONFIG_PACKAGE_libmapd is not set
+# end of Libraries
+
+#
+# Misc
+#
+# CONFIG_PACKAGE_eslt is not set
+# CONFIG_PACKAGE_mtk-base-files is not set
+# CONFIG_PACKAGE_mtk_factory_rw is not set
+# CONFIG_PACKAGE_mtk_failsafe is not set
+# CONFIG_PACKAGE_wslt is not set
+# end of Misc
+# end of MTK Properties
+
+#
 # Multimedia
 #
 
@@ -5588,7 +4736,6 @@
 # CONFIG_PACKAGE_iptables-mod-psd is not set
 # CONFIG_PACKAGE_iptables-mod-quota2 is not set
 # CONFIG_PACKAGE_iptables-mod-rpfilter is not set
-# CONFIG_PACKAGE_iptables-mod-rtpengine is not set
 # CONFIG_PACKAGE_iptables-mod-sysrq is not set
 # CONFIG_PACKAGE_iptables-mod-tarpit is not set
 # CONFIG_PACKAGE_iptables-mod-tee is not set
@@ -5974,30 +5121,6 @@
 # end of Tcpreplay
 
 #
-# Telephony
-#
-# CONFIG_PACKAGE_asterisk is not set
-# CONFIG_PACKAGE_baresip is not set
-# CONFIG_PACKAGE_freeswitch is not set
-# CONFIG_PACKAGE_kamailio is not set
-# CONFIG_PACKAGE_miax is not set
-# CONFIG_PACKAGE_pcapsipdump is not set
-# CONFIG_PACKAGE_restund is not set
-# CONFIG_PACKAGE_rtpengine is not set
-# CONFIG_PACKAGE_rtpengine-no-transcode is not set
-# CONFIG_PACKAGE_rtpengine-recording is not set
-# CONFIG_PACKAGE_rtpproxy is not set
-# CONFIG_PACKAGE_sipp is not set
-# CONFIG_PACKAGE_siproxd is not set
-# CONFIG_PACKAGE_yate is not set
-# end of Telephony
-
-#
-# Telephony Lantiq
-#
-# end of Telephony Lantiq
-
-#
 # Time Synchronization
 #
 # CONFIG_PACKAGE_chrony is not set
@@ -6151,7 +5274,7 @@
 # CONFIG_PACKAGE_hs20-client is not set
 # CONFIG_PACKAGE_hs20-common is not set
 # CONFIG_PACKAGE_hs20-server is not set
-# CONFIG_PACKAGE_wpa-cli is not set
+CONFIG_PACKAGE_wpa-cli=y
 # CONFIG_PACKAGE_wpa-supplicant is not set
 # CONFIG_WPA_RFKILL_SUPPORT is not set
 CONFIG_WPA_MSG_MIN_PRIORITY=2
@@ -6160,6 +5283,7 @@
 CONFIG_DRIVER_11N_SUPPORT=y
 CONFIG_DRIVER_11AC_SUPPORT=y
 CONFIG_DRIVER_11AX_SUPPORT=y
+CONFIG_DRIVER_11BE_SUPPORT=y
 CONFIG_WPA_ENABLE_WEP=y
 CONFIG_WPA_MBO_SUPPORT=y
 # CONFIG_PACKAGE_wpa-supplicant-basic is not set
@@ -6311,6 +5435,7 @@
 # CONFIG_PACKAGE_mosquitto-ssl is not set
 # CONFIG_PACKAGE_mrd6 is not set
 # CONFIG_PACKAGE_mstpd is not set
+# CONFIG_PACKAGE_mtkhnat_util is not set
 # CONFIG_PACKAGE_mtr is not set
 # CONFIG_PACKAGE_nbd is not set
 # CONFIG_PACKAGE_nbd-server is not set
@@ -6408,6 +5533,7 @@
 # CONFIG_PACKAGE_softflowd is not set
 # CONFIG_PACKAGE_soloscli is not set
 # CONFIG_PACKAGE_speedtest-netperf is not set
+# CONFIG_PACKAGE_speedtestcli is not set
 # CONFIG_PACKAGE_spoofer is not set
 # CONFIG_PACKAGE_static-neighbor-reports is not set
 # CONFIG_PACKAGE_stunnel is not set
@@ -6548,6 +5674,7 @@
 # CONFIG_PACKAGE_blockdev is not set
 # CONFIG_PACKAGE_cfdisk is not set
 # CONFIG_PACKAGE_cgdisk is not set
+# CONFIG_PACKAGE_dmsetup is not set
 # CONFIG_PACKAGE_eject is not set
 # CONFIG_PACKAGE_fdisk is not set
 # CONFIG_PACKAGE_findfs is not set
@@ -6693,16 +5820,6 @@
 # end of Shells
 
 #
-# Telephony
-#
-# CONFIG_PACKAGE_dahdi-cfg is not set
-# CONFIG_PACKAGE_dahdi-monitor is not set
-# CONFIG_PACKAGE_gsm-utils is not set
-# CONFIG_PACKAGE_sipgrep is not set
-# CONFIG_PACKAGE_sngrep is not set
-# end of Telephony
-
-#
 # Terminal
 #
 # CONFIG_PACKAGE_agetty is not set
@@ -6848,6 +5965,7 @@
 # CONFIG_PACKAGE_dbus-utils is not set
 # CONFIG_PACKAGE_device-observatory is not set
 # CONFIG_PACKAGE_dfu-util is not set
+CONFIG_PACKAGE_dieharder=y
 # CONFIG_PACKAGE_digitemp is not set
 # CONFIG_PACKAGE_digitemp-usb is not set
 # CONFIG_PACKAGE_dmesg is not set
@@ -6907,6 +6025,7 @@
 # CONFIG_PACKAGE_inotifywait is not set
 # CONFIG_PACKAGE_inotifywatch is not set
 # CONFIG_PACKAGE_io is not set
+# CONFIG_PACKAGE_ioctlfuzzer is not set
 # CONFIG_PACKAGE_ipfs-http-client-tests is not set
 # CONFIG_PACKAGE_irqbalance is not set
 # CONFIG_PACKAGE_iwcap is not set
@@ -6914,6 +6033,7 @@
 # CONFIG_PACKAGE_jq is not set
 CONFIG_PACKAGE_jshn=y
 # CONFIG_PACKAGE_kmod is not set
+CONFIG_PACKAGE_kvcedit=y
 # CONFIG_PACKAGE_lcd4linux-custom is not set
 # CONFIG_PACKAGE_lcdproc-clients is not set
 # CONFIG_PACKAGE_lcdproc-drivers is not set
@@ -6940,6 +6060,7 @@
 # CONFIG_PACKAGE_mbtools is not set
 # CONFIG_PACKAGE_mc is not set
 # CONFIG_PACKAGE_mcookie is not set
+# CONFIG_PACKAGE_memtester is not set
 # CONFIG_PACKAGE_micrond is not set
 # CONFIG_PACKAGE_miniflux is not set
 # CONFIG_PACKAGE_mmc-utils is not set
@@ -7033,6 +6154,7 @@
 CONFIG_STRACE_NONE=y
 # CONFIG_STRACE_LIBDW is not set
 # CONFIG_STRACE_LIBUNWIND is not set
+# CONFIG_PACKAGE_streamtest is not set
 # CONFIG_PACKAGE_stress is not set
 # CONFIG_PACKAGE_stress-ng is not set
 # CONFIG_PACKAGE_sumo is not set
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/lede-branch-build-sanity.sh b/autobuild_mac80211_release/mt7988_mt7996_mac80211/lede-branch-build-sanity.sh
index e1ff249..94bb714 100755
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/lede-branch-build-sanity.sh
+++ b/autobuild_mac80211_release/mt7988_mt7996_mac80211/lede-branch-build-sanity.sh
@@ -4,30 +4,62 @@
 #get the brach_name
 temp=${0%/*}
 branch_name=${temp##*/}
+rro=0
+hwpath=0
+backport_new=1
+args=
+
+for arg in $*; do
+	case "$arg" in
+	"rro")
+		rro=1
+		;;
+	"hwpath")
+		hwpath=1
+		;;
+	*)
+		args="$args $arg"
+		;;
+	esac
+done
+set -- $args
+
+change_dot_config() {
+	[ "$rro" = "0" ] && {
+		rm -rf ${BUILD_DIR}/package/kernel/mt76/patches/*pao*.patch
+		rm -rf ${BUILD_DIR}/package/kernel/mt76/patches/*rro*.patch
+		rm -rf ${BUILD_DIR}/package/kernel/mt76/patches/*bellwether*.patch
+	}
+	[ "$hwpath" = "0" ] && {
+		echo "==========SW PATH========="
+		sed -i 's/CONFIG_BRIDGE_NETFILTER=y/# CONFIG_BRIDGE_NETFILTER is not set/g' ${BUILD_DIR}/target/linux/mediatek/mt7988/config-5.4
+		sed -i 's/CONFIG_NETFILTER_FAMILY_BRIDGE=y/# CONFIG_NETFILTER_FAMILY_BRIDGE is not set/g' ${BUILD_DIR}/target/linux/mediatek/mt7988/config-5.4
+		sed -i 's/CONFIG_SKB_EXTENSIONS=y/# CONFIG_SKB_EXTENSIONS is not set/g' ${BUILD_DIR}/target/linux/mediatek/mt7988/config-5.4
+	}
+	[ "$backport_new" = "1" ] && {
+                rm -rf ${BUILD_DIR}/package/kernel/mt76/patches/*revert-for-backports*.patch
+        }
+}
 
 #step1 clean
 #clean
 #do prepare stuff
 prepare
 
-#./scripts/feeds install mtk
-
 #hack mt7988 config5.4
 echo "CONFIG_NETFILTER=y" >> ${BUILD_DIR}/target/linux/mediatek/mt7988/config-5.4
 echo "CONFIG_NETFILTER_ADVANCED=y" >> ${BUILD_DIR}/target/linux/mediatek/mt7988/config-5.4
 echo "CONFIG_RELAY=y" >> ${BUILD_DIR}/target/linux/mediatek/mt7988/config-5.4
 
-#prepare mac80211 mt76 wifi stuff
-prepare_mac80211
+prepare_flowoffload
 
-rm -rf ${BUILD_DIR}/package/kernel/mac80211/patches/subsys/908-mac80211-mtk-mask-kernel-version-limitation-and-fill-for.patch
-rm -rf ${BUILD_DIR}/package/kernel/mac80211/patches/subsys/909-mac80211-mtk-add-fill-receive-path-ops-to-get-wed-idx.patch
-rm -rf ${BUILD_DIR}/target/linux/mediatek/patches-5.4/1007-mtketh-add-qdma-sw-solution-for-mac80211-sdk.patch
-find ${BUILD_DIR}/target/linux/mediatek/patches-5.4 -name "999*.patch" -delete
-find ${BUILD_DIR}/package/kernel/mt76/patches -name "*-mt76-*.patch" -delete
+#prepare mac80211 mt76 wifi stuff
+prepare_mac80211 ${backport_new}
 
 prepare_final ${branch_name}
 
+change_dot_config
+
 #step2 build
 if [ -z ${1} ]; then
 	build_log ${branch_name} -j1 || [ "$LOCAL" != "1" ]
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/Makefile b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/Makefile
deleted file mode 100644
index b880ee6..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/Makefile
+++ /dev/null
@@ -1,591 +0,0 @@
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=mt76
-PKG_RELEASE=4
-
-PKG_LICENSE:=GPLv2
-PKG_LICENSE_FILES:=
-
-PKG_SOURCE_URL:=https://github.com/openwrt/mt76
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_DATE:=2022-10-01
-PKG_SOURCE_VERSION:=72b87836d368685a093b927229209b61d8272541
-PKG_MIRROR_HASH:=ea4dfe93f7632d5063ac2ccf0f5a3698e2bfeadbbef45910381b5ef07e334cfc
-
-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 +@DRIVER_11N_SUPPORT
-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
-  DEFAULT:=PACKAGE_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/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/mt7915e
-  $(KernelPackage/mt76-default)
-  TITLE:=MediaTek MT7915e/MT7986/MT7916 wireless driver
-  DEPENDS+=@PCI_SUPPORT +kmod-mt7615-common +kmod-hwmon-core +kmod-thermal +@DRIVER_11AX_SUPPORT +@KERNEL_RELAY
-  FILES:= $(PKG_BUILD_DIR)/mt7915/mt7915e.ko
-  AUTOLOAD:=$(call AutoProbe,mt7915e)
-endef
-
-define KernelPackage/mt7986-firmware
-  $(KernelPackage/mt76-default)
-  DEPENDS:=+@TARGET_mediatek_mt7986
-  TITLE:=MediaTek MT7986 firmware
-endef
-
-define KernelPackage/besra
-  $(KernelPackage/mt76-default)
-  TITLE:=MediaTek MT7902/MT7990 wireless driver
-  DEPENDS+=@PCI_SUPPORT +kmod-mt76-core +kmod-mt76-connac +kmod-hwmon-core +kmod-thermal +@DRIVER_11AX_SUPPORT +@DRIVER_11BE_SUPPORT
-  FILES:= $(PKG_BUILD_DIR)/besra/besra.ko
-  AUTOLOAD:=$(call AutoProbe,besra)
-endef
-
-define KernelPackage/mt7996e
-  $(KernelPackage/mt76-default)
-  TITLE:=MediaTek MT7996/MT7995/MT7919 wireless driver
-  DEPENDS+=@PCI_SUPPORT +kmod-mt76-core +kmod-mt76-connac +kmod-hwmon-core +kmod-thermal +@DRIVER_11AX_SUPPORT +@DRIVER_11BE_SUPPORT
-  FILES:= $(PKG_BUILD_DIR)/mt7996/mt7996e.ko
-  AUTOLOAD:=$(call AutoProbe,mt7996e)
-endef
-
-define KernelPackage/mt7921-common
-  $(KernelPackage/mt76-default)
-  TITLE:=MediaTek MT7615 wireless driver common code
-  HIDDEN:=1
-  DEPENDS+=+kmod-mt76-connac +@DRIVER_11AX_SUPPORT
-  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
-  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 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_MAC80211_DEBUGFS
-  NOSTDINC_FLAGS += -DCONFIG_MAC80211_DEBUGFS
-  PKG_MAKE_FLAGS += CONFIG_MAC80211_DEBUGFS=y
-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_mt7986
-    PKG_MAKE_FLAGS += CONFIG_MT7986_WMAC=y
-    NOSTDINC_FLAGS += -DCONFIG_MT7986_WMAC
-  endif
-endif
-ifdef CONFIG_PACKAGE_kmod-besra
-  PKG_MAKE_FLAGS += CONFIG_BESRA=m
-endif
-ifdef CONFIG_PACKAGE_kmod-mt7996e
-  PKG_MAKE_FLAGS += CONFIG_MT7996E=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
-
-define Build/Compile
-	+$(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" \
-		$(KERNEL_MAKE_FLAGS) \
-		$(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 \
-		$(if $(CONFIG_TARGET_mediatek_mt7622), \
-			$(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/mt7915e/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 \
-		$(PKG_BUILD_DIR)/firmware/mt7916_wa.bin \
-		$(PKG_BUILD_DIR)/firmware/mt7916_wm.bin \
-		$(PKG_BUILD_DIR)/firmware/mt7916_rom_patch.bin \
-		$(PKG_BUILD_DIR)/firmware/mt7916_eeprom.bin \
-		$(PKG_BUILD_DIR)/firmware/mt7915_eeprom.bin \
-		$(PKG_BUILD_DIR)/firmware/mt7915_eeprom_dbdc.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 \
-		$(PKG_BUILD_DIR)/firmware/mt7986_eeprom_mt7975_dual.bin \
-		$(PKG_BUILD_DIR)/firmware/mt7986_eeprom_mt7976_dual.bin \
-		$(PKG_BUILD_DIR)/firmware/mt7986_eeprom_mt7975.bin \
-		$(PKG_BUILD_DIR)/firmware/mt7986_eeprom_mt7976.bin \
-		$(PKG_BUILD_DIR)/firmware/mt7986_eeprom_mt7976_dbdc.bin \
-		$(1)/lib/firmware/mediatek
-ifdef CONFIG_NET_MEDIATEK_SOC_WED
-	cp \
-		$(PKG_BUILD_DIR)/firmware/mt7986_wo_0.bin \
-		$(PKG_BUILD_DIR)/firmware/mt7986_wo_1.bin \
-		$(1)/lib/firmware/mediatek
-endif
-endef
-
-define KernelPackage/besra/install
-	$(INSTALL_DIR) $(1)/lib/firmware/mediatek
-	cp \
-		$(PKG_BUILD_DIR)/firmware/mt7902_wa.bin \
-		$(PKG_BUILD_DIR)/firmware/mt7902_wm.bin \
-		$(PKG_BUILD_DIR)/firmware/mt7902_rom_patch.bin \
-		$(PKG_BUILD_DIR)/firmware/mt7902_wf_rom.bin \
-		$(PKG_BUILD_DIR)/firmware/mt7902_wf_rom_sram.bin \
-		$(PKG_BUILD_DIR)/firmware/mt7902_eeprom.bin \
-		$(PKG_BUILD_DIR)/firmware/mt7902_wm_7977.bin \
-		$(PKG_BUILD_DIR)/firmware/mt7902_wf_rom_7977.bin \
-		$(PKG_BUILD_DIR)/firmware/mt7902_wf_rom_sram_7977.bin \
-		$(PKG_BUILD_DIR)/firmware/mt7902_eeprom_7977.bin \
-		$(PKG_BUILD_DIR)/firmware/mt7996_wa.bin \
-		$(PKG_BUILD_DIR)/firmware/mt7996_wm.bin \
-		$(PKG_BUILD_DIR)/firmware/mt7996_rom_patch.bin \
-		$(PKG_BUILD_DIR)/firmware/mt7996_eeprom.bin \
-		$(1)/lib/firmware/mediatek
-endef
-
-define KernelPackage/mt7996e/install
-	$(INSTALL_DIR) $(1)/lib/firmware/mediatek
-	cp \
-		$(PKG_BUILD_DIR)/firmware/mt7996_wa.bin \
-		$(PKG_BUILD_DIR)/firmware/mt7996_wm.bin \
-		$(PKG_BUILD_DIR)/firmware/mt7996_rom_patch.bin \
-		$(PKG_BUILD_DIR)/firmware/mt7996_eeprom.bin \
-		$(1)/lib/firmware/mediatek
-endef
-
-define KernelPackage/mt7921e/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 Package/mt76-test/install
-	mkdir -p $(1)/usr/sbin
-	$(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/mt76-test $(1)/usr/sbin
-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,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,mt7915e))
-$(eval $(call KernelPackage,mt7986-firmware))
-$(eval $(call KernelPackage,mt7921-common))
-$(eval $(call KernelPackage,mt7921u))
-$(eval $(call KernelPackage,mt7921s))
-$(eval $(call KernelPackage,mt7921e))
-$(eval $(call KernelPackage,besra))
-$(eval $(call KernelPackage,mt7996e))
-$(eval $(call KernelPackage,mt76))
-$(eval $(call BuildPackage,mt76-test))
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/Makefile b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/Makefile
deleted file mode 100644
index 9c287cf..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/Makefile
+++ /dev/null
@@ -1,39 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0-only
-EXTRA_CFLAGS += -Werror -DCONFIG_MT76_LEDS
-obj-m := mt76.o
-obj-$(CONFIG_MT76_USB) += mt76-usb.o
-obj-$(CONFIG_MT76_SDIO) += mt76-sdio.o
-obj-$(CONFIG_MT76x02_LIB) += mt76x02-lib.o
-obj-$(CONFIG_MT76x02_USB) += mt76x02-usb.o
-obj-$(CONFIG_MT76_CONNAC_LIB) += mt76-connac-lib.o
-
-mt76-y := \
-	mmio.o util.o trace.o dma.o mac80211.o debugfs.o eeprom.o \
-	tx.o agg-rx.o mcu.o
-
-mt76-$(CONFIG_PCI) += pci.o
-mt76-$(CONFIG_NL80211_TESTMODE) += testmode.o
-
-mt76-usb-y := usb.o usb_trace.o
-mt76-sdio-y := sdio.o sdio_txrx.o
-
-CFLAGS_trace.o := -I$(src)
-CFLAGS_usb_trace.o := -I$(src)
-CFLAGS_mt76x02_trace.o := -I$(src)
-
-mt76x02-lib-y := mt76x02_util.o mt76x02_mac.o mt76x02_mcu.o \
-		 mt76x02_eeprom.o mt76x02_phy.o mt76x02_mmio.o \
-		 mt76x02_txrx.o mt76x02_trace.o mt76x02_debugfs.o \
-		 mt76x02_dfs.o mt76x02_beacon.o
-
-mt76x02-usb-y := mt76x02_usb_mcu.o mt76x02_usb_core.o
-
-mt76-connac-lib-y := mt76_connac_mcu.o mt76_connac_mac.o
-
-obj-$(CONFIG_MT76x0_COMMON) += mt76x0/
-obj-$(CONFIG_MT76x2_COMMON) += mt76x2/
-obj-$(CONFIG_MT7603E) += mt7603/
-obj-$(CONFIG_MT7615_COMMON) += mt7615/
-obj-$(CONFIG_MT7915E) += mt7915/
-obj-$(CONFIG_MT7921_COMMON) += mt7921/
-obj-$(CONFIG_MT7996E) += mt7996/
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/agg-rx.c b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/agg-rx.c
deleted file mode 100644
index 10cbd9e..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/agg-rx.c
+++ /dev/null
@@ -1,301 +0,0 @@
-// SPDX-License-Identifier: ISC
-/*
- * Copyright (C) 2018 Felix Fietkau <nbd@nbd.name>
- */
-#include "mt76.h"
-
-static unsigned long mt76_aggr_tid_to_timeo(u8 tidno)
-{
-	/* Currently voice traffic (AC_VO) always runs without aggregation,
-	 * no special handling is needed. AC_BE/AC_BK use tids 0-3. Just check
-	 * for non AC_BK/AC_BE and set smaller timeout for it. */
-	return HZ / (tidno >= 4 ? 25 : 10);
-}
-
-static void
-mt76_aggr_release(struct mt76_rx_tid *tid, struct sk_buff_head *frames, int idx)
-{
-	struct sk_buff *skb;
-
-	tid->head = ieee80211_sn_inc(tid->head);
-
-	skb = tid->reorder_buf[idx];
-	if (!skb)
-		return;
-
-	tid->reorder_buf[idx] = NULL;
-	tid->nframes--;
-	__skb_queue_tail(frames, skb);
-}
-
-static void
-mt76_rx_aggr_release_frames(struct mt76_rx_tid *tid,
-			    struct sk_buff_head *frames,
-			    u16 head)
-{
-	int idx;
-
-	while (ieee80211_sn_less(tid->head, head)) {
-		idx = tid->head % tid->size;
-		mt76_aggr_release(tid, frames, idx);
-	}
-}
-
-static void
-mt76_rx_aggr_release_head(struct mt76_rx_tid *tid, struct sk_buff_head *frames)
-{
-	int idx = tid->head % tid->size;
-
-	while (tid->reorder_buf[idx]) {
-		mt76_aggr_release(tid, frames, idx);
-		idx = tid->head % tid->size;
-	}
-}
-
-static void
-mt76_rx_aggr_check_release(struct mt76_rx_tid *tid, struct sk_buff_head *frames)
-{
-	struct mt76_rx_status *status;
-	struct sk_buff *skb;
-	int start, idx, nframes;
-
-	if (!tid->nframes)
-		return;
-
-	mt76_rx_aggr_release_head(tid, frames);
-
-	start = tid->head % tid->size;
-	nframes = tid->nframes;
-
-	for (idx = (tid->head + 1) % tid->size;
-	     idx != start && nframes;
-	     idx = (idx + 1) % tid->size) {
-		skb = tid->reorder_buf[idx];
-		if (!skb)
-			continue;
-
-		nframes--;
-		status = (struct mt76_rx_status *)skb->cb;
-		if (!time_after32(jiffies,
-				  status->reorder_time +
-				  mt76_aggr_tid_to_timeo(tid->num)))
-			continue;
-
-		mt76_rx_aggr_release_frames(tid, frames, status->seqno);
-	}
-
-	mt76_rx_aggr_release_head(tid, frames);
-}
-
-static void
-mt76_rx_aggr_reorder_work(struct work_struct *work)
-{
-	struct mt76_rx_tid *tid = container_of(work, struct mt76_rx_tid,
-					       reorder_work.work);
-	struct mt76_dev *dev = tid->dev;
-	struct sk_buff_head frames;
-	int nframes;
-
-	__skb_queue_head_init(&frames);
-
-	local_bh_disable();
-	rcu_read_lock();
-
-	spin_lock(&tid->lock);
-	mt76_rx_aggr_check_release(tid, &frames);
-	nframes = tid->nframes;
-	spin_unlock(&tid->lock);
-
-	if (nframes)
-		ieee80211_queue_delayed_work(tid->dev->hw, &tid->reorder_work,
-					     mt76_aggr_tid_to_timeo(tid->num));
-	mt76_rx_complete(dev, &frames, NULL);
-
-	rcu_read_unlock();
-	local_bh_enable();
-}
-
-static void
-mt76_rx_aggr_check_ctl(struct sk_buff *skb, struct sk_buff_head *frames)
-{
-	struct mt76_rx_status *status = (struct mt76_rx_status *)skb->cb;
-	struct ieee80211_bar *bar = mt76_skb_get_hdr(skb);
-	struct mt76_wcid *wcid = status->wcid;
-	struct mt76_rx_tid *tid;
-	u8 tidno = status->qos_ctl & IEEE80211_QOS_CTL_TID_MASK;
-	u16 seqno;
-
-	if (!ieee80211_is_ctl(bar->frame_control))
-		return;
-
-	if (!ieee80211_is_back_req(bar->frame_control))
-		return;
-
-	status->qos_ctl = tidno = le16_to_cpu(bar->control) >> 12;
-	seqno = IEEE80211_SEQ_TO_SN(le16_to_cpu(bar->start_seq_num));
-	tid = rcu_dereference(wcid->aggr[tidno]);
-	if (!tid)
-		return;
-
-	spin_lock_bh(&tid->lock);
-	if (!tid->stopped) {
-		mt76_rx_aggr_release_frames(tid, frames, seqno);
-		mt76_rx_aggr_release_head(tid, frames);
-	}
-	spin_unlock_bh(&tid->lock);
-}
-
-void mt76_rx_aggr_reorder(struct sk_buff *skb, struct sk_buff_head *frames)
-{
-	struct mt76_rx_status *status = (struct mt76_rx_status *)skb->cb;
-	struct mt76_wcid *wcid = status->wcid;
-	struct ieee80211_sta *sta;
-	struct mt76_rx_tid *tid;
-	bool sn_less;
-	u16 seqno, head, size, idx;
-	u8 tidno = status->qos_ctl & IEEE80211_QOS_CTL_TID_MASK;
-	u8 ackp;
-
-	__skb_queue_tail(frames, skb);
-
-	sta = wcid_to_sta(wcid);
-	if (!sta)
-		return;
-
-	if (!status->aggr) {
-		if (!(status->flag & RX_FLAG_8023))
-			mt76_rx_aggr_check_ctl(skb, frames);
-		return;
-	}
-
-	/* not part of a BA session */
-	ackp = status->qos_ctl & IEEE80211_QOS_CTL_ACK_POLICY_MASK;
-	if (ackp == IEEE80211_QOS_CTL_ACK_POLICY_NOACK)
-		return;
-
-	tid = rcu_dereference(wcid->aggr[tidno]);
-	if (!tid)
-		return;
-
-	status->flag |= RX_FLAG_DUP_VALIDATED;
-	spin_lock_bh(&tid->lock);
-
-	if (tid->stopped)
-		goto out;
-
-	head = tid->head;
-	seqno = status->seqno;
-	size = tid->size;
-	sn_less = ieee80211_sn_less(seqno, head);
-
-	if (!tid->started) {
-		if (sn_less)
-			goto out;
-
-		tid->started = true;
-	}
-
-	if (sn_less) {
-		__skb_unlink(skb, frames);
-		dev_kfree_skb(skb);
-		goto out;
-	}
-
-	if (seqno == head) {
-		tid->head = ieee80211_sn_inc(head);
-		if (tid->nframes)
-			mt76_rx_aggr_release_head(tid, frames);
-		goto out;
-	}
-
-	__skb_unlink(skb, frames);
-
-	/*
-	 * Frame sequence number exceeds buffering window, free up some space
-	 * by releasing previous frames
-	 */
-	if (!ieee80211_sn_less(seqno, head + size)) {
-		head = ieee80211_sn_inc(ieee80211_sn_sub(seqno, size));
-		mt76_rx_aggr_release_frames(tid, frames, head);
-	}
-
-	idx = seqno % size;
-
-	/* Discard if the current slot is already in use */
-	if (tid->reorder_buf[idx]) {
-		dev_kfree_skb(skb);
-		goto out;
-	}
-
-	status->reorder_time = jiffies;
-	tid->reorder_buf[idx] = skb;
-	tid->nframes++;
-	mt76_rx_aggr_release_head(tid, frames);
-
-	ieee80211_queue_delayed_work(tid->dev->hw, &tid->reorder_work,
-				     mt76_aggr_tid_to_timeo(tid->num));
-
-out:
-	spin_unlock_bh(&tid->lock);
-}
-
-int mt76_rx_aggr_start(struct mt76_dev *dev, struct mt76_wcid *wcid, u8 tidno,
-		       u16 ssn, u16 size)
-{
-	struct mt76_rx_tid *tid;
-
-	mt76_rx_aggr_stop(dev, wcid, tidno);
-
-	tid = kzalloc(struct_size(tid, reorder_buf, size), GFP_KERNEL);
-	if (!tid)
-		return -ENOMEM;
-
-	tid->dev = dev;
-	tid->head = ssn;
-	tid->size = size;
-	tid->num = tidno;
-	INIT_DELAYED_WORK(&tid->reorder_work, mt76_rx_aggr_reorder_work);
-	spin_lock_init(&tid->lock);
-
-	rcu_assign_pointer(wcid->aggr[tidno], tid);
-
-	return 0;
-}
-EXPORT_SYMBOL_GPL(mt76_rx_aggr_start);
-
-static void mt76_rx_aggr_shutdown(struct mt76_dev *dev, struct mt76_rx_tid *tid)
-{
-	u16 size = tid->size;
-	int i;
-
-	spin_lock_bh(&tid->lock);
-
-	tid->stopped = true;
-	for (i = 0; tid->nframes && i < size; i++) {
-		struct sk_buff *skb = tid->reorder_buf[i];
-
-		if (!skb)
-			continue;
-
-		tid->reorder_buf[i] = NULL;
-		tid->nframes--;
-		dev_kfree_skb(skb);
-	}
-
-	spin_unlock_bh(&tid->lock);
-
-	cancel_delayed_work_sync(&tid->reorder_work);
-}
-
-void mt76_rx_aggr_stop(struct mt76_dev *dev, struct mt76_wcid *wcid, u8 tidno)
-{
-	struct mt76_rx_tid *tid = NULL;
-
-	tid = rcu_replace_pointer(wcid->aggr[tidno], tid,
-				  lockdep_is_held(&dev->mutex));
-	if (tid) {
-		mt76_rx_aggr_shutdown(dev, tid);
-		kfree_rcu(tid, rcu_head);
-	}
-}
-EXPORT_SYMBOL_GPL(mt76_rx_aggr_stop);
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/debugfs.c b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/debugfs.c
deleted file mode 100644
index b7aa872..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/debugfs.c
+++ /dev/null
@@ -1,101 +0,0 @@
-// SPDX-License-Identifier: ISC
-/*
- * Copyright (C) 2016 Felix Fietkau <nbd@nbd.name>
- */
-#include "mt76.h"
-
-static int
-mt76_reg_set(void *data, u64 val)
-{
-	struct mt76_dev *dev = data;
-
-	__mt76_wr(dev, dev->debugfs_reg, val);
-	return 0;
-}
-
-static int
-mt76_reg_get(void *data, u64 *val)
-{
-	struct mt76_dev *dev = data;
-
-	*val = __mt76_rr(dev, dev->debugfs_reg);
-	return 0;
-}
-
-DEFINE_DEBUGFS_ATTRIBUTE(fops_regval, mt76_reg_get, mt76_reg_set,
-			 "0x%08llx\n");
-
-int mt76_queues_read(struct seq_file *s, void *data)
-{
-	struct mt76_dev *dev = dev_get_drvdata(s->private);
-	int i;
-
-	seq_puts(s, "     queue | hw-queued |      head |      tail |\n");
-	for (i = 0; i < ARRAY_SIZE(dev->phy.q_tx); i++) {
-		struct mt76_queue *q = dev->phy.q_tx[i];
-
-		if (!q)
-			continue;
-
-		seq_printf(s, " %9d | %9d | %9d | %9d |\n",
-			   i, q->queued, q->head, q->tail);
-	}
-
-	return 0;
-}
-EXPORT_SYMBOL_GPL(mt76_queues_read);
-
-static int mt76_rx_queues_read(struct seq_file *s, void *data)
-{
-	struct mt76_dev *dev = dev_get_drvdata(s->private);
-	int i, queued;
-
-	seq_puts(s, "     queue | hw-queued |      head |      tail |\n");
-	mt76_for_each_q_rx(dev, i) {
-		struct mt76_queue *q = &dev->q_rx[i];
-
-		queued = mt76_is_usb(dev) ? q->ndesc - q->queued : q->queued;
-		seq_printf(s, " %9d | %9d | %9d | %9d |\n",
-			   i, queued, q->head, q->tail);
-	}
-
-	return 0;
-}
-
-void mt76_seq_puts_array(struct seq_file *file, const char *str,
-			 s8 *val, int len)
-{
-	int i;
-
-	seq_printf(file, "%10s:", str);
-	for (i = 0; i < len; i++)
-		seq_printf(file, " %2d", val[i]);
-	seq_puts(file, "\n");
-}
-EXPORT_SYMBOL_GPL(mt76_seq_puts_array);
-
-struct dentry *
-mt76_register_debugfs_fops(struct mt76_phy *phy,
-			   const struct file_operations *ops)
-{
-	const struct file_operations *fops = ops ? ops : &fops_regval;
-	struct mt76_dev *dev = phy->dev;
-	struct dentry *dir;
-
-	dir = debugfs_create_dir("mt76", phy->hw->wiphy->debugfsdir);
-	if (!dir)
-		return NULL;
-
-	debugfs_create_u8("led_pin", 0600, dir, &dev->led_pin);
-	debugfs_create_bool("led_active_low", 0600, dir, &dev->led_al);
-	debugfs_create_u32("regidx", 0600, dir, &dev->debugfs_reg);
-	debugfs_create_file_unsafe("regval", 0600, dir, dev, fops);
-	debugfs_create_blob("eeprom", 0400, dir, &dev->eeprom);
-	if (dev->otp.data)
-		debugfs_create_blob("otp", 0400, dir, &dev->otp);
-	debugfs_create_devm_seqfile(dev->dev, "rx-queues", dir,
-				    mt76_rx_queues_read);
-
-	return dir;
-}
-EXPORT_SYMBOL_GPL(mt76_register_debugfs_fops);
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/dma.c b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/dma.c
deleted file mode 100644
index 116f9cc..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/dma.c
+++ /dev/null
@@ -1,721 +0,0 @@
-// SPDX-License-Identifier: ISC
-/*
- * Copyright (C) 2016 Felix Fietkau <nbd@nbd.name>
- */
-
-#include <linux/dma-mapping.h>
-#include "mt76.h"
-#include "dma.h"
-
-#define Q_READ(_dev, _q, _field)		readl(&(_q)->regs->_field)
-#define Q_WRITE(_dev, _q, _field, _val)		writel(_val, &(_q)->regs->_field)
-
-
-static struct mt76_txwi_cache *
-mt76_alloc_txwi(struct mt76_dev *dev)
-{
-	struct mt76_txwi_cache *t;
-	dma_addr_t addr;
-	u8 *txwi;
-	int size;
-
-	size = L1_CACHE_ALIGN(dev->drv->txwi_size + sizeof(*t));
-	txwi = kzalloc(size, GFP_ATOMIC);
-	if (!txwi)
-		return NULL;
-
-	addr = dma_map_single(dev->dma_dev, txwi, dev->drv->txwi_size,
-			      DMA_TO_DEVICE);
-	t = (struct mt76_txwi_cache *)(txwi + dev->drv->txwi_size);
-	t->dma_addr = addr;
-
-	return t;
-}
-
-static struct mt76_txwi_cache *
-__mt76_get_txwi(struct mt76_dev *dev)
-{
-	struct mt76_txwi_cache *t = NULL;
-
-	spin_lock(&dev->lock);
-	if (!list_empty(&dev->txwi_cache)) {
-		t = list_first_entry(&dev->txwi_cache, struct mt76_txwi_cache,
-				     list);
-		list_del(&t->list);
-	}
-	spin_unlock(&dev->lock);
-
-	return t;
-}
-
-static struct mt76_txwi_cache *
-mt76_get_txwi(struct mt76_dev *dev)
-{
-	struct mt76_txwi_cache *t = __mt76_get_txwi(dev);
-
-	if (t)
-		return t;
-
-	return mt76_alloc_txwi(dev);
-}
-
-void
-mt76_put_txwi(struct mt76_dev *dev, struct mt76_txwi_cache *t)
-{
-	if (!t)
-		return;
-
-	spin_lock(&dev->lock);
-	list_add(&t->list, &dev->txwi_cache);
-	spin_unlock(&dev->lock);
-}
-EXPORT_SYMBOL_GPL(mt76_put_txwi);
-
-static void
-mt76_free_pending_txwi(struct mt76_dev *dev)
-{
-	struct mt76_txwi_cache *t;
-
-	local_bh_disable();
-	while ((t = __mt76_get_txwi(dev)) != NULL) {
-		dma_unmap_single(dev->dma_dev, t->dma_addr, dev->drv->txwi_size,
-				 DMA_TO_DEVICE);
-		kfree(mt76_get_txwi_ptr(dev, t));
-	}
-	local_bh_enable();
-}
-
-static void
-mt76_dma_sync_idx(struct mt76_dev *dev, struct mt76_queue *q)
-{
-	Q_WRITE(dev, q, desc_base, q->desc_dma);
-	Q_WRITE(dev, q, ring_size, q->ndesc);
-	q->head = Q_READ(dev, q, dma_idx);
-	q->tail = q->head;
-}
-
-static void
-mt76_dma_queue_reset(struct mt76_dev *dev, struct mt76_queue *q)
-{
-	int i;
-
-	if (!q || !q->ndesc)
-		return;
-
-	/* clear descriptors */
-	for (i = 0; i < q->ndesc; i++)
-		q->desc[i].ctrl = cpu_to_le32(MT_DMA_CTL_DMA_DONE);
-
-	Q_WRITE(dev, q, cpu_idx, 0);
-	Q_WRITE(dev, q, dma_idx, 0);
-	mt76_dma_sync_idx(dev, q);
-}
-
-static int
-mt76_dma_alloc_queue(struct mt76_dev *dev, struct mt76_queue *q,
-		     int idx, int n_desc, int bufsize,
-		     u32 ring_base)
-{
-	int size;
-
-	spin_lock_init(&q->lock);
-	spin_lock_init(&q->cleanup_lock);
-
-	q->regs = dev->mmio.regs + ring_base + idx * MT_RING_SIZE;
-	q->ndesc = n_desc;
-	q->buf_size = bufsize;
-	q->hw_idx = idx;
-
-	size = q->ndesc * sizeof(struct mt76_desc);
-	q->desc = dmam_alloc_coherent(dev->dma_dev, size, &q->desc_dma, GFP_KERNEL);
-	if (!q->desc)
-		return -ENOMEM;
-
-	size = q->ndesc * sizeof(*q->entry);
-	q->entry = devm_kzalloc(dev->dev, size, GFP_KERNEL);
-	if (!q->entry)
-		return -ENOMEM;
-
-	mt76_dma_queue_reset(dev, q);
-
-	return 0;
-}
-
-static int
-mt76_dma_add_buf(struct mt76_dev *dev, struct mt76_queue *q,
-		 struct mt76_queue_buf *buf, int nbufs, u32 info,
-		 struct sk_buff *skb, void *txwi)
-{
-	struct mt76_queue_entry *entry;
-	struct mt76_desc *desc;
-	u32 ctrl;
-	int i, idx = -1;
-
-	if (txwi) {
-		q->entry[q->head].txwi = DMA_DUMMY_DATA;
-		q->entry[q->head].skip_buf0 = true;
-	}
-
-	for (i = 0; i < nbufs; i += 2, buf += 2) {
-		u32 buf0 = buf[0].addr, buf1 = 0;
-
-		idx = q->head;
-		q->head = (q->head + 1) % q->ndesc;
-
-		desc = &q->desc[idx];
-		entry = &q->entry[idx];
-
-		if (buf[0].skip_unmap)
-			entry->skip_buf0 = true;
-		entry->skip_buf1 = i == nbufs - 1;
-
-		entry->dma_addr[0] = buf[0].addr;
-		entry->dma_len[0] = buf[0].len;
-
-		ctrl = FIELD_PREP(MT_DMA_CTL_SD_LEN0, buf[0].len);
-		if (i < nbufs - 1) {
-			entry->dma_addr[1] = buf[1].addr;
-			entry->dma_len[1] = buf[1].len;
-			buf1 = buf[1].addr;
-			ctrl |= FIELD_PREP(MT_DMA_CTL_SD_LEN1, buf[1].len);
-			if (buf[1].skip_unmap)
-				entry->skip_buf1 = true;
-		}
-
-		if (i == nbufs - 1)
-			ctrl |= MT_DMA_CTL_LAST_SEC0;
-		else if (i == nbufs - 2)
-			ctrl |= MT_DMA_CTL_LAST_SEC1;
-
-		WRITE_ONCE(desc->buf0, cpu_to_le32(buf0));
-		WRITE_ONCE(desc->buf1, cpu_to_le32(buf1));
-		WRITE_ONCE(desc->info, cpu_to_le32(info));
-		WRITE_ONCE(desc->ctrl, cpu_to_le32(ctrl));
-
-		q->queued++;
-	}
-
-	q->entry[idx].txwi = txwi;
-	q->entry[idx].skb = skb;
-	q->entry[idx].wcid = 0xffff;
-
-	return idx;
-}
-
-static void
-mt76_dma_tx_cleanup_idx(struct mt76_dev *dev, struct mt76_queue *q, int idx,
-			struct mt76_queue_entry *prev_e)
-{
-	struct mt76_queue_entry *e = &q->entry[idx];
-
-	if (!e->skip_buf0)
-		dma_unmap_single(dev->dma_dev, e->dma_addr[0], e->dma_len[0],
-				 DMA_TO_DEVICE);
-
-	if (!e->skip_buf1)
-		dma_unmap_single(dev->dma_dev, e->dma_addr[1], e->dma_len[1],
-				 DMA_TO_DEVICE);
-
-	if (e->txwi == DMA_DUMMY_DATA)
-		e->txwi = NULL;
-
-	if (e->skb == DMA_DUMMY_DATA)
-		e->skb = NULL;
-
-	*prev_e = *e;
-	memset(e, 0, sizeof(*e));
-}
-
-static void
-mt76_dma_kick_queue(struct mt76_dev *dev, struct mt76_queue *q)
-{
-	wmb();
-	Q_WRITE(dev, q, cpu_idx, q->head);
-}
-
-static void
-mt76_dma_tx_cleanup(struct mt76_dev *dev, struct mt76_queue *q, bool flush)
-{
-	struct mt76_queue_entry entry;
-	int last;
-
-	if (!q || !q->ndesc)
-		return;
-
-	spin_lock_bh(&q->cleanup_lock);
-	if (flush)
-		last = -1;
-	else
-		last = Q_READ(dev, q, dma_idx);
-
-	while (q->queued > 0 && q->tail != last) {
-		mt76_dma_tx_cleanup_idx(dev, q, q->tail, &entry);
-		mt76_queue_tx_complete(dev, q, &entry);
-
-		if (entry.txwi) {
-			if (!(dev->drv->drv_flags & MT_DRV_TXWI_NO_FREE))
-				mt76_put_txwi(dev, entry.txwi);
-		}
-
-		if (!flush && q->tail == last)
-			last = Q_READ(dev, q, dma_idx);
-	}
-	spin_unlock_bh(&q->cleanup_lock);
-
-	if (flush) {
-		spin_lock_bh(&q->lock);
-		mt76_dma_sync_idx(dev, q);
-		mt76_dma_kick_queue(dev, q);
-		spin_unlock_bh(&q->lock);
-	}
-
-	if (!q->queued)
-		wake_up(&dev->tx_wait);
-}
-
-static void *
-mt76_dma_get_buf(struct mt76_dev *dev, struct mt76_queue *q, int idx,
-		 int *len, u32 *info, bool *more)
-{
-	struct mt76_queue_entry *e = &q->entry[idx];
-	struct mt76_desc *desc = &q->desc[idx];
-	dma_addr_t buf_addr;
-	void *buf = e->buf;
-	int buf_len = SKB_WITH_OVERHEAD(q->buf_size);
-
-	buf_addr = e->dma_addr[0];
-	if (len) {
-		u32 ctl = le32_to_cpu(READ_ONCE(desc->ctrl));
-		*len = FIELD_GET(MT_DMA_CTL_SD_LEN0, ctl);
-		*more = !(ctl & MT_DMA_CTL_LAST_SEC0);
-	}
-
-	if (info)
-		*info = le32_to_cpu(desc->info);
-
-	dma_unmap_single(dev->dma_dev, buf_addr, buf_len, DMA_FROM_DEVICE);
-	e->buf = NULL;
-
-	return buf;
-}
-
-static void *
-mt76_dma_dequeue(struct mt76_dev *dev, struct mt76_queue *q, bool flush,
-		 int *len, u32 *info, bool *more)
-{
-	int idx = q->tail;
-
-	*more = false;
-	if (!q->queued)
-		return NULL;
-
-	if (flush)
-		q->desc[idx].ctrl |= cpu_to_le32(MT_DMA_CTL_DMA_DONE);
-	else if (!(q->desc[idx].ctrl & cpu_to_le32(MT_DMA_CTL_DMA_DONE)))
-		return NULL;
-
-	q->tail = (q->tail + 1) % q->ndesc;
-	q->queued--;
-
-	return mt76_dma_get_buf(dev, q, idx, len, info, more);
-}
-
-static int
-mt76_dma_tx_queue_skb_raw(struct mt76_dev *dev, struct mt76_queue *q,
-			  struct sk_buff *skb, u32 tx_info)
-{
-	struct mt76_queue_buf buf = {};
-	dma_addr_t addr;
-
-	if (q->queued + 1 >= q->ndesc - 1)
-		goto error;
-
-	addr = dma_map_single(dev->dma_dev, skb->data, skb->len,
-			      DMA_TO_DEVICE);
-	if (unlikely(dma_mapping_error(dev->dma_dev, addr)))
-		goto error;
-
-	buf.addr = addr;
-	buf.len = skb->len;
-
-	spin_lock_bh(&q->lock);
-	mt76_dma_add_buf(dev, q, &buf, 1, tx_info, skb, NULL);
-	mt76_dma_kick_queue(dev, q);
-	spin_unlock_bh(&q->lock);
-
-	return 0;
-
-error:
-	dev_kfree_skb(skb);
-	return -ENOMEM;
-}
-
-static int
-mt76_dma_tx_queue_skb(struct mt76_dev *dev, struct mt76_queue *q,
-		      enum mt76_txq_id qid, struct sk_buff *skb,
-		      struct mt76_wcid *wcid, struct ieee80211_sta *sta)
-{
-	struct ieee80211_tx_status status = {
-		.sta = sta,
-	};
-	struct mt76_tx_info tx_info = {
-		.skb = skb,
-	};
-	struct ieee80211_hw *hw;
-	int len, n = 0, ret = -ENOMEM;
-	struct mt76_txwi_cache *t;
-	struct sk_buff *iter;
-	dma_addr_t addr;
-	u8 *txwi;
-
-	t = mt76_get_txwi(dev);
-	if (!t)
-		goto free_skb;
-
-	txwi = mt76_get_txwi_ptr(dev, t);
-
-	skb->prev = skb->next = NULL;
-	if (dev->drv->drv_flags & MT_DRV_TX_ALIGNED4_SKBS)
-		mt76_insert_hdr_pad(skb);
-
-	len = skb_headlen(skb);
-	addr = dma_map_single(dev->dma_dev, skb->data, len, DMA_TO_DEVICE);
-	if (unlikely(dma_mapping_error(dev->dma_dev, addr)))
-		goto free;
-
-	tx_info.buf[n].addr = t->dma_addr;
-	tx_info.buf[n++].len = dev->drv->txwi_size;
-	tx_info.buf[n].addr = addr;
-	tx_info.buf[n++].len = len;
-
-	skb_walk_frags(skb, iter) {
-		if (n == ARRAY_SIZE(tx_info.buf))
-			goto unmap;
-
-		addr = dma_map_single(dev->dma_dev, iter->data, iter->len,
-				      DMA_TO_DEVICE);
-		if (unlikely(dma_mapping_error(dev->dma_dev, addr)))
-			goto unmap;
-
-		tx_info.buf[n].addr = addr;
-		tx_info.buf[n++].len = iter->len;
-	}
-	tx_info.nbuf = n;
-
-	if (q->queued + (tx_info.nbuf + 1) / 2 >= q->ndesc - 1) {
-		ret = -ENOMEM;
-		goto unmap;
-	}
-
-	dma_sync_single_for_cpu(dev->dma_dev, t->dma_addr, dev->drv->txwi_size,
-				DMA_TO_DEVICE);
-	ret = dev->drv->tx_prepare_skb(dev, txwi, qid, wcid, sta, &tx_info);
-	dma_sync_single_for_device(dev->dma_dev, t->dma_addr, dev->drv->txwi_size,
-				   DMA_TO_DEVICE);
-	if (ret < 0)
-		goto unmap;
-
-	return mt76_dma_add_buf(dev, q, tx_info.buf, tx_info.nbuf,
-				tx_info.info, tx_info.skb, t);
-
-unmap:
-	for (n--; n > 0; n--)
-		dma_unmap_single(dev->dma_dev, tx_info.buf[n].addr,
-				 tx_info.buf[n].len, DMA_TO_DEVICE);
-
-free:
-#ifdef CONFIG_NL80211_TESTMODE
-	/* fix tx_done accounting on queue overflow */
-	if (mt76_is_testmode_skb(dev, skb, &hw)) {
-		struct mt76_phy *phy = hw->priv;
-
-		if (tx_info.skb == phy->test.tx_skb)
-			phy->test.tx_done--;
-	}
-#endif
-
-	mt76_put_txwi(dev, t);
-
-free_skb:
-	status.skb = tx_info.skb;
-	hw = mt76_tx_status_get_hw(dev, tx_info.skb);
-	ieee80211_tx_status_ext(hw, &status);
-
-	return ret;
-}
-
-static int
-mt76_dma_rx_fill(struct mt76_dev *dev, struct mt76_queue *q)
-{
-	dma_addr_t addr;
-	void *buf;
-	int frames = 0;
-	int len = SKB_WITH_OVERHEAD(q->buf_size);
-	int offset = q->buf_offset;
-
-	if (!q->ndesc)
-		return 0;
-
-	spin_lock_bh(&q->lock);
-
-	while (q->queued < q->ndesc - 1) {
-		struct mt76_queue_buf qbuf;
-
-		buf = page_frag_alloc(&q->rx_page, q->buf_size, GFP_ATOMIC);
-		if (!buf)
-			break;
-
-		addr = dma_map_single(dev->dma_dev, buf, len, DMA_FROM_DEVICE);
-		if (unlikely(dma_mapping_error(dev->dma_dev, addr))) {
-			skb_free_frag(buf);
-			break;
-		}
-
-		qbuf.addr = addr + offset;
-		qbuf.len = len - offset;
-		qbuf.skip_unmap = false;
-		mt76_dma_add_buf(dev, q, &qbuf, 1, 0, buf, NULL);
-		frames++;
-	}
-
-	if (frames)
-		mt76_dma_kick_queue(dev, q);
-
-	spin_unlock_bh(&q->lock);
-
-	return frames;
-}
-
-static void
-mt76_dma_rx_cleanup(struct mt76_dev *dev, struct mt76_queue *q)
-{
-	struct page *page;
-	void *buf;
-	bool more;
-
-	if (!q->ndesc)
-		return;
-
-	spin_lock_bh(&q->lock);
-	do {
-		buf = mt76_dma_dequeue(dev, q, true, NULL, NULL, &more);
-		if (!buf)
-			break;
-
-		skb_free_frag(buf);
-	} while (1);
-	spin_unlock_bh(&q->lock);
-
-	if (!q->rx_page.va)
-		return;
-
-	page = virt_to_page(q->rx_page.va);
-	__page_frag_cache_drain(page, q->rx_page.pagecnt_bias);
-	memset(&q->rx_page, 0, sizeof(q->rx_page));
-}
-
-static void
-mt76_dma_rx_reset(struct mt76_dev *dev, enum mt76_rxq_id qid)
-{
-	struct mt76_queue *q = &dev->q_rx[qid];
-	int i;
-
-	if (!q->ndesc)
-		return;
-
-	for (i = 0; i < q->ndesc; i++)
-		q->desc[i].ctrl = cpu_to_le32(MT_DMA_CTL_DMA_DONE);
-
-	mt76_dma_rx_cleanup(dev, q);
-	mt76_dma_sync_idx(dev, q);
-	mt76_dma_rx_fill(dev, q);
-
-	if (!q->rx_head)
-		return;
-
-	dev_kfree_skb(q->rx_head);
-	q->rx_head = NULL;
-}
-
-static void
-mt76_add_fragment(struct mt76_dev *dev, struct mt76_queue *q, void *data,
-		  int len, bool more)
-{
-	struct sk_buff *skb = q->rx_head;
-	struct skb_shared_info *shinfo = skb_shinfo(skb);
-	int nr_frags = shinfo->nr_frags;
-
-	if (nr_frags < ARRAY_SIZE(shinfo->frags)) {
-		struct page *page = virt_to_head_page(data);
-		int offset = data - page_address(page) + q->buf_offset;
-
-		skb_add_rx_frag(skb, nr_frags, page, offset, len, q->buf_size);
-	} else {
-		skb_free_frag(data);
-	}
-
-	if (more)
-		return;
-
-	q->rx_head = NULL;
-	if (nr_frags < ARRAY_SIZE(shinfo->frags))
-		dev->drv->rx_skb(dev, q - dev->q_rx, skb);
-	else
-		dev_kfree_skb(skb);
-}
-
-static int
-mt76_dma_rx_process(struct mt76_dev *dev, struct mt76_queue *q, int budget)
-{
-	int len, data_len, done = 0;
-	struct sk_buff *skb;
-	unsigned char *data;
-	bool more;
-
-	while (done < budget) {
-		u32 info;
-
-		data = mt76_dma_dequeue(dev, q, false, &len, &info, &more);
-		if (!data)
-			break;
-
-		if (q->rx_head)
-			data_len = q->buf_size;
-		else
-			data_len = SKB_WITH_OVERHEAD(q->buf_size);
-
-		if (data_len < len + q->buf_offset) {
-			dev_kfree_skb(q->rx_head);
-			q->rx_head = NULL;
-			goto free_frag;
-		}
-
-		if (q->rx_head) {
-			mt76_add_fragment(dev, q, data, len, more);
-			continue;
-		}
-
-		if (!more && dev->drv->rx_check &&
-		    !(dev->drv->rx_check(dev, data, len)))
-			goto free_frag;
-
-		skb = build_skb(data, q->buf_size);
-		if (!skb)
-			goto free_frag;
-
-		skb_reserve(skb, q->buf_offset);
-
-		*(u32 *)skb->cb = info;
-
-		__skb_put(skb, len);
-		done++;
-
-		if (more) {
-			q->rx_head = skb;
-			continue;
-		}
-
-		dev->drv->rx_skb(dev, q - dev->q_rx, skb);
-		continue;
-
-free_frag:
-		skb_free_frag(data);
-	}
-
-	mt76_dma_rx_fill(dev, q);
-	return done;
-}
-
-int mt76_dma_rx_poll(struct napi_struct *napi, int budget)
-{
-	struct mt76_dev *dev;
-	int qid, done = 0, cur;
-
-	dev = container_of(napi->dev, struct mt76_dev, napi_dev);
-	qid = napi - dev->napi;
-
-	rcu_read_lock();
-
-	do {
-		cur = mt76_dma_rx_process(dev, &dev->q_rx[qid], budget - done);
-		mt76_rx_poll_complete(dev, qid, napi);
-		done += cur;
-	} while (cur && done < budget);
-
-	rcu_read_unlock();
-
-	if (done < budget && napi_complete(napi))
-		dev->drv->rx_poll_complete(dev, qid);
-
-	return done;
-}
-EXPORT_SYMBOL_GPL(mt76_dma_rx_poll);
-
-static int
-mt76_dma_init(struct mt76_dev *dev,
-	      int (*poll)(struct napi_struct *napi, int budget))
-{
-	int i;
-
-	init_dummy_netdev(&dev->napi_dev);
-	init_dummy_netdev(&dev->tx_napi_dev);
-	snprintf(dev->napi_dev.name, sizeof(dev->napi_dev.name), "%s",
-		 wiphy_name(dev->hw->wiphy));
-	dev->napi_dev.threaded = 1;
-
-	mt76_for_each_q_rx(dev, i) {
-		netif_napi_add(&dev->napi_dev, &dev->napi[i], poll, 64);
-		mt76_dma_rx_fill(dev, &dev->q_rx[i]);
-		napi_enable(&dev->napi[i]);
-	}
-
-	return 0;
-}
-
-static const struct mt76_queue_ops mt76_dma_ops = {
-	.init = mt76_dma_init,
-	.alloc = mt76_dma_alloc_queue,
-	.reset_q = mt76_dma_queue_reset,
-	.tx_queue_skb_raw = mt76_dma_tx_queue_skb_raw,
-	.tx_queue_skb = mt76_dma_tx_queue_skb,
-	.tx_cleanup = mt76_dma_tx_cleanup,
-	.rx_cleanup = mt76_dma_rx_cleanup,
-	.rx_reset = mt76_dma_rx_reset,
-	.kick = mt76_dma_kick_queue,
-};
-
-void mt76_dma_attach(struct mt76_dev *dev)
-{
-	dev->queue_ops = &mt76_dma_ops;
-}
-EXPORT_SYMBOL_GPL(mt76_dma_attach);
-
-void mt76_dma_cleanup(struct mt76_dev *dev)
-{
-	int i;
-
-	mt76_worker_disable(&dev->tx_worker);
-	netif_napi_del(&dev->tx_napi);
-
-	for (i = 0; i < ARRAY_SIZE(dev->phys); i++) {
-		struct mt76_phy *phy = dev->phys[i];
-		int j;
-
-		if (!phy)
-			continue;
-
-		for (j = 0; j < ARRAY_SIZE(phy->q_tx); j++)
-			mt76_dma_tx_cleanup(dev, phy->q_tx[j], true);
-	}
-
-	for (i = 0; i < ARRAY_SIZE(dev->q_mcu); i++)
-		mt76_dma_tx_cleanup(dev, dev->q_mcu[i], true);
-
-	mt76_for_each_q_rx(dev, i) {
-		netif_napi_del(&dev->napi[i]);
-		mt76_dma_rx_cleanup(dev, &dev->q_rx[i]);
-	}
-
-	mt76_free_pending_txwi(dev);
-}
-EXPORT_SYMBOL_GPL(mt76_dma_cleanup);
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/dma.h b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/dma.h
deleted file mode 100644
index fdf786f..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/dma.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/* SPDX-License-Identifier: ISC */
-/*
- * Copyright (C) 2016 Felix Fietkau <nbd@nbd.name>
- */
-#ifndef __MT76_DMA_H
-#define __MT76_DMA_H
-
-#define DMA_DUMMY_DATA			((void *)~0)
-
-#define MT_RING_SIZE			0x10
-
-#define MT_DMA_CTL_SD_LEN1		GENMASK(13, 0)
-#define MT_DMA_CTL_LAST_SEC1		BIT(14)
-#define MT_DMA_CTL_BURST		BIT(15)
-#define MT_DMA_CTL_SD_LEN0		GENMASK(29, 16)
-#define MT_DMA_CTL_LAST_SEC0		BIT(30)
-#define MT_DMA_CTL_DMA_DONE		BIT(31)
-
-#define MT_DMA_HDR_LEN			4
-#define MT_RX_INFO_LEN			4
-#define MT_FCE_INFO_LEN			4
-#define MT_RX_RXWI_LEN			32
-
-struct mt76_desc {
-	__le32 buf0;
-	__le32 ctrl;
-	__le32 buf1;
-	__le32 info;
-} __packed __aligned(4);
-
-enum mt76_qsel {
-	MT_QSEL_MGMT,
-	MT_QSEL_HCCA,
-	MT_QSEL_EDCA,
-	MT_QSEL_EDCA_2,
-};
-
-enum mt76_mcu_evt_type {
-	EVT_CMD_DONE,
-	EVT_CMD_ERROR,
-	EVT_CMD_RETRY,
-	EVT_EVENT_PWR_RSP,
-	EVT_EVENT_WOW_RSP,
-	EVT_EVENT_CARRIER_DETECT_RSP,
-	EVT_EVENT_DFS_DETECT_RSP,
-};
-
-int mt76_dma_rx_poll(struct napi_struct *napi, int budget);
-void mt76_dma_attach(struct mt76_dev *dev);
-void mt76_dma_cleanup(struct mt76_dev *dev);
-
-#endif
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/eeprom.c b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/eeprom.c
deleted file mode 100644
index 25f6776..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/eeprom.c
+++ /dev/null
@@ -1,359 +0,0 @@
-// SPDX-License-Identifier: ISC
-/*
- * Copyright (C) 2016 Felix Fietkau <nbd@nbd.name>
- */
-#include <linux/of.h>
-#include <linux/of_net.h>
-#include <linux/mtd/mtd.h>
-#include <linux/mtd/partitions.h>
-#include <linux/etherdevice.h>
-#include "mt76.h"
-
-int mt76_get_of_eeprom(struct mt76_dev *dev, void *eep, int offset, int len)
-{
-#if defined(CONFIG_OF) && defined(CONFIG_MTD)
-	struct device_node *np = dev->dev->of_node;
-	struct mtd_info *mtd;
-	const __be32 *list;
-	const void *data;
-	const char *part;
-	phandle phandle;
-	int size;
-	size_t retlen;
-	int ret;
-
-	if (!np)
-		return -ENOENT;
-
-	data = of_get_property(np, "mediatek,eeprom-data", &size);
-	if (data) {
-		if (size > len)
-			return -EINVAL;
-
-		memcpy(eep, data, size);
-
-		return 0;
-	}
-
-	list = of_get_property(np, "mediatek,mtd-eeprom", &size);
-	if (!list)
-		return -ENOENT;
-
-	phandle = be32_to_cpup(list++);
-	if (!phandle)
-		return -ENOENT;
-
-	np = of_find_node_by_phandle(phandle);
-	if (!np)
-		return -EINVAL;
-
-	part = of_get_property(np, "label", NULL);
-	if (!part)
-		part = np->name;
-
-	mtd = get_mtd_device_nm(part);
-	if (IS_ERR(mtd)) {
-		ret =  PTR_ERR(mtd);
-		goto out_put_node;
-	}
-
-	if (size <= sizeof(*list)) {
-		ret = -EINVAL;
-		goto out_put_node;
-	}
-
-	offset += be32_to_cpup(list);
-	ret = mtd_read(mtd, offset, len, &retlen, eep);
-	put_mtd_device(mtd);
-	if (mtd_is_bitflip(ret))
-		ret = 0;
-	if (ret) {
-		dev_err(dev->dev, "reading EEPROM from mtd %s failed: %i\n",
-			part, ret);
-		goto out_put_node;
-	}
-
-	if (retlen < len) {
-		ret = -EINVAL;
-		goto out_put_node;
-	}
-
-	if (of_property_read_bool(dev->dev->of_node, "big-endian")) {
-		u8 *data = (u8 *)eep;
-		int i;
-
-		/* convert eeprom data in Little Endian */
-		for (i = 0; i < round_down(len, 2); i += 2)
-			put_unaligned_le16(get_unaligned_be16(&data[i]),
-					   &data[i]);
-	}
-
-#ifdef CONFIG_NL80211_TESTMODE
-	dev->test_mtd.name = devm_kstrdup(dev->dev, part, GFP_KERNEL);
-	dev->test_mtd.offset = offset;
-#endif
-
-out_put_node:
-	of_node_put(np);
-	return ret;
-#else
-	return -ENOENT;
-#endif
-}
-EXPORT_SYMBOL_GPL(mt76_get_of_eeprom);
-
-void
-mt76_eeprom_override(struct mt76_phy *phy)
-{
-	struct mt76_dev *dev = phy->dev;
-
-	struct device_node *np = dev->dev->of_node;
-
-	of_get_mac_address(np, phy->macaddr);
-
-	if (!is_valid_ether_addr(phy->macaddr)) {
-		eth_random_addr(phy->macaddr);
-		dev_info(dev->dev,
-			 "Invalid MAC address, using random address %pM\n",
-			 phy->macaddr);
-	}
-}
-EXPORT_SYMBOL_GPL(mt76_eeprom_override);
-
-static bool mt76_string_prop_find(struct property *prop, const char *str)
-{
-	const char *cp = NULL;
-
-	if (!prop || !str || !str[0])
-		return false;
-
-	while ((cp = of_prop_next_string(prop, cp)) != NULL)
-		if (!strcasecmp(cp, str))
-			return true;
-
-	return false;
-}
-
-static struct device_node *
-mt76_find_power_limits_node(struct mt76_dev *dev)
-{
-	struct device_node *np = dev->dev->of_node;
-	const char *const region_names[] = {
-		[NL80211_DFS_ETSI] = "etsi",
-		[NL80211_DFS_FCC] = "fcc",
-		[NL80211_DFS_JP] = "jp",
-	};
-	struct device_node *cur, *fallback = NULL;
-	const char *region_name = NULL;
-
-	if (dev->region < ARRAY_SIZE(region_names))
-		region_name = region_names[dev->region];
-
-	np = of_get_child_by_name(np, "power-limits");
-	if (!np)
-		return NULL;
-
-	for_each_child_of_node(np, cur) {
-		struct property *country = of_find_property(cur, "country", NULL);
-		struct property *regd = of_find_property(cur, "regdomain", NULL);
-
-		if (!country && !regd) {
-			fallback = cur;
-			continue;
-		}
-
-		if (mt76_string_prop_find(country, dev->alpha2) ||
-		    mt76_string_prop_find(regd, region_name)) {
-			of_node_put(np);
-			return cur;
-		}
-	}
-
-	of_node_put(np);
-	return fallback;
-}
-
-static const __be32 *
-mt76_get_of_array(struct device_node *np, char *name, size_t *len, int min)
-{
-	struct property *prop = of_find_property(np, name, NULL);
-
-	if (!prop || !prop->value || prop->length < min * 4)
-		return NULL;
-
-	*len = prop->length;
-
-	return prop->value;
-}
-
-static struct device_node *
-mt76_find_channel_node(struct device_node *np, struct ieee80211_channel *chan)
-{
-	struct device_node *cur;
-	const __be32 *val;
-	size_t len;
-
-	for_each_child_of_node(np, cur) {
-		val = mt76_get_of_array(cur, "channels", &len, 2);
-		if (!val)
-			continue;
-
-		while (len >= 2 * sizeof(*val)) {
-			if (chan->hw_value >= be32_to_cpu(val[0]) &&
-			    chan->hw_value <= be32_to_cpu(val[1]))
-				return cur;
-
-			val += 2;
-			len -= 2 * sizeof(*val);
-		}
-	}
-
-	return NULL;
-}
-
-static s8
-mt76_get_txs_delta(struct device_node *np, u8 nss)
-{
-	const __be32 *val;
-	size_t len;
-
-	val = mt76_get_of_array(np, "txs-delta", &len, nss);
-	if (!val)
-		return 0;
-
-	return be32_to_cpu(val[nss - 1]);
-}
-
-static void
-mt76_apply_array_limit(s8 *pwr, size_t pwr_len, const __be32 *data,
-		       s8 target_power, s8 nss_delta, s8 *max_power)
-{
-	int i;
-
-	if (!data)
-		return;
-
-	for (i = 0; i < pwr_len; i++) {
-		pwr[i] = min_t(s8, target_power,
-			       be32_to_cpu(data[i]) + nss_delta);
-		*max_power = max(*max_power, pwr[i]);
-	}
-}
-
-static void
-mt76_apply_multi_array_limit(s8 *pwr, size_t pwr_len, s8 pwr_num,
-			     const __be32 *data, size_t len, s8 target_power,
-			     s8 nss_delta, s8 *max_power)
-{
-	int i, cur;
-
-	if (!data)
-		return;
-
-	len /= 4;
-	cur = be32_to_cpu(data[0]);
-	for (i = 0; i < pwr_num; i++) {
-		if (len < pwr_len + 1)
-			break;
-
-		mt76_apply_array_limit(pwr + pwr_len * i, pwr_len, data + 1,
-				       target_power, nss_delta, max_power);
-		if (--cur > 0)
-			continue;
-
-		data += pwr_len + 1;
-		len -= pwr_len + 1;
-		if (!len)
-			break;
-
-		cur = be32_to_cpu(data[0]);
-	}
-}
-
-s8 mt76_get_rate_power_limits(struct mt76_phy *phy,
-			      struct ieee80211_channel *chan,
-			      struct mt76_power_limits *dest,
-			      s8 target_power)
-{
-	struct mt76_dev *dev = phy->dev;
-	struct device_node *np;
-	const __be32 *val;
-	char name[16];
-	u32 mcs_rates = dev->drv->mcs_rates;
-	u32 ru_rates = ARRAY_SIZE(dest->ru[0]);
-	char band;
-	size_t len;
-	s8 max_power = 0;
-	s8 txs_delta;
-
-	if (!mcs_rates)
-		mcs_rates = 10;
-
-	memset(dest, target_power, sizeof(*dest));
-
-	if (!IS_ENABLED(CONFIG_OF))
-		return target_power;
-
-	np = mt76_find_power_limits_node(dev);
-	if (!np)
-		return target_power;
-
-	switch (chan->band) {
-	case NL80211_BAND_2GHZ:
-		band = '2';
-		break;
-	case NL80211_BAND_5GHZ:
-		band = '5';
-		break;
-	case NL80211_BAND_6GHZ:
-		band = '6';
-		break;
-	default:
-		return target_power;
-	}
-
-	snprintf(name, sizeof(name), "txpower-%cg", band);
-	np = of_get_child_by_name(np, name);
-	if (!np)
-		return target_power;
-
-	np = mt76_find_channel_node(np, chan);
-	if (!np)
-		return target_power;
-
-	txs_delta = mt76_get_txs_delta(np, hweight8(phy->antenna_mask));
-
-	val = mt76_get_of_array(np, "rates-cck", &len, ARRAY_SIZE(dest->cck));
-	mt76_apply_array_limit(dest->cck, ARRAY_SIZE(dest->cck), val,
-			       target_power, txs_delta, &max_power);
-
-	val = mt76_get_of_array(np, "rates-ofdm",
-				&len, ARRAY_SIZE(dest->ofdm));
-	mt76_apply_array_limit(dest->ofdm, ARRAY_SIZE(dest->ofdm), val,
-			       target_power, txs_delta, &max_power);
-
-	val = mt76_get_of_array(np, "rates-mcs", &len, mcs_rates + 1);
-	mt76_apply_multi_array_limit(dest->mcs[0], ARRAY_SIZE(dest->mcs[0]),
-				     ARRAY_SIZE(dest->mcs), val, len,
-				     target_power, txs_delta, &max_power);
-
-	val = mt76_get_of_array(np, "rates-ru", &len, ru_rates + 1);
-	mt76_apply_multi_array_limit(dest->ru[0], ARRAY_SIZE(dest->ru[0]),
-				     ARRAY_SIZE(dest->ru), val, len,
-				     target_power, txs_delta, &max_power);
-
-	return max_power;
-}
-EXPORT_SYMBOL_GPL(mt76_get_rate_power_limits);
-
-int
-mt76_eeprom_init(struct mt76_dev *dev, int len)
-{
-	dev->eeprom.size = len;
-	dev->eeprom.data = devm_kzalloc(dev->dev, len, GFP_KERNEL);
-	if (!dev->eeprom.data)
-		return -ENOMEM;
-
-	return !mt76_get_of_eeprom(dev, dev->eeprom.data, 0, len);
-}
-EXPORT_SYMBOL_GPL(mt76_eeprom_init);
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/LICENSE b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/LICENSE
deleted file mode 100644
index be614c0..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/LICENSE
+++ /dev/null
@@ -1,39 +0,0 @@
-Copyright (c) 2014, Ralink, A MediaTek Company 
-All rights reserved.
-
-Redistribution.  Redistribution and use in binary form, without 
-modification, are permitted provided that the following conditions are 
-met:
-
-* Redistributions must reproduce the above copyright notice and the 
-  following disclaimer in the documentation and/or other materials 
-  provided with the distribution. 
-* Neither the name of Ralink Technology Corporation nor the names of its
-  suppliers may be used to endorse or promote products derived from this
-  software without specific prior written permission. 
-* No reverse engineering, decompilation, or disassembly of this software 
-  is permitted.
-
-Limited patent license. Ralink Technology Corporation grants a world-wide, 
-royalty-free, non-exclusive license under patents it now or hereafter 
-owns or controls to make, have made, use, import, offer to sell and 
-sell ("Utilize") this software, but solely to the extent that any 
-such patent is necessary to Utilize the software alone, or in 
-combination with an operating system licensed under an approved Open 
-Source license as listed by the Open Source Initiative at 
-http://opensource.org/licenses.  The patent license shall not apply to 
-any other combinations which include this software.  No hardware per 
-se is licensed hereunder.
-
-DISCLAIMER.  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 
-CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 
-BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
-FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 
-COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 
-OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR 
-TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 
-USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 
-DAMAGE.
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/WIFI_MT7922_patch_mcu_1_1_hdr.bin b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/WIFI_MT7922_patch_mcu_1_1_hdr.bin
deleted file mode 100644
index a95eb35..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/WIFI_MT7922_patch_mcu_1_1_hdr.bin
+++ /dev/null
Binary files differ
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/WIFI_MT7961_patch_mcu_1_2_hdr.bin b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/WIFI_MT7961_patch_mcu_1_2_hdr.bin
deleted file mode 100644
index bfbcca6..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/WIFI_MT7961_patch_mcu_1_2_hdr.bin
+++ /dev/null
Binary files differ
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/WIFI_RAM_CODE_MT7922_1.bin b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/WIFI_RAM_CODE_MT7922_1.bin
deleted file mode 100644
index 262aadf..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/WIFI_RAM_CODE_MT7922_1.bin
+++ /dev/null
Binary files differ
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/WIFI_RAM_CODE_MT7961_1.bin b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/WIFI_RAM_CODE_MT7961_1.bin
deleted file mode 100644
index fe4a0f3..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/WIFI_RAM_CODE_MT7961_1.bin
+++ /dev/null
Binary files differ
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7603_e1.bin b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7603_e1.bin
deleted file mode 100644
index 829bdc5..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7603_e1.bin
+++ /dev/null
Binary files differ
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7603_e2.bin b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7603_e2.bin
deleted file mode 100644
index 2bc6ac4..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7603_e2.bin
+++ /dev/null
Binary files differ
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7610e.bin b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7610e.bin
deleted file mode 100644
index 7660084..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7610e.bin
+++ /dev/null
Binary files differ
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7615_cr4.bin b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7615_cr4.bin
deleted file mode 100644
index b6e1b8c..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7615_cr4.bin
+++ /dev/null
Binary files differ
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7615_n9.bin b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7615_n9.bin
deleted file mode 100644
index 2490ace..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7615_n9.bin
+++ /dev/null
Binary files differ
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7615_rom_patch.bin b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7615_rom_patch.bin
deleted file mode 100644
index 4aeaa75..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7615_rom_patch.bin
+++ /dev/null
Binary files differ
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7622_n9.bin b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7622_n9.bin
deleted file mode 100644
index 444d5e0..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7622_n9.bin
+++ /dev/null
Binary files differ
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7622_rom_patch.bin b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7622_rom_patch.bin
deleted file mode 100644
index 7d0e643..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7622_rom_patch.bin
+++ /dev/null
Binary files differ
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7628_e1.bin b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7628_e1.bin
deleted file mode 100644
index 72aed6f..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7628_e1.bin
+++ /dev/null
Binary files differ
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7628_e2.bin b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7628_e2.bin
deleted file mode 100644
index 7652e4a..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7628_e2.bin
+++ /dev/null
Binary files differ
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7662.bin b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7662.bin
deleted file mode 100644
index b0cc8ae..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7662.bin
+++ /dev/null
Binary files differ
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7662_firmware_e3_v1.7.bin b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7662_firmware_e3_v1.7.bin
deleted file mode 100644
index 101fc83..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7662_firmware_e3_v1.7.bin
+++ /dev/null
Binary files differ
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7662_firmware_e3_v1.9.bin b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7662_firmware_e3_v1.9.bin
deleted file mode 100644
index 26c6fbb..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7662_firmware_e3_v1.9.bin
+++ /dev/null
Binary files differ
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7662_firmware_e3_v2.3.bin b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7662_firmware_e3_v2.3.bin
deleted file mode 100644
index b0cc8ae..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7662_firmware_e3_v2.3.bin
+++ /dev/null
Binary files differ
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7662_patch_e3_hdr_v0.0.2_P69.bin b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7662_patch_e3_hdr_v0.0.2_P69.bin
deleted file mode 100644
index 10b245e..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7662_patch_e3_hdr_v0.0.2_P69.bin
+++ /dev/null
Binary files differ
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7662_rom_patch.bin b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7662_rom_patch.bin
deleted file mode 100644
index 10b245e..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7662_rom_patch.bin
+++ /dev/null
Binary files differ
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7663_n9_rebb.bin b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7663_n9_rebb.bin
deleted file mode 100644
index fe5733f..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7663_n9_rebb.bin
+++ /dev/null
Binary files differ
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7663_n9_v3.bin b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7663_n9_v3.bin
deleted file mode 100644
index 5ff186a..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7663_n9_v3.bin
+++ /dev/null
Binary files differ
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7663pr2h.bin b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7663pr2h.bin
deleted file mode 100644
index 3456479..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7663pr2h.bin
+++ /dev/null
Binary files differ
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7663pr2h_rebb.bin b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7663pr2h_rebb.bin
deleted file mode 100644
index 8a23b61..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7663pr2h_rebb.bin
+++ /dev/null
Binary files differ
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7902_eeprom.bin b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7902_eeprom.bin
deleted file mode 100644
index 465b051..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7902_eeprom.bin
+++ /dev/null
Binary files differ
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7902_eeprom_7977.bin b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7902_eeprom_7977.bin
deleted file mode 100644
index 059637f..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7902_eeprom_7977.bin
+++ /dev/null
Binary files differ
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7902_rom_patch.bin b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7902_rom_patch.bin
deleted file mode 100644
index b3d73c9..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7902_rom_patch.bin
+++ /dev/null
Binary files differ
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7902_wa.bin b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7902_wa.bin
deleted file mode 100644
index f69659b..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7902_wa.bin
+++ /dev/null
Binary files differ
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7902_wf_rom.bin b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7902_wf_rom.bin
deleted file mode 100644
index 128fe4e..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7902_wf_rom.bin
+++ /dev/null
Binary files differ
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7902_wf_rom_7977.bin b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7902_wf_rom_7977.bin
deleted file mode 100644
index ae94386..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7902_wf_rom_7977.bin
+++ /dev/null
Binary files differ
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7902_wf_rom_sram.bin b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7902_wf_rom_sram.bin
deleted file mode 100644
index d619b6a..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7902_wf_rom_sram.bin
+++ /dev/null
Binary files differ
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7902_wf_rom_sram_7977.bin b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7902_wf_rom_sram_7977.bin
deleted file mode 100644
index da59af1..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7902_wf_rom_sram_7977.bin
+++ /dev/null
Binary files differ
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7902_wm.bin b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7902_wm.bin
deleted file mode 100644
index 83d4f78..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7902_wm.bin
+++ /dev/null
Binary files differ
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7902_wm_7977.bin b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7902_wm_7977.bin
deleted file mode 100644
index f74f076..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7902_wm_7977.bin
+++ /dev/null
Binary files differ
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7915_eeprom.bin b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7915_eeprom.bin
deleted file mode 100644
index 007df1b..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7915_eeprom.bin
+++ /dev/null
Binary files differ
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7915_eeprom_dbdc.bin b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7915_eeprom_dbdc.bin
deleted file mode 100644
index 6c0b64e..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7915_eeprom_dbdc.bin
+++ /dev/null
Binary files differ
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7915_rom_patch.bin b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7915_rom_patch.bin
deleted file mode 100644
index 1c69d39..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7915_rom_patch.bin
+++ /dev/null
Binary files differ
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7915_wa.bin b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7915_wa.bin
deleted file mode 100644
index 434e757..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7915_wa.bin
+++ /dev/null
Binary files differ
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7915_wm.bin b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7915_wm.bin
deleted file mode 100644
index fef6005..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7915_wm.bin
+++ /dev/null
Binary files differ
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7916_eeprom.bin b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7916_eeprom.bin
deleted file mode 100644
index 35b287c..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7916_eeprom.bin
+++ /dev/null
Binary files differ
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7916_rom_patch.bin b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7916_rom_patch.bin
deleted file mode 100644
index 07fe11a..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7916_rom_patch.bin
+++ /dev/null
Binary files differ
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7916_wa.bin b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7916_wa.bin
deleted file mode 100644
index 27caa00..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7916_wa.bin
+++ /dev/null
Binary files differ
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7916_wm.bin b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7916_wm.bin
deleted file mode 100644
index 7df01ea..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7916_wm.bin
+++ /dev/null
Binary files differ
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7986_eeprom_mt7975.bin b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7986_eeprom_mt7975.bin
deleted file mode 100644
index 84b6aa7..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7986_eeprom_mt7975.bin
+++ /dev/null
Binary files differ
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7986_eeprom_mt7975_dual.bin b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7986_eeprom_mt7975_dual.bin
deleted file mode 100644
index dfe5376..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7986_eeprom_mt7975_dual.bin
+++ /dev/null
Binary files differ
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7986_eeprom_mt7976.bin b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7986_eeprom_mt7976.bin
deleted file mode 100644
index c821f2d..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7986_eeprom_mt7976.bin
+++ /dev/null
Binary files differ
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7986_eeprom_mt7976_dbdc.bin b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7986_eeprom_mt7976_dbdc.bin
deleted file mode 100644
index 54858b0..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7986_eeprom_mt7976_dbdc.bin
+++ /dev/null
Binary files differ
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7986_eeprom_mt7976_dual.bin b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7986_eeprom_mt7976_dual.bin
deleted file mode 100644
index dc0d3e4..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7986_eeprom_mt7976_dual.bin
+++ /dev/null
Binary files differ
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7986_rom_patch.bin b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7986_rom_patch.bin
deleted file mode 100644
index c0185c8..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7986_rom_patch.bin
+++ /dev/null
Binary files differ
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7986_rom_patch_mt7975.bin b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7986_rom_patch_mt7975.bin
deleted file mode 100644
index 936cfe8..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7986_rom_patch_mt7975.bin
+++ /dev/null
Binary files differ
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7986_wa.bin b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7986_wa.bin
deleted file mode 100644
index f7914a9..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7986_wa.bin
+++ /dev/null
Binary files differ
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7986_wm.bin b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7986_wm.bin
deleted file mode 100644
index 11f363f..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7986_wm.bin
+++ /dev/null
Binary files differ
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7986_wm_mt7975.bin b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7986_wm_mt7975.bin
deleted file mode 100644
index 972926c..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7986_wm_mt7975.bin
+++ /dev/null
Binary files differ
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7986_wo_0.bin b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7986_wo_0.bin
deleted file mode 100644
index a2dfb96..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7986_wo_0.bin
+++ /dev/null
Binary files differ
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7986_wo_1.bin b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7986_wo_1.bin
deleted file mode 100644
index f7bbf39..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7986_wo_1.bin
+++ /dev/null
Binary files differ
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7996_eeprom.bin b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7996_eeprom.bin
deleted file mode 100644
index 19d8126..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7996_eeprom.bin
+++ /dev/null
Binary files differ
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7996_rom_patch.bin b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7996_rom_patch.bin
deleted file mode 100644
index 6dfe002..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7996_rom_patch.bin
+++ /dev/null
Binary files differ
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7996_wa.bin b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7996_wa.bin
deleted file mode 100644
index ac65ef5..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7996_wa.bin
+++ /dev/null
Binary files differ
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7996_wm.bin b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7996_wm.bin
deleted file mode 100644
index c4a1e81..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/firmware/mt7996_wm.bin
+++ /dev/null
Binary files differ
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mac80211.c b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mac80211.c
deleted file mode 100644
index 6d78cae..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mac80211.c
+++ /dev/null
@@ -1,1687 +0,0 @@
-// SPDX-License-Identifier: ISC
-/*
- * Copyright (C) 2016 Felix Fietkau <nbd@nbd.name>
- */
-#include <linux/sched.h>
-#include <linux/of.h>
-#include "mt76.h"
-
-#define CHAN2G(_idx, _freq) {			\
-	.band = NL80211_BAND_2GHZ,		\
-	.center_freq = (_freq),			\
-	.hw_value = (_idx),			\
-	.max_power = 30,			\
-}
-
-#define CHAN5G(_idx, _freq) {			\
-	.band = NL80211_BAND_5GHZ,		\
-	.center_freq = (_freq),			\
-	.hw_value = (_idx),			\
-	.max_power = 30,			\
-}
-
-#define CHAN6G(_idx, _freq) {			\
-	.band = NL80211_BAND_6GHZ,		\
-	.center_freq = (_freq),			\
-	.hw_value = (_idx),			\
-	.max_power = 30,			\
-}
-
-static const struct ieee80211_channel mt76_channels_2ghz[] = {
-	CHAN2G(1, 2412),
-	CHAN2G(2, 2417),
-	CHAN2G(3, 2422),
-	CHAN2G(4, 2427),
-	CHAN2G(5, 2432),
-	CHAN2G(6, 2437),
-	CHAN2G(7, 2442),
-	CHAN2G(8, 2447),
-	CHAN2G(9, 2452),
-	CHAN2G(10, 2457),
-	CHAN2G(11, 2462),
-	CHAN2G(12, 2467),
-	CHAN2G(13, 2472),
-	CHAN2G(14, 2484),
-};
-
-static const struct ieee80211_channel mt76_channels_5ghz[] = {
-	CHAN5G(36, 5180),
-	CHAN5G(40, 5200),
-	CHAN5G(44, 5220),
-	CHAN5G(48, 5240),
-
-	CHAN5G(52, 5260),
-	CHAN5G(56, 5280),
-	CHAN5G(60, 5300),
-	CHAN5G(64, 5320),
-
-	CHAN5G(100, 5500),
-	CHAN5G(104, 5520),
-	CHAN5G(108, 5540),
-	CHAN5G(112, 5560),
-	CHAN5G(116, 5580),
-	CHAN5G(120, 5600),
-	CHAN5G(124, 5620),
-	CHAN5G(128, 5640),
-	CHAN5G(132, 5660),
-	CHAN5G(136, 5680),
-	CHAN5G(140, 5700),
-	CHAN5G(144, 5720),
-
-	CHAN5G(149, 5745),
-	CHAN5G(153, 5765),
-	CHAN5G(157, 5785),
-	CHAN5G(161, 5805),
-	CHAN5G(165, 5825),
-	CHAN5G(169, 5845),
-	CHAN5G(173, 5865),
-};
-
-static const struct ieee80211_channel mt76_channels_6ghz[] = {
-	/* UNII-5 */
-	CHAN6G(1, 5955),
-	CHAN6G(5, 5975),
-	CHAN6G(9, 5995),
-	CHAN6G(13, 6015),
-	CHAN6G(17, 6035),
-	CHAN6G(21, 6055),
-	CHAN6G(25, 6075),
-	CHAN6G(29, 6095),
-	CHAN6G(33, 6115),
-	CHAN6G(37, 6135),
-	CHAN6G(41, 6155),
-	CHAN6G(45, 6175),
-	CHAN6G(49, 6195),
-	CHAN6G(53, 6215),
-	CHAN6G(57, 6235),
-	CHAN6G(61, 6255),
-	CHAN6G(65, 6275),
-	CHAN6G(69, 6295),
-	CHAN6G(73, 6315),
-	CHAN6G(77, 6335),
-	CHAN6G(81, 6355),
-	CHAN6G(85, 6375),
-	CHAN6G(89, 6395),
-	CHAN6G(93, 6415),
-	/* UNII-6 */
-	CHAN6G(97, 6435),
-	CHAN6G(101, 6455),
-	CHAN6G(105, 6475),
-	CHAN6G(109, 6495),
-	CHAN6G(113, 6515),
-	CHAN6G(117, 6535),
-	/* UNII-7 */
-	CHAN6G(121, 6555),
-	CHAN6G(125, 6575),
-	CHAN6G(129, 6595),
-	CHAN6G(133, 6615),
-	CHAN6G(137, 6635),
-	CHAN6G(141, 6655),
-	CHAN6G(145, 6675),
-	CHAN6G(149, 6695),
-	CHAN6G(153, 6715),
-	CHAN6G(157, 6735),
-	CHAN6G(161, 6755),
-	CHAN6G(165, 6775),
-	CHAN6G(169, 6795),
-	CHAN6G(173, 6815),
-	CHAN6G(177, 6835),
-	CHAN6G(181, 6855),
-	CHAN6G(185, 6875),
-	/* UNII-8 */
-	CHAN6G(189, 6895),
-	CHAN6G(193, 6915),
-	CHAN6G(197, 6935),
-	CHAN6G(201, 6955),
-	CHAN6G(205, 6975),
-	CHAN6G(209, 6995),
-	CHAN6G(213, 7015),
-	CHAN6G(217, 7035),
-	CHAN6G(221, 7055),
-	CHAN6G(225, 7075),
-	CHAN6G(229, 7095),
-	CHAN6G(233, 7115),
-};
-
-static const struct ieee80211_tpt_blink mt76_tpt_blink[] = {
-	{ .throughput =   0 * 1024, .blink_time = 334 },
-	{ .throughput =   1 * 1024, .blink_time = 260 },
-	{ .throughput =   5 * 1024, .blink_time = 220 },
-	{ .throughput =  10 * 1024, .blink_time = 190 },
-	{ .throughput =  20 * 1024, .blink_time = 170 },
-	{ .throughput =  50 * 1024, .blink_time = 150 },
-	{ .throughput =  70 * 1024, .blink_time = 130 },
-	{ .throughput = 100 * 1024, .blink_time = 110 },
-	{ .throughput = 200 * 1024, .blink_time =  80 },
-	{ .throughput = 300 * 1024, .blink_time =  50 },
-};
-
-struct ieee80211_rate mt76_rates[] = {
-	CCK_RATE(0, 10),
-	CCK_RATE(1, 20),
-	CCK_RATE(2, 55),
-	CCK_RATE(3, 110),
-	OFDM_RATE(11, 60),
-	OFDM_RATE(15, 90),
-	OFDM_RATE(10, 120),
-	OFDM_RATE(14, 180),
-	OFDM_RATE(9,  240),
-	OFDM_RATE(13, 360),
-	OFDM_RATE(8,  480),
-	OFDM_RATE(12, 540),
-};
-EXPORT_SYMBOL_GPL(mt76_rates);
-
-static const struct cfg80211_sar_freq_ranges mt76_sar_freq_ranges[] = {
-	{ .start_freq = 2402, .end_freq = 2494, },
-	{ .start_freq = 5150, .end_freq = 5350, },
-	{ .start_freq = 5350, .end_freq = 5470, },
-	{ .start_freq = 5470, .end_freq = 5725, },
-	{ .start_freq = 5725, .end_freq = 5950, },
-	{ .start_freq = 5945, .end_freq = 6165, },
-	{ .start_freq = 6165, .end_freq = 6405, },
-	{ .start_freq = 6405, .end_freq = 6525, },
-	{ .start_freq = 6525, .end_freq = 6705, },
-	{ .start_freq = 6705, .end_freq = 6865, },
-	{ .start_freq = 6865, .end_freq = 7125, },
-};
-
-static const struct cfg80211_sar_capa mt76_sar_capa = {
-	.type = NL80211_SAR_TYPE_POWER,
-	.num_freq_ranges = ARRAY_SIZE(mt76_sar_freq_ranges),
-	.freq_ranges = &mt76_sar_freq_ranges[0],
-};
-
-static int mt76_led_init(struct mt76_dev *dev)
-{
-	struct device_node *np = dev->dev->of_node;
-	struct ieee80211_hw *hw = dev->hw;
-	int led_pin;
-
-	if (!dev->led_cdev.brightness_set && !dev->led_cdev.blink_set)
-		return 0;
-
-	snprintf(dev->led_name, sizeof(dev->led_name),
-		 "mt76-%s", wiphy_name(hw->wiphy));
-
-	dev->led_cdev.name = dev->led_name;
-	dev->led_cdev.default_trigger =
-		ieee80211_create_tpt_led_trigger(hw,
-					IEEE80211_TPT_LEDTRIG_FL_RADIO,
-					mt76_tpt_blink,
-					ARRAY_SIZE(mt76_tpt_blink));
-
-	np = of_get_child_by_name(np, "led");
-	if (np) {
-		if (!of_property_read_u32(np, "led-sources", &led_pin))
-			dev->led_pin = led_pin;
-		dev->led_al = of_property_read_bool(np, "led-active-low");
-		of_node_put(np);
-	}
-
-	return led_classdev_register(dev->dev, &dev->led_cdev);
-}
-
-static void mt76_led_cleanup(struct mt76_dev *dev)
-{
-	if (!dev->led_cdev.brightness_set && !dev->led_cdev.blink_set)
-		return;
-
-	led_classdev_unregister(&dev->led_cdev);
-}
-
-static void mt76_init_stream_cap(struct mt76_phy *phy,
-				 struct ieee80211_supported_band *sband,
-				 bool vht)
-{
-	struct ieee80211_sta_ht_cap *ht_cap = &sband->ht_cap;
-	int i, nstream = hweight8(phy->antenna_mask);
-	struct ieee80211_sta_vht_cap *vht_cap;
-	u16 mcs_map = 0;
-
-	if (nstream > 1)
-		ht_cap->cap |= IEEE80211_HT_CAP_TX_STBC;
-	else
-		ht_cap->cap &= ~IEEE80211_HT_CAP_TX_STBC;
-
-	for (i = 0; i < IEEE80211_HT_MCS_MASK_LEN; i++)
-		ht_cap->mcs.rx_mask[i] = i < nstream ? 0xff : 0;
-
-	if (!vht)
-		return;
-
-	vht_cap = &sband->vht_cap;
-	if (nstream > 1)
-		vht_cap->cap |= IEEE80211_VHT_CAP_TXSTBC;
-	else
-		vht_cap->cap &= ~IEEE80211_VHT_CAP_TXSTBC;
-	vht_cap->cap |= IEEE80211_VHT_CAP_TX_ANTENNA_PATTERN |
-			IEEE80211_VHT_CAP_RX_ANTENNA_PATTERN;
-
-	for (i = 0; i < 8; i++) {
-		if (i < nstream)
-			mcs_map |= (IEEE80211_VHT_MCS_SUPPORT_0_9 << (i * 2));
-		else
-			mcs_map |=
-				(IEEE80211_VHT_MCS_NOT_SUPPORTED << (i * 2));
-	}
-	vht_cap->vht_mcs.rx_mcs_map = cpu_to_le16(mcs_map);
-	vht_cap->vht_mcs.tx_mcs_map = cpu_to_le16(mcs_map);
-	if (ieee80211_hw_check(phy->hw, SUPPORTS_VHT_EXT_NSS_BW))
-		vht_cap->vht_mcs.tx_highest |=
-				cpu_to_le16(IEEE80211_VHT_EXT_NSS_BW_CAPABLE);
-}
-
-void mt76_set_stream_caps(struct mt76_phy *phy, bool vht)
-{
-	if (phy->cap.has_2ghz)
-		mt76_init_stream_cap(phy, &phy->sband_2g.sband, false);
-	if (phy->cap.has_5ghz)
-		mt76_init_stream_cap(phy, &phy->sband_5g.sband, vht);
-	if (phy->cap.has_6ghz)
-		mt76_init_stream_cap(phy, &phy->sband_6g.sband, vht);
-}
-EXPORT_SYMBOL_GPL(mt76_set_stream_caps);
-
-static int
-mt76_init_sband(struct mt76_phy *phy, struct mt76_sband *msband,
-		const struct ieee80211_channel *chan, int n_chan,
-		struct ieee80211_rate *rates, int n_rates,
-		bool ht, bool vht)
-{
-	struct ieee80211_supported_band *sband = &msband->sband;
-	struct ieee80211_sta_vht_cap *vht_cap;
-	struct ieee80211_sta_ht_cap *ht_cap;
-	struct mt76_dev *dev = phy->dev;
-	void *chanlist;
-	int size;
-
-	size = n_chan * sizeof(*chan);
-	chanlist = devm_kmemdup(dev->dev, chan, size, GFP_KERNEL);
-	if (!chanlist)
-		return -ENOMEM;
-
-	msband->chan = devm_kcalloc(dev->dev, n_chan, sizeof(*msband->chan),
-				    GFP_KERNEL);
-	if (!msband->chan)
-		return -ENOMEM;
-
-	sband->channels = chanlist;
-	sband->n_channels = n_chan;
-	sband->bitrates = rates;
-	sband->n_bitrates = n_rates;
-
-	if (!ht)
-		return 0;
-
-	ht_cap = &sband->ht_cap;
-	ht_cap->ht_supported = true;
-	ht_cap->cap |= IEEE80211_HT_CAP_SUP_WIDTH_20_40 |
-		       IEEE80211_HT_CAP_GRN_FLD |
-		       IEEE80211_HT_CAP_SGI_20 |
-		       IEEE80211_HT_CAP_SGI_40 |
-		       (1 << IEEE80211_HT_CAP_RX_STBC_SHIFT);
-
-	ht_cap->mcs.tx_params = IEEE80211_HT_MCS_TX_DEFINED;
-	ht_cap->ampdu_factor = IEEE80211_HT_MAX_AMPDU_64K;
-
-	mt76_init_stream_cap(phy, sband, vht);
-
-	if (!vht)
-		return 0;
-
-	vht_cap = &sband->vht_cap;
-	vht_cap->vht_supported = true;
-	vht_cap->cap |= IEEE80211_VHT_CAP_RXLDPC |
-			IEEE80211_VHT_CAP_RXSTBC_1 |
-			IEEE80211_VHT_CAP_SHORT_GI_80 |
-			(3 << IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_SHIFT);
-
-	return 0;
-}
-
-static int
-mt76_init_sband_2g(struct mt76_phy *phy, struct ieee80211_rate *rates,
-		   int n_rates)
-{
-	phy->hw->wiphy->bands[NL80211_BAND_2GHZ] = &phy->sband_2g.sband;
-
-	return mt76_init_sband(phy, &phy->sband_2g, mt76_channels_2ghz,
-			       ARRAY_SIZE(mt76_channels_2ghz), rates,
-			       n_rates, true, false);
-}
-
-static int
-mt76_init_sband_5g(struct mt76_phy *phy, struct ieee80211_rate *rates,
-		   int n_rates, bool vht)
-{
-	phy->hw->wiphy->bands[NL80211_BAND_5GHZ] = &phy->sband_5g.sband;
-
-	return mt76_init_sband(phy, &phy->sband_5g, mt76_channels_5ghz,
-			       ARRAY_SIZE(mt76_channels_5ghz), rates,
-			       n_rates, true, vht);
-}
-
-static int
-mt76_init_sband_6g(struct mt76_phy *phy, struct ieee80211_rate *rates,
-		   int n_rates)
-{
-	phy->hw->wiphy->bands[NL80211_BAND_6GHZ] = &phy->sband_6g.sband;
-
-	return mt76_init_sband(phy, &phy->sband_6g, mt76_channels_6ghz,
-			       ARRAY_SIZE(mt76_channels_6ghz), rates,
-			       n_rates, false, false);
-}
-
-static void
-mt76_check_sband(struct mt76_phy *phy, struct mt76_sband *msband,
-		 enum nl80211_band band)
-{
-	struct ieee80211_supported_band *sband = &msband->sband;
-	bool found = false;
-	int i;
-
-	if (!sband)
-		return;
-
-	for (i = 0; i < sband->n_channels; i++) {
-		if (sband->channels[i].flags & IEEE80211_CHAN_DISABLED)
-			continue;
-
-		found = true;
-		break;
-	}
-
-	if (found) {
-		phy->chandef.chan = &sband->channels[0];
-		phy->chan_state = &msband->chan[0];
-		return;
-	}
-
-	sband->n_channels = 0;
-	phy->hw->wiphy->bands[band] = NULL;
-}
-
-static int
-mt76_phy_init(struct mt76_phy *phy, struct ieee80211_hw *hw)
-{
-	struct mt76_dev *dev = phy->dev;
-	struct wiphy *wiphy = hw->wiphy;
-
-	SET_IEEE80211_DEV(hw, dev->dev);
-	SET_IEEE80211_PERM_ADDR(hw, phy->macaddr);
-
-	wiphy->features |= NL80211_FEATURE_ACTIVE_MONITOR;
-	wiphy->flags |= WIPHY_FLAG_HAS_CHANNEL_SWITCH |
-			WIPHY_FLAG_SUPPORTS_TDLS |
-			WIPHY_FLAG_AP_UAPSD;
-
-	wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST);
-	wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_AIRTIME_FAIRNESS);
-	wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_AQL);
-
-	wiphy->available_antennas_tx = phy->antenna_mask;
-	wiphy->available_antennas_rx = phy->antenna_mask;
-
-	wiphy->sar_capa = &mt76_sar_capa;
-	phy->frp = devm_kcalloc(dev->dev, wiphy->sar_capa->num_freq_ranges,
-				sizeof(struct mt76_freq_range_power),
-				GFP_KERNEL);
-	if (!phy->frp)
-		return -ENOMEM;
-
-	hw->txq_data_size = sizeof(struct mt76_txq);
-	hw->uapsd_max_sp_len = IEEE80211_WMM_IE_STA_QOSINFO_SP_ALL;
-
-	if (!hw->max_tx_fragments)
-		hw->max_tx_fragments = 16;
-
-	ieee80211_hw_set(hw, SIGNAL_DBM);
-	ieee80211_hw_set(hw, AMPDU_AGGREGATION);
-	ieee80211_hw_set(hw, SUPPORTS_RC_TABLE);
-	ieee80211_hw_set(hw, SUPPORT_FAST_XMIT);
-	ieee80211_hw_set(hw, SUPPORTS_CLONED_SKBS);
-	ieee80211_hw_set(hw, SUPPORTS_AMSDU_IN_AMPDU);
-	ieee80211_hw_set(hw, SUPPORTS_REORDERING_BUFFER);
-
-	if (!(dev->drv->drv_flags & MT_DRV_AMSDU_OFFLOAD)) {
-		ieee80211_hw_set(hw, TX_AMSDU);
-		ieee80211_hw_set(hw, TX_FRAG_LIST);
-	}
-
-	ieee80211_hw_set(hw, MFP_CAPABLE);
-	ieee80211_hw_set(hw, AP_LINK_PS);
-	ieee80211_hw_set(hw, REPORTS_TX_ACK_STATUS);
-
-	return 0;
-}
-
-struct mt76_phy *
-mt76_alloc_phy(struct mt76_dev *dev, unsigned int size,
-	       const struct ieee80211_ops *ops, u8 band_idx)
-{
-	struct ieee80211_hw *hw;
-	unsigned int phy_size;
-	struct mt76_phy *phy;
-
-	phy_size = ALIGN(sizeof(*phy), 8);
-	hw = ieee80211_alloc_hw(size + phy_size, ops);
-	if (!hw)
-		return NULL;
-
-	phy = hw->priv;
-	phy->dev = dev;
-	phy->hw = hw;
-	phy->priv = hw->priv + phy_size;
-	phy->band_idx = band_idx;
-
-	hw->wiphy->flags |= WIPHY_FLAG_IBSS_RSN;
-	hw->wiphy->interface_modes =
-		BIT(NL80211_IFTYPE_STATION) |
-		BIT(NL80211_IFTYPE_AP) |
-#ifdef CONFIG_MAC80211_MESH
-		BIT(NL80211_IFTYPE_MESH_POINT) |
-#endif
-		BIT(NL80211_IFTYPE_P2P_CLIENT) |
-		BIT(NL80211_IFTYPE_P2P_GO) |
-		BIT(NL80211_IFTYPE_ADHOC);
-
-	return phy;
-}
-EXPORT_SYMBOL_GPL(mt76_alloc_phy);
-
-int mt76_register_phy(struct mt76_phy *phy, bool vht,
-		      struct ieee80211_rate *rates, int n_rates)
-{
-	int ret;
-
-	ret = mt76_phy_init(phy, phy->hw);
-	if (ret)
-		return ret;
-
-	if (phy->cap.has_2ghz) {
-		ret = mt76_init_sband_2g(phy, rates, n_rates);
-		if (ret)
-			return ret;
-	}
-
-	if (phy->cap.has_5ghz) {
-		ret = mt76_init_sband_5g(phy, rates + 4, n_rates - 4, vht);
-		if (ret)
-			return ret;
-	}
-
-	if (phy->cap.has_6ghz) {
-		ret = mt76_init_sband_6g(phy, rates + 4, n_rates - 4);
-		if (ret)
-			return ret;
-	}
-
-	wiphy_read_of_freq_limits(phy->hw->wiphy);
-	mt76_check_sband(phy, &phy->sband_2g, NL80211_BAND_2GHZ);
-	mt76_check_sband(phy, &phy->sband_5g, NL80211_BAND_5GHZ);
-	mt76_check_sband(phy, &phy->sband_6g, NL80211_BAND_6GHZ);
-
-	ret = ieee80211_register_hw(phy->hw);
-	if (ret)
-		return ret;
-
-	phy->dev->phys[phy->band_idx] = phy;
-
-	return 0;
-}
-EXPORT_SYMBOL_GPL(mt76_register_phy);
-
-void mt76_unregister_phy(struct mt76_phy *phy)
-{
-	struct mt76_dev *dev = phy->dev;
-
-	mt76_tx_status_check(dev, true);
-	ieee80211_unregister_hw(phy->hw);
-	dev->phys[phy->band_idx] = NULL;
-}
-EXPORT_SYMBOL_GPL(mt76_unregister_phy);
-
-struct mt76_dev *
-mt76_alloc_device(struct device *pdev, unsigned int size,
-		  const struct ieee80211_ops *ops,
-		  const struct mt76_driver_ops *drv_ops)
-{
-	struct ieee80211_hw *hw;
-	struct mt76_phy *phy;
-	struct mt76_dev *dev;
-	int i;
-
-	hw = ieee80211_alloc_hw(size, ops);
-	if (!hw)
-		return NULL;
-
-	dev = hw->priv;
-	dev->hw = hw;
-	dev->dev = pdev;
-	dev->drv = drv_ops;
-	dev->dma_dev = pdev;
-
-	phy = &dev->phy;
-	phy->dev = dev;
-	phy->hw = hw;
-	phy->band_idx = MT_BAND0;
-	dev->phys[phy->band_idx] = phy;
-
-	spin_lock_init(&dev->rx_lock);
-	spin_lock_init(&dev->lock);
-	spin_lock_init(&dev->cc_lock);
-	spin_lock_init(&dev->status_lock);
-	mutex_init(&dev->mutex);
-	init_waitqueue_head(&dev->tx_wait);
-
-	skb_queue_head_init(&dev->mcu.res_q);
-	init_waitqueue_head(&dev->mcu.wait);
-	mutex_init(&dev->mcu.mutex);
-	dev->tx_worker.fn = mt76_tx_worker;
-
-	hw->wiphy->flags |= WIPHY_FLAG_IBSS_RSN;
-	hw->wiphy->interface_modes =
-		BIT(NL80211_IFTYPE_STATION) |
-		BIT(NL80211_IFTYPE_AP) |
-#ifdef CONFIG_MAC80211_MESH
-		BIT(NL80211_IFTYPE_MESH_POINT) |
-#endif
-		BIT(NL80211_IFTYPE_P2P_CLIENT) |
-		BIT(NL80211_IFTYPE_P2P_GO) |
-		BIT(NL80211_IFTYPE_ADHOC);
-
-	spin_lock_init(&dev->token_lock);
-	idr_init(&dev->token);
-
-	INIT_LIST_HEAD(&dev->wcid_list);
-
-	INIT_LIST_HEAD(&dev->txwi_cache);
-	dev->token_size = dev->drv->token_size;
-
-	for (i = 0; i < ARRAY_SIZE(dev->q_rx); i++)
-		skb_queue_head_init(&dev->rx_skb[i]);
-
-	dev->wq = alloc_ordered_workqueue("mt76", 0);
-	if (!dev->wq) {
-		ieee80211_free_hw(hw);
-		return NULL;
-	}
-
-	return dev;
-}
-EXPORT_SYMBOL_GPL(mt76_alloc_device);
-
-int mt76_register_device(struct mt76_dev *dev, bool vht,
-			 struct ieee80211_rate *rates, int n_rates)
-{
-	struct ieee80211_hw *hw = dev->hw;
-	struct mt76_phy *phy = &dev->phy;
-	int ret;
-
-	dev_set_drvdata(dev->dev, dev);
-	ret = mt76_phy_init(phy, hw);
-	if (ret)
-		return ret;
-
-	if (phy->cap.has_2ghz) {
-		ret = mt76_init_sband_2g(phy, rates, n_rates);
-		if (ret)
-			return ret;
-	}
-
-	if (phy->cap.has_5ghz) {
-		ret = mt76_init_sband_5g(phy, rates + 4, n_rates - 4, vht);
-		if (ret)
-			return ret;
-	}
-
-	if (phy->cap.has_6ghz) {
-		ret = mt76_init_sband_6g(phy, rates + 4, n_rates - 4);
-		if (ret)
-			return ret;
-	}
-
-	wiphy_read_of_freq_limits(hw->wiphy);
-	mt76_check_sband(&dev->phy, &phy->sband_2g, NL80211_BAND_2GHZ);
-	mt76_check_sband(&dev->phy, &phy->sband_5g, NL80211_BAND_5GHZ);
-	mt76_check_sband(&dev->phy, &phy->sband_6g, NL80211_BAND_6GHZ);
-
-	if (IS_ENABLED(CONFIG_MT76_LEDS)) {
-		ret = mt76_led_init(dev);
-		if (ret)
-			return ret;
-	}
-
-	ret = ieee80211_register_hw(hw);
-	if (ret)
-		return ret;
-
-	WARN_ON(mt76_worker_setup(hw, &dev->tx_worker, NULL, "tx"));
-	sched_set_fifo_low(dev->tx_worker.task);
-
-	return 0;
-}
-EXPORT_SYMBOL_GPL(mt76_register_device);
-
-void mt76_unregister_device(struct mt76_dev *dev)
-{
-	struct ieee80211_hw *hw = dev->hw;
-
-	if (IS_ENABLED(CONFIG_MT76_LEDS))
-		mt76_led_cleanup(dev);
-	mt76_tx_status_check(dev, true);
-	ieee80211_unregister_hw(hw);
-}
-EXPORT_SYMBOL_GPL(mt76_unregister_device);
-
-void mt76_free_device(struct mt76_dev *dev)
-{
-	mt76_worker_teardown(&dev->tx_worker);
-	if (dev->wq) {
-		destroy_workqueue(dev->wq);
-		dev->wq = NULL;
-	}
-	ieee80211_free_hw(dev->hw);
-}
-EXPORT_SYMBOL_GPL(mt76_free_device);
-
-static void mt76_rx_release_amsdu(struct mt76_phy *phy, enum mt76_rxq_id q)
-{
-	struct sk_buff *skb = phy->rx_amsdu[q].head;
-	struct mt76_rx_status *status = (struct mt76_rx_status *)skb->cb;
-	struct mt76_dev *dev = phy->dev;
-
-	phy->rx_amsdu[q].head = NULL;
-	phy->rx_amsdu[q].tail = NULL;
-
-	/*
-	 * Validate if the amsdu has a proper first subframe.
-	 * A single MSDU can be parsed as A-MSDU when the unauthenticated A-MSDU
-	 * flag of the QoS header gets flipped. In such cases, the first
-	 * subframe has a LLC/SNAP header in the location of the destination
-	 * address.
-	 */
-	if (skb_shinfo(skb)->frag_list) {
-		int offset = 0;
-
-		if (!(status->flag & RX_FLAG_8023)) {
-			offset = ieee80211_get_hdrlen_from_skb(skb);
-
-			if ((status->flag &
-			     (RX_FLAG_DECRYPTED | RX_FLAG_IV_STRIPPED)) ==
-			    RX_FLAG_DECRYPTED)
-				offset += 8;
-		}
-
-		if (ether_addr_equal(skb->data + offset, rfc1042_header)) {
-			dev_kfree_skb(skb);
-			return;
-		}
-	}
-	__skb_queue_tail(&dev->rx_skb[q], skb);
-}
-
-static void mt76_rx_release_burst(struct mt76_phy *phy, enum mt76_rxq_id q,
-				  struct sk_buff *skb)
-{
-	struct mt76_rx_status *status = (struct mt76_rx_status *)skb->cb;
-
-	if (phy->rx_amsdu[q].head &&
-	    (!status->amsdu || status->first_amsdu ||
-	     status->seqno != phy->rx_amsdu[q].seqno))
-		mt76_rx_release_amsdu(phy, q);
-
-	if (!phy->rx_amsdu[q].head) {
-		phy->rx_amsdu[q].tail = &skb_shinfo(skb)->frag_list;
-		phy->rx_amsdu[q].seqno = status->seqno;
-		phy->rx_amsdu[q].head = skb;
-	} else {
-		*phy->rx_amsdu[q].tail = skb;
-		phy->rx_amsdu[q].tail = &skb->next;
-	}
-
-	if (!status->amsdu || status->last_amsdu)
-		mt76_rx_release_amsdu(phy, q);
-}
-
-void mt76_rx(struct mt76_dev *dev, enum mt76_rxq_id q, struct sk_buff *skb)
-{
-	struct mt76_rx_status *status = (struct mt76_rx_status *)skb->cb;
-	struct mt76_phy *phy = mt76_dev_phy(dev, status->phy_idx);
-
-	if (!test_bit(MT76_STATE_RUNNING, &phy->state)) {
-		dev_kfree_skb(skb);
-		return;
-	}
-
-#ifdef CONFIG_NL80211_TESTMODE
-	if (phy->test.state == MT76_TM_STATE_RX_FRAMES) {
-		phy->test.rx_stats.packets[q]++;
-		if (status->flag & RX_FLAG_FAILED_FCS_CRC)
-			phy->test.rx_stats.fcs_error[q]++;
-	}
-#endif
-
-	mt76_rx_release_burst(phy, q, skb);
-}
-EXPORT_SYMBOL_GPL(mt76_rx);
-
-bool mt76_has_tx_pending(struct mt76_phy *phy)
-{
-	struct mt76_queue *q;
-	int i;
-
-	for (i = 0; i < __MT_TXQ_MAX; i++) {
-		q = phy->q_tx[i];
-		if (q && q->queued)
-			return true;
-	}
-
-	return false;
-}
-EXPORT_SYMBOL_GPL(mt76_has_tx_pending);
-
-static struct mt76_channel_state *
-mt76_channel_state(struct mt76_phy *phy, struct ieee80211_channel *c)
-{
-	struct mt76_sband *msband;
-	int idx;
-
-	if (c->band == NL80211_BAND_2GHZ)
-		msband = &phy->sband_2g;
-	else if (c->band == NL80211_BAND_6GHZ)
-		msband = &phy->sband_6g;
-	else
-		msband = &phy->sband_5g;
-
-	idx = c - &msband->sband.channels[0];
-	return &msband->chan[idx];
-}
-
-void mt76_update_survey_active_time(struct mt76_phy *phy, ktime_t time)
-{
-	struct mt76_channel_state *state = phy->chan_state;
-
-	state->cc_active += ktime_to_us(ktime_sub(time,
-						  phy->survey_time));
-	phy->survey_time = time;
-}
-EXPORT_SYMBOL_GPL(mt76_update_survey_active_time);
-
-void mt76_update_survey(struct mt76_phy *phy)
-{
-	struct mt76_dev *dev = phy->dev;
-	ktime_t cur_time;
-
-	if (dev->drv->update_survey)
-		dev->drv->update_survey(phy);
-
-	cur_time = ktime_get_boottime();
-	mt76_update_survey_active_time(phy, cur_time);
-
-	if (dev->drv->drv_flags & MT_DRV_SW_RX_AIRTIME) {
-		struct mt76_channel_state *state = phy->chan_state;
-
-		spin_lock_bh(&dev->cc_lock);
-		state->cc_bss_rx += dev->cur_cc_bss_rx;
-		dev->cur_cc_bss_rx = 0;
-		spin_unlock_bh(&dev->cc_lock);
-	}
-}
-EXPORT_SYMBOL_GPL(mt76_update_survey);
-
-void mt76_set_channel(struct mt76_phy *phy)
-{
-	struct mt76_dev *dev = phy->dev;
-	struct ieee80211_hw *hw = phy->hw;
-	struct cfg80211_chan_def *chandef = &hw->conf.chandef;
-	bool offchannel = hw->conf.flags & IEEE80211_CONF_OFFCHANNEL;
-	int timeout = HZ / 5;
-
-	wait_event_timeout(dev->tx_wait, !mt76_has_tx_pending(phy), timeout);
-	mt76_update_survey(phy);
-
-	if (phy->chandef.chan->center_freq != chandef->chan->center_freq ||
-	    phy->chandef.width != chandef->width)
-		phy->dfs_state = MT_DFS_STATE_UNKNOWN;
-
-	phy->chandef = *chandef;
-	phy->chan_state = mt76_channel_state(phy, chandef->chan);
-
-	if (!offchannel)
-		phy->main_chan = chandef->chan;
-
-	if (chandef->chan != phy->main_chan)
-		memset(phy->chan_state, 0, sizeof(*phy->chan_state));
-}
-EXPORT_SYMBOL_GPL(mt76_set_channel);
-
-int mt76_get_survey(struct ieee80211_hw *hw, int idx,
-		    struct survey_info *survey)
-{
-	struct mt76_phy *phy = hw->priv;
-	struct mt76_dev *dev = phy->dev;
-	struct mt76_sband *sband;
-	struct ieee80211_channel *chan;
-	struct mt76_channel_state *state;
-	int ret = 0;
-
-	mutex_lock(&dev->mutex);
-	if (idx == 0 && dev->drv->update_survey)
-		mt76_update_survey(phy);
-
-	if (idx >= phy->sband_2g.sband.n_channels +
-		   phy->sband_5g.sband.n_channels) {
-		idx -= (phy->sband_2g.sband.n_channels +
-			phy->sband_5g.sband.n_channels);
-		sband = &phy->sband_6g;
-	} else if (idx >= phy->sband_2g.sband.n_channels) {
-		idx -= phy->sband_2g.sband.n_channels;
-		sband = &phy->sband_5g;
-	} else {
-		sband = &phy->sband_2g;
-	}
-
-	if (idx >= sband->sband.n_channels) {
-		ret = -ENOENT;
-		goto out;
-	}
-
-	chan = &sband->sband.channels[idx];
-	state = mt76_channel_state(phy, chan);
-
-	memset(survey, 0, sizeof(*survey));
-	survey->channel = chan;
-	survey->filled = SURVEY_INFO_TIME | SURVEY_INFO_TIME_BUSY;
-	survey->filled |= dev->drv->survey_flags;
-	if (state->noise)
-		survey->filled |= SURVEY_INFO_NOISE_DBM;
-
-	if (chan == phy->main_chan) {
-		survey->filled |= SURVEY_INFO_IN_USE;
-
-		if (dev->drv->drv_flags & MT_DRV_SW_RX_AIRTIME)
-			survey->filled |= SURVEY_INFO_TIME_BSS_RX;
-	}
-
-	survey->time_busy = div_u64(state->cc_busy, 1000);
-	survey->time_rx = div_u64(state->cc_rx, 1000);
-	survey->time = div_u64(state->cc_active, 1000);
-	survey->noise = state->noise;
-
-	spin_lock_bh(&dev->cc_lock);
-	survey->time_bss_rx = div_u64(state->cc_bss_rx, 1000);
-	survey->time_tx = div_u64(state->cc_tx, 1000);
-	spin_unlock_bh(&dev->cc_lock);
-
-out:
-	mutex_unlock(&dev->mutex);
-
-	return ret;
-}
-EXPORT_SYMBOL_GPL(mt76_get_survey);
-
-void mt76_wcid_key_setup(struct mt76_dev *dev, struct mt76_wcid *wcid,
-			 struct ieee80211_key_conf *key)
-{
-	struct ieee80211_key_seq seq;
-	int i;
-
-	wcid->rx_check_pn = false;
-
-	if (!key)
-		return;
-
-	if (key->cipher != WLAN_CIPHER_SUITE_CCMP)
-		return;
-
-	wcid->rx_check_pn = true;
-
-	/* data frame */
-	for (i = 0; i < IEEE80211_NUM_TIDS; i++) {
-		ieee80211_get_key_rx_seq(key, i, &seq);
-		memcpy(wcid->rx_key_pn[i], seq.ccmp.pn, sizeof(seq.ccmp.pn));
-	}
-
-	/* robust management frame */
-	ieee80211_get_key_rx_seq(key, -1, &seq);
-	memcpy(wcid->rx_key_pn[i], seq.ccmp.pn, sizeof(seq.ccmp.pn));
-
-}
-EXPORT_SYMBOL(mt76_wcid_key_setup);
-
-static int
-mt76_rx_signal(struct mt76_rx_status *status)
-{
-	s8 *chain_signal = status->chain_signal;
-	int signal = -128;
-	u8 chains;
-
-	for (chains = status->chains; chains; chains >>= 1, chain_signal++) {
-		int cur, diff;
-
-		cur = *chain_signal;
-		if (!(chains & BIT(0)) ||
-		    cur > 0)
-			continue;
-
-		if (cur > signal)
-			swap(cur, signal);
-
-		diff = signal - cur;
-		if (diff == 0)
-			signal += 3;
-		else if (diff <= 2)
-			signal += 2;
-		else if (diff <= 6)
-			signal += 1;
-	}
-
-	return signal;
-}
-
-static void
-mt76_rx_convert(struct mt76_dev *dev, struct sk_buff *skb,
-		struct ieee80211_hw **hw,
-		struct ieee80211_sta **sta)
-{
-	struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);
-	struct ieee80211_hdr *hdr = mt76_skb_get_hdr(skb);
-	struct mt76_rx_status mstat;
-
-	mstat = *((struct mt76_rx_status *)skb->cb);
-	memset(status, 0, sizeof(*status));
-
-	status->flag = mstat.flag;
-	status->freq = mstat.freq;
-	status->enc_flags = mstat.enc_flags;
-	status->encoding = mstat.encoding;
-	status->bw = mstat.bw;
-	status->he_ru = mstat.he_ru;
-	status->he_gi = mstat.he_gi;
-	status->he_dcm = mstat.he_dcm;
-	status->rate_idx = mstat.rate_idx;
-	status->nss = mstat.nss;
-	status->band = mstat.band;
-	status->signal = mstat.signal;
-	status->chains = mstat.chains;
-	status->ampdu_reference = mstat.ampdu_ref;
-	status->device_timestamp = mstat.timestamp;
-	status->mactime = mstat.timestamp;
-	status->signal = mt76_rx_signal(&mstat);
-	if (status->signal <= -128)
-		status->flag |= RX_FLAG_NO_SIGNAL_VAL;
-
-	if (ieee80211_is_beacon(hdr->frame_control) ||
-	    ieee80211_is_probe_resp(hdr->frame_control))
-		status->boottime_ns = ktime_get_boottime_ns();
-
-	BUILD_BUG_ON(sizeof(mstat) > sizeof(skb->cb));
-	BUILD_BUG_ON(sizeof(status->chain_signal) !=
-		     sizeof(mstat.chain_signal));
-	memcpy(status->chain_signal, mstat.chain_signal,
-	       sizeof(mstat.chain_signal));
-
-	*sta = wcid_to_sta(mstat.wcid);
-	*hw = mt76_phy_hw(dev, mstat.phy_idx);
-}
-
-static void
-mt76_check_ccmp_pn(struct sk_buff *skb)
-{
-	struct mt76_rx_status *status = (struct mt76_rx_status *)skb->cb;
-	struct mt76_wcid *wcid = status->wcid;
-	struct ieee80211_hdr *hdr;
-	int security_idx;
-	int ret;
-
-	if (!(status->flag & RX_FLAG_DECRYPTED))
-		return;
-
-	if (status->flag & RX_FLAG_ONLY_MONITOR)
-		return;
-
-	if (!wcid || !wcid->rx_check_pn)
-		return;
-
-	security_idx = status->qos_ctl & IEEE80211_QOS_CTL_TID_MASK;
-	if (status->flag & RX_FLAG_8023)
-		goto skip_hdr_check;
-
-	hdr = mt76_skb_get_hdr(skb);
-	if (!(status->flag & RX_FLAG_IV_STRIPPED)) {
-		/*
-		 * Validate the first fragment both here and in mac80211
-		 * All further fragments will be validated by mac80211 only.
-		 */
-		if (ieee80211_is_frag(hdr) &&
-		    !ieee80211_is_first_frag(hdr->frame_control))
-			return;
-	}
-
-	/* IEEE 802.11-2020, 12.5.3.4.4 "PN and replay detection" c):
-	 *
-	 * the recipient shall maintain a single replay counter for received
-	 * individually addressed robust Management frames that are received
-	 * with the To DS subfield equal to 0, [...]
-	 */
-	if (ieee80211_is_mgmt(hdr->frame_control) &&
-	    !ieee80211_has_tods(hdr->frame_control))
-		security_idx = IEEE80211_NUM_TIDS;
-
-skip_hdr_check:
-	BUILD_BUG_ON(sizeof(status->iv) != sizeof(wcid->rx_key_pn[0]));
-	ret = memcmp(status->iv, wcid->rx_key_pn[security_idx],
-		     sizeof(status->iv));
-	if (ret <= 0) {
-		status->flag |= RX_FLAG_ONLY_MONITOR;
-		return;
-	}
-
-	memcpy(wcid->rx_key_pn[security_idx], status->iv, sizeof(status->iv));
-
-	if (status->flag & RX_FLAG_IV_STRIPPED)
-		status->flag |= RX_FLAG_PN_VALIDATED;
-}
-
-static void
-mt76_airtime_report(struct mt76_dev *dev, struct mt76_rx_status *status,
-		    int len)
-{
-	struct mt76_wcid *wcid = status->wcid;
-	struct ieee80211_rx_status info = {
-		.enc_flags = status->enc_flags,
-		.rate_idx = status->rate_idx,
-		.encoding = status->encoding,
-		.band = status->band,
-		.nss = status->nss,
-		.bw = status->bw,
-	};
-	struct ieee80211_sta *sta;
-	u32 airtime;
-	u8 tidno = status->qos_ctl & IEEE80211_QOS_CTL_TID_MASK;
-
-	airtime = ieee80211_calc_rx_airtime(dev->hw, &info, len);
-	spin_lock(&dev->cc_lock);
-	dev->cur_cc_bss_rx += airtime;
-	spin_unlock(&dev->cc_lock);
-
-	if (!wcid || !wcid->sta)
-		return;
-
-	sta = container_of((void *)wcid, struct ieee80211_sta, drv_priv);
-	ieee80211_sta_register_airtime(sta, tidno, 0, airtime);
-}
-
-static void
-mt76_airtime_flush_ampdu(struct mt76_dev *dev)
-{
-	struct mt76_wcid *wcid;
-	int wcid_idx;
-
-	if (!dev->rx_ampdu_len)
-		return;
-
-	wcid_idx = dev->rx_ampdu_status.wcid_idx;
-	if (wcid_idx < ARRAY_SIZE(dev->wcid))
-		wcid = rcu_dereference(dev->wcid[wcid_idx]);
-	else
-		wcid = NULL;
-	dev->rx_ampdu_status.wcid = wcid;
-
-	mt76_airtime_report(dev, &dev->rx_ampdu_status, dev->rx_ampdu_len);
-
-	dev->rx_ampdu_len = 0;
-	dev->rx_ampdu_ref = 0;
-}
-
-static void
-mt76_airtime_check(struct mt76_dev *dev, struct sk_buff *skb)
-{
-	struct mt76_rx_status *status = (struct mt76_rx_status *)skb->cb;
-	struct mt76_wcid *wcid = status->wcid;
-
-	if (!(dev->drv->drv_flags & MT_DRV_SW_RX_AIRTIME))
-		return;
-
-	if (!wcid || !wcid->sta) {
-		struct ieee80211_hdr *hdr = mt76_skb_get_hdr(skb);
-
-		if (status->flag & RX_FLAG_8023)
-			return;
-
-		if (!ether_addr_equal(hdr->addr1, dev->phy.macaddr))
-			return;
-
-		wcid = NULL;
-	}
-
-	if (!(status->flag & RX_FLAG_AMPDU_DETAILS) ||
-	    status->ampdu_ref != dev->rx_ampdu_ref)
-		mt76_airtime_flush_ampdu(dev);
-
-	if (status->flag & RX_FLAG_AMPDU_DETAILS) {
-		if (!dev->rx_ampdu_len ||
-		    status->ampdu_ref != dev->rx_ampdu_ref) {
-			dev->rx_ampdu_status = *status;
-			dev->rx_ampdu_status.wcid_idx = wcid ? wcid->idx : 0xff;
-			dev->rx_ampdu_ref = status->ampdu_ref;
-		}
-
-		dev->rx_ampdu_len += skb->len;
-		return;
-	}
-
-	mt76_airtime_report(dev, status, skb->len);
-}
-
-static void
-mt76_check_sta(struct mt76_dev *dev, struct sk_buff *skb)
-{
-	struct mt76_rx_status *status = (struct mt76_rx_status *)skb->cb;
-	struct ieee80211_hdr *hdr = mt76_skb_get_hdr(skb);
-	struct ieee80211_sta *sta;
-	struct ieee80211_hw *hw;
-	struct mt76_wcid *wcid = status->wcid;
-	u8 tidno = status->qos_ctl & IEEE80211_QOS_CTL_TID_MASK;
-	bool ps;
-
-	hw = mt76_phy_hw(dev, status->phy_idx);
-	if (ieee80211_is_pspoll(hdr->frame_control) && !wcid &&
-	    !(status->flag & RX_FLAG_8023)) {
-		sta = ieee80211_find_sta_by_ifaddr(hw, hdr->addr2, NULL);
-		if (sta)
-			wcid = status->wcid = (struct mt76_wcid *)sta->drv_priv;
-	}
-
-	mt76_airtime_check(dev, skb);
-
-	if (!wcid || !wcid->sta)
-		return;
-
-	sta = container_of((void *)wcid, struct ieee80211_sta, drv_priv);
-
-	if (status->signal <= 0)
-		ewma_signal_add(&wcid->rssi, -status->signal);
-
-	wcid->inactive_count = 0;
-
-	if (status->flag & RX_FLAG_8023)
-		return;
-
-	if (!test_bit(MT_WCID_FLAG_CHECK_PS, &wcid->flags))
-		return;
-
-	if (ieee80211_is_pspoll(hdr->frame_control)) {
-		ieee80211_sta_pspoll(sta);
-		return;
-	}
-
-	if (ieee80211_has_morefrags(hdr->frame_control) ||
-	    !(ieee80211_is_mgmt(hdr->frame_control) ||
-	      ieee80211_is_data(hdr->frame_control)))
-		return;
-
-	ps = ieee80211_has_pm(hdr->frame_control);
-
-	if (ps && (ieee80211_is_data_qos(hdr->frame_control) ||
-		   ieee80211_is_qos_nullfunc(hdr->frame_control)))
-		ieee80211_sta_uapsd_trigger(sta, tidno);
-
-	if (!!test_bit(MT_WCID_FLAG_PS, &wcid->flags) == ps)
-		return;
-
-	if (ps)
-		set_bit(MT_WCID_FLAG_PS, &wcid->flags);
-
-	dev->drv->sta_ps(dev, sta, ps);
-
-	if (!ps)
-		clear_bit(MT_WCID_FLAG_PS, &wcid->flags);
-
-	ieee80211_sta_ps_transition(sta, ps);
-}
-
-void mt76_rx_complete(struct mt76_dev *dev, struct sk_buff_head *frames,
-		      struct napi_struct *napi)
-{
-	struct ieee80211_sta *sta;
-	struct ieee80211_hw *hw;
-	struct sk_buff *skb, *tmp;
-	LIST_HEAD(list);
-
-	spin_lock(&dev->rx_lock);
-	while ((skb = __skb_dequeue(frames)) != NULL) {
-		struct sk_buff *nskb = skb_shinfo(skb)->frag_list;
-
-		mt76_check_ccmp_pn(skb);
-		skb_shinfo(skb)->frag_list = NULL;
-		mt76_rx_convert(dev, skb, &hw, &sta);
-		ieee80211_rx_list(hw, sta, skb, &list);
-
-		/* subsequent amsdu frames */
-		while (nskb) {
-			skb = nskb;
-			nskb = nskb->next;
-			skb->next = NULL;
-
-			mt76_rx_convert(dev, skb, &hw, &sta);
-			ieee80211_rx_list(hw, sta, skb, &list);
-		}
-	}
-	spin_unlock(&dev->rx_lock);
-
-	if (!napi) {
-		netif_receive_skb_list(&list);
-		return;
-	}
-
-	list_for_each_entry_safe(skb, tmp, &list, list) {
-		skb_list_del_init(skb);
-		napi_gro_receive(napi, skb);
-	}
-}
-
-void mt76_rx_poll_complete(struct mt76_dev *dev, enum mt76_rxq_id q,
-			   struct napi_struct *napi)
-{
-	struct sk_buff_head frames;
-	struct sk_buff *skb;
-
-	__skb_queue_head_init(&frames);
-
-	while ((skb = __skb_dequeue(&dev->rx_skb[q])) != NULL) {
-		mt76_check_sta(dev, skb);
-		mt76_rx_aggr_reorder(skb, &frames);
-	}
-
-	mt76_rx_complete(dev, &frames, napi);
-}
-EXPORT_SYMBOL_GPL(mt76_rx_poll_complete);
-
-static int
-mt76_sta_add(struct mt76_phy *phy, struct ieee80211_vif *vif,
-	     struct ieee80211_sta *sta)
-{
-	struct mt76_wcid *wcid = (struct mt76_wcid *)sta->drv_priv;
-	struct mt76_dev *dev = phy->dev;
-	int ret;
-	int i;
-
-	mutex_lock(&dev->mutex);
-
-	ret = dev->drv->sta_add(dev, vif, sta);
-	if (ret)
-		goto out;
-
-	for (i = 0; i < ARRAY_SIZE(sta->txq); i++) {
-		struct mt76_txq *mtxq;
-
-		if (!sta->txq[i])
-			continue;
-
-		mtxq = (struct mt76_txq *)sta->txq[i]->drv_priv;
-		mtxq->wcid = wcid->idx;
-	}
-
-	ewma_signal_init(&wcid->rssi);
-	if (phy->band_idx == MT_BAND1)
-		mt76_wcid_mask_set(dev->wcid_phy_mask, wcid->idx);
-	wcid->phy_idx = phy->band_idx;
-	rcu_assign_pointer(dev->wcid[wcid->idx], wcid);
-
-	mt76_packet_id_init(wcid);
-out:
-	mutex_unlock(&dev->mutex);
-
-	return ret;
-}
-
-void __mt76_sta_remove(struct mt76_dev *dev, struct ieee80211_vif *vif,
-		       struct ieee80211_sta *sta)
-{
-	struct mt76_wcid *wcid = (struct mt76_wcid *)sta->drv_priv;
-	int i, idx = wcid->idx;
-
-	for (i = 0; i < ARRAY_SIZE(wcid->aggr); i++)
-		mt76_rx_aggr_stop(dev, wcid, i);
-
-	if (dev->drv->sta_remove)
-		dev->drv->sta_remove(dev, vif, sta);
-
-	mt76_packet_id_flush(dev, wcid);
-
-	mt76_wcid_mask_clear(dev->wcid_mask, idx);
-	mt76_wcid_mask_clear(dev->wcid_phy_mask, idx);
-}
-EXPORT_SYMBOL_GPL(__mt76_sta_remove);
-
-static void
-mt76_sta_remove(struct mt76_dev *dev, struct ieee80211_vif *vif,
-		struct ieee80211_sta *sta)
-{
-	mutex_lock(&dev->mutex);
-	__mt76_sta_remove(dev, vif, sta);
-	mutex_unlock(&dev->mutex);
-}
-
-int mt76_sta_state(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
-		   struct ieee80211_sta *sta,
-		   enum ieee80211_sta_state old_state,
-		   enum ieee80211_sta_state new_state)
-{
-	struct mt76_phy *phy = hw->priv;
-	struct mt76_dev *dev = phy->dev;
-
-	if (old_state == IEEE80211_STA_NOTEXIST &&
-	    new_state == IEEE80211_STA_NONE)
-		return mt76_sta_add(phy, vif, sta);
-
-	if (old_state == IEEE80211_STA_AUTH &&
-	    new_state == IEEE80211_STA_ASSOC &&
-	    dev->drv->sta_assoc)
-		dev->drv->sta_assoc(dev, vif, sta);
-
-	if (old_state == IEEE80211_STA_NONE &&
-	    new_state == IEEE80211_STA_NOTEXIST)
-		mt76_sta_remove(dev, vif, sta);
-
-	return 0;
-}
-EXPORT_SYMBOL_GPL(mt76_sta_state);
-
-void mt76_sta_pre_rcu_remove(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
-			     struct ieee80211_sta *sta)
-{
-	struct mt76_phy *phy = hw->priv;
-	struct mt76_dev *dev = phy->dev;
-	struct mt76_wcid *wcid = (struct mt76_wcid *)sta->drv_priv;
-
-	mutex_lock(&dev->mutex);
-	spin_lock_bh(&dev->status_lock);
-	rcu_assign_pointer(dev->wcid[wcid->idx], NULL);
-	spin_unlock_bh(&dev->status_lock);
-	mutex_unlock(&dev->mutex);
-}
-EXPORT_SYMBOL_GPL(mt76_sta_pre_rcu_remove);
-
-int mt76_get_txpower(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
-		     int *dbm)
-{
-	struct mt76_phy *phy = hw->priv;
-	int n_chains = hweight8(phy->antenna_mask);
-	int delta = mt76_tx_power_nss_delta(n_chains);
-
-	*dbm = DIV_ROUND_UP(phy->txpower_cur + delta, 2);
-
-	return 0;
-}
-EXPORT_SYMBOL_GPL(mt76_get_txpower);
-
-int mt76_init_sar_power(struct ieee80211_hw *hw,
-			const struct cfg80211_sar_specs *sar)
-{
-	struct mt76_phy *phy = hw->priv;
-	const struct cfg80211_sar_capa *capa = hw->wiphy->sar_capa;
-	int i;
-
-	if (sar->type != NL80211_SAR_TYPE_POWER || !sar->num_sub_specs)
-		return -EINVAL;
-
-	for (i = 0; i < sar->num_sub_specs; i++) {
-		u32 index = sar->sub_specs[i].freq_range_index;
-		/* SAR specifies power limitaton in 0.25dbm */
-		s32 power = sar->sub_specs[i].power >> 1;
-
-		if (power > 127 || power < -127)
-			power = 127;
-
-		phy->frp[index].range = &capa->freq_ranges[index];
-		phy->frp[index].power = power;
-	}
-
-	return 0;
-}
-EXPORT_SYMBOL_GPL(mt76_init_sar_power);
-
-int mt76_get_sar_power(struct mt76_phy *phy,
-		       struct ieee80211_channel *chan,
-		       int power)
-{
-	const struct cfg80211_sar_capa *capa = phy->hw->wiphy->sar_capa;
-	int freq, i;
-
-	if (!capa || !phy->frp)
-		return power;
-
-	if (power > 127 || power < -127)
-		power = 127;
-
-	freq = ieee80211_channel_to_frequency(chan->hw_value, chan->band);
-	for (i = 0 ; i < capa->num_freq_ranges; i++) {
-		if (phy->frp[i].range &&
-		    freq >= phy->frp[i].range->start_freq &&
-		    freq < phy->frp[i].range->end_freq) {
-			power = min_t(int, phy->frp[i].power, power);
-			break;
-		}
-	}
-
-	return power;
-}
-EXPORT_SYMBOL_GPL(mt76_get_sar_power);
-
-static void
-__mt76_csa_finish(void *priv, u8 *mac, struct ieee80211_vif *vif)
-{
-	if (vif->csa_active && ieee80211_beacon_cntdwn_is_complete(vif))
-		ieee80211_csa_finish(vif);
-}
-
-void mt76_csa_finish(struct mt76_dev *dev)
-{
-	if (!dev->csa_complete)
-		return;
-
-	ieee80211_iterate_active_interfaces_atomic(dev->hw,
-		IEEE80211_IFACE_ITER_RESUME_ALL,
-		__mt76_csa_finish, dev);
-
-	dev->csa_complete = 0;
-}
-EXPORT_SYMBOL_GPL(mt76_csa_finish);
-
-static void
-__mt76_csa_check(void *priv, u8 *mac, struct ieee80211_vif *vif)
-{
-	struct mt76_dev *dev = priv;
-
-	if (!vif->csa_active)
-		return;
-
-	dev->csa_complete |= ieee80211_beacon_cntdwn_is_complete(vif);
-}
-
-void mt76_csa_check(struct mt76_dev *dev)
-{
-	ieee80211_iterate_active_interfaces_atomic(dev->hw,
-		IEEE80211_IFACE_ITER_RESUME_ALL,
-		__mt76_csa_check, dev);
-}
-EXPORT_SYMBOL_GPL(mt76_csa_check);
-
-int
-mt76_set_tim(struct ieee80211_hw *hw, struct ieee80211_sta *sta, bool set)
-{
-	return 0;
-}
-EXPORT_SYMBOL_GPL(mt76_set_tim);
-
-void mt76_insert_ccmp_hdr(struct sk_buff *skb, u8 key_id)
-{
-	struct mt76_rx_status *status = (struct mt76_rx_status *)skb->cb;
-	int hdr_len = ieee80211_get_hdrlen_from_skb(skb);
-	u8 *hdr, *pn = status->iv;
-
-	__skb_push(skb, 8);
-	memmove(skb->data, skb->data + 8, hdr_len);
-	hdr = skb->data + hdr_len;
-
-	hdr[0] = pn[5];
-	hdr[1] = pn[4];
-	hdr[2] = 0;
-	hdr[3] = 0x20 | (key_id << 6);
-	hdr[4] = pn[3];
-	hdr[5] = pn[2];
-	hdr[6] = pn[1];
-	hdr[7] = pn[0];
-
-	status->flag &= ~RX_FLAG_IV_STRIPPED;
-}
-EXPORT_SYMBOL_GPL(mt76_insert_ccmp_hdr);
-
-int mt76_get_rate(struct mt76_dev *dev,
-		  struct ieee80211_supported_band *sband,
-		  int idx, bool cck)
-{
-	int i, offset = 0, len = sband->n_bitrates;
-
-	if (cck) {
-		if (sband != &dev->phy.sband_2g.sband)
-			return 0;
-
-		idx &= ~BIT(2); /* short preamble */
-	} else if (sband == &dev->phy.sband_2g.sband) {
-		offset = 4;
-	}
-
-	for (i = offset; i < len; i++) {
-		if ((sband->bitrates[i].hw_value & GENMASK(7, 0)) == idx)
-			return i;
-	}
-
-	return 0;
-}
-EXPORT_SYMBOL_GPL(mt76_get_rate);
-
-void mt76_sw_scan(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
-		  const u8 *mac)
-{
-	struct mt76_phy *phy = hw->priv;
-
-	set_bit(MT76_SCANNING, &phy->state);
-}
-EXPORT_SYMBOL_GPL(mt76_sw_scan);
-
-void mt76_sw_scan_complete(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
-{
-	struct mt76_phy *phy = hw->priv;
-
-	clear_bit(MT76_SCANNING, &phy->state);
-}
-EXPORT_SYMBOL_GPL(mt76_sw_scan_complete);
-
-int mt76_get_antenna(struct ieee80211_hw *hw, u32 *tx_ant, u32 *rx_ant)
-{
-	struct mt76_phy *phy = hw->priv;
-	struct mt76_dev *dev = phy->dev;
-
-	mutex_lock(&dev->mutex);
-	*tx_ant = phy->antenna_mask;
-	*rx_ant = phy->antenna_mask;
-	mutex_unlock(&dev->mutex);
-
-	return 0;
-}
-EXPORT_SYMBOL_GPL(mt76_get_antenna);
-
-struct mt76_queue *
-mt76_init_queue(struct mt76_dev *dev, int qid, int idx, int n_desc,
-		int ring_base)
-{
-	struct mt76_queue *hwq;
-	int err;
-
-	hwq = devm_kzalloc(dev->dev, sizeof(*hwq), GFP_KERNEL);
-	if (!hwq)
-		return ERR_PTR(-ENOMEM);
-
-	err = dev->queue_ops->alloc(dev, hwq, idx, n_desc, 0, ring_base);
-	if (err < 0)
-		return ERR_PTR(err);
-
-	return hwq;
-}
-EXPORT_SYMBOL_GPL(mt76_init_queue);
-
-u16 mt76_calculate_default_rate(struct mt76_phy *phy, int rateidx)
-{
-	int offset = 0;
-
-	if (phy->chandef.chan->band != NL80211_BAND_2GHZ)
-		offset = 4;
-
-	/* pick the lowest rate for hidden nodes */
-	if (rateidx < 0)
-		rateidx = 0;
-
-	rateidx += offset;
-	if (rateidx >= ARRAY_SIZE(mt76_rates))
-		rateidx = offset;
-
-	return mt76_rates[rateidx].hw_value;
-}
-EXPORT_SYMBOL_GPL(mt76_calculate_default_rate);
-
-void mt76_ethtool_worker(struct mt76_ethtool_worker_info *wi,
-			 struct mt76_sta_stats *stats)
-{
-	int i, ei = wi->initial_stat_idx;
-	u64 *data = wi->data;
-
-	wi->sta_count++;
-
-	data[ei++] += stats->tx_mode[MT_PHY_TYPE_CCK];
-	data[ei++] += stats->tx_mode[MT_PHY_TYPE_OFDM];
-	data[ei++] += stats->tx_mode[MT_PHY_TYPE_HT];
-	data[ei++] += stats->tx_mode[MT_PHY_TYPE_HT_GF];
-	data[ei++] += stats->tx_mode[MT_PHY_TYPE_VHT];
-	data[ei++] += stats->tx_mode[MT_PHY_TYPE_HE_SU];
-	data[ei++] += stats->tx_mode[MT_PHY_TYPE_HE_EXT_SU];
-	data[ei++] += stats->tx_mode[MT_PHY_TYPE_HE_TB];
-	data[ei++] += stats->tx_mode[MT_PHY_TYPE_HE_MU];
-
-	for (i = 0; i < ARRAY_SIZE(stats->tx_bw); i++)
-		data[ei++] += stats->tx_bw[i];
-
-	for (i = 0; i < 12; i++)
-		data[ei++] += stats->tx_mcs[i];
-
-	wi->worker_stat_count = ei - wi->initial_stat_idx;
-}
-EXPORT_SYMBOL_GPL(mt76_ethtool_worker);
-
-enum mt76_dfs_state mt76_phy_dfs_state(struct mt76_phy *phy)
-{
-	struct ieee80211_hw *hw = phy->hw;
-	struct mt76_dev *dev = phy->dev;
-
-	if (dev->region == NL80211_DFS_UNSET ||
-	    test_bit(MT76_SCANNING, &phy->state))
-		return MT_DFS_STATE_DISABLED;
-
-	if (!hw->conf.radar_enabled) {
-		if ((hw->conf.flags & IEEE80211_CONF_MONITOR) &&
-		    (phy->chandef.chan->flags & IEEE80211_CHAN_RADAR))
-			return MT_DFS_STATE_ACTIVE;
-
-		return MT_DFS_STATE_DISABLED;
-	}
-
-	if (!cfg80211_reg_can_beacon(hw->wiphy, &phy->chandef, NL80211_IFTYPE_AP))
-		return MT_DFS_STATE_CAC;
-
-	return MT_DFS_STATE_ACTIVE;
-}
-EXPORT_SYMBOL_GPL(mt76_phy_dfs_state);
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mcu.c b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mcu.c
deleted file mode 100644
index a8cafa3..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mcu.c
+++ /dev/null
@@ -1,134 +0,0 @@
-// SPDX-License-Identifier: ISC
-/*
- * Copyright (C) 2019 Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
- */
-
-#include "mt76.h"
-
-struct sk_buff *
-__mt76_mcu_msg_alloc(struct mt76_dev *dev, const void *data,
-		     int len, int data_len, gfp_t gfp)
-{
-	const struct mt76_mcu_ops *ops = dev->mcu_ops;
-	struct sk_buff *skb;
-
-	len = max_t(int, len, data_len);
-	len = ops->headroom + len + ops->tailroom;
-
-	skb = alloc_skb(len, gfp);
-	if (!skb)
-		return NULL;
-
-	memset(skb->head, 0, len);
-	skb_reserve(skb, ops->headroom);
-
-	if (data && data_len)
-		skb_put_data(skb, data, data_len);
-
-	return skb;
-}
-EXPORT_SYMBOL_GPL(__mt76_mcu_msg_alloc);
-
-struct sk_buff *mt76_mcu_get_response(struct mt76_dev *dev,
-				      unsigned long expires)
-{
-	unsigned long timeout;
-
-	if (!time_is_after_jiffies(expires))
-		return NULL;
-
-	timeout = expires - jiffies;
-	wait_event_timeout(dev->mcu.wait,
-			   (!skb_queue_empty(&dev->mcu.res_q) ||
-			    test_bit(MT76_MCU_RESET, &dev->phy.state)),
-			   timeout);
-	return skb_dequeue(&dev->mcu.res_q);
-}
-EXPORT_SYMBOL_GPL(mt76_mcu_get_response);
-
-void mt76_mcu_rx_event(struct mt76_dev *dev, struct sk_buff *skb)
-{
-	skb_queue_tail(&dev->mcu.res_q, skb);
-	wake_up(&dev->mcu.wait);
-}
-EXPORT_SYMBOL_GPL(mt76_mcu_rx_event);
-
-int mt76_mcu_send_and_get_msg(struct mt76_dev *dev, int cmd, const void *data,
-			      int len, bool wait_resp, struct sk_buff **ret_skb)
-{
-	struct sk_buff *skb;
-
-	if (dev->mcu_ops->mcu_send_msg)
-		return dev->mcu_ops->mcu_send_msg(dev, cmd, data, len, wait_resp);
-
-	skb = mt76_mcu_msg_alloc(dev, data, len);
-	if (!skb)
-		return -ENOMEM;
-
-	return mt76_mcu_skb_send_and_get_msg(dev, skb, cmd, wait_resp, ret_skb);
-}
-EXPORT_SYMBOL_GPL(mt76_mcu_send_and_get_msg);
-
-int mt76_mcu_skb_send_and_get_msg(struct mt76_dev *dev, struct sk_buff *skb,
-				  int cmd, bool wait_resp,
-				  struct sk_buff **ret_skb)
-{
-	unsigned long expires;
-	int ret, seq;
-
-	if (ret_skb)
-		*ret_skb = NULL;
-
-	mutex_lock(&dev->mcu.mutex);
-
-	ret = dev->mcu_ops->mcu_skb_send_msg(dev, skb, cmd, &seq);
-	if (ret < 0)
-		goto out;
-
-	if (!wait_resp) {
-		ret = 0;
-		goto out;
-	}
-
-	expires = jiffies + dev->mcu.timeout;
-
-	do {
-		skb = mt76_mcu_get_response(dev, expires);
-		ret = dev->mcu_ops->mcu_parse_response(dev, cmd, skb, seq);
-		if (!ret && ret_skb)
-			*ret_skb = skb;
-		else
-			dev_kfree_skb(skb);
-	} while (ret == -EAGAIN);
-
-out:
-	mutex_unlock(&dev->mcu.mutex);
-
-	return ret;
-}
-EXPORT_SYMBOL_GPL(mt76_mcu_skb_send_and_get_msg);
-
-int __mt76_mcu_send_firmware(struct mt76_dev *dev, int cmd, const void *data,
-			     int len, int max_len)
-{
-	int err, cur_len;
-
-	while (len > 0) {
-		cur_len = min_t(int, max_len, len);
-
-		err = mt76_mcu_send_msg(dev, cmd, data, cur_len, false);
-		if (err)
-			return err;
-
-		data += cur_len;
-		len -= cur_len;
-
-		if (dev->queue_ops->tx_cleanup)
-			dev->queue_ops->tx_cleanup(dev,
-						   dev->q_mcu[MT_MCUQ_FWDL],
-						   false);
-	}
-
-	return 0;
-}
-EXPORT_SYMBOL_GPL(__mt76_mcu_send_firmware);
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mmio.c b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mmio.c
deleted file mode 100644
index 26353b6..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mmio.c
+++ /dev/null
@@ -1,100 +0,0 @@
-// SPDX-License-Identifier: ISC
-/*
- * Copyright (C) 2016 Felix Fietkau <nbd@nbd.name>
- */
-
-#include "mt76.h"
-#include "trace.h"
-
-static u32 mt76_mmio_rr(struct mt76_dev *dev, u32 offset)
-{
-	u32 val;
-
-	val = readl(dev->mmio.regs + offset);
-	trace_reg_rr(dev, offset, val);
-
-	return val;
-}
-
-static void mt76_mmio_wr(struct mt76_dev *dev, u32 offset, u32 val)
-{
-	trace_reg_wr(dev, offset, val);
-	writel(val, dev->mmio.regs + offset);
-}
-
-static u32 mt76_mmio_rmw(struct mt76_dev *dev, u32 offset, u32 mask, u32 val)
-{
-	val |= mt76_mmio_rr(dev, offset) & ~mask;
-	mt76_mmio_wr(dev, offset, val);
-	return val;
-}
-
-static void mt76_mmio_write_copy(struct mt76_dev *dev, u32 offset,
-				 const void *data, int len)
-{
-	__iowrite32_copy(dev->mmio.regs + offset, data, DIV_ROUND_UP(len, 4));
-}
-
-static void mt76_mmio_read_copy(struct mt76_dev *dev, u32 offset,
-				void *data, int len)
-{
-	__ioread32_copy(data, dev->mmio.regs + offset, DIV_ROUND_UP(len, 4));
-}
-
-static int mt76_mmio_wr_rp(struct mt76_dev *dev, u32 base,
-			   const struct mt76_reg_pair *data, int len)
-{
-	while (len > 0) {
-		mt76_mmio_wr(dev, data->reg, data->value);
-		data++;
-		len--;
-	}
-
-	return 0;
-}
-
-static int mt76_mmio_rd_rp(struct mt76_dev *dev, u32 base,
-			   struct mt76_reg_pair *data, int len)
-{
-	while (len > 0) {
-		data->value = mt76_mmio_rr(dev, data->reg);
-		data++;
-		len--;
-	}
-
-	return 0;
-}
-
-void mt76_set_irq_mask(struct mt76_dev *dev, u32 addr,
-		       u32 clear, u32 set)
-{
-	unsigned long flags;
-
-	spin_lock_irqsave(&dev->mmio.irq_lock, flags);
-	dev->mmio.irqmask &= ~clear;
-	dev->mmio.irqmask |= set;
-	if (addr)
-		mt76_mmio_wr(dev, addr, dev->mmio.irqmask);
-	spin_unlock_irqrestore(&dev->mmio.irq_lock, flags);
-}
-EXPORT_SYMBOL_GPL(mt76_set_irq_mask);
-
-void mt76_mmio_init(struct mt76_dev *dev, void __iomem *regs)
-{
-	static const struct mt76_bus_ops mt76_mmio_ops = {
-		.rr = mt76_mmio_rr,
-		.rmw = mt76_mmio_rmw,
-		.wr = mt76_mmio_wr,
-		.write_copy = mt76_mmio_write_copy,
-		.read_copy = mt76_mmio_read_copy,
-		.wr_rp = mt76_mmio_wr_rp,
-		.rd_rp = mt76_mmio_rd_rp,
-		.type = MT76_BUS_MMIO,
-	};
-
-	dev->bus = &mt76_mmio_ops;
-	dev->mmio.regs = regs;
-
-	spin_lock_init(&dev->mmio.irq_lock);
-}
-EXPORT_SYMBOL_GPL(mt76_mmio_init);
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt76.h b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt76.h
deleted file mode 100644
index 232b1f4..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt76.h
+++ /dev/null
@@ -1,1426 +0,0 @@
-/* SPDX-License-Identifier: ISC */
-/*
- * Copyright (C) 2016 Felix Fietkau <nbd@nbd.name>
- */
-
-#ifndef __MT76_H
-#define __MT76_H
-
-#include <linux/kernel.h>
-#include <linux/io.h>
-#include <linux/spinlock.h>
-#include <linux/skbuff.h>
-#include <linux/leds.h>
-#include <linux/usb.h>
-#include <linux/average.h>
-#include <net/mac80211.h>
-#include "util.h"
-#include "testmode.h"
-
-#define MT_MCU_RING_SIZE	32
-#define MT_RX_BUF_SIZE		2048
-#define MT_SKB_HEAD_LEN		256
-
-#define MT_MAX_NON_AQL_PKT	16
-#define MT_TXQ_FREE_THR		32
-
-#define MT76_TOKEN_FREE_THR	64
-
-struct mt76_dev;
-struct mt76_phy;
-struct mt76_wcid;
-struct mt76s_intr;
-
-struct mt76_reg_pair {
-	u32 reg;
-	u32 value;
-};
-
-enum mt76_bus_type {
-	MT76_BUS_MMIO,
-	MT76_BUS_USB,
-	MT76_BUS_SDIO,
-};
-
-enum mt76_wed_type {
-	MT76_WED_Q_TX,
-	MT76_WED_Q_TXFREE,
-};
-
-struct mt76_bus_ops {
-	u32 (*rr)(struct mt76_dev *dev, u32 offset);
-	void (*wr)(struct mt76_dev *dev, u32 offset, u32 val);
-	u32 (*rmw)(struct mt76_dev *dev, u32 offset, u32 mask, u32 val);
-	void (*write_copy)(struct mt76_dev *dev, u32 offset, const void *data,
-			   int len);
-	void (*read_copy)(struct mt76_dev *dev, u32 offset, void *data,
-			  int len);
-	int (*wr_rp)(struct mt76_dev *dev, u32 base,
-		     const struct mt76_reg_pair *rp, int len);
-	int (*rd_rp)(struct mt76_dev *dev, u32 base,
-		     struct mt76_reg_pair *rp, int len);
-	enum mt76_bus_type type;
-};
-
-#define mt76_is_usb(dev) ((dev)->bus->type == MT76_BUS_USB)
-#define mt76_is_mmio(dev) ((dev)->bus->type == MT76_BUS_MMIO)
-#define mt76_is_sdio(dev) ((dev)->bus->type == MT76_BUS_SDIO)
-
-enum mt76_txq_id {
-	MT_TXQ_VO = IEEE80211_AC_VO,
-	MT_TXQ_VI = IEEE80211_AC_VI,
-	MT_TXQ_BE = IEEE80211_AC_BE,
-	MT_TXQ_BK = IEEE80211_AC_BK,
-	MT_TXQ_PSD,
-	MT_TXQ_BEACON,
-	MT_TXQ_CAB,
-	__MT_TXQ_MAX
-};
-
-enum mt76_mcuq_id {
-	MT_MCUQ_WM,
-	MT_MCUQ_WA,
-	MT_MCUQ_FWDL,
-	__MT_MCUQ_MAX
-};
-
-enum mt76_rxq_id {
-	MT_RXQ_MAIN,
-	MT_RXQ_MCU,
-	MT_RXQ_MCU_WA,
-	MT_RXQ_BAND1,
-	MT_RXQ_BAND1_WA,
-	MT_RXQ_MAIN_WA,
-	MT_RXQ_BAND2,
-	MT_RXQ_BAND2_WA,
-	__MT_RXQ_MAX
-};
-
-enum mt76_band_id {
-	MT_BAND0,
-	MT_BAND1,
-	MT_BAND2,
-	__MT_MAX_BAND
-};
-
-enum mt76_cipher_type {
-	MT_CIPHER_NONE,
-	MT_CIPHER_WEP40,
-	MT_CIPHER_TKIP,
-	MT_CIPHER_TKIP_NO_MIC,
-	MT_CIPHER_AES_CCMP,
-	MT_CIPHER_WEP104,
-	MT_CIPHER_BIP_CMAC_128,
-	MT_CIPHER_WEP128,
-	MT_CIPHER_WAPI,
-	MT_CIPHER_CCMP_CCX,
-	MT_CIPHER_CCMP_256,
-	MT_CIPHER_GCMP,
-	MT_CIPHER_GCMP_256,
-};
-
-enum mt76_dfs_state {
-	MT_DFS_STATE_UNKNOWN,
-	MT_DFS_STATE_DISABLED,
-	MT_DFS_STATE_CAC,
-	MT_DFS_STATE_ACTIVE,
-};
-
-struct mt76_queue_buf {
-	dma_addr_t addr;
-	u16 len;
-	bool skip_unmap;
-};
-
-struct mt76_tx_info {
-	struct mt76_queue_buf buf[32];
-	struct sk_buff *skb;
-	int nbuf;
-	u32 info;
-};
-
-struct mt76_queue_entry {
-	union {
-		void *buf;
-		struct sk_buff *skb;
-	};
-	union {
-		struct mt76_txwi_cache *txwi;
-		struct urb *urb;
-		int buf_sz;
-	};
-	u32 dma_addr[2];
-	u16 dma_len[2];
-	u16 wcid;
-	bool skip_buf0:1;
-	bool skip_buf1:1;
-	bool done:1;
-};
-
-struct mt76_queue_regs {
-	u32 desc_base;
-	u32 ring_size;
-	u32 cpu_idx;
-	u32 dma_idx;
-} __packed __aligned(4);
-
-struct mt76_queue {
-	struct mt76_queue_regs __iomem *regs;
-
-	spinlock_t lock;
-	spinlock_t cleanup_lock;
-	struct mt76_queue_entry *entry;
-	struct mt76_desc *desc;
-
-	u16 first;
-	u16 head;
-	u16 tail;
-	int ndesc;
-	int queued;
-	int buf_size;
-	bool stopped;
-	bool blocked;
-
-	u8 buf_offset;
-	u8 hw_idx;
-
-	dma_addr_t desc_dma;
-	struct sk_buff *rx_head;
-	struct page_frag_cache rx_page;
-};
-
-struct mt76_mcu_ops {
-	u32 headroom;
-	u32 tailroom;
-
-	int (*mcu_send_msg)(struct mt76_dev *dev, int cmd, const void *data,
-			    int len, bool wait_resp);
-	int (*mcu_skb_send_msg)(struct mt76_dev *dev, struct sk_buff *skb,
-				int cmd, int *seq);
-	int (*mcu_parse_response)(struct mt76_dev *dev, int cmd,
-				  struct sk_buff *skb, int seq);
-	u32 (*mcu_rr)(struct mt76_dev *dev, u32 offset);
-	void (*mcu_wr)(struct mt76_dev *dev, u32 offset, u32 val);
-	int (*mcu_wr_rp)(struct mt76_dev *dev, u32 base,
-			 const struct mt76_reg_pair *rp, int len);
-	int (*mcu_rd_rp)(struct mt76_dev *dev, u32 base,
-			 struct mt76_reg_pair *rp, int len);
-	int (*mcu_restart)(struct mt76_dev *dev);
-};
-
-struct mt76_queue_ops {
-	int (*init)(struct mt76_dev *dev,
-		    int (*poll)(struct napi_struct *napi, int budget));
-
-	int (*alloc)(struct mt76_dev *dev, struct mt76_queue *q,
-		     int idx, int n_desc, int bufsize,
-		     u32 ring_base);
-
-	int (*tx_queue_skb)(struct mt76_dev *dev, struct mt76_queue *q,
-			    enum mt76_txq_id qid, struct sk_buff *skb,
-			    struct mt76_wcid *wcid, struct ieee80211_sta *sta);
-
-	int (*tx_queue_skb_raw)(struct mt76_dev *dev, struct mt76_queue *q,
-				struct sk_buff *skb, u32 tx_info);
-
-	void *(*dequeue)(struct mt76_dev *dev, struct mt76_queue *q, bool flush,
-			 int *len, u32 *info, bool *more);
-
-	void (*rx_reset)(struct mt76_dev *dev, enum mt76_rxq_id qid);
-
-	void (*tx_cleanup)(struct mt76_dev *dev, struct mt76_queue *q,
-			   bool flush);
-
-	void (*rx_cleanup)(struct mt76_dev *dev, struct mt76_queue *q);
-
-	void (*kick)(struct mt76_dev *dev, struct mt76_queue *q);
-
-	void (*reset_q)(struct mt76_dev *dev, struct mt76_queue *q);
-};
-
-enum mt76_phy_type {
-	MT_PHY_TYPE_CCK,
-	MT_PHY_TYPE_OFDM,
-	MT_PHY_TYPE_HT,
-	MT_PHY_TYPE_HT_GF,
-	MT_PHY_TYPE_VHT,
-	MT_PHY_TYPE_HE_SU = 8,
-	MT_PHY_TYPE_HE_EXT_SU,
-	MT_PHY_TYPE_HE_TB,
-	MT_PHY_TYPE_HE_MU,
-	__MT_PHY_TYPE_HE_MAX,
-};
-
-struct mt76_sta_stats {
-	u64 tx_mode[__MT_PHY_TYPE_HE_MAX];
-	u64 tx_bw[4];		/* 20, 40, 80, 160 */
-	u64 tx_nss[4];		/* 1, 2, 3, 4 */
-	u64 tx_mcs[16];		/* mcs idx */
-	u64 tx_bytes;
-	u32 tx_packets;
-	u32 tx_retries;
-	u32 tx_failed;
-};
-
-enum mt76_wcid_flags {
-	MT_WCID_FLAG_CHECK_PS,
-	MT_WCID_FLAG_PS,
-	MT_WCID_FLAG_4ADDR,
-	MT_WCID_FLAG_HDR_TRANS,
-};
-
-#define MT76_N_WCIDS 544
-
-/* stored in ieee80211_tx_info::hw_queue */
-#define MT_TX_HW_QUEUE_PHY		GENMASK(3, 2)
-
-DECLARE_EWMA(signal, 10, 8);
-
-#define MT_WCID_TX_INFO_RATE		GENMASK(15, 0)
-#define MT_WCID_TX_INFO_NSS		GENMASK(17, 16)
-#define MT_WCID_TX_INFO_TXPWR_ADJ	GENMASK(25, 18)
-#define MT_WCID_TX_INFO_SET		BIT(31)
-
-struct mt76_wcid {
-	struct mt76_rx_tid __rcu *aggr[IEEE80211_NUM_TIDS];
-
-	atomic_t non_aql_packets;
-	unsigned long flags;
-
-	struct ewma_signal rssi;
-	int inactive_count;
-
-	struct rate_info rate;
-
-	u16 idx;
-	u8 hw_key_idx;
-	u8 hw_key_idx2;
-
-	u8 sta:1;
-	u8 amsdu:1;
-	u8 phy_idx:2;
-
-	u8 rx_check_pn;
-	u8 rx_key_pn[IEEE80211_NUM_TIDS + 1][6];
-	u16 cipher;
-
-	u32 tx_info;
-	bool sw_iv;
-
-	struct list_head list;
-	struct idr pktid;
-
-	struct mt76_sta_stats stats;
-};
-
-struct mt76_txq {
-	u16 wcid;
-
-	u16 agg_ssn;
-	bool send_bar;
-	bool aggr;
-};
-
-struct mt76_txwi_cache {
-	struct list_head list;
-	dma_addr_t dma_addr;
-
-	struct sk_buff *skb;
-};
-
-struct mt76_rx_tid {
-	struct rcu_head rcu_head;
-
-	struct mt76_dev *dev;
-
-	spinlock_t lock;
-	struct delayed_work reorder_work;
-
-	u16 head;
-	u16 size;
-	u16 nframes;
-
-	u8 num;
-
-	u8 started:1, stopped:1, timer_pending:1;
-
-	struct sk_buff *reorder_buf[];
-};
-
-#define MT_TX_CB_DMA_DONE		BIT(0)
-#define MT_TX_CB_TXS_DONE		BIT(1)
-#define MT_TX_CB_TXS_FAILED		BIT(2)
-
-#define MT_PACKET_ID_MASK		GENMASK(6, 0)
-#define MT_PACKET_ID_NO_ACK		0
-#define MT_PACKET_ID_NO_SKB		1
-#define MT_PACKET_ID_WED		2
-#define MT_PACKET_ID_FIRST		3
-#define MT_PACKET_ID_HAS_RATE		BIT(7)
-/* This is timer for when to give up when waiting for TXS callback,
- * with starting time being the time at which the DMA_DONE callback
- * was seen (so, we know packet was processed then, it should not take
- * long after that for firmware to send the TXS callback if it is going
- * to do so.)
- */
-#define MT_TX_STATUS_SKB_TIMEOUT	(HZ / 4)
-
-struct mt76_tx_cb {
-	unsigned long jiffies;
-	u16 wcid;
-	u8 pktid;
-	u8 flags;
-};
-
-enum {
-	MT76_STATE_INITIALIZED,
-	MT76_STATE_RUNNING,
-	MT76_STATE_MCU_RUNNING,
-	MT76_SCANNING,
-	MT76_HW_SCANNING,
-	MT76_HW_SCHED_SCANNING,
-	MT76_RESTART,
-	MT76_RESET,
-	MT76_MCU_RESET,
-	MT76_REMOVED,
-	MT76_READING_STATS,
-	MT76_STATE_POWER_OFF,
-	MT76_STATE_SUSPEND,
-	MT76_STATE_ROC,
-	MT76_STATE_PM,
-};
-
-struct mt76_hw_cap {
-	bool has_2ghz;
-	bool has_5ghz;
-	bool has_6ghz;
-};
-
-#define MT_DRV_TXWI_NO_FREE		BIT(0)
-#define MT_DRV_TX_ALIGNED4_SKBS		BIT(1)
-#define MT_DRV_SW_RX_AIRTIME		BIT(2)
-#define MT_DRV_RX_DMA_HDR		BIT(3)
-#define MT_DRV_HW_MGMT_TXQ		BIT(4)
-#define MT_DRV_AMSDU_OFFLOAD		BIT(5)
-
-struct mt76_driver_ops {
-	u32 drv_flags;
-	u32 survey_flags;
-	u16 txwi_size;
-	u16 token_size;
-	u8 mcs_rates;
-
-	void (*update_survey)(struct mt76_phy *phy);
-
-	int (*tx_prepare_skb)(struct mt76_dev *dev, void *txwi_ptr,
-			      enum mt76_txq_id qid, struct mt76_wcid *wcid,
-			      struct ieee80211_sta *sta,
-			      struct mt76_tx_info *tx_info);
-
-	void (*tx_complete_skb)(struct mt76_dev *dev,
-				struct mt76_queue_entry *e);
-
-	bool (*tx_status_data)(struct mt76_dev *dev, u8 *update);
-
-	bool (*rx_check)(struct mt76_dev *dev, void *data, int len);
-
-	void (*rx_skb)(struct mt76_dev *dev, enum mt76_rxq_id q,
-		       struct sk_buff *skb);
-
-	void (*rx_poll_complete)(struct mt76_dev *dev, enum mt76_rxq_id q);
-
-	void (*sta_ps)(struct mt76_dev *dev, struct ieee80211_sta *sta,
-		       bool ps);
-
-	int (*sta_add)(struct mt76_dev *dev, struct ieee80211_vif *vif,
-		       struct ieee80211_sta *sta);
-
-	void (*sta_assoc)(struct mt76_dev *dev, struct ieee80211_vif *vif,
-			  struct ieee80211_sta *sta);
-
-	void (*sta_remove)(struct mt76_dev *dev, struct ieee80211_vif *vif,
-			   struct ieee80211_sta *sta);
-};
-
-struct mt76_channel_state {
-	u64 cc_active;
-	u64 cc_busy;
-	u64 cc_rx;
-	u64 cc_bss_rx;
-	u64 cc_tx;
-
-	s8 noise;
-};
-
-struct mt76_sband {
-	struct ieee80211_supported_band sband;
-	struct mt76_channel_state *chan;
-};
-
-/* addr req mask */
-#define MT_VEND_TYPE_EEPROM	BIT(31)
-#define MT_VEND_TYPE_CFG	BIT(30)
-#define MT_VEND_TYPE_MASK	(MT_VEND_TYPE_EEPROM | MT_VEND_TYPE_CFG)
-
-#define MT_VEND_ADDR(type, n)	(MT_VEND_TYPE_##type | (n))
-enum mt_vendor_req {
-	MT_VEND_DEV_MODE =	0x1,
-	MT_VEND_WRITE =		0x2,
-	MT_VEND_POWER_ON =	0x4,
-	MT_VEND_MULTI_WRITE =	0x6,
-	MT_VEND_MULTI_READ =	0x7,
-	MT_VEND_READ_EEPROM =	0x9,
-	MT_VEND_WRITE_FCE =	0x42,
-	MT_VEND_WRITE_CFG =	0x46,
-	MT_VEND_READ_CFG =	0x47,
-	MT_VEND_READ_EXT =	0x63,
-	MT_VEND_WRITE_EXT =	0x66,
-	MT_VEND_FEATURE_SET =	0x91,
-};
-
-enum mt76u_in_ep {
-	MT_EP_IN_PKT_RX,
-	MT_EP_IN_CMD_RESP,
-	__MT_EP_IN_MAX,
-};
-
-enum mt76u_out_ep {
-	MT_EP_OUT_INBAND_CMD,
-	MT_EP_OUT_AC_BE,
-	MT_EP_OUT_AC_BK,
-	MT_EP_OUT_AC_VI,
-	MT_EP_OUT_AC_VO,
-	MT_EP_OUT_HCCA,
-	__MT_EP_OUT_MAX,
-};
-
-struct mt76_mcu {
-	struct mutex mutex;
-	u32 msg_seq;
-	int timeout;
-
-	struct sk_buff_head res_q;
-	wait_queue_head_t wait;
-};
-
-#define MT_TX_SG_MAX_SIZE	8
-#define MT_RX_SG_MAX_SIZE	4
-#define MT_NUM_TX_ENTRIES	256
-#define MT_NUM_RX_ENTRIES	128
-#define MCU_RESP_URB_SIZE	1024
-struct mt76_usb {
-	struct mutex usb_ctrl_mtx;
-	u8 *data;
-	u16 data_len;
-
-	struct mt76_worker status_worker;
-	struct mt76_worker rx_worker;
-
-	struct work_struct stat_work;
-
-	u8 out_ep[__MT_EP_OUT_MAX];
-	u8 in_ep[__MT_EP_IN_MAX];
-	bool sg_en;
-
-	struct mt76u_mcu {
-		u8 *data;
-		/* multiple reads */
-		struct mt76_reg_pair *rp;
-		int rp_len;
-		u32 base;
-	} mcu;
-};
-
-#define MT76S_XMIT_BUF_SZ	0x3fe00
-#define MT76S_NUM_TX_ENTRIES	256
-#define MT76S_NUM_RX_ENTRIES	512
-struct mt76_sdio {
-	struct mt76_worker txrx_worker;
-	struct mt76_worker status_worker;
-	struct mt76_worker net_worker;
-
-	struct work_struct stat_work;
-
-	u8 *xmit_buf;
-	u32 xmit_buf_sz;
-
-	struct sdio_func *func;
-	void *intr_data;
-	u8 hw_ver;
-	wait_queue_head_t wait;
-
-	struct {
-		int pse_data_quota;
-		int ple_data_quota;
-		int pse_mcu_quota;
-		int pse_page_size;
-		int deficit;
-	} sched;
-
-	int (*parse_irq)(struct mt76_dev *dev, struct mt76s_intr *intr);
-};
-
-struct mt76_mmio {
-	void __iomem *regs;
-	spinlock_t irq_lock;
-	u32 irqmask;
-};
-
-struct mt76_rx_status {
-	union {
-		struct mt76_wcid *wcid;
-		u16 wcid_idx;
-	};
-
-	u32 reorder_time;
-
-	u32 ampdu_ref;
-	u32 timestamp;
-
-	u8 iv[6];
-
-	u8 phy_idx:2;
-	u8 aggr:1;
-	u8 qos_ctl;
-	u16 seqno;
-
-	u16 freq;
-	u32 flag;
-	u8 enc_flags;
-	u8 encoding:2, bw:3, he_ru:3;
-	u8 he_gi:2, he_dcm:1;
-	u8 amsdu:1, first_amsdu:1, last_amsdu:1;
-	u8 rate_idx;
-	u8 nss;
-	u8 band;
-	s8 signal;
-	u8 chains;
-	s8 chain_signal[IEEE80211_MAX_CHAINS];
-};
-
-struct mt76_freq_range_power {
-	const struct cfg80211_sar_freq_ranges *range;
-	s8 power;
-};
-
-struct mt76_testmode_ops {
-	int (*set_state)(struct mt76_phy *phy, enum mt76_testmode_state state);
-	int (*set_params)(struct mt76_phy *phy, struct nlattr **tb,
-			  enum mt76_testmode_state new_state);
-	int (*dump_stats)(struct mt76_phy *phy, struct sk_buff *msg);
-};
-
-struct mt76_testmode_data {
-	enum mt76_testmode_state state;
-
-	u32 param_set[DIV_ROUND_UP(NUM_MT76_TM_ATTRS, 32)];
-	struct sk_buff *tx_skb;
-
-	u32 tx_count;
-	u16 tx_mpdu_len;
-
-	u8 tx_rate_mode;
-	u8 tx_rate_idx;
-	u8 tx_rate_nss;
-	u8 tx_rate_sgi;
-	u8 tx_rate_ldpc;
-	u8 tx_rate_stbc;
-	u8 tx_ltf;
-
-	u8 tx_antenna_mask;
-	u8 tx_spe_idx;
-
-	u8 tx_duty_cycle;
-	u32 tx_time;
-	u32 tx_ipg;
-
-	u32 freq_offset;
-
-	u8 tx_power[4];
-	u8 tx_power_control;
-
-	u8 addr[3][ETH_ALEN];
-
-	u32 tx_pending;
-	u32 tx_queued;
-	u16 tx_queued_limit;
-	u32 tx_done;
-	struct {
-		u64 packets[__MT_RXQ_MAX];
-		u64 fcs_error[__MT_RXQ_MAX];
-	} rx_stats;
-};
-
-struct mt76_vif {
-	u8 idx;
-	u8 omac_idx;
-	u8 band_idx;
-	u8 wmm_idx;
-	u8 scan_seq_num;
-	u8 cipher;
-};
-
-struct mt76_phy {
-	struct ieee80211_hw *hw;
-	struct mt76_dev *dev;
-	void *priv;
-
-	unsigned long state;
-	u8 band_idx;
-
-	struct mt76_queue *q_tx[__MT_TXQ_MAX];
-
-	struct cfg80211_chan_def chandef;
-	struct ieee80211_channel *main_chan;
-
-	struct mt76_channel_state *chan_state;
-	enum mt76_dfs_state dfs_state;
-	ktime_t survey_time;
-
-	struct mt76_hw_cap cap;
-	struct mt76_sband sband_2g;
-	struct mt76_sband sband_5g;
-	struct mt76_sband sband_6g;
-
-	u8 macaddr[ETH_ALEN];
-
-	int txpower_cur;
-	u8 antenna_mask;
-	u16 chainmask;
-
-#ifdef CONFIG_NL80211_TESTMODE
-	struct mt76_testmode_data test;
-#endif
-
-	struct delayed_work mac_work;
-	u8 mac_work_count;
-
-	struct {
-		struct sk_buff *head;
-		struct sk_buff **tail;
-		u16 seqno;
-	} rx_amsdu[__MT_RXQ_MAX];
-
-	struct mt76_freq_range_power *frp;
-};
-
-struct mt76_dev {
-	struct mt76_phy phy; /* must be first */
-	struct mt76_phy *phys[__MT_MAX_BAND];
-
-	struct ieee80211_hw *hw;
-
-	spinlock_t lock;
-	spinlock_t cc_lock;
-
-	u32 cur_cc_bss_rx;
-
-	struct mt76_rx_status rx_ampdu_status;
-	u32 rx_ampdu_len;
-	u32 rx_ampdu_ref;
-
-	struct mutex mutex;
-
-	const struct mt76_bus_ops *bus;
-	const struct mt76_driver_ops *drv;
-	const struct mt76_mcu_ops *mcu_ops;
-	struct device *dev;
-	struct device *dma_dev;
-
-	struct mt76_mcu mcu;
-
-	struct net_device napi_dev;
-	struct net_device tx_napi_dev;
-	spinlock_t rx_lock;
-	struct napi_struct napi[__MT_RXQ_MAX];
-	struct sk_buff_head rx_skb[__MT_RXQ_MAX];
-
-	struct list_head txwi_cache;
-	struct mt76_queue *q_mcu[__MT_MCUQ_MAX];
-	struct mt76_queue q_rx[__MT_RXQ_MAX];
-	const struct mt76_queue_ops *queue_ops;
-	int tx_dma_idx[4];
-
-	struct mt76_worker tx_worker;
-	struct napi_struct tx_napi;
-
-	spinlock_t token_lock;
-	struct idr token;
-	u16 token_count;
-	u16 token_size;
-
-	wait_queue_head_t tx_wait;
-	/* spinclock used to protect wcid pktid linked list */
-	spinlock_t status_lock;
-
-	u32 wcid_mask[DIV_ROUND_UP(MT76_N_WCIDS, 32)];
-	u32 wcid_phy_mask[DIV_ROUND_UP(MT76_N_WCIDS, 32)];
-
-	u64 vif_mask;
-
-	struct mt76_wcid global_wcid;
-	struct mt76_wcid __rcu *wcid[MT76_N_WCIDS];
-	struct list_head wcid_list;
-
-	u32 rev;
-
-	u32 aggr_stats[16 * __MT_MAX_BAND];
-
-	struct tasklet_struct pre_tbtt_tasklet;
-	int beacon_int;
-	u8 beacon_mask;
-
-	struct debugfs_blob_wrapper eeprom;
-	struct debugfs_blob_wrapper otp;
-
-	char alpha2[3];
-	enum nl80211_dfs_regions region;
-
-	u32 debugfs_reg;
-
-	struct led_classdev led_cdev;
-	char led_name[32];
-	bool led_al;
-	u8 led_pin;
-
-	u8 csa_complete;
-
-	u32 rxfilter;
-
-#ifdef CONFIG_NL80211_TESTMODE
-	const struct mt76_testmode_ops *test_ops;
-	struct {
-		const char *name;
-		u32 offset;
-	} test_mtd;
-#endif
-	struct workqueue_struct *wq;
-
-	union {
-		struct mt76_mmio mmio;
-		struct mt76_usb usb;
-		struct mt76_sdio sdio;
-	};
-};
-
-struct mt76_power_limits {
-	s8 cck[4];
-	s8 ofdm[8];
-	s8 mcs[4][10];
-	s8 ru[7][12];
-};
-
-struct mt76_ethtool_worker_info {
-	u64 *data;
-	int idx;
-	int initial_stat_idx;
-	int worker_stat_count;
-	int sta_count;
-};
-
-#define CCK_RATE(_idx, _rate) {					\
-	.bitrate = _rate,					\
-	.flags = IEEE80211_RATE_SHORT_PREAMBLE,			\
-	.hw_value = (MT_PHY_TYPE_CCK << 8) | (_idx),		\
-	.hw_value_short = (MT_PHY_TYPE_CCK << 8) | (4 + _idx),	\
-}
-
-#define OFDM_RATE(_idx, _rate) {				\
-	.bitrate = _rate,					\
-	.hw_value = (MT_PHY_TYPE_OFDM << 8) | (_idx),		\
-	.hw_value_short = (MT_PHY_TYPE_OFDM << 8) | (_idx),	\
-}
-
-extern struct ieee80211_rate mt76_rates[12];
-
-#define __mt76_rr(dev, ...)	(dev)->bus->rr((dev), __VA_ARGS__)
-#define __mt76_wr(dev, ...)	(dev)->bus->wr((dev), __VA_ARGS__)
-#define __mt76_rmw(dev, ...)	(dev)->bus->rmw((dev), __VA_ARGS__)
-#define __mt76_wr_copy(dev, ...)	(dev)->bus->write_copy((dev), __VA_ARGS__)
-#define __mt76_rr_copy(dev, ...)	(dev)->bus->read_copy((dev), __VA_ARGS__)
-
-#define __mt76_set(dev, offset, val)	__mt76_rmw(dev, offset, 0, val)
-#define __mt76_clear(dev, offset, val)	__mt76_rmw(dev, offset, val, 0)
-
-#define mt76_rr(dev, ...)	(dev)->mt76.bus->rr(&((dev)->mt76), __VA_ARGS__)
-#define mt76_wr(dev, ...)	(dev)->mt76.bus->wr(&((dev)->mt76), __VA_ARGS__)
-#define mt76_rmw(dev, ...)	(dev)->mt76.bus->rmw(&((dev)->mt76), __VA_ARGS__)
-#define mt76_wr_copy(dev, ...)	(dev)->mt76.bus->write_copy(&((dev)->mt76), __VA_ARGS__)
-#define mt76_rr_copy(dev, ...)	(dev)->mt76.bus->read_copy(&((dev)->mt76), __VA_ARGS__)
-#define mt76_wr_rp(dev, ...)	(dev)->mt76.bus->wr_rp(&((dev)->mt76), __VA_ARGS__)
-#define mt76_rd_rp(dev, ...)	(dev)->mt76.bus->rd_rp(&((dev)->mt76), __VA_ARGS__)
-
-
-#define mt76_mcu_restart(dev, ...)	(dev)->mt76.mcu_ops->mcu_restart(&((dev)->mt76))
-#define __mt76_mcu_restart(dev, ...)	(dev)->mcu_ops->mcu_restart((dev))
-
-#define mt76_set(dev, offset, val)	mt76_rmw(dev, offset, 0, val)
-#define mt76_clear(dev, offset, val)	mt76_rmw(dev, offset, val, 0)
-
-#define mt76_get_field(_dev, _reg, _field)		\
-	FIELD_GET(_field, mt76_rr(dev, _reg))
-
-#define mt76_rmw_field(_dev, _reg, _field, _val)	\
-	mt76_rmw(_dev, _reg, _field, FIELD_PREP(_field, _val))
-
-#define __mt76_rmw_field(_dev, _reg, _field, _val)	\
-	__mt76_rmw(_dev, _reg, _field, FIELD_PREP(_field, _val))
-
-#define mt76_hw(dev) (dev)->mphy.hw
-
-bool __mt76_poll(struct mt76_dev *dev, u32 offset, u32 mask, u32 val,
-		 int timeout);
-
-#define mt76_poll(dev, ...) __mt76_poll(&((dev)->mt76), __VA_ARGS__)
-
-bool __mt76_poll_msec(struct mt76_dev *dev, u32 offset, u32 mask, u32 val,
-		      int timeout);
-
-#define mt76_poll_msec(dev, ...) __mt76_poll_msec(&((dev)->mt76), __VA_ARGS__)
-
-void mt76_mmio_init(struct mt76_dev *dev, void __iomem *regs);
-void mt76_pci_disable_aspm(struct pci_dev *pdev);
-
-static inline u16 mt76_chip(struct mt76_dev *dev)
-{
-	return dev->rev >> 16;
-}
-
-static inline u16 mt76_rev(struct mt76_dev *dev)
-{
-	return dev->rev & 0xffff;
-}
-
-#define mt76xx_chip(dev) mt76_chip(&((dev)->mt76))
-#define mt76xx_rev(dev) mt76_rev(&((dev)->mt76))
-
-#define mt76_init_queues(dev, ...)		(dev)->mt76.queue_ops->init(&((dev)->mt76), __VA_ARGS__)
-#define mt76_queue_alloc(dev, ...)	(dev)->mt76.queue_ops->alloc(&((dev)->mt76), __VA_ARGS__)
-#define mt76_tx_queue_skb_raw(dev, ...)	(dev)->mt76.queue_ops->tx_queue_skb_raw(&((dev)->mt76), __VA_ARGS__)
-#define mt76_tx_queue_skb(dev, ...)	(dev)->mt76.queue_ops->tx_queue_skb(&((dev)->mt76), __VA_ARGS__)
-#define mt76_queue_rx_reset(dev, ...)	(dev)->mt76.queue_ops->rx_reset(&((dev)->mt76), __VA_ARGS__)
-#define mt76_queue_tx_cleanup(dev, ...)	(dev)->mt76.queue_ops->tx_cleanup(&((dev)->mt76), __VA_ARGS__)
-#define mt76_queue_rx_cleanup(dev, ...)	(dev)->mt76.queue_ops->rx_cleanup(&((dev)->mt76), __VA_ARGS__)
-#define mt76_queue_kick(dev, ...)	(dev)->mt76.queue_ops->kick(&((dev)->mt76), __VA_ARGS__)
-#define mt76_queue_reset(dev, ...)	(dev)->mt76.queue_ops->reset_q(&((dev)->mt76), __VA_ARGS__)
-
-#define mt76_for_each_q_rx(dev, i)	\
-	for (i = 0; i < ARRAY_SIZE((dev)->q_rx); i++)	\
-		if ((dev)->q_rx[i].ndesc)
-
-struct mt76_dev *mt76_alloc_device(struct device *pdev, unsigned int size,
-				   const struct ieee80211_ops *ops,
-				   const struct mt76_driver_ops *drv_ops);
-int mt76_register_device(struct mt76_dev *dev, bool vht,
-			 struct ieee80211_rate *rates, int n_rates);
-void mt76_unregister_device(struct mt76_dev *dev);
-void mt76_free_device(struct mt76_dev *dev);
-void mt76_unregister_phy(struct mt76_phy *phy);
-
-struct mt76_phy *mt76_alloc_phy(struct mt76_dev *dev, unsigned int size,
-				const struct ieee80211_ops *ops,
-				u8 band_idx);
-int mt76_register_phy(struct mt76_phy *phy, bool vht,
-		      struct ieee80211_rate *rates, int n_rates);
-
-struct dentry *mt76_register_debugfs_fops(struct mt76_phy *phy,
-					  const struct file_operations *ops);
-static inline struct dentry *mt76_register_debugfs(struct mt76_dev *dev)
-{
-	return mt76_register_debugfs_fops(&dev->phy, NULL);
-}
-
-int mt76_queues_read(struct seq_file *s, void *data);
-void mt76_seq_puts_array(struct seq_file *file, const char *str,
-			 s8 *val, int len);
-
-int mt76_eeprom_init(struct mt76_dev *dev, int len);
-void mt76_eeprom_override(struct mt76_phy *phy);
-int mt76_get_of_eeprom(struct mt76_dev *dev, void *data, int offset, int len);
-
-struct mt76_queue *
-mt76_init_queue(struct mt76_dev *dev, int qid, int idx, int n_desc,
-		int ring_base);
-u16 mt76_calculate_default_rate(struct mt76_phy *phy, int rateidx);
-static inline int mt76_init_tx_queue(struct mt76_phy *phy, int qid, int idx,
-				     int n_desc, int ring_base)
-{
-	struct mt76_queue *q;
-
-	q = mt76_init_queue(phy->dev, qid, idx, n_desc, ring_base);
-	if (IS_ERR(q))
-		return PTR_ERR(q);
-
-	phy->q_tx[qid] = q;
-
-	return 0;
-}
-
-static inline int mt76_init_mcu_queue(struct mt76_dev *dev, int qid, int idx,
-				      int n_desc, int ring_base)
-{
-	struct mt76_queue *q;
-
-	q = mt76_init_queue(dev, qid, idx, n_desc, ring_base);
-	if (IS_ERR(q))
-		return PTR_ERR(q);
-
-	dev->q_mcu[qid] = q;
-
-	return 0;
-}
-
-static inline struct mt76_phy *
-mt76_dev_phy(struct mt76_dev *dev, u8 phy_idx)
-{
-	if ((phy_idx == MT_BAND1 && dev->phys[phy_idx]) ||
-	    (phy_idx == MT_BAND2 && dev->phys[phy_idx]))
-		return dev->phys[phy_idx];
-
-	return &dev->phy;
-}
-
-static inline struct ieee80211_hw *
-mt76_phy_hw(struct mt76_dev *dev, u8 phy_idx)
-{
-	return mt76_dev_phy(dev, phy_idx)->hw;
-}
-
-static inline u8 *
-mt76_get_txwi_ptr(struct mt76_dev *dev, struct mt76_txwi_cache *t)
-{
-	return (u8 *)t - dev->drv->txwi_size;
-}
-
-/* increment with wrap-around */
-static inline int mt76_incr(int val, int size)
-{
-	return (val + 1) & (size - 1);
-}
-
-/* decrement with wrap-around */
-static inline int mt76_decr(int val, int size)
-{
-	return (val - 1) & (size - 1);
-}
-
-u8 mt76_ac_to_hwq(u8 ac);
-
-static inline struct ieee80211_txq *
-mtxq_to_txq(struct mt76_txq *mtxq)
-{
-	void *ptr = mtxq;
-
-	return container_of(ptr, struct ieee80211_txq, drv_priv);
-}
-
-static inline struct ieee80211_sta *
-wcid_to_sta(struct mt76_wcid *wcid)
-{
-	void *ptr = wcid;
-
-	if (!wcid || !wcid->sta)
-		return NULL;
-
-	return container_of(ptr, struct ieee80211_sta, drv_priv);
-}
-
-static inline struct mt76_tx_cb *mt76_tx_skb_cb(struct sk_buff *skb)
-{
-	BUILD_BUG_ON(sizeof(struct mt76_tx_cb) >
-		     sizeof(IEEE80211_SKB_CB(skb)->status.status_driver_data));
-	return ((void *)IEEE80211_SKB_CB(skb)->status.status_driver_data);
-}
-
-static inline void *mt76_skb_get_hdr(struct sk_buff *skb)
-{
-	struct mt76_rx_status mstat;
-	u8 *data = skb->data;
-
-	/* Alignment concerns */
-	BUILD_BUG_ON(sizeof(struct ieee80211_radiotap_he) % 4);
-	BUILD_BUG_ON(sizeof(struct ieee80211_radiotap_he_mu) % 4);
-
-	mstat = *((struct mt76_rx_status *)skb->cb);
-
-	if (mstat.flag & RX_FLAG_RADIOTAP_HE)
-		data += sizeof(struct ieee80211_radiotap_he);
-	if (mstat.flag & RX_FLAG_RADIOTAP_HE_MU)
-		data += sizeof(struct ieee80211_radiotap_he_mu);
-
-	return data;
-}
-
-static inline void mt76_insert_hdr_pad(struct sk_buff *skb)
-{
-	int len = ieee80211_get_hdrlen_from_skb(skb);
-
-	if (len % 4 == 0)
-		return;
-
-	skb_push(skb, 2);
-	memmove(skb->data, skb->data + 2, len);
-
-	skb->data[len] = 0;
-	skb->data[len + 1] = 0;
-}
-
-static inline bool mt76_is_skb_pktid(u8 pktid)
-{
-	if (pktid & MT_PACKET_ID_HAS_RATE)
-		return false;
-
-	return pktid >= MT_PACKET_ID_FIRST;
-}
-
-static inline u8 mt76_tx_power_nss_delta(u8 nss)
-{
-	static const u8 nss_delta[4] = { 0, 6, 9, 12 };
-
-	return nss_delta[nss - 1];
-}
-
-static inline bool mt76_testmode_enabled(struct mt76_phy *phy)
-{
-#ifdef CONFIG_NL80211_TESTMODE
-	return phy->test.state != MT76_TM_STATE_OFF;
-#else
-	return false;
-#endif
-}
-
-static inline bool mt76_is_testmode_skb(struct mt76_dev *dev,
-					struct sk_buff *skb,
-					struct ieee80211_hw **hw)
-{
-#ifdef CONFIG_NL80211_TESTMODE
-	int i;
-
-	for (i = 0; i < ARRAY_SIZE(dev->phys); i++) {
-		struct mt76_phy *phy = dev->phys[i];
-
-		if (phy && skb == phy->test.tx_skb) {
-			*hw = dev->phys[i]->hw;
-			return true;
-		}
-	}
-	return false;
-#else
-	return false;
-#endif
-}
-
-void mt76_rx(struct mt76_dev *dev, enum mt76_rxq_id q, struct sk_buff *skb);
-void mt76_tx(struct mt76_phy *dev, struct ieee80211_sta *sta,
-	     struct mt76_wcid *wcid, struct sk_buff *skb);
-void mt76_wake_tx_queue(struct ieee80211_hw *hw, struct ieee80211_txq *txq);
-void mt76_stop_tx_queues(struct mt76_phy *phy, struct ieee80211_sta *sta,
-			 bool send_bar);
-void mt76_tx_check_agg_ssn(struct ieee80211_sta *sta, struct sk_buff *skb);
-void mt76_txq_schedule(struct mt76_phy *phy, enum mt76_txq_id qid);
-void mt76_txq_schedule_all(struct mt76_phy *phy);
-void mt76_tx_worker_run(struct mt76_dev *dev);
-void mt76_tx_worker(struct mt76_worker *w);
-void mt76_release_buffered_frames(struct ieee80211_hw *hw,
-				  struct ieee80211_sta *sta,
-				  u16 tids, int nframes,
-				  enum ieee80211_frame_release_type reason,
-				  bool more_data);
-bool mt76_has_tx_pending(struct mt76_phy *phy);
-void mt76_set_channel(struct mt76_phy *phy);
-void mt76_update_survey(struct mt76_phy *phy);
-void mt76_update_survey_active_time(struct mt76_phy *phy, ktime_t time);
-int mt76_get_survey(struct ieee80211_hw *hw, int idx,
-		    struct survey_info *survey);
-void mt76_set_stream_caps(struct mt76_phy *phy, bool vht);
-
-int mt76_rx_aggr_start(struct mt76_dev *dev, struct mt76_wcid *wcid, u8 tid,
-		       u16 ssn, u16 size);
-void mt76_rx_aggr_stop(struct mt76_dev *dev, struct mt76_wcid *wcid, u8 tid);
-
-void mt76_wcid_key_setup(struct mt76_dev *dev, struct mt76_wcid *wcid,
-			 struct ieee80211_key_conf *key);
-
-void mt76_tx_status_lock(struct mt76_dev *dev, struct sk_buff_head *list)
-			 __acquires(&dev->status_lock);
-void mt76_tx_status_unlock(struct mt76_dev *dev, struct sk_buff_head *list)
-			   __releases(&dev->status_lock);
-
-int mt76_tx_status_skb_add(struct mt76_dev *dev, struct mt76_wcid *wcid,
-			   struct sk_buff *skb);
-struct sk_buff *mt76_tx_status_skb_get(struct mt76_dev *dev,
-				       struct mt76_wcid *wcid, int pktid,
-				       struct sk_buff_head *list);
-void mt76_tx_status_skb_done(struct mt76_dev *dev, struct sk_buff *skb,
-			     struct sk_buff_head *list);
-void __mt76_tx_complete_skb(struct mt76_dev *dev, u16 wcid, struct sk_buff *skb,
-			    struct list_head *free_list);
-static inline void
-mt76_tx_complete_skb(struct mt76_dev *dev, u16 wcid, struct sk_buff *skb)
-{
-    __mt76_tx_complete_skb(dev, wcid, skb, NULL);
-}
-
-void mt76_tx_status_check(struct mt76_dev *dev, bool flush);
-int mt76_sta_state(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
-		   struct ieee80211_sta *sta,
-		   enum ieee80211_sta_state old_state,
-		   enum ieee80211_sta_state new_state);
-void __mt76_sta_remove(struct mt76_dev *dev, struct ieee80211_vif *vif,
-		       struct ieee80211_sta *sta);
-void mt76_sta_pre_rcu_remove(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
-			     struct ieee80211_sta *sta);
-
-int mt76_get_min_avg_rssi(struct mt76_dev *dev, bool ext_phy);
-
-int mt76_get_txpower(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
-		     int *dbm);
-int mt76_init_sar_power(struct ieee80211_hw *hw,
-			const struct cfg80211_sar_specs *sar);
-int mt76_get_sar_power(struct mt76_phy *phy,
-		       struct ieee80211_channel *chan,
-		       int power);
-
-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_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,
-		  struct ieee80211_supported_band *sband,
-		  int idx, bool cck);
-void mt76_sw_scan(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
-		  const u8 *mac);
-void mt76_sw_scan_complete(struct ieee80211_hw *hw,
-			   struct ieee80211_vif *vif);
-enum mt76_dfs_state mt76_phy_dfs_state(struct mt76_phy *phy);
-int mt76_testmode_cmd(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
-		      void *data, int len);
-int mt76_testmode_dump(struct ieee80211_hw *hw, struct sk_buff *skb,
-		       struct netlink_callback *cb, void *data, int len);
-int mt76_testmode_set_state(struct mt76_phy *phy, enum mt76_testmode_state state);
-int mt76_testmode_alloc_skb(struct mt76_phy *phy, u32 len);
-
-static inline void mt76_testmode_reset(struct mt76_phy *phy, bool disable)
-{
-#ifdef CONFIG_NL80211_TESTMODE
-	enum mt76_testmode_state state = MT76_TM_STATE_IDLE;
-
-	if (disable || phy->test.state == MT76_TM_STATE_OFF)
-		state = MT76_TM_STATE_OFF;
-
-	mt76_testmode_set_state(phy, state);
-#endif
-}
-
-
-/* internal */
-static inline struct ieee80211_hw *
-mt76_tx_status_get_hw(struct mt76_dev *dev, struct sk_buff *skb)
-{
-	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
-	u8 phy_idx = (info->hw_queue & MT_TX_HW_QUEUE_PHY) >> 2;
-	struct ieee80211_hw *hw = mt76_phy_hw(dev, phy_idx);
-
-	info->hw_queue &= ~MT_TX_HW_QUEUE_PHY;
-
-	return hw;
-}
-
-void mt76_put_txwi(struct mt76_dev *dev, struct mt76_txwi_cache *t);
-void mt76_rx_complete(struct mt76_dev *dev, struct sk_buff_head *frames,
-		      struct napi_struct *napi);
-void mt76_rx_poll_complete(struct mt76_dev *dev, enum mt76_rxq_id q,
-			   struct napi_struct *napi);
-void mt76_rx_aggr_reorder(struct sk_buff *skb, struct sk_buff_head *frames);
-void mt76_testmode_tx_pending(struct mt76_phy *phy);
-void mt76_queue_tx_complete(struct mt76_dev *dev, struct mt76_queue *q,
-			    struct mt76_queue_entry *e);
-
-/* usb */
-static inline bool mt76u_urb_error(struct urb *urb)
-{
-	return urb->status &&
-	       urb->status != -ECONNRESET &&
-	       urb->status != -ESHUTDOWN &&
-	       urb->status != -ENOENT;
-}
-
-/* Map hardware queues to usb endpoints */
-static inline u8 q2ep(u8 qid)
-{
-	/* TODO: take management packets to queue 5 */
-	return qid + 1;
-}
-
-static inline int
-mt76u_bulk_msg(struct mt76_dev *dev, void *data, int len, int *actual_len,
-	       int timeout, int ep)
-{
-	struct usb_interface *uintf = to_usb_interface(dev->dev);
-	struct usb_device *udev = interface_to_usbdev(uintf);
-	struct mt76_usb *usb = &dev->usb;
-	unsigned int pipe;
-
-	if (actual_len)
-		pipe = usb_rcvbulkpipe(udev, usb->in_ep[ep]);
-	else
-		pipe = usb_sndbulkpipe(udev, usb->out_ep[ep]);
-
-	return usb_bulk_msg(udev, pipe, data, len, actual_len, timeout);
-}
-
-void mt76_ethtool_worker(struct mt76_ethtool_worker_info *wi,
-			 struct mt76_sta_stats *stats);
-int mt76_skb_adjust_pad(struct sk_buff *skb, int pad);
-int __mt76u_vendor_request(struct mt76_dev *dev, u8 req, u8 req_type,
-			   u16 val, u16 offset, void *buf, size_t len);
-int mt76u_vendor_request(struct mt76_dev *dev, u8 req,
-			 u8 req_type, u16 val, u16 offset,
-			 void *buf, size_t len);
-void mt76u_single_wr(struct mt76_dev *dev, const u8 req,
-		     const u16 offset, const u32 val);
-void mt76u_read_copy(struct mt76_dev *dev, u32 offset,
-		     void *data, int len);
-u32 ___mt76u_rr(struct mt76_dev *dev, u8 req, u8 req_type, u32 addr);
-void ___mt76u_wr(struct mt76_dev *dev, u8 req, u8 req_type,
-		 u32 addr, u32 val);
-int __mt76u_init(struct mt76_dev *dev, struct usb_interface *intf,
-		 struct mt76_bus_ops *ops);
-int mt76u_init(struct mt76_dev *dev, struct usb_interface *intf);
-int mt76u_alloc_mcu_queue(struct mt76_dev *dev);
-int mt76u_alloc_queues(struct mt76_dev *dev);
-void mt76u_stop_tx(struct mt76_dev *dev);
-void mt76u_stop_rx(struct mt76_dev *dev);
-int mt76u_resume_rx(struct mt76_dev *dev);
-void mt76u_queues_deinit(struct mt76_dev *dev);
-
-int mt76s_init(struct mt76_dev *dev, struct sdio_func *func,
-	       const struct mt76_bus_ops *bus_ops);
-int mt76s_alloc_rx_queue(struct mt76_dev *dev, enum mt76_rxq_id qid);
-int mt76s_alloc_tx(struct mt76_dev *dev);
-void mt76s_deinit(struct mt76_dev *dev);
-void mt76s_sdio_irq(struct sdio_func *func);
-void mt76s_txrx_worker(struct mt76_sdio *sdio);
-bool mt76s_txqs_empty(struct mt76_dev *dev);
-int mt76s_hw_init(struct mt76_dev *dev, struct sdio_func *func,
-		  int hw_ver);
-u32 mt76s_rr(struct mt76_dev *dev, u32 offset);
-void mt76s_wr(struct mt76_dev *dev, u32 offset, u32 val);
-u32 mt76s_rmw(struct mt76_dev *dev, u32 offset, u32 mask, u32 val);
-u32 mt76s_read_pcr(struct mt76_dev *dev);
-void mt76s_write_copy(struct mt76_dev *dev, u32 offset,
-		      const void *data, int len);
-void mt76s_read_copy(struct mt76_dev *dev, u32 offset,
-		     void *data, int len);
-int mt76s_wr_rp(struct mt76_dev *dev, u32 base,
-		const struct mt76_reg_pair *data,
-		int len);
-int mt76s_rd_rp(struct mt76_dev *dev, u32 base,
-		struct mt76_reg_pair *data, int len);
-
-struct sk_buff *
-__mt76_mcu_msg_alloc(struct mt76_dev *dev, const void *data,
-		     int len, int data_len, gfp_t gfp);
-static inline struct sk_buff *
-mt76_mcu_msg_alloc(struct mt76_dev *dev, const void *data,
-		   int data_len)
-{
-	return __mt76_mcu_msg_alloc(dev, data, data_len, data_len, GFP_KERNEL);
-}
-
-void mt76_mcu_rx_event(struct mt76_dev *dev, struct sk_buff *skb);
-struct sk_buff *mt76_mcu_get_response(struct mt76_dev *dev,
-				      unsigned long expires);
-int mt76_mcu_send_and_get_msg(struct mt76_dev *dev, int cmd, const void *data,
-			      int len, bool wait_resp, struct sk_buff **ret);
-int mt76_mcu_skb_send_and_get_msg(struct mt76_dev *dev, struct sk_buff *skb,
-				  int cmd, bool wait_resp, struct sk_buff **ret);
-int __mt76_mcu_send_firmware(struct mt76_dev *dev, int cmd, const void *data,
-			     int len, int max_len);
-static inline int
-mt76_mcu_send_firmware(struct mt76_dev *dev, int cmd, const void *data,
-		       int len)
-{
-	int max_len = 4096 - dev->mcu_ops->headroom;
-
-	return __mt76_mcu_send_firmware(dev, cmd, data, len, max_len);
-}
-
-static inline int
-mt76_mcu_send_msg(struct mt76_dev *dev, int cmd, const void *data, int len,
-		  bool wait_resp)
-{
-	return mt76_mcu_send_and_get_msg(dev, cmd, data, len, wait_resp, NULL);
-}
-
-static inline int
-mt76_mcu_skb_send_msg(struct mt76_dev *dev, struct sk_buff *skb, int cmd,
-		      bool wait_resp)
-{
-	return mt76_mcu_skb_send_and_get_msg(dev, skb, cmd, wait_resp, NULL);
-}
-
-void mt76_set_irq_mask(struct mt76_dev *dev, u32 addr, u32 clear, u32 set);
-
-s8 mt76_get_rate_power_limits(struct mt76_phy *phy,
-			      struct ieee80211_channel *chan,
-			      struct mt76_power_limits *dest,
-			      s8 target_power);
-
-struct mt76_txwi_cache *
-mt76_token_release(struct mt76_dev *dev, int token, bool *wake);
-int mt76_token_consume(struct mt76_dev *dev, struct mt76_txwi_cache **ptxwi);
-void __mt76_set_tx_blocked(struct mt76_dev *dev, bool blocked);
-
-static inline void mt76_set_tx_blocked(struct mt76_dev *dev, bool blocked)
-{
-	spin_lock_bh(&dev->token_lock);
-	__mt76_set_tx_blocked(dev, blocked);
-	spin_unlock_bh(&dev->token_lock);
-}
-
-static inline int
-mt76_token_get(struct mt76_dev *dev, struct mt76_txwi_cache **ptxwi)
-{
-	int token;
-
-	spin_lock_bh(&dev->token_lock);
-	token = idr_alloc(&dev->token, *ptxwi, 0, dev->token_size, GFP_ATOMIC);
-	spin_unlock_bh(&dev->token_lock);
-
-	return token;
-}
-
-static inline struct mt76_txwi_cache *
-mt76_token_put(struct mt76_dev *dev, int token)
-{
-	struct mt76_txwi_cache *txwi;
-
-	spin_lock_bh(&dev->token_lock);
-	txwi = idr_remove(&dev->token, token);
-	spin_unlock_bh(&dev->token_lock);
-
-	return txwi;
-}
-
-static inline void mt76_packet_id_init(struct mt76_wcid *wcid)
-{
-	INIT_LIST_HEAD(&wcid->list);
-	idr_init(&wcid->pktid);
-}
-
-static inline void
-mt76_packet_id_flush(struct mt76_dev *dev, struct mt76_wcid *wcid)
-{
-	struct sk_buff_head list;
-
-	mt76_tx_status_lock(dev, &list);
-	mt76_tx_status_skb_get(dev, wcid, -1, &list);
-	mt76_tx_status_unlock(dev, &list);
-
-	idr_destroy(&wcid->pktid);
-}
-
-#endif
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt7603/Makefile b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt7603/Makefile
deleted file mode 100644
index 687f64f..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt7603/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0-only
-EXTRA_CFLAGS += -Werror -DCONFIG_MT76_LEDS
-obj-m += mt7603e.o
-
-mt7603e-y := \
-	pci.o soc.o main.o init.o mcu.o \
-	core.o dma.o mac.o eeprom.o \
-	beacon.o debugfs.o
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt7603/beacon.c b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt7603/beacon.c
deleted file mode 100644
index 5807cf2..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt7603/beacon.c
+++ /dev/null
@@ -1,190 +0,0 @@
-// SPDX-License-Identifier: ISC
-
-#include "mt7603.h"
-
-struct beacon_bc_data {
-	struct mt7603_dev *dev;
-	struct sk_buff_head q;
-	struct sk_buff *tail[MT7603_MAX_INTERFACES];
-	int count[MT7603_MAX_INTERFACES];
-};
-
-static void
-mt7603_update_beacon_iter(void *priv, u8 *mac, struct ieee80211_vif *vif)
-{
-	struct mt7603_dev *dev = (struct mt7603_dev *)priv;
-	struct mt76_dev *mdev = &dev->mt76;
-	struct mt7603_vif *mvif = (struct mt7603_vif *)vif->drv_priv;
-	struct sk_buff *skb = NULL;
-
-	if (!(mdev->beacon_mask & BIT(mvif->idx)))
-		return;
-
-	skb = ieee80211_beacon_get(mt76_hw(dev), vif);
-	if (!skb)
-		return;
-
-	mt76_tx_queue_skb(dev, dev->mphy.q_tx[MT_TXQ_BEACON],
-			  MT_TXQ_BEACON, skb, &mvif->sta.wcid, NULL);
-
-	spin_lock_bh(&dev->ps_lock);
-	mt76_wr(dev, MT_DMA_FQCR0, MT_DMA_FQCR0_BUSY |
-		FIELD_PREP(MT_DMA_FQCR0_TARGET_WCID, mvif->sta.wcid.idx) |
-		FIELD_PREP(MT_DMA_FQCR0_TARGET_QID,
-			   dev->mphy.q_tx[MT_TXQ_CAB]->hw_idx) |
-		FIELD_PREP(MT_DMA_FQCR0_DEST_PORT_ID, 3) |
-		FIELD_PREP(MT_DMA_FQCR0_DEST_QUEUE_ID, 8));
-
-	if (!mt76_poll(dev, MT_DMA_FQCR0, MT_DMA_FQCR0_BUSY, 0, 5000))
-		dev->beacon_check = MT7603_WATCHDOG_TIMEOUT;
-
-	spin_unlock_bh(&dev->ps_lock);
-}
-
-static void
-mt7603_add_buffered_bc(void *priv, u8 *mac, struct ieee80211_vif *vif)
-{
-	struct beacon_bc_data *data = priv;
-	struct mt7603_dev *dev = data->dev;
-	struct mt7603_vif *mvif = (struct mt7603_vif *)vif->drv_priv;
-	struct ieee80211_tx_info *info;
-	struct sk_buff *skb;
-
-	if (!(dev->mt76.beacon_mask & BIT(mvif->idx)))
-		return;
-
-	skb = ieee80211_get_buffered_bc(mt76_hw(dev), vif);
-	if (!skb)
-		return;
-
-	info = IEEE80211_SKB_CB(skb);
-	info->control.vif = vif;
-	info->flags |= IEEE80211_TX_CTL_ASSIGN_SEQ;
-	mt76_skb_set_moredata(skb, true);
-	__skb_queue_tail(&data->q, skb);
-	data->tail[mvif->idx] = skb;
-	data->count[mvif->idx]++;
-}
-
-void mt7603_pre_tbtt_tasklet(struct tasklet_struct *t)
-{
-	struct mt7603_dev *dev = from_tasklet(dev, t, mt76.pre_tbtt_tasklet);
-	struct mt76_dev *mdev = &dev->mt76;
-	struct mt76_queue *q;
-	struct beacon_bc_data data = {};
-	struct sk_buff *skb;
-	int i, nframes;
-
-	if (mt76_hw(dev)->conf.flags & IEEE80211_CONF_OFFCHANNEL)
-		return;
-
-	data.dev = dev;
-	__skb_queue_head_init(&data.q);
-
-	q = dev->mphy.q_tx[MT_TXQ_BEACON];
-	spin_lock(&q->lock);
-	ieee80211_iterate_active_interfaces_atomic(mt76_hw(dev),
-		IEEE80211_IFACE_ITER_RESUME_ALL,
-		mt7603_update_beacon_iter, dev);
-	mt76_queue_kick(dev, q);
-	spin_unlock(&q->lock);
-
-	/* Flush all previous CAB queue packets */
-	mt76_wr(dev, MT_WF_ARB_CAB_FLUSH, GENMASK(30, 16) | BIT(0));
-
-	mt76_queue_tx_cleanup(dev, dev->mphy.q_tx[MT_TXQ_CAB], false);
-
-	mt76_csa_check(mdev);
-	if (mdev->csa_complete)
-		goto out;
-
-	q = dev->mphy.q_tx[MT_TXQ_CAB];
-	do {
-		nframes = skb_queue_len(&data.q);
-		ieee80211_iterate_active_interfaces_atomic(mt76_hw(dev),
-			IEEE80211_IFACE_ITER_RESUME_ALL,
-			mt7603_add_buffered_bc, &data);
-	} while (nframes != skb_queue_len(&data.q) &&
-		 skb_queue_len(&data.q) < 8);
-
-	if (skb_queue_empty(&data.q))
-		goto out;
-
-	for (i = 0; i < ARRAY_SIZE(data.tail); i++) {
-		if (!data.tail[i])
-			continue;
-
-		mt76_skb_set_moredata(data.tail[i], false);
-	}
-
-	spin_lock(&q->lock);
-	while ((skb = __skb_dequeue(&data.q)) != NULL) {
-		struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
-		struct ieee80211_vif *vif = info->control.vif;
-		struct mt7603_vif *mvif = (struct mt7603_vif *)vif->drv_priv;
-
-		mt76_tx_queue_skb(dev, q, MT_TXQ_CAB, skb, &mvif->sta.wcid, NULL);
-	}
-	mt76_queue_kick(dev, q);
-	spin_unlock(&q->lock);
-
-	for (i = 0; i < ARRAY_SIZE(data.count); i++)
-		mt76_wr(dev, MT_WF_ARB_CAB_COUNT_B0_REG(i),
-			data.count[i] << MT_WF_ARB_CAB_COUNT_B0_SHIFT(i));
-
-	mt76_wr(dev, MT_WF_ARB_CAB_START,
-		MT_WF_ARB_CAB_START_BSSn(0) |
-		(MT_WF_ARB_CAB_START_BSS0n(1) *
-		 ((1 << (MT7603_MAX_INTERFACES - 1)) - 1)));
-
-out:
-	mt76_queue_tx_cleanup(dev, dev->mphy.q_tx[MT_TXQ_BEACON], false);
-	if (dev->mphy.q_tx[MT_TXQ_BEACON]->queued > hweight8(mdev->beacon_mask))
-		dev->beacon_check++;
-}
-
-void mt7603_beacon_set_timer(struct mt7603_dev *dev, int idx, int intval)
-{
-	u32 pre_tbtt = MT7603_PRE_TBTT_TIME / 64;
-
-	if (idx >= 0) {
-		if (intval)
-			dev->mt76.beacon_mask |= BIT(idx);
-		else
-			dev->mt76.beacon_mask &= ~BIT(idx);
-	}
-
-	if (!dev->mt76.beacon_mask || (!intval && idx < 0)) {
-		mt7603_irq_disable(dev, MT_INT_MAC_IRQ3);
-		mt76_clear(dev, MT_ARB_SCR, MT_ARB_SCR_BCNQ_OPMODE_MASK);
-		mt76_wr(dev, MT_HW_INT_MASK(3), 0);
-		return;
-	}
-
-	dev->mt76.beacon_int = intval;
-	mt76_wr(dev, MT_TBTT,
-		FIELD_PREP(MT_TBTT_PERIOD, intval) | MT_TBTT_CAL_ENABLE);
-
-	mt76_wr(dev, MT_TBTT_TIMER_CFG, 0x99); /* start timer */
-
-	mt76_rmw_field(dev, MT_ARB_SCR, MT_ARB_SCR_BCNQ_OPMODE_MASK,
-		       MT_BCNQ_OPMODE_AP);
-	mt76_clear(dev, MT_ARB_SCR, MT_ARB_SCR_TBTT_BCN_PRIO);
-	mt76_set(dev, MT_ARB_SCR, MT_ARB_SCR_TBTT_BCAST_PRIO);
-
-	mt76_wr(dev, MT_PRE_TBTT, pre_tbtt);
-
-	mt76_set(dev, MT_HW_INT_MASK(3),
-		 MT_HW_INT3_PRE_TBTT0 | MT_HW_INT3_TBTT0);
-
-	mt76_set(dev, MT_WF_ARB_BCN_START,
-		 MT_WF_ARB_BCN_START_BSSn(0) |
-		 ((dev->mt76.beacon_mask >> 1) *
-		  MT_WF_ARB_BCN_START_BSS0n(1)));
-	mt7603_irq_enable(dev, MT_INT_MAC_IRQ3);
-
-	if (dev->mt76.beacon_mask & ~BIT(0))
-		mt76_set(dev, MT_LPON_SBTOR(0), MT_LPON_SBTOR_SUB_BSS_EN);
-	else
-		mt76_clear(dev, MT_LPON_SBTOR(0), MT_LPON_SBTOR_SUB_BSS_EN);
-}
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt7603/core.c b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt7603/core.c
deleted file mode 100644
index 60a996b..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt7603/core.c
+++ /dev/null
@@ -1,65 +0,0 @@
-// SPDX-License-Identifier: ISC
-
-#include "mt7603.h"
-#include "../trace.h"
-
-void mt7603_rx_poll_complete(struct mt76_dev *mdev, enum mt76_rxq_id q)
-{
-	struct mt7603_dev *dev = container_of(mdev, struct mt7603_dev, mt76);
-
-	mt7603_irq_enable(dev, MT_INT_RX_DONE(q));
-}
-
-irqreturn_t mt7603_irq_handler(int irq, void *dev_instance)
-{
-	struct mt7603_dev *dev = dev_instance;
-	u32 intr;
-
-	intr = mt76_rr(dev, MT_INT_SOURCE_CSR);
-	mt76_wr(dev, MT_INT_SOURCE_CSR, intr);
-
-	if (!test_bit(MT76_STATE_INITIALIZED, &dev->mphy.state))
-		return IRQ_NONE;
-
-	trace_dev_irq(&dev->mt76, intr, dev->mt76.mmio.irqmask);
-
-	intr &= dev->mt76.mmio.irqmask;
-
-	if (intr & MT_INT_MAC_IRQ3) {
-		u32 hwintr = mt76_rr(dev, MT_HW_INT_STATUS(3));
-
-		mt76_wr(dev, MT_HW_INT_STATUS(3), hwintr);
-		if (hwintr & MT_HW_INT3_PRE_TBTT0)
-			tasklet_schedule(&dev->mt76.pre_tbtt_tasklet);
-
-		if ((hwintr & MT_HW_INT3_TBTT0) && dev->mt76.csa_complete)
-			mt76_csa_finish(&dev->mt76);
-	}
-
-	if (intr & MT_INT_TX_DONE_ALL) {
-		mt7603_irq_disable(dev, MT_INT_TX_DONE_ALL);
-		napi_schedule(&dev->mt76.tx_napi);
-	}
-
-	if (intr & MT_INT_RX_DONE(0)) {
-		mt7603_irq_disable(dev, MT_INT_RX_DONE(0));
-		napi_schedule(&dev->mt76.napi[0]);
-	}
-
-	if (intr & MT_INT_RX_DONE(1)) {
-		mt7603_irq_disable(dev, MT_INT_RX_DONE(1));
-		napi_schedule(&dev->mt76.napi[1]);
-	}
-
-	return IRQ_HANDLED;
-}
-
-u32 mt7603_reg_map(struct mt7603_dev *dev, u32 addr)
-{
-	u32 base = addr & MT_MCU_PCIE_REMAP_2_BASE;
-	u32 offset = addr & MT_MCU_PCIE_REMAP_2_OFFSET;
-
-	dev->bus_ops->wr(&dev->mt76, MT_MCU_PCIE_REMAP_2, base);
-
-	return MT_PCIE_REMAP_BASE_2 + offset;
-}
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt7603/debugfs.c b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt7603/debugfs.c
deleted file mode 100644
index f52165d..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt7603/debugfs.c
+++ /dev/null
@@ -1,118 +0,0 @@
-// SPDX-License-Identifier: ISC
-
-#include "mt7603.h"
-
-static int
-mt7603_reset_read(struct seq_file *s, void *data)
-{
-	struct mt7603_dev *dev = dev_get_drvdata(s->private);
-	static const char * const reset_cause_str[] = {
-		[RESET_CAUSE_TX_HANG] = "TX hang",
-		[RESET_CAUSE_TX_BUSY] = "TX DMA busy stuck",
-		[RESET_CAUSE_RX_BUSY] = "RX DMA busy stuck",
-		[RESET_CAUSE_RX_PSE_BUSY] = "RX PSE busy stuck",
-		[RESET_CAUSE_BEACON_STUCK] = "Beacon stuck",
-		[RESET_CAUSE_MCU_HANG] = "MCU hang",
-		[RESET_CAUSE_RESET_FAILED] = "PSE reset failed",
-	};
-	int i;
-
-	for (i = 0; i < ARRAY_SIZE(reset_cause_str); i++) {
-		if (!reset_cause_str[i])
-			continue;
-
-		seq_printf(s, "%20s: %u\n", reset_cause_str[i],
-			   dev->reset_cause[i]);
-	}
-
-	return 0;
-}
-
-static int
-mt7603_radio_read(struct seq_file *s, void *data)
-{
-	struct mt7603_dev *dev = dev_get_drvdata(s->private);
-
-	seq_printf(s, "Sensitivity: %d\n", dev->sensitivity);
-	seq_printf(s, "False CCA: ofdm=%d cck=%d\n",
-		   dev->false_cca_ofdm, dev->false_cca_cck);
-
-	return 0;
-}
-
-static int
-mt7603_edcca_set(void *data, u64 val)
-{
-	struct mt7603_dev *dev = data;
-
-	mutex_lock(&dev->mt76.mutex);
-
-	dev->ed_monitor_enabled = !!val;
-	dev->ed_monitor = dev->ed_monitor_enabled &&
-			  dev->mt76.region == NL80211_DFS_ETSI;
-	mt7603_init_edcca(dev);
-
-	mutex_unlock(&dev->mt76.mutex);
-
-	return 0;
-}
-
-static int
-mt7603_edcca_get(void *data, u64 *val)
-{
-	struct mt7603_dev *dev = data;
-
-	*val = dev->ed_monitor_enabled;
-	return 0;
-}
-
-DEFINE_DEBUGFS_ATTRIBUTE(fops_edcca, mt7603_edcca_get,
-			 mt7603_edcca_set, "%lld\n");
-
-static int
-mt7603_ampdu_stat_show(struct seq_file *file, void *data)
-{
-	struct mt7603_dev *dev = file->private;
-	int bound[3], i, range;
-
-	range = mt76_rr(dev, MT_AGG_ASRCR);
-	for (i = 0; i < ARRAY_SIZE(bound); i++)
-		bound[i] = MT_AGG_ASRCR_RANGE(range, i) + 1;
-
-	seq_printf(file, "Length: %8d | ", bound[0]);
-	for (i = 0; i < ARRAY_SIZE(bound) - 1; i++)
-		seq_printf(file, "%3d -%3d | ",
-			   bound[i], bound[i + 1]);
-	seq_puts(file, "\nCount:  ");
-	for (i = 0; i < ARRAY_SIZE(bound); i++)
-		seq_printf(file, "%8d | ", dev->mt76.aggr_stats[i]);
-	seq_puts(file, "\n");
-
-	return 0;
-}
-
-DEFINE_SHOW_ATTRIBUTE(mt7603_ampdu_stat);
-
-void mt7603_init_debugfs(struct mt7603_dev *dev)
-{
-	struct dentry *dir;
-
-	dir = mt76_register_debugfs(&dev->mt76);
-	if (!dir)
-		return;
-
-	debugfs_create_file("ampdu_stat", 0400, dir, dev,
-			     &mt7603_ampdu_stat_fops);
-	debugfs_create_devm_seqfile(dev->mt76.dev, "xmit-queues", dir,
-				    mt76_queues_read);
-	debugfs_create_file("edcca", 0600, dir, dev, &fops_edcca);
-	debugfs_create_u32("reset_test", 0600, dir, &dev->reset_test);
-	debugfs_create_devm_seqfile(dev->mt76.dev, "reset", dir,
-				    mt7603_reset_read);
-	debugfs_create_devm_seqfile(dev->mt76.dev, "radio", dir,
-				    mt7603_radio_read);
-	debugfs_create_u8("sensitivity_limit", 0600, dir,
-			    &dev->sensitivity_limit);
-	debugfs_create_bool("dynamic_sensitivity", 0600, dir,
-			    &dev->dynamic_sensitivity);
-}
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt7603/dma.c b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt7603/dma.c
deleted file mode 100644
index 590cff9..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt7603/dma.c
+++ /dev/null
@@ -1,241 +0,0 @@
-// SPDX-License-Identifier: ISC
-
-#include "mt7603.h"
-#include "mac.h"
-#include "../dma.h"
-
-static void
-mt7603_rx_loopback_skb(struct mt7603_dev *dev, struct sk_buff *skb)
-{
-	static const u8 tid_to_ac[8] = {
-		IEEE80211_AC_BE,
-		IEEE80211_AC_BK,
-		IEEE80211_AC_BK,
-		IEEE80211_AC_BE,
-		IEEE80211_AC_VI,
-		IEEE80211_AC_VI,
-		IEEE80211_AC_VO,
-		IEEE80211_AC_VO
-	};
-	__le32 *txd = (__le32 *)skb->data;
-	struct ieee80211_hdr *hdr;
-	struct ieee80211_sta *sta;
-	struct mt7603_sta *msta;
-	struct mt76_wcid *wcid;
-	void *priv;
-	int idx;
-	u32 val;
-	u8 tid = 0;
-
-	if (skb->len < MT_TXD_SIZE + sizeof(struct ieee80211_hdr))
-		goto free;
-
-	val = le32_to_cpu(txd[1]);
-	idx = FIELD_GET(MT_TXD1_WLAN_IDX, val);
-	skb->priority = FIELD_GET(MT_TXD1_TID, val);
-
-	if (idx >= MT7603_WTBL_STA - 1)
-		goto free;
-
-	wcid = rcu_dereference(dev->mt76.wcid[idx]);
-	if (!wcid)
-		goto free;
-
-	priv = msta = container_of(wcid, struct mt7603_sta, wcid);
-	val = le32_to_cpu(txd[0]);
-	val &= ~(MT_TXD0_P_IDX | MT_TXD0_Q_IDX);
-	val |= FIELD_PREP(MT_TXD0_Q_IDX, MT_TX_HW_QUEUE_MGMT);
-	txd[0] = cpu_to_le32(val);
-
-	sta = container_of(priv, struct ieee80211_sta, drv_priv);
-	hdr = (struct ieee80211_hdr *)&skb->data[MT_TXD_SIZE];
-	if (ieee80211_is_data_qos(hdr->frame_control))
-		tid = *ieee80211_get_qos_ctl(hdr) &
-		      IEEE80211_QOS_CTL_TAG1D_MASK;
-	skb_set_queue_mapping(skb, tid_to_ac[tid]);
-	ieee80211_sta_set_buffered(sta, tid, true);
-
-	spin_lock_bh(&dev->ps_lock);
-	__skb_queue_tail(&msta->psq, skb);
-	if (skb_queue_len(&msta->psq) >= 64) {
-		skb = __skb_dequeue(&msta->psq);
-		dev_kfree_skb(skb);
-	}
-	spin_unlock_bh(&dev->ps_lock);
-	return;
-
-free:
-	dev_kfree_skb(skb);
-}
-
-void mt7603_queue_rx_skb(struct mt76_dev *mdev, enum mt76_rxq_id q,
-			 struct sk_buff *skb)
-{
-	struct mt7603_dev *dev = container_of(mdev, struct mt7603_dev, mt76);
-	__le32 *rxd = (__le32 *)skb->data;
-	__le32 *end = (__le32 *)&skb->data[skb->len];
-	enum rx_pkt_type type;
-
-	type = le32_get_bits(rxd[0], MT_RXD0_PKT_TYPE);
-
-	if (q == MT_RXQ_MCU) {
-		if (type == PKT_TYPE_RX_EVENT)
-			mt76_mcu_rx_event(&dev->mt76, skb);
-		else
-			mt7603_rx_loopback_skb(dev, skb);
-		return;
-	}
-
-	switch (type) {
-	case PKT_TYPE_TXS:
-		for (rxd++; rxd + 5 <= end; rxd += 5)
-			mt7603_mac_add_txs(dev, rxd);
-		dev_kfree_skb(skb);
-		break;
-	case PKT_TYPE_RX_EVENT:
-		mt76_mcu_rx_event(&dev->mt76, skb);
-		return;
-	case PKT_TYPE_NORMAL:
-		if (mt7603_mac_fill_rx(dev, skb) == 0) {
-			mt76_rx(&dev->mt76, q, skb);
-			return;
-		}
-		fallthrough;
-	default:
-		dev_kfree_skb(skb);
-		break;
-	}
-}
-
-static int
-mt7603_init_rx_queue(struct mt7603_dev *dev, struct mt76_queue *q,
-		     int idx, int n_desc, int bufsize)
-{
-	int err;
-
-	err = mt76_queue_alloc(dev, q, idx, n_desc, bufsize,
-			       MT_RX_RING_BASE);
-	if (err < 0)
-		return err;
-
-	mt7603_irq_enable(dev, MT_INT_RX_DONE(idx));
-
-	return 0;
-}
-
-static int mt7603_poll_tx(struct napi_struct *napi, int budget)
-{
-	struct mt7603_dev *dev;
-	int i;
-
-	dev = container_of(napi, struct mt7603_dev, mt76.tx_napi);
-	dev->tx_dma_check = 0;
-
-	mt76_queue_tx_cleanup(dev, dev->mt76.q_mcu[MT_MCUQ_WM], false);
-	for (i = MT_TXQ_PSD; i >= 0; i--)
-		mt76_queue_tx_cleanup(dev, dev->mphy.q_tx[i], false);
-
-	if (napi_complete_done(napi, 0))
-		mt7603_irq_enable(dev, MT_INT_TX_DONE_ALL);
-
-	mt76_queue_tx_cleanup(dev, dev->mt76.q_mcu[MT_MCUQ_WM], false);
-	for (i = MT_TXQ_PSD; i >= 0; i--)
-		mt76_queue_tx_cleanup(dev, dev->mphy.q_tx[i], false);
-
-	mt7603_mac_sta_poll(dev);
-
-	mt76_worker_schedule(&dev->mt76.tx_worker);
-
-	return 0;
-}
-
-int mt7603_dma_init(struct mt7603_dev *dev)
-{
-	static const u8 wmm_queue_map[] = {
-		[IEEE80211_AC_BK] = 0,
-		[IEEE80211_AC_BE] = 1,
-		[IEEE80211_AC_VI] = 2,
-		[IEEE80211_AC_VO] = 3,
-	};
-	int ret;
-	int i;
-
-	mt76_dma_attach(&dev->mt76);
-
-	mt76_clear(dev, MT_WPDMA_GLO_CFG,
-		   MT_WPDMA_GLO_CFG_TX_DMA_EN |
-		   MT_WPDMA_GLO_CFG_RX_DMA_EN |
-		   MT_WPDMA_GLO_CFG_DMA_BURST_SIZE |
-		   MT_WPDMA_GLO_CFG_TX_WRITEBACK_DONE);
-
-	mt76_wr(dev, MT_WPDMA_RST_IDX, ~0);
-	mt7603_pse_client_reset(dev);
-
-	for (i = 0; i < ARRAY_SIZE(wmm_queue_map); i++) {
-		ret = mt76_init_tx_queue(&dev->mphy, i, wmm_queue_map[i],
-					 MT7603_TX_RING_SIZE, MT_TX_RING_BASE, 0);
-		if (ret)
-			return ret;
-	}
-
-	ret = mt76_init_tx_queue(&dev->mphy, MT_TXQ_PSD, MT_TX_HW_QUEUE_MGMT,
-				 MT7603_PSD_RING_SIZE, MT_TX_RING_BASE, 0);
-	if (ret)
-		return ret;
-
-	ret = mt76_init_mcu_queue(&dev->mt76, MT_MCUQ_WM, MT_TX_HW_QUEUE_MCU,
-				  MT_MCU_RING_SIZE, MT_TX_RING_BASE);
-	if (ret)
-		return ret;
-
-	ret = mt76_init_tx_queue(&dev->mphy, MT_TXQ_BEACON, MT_TX_HW_QUEUE_BCN,
-				 MT_MCU_RING_SIZE, MT_TX_RING_BASE, 0);
-	if (ret)
-		return ret;
-
-	ret = mt76_init_tx_queue(&dev->mphy, MT_TXQ_CAB, MT_TX_HW_QUEUE_BMC,
-				 MT_MCU_RING_SIZE, MT_TX_RING_BASE, 0);
-	if (ret)
-		return ret;
-
-	mt7603_irq_enable(dev,
-			  MT_INT_TX_DONE(IEEE80211_AC_VO) |
-			  MT_INT_TX_DONE(IEEE80211_AC_VI) |
-			  MT_INT_TX_DONE(IEEE80211_AC_BE) |
-			  MT_INT_TX_DONE(IEEE80211_AC_BK) |
-			  MT_INT_TX_DONE(MT_TX_HW_QUEUE_MGMT) |
-			  MT_INT_TX_DONE(MT_TX_HW_QUEUE_MCU) |
-			  MT_INT_TX_DONE(MT_TX_HW_QUEUE_BCN) |
-			  MT_INT_TX_DONE(MT_TX_HW_QUEUE_BMC));
-
-	ret = mt7603_init_rx_queue(dev, &dev->mt76.q_rx[MT_RXQ_MCU], 1,
-				   MT7603_MCU_RX_RING_SIZE, MT_RX_BUF_SIZE);
-	if (ret)
-		return ret;
-
-	ret = mt7603_init_rx_queue(dev, &dev->mt76.q_rx[MT_RXQ_MAIN], 0,
-				   MT7603_RX_RING_SIZE, MT_RX_BUF_SIZE);
-	if (ret)
-		return ret;
-
-	mt76_wr(dev, MT_DELAY_INT_CFG, 0);
-	ret = mt76_init_queues(dev, mt76_dma_rx_poll);
-	if (ret)
-		return ret;
-
-	netif_tx_napi_add(&dev->mt76.tx_napi_dev, &dev->mt76.tx_napi,
-			  mt7603_poll_tx, NAPI_POLL_WEIGHT);
-	napi_enable(&dev->mt76.tx_napi);
-
-	return 0;
-}
-
-void mt7603_dma_cleanup(struct mt7603_dev *dev)
-{
-	mt76_clear(dev, MT_WPDMA_GLO_CFG,
-		   MT_WPDMA_GLO_CFG_TX_DMA_EN |
-		   MT_WPDMA_GLO_CFG_RX_DMA_EN |
-		   MT_WPDMA_GLO_CFG_TX_WRITEBACK_DONE);
-
-	mt76_dma_cleanup(&dev->mt76);
-}
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt7603/eeprom.c b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt7603/eeprom.c
deleted file mode 100644
index d951cb8..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt7603/eeprom.c
+++ /dev/null
@@ -1,187 +0,0 @@
-// SPDX-License-Identifier: ISC
-
-#include <linux/of.h>
-#include "mt7603.h"
-#include "eeprom.h"
-
-static int
-mt7603_efuse_read(struct mt7603_dev *dev, u32 base, u16 addr, u8 *data)
-{
-	u32 val;
-	int i;
-
-	val = mt76_rr(dev, base + MT_EFUSE_CTRL);
-	val &= ~(MT_EFUSE_CTRL_AIN |
-		 MT_EFUSE_CTRL_MODE);
-	val |= FIELD_PREP(MT_EFUSE_CTRL_AIN, addr & ~0xf);
-	val |= MT_EFUSE_CTRL_KICK;
-	mt76_wr(dev, base + MT_EFUSE_CTRL, val);
-
-	if (!mt76_poll(dev, base + MT_EFUSE_CTRL, MT_EFUSE_CTRL_KICK, 0, 1000))
-		return -ETIMEDOUT;
-
-	udelay(2);
-
-	val = mt76_rr(dev, base + MT_EFUSE_CTRL);
-	if ((val & MT_EFUSE_CTRL_AOUT) == MT_EFUSE_CTRL_AOUT ||
-	    WARN_ON_ONCE(!(val & MT_EFUSE_CTRL_VALID))) {
-		memset(data, 0xff, 16);
-		return 0;
-	}
-
-	for (i = 0; i < 4; i++) {
-		val = mt76_rr(dev, base + MT_EFUSE_RDATA(i));
-		put_unaligned_le32(val, data + 4 * i);
-	}
-
-	return 0;
-}
-
-static int
-mt7603_efuse_init(struct mt7603_dev *dev)
-{
-	u32 base = mt7603_reg_map(dev, MT_EFUSE_BASE);
-	int len = MT7603_EEPROM_SIZE;
-	void *buf;
-	int ret, i;
-
-	if (mt76_rr(dev, base + MT_EFUSE_BASE_CTRL) & MT_EFUSE_BASE_CTRL_EMPTY)
-		return 0;
-
-	dev->mt76.otp.data = devm_kzalloc(dev->mt76.dev, len, GFP_KERNEL);
-	dev->mt76.otp.size = len;
-	if (!dev->mt76.otp.data)
-		return -ENOMEM;
-
-	buf = dev->mt76.otp.data;
-	for (i = 0; i + 16 <= len; i += 16) {
-		ret = mt7603_efuse_read(dev, base, i, buf + i);
-		if (ret)
-			return ret;
-	}
-
-	return 0;
-}
-
-static bool
-mt7603_has_cal_free_data(struct mt7603_dev *dev, u8 *efuse)
-{
-	if (!efuse[MT_EE_TEMP_SENSOR_CAL])
-		return false;
-
-	if (get_unaligned_le16(efuse + MT_EE_TX_POWER_0_START_2G) == 0)
-		return false;
-
-	if (get_unaligned_le16(efuse + MT_EE_TX_POWER_1_START_2G) == 0)
-		return false;
-
-	if (!efuse[MT_EE_CP_FT_VERSION])
-		return false;
-
-	if (!efuse[MT_EE_XTAL_FREQ_OFFSET])
-		return false;
-
-	if (!efuse[MT_EE_XTAL_WF_RFCAL])
-		return false;
-
-	return true;
-}
-
-static void
-mt7603_apply_cal_free_data(struct mt7603_dev *dev, u8 *efuse)
-{
-	static const u8 cal_free_bytes[] = {
-		MT_EE_TEMP_SENSOR_CAL,
-		MT_EE_CP_FT_VERSION,
-		MT_EE_XTAL_FREQ_OFFSET,
-		MT_EE_XTAL_WF_RFCAL,
-		/* Skip for MT7628 */
-		MT_EE_TX_POWER_0_START_2G,
-		MT_EE_TX_POWER_0_START_2G + 1,
-		MT_EE_TX_POWER_1_START_2G,
-		MT_EE_TX_POWER_1_START_2G + 1,
-	};
-	struct device_node *np = dev->mt76.dev->of_node;
-	u8 *eeprom = dev->mt76.eeprom.data;
-	int n = ARRAY_SIZE(cal_free_bytes);
-	int i;
-
-	if (!np || !of_property_read_bool(np, "mediatek,eeprom-merge-otp"))
-		return;
-
-	if (!mt7603_has_cal_free_data(dev, efuse))
-		return;
-
-	if (is_mt7628(dev))
-		n -= 4;
-
-	for (i = 0; i < n; i++) {
-		int offset = cal_free_bytes[i];
-
-		eeprom[offset] = efuse[offset];
-	}
-}
-
-static int
-mt7603_eeprom_load(struct mt7603_dev *dev)
-{
-	int ret;
-
-	ret = mt76_eeprom_init(&dev->mt76, MT7603_EEPROM_SIZE);
-	if (ret < 0)
-		return ret;
-
-	return mt7603_efuse_init(dev);
-}
-
-static int mt7603_check_eeprom(struct mt76_dev *dev)
-{
-	u16 val = get_unaligned_le16(dev->eeprom.data);
-
-	switch (val) {
-	case 0x7628:
-	case 0x7603:
-	case 0x7600:
-		return 0;
-	default:
-		return -EINVAL;
-	}
-}
-
-static inline bool is_mt7688(struct mt7603_dev *dev)
-{
-	return mt76_rr(dev, MT_EFUSE_BASE + 0x64) & BIT(4);
-}
-
-int mt7603_eeprom_init(struct mt7603_dev *dev)
-{
-	u8 *eeprom;
-	int ret;
-
-	ret = mt7603_eeprom_load(dev);
-	if (ret < 0)
-		return ret;
-
-	if (dev->mt76.otp.data) {
-		if (mt7603_check_eeprom(&dev->mt76) == 0)
-			mt7603_apply_cal_free_data(dev, dev->mt76.otp.data);
-		else
-			memcpy(dev->mt76.eeprom.data, dev->mt76.otp.data,
-			       MT7603_EEPROM_SIZE);
-	}
-
-	eeprom = (u8 *)dev->mt76.eeprom.data;
-	dev->mphy.cap.has_2ghz = true;
-	memcpy(dev->mphy.macaddr, eeprom + MT_EE_MAC_ADDR, ETH_ALEN);
-
-	/* Check for 1SS devices */
-	dev->mphy.antenna_mask = 3;
-	if (FIELD_GET(MT_EE_NIC_CONF_0_RX_PATH, eeprom[MT_EE_NIC_CONF_0]) == 1 ||
-	    FIELD_GET(MT_EE_NIC_CONF_0_TX_PATH, eeprom[MT_EE_NIC_CONF_0]) == 1 ||
-	    is_mt7688(dev))
-		dev->mphy.antenna_mask = 1;
-
-	mt76_eeprom_override(&dev->mphy);
-
-	return 0;
-}
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt7603/eeprom.h b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt7603/eeprom.h
deleted file mode 100644
index 4687d6d..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt7603/eeprom.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/* SPDX-License-Identifier: ISC */
-
-#ifndef __MT7603_EEPROM_H
-#define __MT7603_EEPROM_H
-
-#include "mt7603.h"
-
-enum mt7603_eeprom_field {
-	MT_EE_CHIP_ID =				0x000,
-	MT_EE_VERSION =				0x002,
-	MT_EE_MAC_ADDR =			0x004,
-	MT_EE_NIC_CONF_0 =			0x034,
-	MT_EE_NIC_CONF_1 =			0x036,
-	MT_EE_NIC_CONF_2 =			0x042,
-
-	MT_EE_XTAL_TRIM_1 =			0x03a,
-
-	MT_EE_RSSI_OFFSET_2G =			0x046,
-	MT_EE_WIFI_RF_SETTING =			0x048,
-	MT_EE_RSSI_OFFSET_5G =			0x04a,
-
-	MT_EE_TX_POWER_DELTA_BW40 =		0x050,
-	MT_EE_TX_POWER_DELTA_BW80 =		0x052,
-
-	MT_EE_TX_POWER_EXT_PA_5G =		0x054,
-
-	MT_EE_TEMP_SENSOR_CAL =			0x055,
-
-	MT_EE_TX_POWER_0_START_2G =		0x056,
-	MT_EE_TX_POWER_1_START_2G =		0x05c,
-
-	/* used as byte arrays */
-#define MT_TX_POWER_GROUP_SIZE_5G		5
-#define MT_TX_POWER_GROUPS_5G			6
-	MT_EE_TX_POWER_0_START_5G =		0x062,
-
-	MT_EE_TX_POWER_0_GRP3_TX_POWER_DELTA =	0x074,
-	MT_EE_TX_POWER_0_GRP4_TSSI_SLOPE =	0x076,
-
-	MT_EE_TX_POWER_1_START_5G =		0x080,
-
-	MT_EE_TX_POWER_CCK =			0x0a0,
-	MT_EE_TX_POWER_OFDM_2G_6M =		0x0a2,
-	MT_EE_TX_POWER_OFDM_2G_24M =		0x0a4,
-	MT_EE_TX_POWER_OFDM_2G_54M =		0x0a6,
-	MT_EE_TX_POWER_HT_BPSK_QPSK =		0x0a8,
-	MT_EE_TX_POWER_HT_16_64_QAM =		0x0aa,
-	MT_EE_TX_POWER_HT_64_QAM =		0x0ac,
-
-	MT_EE_ELAN_RX_MODE_GAIN =		0x0c0,
-	MT_EE_ELAN_RX_MODE_NF =			0x0c1,
-	MT_EE_ELAN_RX_MODE_P1DB =		0x0c2,
-
-	MT_EE_ELAN_BYPASS_MODE_GAIN =		0x0c3,
-	MT_EE_ELAN_BYPASS_MODE_NF =		0x0c4,
-	MT_EE_ELAN_BYPASS_MODE_P1DB =		0x0c5,
-
-	MT_EE_STEP_NUM_NEG_6_7 =		0x0c6,
-	MT_EE_STEP_NUM_NEG_4_5 =		0x0c8,
-	MT_EE_STEP_NUM_NEG_2_3 =		0x0ca,
-	MT_EE_STEP_NUM_NEG_0_1 =		0x0cc,
-
-	MT_EE_REF_STEP_24G =			0x0ce,
-
-	MT_EE_STEP_NUM_PLUS_1_2 =		0x0d0,
-	MT_EE_STEP_NUM_PLUS_3_4 =		0x0d2,
-	MT_EE_STEP_NUM_PLUS_5_6 =		0x0d4,
-	MT_EE_STEP_NUM_PLUS_7 =			0x0d6,
-
-	MT_EE_CP_FT_VERSION =			0x0f0,
-
-	MT_EE_TX_POWER_TSSI_OFF =		0x0f2,
-
-	MT_EE_XTAL_FREQ_OFFSET =		0x0f4,
-	MT_EE_XTAL_TRIM_2_COMP =		0x0f5,
-	MT_EE_XTAL_TRIM_3_COMP =		0x0f6,
-	MT_EE_XTAL_WF_RFCAL =			0x0f7,
-
-	__MT_EE_MAX
-};
-
-enum mt7603_eeprom_source {
-	MT_EE_SRC_PROM,
-	MT_EE_SRC_EFUSE,
-	MT_EE_SRC_FLASH,
-};
-
-#define MT_EE_NIC_CONF_0_RX_PATH		GENMASK(3, 0)
-#define MT_EE_NIC_CONF_0_TX_PATH		GENMASK(7, 4)
-
-#endif
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt7603/init.c b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt7603/init.c
deleted file mode 100644
index 031d39a..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt7603/init.c
+++ /dev/null
@@ -1,562 +0,0 @@
-// SPDX-License-Identifier: ISC
-
-#include <linux/etherdevice.h>
-#include "mt7603.h"
-#include "mac.h"
-#include "eeprom.h"
-
-const struct mt76_driver_ops mt7603_drv_ops = {
-	.txwi_size = MT_TXD_SIZE,
-	.drv_flags = MT_DRV_SW_RX_AIRTIME,
-	.survey_flags = SURVEY_INFO_TIME_TX,
-	.tx_prepare_skb = mt7603_tx_prepare_skb,
-	.tx_complete_skb = mt7603_tx_complete_skb,
-	.rx_skb = mt7603_queue_rx_skb,
-	.rx_poll_complete = mt7603_rx_poll_complete,
-	.sta_ps = mt7603_sta_ps,
-	.sta_add = mt7603_sta_add,
-	.sta_assoc = mt7603_sta_assoc,
-	.sta_remove = mt7603_sta_remove,
-	.update_survey = mt7603_update_channel,
-};
-
-static void
-mt7603_set_tmac_template(struct mt7603_dev *dev)
-{
-	u32 desc[5] = {
-		[1] = FIELD_PREP(MT_TXD3_REM_TX_COUNT, 0xf),
-		[3] = MT_TXD5_SW_POWER_MGMT
-	};
-	u32 addr;
-	int i;
-
-	addr = mt7603_reg_map(dev, MT_CLIENT_BASE_PHYS_ADDR);
-	addr += MT_CLIENT_TMAC_INFO_TEMPLATE;
-	for (i = 0; i < ARRAY_SIZE(desc); i++)
-		mt76_wr(dev, addr + 4 * i, desc[i]);
-}
-
-static void
-mt7603_dma_sched_init(struct mt7603_dev *dev)
-{
-	int page_size = 128;
-	int page_count;
-	int max_len = 1792;
-	int max_amsdu_pages = 4096 / page_size;
-	int max_mcu_len = 4096;
-	int max_beacon_len = 512 * 4 + max_len;
-	int max_mcast_pages = 4 * max_len / page_size;
-	int reserved_count = 0;
-	int beacon_pages;
-	int mcu_pages;
-	int i;
-
-	page_count = mt76_get_field(dev, MT_PSE_FC_P0,
-				    MT_PSE_FC_P0_MAX_QUOTA);
-	beacon_pages = 4 * (max_beacon_len / page_size);
-	mcu_pages = max_mcu_len / page_size;
-
-	mt76_wr(dev, MT_PSE_FRP,
-		FIELD_PREP(MT_PSE_FRP_P0, 7) |
-		FIELD_PREP(MT_PSE_FRP_P1, 6) |
-		FIELD_PREP(MT_PSE_FRP_P2_RQ2, 4));
-
-	mt76_wr(dev, MT_HIGH_PRIORITY_1, 0x55555553);
-	mt76_wr(dev, MT_HIGH_PRIORITY_2, 0x78555555);
-
-	mt76_wr(dev, MT_QUEUE_PRIORITY_1, 0x2b1a096e);
-	mt76_wr(dev, MT_QUEUE_PRIORITY_2, 0x785f4d3c);
-
-	mt76_wr(dev, MT_PRIORITY_MASK, 0xffffffff);
-
-	mt76_wr(dev, MT_SCH_1, page_count | (2 << 28));
-	mt76_wr(dev, MT_SCH_2, max_amsdu_pages);
-
-	for (i = 0; i <= 4; i++)
-		mt76_wr(dev, MT_PAGE_COUNT(i), max_amsdu_pages);
-	reserved_count += 5 * max_amsdu_pages;
-
-	mt76_wr(dev, MT_PAGE_COUNT(5), mcu_pages);
-	reserved_count += mcu_pages;
-
-	mt76_wr(dev, MT_PAGE_COUNT(7), beacon_pages);
-	reserved_count += beacon_pages;
-
-	mt76_wr(dev, MT_PAGE_COUNT(8), max_mcast_pages);
-	reserved_count += max_mcast_pages;
-
-	if (is_mt7603(dev))
-		reserved_count = 0;
-
-	mt76_wr(dev, MT_RSV_MAX_THRESH, page_count - reserved_count);
-
-	if (is_mt7603(dev) && mt76xx_rev(dev) >= MT7603_REV_E2) {
-		mt76_wr(dev, MT_GROUP_THRESH(0),
-			page_count - beacon_pages - mcu_pages);
-		mt76_wr(dev, MT_GROUP_THRESH(1), beacon_pages);
-		mt76_wr(dev, MT_BMAP_0, 0x0080ff5f);
-		mt76_wr(dev, MT_GROUP_THRESH(2), mcu_pages);
-		mt76_wr(dev, MT_BMAP_1, 0x00000020);
-	} else {
-		mt76_wr(dev, MT_GROUP_THRESH(0), page_count);
-		mt76_wr(dev, MT_BMAP_0, 0xffff);
-	}
-
-	mt76_wr(dev, MT_SCH_4, 0);
-
-	for (i = 0; i <= 15; i++)
-		mt76_wr(dev, MT_TXTIME_THRESH(i), 0xfffff);
-
-	mt76_set(dev, MT_SCH_4, BIT(6));
-}
-
-static void
-mt7603_phy_init(struct mt7603_dev *dev)
-{
-	int rx_chains = dev->mphy.antenna_mask;
-	int tx_chains = hweight8(rx_chains) - 1;
-
-	mt76_rmw(dev, MT_WF_RMAC_RMCR,
-		 (MT_WF_RMAC_RMCR_SMPS_MODE |
-		  MT_WF_RMAC_RMCR_RX_STREAMS),
-		 (FIELD_PREP(MT_WF_RMAC_RMCR_SMPS_MODE, 3) |
-		  FIELD_PREP(MT_WF_RMAC_RMCR_RX_STREAMS, rx_chains)));
-
-	mt76_rmw_field(dev, MT_TMAC_TCR, MT_TMAC_TCR_TX_STREAMS,
-		       tx_chains);
-
-	dev->agc0 = mt76_rr(dev, MT_AGC(0));
-	dev->agc3 = mt76_rr(dev, MT_AGC(3));
-}
-
-static void
-mt7603_mac_init(struct mt7603_dev *dev)
-{
-	u8 bc_addr[ETH_ALEN];
-	u32 addr;
-	int i;
-
-	mt76_wr(dev, MT_AGG_BA_SIZE_LIMIT_0,
-		(MT_AGG_SIZE_LIMIT(0) << 0 * MT_AGG_BA_SIZE_LIMIT_SHIFT) |
-		(MT_AGG_SIZE_LIMIT(1) << 1 * MT_AGG_BA_SIZE_LIMIT_SHIFT) |
-		(MT_AGG_SIZE_LIMIT(2) << 2 * MT_AGG_BA_SIZE_LIMIT_SHIFT) |
-		(MT_AGG_SIZE_LIMIT(3) << 3 * MT_AGG_BA_SIZE_LIMIT_SHIFT));
-
-	mt76_wr(dev, MT_AGG_BA_SIZE_LIMIT_1,
-		(MT_AGG_SIZE_LIMIT(4) << 0 * MT_AGG_BA_SIZE_LIMIT_SHIFT) |
-		(MT_AGG_SIZE_LIMIT(5) << 1 * MT_AGG_BA_SIZE_LIMIT_SHIFT) |
-		(MT_AGG_SIZE_LIMIT(6) << 2 * MT_AGG_BA_SIZE_LIMIT_SHIFT) |
-		(MT_AGG_SIZE_LIMIT(7) << 3 * MT_AGG_BA_SIZE_LIMIT_SHIFT));
-
-	mt76_wr(dev, MT_AGG_LIMIT,
-		FIELD_PREP(MT_AGG_LIMIT_AC(0), 24) |
-		FIELD_PREP(MT_AGG_LIMIT_AC(1), 24) |
-		FIELD_PREP(MT_AGG_LIMIT_AC(2), 24) |
-		FIELD_PREP(MT_AGG_LIMIT_AC(3), 24));
-
-	mt76_wr(dev, MT_AGG_LIMIT_1,
-		FIELD_PREP(MT_AGG_LIMIT_AC(0), 24) |
-		FIELD_PREP(MT_AGG_LIMIT_AC(1), 24) |
-		FIELD_PREP(MT_AGG_LIMIT_AC(2), 24) |
-		FIELD_PREP(MT_AGG_LIMIT_AC(3), 24));
-
-	mt76_wr(dev, MT_AGG_CONTROL,
-		FIELD_PREP(MT_AGG_CONTROL_BAR_RATE, 0x4b) |
-		FIELD_PREP(MT_AGG_CONTROL_CFEND_RATE, 0x69) |
-		MT_AGG_CONTROL_NO_BA_AR_RULE);
-
-	mt76_wr(dev, MT_AGG_RETRY_CONTROL,
-		FIELD_PREP(MT_AGG_RETRY_CONTROL_BAR_LIMIT, 1) |
-		FIELD_PREP(MT_AGG_RETRY_CONTROL_RTS_LIMIT, 15));
-
-	mt76_wr(dev, MT_DMA_DCR0, MT_DMA_DCR0_RX_VEC_DROP |
-		FIELD_PREP(MT_DMA_DCR0_MAX_RX_LEN, 4096));
-
-	mt76_rmw(dev, MT_DMA_VCFR0, BIT(0), BIT(13));
-	mt76_rmw(dev, MT_DMA_TMCFR0, BIT(0) | BIT(1), BIT(13));
-
-	mt76_clear(dev, MT_WF_RMAC_TMR_PA, BIT(31));
-
-	mt76_set(dev, MT_WF_RMACDR, MT_WF_RMACDR_MAXLEN_20BIT);
-	mt76_rmw(dev, MT_WF_RMAC_MAXMINLEN, 0xffffff, 0x19000);
-
-	mt76_wr(dev, MT_WF_RFCR1, 0);
-
-	mt76_set(dev, MT_TMAC_TCR, MT_TMAC_TCR_RX_RIFS_MODE);
-
-	mt7603_set_tmac_template(dev);
-
-	/* Enable RX group to HIF */
-	addr = mt7603_reg_map(dev, MT_CLIENT_BASE_PHYS_ADDR);
-	mt76_set(dev, addr + MT_CLIENT_RXINF, MT_CLIENT_RXINF_RXSH_GROUPS);
-
-	/* Enable RX group to MCU */
-	mt76_set(dev, MT_DMA_DCR1, GENMASK(13, 11));
-
-	mt76_rmw_field(dev, MT_AGG_PCR_RTS, MT_AGG_PCR_RTS_PKT_THR, 3);
-	mt76_set(dev, MT_TMAC_PCR, MT_TMAC_PCR_SPE_EN);
-
-	/* include preamble detection in CCA trigger signal */
-	mt76_rmw_field(dev, MT_TXREQ, MT_TXREQ_CCA_SRC_SEL, 2);
-
-	mt76_wr(dev, MT_RXREQ, 4);
-
-	/* Configure all rx packets to HIF */
-	mt76_wr(dev, MT_DMA_RCFR0, 0xc0000000);
-
-	/* Configure MCU txs selection with aggregation */
-	mt76_wr(dev, MT_DMA_TCFR0,
-		FIELD_PREP(MT_DMA_TCFR_TXS_AGGR_TIMEOUT, 1) | /* 32 us */
-		MT_DMA_TCFR_TXS_AGGR_COUNT);
-
-	/* Configure HIF txs selection with aggregation */
-	mt76_wr(dev, MT_DMA_TCFR1,
-		FIELD_PREP(MT_DMA_TCFR_TXS_AGGR_TIMEOUT, 1) | /* 32 us */
-		MT_DMA_TCFR_TXS_AGGR_COUNT | /* Maximum count */
-		MT_DMA_TCFR_TXS_BIT_MAP);
-
-	mt76_wr(dev, MT_MCU_PCIE_REMAP_1, MT_PSE_WTBL_2_PHYS_ADDR);
-
-	for (i = 0; i < MT7603_WTBL_SIZE; i++)
-		mt7603_wtbl_clear(dev, i);
-
-	eth_broadcast_addr(bc_addr);
-	mt7603_wtbl_init(dev, MT7603_WTBL_RESERVED, -1, bc_addr);
-	dev->global_sta.wcid.idx = MT7603_WTBL_RESERVED;
-	rcu_assign_pointer(dev->mt76.wcid[MT7603_WTBL_RESERVED],
-			   &dev->global_sta.wcid);
-
-	mt76_rmw_field(dev, MT_LPON_BTEIR, MT_LPON_BTEIR_MBSS_MODE, 2);
-	mt76_rmw_field(dev, MT_WF_RMACDR, MT_WF_RMACDR_MBSSID_MASK, 2);
-
-	mt76_wr(dev, MT_AGG_ARUCR,
-		FIELD_PREP(MT_AGG_ARxCR_LIMIT(0), 7) |
-		FIELD_PREP(MT_AGG_ARxCR_LIMIT(1), 2) |
-		FIELD_PREP(MT_AGG_ARxCR_LIMIT(2), 2) |
-		FIELD_PREP(MT_AGG_ARxCR_LIMIT(3), 2) |
-		FIELD_PREP(MT_AGG_ARxCR_LIMIT(4), 1) |
-		FIELD_PREP(MT_AGG_ARxCR_LIMIT(5), 1) |
-		FIELD_PREP(MT_AGG_ARxCR_LIMIT(6), 1) |
-		FIELD_PREP(MT_AGG_ARxCR_LIMIT(7), 1));
-
-	mt76_wr(dev, MT_AGG_ARDCR,
-		FIELD_PREP(MT_AGG_ARxCR_LIMIT(0), MT7603_RATE_RETRY - 1) |
-		FIELD_PREP(MT_AGG_ARxCR_LIMIT(1), MT7603_RATE_RETRY - 1) |
-		FIELD_PREP(MT_AGG_ARxCR_LIMIT(2), MT7603_RATE_RETRY - 1) |
-		FIELD_PREP(MT_AGG_ARxCR_LIMIT(3), MT7603_RATE_RETRY - 1) |
-		FIELD_PREP(MT_AGG_ARxCR_LIMIT(4), MT7603_RATE_RETRY - 1) |
-		FIELD_PREP(MT_AGG_ARxCR_LIMIT(5), MT7603_RATE_RETRY - 1) |
-		FIELD_PREP(MT_AGG_ARxCR_LIMIT(6), MT7603_RATE_RETRY - 1) |
-		FIELD_PREP(MT_AGG_ARxCR_LIMIT(7), MT7603_RATE_RETRY - 1));
-
-	mt76_wr(dev, MT_AGG_ARCR,
-		(FIELD_PREP(MT_AGG_ARCR_RTS_RATE_THR, 2) |
-		 MT_AGG_ARCR_RATE_DOWN_RATIO_EN |
-		 FIELD_PREP(MT_AGG_ARCR_RATE_DOWN_RATIO, 1) |
-		 FIELD_PREP(MT_AGG_ARCR_RATE_UP_EXTRA_TH, 4)));
-
-	mt76_set(dev, MT_WTBL_RMVTCR, MT_WTBL_RMVTCR_RX_MV_MODE);
-
-	mt76_clear(dev, MT_SEC_SCR, MT_SEC_SCR_MASK_ORDER);
-	mt76_clear(dev, MT_SEC_SCR, BIT(18));
-
-	/* Set secondary beacon time offsets */
-	for (i = 0; i <= 4; i++)
-		mt76_rmw_field(dev, MT_LPON_SBTOR(i), MT_LPON_SBTOR_TIME_OFFSET,
-			       (i + 1) * (20 + 4096));
-}
-
-static int
-mt7603_init_hardware(struct mt7603_dev *dev)
-{
-	int i, ret;
-
-	mt76_wr(dev, MT_INT_SOURCE_CSR, ~0);
-
-	ret = mt7603_eeprom_init(dev);
-	if (ret < 0)
-		return ret;
-
-	ret = mt7603_dma_init(dev);
-	if (ret)
-		return ret;
-
-	mt76_wr(dev, MT_WPDMA_GLO_CFG, 0x52000850);
-	mt7603_mac_dma_start(dev);
-	dev->rxfilter = mt76_rr(dev, MT_WF_RFCR);
-	set_bit(MT76_STATE_INITIALIZED, &dev->mphy.state);
-
-	for (i = 0; i < MT7603_WTBL_SIZE; i++) {
-		mt76_wr(dev, MT_PSE_RTA, MT_PSE_RTA_BUSY | MT_PSE_RTA_WRITE |
-			FIELD_PREP(MT_PSE_RTA_TAG_ID, i));
-		mt76_poll(dev, MT_PSE_RTA, MT_PSE_RTA_BUSY, 0, 5000);
-	}
-
-	ret = mt7603_mcu_init(dev);
-	if (ret)
-		return ret;
-
-	mt7603_dma_sched_init(dev);
-	mt7603_mcu_set_eeprom(dev);
-	mt7603_phy_init(dev);
-	mt7603_mac_init(dev);
-
-	return 0;
-}
-
-static const struct ieee80211_iface_limit if_limits[] = {
-	{
-		.max = 1,
-		.types = BIT(NL80211_IFTYPE_ADHOC)
-	}, {
-		.max = MT7603_MAX_INTERFACES,
-		.types = BIT(NL80211_IFTYPE_STATION) |
-#ifdef CONFIG_MAC80211_MESH
-			 BIT(NL80211_IFTYPE_MESH_POINT) |
-#endif
-			 BIT(NL80211_IFTYPE_P2P_CLIENT) |
-			 BIT(NL80211_IFTYPE_P2P_GO) |
-			 BIT(NL80211_IFTYPE_AP)
-	 },
-};
-
-static const struct ieee80211_iface_combination if_comb[] = {
-	{
-		.limits = if_limits,
-		.n_limits = ARRAY_SIZE(if_limits),
-		.max_interfaces = 4,
-		.num_different_channels = 1,
-		.beacon_int_infra_match = true,
-	}
-};
-
-static void mt7603_led_set_config(struct mt76_dev *mt76, u8 delay_on,
-				  u8 delay_off)
-{
-	struct mt7603_dev *dev = container_of(mt76, struct mt7603_dev,
-					      mt76);
-	u32 val, addr;
-
-	val = FIELD_PREP(MT_LED_STATUS_DURATION, 0xffff) |
-	      FIELD_PREP(MT_LED_STATUS_OFF, delay_off) |
-	      FIELD_PREP(MT_LED_STATUS_ON, delay_on);
-
-	addr = mt7603_reg_map(dev, MT_LED_STATUS_0(mt76->led_pin));
-	mt76_wr(dev, addr, val);
-	addr = mt7603_reg_map(dev, MT_LED_STATUS_1(mt76->led_pin));
-	mt76_wr(dev, addr, val);
-
-	val = MT_LED_CTRL_REPLAY(mt76->led_pin) |
-	      MT_LED_CTRL_KICK(mt76->led_pin);
-	if (mt76->led_al)
-		val |= MT_LED_CTRL_POLARITY(mt76->led_pin);
-	addr = mt7603_reg_map(dev, MT_LED_CTRL);
-	mt76_wr(dev, addr, val);
-}
-
-static int mt7603_led_set_blink(struct led_classdev *led_cdev,
-				unsigned long *delay_on,
-				unsigned long *delay_off)
-{
-	struct mt76_dev *mt76 = container_of(led_cdev, struct mt76_dev,
-					     led_cdev);
-	u8 delta_on, delta_off;
-
-	delta_off = max_t(u8, *delay_off / 10, 1);
-	delta_on = max_t(u8, *delay_on / 10, 1);
-
-	mt7603_led_set_config(mt76, delta_on, delta_off);
-	return 0;
-}
-
-static void mt7603_led_set_brightness(struct led_classdev *led_cdev,
-				      enum led_brightness brightness)
-{
-	struct mt76_dev *mt76 = container_of(led_cdev, struct mt76_dev,
-					     led_cdev);
-
-	if (!brightness)
-		mt7603_led_set_config(mt76, 0, 0xff);
-	else
-		mt7603_led_set_config(mt76, 0xff, 0);
-}
-
-static u32 __mt7603_reg_addr(struct mt7603_dev *dev, u32 addr)
-{
-	if (addr < 0x100000)
-		return addr;
-
-	return mt7603_reg_map(dev, addr);
-}
-
-static u32 mt7603_rr(struct mt76_dev *mdev, u32 offset)
-{
-	struct mt7603_dev *dev = container_of(mdev, struct mt7603_dev, mt76);
-	u32 addr = __mt7603_reg_addr(dev, offset);
-
-	return dev->bus_ops->rr(mdev, addr);
-}
-
-static void mt7603_wr(struct mt76_dev *mdev, u32 offset, u32 val)
-{
-	struct mt7603_dev *dev = container_of(mdev, struct mt7603_dev, mt76);
-	u32 addr = __mt7603_reg_addr(dev, offset);
-
-	dev->bus_ops->wr(mdev, addr, val);
-}
-
-static u32 mt7603_rmw(struct mt76_dev *mdev, u32 offset, u32 mask, u32 val)
-{
-	struct mt7603_dev *dev = container_of(mdev, struct mt7603_dev, mt76);
-	u32 addr = __mt7603_reg_addr(dev, offset);
-
-	return dev->bus_ops->rmw(mdev, addr, mask, val);
-}
-
-static void
-mt7603_regd_notifier(struct wiphy *wiphy,
-		     struct regulatory_request *request)
-{
-	struct ieee80211_hw *hw = wiphy_to_ieee80211_hw(wiphy);
-	struct mt7603_dev *dev = hw->priv;
-
-	dev->mt76.region = request->dfs_region;
-	dev->ed_monitor = dev->ed_monitor_enabled &&
-			  dev->mt76.region == NL80211_DFS_ETSI;
-}
-
-static int
-mt7603_txpower_signed(int val)
-{
-	bool sign = val & BIT(6);
-
-	if (!(val & BIT(7)))
-		return 0;
-
-	val &= GENMASK(5, 0);
-	if (!sign)
-		val = -val;
-
-	return val;
-}
-
-static void
-mt7603_init_txpower(struct mt7603_dev *dev,
-		    struct ieee80211_supported_band *sband)
-{
-	struct ieee80211_channel *chan;
-	u8 *eeprom = (u8 *)dev->mt76.eeprom.data;
-	int target_power = eeprom[MT_EE_TX_POWER_0_START_2G + 2] & ~BIT(7);
-	u8 *rate_power = &eeprom[MT_EE_TX_POWER_CCK];
-	bool ext_pa = eeprom[MT_EE_NIC_CONF_0 + 1] & BIT(1);
-	int max_offset, cur_offset;
-	int i;
-
-	if (ext_pa && is_mt7603(dev))
-		target_power = eeprom[MT_EE_TX_POWER_TSSI_OFF] & ~BIT(7);
-
-	if (target_power & BIT(6))
-		target_power = -(target_power & GENMASK(5, 0));
-
-	max_offset = 0;
-	for (i = 0; i < 14; i++) {
-		cur_offset = mt7603_txpower_signed(rate_power[i]);
-		max_offset = max(max_offset, cur_offset);
-	}
-
-	target_power += max_offset;
-
-	dev->tx_power_limit = target_power;
-	dev->mphy.txpower_cur = target_power;
-
-	target_power = DIV_ROUND_UP(target_power, 2);
-
-	/* add 3 dBm for 2SS devices (combined output) */
-	if (dev->mphy.antenna_mask & BIT(1))
-		target_power += 3;
-
-	for (i = 0; i < sband->n_channels; i++) {
-		chan = &sband->channels[i];
-		chan->max_power = min_t(int, chan->max_reg_power, target_power);
-		chan->orig_mpwr = target_power;
-	}
-}
-
-int mt7603_register_device(struct mt7603_dev *dev)
-{
-	struct mt76_bus_ops *bus_ops;
-	struct ieee80211_hw *hw = mt76_hw(dev);
-	struct wiphy *wiphy = hw->wiphy;
-	int ret;
-
-	dev->bus_ops = dev->mt76.bus;
-	bus_ops = devm_kmemdup(dev->mt76.dev, dev->bus_ops, sizeof(*bus_ops),
-			       GFP_KERNEL);
-	if (!bus_ops)
-		return -ENOMEM;
-
-	bus_ops->rr = mt7603_rr;
-	bus_ops->wr = mt7603_wr;
-	bus_ops->rmw = mt7603_rmw;
-	dev->mt76.bus = bus_ops;
-
-	INIT_LIST_HEAD(&dev->sta_poll_list);
-	spin_lock_init(&dev->sta_poll_lock);
-	spin_lock_init(&dev->ps_lock);
-
-	INIT_DELAYED_WORK(&dev->mphy.mac_work, mt7603_mac_work);
-	tasklet_setup(&dev->mt76.pre_tbtt_tasklet, mt7603_pre_tbtt_tasklet);
-
-	dev->slottime = 9;
-	dev->sensitivity_limit = 28;
-	dev->dynamic_sensitivity = true;
-
-	ret = mt7603_init_hardware(dev);
-	if (ret)
-		return ret;
-
-	hw->queues = 4;
-	hw->max_rates = 3;
-	hw->max_report_rates = 7;
-	hw->max_rate_tries = 11;
-
-	hw->radiotap_timestamp.units_pos =
-		IEEE80211_RADIOTAP_TIMESTAMP_UNIT_US;
-
-	hw->sta_data_size = sizeof(struct mt7603_sta);
-	hw->vif_data_size = sizeof(struct mt7603_vif);
-
-	wiphy->iface_combinations = if_comb;
-	wiphy->n_iface_combinations = ARRAY_SIZE(if_comb);
-
-	ieee80211_hw_set(hw, TX_STATUS_NO_AMPDU_LEN);
-	ieee80211_hw_set(hw, HOST_BROADCAST_PS_BUFFERING);
-	ieee80211_hw_set(hw, NEEDS_UNIQUE_STA_ADDR);
-
-	/* init led callbacks */
-	if (IS_ENABLED(CONFIG_MT76_LEDS)) {
-		dev->mt76.led_cdev.brightness_set = mt7603_led_set_brightness;
-		dev->mt76.led_cdev.blink_set = mt7603_led_set_blink;
-	}
-
-	wiphy->reg_notifier = mt7603_regd_notifier;
-
-	ret = mt76_register_device(&dev->mt76, true, mt76_rates,
-				   ARRAY_SIZE(mt76_rates));
-	if (ret)
-		return ret;
-
-	mt7603_init_debugfs(dev);
-	mt7603_init_txpower(dev, &dev->mphy.sband_2g.sband);
-
-	return 0;
-}
-
-void mt7603_unregister_device(struct mt7603_dev *dev)
-{
-	tasklet_disable(&dev->mt76.pre_tbtt_tasklet);
-	mt76_unregister_device(&dev->mt76);
-	mt7603_mcu_exit(dev);
-	mt7603_dma_cleanup(dev);
-	mt76_free_device(&dev->mt76);
-}
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt7603/mac.c b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt7603/mac.c
deleted file mode 100644
index 17713c8..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt7603/mac.c
+++ /dev/null
@@ -1,1876 +0,0 @@
-// SPDX-License-Identifier: ISC
-
-#include <linux/etherdevice.h>
-#include <linux/timekeeping.h>
-#include "mt7603.h"
-#include "mac.h"
-#include "../trace.h"
-
-#define MT_PSE_PAGE_SIZE	128
-
-static u32
-mt7603_ac_queue_mask0(u32 mask)
-{
-	u32 ret = 0;
-
-	ret |= GENMASK(3, 0) * !!(mask & BIT(0));
-	ret |= GENMASK(8, 5) * !!(mask & BIT(1));
-	ret |= GENMASK(13, 10) * !!(mask & BIT(2));
-	ret |= GENMASK(19, 16) * !!(mask & BIT(3));
-	return ret;
-}
-
-static void
-mt76_stop_tx_ac(struct mt7603_dev *dev, u32 mask)
-{
-	mt76_set(dev, MT_WF_ARB_TX_STOP_0, mt7603_ac_queue_mask0(mask));
-}
-
-static void
-mt76_start_tx_ac(struct mt7603_dev *dev, u32 mask)
-{
-	mt76_set(dev, MT_WF_ARB_TX_START_0, mt7603_ac_queue_mask0(mask));
-}
-
-void mt7603_mac_reset_counters(struct mt7603_dev *dev)
-{
-	int i;
-
-	for (i = 0; i < 2; i++)
-		mt76_rr(dev, MT_TX_AGG_CNT(i));
-
-	memset(dev->mt76.aggr_stats, 0, sizeof(dev->mt76.aggr_stats));
-}
-
-void mt7603_mac_set_timing(struct mt7603_dev *dev)
-{
-	u32 cck = FIELD_PREP(MT_TIMEOUT_VAL_PLCP, 231) |
-		  FIELD_PREP(MT_TIMEOUT_VAL_CCA, 48);
-	u32 ofdm = FIELD_PREP(MT_TIMEOUT_VAL_PLCP, 60) |
-		   FIELD_PREP(MT_TIMEOUT_VAL_CCA, 24);
-	int offset = 3 * dev->coverage_class;
-	u32 reg_offset = FIELD_PREP(MT_TIMEOUT_VAL_PLCP, offset) |
-			 FIELD_PREP(MT_TIMEOUT_VAL_CCA, offset);
-	bool is_5ghz = dev->mphy.chandef.chan->band == NL80211_BAND_5GHZ;
-	int sifs;
-	u32 val;
-
-	if (is_5ghz)
-		sifs = 16;
-	else
-		sifs = 10;
-
-	mt76_set(dev, MT_ARB_SCR,
-		 MT_ARB_SCR_TX_DISABLE | MT_ARB_SCR_RX_DISABLE);
-	udelay(1);
-
-	mt76_wr(dev, MT_TIMEOUT_CCK, cck + reg_offset);
-	mt76_wr(dev, MT_TIMEOUT_OFDM, ofdm + reg_offset);
-	mt76_wr(dev, MT_IFS,
-		FIELD_PREP(MT_IFS_EIFS, 360) |
-		FIELD_PREP(MT_IFS_RIFS, 2) |
-		FIELD_PREP(MT_IFS_SIFS, sifs) |
-		FIELD_PREP(MT_IFS_SLOT, dev->slottime));
-
-	if (dev->slottime < 20 || is_5ghz)
-		val = MT7603_CFEND_RATE_DEFAULT;
-	else
-		val = MT7603_CFEND_RATE_11B;
-
-	mt76_rmw_field(dev, MT_AGG_CONTROL, MT_AGG_CONTROL_CFEND_RATE, val);
-
-	mt76_clear(dev, MT_ARB_SCR,
-		   MT_ARB_SCR_TX_DISABLE | MT_ARB_SCR_RX_DISABLE);
-}
-
-static void
-mt7603_wtbl_update(struct mt7603_dev *dev, int idx, u32 mask)
-{
-	mt76_rmw(dev, MT_WTBL_UPDATE, MT_WTBL_UPDATE_WLAN_IDX,
-		 FIELD_PREP(MT_WTBL_UPDATE_WLAN_IDX, idx) | mask);
-
-	mt76_poll(dev, MT_WTBL_UPDATE, MT_WTBL_UPDATE_BUSY, 0, 5000);
-}
-
-static u32
-mt7603_wtbl1_addr(int idx)
-{
-	return MT_WTBL1_BASE + idx * MT_WTBL1_SIZE;
-}
-
-static u32
-mt7603_wtbl2_addr(int idx)
-{
-	/* Mapped to WTBL2 */
-	return MT_PCIE_REMAP_BASE_1 + idx * MT_WTBL2_SIZE;
-}
-
-static u32
-mt7603_wtbl3_addr(int idx)
-{
-	u32 base = mt7603_wtbl2_addr(MT7603_WTBL_SIZE);
-
-	return base + idx * MT_WTBL3_SIZE;
-}
-
-static u32
-mt7603_wtbl4_addr(int idx)
-{
-	u32 base = mt7603_wtbl3_addr(MT7603_WTBL_SIZE);
-
-	return base + idx * MT_WTBL4_SIZE;
-}
-
-void mt7603_wtbl_init(struct mt7603_dev *dev, int idx, int vif,
-		      const u8 *mac_addr)
-{
-	const void *_mac = mac_addr;
-	u32 addr = mt7603_wtbl1_addr(idx);
-	u32 w0 = 0, w1 = 0;
-	int i;
-
-	if (_mac) {
-		w0 = FIELD_PREP(MT_WTBL1_W0_ADDR_HI,
-				get_unaligned_le16(_mac + 4));
-		w1 = FIELD_PREP(MT_WTBL1_W1_ADDR_LO,
-				get_unaligned_le32(_mac));
-	}
-
-	if (vif < 0)
-		vif = 0;
-	else
-		w0 |= MT_WTBL1_W0_RX_CHECK_A1;
-	w0 |= FIELD_PREP(MT_WTBL1_W0_MUAR_IDX, vif);
-
-	mt76_poll(dev, MT_WTBL_UPDATE, MT_WTBL_UPDATE_BUSY, 0, 5000);
-
-	mt76_set(dev, addr + 0 * 4, w0);
-	mt76_set(dev, addr + 1 * 4, w1);
-	mt76_set(dev, addr + 2 * 4, MT_WTBL1_W2_ADMISSION_CONTROL);
-
-	mt76_stop_tx_ac(dev, GENMASK(3, 0));
-	addr = mt7603_wtbl2_addr(idx);
-	for (i = 0; i < MT_WTBL2_SIZE; i += 4)
-		mt76_wr(dev, addr + i, 0);
-	mt7603_wtbl_update(dev, idx, MT_WTBL_UPDATE_WTBL2);
-	mt76_start_tx_ac(dev, GENMASK(3, 0));
-
-	addr = mt7603_wtbl3_addr(idx);
-	for (i = 0; i < MT_WTBL3_SIZE; i += 4)
-		mt76_wr(dev, addr + i, 0);
-
-	addr = mt7603_wtbl4_addr(idx);
-	for (i = 0; i < MT_WTBL4_SIZE; i += 4)
-		mt76_wr(dev, addr + i, 0);
-
-	mt7603_wtbl_update(dev, idx, MT_WTBL_UPDATE_ADM_COUNT_CLEAR);
-}
-
-static void
-mt7603_wtbl_set_skip_tx(struct mt7603_dev *dev, int idx, bool enabled)
-{
-	u32 addr = mt7603_wtbl1_addr(idx);
-	u32 val = mt76_rr(dev, addr + 3 * 4);
-
-	val &= ~MT_WTBL1_W3_SKIP_TX;
-	val |= enabled * MT_WTBL1_W3_SKIP_TX;
-
-	mt76_wr(dev, addr + 3 * 4, val);
-}
-
-void mt7603_filter_tx(struct mt7603_dev *dev, int idx, bool abort)
-{
-	int i, port, queue;
-
-	if (abort) {
-		port = 3; /* PSE */
-		queue = 8; /* free queue */
-	} else {
-		port = 0; /* HIF */
-		queue = 1; /* MCU queue */
-	}
-
-	mt7603_wtbl_set_skip_tx(dev, idx, true);
-
-	mt76_wr(dev, MT_TX_ABORT, MT_TX_ABORT_EN |
-			FIELD_PREP(MT_TX_ABORT_WCID, idx));
-
-	for (i = 0; i < 4; i++) {
-		mt76_wr(dev, MT_DMA_FQCR0, MT_DMA_FQCR0_BUSY |
-			FIELD_PREP(MT_DMA_FQCR0_TARGET_WCID, idx) |
-			FIELD_PREP(MT_DMA_FQCR0_TARGET_QID, i) |
-			FIELD_PREP(MT_DMA_FQCR0_DEST_PORT_ID, port) |
-			FIELD_PREP(MT_DMA_FQCR0_DEST_QUEUE_ID, queue));
-
-		mt76_poll(dev, MT_DMA_FQCR0, MT_DMA_FQCR0_BUSY, 0, 15000);
-	}
-
-	WARN_ON_ONCE(mt76_rr(dev, MT_DMA_FQCR0) & MT_DMA_FQCR0_BUSY);
-
-	mt76_wr(dev, MT_TX_ABORT, 0);
-
-	mt7603_wtbl_set_skip_tx(dev, idx, false);
-}
-
-void mt7603_wtbl_set_smps(struct mt7603_dev *dev, struct mt7603_sta *sta,
-			  bool enabled)
-{
-	u32 addr = mt7603_wtbl1_addr(sta->wcid.idx);
-
-	if (sta->smps == enabled)
-		return;
-
-	mt76_rmw_field(dev, addr + 2 * 4, MT_WTBL1_W2_SMPS, enabled);
-	sta->smps = enabled;
-}
-
-void mt7603_wtbl_set_ps(struct mt7603_dev *dev, struct mt7603_sta *sta,
-			bool enabled)
-{
-	int idx = sta->wcid.idx;
-	u32 addr;
-
-	spin_lock_bh(&dev->ps_lock);
-
-	if (sta->ps == enabled)
-		goto out;
-
-	mt76_wr(dev, MT_PSE_RTA,
-		FIELD_PREP(MT_PSE_RTA_TAG_ID, idx) |
-		FIELD_PREP(MT_PSE_RTA_PORT_ID, 0) |
-		FIELD_PREP(MT_PSE_RTA_QUEUE_ID, 1) |
-		FIELD_PREP(MT_PSE_RTA_REDIRECT_EN, enabled) |
-		MT_PSE_RTA_WRITE | MT_PSE_RTA_BUSY);
-
-	mt76_poll(dev, MT_PSE_RTA, MT_PSE_RTA_BUSY, 0, 5000);
-
-	if (enabled)
-		mt7603_filter_tx(dev, idx, false);
-
-	addr = mt7603_wtbl1_addr(idx);
-	mt76_set(dev, MT_WTBL1_OR, MT_WTBL1_OR_PSM_WRITE);
-	mt76_rmw(dev, addr + 3 * 4, MT_WTBL1_W3_POWER_SAVE,
-		 enabled * MT_WTBL1_W3_POWER_SAVE);
-	mt76_clear(dev, MT_WTBL1_OR, MT_WTBL1_OR_PSM_WRITE);
-	sta->ps = enabled;
-
-out:
-	spin_unlock_bh(&dev->ps_lock);
-}
-
-void mt7603_wtbl_clear(struct mt7603_dev *dev, int idx)
-{
-	int wtbl2_frame_size = MT_PSE_PAGE_SIZE / MT_WTBL2_SIZE;
-	int wtbl2_frame = idx / wtbl2_frame_size;
-	int wtbl2_entry = idx % wtbl2_frame_size;
-
-	int wtbl3_base_frame = MT_WTBL3_OFFSET / MT_PSE_PAGE_SIZE;
-	int wtbl3_frame_size = MT_PSE_PAGE_SIZE / MT_WTBL3_SIZE;
-	int wtbl3_frame = wtbl3_base_frame + idx / wtbl3_frame_size;
-	int wtbl3_entry = (idx % wtbl3_frame_size) * 2;
-
-	int wtbl4_base_frame = MT_WTBL4_OFFSET / MT_PSE_PAGE_SIZE;
-	int wtbl4_frame_size = MT_PSE_PAGE_SIZE / MT_WTBL4_SIZE;
-	int wtbl4_frame = wtbl4_base_frame + idx / wtbl4_frame_size;
-	int wtbl4_entry = idx % wtbl4_frame_size;
-
-	u32 addr = MT_WTBL1_BASE + idx * MT_WTBL1_SIZE;
-	int i;
-
-	mt76_poll(dev, MT_WTBL_UPDATE, MT_WTBL_UPDATE_BUSY, 0, 5000);
-
-	mt76_wr(dev, addr + 0 * 4,
-		MT_WTBL1_W0_RX_CHECK_A1 |
-		MT_WTBL1_W0_RX_CHECK_A2 |
-		MT_WTBL1_W0_RX_VALID);
-	mt76_wr(dev, addr + 1 * 4, 0);
-	mt76_wr(dev, addr + 2 * 4, 0);
-
-	mt76_set(dev, MT_WTBL1_OR, MT_WTBL1_OR_PSM_WRITE);
-
-	mt76_wr(dev, addr + 3 * 4,
-		FIELD_PREP(MT_WTBL1_W3_WTBL2_FRAME_ID, wtbl2_frame) |
-		FIELD_PREP(MT_WTBL1_W3_WTBL2_ENTRY_ID, wtbl2_entry) |
-		FIELD_PREP(MT_WTBL1_W3_WTBL4_FRAME_ID, wtbl4_frame) |
-		MT_WTBL1_W3_I_PSM | MT_WTBL1_W3_KEEP_I_PSM);
-	mt76_wr(dev, addr + 4 * 4,
-		FIELD_PREP(MT_WTBL1_W4_WTBL3_FRAME_ID, wtbl3_frame) |
-		FIELD_PREP(MT_WTBL1_W4_WTBL3_ENTRY_ID, wtbl3_entry) |
-		FIELD_PREP(MT_WTBL1_W4_WTBL4_ENTRY_ID, wtbl4_entry));
-
-	mt76_clear(dev, MT_WTBL1_OR, MT_WTBL1_OR_PSM_WRITE);
-
-	addr = mt7603_wtbl2_addr(idx);
-
-	/* Clear BA information */
-	mt76_wr(dev, addr + (15 * 4), 0);
-
-	mt76_stop_tx_ac(dev, GENMASK(3, 0));
-	for (i = 2; i <= 4; i++)
-		mt76_wr(dev, addr + (i * 4), 0);
-	mt7603_wtbl_update(dev, idx, MT_WTBL_UPDATE_WTBL2);
-	mt76_start_tx_ac(dev, GENMASK(3, 0));
-
-	mt7603_wtbl_update(dev, idx, MT_WTBL_UPDATE_RX_COUNT_CLEAR);
-	mt7603_wtbl_update(dev, idx, MT_WTBL_UPDATE_TX_COUNT_CLEAR);
-	mt7603_wtbl_update(dev, idx, MT_WTBL_UPDATE_ADM_COUNT_CLEAR);
-}
-
-void mt7603_wtbl_update_cap(struct mt7603_dev *dev, struct ieee80211_sta *sta)
-{
-	struct mt7603_sta *msta = (struct mt7603_sta *)sta->drv_priv;
-	int idx = msta->wcid.idx;
-	u8 ampdu_density;
-	u32 addr;
-	u32 val;
-
-	addr = mt7603_wtbl1_addr(idx);
-
-	ampdu_density = sta->ht_cap.ampdu_density;
-	if (ampdu_density < IEEE80211_HT_MPDU_DENSITY_4)
-		ampdu_density = IEEE80211_HT_MPDU_DENSITY_4;
-
-	val = mt76_rr(dev, addr + 2 * 4);
-	val &= MT_WTBL1_W2_KEY_TYPE | MT_WTBL1_W2_ADMISSION_CONTROL;
-	val |= FIELD_PREP(MT_WTBL1_W2_AMPDU_FACTOR, sta->ht_cap.ampdu_factor) |
-	       FIELD_PREP(MT_WTBL1_W2_MPDU_DENSITY, sta->ht_cap.ampdu_density) |
-	       MT_WTBL1_W2_TXS_BAF_REPORT;
-
-	if (sta->ht_cap.cap)
-		val |= MT_WTBL1_W2_HT;
-	if (sta->vht_cap.cap)
-		val |= MT_WTBL1_W2_VHT;
-
-	mt76_wr(dev, addr + 2 * 4, val);
-
-	addr = mt7603_wtbl2_addr(idx);
-	val = mt76_rr(dev, addr + 9 * 4);
-	val &= ~(MT_WTBL2_W9_SHORT_GI_20 | MT_WTBL2_W9_SHORT_GI_40 |
-		 MT_WTBL2_W9_SHORT_GI_80);
-	if (sta->ht_cap.cap & IEEE80211_HT_CAP_SGI_20)
-		val |= MT_WTBL2_W9_SHORT_GI_20;
-	if (sta->ht_cap.cap & IEEE80211_HT_CAP_SGI_40)
-		val |= MT_WTBL2_W9_SHORT_GI_40;
-	mt76_wr(dev, addr + 9 * 4, val);
-}
-
-void mt7603_mac_rx_ba_reset(struct mt7603_dev *dev, void *addr, u8 tid)
-{
-	mt76_wr(dev, MT_BA_CONTROL_0, get_unaligned_le32(addr));
-	mt76_wr(dev, MT_BA_CONTROL_1,
-		(get_unaligned_le16(addr + 4) |
-		 FIELD_PREP(MT_BA_CONTROL_1_TID, tid) |
-		 MT_BA_CONTROL_1_RESET));
-}
-
-void mt7603_mac_tx_ba_reset(struct mt7603_dev *dev, int wcid, int tid,
-			    int ba_size)
-{
-	u32 addr = mt7603_wtbl2_addr(wcid);
-	u32 tid_mask = FIELD_PREP(MT_WTBL2_W15_BA_EN_TIDS, BIT(tid)) |
-		       (MT_WTBL2_W15_BA_WIN_SIZE <<
-			(tid * MT_WTBL2_W15_BA_WIN_SIZE_SHIFT));
-	u32 tid_val;
-	int i;
-
-	if (ba_size < 0) {
-		/* disable */
-		mt76_clear(dev, addr + (15 * 4), tid_mask);
-		return;
-	}
-
-	for (i = 7; i > 0; i--) {
-		if (ba_size >= MT_AGG_SIZE_LIMIT(i))
-			break;
-	}
-
-	tid_val = FIELD_PREP(MT_WTBL2_W15_BA_EN_TIDS, BIT(tid)) |
-		  i << (tid * MT_WTBL2_W15_BA_WIN_SIZE_SHIFT);
-
-	mt76_rmw(dev, addr + (15 * 4), tid_mask, tid_val);
-}
-
-void mt7603_mac_sta_poll(struct mt7603_dev *dev)
-{
-	static const u8 ac_to_tid[4] = {
-		[IEEE80211_AC_BE] = 0,
-		[IEEE80211_AC_BK] = 1,
-		[IEEE80211_AC_VI] = 4,
-		[IEEE80211_AC_VO] = 6
-	};
-	struct ieee80211_sta *sta;
-	struct mt7603_sta *msta;
-	u32 total_airtime = 0;
-	u32 airtime[4];
-	u32 addr;
-	int i;
-
-	rcu_read_lock();
-
-	while (1) {
-		bool clear = false;
-
-		spin_lock_bh(&dev->sta_poll_lock);
-		if (list_empty(&dev->sta_poll_list)) {
-			spin_unlock_bh(&dev->sta_poll_lock);
-			break;
-		}
-
-		msta = list_first_entry(&dev->sta_poll_list, struct mt7603_sta,
-					poll_list);
-		list_del_init(&msta->poll_list);
-		spin_unlock_bh(&dev->sta_poll_lock);
-
-		addr = mt7603_wtbl4_addr(msta->wcid.idx);
-		for (i = 0; i < 4; i++) {
-			u32 airtime_last = msta->tx_airtime_ac[i];
-
-			msta->tx_airtime_ac[i] = mt76_rr(dev, addr + i * 8);
-			airtime[i] = msta->tx_airtime_ac[i] - airtime_last;
-			airtime[i] *= 32;
-			total_airtime += airtime[i];
-
-			if (msta->tx_airtime_ac[i] & BIT(22))
-				clear = true;
-		}
-
-		if (clear) {
-			mt7603_wtbl_update(dev, msta->wcid.idx,
-					   MT_WTBL_UPDATE_ADM_COUNT_CLEAR);
-			memset(msta->tx_airtime_ac, 0,
-			       sizeof(msta->tx_airtime_ac));
-		}
-
-		if (!msta->wcid.sta)
-			continue;
-
-		sta = container_of((void *)msta, struct ieee80211_sta, drv_priv);
-		for (i = 0; i < 4; i++) {
-			struct mt76_queue *q = dev->mphy.q_tx[i];
-			u8 qidx = q->hw_idx;
-			u8 tid = ac_to_tid[i];
-			u32 txtime = airtime[qidx];
-
-			if (!txtime)
-				continue;
-
-			ieee80211_sta_register_airtime(sta, tid, txtime, 0);
-		}
-	}
-
-	rcu_read_unlock();
-
-	if (!total_airtime)
-		return;
-
-	spin_lock_bh(&dev->mt76.cc_lock);
-	dev->mphy.chan_state->cc_tx += total_airtime;
-	spin_unlock_bh(&dev->mt76.cc_lock);
-}
-
-static struct mt76_wcid *
-mt7603_rx_get_wcid(struct mt7603_dev *dev, u8 idx, bool unicast)
-{
-	struct mt7603_sta *sta;
-	struct mt76_wcid *wcid;
-
-	if (idx >= MT7603_WTBL_SIZE)
-		return NULL;
-
-	wcid = rcu_dereference(dev->mt76.wcid[idx]);
-	if (unicast || !wcid)
-		return wcid;
-
-	if (!wcid->sta)
-		return NULL;
-
-	sta = container_of(wcid, struct mt7603_sta, wcid);
-	if (!sta->vif)
-		return NULL;
-
-	return &sta->vif->sta.wcid;
-}
-
-int
-mt7603_mac_fill_rx(struct mt7603_dev *dev, struct sk_buff *skb)
-{
-	struct mt76_rx_status *status = (struct mt76_rx_status *)skb->cb;
-	struct ieee80211_supported_band *sband;
-	struct ieee80211_hdr *hdr;
-	__le32 *rxd = (__le32 *)skb->data;
-	u32 rxd0 = le32_to_cpu(rxd[0]);
-	u32 rxd1 = le32_to_cpu(rxd[1]);
-	u32 rxd2 = le32_to_cpu(rxd[2]);
-	bool unicast = rxd1 & MT_RXD1_NORMAL_U2M;
-	bool insert_ccmp_hdr = false;
-	bool remove_pad;
-	int idx;
-	int i;
-
-	memset(status, 0, sizeof(*status));
-
-	i = FIELD_GET(MT_RXD1_NORMAL_CH_FREQ, rxd1);
-	sband = (i & 1) ? &dev->mphy.sband_5g.sband : &dev->mphy.sband_2g.sband;
-	i >>= 1;
-
-	idx = FIELD_GET(MT_RXD2_NORMAL_WLAN_IDX, rxd2);
-	status->wcid = mt7603_rx_get_wcid(dev, idx, unicast);
-
-	status->band = sband->band;
-	if (i < sband->n_channels)
-		status->freq = sband->channels[i].center_freq;
-
-	if (rxd2 & MT_RXD2_NORMAL_FCS_ERR)
-		status->flag |= RX_FLAG_FAILED_FCS_CRC;
-
-	if (rxd2 & MT_RXD2_NORMAL_TKIP_MIC_ERR)
-		status->flag |= RX_FLAG_MMIC_ERROR;
-
-	/* ICV error or CCMP/BIP/WPI MIC error */
-	if (rxd2 & MT_RXD2_NORMAL_ICV_ERR)
-		status->flag |= RX_FLAG_ONLY_MONITOR;
-
-	if (FIELD_GET(MT_RXD2_NORMAL_SEC_MODE, rxd2) != 0 &&
-	    !(rxd2 & (MT_RXD2_NORMAL_CLM | MT_RXD2_NORMAL_CM))) {
-		status->flag |= RX_FLAG_DECRYPTED;
-		status->flag |= RX_FLAG_IV_STRIPPED;
-		status->flag |= RX_FLAG_MMIC_STRIPPED | RX_FLAG_MIC_STRIPPED;
-	}
-
-	remove_pad = rxd1 & MT_RXD1_NORMAL_HDR_OFFSET;
-
-	if (rxd2 & MT_RXD2_NORMAL_MAX_LEN_ERROR)
-		return -EINVAL;
-
-	if (!sband->channels)
-		return -EINVAL;
-
-	rxd += 4;
-	if (rxd0 & MT_RXD0_NORMAL_GROUP_4) {
-		rxd += 4;
-		if ((u8 *)rxd - skb->data >= skb->len)
-			return -EINVAL;
-	}
-	if (rxd0 & MT_RXD0_NORMAL_GROUP_1) {
-		u8 *data = (u8 *)rxd;
-
-		if (status->flag & RX_FLAG_DECRYPTED) {
-			switch (FIELD_GET(MT_RXD2_NORMAL_SEC_MODE, rxd2)) {
-			case MT_CIPHER_AES_CCMP:
-			case MT_CIPHER_CCMP_CCX:
-			case MT_CIPHER_CCMP_256:
-				insert_ccmp_hdr =
-					FIELD_GET(MT_RXD2_NORMAL_FRAG, rxd2);
-				fallthrough;
-			case MT_CIPHER_TKIP:
-			case MT_CIPHER_TKIP_NO_MIC:
-			case MT_CIPHER_GCMP:
-			case MT_CIPHER_GCMP_256:
-				status->iv[0] = data[5];
-				status->iv[1] = data[4];
-				status->iv[2] = data[3];
-				status->iv[3] = data[2];
-				status->iv[4] = data[1];
-				status->iv[5] = data[0];
-				break;
-			default:
-				break;
-			}
-		}
-
-		rxd += 4;
-		if ((u8 *)rxd - skb->data >= skb->len)
-			return -EINVAL;
-	}
-	if (rxd0 & MT_RXD0_NORMAL_GROUP_2) {
-		status->timestamp = le32_to_cpu(rxd[0]);
-		status->flag |= RX_FLAG_MACTIME_START;
-
-		if (!(rxd2 & (MT_RXD2_NORMAL_NON_AMPDU_SUB |
-			      MT_RXD2_NORMAL_NON_AMPDU))) {
-			status->flag |= RX_FLAG_AMPDU_DETAILS;
-
-			/* all subframes of an A-MPDU have the same timestamp */
-			if (dev->rx_ampdu_ts != status->timestamp) {
-				if (!++dev->ampdu_ref)
-					dev->ampdu_ref++;
-			}
-			dev->rx_ampdu_ts = status->timestamp;
-
-			status->ampdu_ref = dev->ampdu_ref;
-		}
-
-		rxd += 2;
-		if ((u8 *)rxd - skb->data >= skb->len)
-			return -EINVAL;
-	}
-	if (rxd0 & MT_RXD0_NORMAL_GROUP_3) {
-		u32 rxdg0 = le32_to_cpu(rxd[0]);
-		u32 rxdg3 = le32_to_cpu(rxd[3]);
-		bool cck = false;
-
-		i = FIELD_GET(MT_RXV1_TX_RATE, rxdg0);
-		switch (FIELD_GET(MT_RXV1_TX_MODE, rxdg0)) {
-		case MT_PHY_TYPE_CCK:
-			cck = true;
-			fallthrough;
-		case MT_PHY_TYPE_OFDM:
-			i = mt76_get_rate(&dev->mt76, sband, i, cck);
-			break;
-		case MT_PHY_TYPE_HT_GF:
-		case MT_PHY_TYPE_HT:
-			status->encoding = RX_ENC_HT;
-			if (i > 15)
-				return -EINVAL;
-			break;
-		default:
-			return -EINVAL;
-		}
-
-		if (rxdg0 & MT_RXV1_HT_SHORT_GI)
-			status->enc_flags |= RX_ENC_FLAG_SHORT_GI;
-		if (rxdg0 & MT_RXV1_HT_AD_CODE)
-			status->enc_flags |= RX_ENC_FLAG_LDPC;
-
-		status->enc_flags |= RX_ENC_FLAG_STBC_MASK *
-				    FIELD_GET(MT_RXV1_HT_STBC, rxdg0);
-
-		status->rate_idx = i;
-
-		status->chains = dev->mphy.antenna_mask;
-		status->chain_signal[0] = FIELD_GET(MT_RXV4_IB_RSSI0, rxdg3) +
-					  dev->rssi_offset[0];
-		status->chain_signal[1] = FIELD_GET(MT_RXV4_IB_RSSI1, rxdg3) +
-					  dev->rssi_offset[1];
-
-		if (FIELD_GET(MT_RXV1_FRAME_MODE, rxdg0) == 1)
-			status->bw = RATE_INFO_BW_40;
-
-		rxd += 6;
-		if ((u8 *)rxd - skb->data >= skb->len)
-			return -EINVAL;
-	} else {
-		return -EINVAL;
-	}
-
-	skb_pull(skb, (u8 *)rxd - skb->data + 2 * remove_pad);
-
-	if (insert_ccmp_hdr) {
-		u8 key_id = FIELD_GET(MT_RXD1_NORMAL_KEY_ID, rxd1);
-
-		mt76_insert_ccmp_hdr(skb, key_id);
-	}
-
-	hdr = (struct ieee80211_hdr *)skb->data;
-	if (!status->wcid || !ieee80211_is_data_qos(hdr->frame_control))
-		return 0;
-
-	status->aggr = unicast &&
-		       !ieee80211_is_qos_nullfunc(hdr->frame_control);
-	status->qos_ctl = *ieee80211_get_qos_ctl(hdr);
-	status->seqno = IEEE80211_SEQ_TO_SN(le16_to_cpu(hdr->seq_ctrl));
-
-	return 0;
-}
-
-static u16
-mt7603_mac_tx_rate_val(struct mt7603_dev *dev,
-		       const struct ieee80211_tx_rate *rate, bool stbc, u8 *bw)
-{
-	u8 phy, nss, rate_idx;
-	u16 rateval;
-
-	*bw = 0;
-	if (rate->flags & IEEE80211_TX_RC_MCS) {
-		rate_idx = rate->idx;
-		nss = 1 + (rate->idx >> 3);
-		phy = MT_PHY_TYPE_HT;
-		if (rate->flags & IEEE80211_TX_RC_GREEN_FIELD)
-			phy = MT_PHY_TYPE_HT_GF;
-		if (rate->flags & IEEE80211_TX_RC_40_MHZ_WIDTH)
-			*bw = 1;
-	} else {
-		const struct ieee80211_rate *r;
-		int band = dev->mphy.chandef.chan->band;
-		u16 val;
-
-		nss = 1;
-		r = &mt76_hw(dev)->wiphy->bands[band]->bitrates[rate->idx];
-		if (rate->flags & IEEE80211_TX_RC_USE_SHORT_PREAMBLE)
-			val = r->hw_value_short;
-		else
-			val = r->hw_value;
-
-		phy = val >> 8;
-		rate_idx = val & 0xff;
-	}
-
-	rateval = (FIELD_PREP(MT_TX_RATE_IDX, rate_idx) |
-		   FIELD_PREP(MT_TX_RATE_MODE, phy));
-
-	if (stbc && nss == 1)
-		rateval |= MT_TX_RATE_STBC;
-
-	return rateval;
-}
-
-void mt7603_wtbl_set_rates(struct mt7603_dev *dev, struct mt7603_sta *sta,
-			   struct ieee80211_tx_rate *probe_rate,
-			   struct ieee80211_tx_rate *rates)
-{
-	struct ieee80211_tx_rate *ref;
-	int wcid = sta->wcid.idx;
-	u32 addr = mt7603_wtbl2_addr(wcid);
-	bool stbc = false;
-	int n_rates = sta->n_rates;
-	u8 bw, bw_prev, bw_idx = 0;
-	u16 val[4];
-	u16 probe_val;
-	u32 w9 = mt76_rr(dev, addr + 9 * 4);
-	bool rateset;
-	int i, k;
-
-	if (!mt76_poll(dev, MT_WTBL_UPDATE, MT_WTBL_UPDATE_BUSY, 0, 5000))
-		return;
-
-	for (i = n_rates; i < 4; i++)
-		rates[i] = rates[n_rates - 1];
-
-	rateset = !(sta->rate_set_tsf & BIT(0));
-	memcpy(sta->rateset[rateset].rates, rates,
-	       sizeof(sta->rateset[rateset].rates));
-	if (probe_rate) {
-		sta->rateset[rateset].probe_rate = *probe_rate;
-		ref = &sta->rateset[rateset].probe_rate;
-	} else {
-		sta->rateset[rateset].probe_rate.idx = -1;
-		ref = &sta->rateset[rateset].rates[0];
-	}
-
-	rates = sta->rateset[rateset].rates;
-	for (i = 0; i < ARRAY_SIZE(sta->rateset[rateset].rates); i++) {
-		/*
-		 * We don't support switching between short and long GI
-		 * within the rate set. For accurate tx status reporting, we
-		 * need to make sure that flags match.
-		 * For improved performance, avoid duplicate entries by
-		 * decrementing the MCS index if necessary
-		 */
-		if ((ref->flags ^ rates[i].flags) & IEEE80211_TX_RC_SHORT_GI)
-			rates[i].flags ^= IEEE80211_TX_RC_SHORT_GI;
-
-		for (k = 0; k < i; k++) {
-			if (rates[i].idx != rates[k].idx)
-				continue;
-			if ((rates[i].flags ^ rates[k].flags) &
-			    IEEE80211_TX_RC_40_MHZ_WIDTH)
-				continue;
-
-			if (!rates[i].idx)
-				continue;
-
-			rates[i].idx--;
-		}
-	}
-
-	w9 &= MT_WTBL2_W9_SHORT_GI_20 | MT_WTBL2_W9_SHORT_GI_40 |
-	      MT_WTBL2_W9_SHORT_GI_80;
-
-	val[0] = mt7603_mac_tx_rate_val(dev, &rates[0], stbc, &bw);
-	bw_prev = bw;
-
-	if (probe_rate) {
-		probe_val = mt7603_mac_tx_rate_val(dev, probe_rate, stbc, &bw);
-		if (bw)
-			bw_idx = 1;
-		else
-			bw_prev = 0;
-	} else {
-		probe_val = val[0];
-	}
-
-	w9 |= FIELD_PREP(MT_WTBL2_W9_CC_BW_SEL, bw);
-	w9 |= FIELD_PREP(MT_WTBL2_W9_BW_CAP, bw);
-
-	val[1] = mt7603_mac_tx_rate_val(dev, &rates[1], stbc, &bw);
-	if (bw_prev) {
-		bw_idx = 3;
-		bw_prev = bw;
-	}
-
-	val[2] = mt7603_mac_tx_rate_val(dev, &rates[2], stbc, &bw);
-	if (bw_prev) {
-		bw_idx = 5;
-		bw_prev = bw;
-	}
-
-	val[3] = mt7603_mac_tx_rate_val(dev, &rates[3], stbc, &bw);
-	if (bw_prev)
-		bw_idx = 7;
-
-	w9 |= FIELD_PREP(MT_WTBL2_W9_CHANGE_BW_RATE,
-		       bw_idx ? bw_idx - 1 : 7);
-
-	mt76_wr(dev, MT_WTBL_RIUCR0, w9);
-
-	mt76_wr(dev, MT_WTBL_RIUCR1,
-		FIELD_PREP(MT_WTBL_RIUCR1_RATE0, probe_val) |
-		FIELD_PREP(MT_WTBL_RIUCR1_RATE1, val[0]) |
-		FIELD_PREP(MT_WTBL_RIUCR1_RATE2_LO, val[1]));
-
-	mt76_wr(dev, MT_WTBL_RIUCR2,
-		FIELD_PREP(MT_WTBL_RIUCR2_RATE2_HI, val[1] >> 8) |
-		FIELD_PREP(MT_WTBL_RIUCR2_RATE3, val[1]) |
-		FIELD_PREP(MT_WTBL_RIUCR2_RATE4, val[2]) |
-		FIELD_PREP(MT_WTBL_RIUCR2_RATE5_LO, val[2]));
-
-	mt76_wr(dev, MT_WTBL_RIUCR3,
-		FIELD_PREP(MT_WTBL_RIUCR3_RATE5_HI, val[2] >> 4) |
-		FIELD_PREP(MT_WTBL_RIUCR3_RATE6, val[3]) |
-		FIELD_PREP(MT_WTBL_RIUCR3_RATE7, val[3]));
-
-	mt76_set(dev, MT_LPON_T0CR, MT_LPON_T0CR_MODE); /* TSF read */
-	sta->rate_set_tsf = (mt76_rr(dev, MT_LPON_UTTR0) & ~BIT(0)) | rateset;
-
-	mt76_wr(dev, MT_WTBL_UPDATE,
-		FIELD_PREP(MT_WTBL_UPDATE_WLAN_IDX, wcid) |
-		MT_WTBL_UPDATE_RATE_UPDATE |
-		MT_WTBL_UPDATE_TX_COUNT_CLEAR);
-
-	if (!(sta->wcid.tx_info & MT_WCID_TX_INFO_SET))
-		mt76_poll(dev, MT_WTBL_UPDATE, MT_WTBL_UPDATE_BUSY, 0, 5000);
-
-	sta->rate_count = 2 * MT7603_RATE_RETRY * n_rates;
-	sta->wcid.tx_info |= MT_WCID_TX_INFO_SET;
-}
-
-static enum mt76_cipher_type
-mt7603_mac_get_key_info(struct ieee80211_key_conf *key, u8 *key_data)
-{
-	memset(key_data, 0, 32);
-	if (!key)
-		return MT_CIPHER_NONE;
-
-	if (key->keylen > 32)
-		return MT_CIPHER_NONE;
-
-	memcpy(key_data, key->key, key->keylen);
-
-	switch (key->cipher) {
-	case WLAN_CIPHER_SUITE_WEP40:
-		return MT_CIPHER_WEP40;
-	case WLAN_CIPHER_SUITE_WEP104:
-		return MT_CIPHER_WEP104;
-	case WLAN_CIPHER_SUITE_TKIP:
-		/* Rx/Tx MIC keys are swapped */
-		memcpy(key_data + 16, key->key + 24, 8);
-		memcpy(key_data + 24, key->key + 16, 8);
-		return MT_CIPHER_TKIP;
-	case WLAN_CIPHER_SUITE_CCMP:
-		return MT_CIPHER_AES_CCMP;
-	default:
-		return MT_CIPHER_NONE;
-	}
-}
-
-int mt7603_wtbl_set_key(struct mt7603_dev *dev, int wcid,
-			struct ieee80211_key_conf *key)
-{
-	enum mt76_cipher_type cipher;
-	u32 addr = mt7603_wtbl3_addr(wcid);
-	u8 key_data[32];
-	int key_len = sizeof(key_data);
-
-	cipher = mt7603_mac_get_key_info(key, key_data);
-	if (cipher == MT_CIPHER_NONE && key)
-		return -EOPNOTSUPP;
-
-	if (key && (cipher == MT_CIPHER_WEP40 || cipher == MT_CIPHER_WEP104)) {
-		addr += key->keyidx * 16;
-		key_len = 16;
-	}
-
-	mt76_wr_copy(dev, addr, key_data, key_len);
-
-	addr = mt7603_wtbl1_addr(wcid);
-	mt76_rmw_field(dev, addr + 2 * 4, MT_WTBL1_W2_KEY_TYPE, cipher);
-	if (key)
-		mt76_rmw_field(dev, addr, MT_WTBL1_W0_KEY_IDX, key->keyidx);
-	mt76_rmw_field(dev, addr, MT_WTBL1_W0_RX_KEY_VALID, !!key);
-
-	return 0;
-}
-
-static int
-mt7603_mac_write_txwi(struct mt7603_dev *dev, __le32 *txwi,
-		      struct sk_buff *skb, enum mt76_txq_id qid,
-		      struct mt76_wcid *wcid, struct ieee80211_sta *sta,
-		      int pid, struct ieee80211_key_conf *key)
-{
-	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
-	struct ieee80211_tx_rate *rate = &info->control.rates[0];
-	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
-	struct ieee80211_bar *bar = (struct ieee80211_bar *)skb->data;
-	struct ieee80211_vif *vif = info->control.vif;
-	struct mt76_queue *q = dev->mphy.q_tx[qid];
-	struct mt7603_vif *mvif;
-	int wlan_idx;
-	int hdr_len = ieee80211_get_hdrlen_from_skb(skb);
-	int tx_count = 8;
-	u8 frame_type, frame_subtype;
-	u16 fc = le16_to_cpu(hdr->frame_control);
-	u16 seqno = 0;
-	u8 vif_idx = 0;
-	u32 val;
-	u8 bw;
-
-	if (vif) {
-		mvif = (struct mt7603_vif *)vif->drv_priv;
-		vif_idx = mvif->idx;
-		if (vif_idx && qid >= MT_TXQ_BEACON)
-			vif_idx += 0x10;
-	}
-
-	if (sta) {
-		struct mt7603_sta *msta = (struct mt7603_sta *)sta->drv_priv;
-
-		tx_count = msta->rate_count;
-	}
-
-	if (wcid)
-		wlan_idx = wcid->idx;
-	else
-		wlan_idx = MT7603_WTBL_RESERVED;
-
-	frame_type = (fc & IEEE80211_FCTL_FTYPE) >> 2;
-	frame_subtype = (fc & IEEE80211_FCTL_STYPE) >> 4;
-
-	val = FIELD_PREP(MT_TXD0_TX_BYTES, skb->len + MT_TXD_SIZE) |
-	      FIELD_PREP(MT_TXD0_Q_IDX, q->hw_idx);
-	txwi[0] = cpu_to_le32(val);
-
-	val = MT_TXD1_LONG_FORMAT |
-	      FIELD_PREP(MT_TXD1_OWN_MAC, vif_idx) |
-	      FIELD_PREP(MT_TXD1_TID,
-			 skb->priority & IEEE80211_QOS_CTL_TID_MASK) |
-	      FIELD_PREP(MT_TXD1_HDR_FORMAT, MT_HDR_FORMAT_802_11) |
-	      FIELD_PREP(MT_TXD1_HDR_INFO, hdr_len / 2) |
-	      FIELD_PREP(MT_TXD1_WLAN_IDX, wlan_idx) |
-	      FIELD_PREP(MT_TXD1_PROTECTED, !!key);
-	txwi[1] = cpu_to_le32(val);
-
-	if (info->flags & IEEE80211_TX_CTL_NO_ACK)
-		txwi[1] |= cpu_to_le32(MT_TXD1_NO_ACK);
-
-	val = FIELD_PREP(MT_TXD2_FRAME_TYPE, frame_type) |
-	      FIELD_PREP(MT_TXD2_SUB_TYPE, frame_subtype) |
-	      FIELD_PREP(MT_TXD2_MULTICAST,
-			 is_multicast_ether_addr(hdr->addr1));
-	txwi[2] = cpu_to_le32(val);
-
-	if (!(info->flags & IEEE80211_TX_CTL_AMPDU))
-		txwi[2] |= cpu_to_le32(MT_TXD2_BA_DISABLE);
-
-	txwi[4] = 0;
-
-	val = MT_TXD5_TX_STATUS_HOST | MT_TXD5_SW_POWER_MGMT |
-	      FIELD_PREP(MT_TXD5_PID, pid);
-	txwi[5] = cpu_to_le32(val);
-
-	txwi[6] = 0;
-
-	if (rate->idx >= 0 && rate->count &&
-	    !(info->flags & IEEE80211_TX_CTL_RATE_CTRL_PROBE)) {
-		bool stbc = info->flags & IEEE80211_TX_CTL_STBC;
-		u16 rateval = mt7603_mac_tx_rate_val(dev, rate, stbc, &bw);
-
-		txwi[2] |= cpu_to_le32(MT_TXD2_FIX_RATE);
-
-		val = MT_TXD6_FIXED_BW |
-		      FIELD_PREP(MT_TXD6_BW, bw) |
-		      FIELD_PREP(MT_TXD6_TX_RATE, rateval);
-		txwi[6] |= cpu_to_le32(val);
-
-		if (rate->flags & IEEE80211_TX_RC_SHORT_GI)
-			txwi[6] |= cpu_to_le32(MT_TXD6_SGI);
-
-		if (!(rate->flags & IEEE80211_TX_RC_MCS))
-			txwi[2] |= cpu_to_le32(MT_TXD2_BA_DISABLE);
-
-		tx_count = rate->count;
-	}
-
-	/* use maximum tx count for beacons and buffered multicast */
-	if (qid >= MT_TXQ_BEACON)
-		tx_count = 0x1f;
-
-	val = FIELD_PREP(MT_TXD3_REM_TX_COUNT, tx_count) |
-		  MT_TXD3_SN_VALID;
-
-	if (ieee80211_is_data_qos(hdr->frame_control))
-		seqno = le16_to_cpu(hdr->seq_ctrl);
-	else if (ieee80211_is_back_req(hdr->frame_control))
-		seqno = le16_to_cpu(bar->start_seq_num);
-	else
-		val &= ~MT_TXD3_SN_VALID;
-
-	val |= FIELD_PREP(MT_TXD3_SEQ, seqno >> 4);
-
-	txwi[3] = cpu_to_le32(val);
-
-	if (key) {
-		u64 pn = atomic64_inc_return(&key->tx_pn);
-
-		txwi[3] |= cpu_to_le32(MT_TXD3_PN_VALID);
-		txwi[4] = cpu_to_le32(pn & GENMASK(31, 0));
-		txwi[5] |= cpu_to_le32(FIELD_PREP(MT_TXD5_PN_HIGH, pn >> 32));
-	}
-
-	txwi[7] = 0;
-
-	return 0;
-}
-
-int mt7603_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
-			  enum mt76_txq_id qid, struct mt76_wcid *wcid,
-			  struct ieee80211_sta *sta,
-			  struct mt76_tx_info *tx_info)
-{
-	struct mt7603_dev *dev = container_of(mdev, struct mt7603_dev, mt76);
-	struct mt7603_sta *msta = container_of(wcid, struct mt7603_sta, wcid);
-	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx_info->skb);
-	struct ieee80211_key_conf *key = info->control.hw_key;
-	int pid;
-
-	if (!wcid)
-		wcid = &dev->global_sta.wcid;
-
-	if (sta) {
-		msta = (struct mt7603_sta *)sta->drv_priv;
-
-		if ((info->flags & (IEEE80211_TX_CTL_NO_PS_BUFFER |
-				    IEEE80211_TX_CTL_CLEAR_PS_FILT)) ||
-		    (info->control.flags & IEEE80211_TX_CTRL_PS_RESPONSE))
-			mt7603_wtbl_set_ps(dev, msta, false);
-
-		mt76_tx_check_agg_ssn(sta, tx_info->skb);
-	}
-
-	pid = mt76_tx_status_skb_add(mdev, wcid, tx_info->skb);
-
-	if (info->flags & IEEE80211_TX_CTL_RATE_CTRL_PROBE) {
-		spin_lock_bh(&dev->mt76.lock);
-		mt7603_wtbl_set_rates(dev, msta, &info->control.rates[0],
-				      msta->rates);
-		msta->rate_probe = true;
-		spin_unlock_bh(&dev->mt76.lock);
-	}
-
-	mt7603_mac_write_txwi(dev, txwi_ptr, tx_info->skb, qid, wcid,
-			      sta, pid, key);
-
-	return 0;
-}
-
-static bool
-mt7603_fill_txs(struct mt7603_dev *dev, struct mt7603_sta *sta,
-		struct ieee80211_tx_info *info, __le32 *txs_data)
-{
-	struct ieee80211_supported_band *sband;
-	struct mt7603_rate_set *rs;
-	int first_idx = 0, last_idx;
-	u32 rate_set_tsf;
-	u32 final_rate;
-	u32 final_rate_flags;
-	bool rs_idx;
-	bool ack_timeout;
-	bool fixed_rate;
-	bool probe;
-	bool ampdu;
-	bool cck = false;
-	int count;
-	u32 txs;
-	int idx;
-	int i;
-
-	fixed_rate = info->status.rates[0].count;
-	probe = !!(info->flags & IEEE80211_TX_CTL_RATE_CTRL_PROBE);
-
-	txs = le32_to_cpu(txs_data[4]);
-	ampdu = !fixed_rate && (txs & MT_TXS4_AMPDU);
-	count = FIELD_GET(MT_TXS4_TX_COUNT, txs);
-	last_idx = FIELD_GET(MT_TXS4_LAST_TX_RATE, txs);
-
-	txs = le32_to_cpu(txs_data[0]);
-	final_rate = FIELD_GET(MT_TXS0_TX_RATE, txs);
-	ack_timeout = txs & MT_TXS0_ACK_TIMEOUT;
-
-	if (!ampdu && (txs & MT_TXS0_RTS_TIMEOUT))
-		return false;
-
-	if (txs & MT_TXS0_QUEUE_TIMEOUT)
-		return false;
-
-	if (!ack_timeout)
-		info->flags |= IEEE80211_TX_STAT_ACK;
-
-	info->status.ampdu_len = 1;
-	info->status.ampdu_ack_len = !!(info->flags &
-					IEEE80211_TX_STAT_ACK);
-
-	if (ampdu || (info->flags & IEEE80211_TX_CTL_AMPDU))
-		info->flags |= IEEE80211_TX_STAT_AMPDU | IEEE80211_TX_CTL_AMPDU;
-
-	first_idx = max_t(int, 0, last_idx - (count - 1) / MT7603_RATE_RETRY);
-
-	if (fixed_rate && !probe) {
-		info->status.rates[0].count = count;
-		i = 0;
-		goto out;
-	}
-
-	rate_set_tsf = READ_ONCE(sta->rate_set_tsf);
-	rs_idx = !((u32)(le32_get_bits(txs_data[1], MT_TXS1_F0_TIMESTAMP) -
-			 rate_set_tsf) < 1000000);
-	rs_idx ^= rate_set_tsf & BIT(0);
-	rs = &sta->rateset[rs_idx];
-
-	if (!first_idx && rs->probe_rate.idx >= 0) {
-		info->status.rates[0] = rs->probe_rate;
-
-		spin_lock_bh(&dev->mt76.lock);
-		if (sta->rate_probe) {
-			mt7603_wtbl_set_rates(dev, sta, NULL,
-					      sta->rates);
-			sta->rate_probe = false;
-		}
-		spin_unlock_bh(&dev->mt76.lock);
-	} else {
-		info->status.rates[0] = rs->rates[first_idx / 2];
-	}
-	info->status.rates[0].count = 0;
-
-	for (i = 0, idx = first_idx; count && idx <= last_idx; idx++) {
-		struct ieee80211_tx_rate *cur_rate;
-		int cur_count;
-
-		cur_rate = &rs->rates[idx / 2];
-		cur_count = min_t(int, MT7603_RATE_RETRY, count);
-		count -= cur_count;
-
-		if (idx && (cur_rate->idx != info->status.rates[i].idx ||
-			    cur_rate->flags != info->status.rates[i].flags)) {
-			i++;
-			if (i == ARRAY_SIZE(info->status.rates)) {
-				i--;
-				break;
-			}
-
-			info->status.rates[i] = *cur_rate;
-			info->status.rates[i].count = 0;
-		}
-
-		info->status.rates[i].count += cur_count;
-	}
-
-out:
-	final_rate_flags = info->status.rates[i].flags;
-
-	switch (FIELD_GET(MT_TX_RATE_MODE, final_rate)) {
-	case MT_PHY_TYPE_CCK:
-		cck = true;
-		fallthrough;
-	case MT_PHY_TYPE_OFDM:
-		if (dev->mphy.chandef.chan->band == NL80211_BAND_5GHZ)
-			sband = &dev->mphy.sband_5g.sband;
-		else
-			sband = &dev->mphy.sband_2g.sband;
-		final_rate &= GENMASK(5, 0);
-		final_rate = mt76_get_rate(&dev->mt76, sband, final_rate,
-					   cck);
-		final_rate_flags = 0;
-		break;
-	case MT_PHY_TYPE_HT_GF:
-	case MT_PHY_TYPE_HT:
-		final_rate_flags |= IEEE80211_TX_RC_MCS;
-		final_rate &= GENMASK(5, 0);
-		if (final_rate > 15)
-			return false;
-		break;
-	default:
-		return false;
-	}
-
-	info->status.rates[i].idx = final_rate;
-	info->status.rates[i].flags = final_rate_flags;
-
-	return true;
-}
-
-static bool
-mt7603_mac_add_txs_skb(struct mt7603_dev *dev, struct mt7603_sta *sta, int pid,
-		       __le32 *txs_data)
-{
-	struct mt76_dev *mdev = &dev->mt76;
-	struct sk_buff_head list;
-	struct sk_buff *skb;
-
-	if (pid < MT_PACKET_ID_FIRST)
-		return false;
-
-	trace_mac_txdone(mdev, sta->wcid.idx, pid);
-
-	mt76_tx_status_lock(mdev, &list);
-	skb = mt76_tx_status_skb_get(mdev, &sta->wcid, pid, &list);
-	if (skb) {
-		struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
-
-		if (!mt7603_fill_txs(dev, sta, info, txs_data)) {
-			info->status.rates[0].count = 0;
-			info->status.rates[0].idx = -1;
-		}
-
-		mt76_tx_status_skb_done(mdev, skb, &list);
-	}
-	mt76_tx_status_unlock(mdev, &list);
-
-	return !!skb;
-}
-
-void mt7603_mac_add_txs(struct mt7603_dev *dev, void *data)
-{
-	struct ieee80211_tx_info info = {};
-	struct ieee80211_sta *sta = NULL;
-	struct mt7603_sta *msta = NULL;
-	struct mt76_wcid *wcid;
-	__le32 *txs_data = data;
-	u8 wcidx;
-	u8 pid;
-
-	pid = le32_get_bits(txs_data[4], MT_TXS4_PID);
-	wcidx = le32_get_bits(txs_data[3], MT_TXS3_WCID);
-
-	if (pid == MT_PACKET_ID_NO_ACK)
-		return;
-
-	if (wcidx >= MT7603_WTBL_SIZE)
-		return;
-
-	rcu_read_lock();
-
-	wcid = rcu_dereference(dev->mt76.wcid[wcidx]);
-	if (!wcid)
-		goto out;
-
-	msta = container_of(wcid, struct mt7603_sta, wcid);
-	sta = wcid_to_sta(wcid);
-
-	if (list_empty(&msta->poll_list)) {
-		spin_lock_bh(&dev->sta_poll_lock);
-		list_add_tail(&msta->poll_list, &dev->sta_poll_list);
-		spin_unlock_bh(&dev->sta_poll_lock);
-	}
-
-	if (mt7603_mac_add_txs_skb(dev, msta, pid, txs_data))
-		goto out;
-
-	if (wcidx >= MT7603_WTBL_STA || !sta)
-		goto out;
-
-	if (mt7603_fill_txs(dev, msta, &info, txs_data))
-		ieee80211_tx_status_noskb(mt76_hw(dev), sta, &info);
-
-out:
-	rcu_read_unlock();
-}
-
-void mt7603_tx_complete_skb(struct mt76_dev *mdev, struct mt76_queue_entry *e)
-{
-	struct mt7603_dev *dev = container_of(mdev, struct mt7603_dev, mt76);
-	struct sk_buff *skb = e->skb;
-
-	if (!e->txwi) {
-		dev_kfree_skb_any(skb);
-		return;
-	}
-
-	dev->tx_hang_check = 0;
-	mt76_tx_complete_skb(mdev, e->wcid, skb);
-}
-
-static bool
-wait_for_wpdma(struct mt7603_dev *dev)
-{
-	return mt76_poll(dev, MT_WPDMA_GLO_CFG,
-			 MT_WPDMA_GLO_CFG_TX_DMA_BUSY |
-			 MT_WPDMA_GLO_CFG_RX_DMA_BUSY,
-			 0, 1000);
-}
-
-static void mt7603_pse_reset(struct mt7603_dev *dev)
-{
-	/* Clear previous reset result */
-	if (!dev->reset_cause[RESET_CAUSE_RESET_FAILED])
-		mt76_clear(dev, MT_MCU_DEBUG_RESET, MT_MCU_DEBUG_RESET_PSE_S);
-
-	/* Reset PSE */
-	mt76_set(dev, MT_MCU_DEBUG_RESET, MT_MCU_DEBUG_RESET_PSE);
-
-	if (!mt76_poll_msec(dev, MT_MCU_DEBUG_RESET,
-			    MT_MCU_DEBUG_RESET_PSE_S,
-			    MT_MCU_DEBUG_RESET_PSE_S, 500)) {
-		dev->reset_cause[RESET_CAUSE_RESET_FAILED]++;
-		mt76_clear(dev, MT_MCU_DEBUG_RESET, MT_MCU_DEBUG_RESET_PSE);
-	} else {
-		dev->reset_cause[RESET_CAUSE_RESET_FAILED] = 0;
-		mt76_clear(dev, MT_MCU_DEBUG_RESET, MT_MCU_DEBUG_RESET_QUEUES);
-	}
-
-	if (dev->reset_cause[RESET_CAUSE_RESET_FAILED] >= 3)
-		dev->reset_cause[RESET_CAUSE_RESET_FAILED] = 0;
-}
-
-void mt7603_mac_dma_start(struct mt7603_dev *dev)
-{
-	mt7603_mac_start(dev);
-
-	wait_for_wpdma(dev);
-	usleep_range(50, 100);
-
-	mt76_set(dev, MT_WPDMA_GLO_CFG,
-		 (MT_WPDMA_GLO_CFG_TX_DMA_EN |
-		  MT_WPDMA_GLO_CFG_RX_DMA_EN |
-		  FIELD_PREP(MT_WPDMA_GLO_CFG_DMA_BURST_SIZE, 3) |
-		  MT_WPDMA_GLO_CFG_TX_WRITEBACK_DONE));
-
-	mt7603_irq_enable(dev, MT_INT_RX_DONE_ALL | MT_INT_TX_DONE_ALL);
-}
-
-void mt7603_mac_start(struct mt7603_dev *dev)
-{
-	mt76_clear(dev, MT_ARB_SCR,
-		   MT_ARB_SCR_TX_DISABLE | MT_ARB_SCR_RX_DISABLE);
-	mt76_wr(dev, MT_WF_ARB_TX_START_0, ~0);
-	mt76_set(dev, MT_WF_ARB_RQCR, MT_WF_ARB_RQCR_RX_START);
-}
-
-void mt7603_mac_stop(struct mt7603_dev *dev)
-{
-	mt76_set(dev, MT_ARB_SCR,
-		 MT_ARB_SCR_TX_DISABLE | MT_ARB_SCR_RX_DISABLE);
-	mt76_wr(dev, MT_WF_ARB_TX_START_0, 0);
-	mt76_clear(dev, MT_WF_ARB_RQCR, MT_WF_ARB_RQCR_RX_START);
-}
-
-void mt7603_pse_client_reset(struct mt7603_dev *dev)
-{
-	u32 addr;
-
-	addr = mt7603_reg_map(dev, MT_CLIENT_BASE_PHYS_ADDR +
-				   MT_CLIENT_RESET_TX);
-
-	/* Clear previous reset state */
-	mt76_clear(dev, addr,
-		   MT_CLIENT_RESET_TX_R_E_1 |
-		   MT_CLIENT_RESET_TX_R_E_2 |
-		   MT_CLIENT_RESET_TX_R_E_1_S |
-		   MT_CLIENT_RESET_TX_R_E_2_S);
-
-	/* Start PSE client TX abort */
-	mt76_set(dev, addr, MT_CLIENT_RESET_TX_R_E_1);
-	mt76_poll_msec(dev, addr, MT_CLIENT_RESET_TX_R_E_1_S,
-		       MT_CLIENT_RESET_TX_R_E_1_S, 500);
-
-	mt76_set(dev, addr, MT_CLIENT_RESET_TX_R_E_2);
-	mt76_set(dev, MT_WPDMA_GLO_CFG, MT_WPDMA_GLO_CFG_SW_RESET);
-
-	/* Wait for PSE client to clear TX FIFO */
-	mt76_poll_msec(dev, addr, MT_CLIENT_RESET_TX_R_E_2_S,
-		       MT_CLIENT_RESET_TX_R_E_2_S, 500);
-
-	/* Clear PSE client TX abort state */
-	mt76_clear(dev, addr,
-		   MT_CLIENT_RESET_TX_R_E_1 |
-		   MT_CLIENT_RESET_TX_R_E_2);
-}
-
-static void mt7603_dma_sched_reset(struct mt7603_dev *dev)
-{
-	if (!is_mt7628(dev))
-		return;
-
-	mt76_set(dev, MT_SCH_4, MT_SCH_4_RESET);
-	mt76_clear(dev, MT_SCH_4, MT_SCH_4_RESET);
-}
-
-static void mt7603_mac_watchdog_reset(struct mt7603_dev *dev)
-{
-	int beacon_int = dev->mt76.beacon_int;
-	u32 mask = dev->mt76.mmio.irqmask;
-	int i;
-
-	ieee80211_stop_queues(dev->mt76.hw);
-	set_bit(MT76_RESET, &dev->mphy.state);
-
-	/* lock/unlock all queues to ensure that no tx is pending */
-	mt76_txq_schedule_all(&dev->mphy);
-
-	mt76_worker_disable(&dev->mt76.tx_worker);
-	tasklet_disable(&dev->mt76.pre_tbtt_tasklet);
-	napi_disable(&dev->mt76.napi[0]);
-	napi_disable(&dev->mt76.napi[1]);
-	napi_disable(&dev->mt76.tx_napi);
-
-	mutex_lock(&dev->mt76.mutex);
-
-	mt7603_beacon_set_timer(dev, -1, 0);
-
-	if (dev->reset_cause[RESET_CAUSE_RESET_FAILED] ||
-	    dev->cur_reset_cause == RESET_CAUSE_RX_PSE_BUSY ||
-	    dev->cur_reset_cause == RESET_CAUSE_BEACON_STUCK ||
-	    dev->cur_reset_cause == RESET_CAUSE_TX_HANG)
-		mt7603_pse_reset(dev);
-
-	if (dev->reset_cause[RESET_CAUSE_RESET_FAILED])
-		goto skip_dma_reset;
-
-	mt7603_mac_stop(dev);
-
-	mt76_clear(dev, MT_WPDMA_GLO_CFG,
-		   MT_WPDMA_GLO_CFG_RX_DMA_EN | MT_WPDMA_GLO_CFG_TX_DMA_EN |
-		   MT_WPDMA_GLO_CFG_TX_WRITEBACK_DONE);
-	usleep_range(1000, 2000);
-
-	mt7603_irq_disable(dev, mask);
-
-	mt76_set(dev, MT_WPDMA_GLO_CFG, MT_WPDMA_GLO_CFG_FORCE_TX_EOF);
-
-	mt7603_pse_client_reset(dev);
-
-	mt76_queue_tx_cleanup(dev, dev->mt76.q_mcu[MT_MCUQ_WM], true);
-	for (i = 0; i < __MT_TXQ_MAX; i++)
-		mt76_queue_tx_cleanup(dev, dev->mphy.q_tx[i], true);
-
-	mt76_for_each_q_rx(&dev->mt76, i) {
-		mt76_queue_rx_reset(dev, i);
-	}
-
-	mt76_tx_status_check(&dev->mt76, true);
-
-	mt7603_dma_sched_reset(dev);
-
-	mt7603_mac_dma_start(dev);
-
-	mt7603_irq_enable(dev, mask);
-
-skip_dma_reset:
-	clear_bit(MT76_RESET, &dev->mphy.state);
-	mutex_unlock(&dev->mt76.mutex);
-
-	mt76_worker_enable(&dev->mt76.tx_worker);
-
-	tasklet_enable(&dev->mt76.pre_tbtt_tasklet);
-	mt7603_beacon_set_timer(dev, -1, beacon_int);
-
-	local_bh_disable();
-	napi_enable(&dev->mt76.tx_napi);
-	napi_schedule(&dev->mt76.tx_napi);
-
-	napi_enable(&dev->mt76.napi[0]);
-	napi_schedule(&dev->mt76.napi[0]);
-
-	napi_enable(&dev->mt76.napi[1]);
-	napi_schedule(&dev->mt76.napi[1]);
-	local_bh_enable();
-
-	ieee80211_wake_queues(dev->mt76.hw);
-	mt76_txq_schedule_all(&dev->mphy);
-}
-
-static u32 mt7603_dma_debug(struct mt7603_dev *dev, u8 index)
-{
-	u32 val;
-
-	mt76_wr(dev, MT_WPDMA_DEBUG,
-		FIELD_PREP(MT_WPDMA_DEBUG_IDX, index) |
-		MT_WPDMA_DEBUG_SEL);
-
-	val = mt76_rr(dev, MT_WPDMA_DEBUG);
-	return FIELD_GET(MT_WPDMA_DEBUG_VALUE, val);
-}
-
-static bool mt7603_rx_fifo_busy(struct mt7603_dev *dev)
-{
-	if (is_mt7628(dev))
-		return mt7603_dma_debug(dev, 9) & BIT(9);
-
-	return mt7603_dma_debug(dev, 2) & BIT(8);
-}
-
-static bool mt7603_rx_dma_busy(struct mt7603_dev *dev)
-{
-	if (!(mt76_rr(dev, MT_WPDMA_GLO_CFG) & MT_WPDMA_GLO_CFG_RX_DMA_BUSY))
-		return false;
-
-	return mt7603_rx_fifo_busy(dev);
-}
-
-static bool mt7603_tx_dma_busy(struct mt7603_dev *dev)
-{
-	u32 val;
-
-	if (!(mt76_rr(dev, MT_WPDMA_GLO_CFG) & MT_WPDMA_GLO_CFG_TX_DMA_BUSY))
-		return false;
-
-	val = mt7603_dma_debug(dev, 9);
-	return (val & BIT(8)) && (val & 0xf) != 0xf;
-}
-
-static bool mt7603_tx_hang(struct mt7603_dev *dev)
-{
-	struct mt76_queue *q;
-	u32 dma_idx, prev_dma_idx;
-	int i;
-
-	for (i = 0; i < 4; i++) {
-		q = dev->mphy.q_tx[i];
-
-		if (!q->queued)
-			continue;
-
-		prev_dma_idx = dev->tx_dma_idx[i];
-		dma_idx = readl(&q->regs->dma_idx);
-		dev->tx_dma_idx[i] = dma_idx;
-
-		if (dma_idx == prev_dma_idx &&
-		    dma_idx != readl(&q->regs->cpu_idx))
-			break;
-	}
-
-	return i < 4;
-}
-
-static bool mt7603_rx_pse_busy(struct mt7603_dev *dev)
-{
-	u32 addr, val;
-
-	if (mt76_rr(dev, MT_MCU_DEBUG_RESET) & MT_MCU_DEBUG_RESET_QUEUES)
-		return true;
-
-	if (mt7603_rx_fifo_busy(dev))
-		return false;
-
-	addr = mt7603_reg_map(dev, MT_CLIENT_BASE_PHYS_ADDR + MT_CLIENT_STATUS);
-	mt76_wr(dev, addr, 3);
-	val = mt76_rr(dev, addr) >> 16;
-
-	if (is_mt7628(dev) && (val & 0x4001) == 0x4001)
-		return true;
-
-	return (val & 0x8001) == 0x8001 || (val & 0xe001) == 0xe001;
-}
-
-static bool
-mt7603_watchdog_check(struct mt7603_dev *dev, u8 *counter,
-		      enum mt7603_reset_cause cause,
-		      bool (*check)(struct mt7603_dev *dev))
-{
-	if (dev->reset_test == cause + 1) {
-		dev->reset_test = 0;
-		goto trigger;
-	}
-
-	if (check) {
-		if (!check(dev) && *counter < MT7603_WATCHDOG_TIMEOUT) {
-			*counter = 0;
-			return false;
-		}
-
-		(*counter)++;
-	}
-
-	if (*counter < MT7603_WATCHDOG_TIMEOUT)
-		return false;
-trigger:
-	dev->cur_reset_cause = cause;
-	dev->reset_cause[cause]++;
-	return true;
-}
-
-void mt7603_update_channel(struct mt76_phy *mphy)
-{
-	struct mt7603_dev *dev = container_of(mphy->dev, struct mt7603_dev, mt76);
-	struct mt76_channel_state *state;
-
-	state = mphy->chan_state;
-	state->cc_busy += mt76_rr(dev, MT_MIB_STAT_CCA);
-}
-
-void
-mt7603_edcca_set_strict(struct mt7603_dev *dev, bool val)
-{
-	u32 rxtd_6 = 0xd7c80000;
-
-	if (val == dev->ed_strict_mode)
-		return;
-
-	dev->ed_strict_mode = val;
-
-	/* Ensure that ED/CCA does not trigger if disabled */
-	if (!dev->ed_monitor)
-		rxtd_6 |= FIELD_PREP(MT_RXTD_6_CCAED_TH, 0x34);
-	else
-		rxtd_6 |= FIELD_PREP(MT_RXTD_6_CCAED_TH, 0x7d);
-
-	if (dev->ed_monitor && !dev->ed_strict_mode)
-		rxtd_6 |= FIELD_PREP(MT_RXTD_6_ACI_TH, 0x0f);
-	else
-		rxtd_6 |= FIELD_PREP(MT_RXTD_6_ACI_TH, 0x10);
-
-	mt76_wr(dev, MT_RXTD(6), rxtd_6);
-
-	mt76_rmw_field(dev, MT_RXTD(13), MT_RXTD_13_ACI_TH_EN,
-		       dev->ed_monitor && !dev->ed_strict_mode);
-}
-
-static void
-mt7603_edcca_check(struct mt7603_dev *dev)
-{
-	u32 val = mt76_rr(dev, MT_AGC(41));
-	ktime_t cur_time;
-	int rssi0, rssi1;
-	u32 active;
-	u32 ed_busy;
-
-	if (!dev->ed_monitor)
-		return;
-
-	rssi0 = FIELD_GET(MT_AGC_41_RSSI_0, val);
-	if (rssi0 > 128)
-		rssi0 -= 256;
-
-	if (dev->mphy.antenna_mask & BIT(1)) {
-		rssi1 = FIELD_GET(MT_AGC_41_RSSI_1, val);
-		if (rssi1 > 128)
-			rssi1 -= 256;
-	} else {
-		rssi1 = rssi0;
-	}
-
-	if (max(rssi0, rssi1) >= -40 &&
-	    dev->ed_strong_signal < MT7603_EDCCA_BLOCK_TH)
-		dev->ed_strong_signal++;
-	else if (dev->ed_strong_signal > 0)
-		dev->ed_strong_signal--;
-
-	cur_time = ktime_get_boottime();
-	ed_busy = mt76_rr(dev, MT_MIB_STAT_ED) & MT_MIB_STAT_ED_MASK;
-
-	active = ktime_to_us(ktime_sub(cur_time, dev->ed_time));
-	dev->ed_time = cur_time;
-
-	if (!active)
-		return;
-
-	if (100 * ed_busy / active > 90) {
-		if (dev->ed_trigger < 0)
-			dev->ed_trigger = 0;
-		dev->ed_trigger++;
-	} else {
-		if (dev->ed_trigger > 0)
-			dev->ed_trigger = 0;
-		dev->ed_trigger--;
-	}
-
-	if (dev->ed_trigger > MT7603_EDCCA_BLOCK_TH ||
-	    dev->ed_strong_signal < MT7603_EDCCA_BLOCK_TH / 2) {
-		mt7603_edcca_set_strict(dev, true);
-	} else if (dev->ed_trigger < -MT7603_EDCCA_BLOCK_TH) {
-		mt7603_edcca_set_strict(dev, false);
-	}
-
-	if (dev->ed_trigger > MT7603_EDCCA_BLOCK_TH)
-		dev->ed_trigger = MT7603_EDCCA_BLOCK_TH;
-	else if (dev->ed_trigger < -MT7603_EDCCA_BLOCK_TH)
-		dev->ed_trigger = -MT7603_EDCCA_BLOCK_TH;
-}
-
-void mt7603_cca_stats_reset(struct mt7603_dev *dev)
-{
-	mt76_set(dev, MT_PHYCTRL(2), MT_PHYCTRL_2_STATUS_RESET);
-	mt76_clear(dev, MT_PHYCTRL(2), MT_PHYCTRL_2_STATUS_RESET);
-	mt76_set(dev, MT_PHYCTRL(2), MT_PHYCTRL_2_STATUS_EN);
-}
-
-static void
-mt7603_adjust_sensitivity(struct mt7603_dev *dev)
-{
-	u32 agc0 = dev->agc0, agc3 = dev->agc3;
-	u32 adj;
-
-	if (!dev->sensitivity || dev->sensitivity < -100) {
-		dev->sensitivity = 0;
-	} else if (dev->sensitivity <= -84) {
-		adj = 7 + (dev->sensitivity + 92) / 2;
-
-		agc0 = 0x56f0076f;
-		agc0 |= adj << 12;
-		agc0 |= adj << 16;
-		agc3 = 0x81d0d5e3;
-	} else if (dev->sensitivity <= -72) {
-		adj = 7 + (dev->sensitivity + 80) / 2;
-
-		agc0 = 0x6af0006f;
-		agc0 |= adj << 8;
-		agc0 |= adj << 12;
-		agc0 |= adj << 16;
-
-		agc3 = 0x8181d5e3;
-	} else {
-		if (dev->sensitivity > -54)
-			dev->sensitivity = -54;
-
-		adj = 7 + (dev->sensitivity + 80) / 2;
-
-		agc0 = 0x7ff0000f;
-		agc0 |= adj << 4;
-		agc0 |= adj << 8;
-		agc0 |= adj << 12;
-		agc0 |= adj << 16;
-
-		agc3 = 0x818181e3;
-	}
-
-	mt76_wr(dev, MT_AGC(0), agc0);
-	mt76_wr(dev, MT_AGC1(0), agc0);
-
-	mt76_wr(dev, MT_AGC(3), agc3);
-	mt76_wr(dev, MT_AGC1(3), agc3);
-}
-
-static void
-mt7603_false_cca_check(struct mt7603_dev *dev)
-{
-	int pd_cck, pd_ofdm, mdrdy_cck, mdrdy_ofdm;
-	int false_cca;
-	int min_signal;
-	u32 val;
-
-	if (!dev->dynamic_sensitivity)
-		return;
-
-	val = mt76_rr(dev, MT_PHYCTRL_STAT_PD);
-	pd_cck = FIELD_GET(MT_PHYCTRL_STAT_PD_CCK, val);
-	pd_ofdm = FIELD_GET(MT_PHYCTRL_STAT_PD_OFDM, val);
-
-	val = mt76_rr(dev, MT_PHYCTRL_STAT_MDRDY);
-	mdrdy_cck = FIELD_GET(MT_PHYCTRL_STAT_MDRDY_CCK, val);
-	mdrdy_ofdm = FIELD_GET(MT_PHYCTRL_STAT_MDRDY_OFDM, val);
-
-	dev->false_cca_ofdm = pd_ofdm - mdrdy_ofdm;
-	dev->false_cca_cck = pd_cck - mdrdy_cck;
-
-	mt7603_cca_stats_reset(dev);
-
-	min_signal = mt76_get_min_avg_rssi(&dev->mt76, false);
-	if (!min_signal) {
-		dev->sensitivity = 0;
-		dev->last_cca_adj = jiffies;
-		goto out;
-	}
-
-	min_signal -= 15;
-
-	false_cca = dev->false_cca_ofdm + dev->false_cca_cck;
-	if (false_cca > 600 &&
-	    dev->sensitivity < -100 + dev->sensitivity_limit) {
-		if (!dev->sensitivity)
-			dev->sensitivity = -92;
-		else
-			dev->sensitivity += 2;
-		dev->last_cca_adj = jiffies;
-	} else if (false_cca < 100 ||
-		   time_after(jiffies, dev->last_cca_adj + 10 * HZ)) {
-		dev->last_cca_adj = jiffies;
-		if (!dev->sensitivity)
-			goto out;
-
-		dev->sensitivity -= 2;
-	}
-
-	if (dev->sensitivity && dev->sensitivity > min_signal) {
-		dev->sensitivity = min_signal;
-		dev->last_cca_adj = jiffies;
-	}
-
-out:
-	mt7603_adjust_sensitivity(dev);
-}
-
-void mt7603_mac_work(struct work_struct *work)
-{
-	struct mt7603_dev *dev = container_of(work, struct mt7603_dev,
-					      mphy.mac_work.work);
-	bool reset = false;
-	int i, idx;
-
-	mt76_tx_status_check(&dev->mt76, false);
-
-	mutex_lock(&dev->mt76.mutex);
-
-	dev->mphy.mac_work_count++;
-	mt76_update_survey(&dev->mphy);
-	mt7603_edcca_check(dev);
-
-	for (i = 0, idx = 0; i < 2; i++) {
-		u32 val = mt76_rr(dev, MT_TX_AGG_CNT(i));
-
-		dev->mt76.aggr_stats[idx++] += val & 0xffff;
-		dev->mt76.aggr_stats[idx++] += val >> 16;
-	}
-
-	if (dev->mphy.mac_work_count == 10)
-		mt7603_false_cca_check(dev);
-
-	if (mt7603_watchdog_check(dev, &dev->rx_pse_check,
-				  RESET_CAUSE_RX_PSE_BUSY,
-				  mt7603_rx_pse_busy) ||
-	    mt7603_watchdog_check(dev, &dev->beacon_check,
-				  RESET_CAUSE_BEACON_STUCK,
-				  NULL) ||
-	    mt7603_watchdog_check(dev, &dev->tx_hang_check,
-				  RESET_CAUSE_TX_HANG,
-				  mt7603_tx_hang) ||
-	    mt7603_watchdog_check(dev, &dev->tx_dma_check,
-				  RESET_CAUSE_TX_BUSY,
-				  mt7603_tx_dma_busy) ||
-	    mt7603_watchdog_check(dev, &dev->rx_dma_check,
-				  RESET_CAUSE_RX_BUSY,
-				  mt7603_rx_dma_busy) ||
-	    mt7603_watchdog_check(dev, &dev->mcu_hang,
-				  RESET_CAUSE_MCU_HANG,
-				  NULL) ||
-	    dev->reset_cause[RESET_CAUSE_RESET_FAILED]) {
-		dev->beacon_check = 0;
-		dev->tx_dma_check = 0;
-		dev->tx_hang_check = 0;
-		dev->rx_dma_check = 0;
-		dev->rx_pse_check = 0;
-		dev->mcu_hang = 0;
-		dev->rx_dma_idx = ~0;
-		memset(dev->tx_dma_idx, 0xff, sizeof(dev->tx_dma_idx));
-		reset = true;
-		dev->mphy.mac_work_count = 0;
-	}
-
-	if (dev->mphy.mac_work_count >= 10)
-		dev->mphy.mac_work_count = 0;
-
-	mutex_unlock(&dev->mt76.mutex);
-
-	if (reset)
-		mt7603_mac_watchdog_reset(dev);
-
-	ieee80211_queue_delayed_work(mt76_hw(dev), &dev->mphy.mac_work,
-				     msecs_to_jiffies(MT7603_WATCHDOG_TIME));
-}
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt7603/mac.h b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt7603/mac.h
deleted file mode 100644
index 17e34ec..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt7603/mac.h
+++ /dev/null
@@ -1,242 +0,0 @@
-/* SPDX-License-Identifier: ISC */
-
-#ifndef __MT7603_MAC_H
-#define __MT7603_MAC_H
-
-#define MT_RXD0_LENGTH			GENMASK(15, 0)
-#define MT_RXD0_PKT_TYPE		GENMASK(31, 29)
-
-#define MT_RXD0_NORMAL_ETH_TYPE_OFS	GENMASK(22, 16)
-#define MT_RXD0_NORMAL_IP_SUM		BIT(23)
-#define MT_RXD0_NORMAL_UDP_TCP_SUM	BIT(24)
-#define MT_RXD0_NORMAL_GROUP_1		BIT(25)
-#define MT_RXD0_NORMAL_GROUP_2		BIT(26)
-#define MT_RXD0_NORMAL_GROUP_3		BIT(27)
-#define MT_RXD0_NORMAL_GROUP_4		BIT(28)
-
-enum rx_pkt_type {
-	PKT_TYPE_TXS		= 0,
-	PKT_TYPE_TXRXV		= 1,
-	PKT_TYPE_NORMAL		= 2,
-	PKT_TYPE_RX_DUP_RFB	= 3,
-	PKT_TYPE_RX_TMR		= 4,
-	PKT_TYPE_RETRIEVE	= 5,
-	PKT_TYPE_RX_EVENT	= 7,
-};
-
-#define MT_RXD1_NORMAL_BSSID		GENMASK(31, 26)
-#define MT_RXD1_NORMAL_PAYLOAD_FORMAT	GENMASK(25, 24)
-#define MT_RXD1_NORMAL_HDR_TRANS	BIT(23)
-#define MT_RXD1_NORMAL_HDR_OFFSET	BIT(22)
-#define MT_RXD1_NORMAL_MAC_HDR_LEN	GENMASK(21, 16)
-#define MT_RXD1_NORMAL_CH_FREQ		GENMASK(15, 8)
-#define MT_RXD1_NORMAL_KEY_ID		GENMASK(7, 6)
-#define MT_RXD1_NORMAL_BEACON_UC	BIT(5)
-#define MT_RXD1_NORMAL_BEACON_MC	BIT(4)
-#define MT_RXD1_NORMAL_BCAST		BIT(3)
-#define MT_RXD1_NORMAL_MCAST		BIT(2)
-#define MT_RXD1_NORMAL_U2M		BIT(1)
-#define MT_RXD1_NORMAL_HTC_VLD		BIT(0)
-
-#define MT_RXD2_NORMAL_NON_AMPDU	BIT(31)
-#define MT_RXD2_NORMAL_NON_AMPDU_SUB	BIT(30)
-#define MT_RXD2_NORMAL_NDATA		BIT(29)
-#define MT_RXD2_NORMAL_NULL_FRAME	BIT(28)
-#define MT_RXD2_NORMAL_FRAG		BIT(27)
-#define MT_RXD2_NORMAL_UDF_VALID	BIT(26)
-#define MT_RXD2_NORMAL_LLC_MIS		BIT(25)
-#define MT_RXD2_NORMAL_MAX_LEN_ERROR	BIT(24)
-#define MT_RXD2_NORMAL_AMSDU_ERR	BIT(23)
-#define MT_RXD2_NORMAL_LEN_MISMATCH	BIT(22)
-#define MT_RXD2_NORMAL_TKIP_MIC_ERR	BIT(21)
-#define MT_RXD2_NORMAL_ICV_ERR		BIT(20)
-#define MT_RXD2_NORMAL_CLM		BIT(19)
-#define MT_RXD2_NORMAL_CM		BIT(18)
-#define MT_RXD2_NORMAL_FCS_ERR		BIT(17)
-#define MT_RXD2_NORMAL_SW_BIT		BIT(16)
-#define MT_RXD2_NORMAL_SEC_MODE		GENMASK(15, 12)
-#define MT_RXD2_NORMAL_TID		GENMASK(11, 8)
-#define MT_RXD2_NORMAL_WLAN_IDX		GENMASK(7, 0)
-
-#define MT_RXD3_NORMAL_PF_STS		GENMASK(31, 30)
-#define MT_RXD3_NORMAL_PF_MODE		BIT(29)
-#define MT_RXD3_NORMAL_CLS_BITMAP	GENMASK(28, 19)
-#define MT_RXD3_NORMAL_WOL		GENMASK(18, 14)
-#define MT_RXD3_NORMAL_MAGIC_PKT	BIT(13)
-#define MT_RXD3_NORMAL_OFLD		GENMASK(12, 11)
-#define MT_RXD3_NORMAL_CLS		BIT(10)
-#define MT_RXD3_NORMAL_PATTERN_DROP	BIT(9)
-#define MT_RXD3_NORMAL_TSF_COMPARE_LOSS	BIT(8)
-#define MT_RXD3_NORMAL_RXV_SEQ		GENMASK(7, 0)
-
-#define MT_RXV1_VHTA1_B5_B4		GENMASK(31, 30)
-#define MT_RXV1_VHTA2_B8_B1		GENMASK(29, 22)
-#define MT_RXV1_HT_NO_SOUND		BIT(21)
-#define MT_RXV1_HT_SMOOTH		BIT(20)
-#define MT_RXV1_HT_SHORT_GI		BIT(19)
-#define MT_RXV1_HT_AGGR			BIT(18)
-#define MT_RXV1_VHTA1_B22		BIT(17)
-#define MT_RXV1_FRAME_MODE		GENMASK(16, 15)
-#define MT_RXV1_TX_MODE			GENMASK(14, 12)
-#define MT_RXV1_HT_EXT_LTF		GENMASK(11, 10)
-#define MT_RXV1_HT_AD_CODE		BIT(9)
-#define MT_RXV1_HT_STBC			GENMASK(8, 7)
-#define MT_RXV1_TX_RATE			GENMASK(6, 0)
-
-#define MT_RXV2_VHTA1_B16_B6		GENMASK(31, 21)
-#define MT_RXV2_LENGTH			GENMASK(20, 0)
-
-#define MT_RXV3_F_AGC1_CAL_GAIN		GENMASK(31, 29)
-#define MT_RXV3_F_AGC1_EQ_CAL		BIT(28)
-#define MT_RXV3_RCPI1			GENMASK(27, 20)
-#define MT_RXV3_F_AGC0_CAL_GAIN		GENMASK(19, 17)
-#define MT_RXV3_F_AGC0_EQ_CAL		BIT(16)
-#define MT_RXV3_RCPI0			GENMASK(15, 8)
-#define MT_RXV3_SEL_ANT			BIT(7)
-#define MT_RXV3_ACI_DET_X		BIT(6)
-#define MT_RXV3_OFDM_FREQ_TRANS_DETECT	BIT(5)
-#define MT_RXV3_VHTA1_B21_B17		GENMASK(4, 0)
-
-#define MT_RXV4_F_AGC_CAL_GAIN		GENMASK(31, 29)
-#define MT_RXV4_F_AGC2_EQ_CAL		BIT(28)
-#define MT_RXV4_IB_RSSI1		GENMASK(27, 20)
-#define MT_RXV4_F_AGC_LPF_GAIN_X	GENMASK(19, 16)
-#define MT_RXV4_WB_RSSI_X		GENMASK(15, 8)
-#define MT_RXV4_IB_RSSI0		GENMASK(7, 0)
-
-#define MT_RXV5_LTF_SNR0		GENMASK(31, 26)
-#define MT_RXV5_LTF_PROC_TIME		GENMASK(25, 19)
-#define MT_RXV5_FOE			GENMASK(18, 7)
-#define MT_RXV5_C_AGC_SATE		GENMASK(6, 4)
-#define MT_RXV5_F_AGC_LNA_GAIN_0	GENMASK(3, 2)
-#define MT_RXV5_F_AGC_LNA_GAIN_1	GENMASK(1, 0)
-
-#define MT_RXV6_C_AGC_STATE		GENMASK(30, 28)
-#define MT_RXV6_NS_TS_FIELD		GENMASK(27, 25)
-#define MT_RXV6_RX_VALID		BIT(24)
-#define MT_RXV6_NF2			GENMASK(23, 16)
-#define MT_RXV6_NF1			GENMASK(15, 8)
-#define MT_RXV6_NF0			GENMASK(7, 0)
-
-enum mt7603_tx_header_format {
-	MT_HDR_FORMAT_802_3,
-	MT_HDR_FORMAT_CMD,
-	MT_HDR_FORMAT_802_11,
-	MT_HDR_FORMAT_802_11_EXT,
-};
-
-#define MT_TXD_SIZE			(8 * 4)
-
-#define MT_TXD0_P_IDX			BIT(31)
-#define MT_TXD0_Q_IDX			GENMASK(30, 27)
-#define MT_TXD0_UTXB			BIT(26)
-#define MT_TXD0_UNXV			BIT(25)
-#define MT_TXD0_UDP_TCP_SUM		BIT(24)
-#define MT_TXD0_IP_SUM			BIT(23)
-#define MT_TXD0_ETH_TYPE_OFFSET		GENMASK(22, 16)
-#define MT_TXD0_TX_BYTES		GENMASK(15, 0)
-
-#define MT_TXD1_OWN_MAC			GENMASK(31, 26)
-#define MT_TXD1_PROTECTED		BIT(23)
-#define MT_TXD1_TID			GENMASK(22, 20)
-#define MT_TXD1_NO_ACK			BIT(19)
-#define MT_TXD1_HDR_PAD			GENMASK(18, 16)
-#define MT_TXD1_LONG_FORMAT		BIT(15)
-#define MT_TXD1_HDR_FORMAT		GENMASK(14, 13)
-#define MT_TXD1_HDR_INFO		GENMASK(12, 8)
-#define MT_TXD1_WLAN_IDX		GENMASK(7, 0)
-
-#define MT_TXD2_FIX_RATE		BIT(31)
-#define MT_TXD2_TIMING_MEASURE		BIT(30)
-#define MT_TXD2_BA_DISABLE		BIT(29)
-#define MT_TXD2_POWER_OFFSET		GENMASK(28, 24)
-#define MT_TXD2_MAX_TX_TIME		GENMASK(23, 16)
-#define MT_TXD2_FRAG			GENMASK(15, 14)
-#define MT_TXD2_HTC_VLD			BIT(13)
-#define MT_TXD2_DURATION		BIT(12)
-#define MT_TXD2_BIP			BIT(11)
-#define MT_TXD2_MULTICAST		BIT(10)
-#define MT_TXD2_RTS			BIT(9)
-#define MT_TXD2_SOUNDING		BIT(8)
-#define MT_TXD2_NDPA			BIT(7)
-#define MT_TXD2_NDP			BIT(6)
-#define MT_TXD2_FRAME_TYPE		GENMASK(5, 4)
-#define MT_TXD2_SUB_TYPE		GENMASK(3, 0)
-
-#define MT_TXD3_SN_VALID		BIT(31)
-#define MT_TXD3_PN_VALID		BIT(30)
-#define MT_TXD3_SEQ			GENMASK(27, 16)
-#define MT_TXD3_REM_TX_COUNT		GENMASK(15, 11)
-#define MT_TXD3_TX_COUNT		GENMASK(10, 6)
-
-#define MT_TXD4_PN_LOW			GENMASK(31, 0)
-
-#define MT_TXD5_PN_HIGH			GENMASK(31, 16)
-#define MT_TXD5_SW_POWER_MGMT		BIT(13)
-#define MT_TXD5_BA_SEQ_CTRL		BIT(12)
-#define MT_TXD5_DA_SELECT		BIT(11)
-#define MT_TXD5_TX_STATUS_HOST		BIT(10)
-#define MT_TXD5_TX_STATUS_MCU		BIT(9)
-#define MT_TXD5_TX_STATUS_FMT		BIT(8)
-#define MT_TXD5_PID			GENMASK(7, 0)
-
-#define MT_TXD6_SGI			BIT(31)
-#define MT_TXD6_LDPC			BIT(30)
-#define MT_TXD6_TX_RATE			GENMASK(29, 18)
-#define MT_TXD6_I_TXBF			BIT(17)
-#define MT_TXD6_E_TXBF			BIT(16)
-#define MT_TXD6_DYN_BW			BIT(15)
-#define MT_TXD6_ANT_PRI			GENMASK(14, 12)
-#define MT_TXD6_SPE_EN			BIT(11)
-#define MT_TXD6_FIXED_BW		BIT(10)
-#define MT_TXD6_BW			GENMASK(9, 8)
-#define MT_TXD6_ANT_ID			GENMASK(7, 2)
-#define MT_TXD6_FIXED_RATE		BIT(0)
-
-#define MT_TX_RATE_STBC			BIT(11)
-#define MT_TX_RATE_NSS			GENMASK(10, 9)
-#define MT_TX_RATE_MODE			GENMASK(8, 6)
-#define MT_TX_RATE_IDX			GENMASK(5, 0)
-
-#define MT_TXS0_ANTENNA			GENMASK(31, 26)
-#define MT_TXS0_TID			GENMASK(25, 22)
-#define MT_TXS0_BA_ERROR		BIT(22)
-#define MT_TXS0_PS_FLAG			BIT(21)
-#define MT_TXS0_TXOP_TIMEOUT		BIT(20)
-#define MT_TXS0_BIP_ERROR		BIT(19)
-
-#define MT_TXS0_QUEUE_TIMEOUT		BIT(18)
-#define MT_TXS0_RTS_TIMEOUT		BIT(17)
-#define MT_TXS0_ACK_TIMEOUT		BIT(16)
-#define MT_TXS0_ACK_ERROR_MASK		GENMASK(18, 16)
-
-#define MT_TXS0_TX_STATUS_HOST		BIT(15)
-#define MT_TXS0_TX_STATUS_MCU		BIT(14)
-#define MT_TXS0_TXS_FORMAT		BIT(13)
-#define MT_TXS0_FIXED_RATE		BIT(12)
-#define MT_TXS0_TX_RATE			GENMASK(11, 0)
-
-#define MT_TXS1_F0_TIMESTAMP		GENMASK(31, 0)
-#define MT_TXS1_F1_NOISE_2		GENMASK(23, 16)
-#define MT_TXS1_F1_NOISE_1		GENMASK(15, 8)
-#define MT_TXS1_F1_NOISE_0		GENMASK(7, 0)
-
-#define MT_TXS2_F0_FRONT_TIME		GENMASK(24, 0)
-#define MT_TXS2_F1_RCPI_2		GENMASK(23, 16)
-#define MT_TXS2_F1_RCPI_1		GENMASK(15, 8)
-#define MT_TXS2_F1_RCPI_0		GENMASK(7, 0)
-
-#define MT_TXS3_WCID			GENMASK(31, 24)
-#define MT_TXS3_RXV_SEQNO		GENMASK(23, 16)
-#define MT_TXS3_TX_DELAY		GENMASK(15, 0)
-
-#define MT_TXS4_LAST_TX_RATE		GENMASK(31, 29)
-#define MT_TXS4_TX_COUNT		GENMASK(28, 24)
-#define MT_TXS4_AMPDU			BIT(23)
-#define MT_TXS4_ACKED_MPDU		BIT(22)
-#define MT_TXS4_PID			GENMASK(21, 14)
-#define MT_TXS4_BW			GENMASK(13, 12)
-#define MT_TXS4_F0_SEQNO		GENMASK(11, 0)
-#define MT_TXS4_F1_TSSI			GENMASK(11, 0)
-
-#endif
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt7603/main.c b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt7603/main.c
deleted file mode 100644
index 91425b4..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt7603/main.c
+++ /dev/null
@@ -1,754 +0,0 @@
-// SPDX-License-Identifier: ISC
-
-#include <linux/etherdevice.h>
-#include <linux/platform_device.h>
-#include <linux/pci.h>
-#include <linux/module.h>
-#include "mt7603.h"
-#include "mac.h"
-#include "eeprom.h"
-
-static int
-mt7603_start(struct ieee80211_hw *hw)
-{
-	struct mt7603_dev *dev = hw->priv;
-
-	mt7603_mac_reset_counters(dev);
-	mt7603_mac_start(dev);
-	dev->mphy.survey_time = ktime_get_boottime();
-	set_bit(MT76_STATE_RUNNING, &dev->mphy.state);
-	mt7603_mac_work(&dev->mphy.mac_work.work);
-
-	return 0;
-}
-
-static void
-mt7603_stop(struct ieee80211_hw *hw)
-{
-	struct mt7603_dev *dev = hw->priv;
-
-	clear_bit(MT76_STATE_RUNNING, &dev->mphy.state);
-	cancel_delayed_work_sync(&dev->mphy.mac_work);
-	mt7603_mac_stop(dev);
-}
-
-static int
-mt7603_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
-{
-	struct mt7603_vif *mvif = (struct mt7603_vif *)vif->drv_priv;
-	struct mt7603_dev *dev = hw->priv;
-	struct mt76_txq *mtxq;
-	u8 bc_addr[ETH_ALEN];
-	int idx;
-	int ret = 0;
-
-	mutex_lock(&dev->mt76.mutex);
-
-	mvif->idx = __ffs64(~dev->mt76.vif_mask);
-	if (mvif->idx >= MT7603_MAX_INTERFACES) {
-		ret = -ENOSPC;
-		goto out;
-	}
-
-	mt76_wr(dev, MT_MAC_ADDR0(mvif->idx),
-		get_unaligned_le32(vif->addr));
-	mt76_wr(dev, MT_MAC_ADDR1(mvif->idx),
-		(get_unaligned_le16(vif->addr + 4) |
-		 MT_MAC_ADDR1_VALID));
-
-	if (vif->type == NL80211_IFTYPE_AP) {
-		mt76_wr(dev, MT_BSSID0(mvif->idx),
-			get_unaligned_le32(vif->addr));
-		mt76_wr(dev, MT_BSSID1(mvif->idx),
-			(get_unaligned_le16(vif->addr + 4) |
-			 MT_BSSID1_VALID));
-	}
-
-	idx = MT7603_WTBL_RESERVED - 1 - mvif->idx;
-	dev->mt76.vif_mask |= BIT_ULL(mvif->idx);
-	INIT_LIST_HEAD(&mvif->sta.poll_list);
-	mvif->sta.wcid.idx = idx;
-	mvif->sta.wcid.hw_key_idx = -1;
-	mt76_packet_id_init(&mvif->sta.wcid);
-
-	eth_broadcast_addr(bc_addr);
-	mt7603_wtbl_init(dev, idx, mvif->idx, bc_addr);
-
-	mtxq = (struct mt76_txq *)vif->txq->drv_priv;
-	mtxq->wcid = idx;
-	rcu_assign_pointer(dev->mt76.wcid[idx], &mvif->sta.wcid);
-
-out:
-	mutex_unlock(&dev->mt76.mutex);
-
-	return ret;
-}
-
-static void
-mt7603_remove_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
-{
-	struct mt7603_vif *mvif = (struct mt7603_vif *)vif->drv_priv;
-	struct mt7603_sta *msta = &mvif->sta;
-	struct mt7603_dev *dev = hw->priv;
-	int idx = msta->wcid.idx;
-
-	mt76_wr(dev, MT_MAC_ADDR0(mvif->idx), 0);
-	mt76_wr(dev, MT_MAC_ADDR1(mvif->idx), 0);
-	mt76_wr(dev, MT_BSSID0(mvif->idx), 0);
-	mt76_wr(dev, MT_BSSID1(mvif->idx), 0);
-	mt7603_beacon_set_timer(dev, mvif->idx, 0);
-
-	rcu_assign_pointer(dev->mt76.wcid[idx], NULL);
-
-	spin_lock_bh(&dev->sta_poll_lock);
-	if (!list_empty(&msta->poll_list))
-		list_del_init(&msta->poll_list);
-	spin_unlock_bh(&dev->sta_poll_lock);
-
-	mutex_lock(&dev->mt76.mutex);
-	dev->mt76.vif_mask &= ~BIT_ULL(mvif->idx);
-	mutex_unlock(&dev->mt76.mutex);
-
-	mt76_packet_id_flush(&dev->mt76, &mvif->sta.wcid);
-}
-
-void mt7603_init_edcca(struct mt7603_dev *dev)
-{
-	/* Set lower signal level to -65dBm */
-	mt76_rmw_field(dev, MT_RXTD(8), MT_RXTD_8_LOWER_SIGNAL, 0x23);
-
-	/* clear previous energy detect monitor results */
-	mt76_rr(dev, MT_MIB_STAT_ED);
-
-	if (dev->ed_monitor)
-		mt76_set(dev, MT_MIB_CTL, MT_MIB_CTL_ED_TIME);
-	else
-		mt76_clear(dev, MT_MIB_CTL, MT_MIB_CTL_ED_TIME);
-
-	dev->ed_strict_mode = 0xff;
-	dev->ed_strong_signal = 0;
-	dev->ed_time = ktime_get_boottime();
-
-	mt7603_edcca_set_strict(dev, false);
-}
-
-static int
-mt7603_set_channel(struct ieee80211_hw *hw, struct cfg80211_chan_def *def)
-{
-	struct mt7603_dev *dev = hw->priv;
-	u8 *rssi_data = (u8 *)dev->mt76.eeprom.data;
-	int idx, ret;
-	u8 bw = MT_BW_20;
-	bool failed = false;
-
-	ieee80211_stop_queues(hw);
-	cancel_delayed_work_sync(&dev->mphy.mac_work);
-	tasklet_disable(&dev->mt76.pre_tbtt_tasklet);
-
-	mutex_lock(&dev->mt76.mutex);
-	set_bit(MT76_RESET, &dev->mphy.state);
-
-	mt7603_beacon_set_timer(dev, -1, 0);
-	mt76_set_channel(&dev->mphy);
-	mt7603_mac_stop(dev);
-
-	if (def->width == NL80211_CHAN_WIDTH_40)
-		bw = MT_BW_40;
-
-	dev->mphy.chandef = *def;
-	mt76_rmw_field(dev, MT_AGG_BWCR, MT_AGG_BWCR_BW, bw);
-	ret = mt7603_mcu_set_channel(dev);
-	if (ret) {
-		failed = true;
-		goto out;
-	}
-
-	if (def->chan->band == NL80211_BAND_5GHZ) {
-		idx = 1;
-		rssi_data += MT_EE_RSSI_OFFSET_5G;
-	} else {
-		idx = 0;
-		rssi_data += MT_EE_RSSI_OFFSET_2G;
-	}
-
-	memcpy(dev->rssi_offset, rssi_data, sizeof(dev->rssi_offset));
-
-	idx |= (def->chan -
-		mt76_hw(dev)->wiphy->bands[def->chan->band]->channels) << 1;
-	mt76_wr(dev, MT_WF_RMAC_CH_FREQ, idx);
-	mt7603_mac_set_timing(dev);
-	mt7603_mac_start(dev);
-
-	clear_bit(MT76_RESET, &dev->mphy.state);
-
-	mt76_txq_schedule_all(&dev->mphy);
-
-	ieee80211_queue_delayed_work(mt76_hw(dev), &dev->mphy.mac_work,
-				     msecs_to_jiffies(MT7603_WATCHDOG_TIME));
-
-	/* reset channel stats */
-	mt76_clear(dev, MT_MIB_CTL, MT_MIB_CTL_READ_CLR_DIS);
-	mt76_set(dev, MT_MIB_CTL,
-		 MT_MIB_CTL_CCA_NAV_TX | MT_MIB_CTL_PSCCA_TIME);
-	mt76_rr(dev, MT_MIB_STAT_CCA);
-	mt7603_cca_stats_reset(dev);
-
-	dev->mphy.survey_time = ktime_get_boottime();
-
-	mt7603_init_edcca(dev);
-
-out:
-	if (!(mt76_hw(dev)->conf.flags & IEEE80211_CONF_OFFCHANNEL))
-		mt7603_beacon_set_timer(dev, -1, dev->mt76.beacon_int);
-	mutex_unlock(&dev->mt76.mutex);
-
-	tasklet_enable(&dev->mt76.pre_tbtt_tasklet);
-
-	if (failed)
-		mt7603_mac_work(&dev->mphy.mac_work.work);
-
-	ieee80211_wake_queues(hw);
-
-	return ret;
-}
-
-static int mt7603_set_sar_specs(struct ieee80211_hw *hw,
-				const struct cfg80211_sar_specs *sar)
-{
-	struct mt7603_dev *dev = hw->priv;
-	struct mt76_phy *mphy = &dev->mphy;
-	int err;
-
-	if (!cfg80211_chandef_valid(&mphy->chandef))
-		return -EINVAL;
-
-	err = mt76_init_sar_power(hw, sar);
-	if (err)
-		return err;
-
-	return mt7603_set_channel(hw, &mphy->chandef);
-}
-
-static int
-mt7603_config(struct ieee80211_hw *hw, u32 changed)
-{
-	struct mt7603_dev *dev = hw->priv;
-	int ret = 0;
-
-	if (changed & (IEEE80211_CONF_CHANGE_CHANNEL |
-		       IEEE80211_CONF_CHANGE_POWER))
-		ret = mt7603_set_channel(hw, &hw->conf.chandef);
-
-	if (changed & IEEE80211_CONF_CHANGE_MONITOR) {
-		mutex_lock(&dev->mt76.mutex);
-
-		if (!(hw->conf.flags & IEEE80211_CONF_MONITOR))
-			dev->rxfilter |= MT_WF_RFCR_DROP_OTHER_UC;
-		else
-			dev->rxfilter &= ~MT_WF_RFCR_DROP_OTHER_UC;
-
-		mt76_wr(dev, MT_WF_RFCR, dev->rxfilter);
-
-		mutex_unlock(&dev->mt76.mutex);
-	}
-
-	return ret;
-}
-
-static void
-mt7603_configure_filter(struct ieee80211_hw *hw, unsigned int changed_flags,
-			unsigned int *total_flags, u64 multicast)
-{
-	struct mt7603_dev *dev = hw->priv;
-	u32 flags = 0;
-
-#define MT76_FILTER(_flag, _hw) do { \
-		flags |= *total_flags & FIF_##_flag;			\
-		dev->rxfilter &= ~(_hw);				\
-		dev->rxfilter |= !(flags & FIF_##_flag) * (_hw);	\
-	} while (0)
-
-	dev->rxfilter &= ~(MT_WF_RFCR_DROP_OTHER_BSS |
-			   MT_WF_RFCR_DROP_OTHER_BEACON |
-			   MT_WF_RFCR_DROP_FRAME_REPORT |
-			   MT_WF_RFCR_DROP_PROBEREQ |
-			   MT_WF_RFCR_DROP_MCAST_FILTERED |
-			   MT_WF_RFCR_DROP_MCAST |
-			   MT_WF_RFCR_DROP_BCAST |
-			   MT_WF_RFCR_DROP_DUPLICATE |
-			   MT_WF_RFCR_DROP_A2_BSSID |
-			   MT_WF_RFCR_DROP_UNWANTED_CTL |
-			   MT_WF_RFCR_DROP_STBC_MULTI);
-
-	MT76_FILTER(OTHER_BSS, MT_WF_RFCR_DROP_OTHER_TIM |
-			       MT_WF_RFCR_DROP_A3_MAC |
-			       MT_WF_RFCR_DROP_A3_BSSID);
-
-	MT76_FILTER(FCSFAIL, MT_WF_RFCR_DROP_FCSFAIL);
-
-	MT76_FILTER(CONTROL, MT_WF_RFCR_DROP_CTS |
-			     MT_WF_RFCR_DROP_RTS |
-			     MT_WF_RFCR_DROP_CTL_RSV |
-			     MT_WF_RFCR_DROP_NDPA);
-
-	*total_flags = flags;
-	mt76_wr(dev, MT_WF_RFCR, dev->rxfilter);
-}
-
-static void
-mt7603_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
-			struct ieee80211_bss_conf *info, u32 changed)
-{
-	struct mt7603_dev *dev = hw->priv;
-	struct mt7603_vif *mvif = (struct mt7603_vif *)vif->drv_priv;
-
-	mutex_lock(&dev->mt76.mutex);
-
-	if (changed & (BSS_CHANGED_ASSOC | BSS_CHANGED_BSSID)) {
-		if (info->assoc || info->ibss_joined) {
-			mt76_wr(dev, MT_BSSID0(mvif->idx),
-				get_unaligned_le32(info->bssid));
-			mt76_wr(dev, MT_BSSID1(mvif->idx),
-				(get_unaligned_le16(info->bssid + 4) |
-				 MT_BSSID1_VALID));
-		} else {
-			mt76_wr(dev, MT_BSSID0(mvif->idx), 0);
-			mt76_wr(dev, MT_BSSID1(mvif->idx), 0);
-		}
-	}
-
-	if (changed & BSS_CHANGED_ERP_SLOT) {
-		int slottime = info->use_short_slot ? 9 : 20;
-
-		if (slottime != dev->slottime) {
-			dev->slottime = slottime;
-			mt7603_mac_set_timing(dev);
-		}
-	}
-
-	if (changed & (BSS_CHANGED_BEACON_ENABLED | BSS_CHANGED_BEACON_INT)) {
-		int beacon_int = !!info->enable_beacon * info->beacon_int;
-
-		tasklet_disable(&dev->mt76.pre_tbtt_tasklet);
-		mt7603_beacon_set_timer(dev, mvif->idx, beacon_int);
-		tasklet_enable(&dev->mt76.pre_tbtt_tasklet);
-	}
-
-	mutex_unlock(&dev->mt76.mutex);
-}
-
-int
-mt7603_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
-	       struct ieee80211_sta *sta)
-{
-	struct mt7603_dev *dev = container_of(mdev, struct mt7603_dev, mt76);
-	struct mt7603_sta *msta = (struct mt7603_sta *)sta->drv_priv;
-	struct mt7603_vif *mvif = (struct mt7603_vif *)vif->drv_priv;
-	int idx;
-	int ret = 0;
-
-	idx = mt76_wcid_alloc(dev->mt76.wcid_mask, MT7603_WTBL_STA - 1);
-	if (idx < 0)
-		return -ENOSPC;
-
-	INIT_LIST_HEAD(&msta->poll_list);
-	__skb_queue_head_init(&msta->psq);
-	msta->ps = ~0;
-	msta->smps = ~0;
-	msta->wcid.sta = 1;
-	msta->wcid.idx = idx;
-	mt7603_wtbl_init(dev, idx, mvif->idx, sta->addr);
-	mt7603_wtbl_set_ps(dev, msta, false);
-
-	if (vif->type == NL80211_IFTYPE_AP)
-		set_bit(MT_WCID_FLAG_CHECK_PS, &msta->wcid.flags);
-
-	return ret;
-}
-
-void
-mt7603_sta_assoc(struct mt76_dev *mdev, struct ieee80211_vif *vif,
-		 struct ieee80211_sta *sta)
-{
-	struct mt7603_dev *dev = container_of(mdev, struct mt7603_dev, mt76);
-
-	mt7603_wtbl_update_cap(dev, sta);
-}
-
-void
-mt7603_sta_remove(struct mt76_dev *mdev, struct ieee80211_vif *vif,
-		  struct ieee80211_sta *sta)
-{
-	struct mt7603_dev *dev = container_of(mdev, struct mt7603_dev, mt76);
-	struct mt7603_sta *msta = (struct mt7603_sta *)sta->drv_priv;
-	struct mt76_wcid *wcid = (struct mt76_wcid *)sta->drv_priv;
-
-	spin_lock_bh(&dev->ps_lock);
-	__skb_queue_purge(&msta->psq);
-	mt7603_filter_tx(dev, wcid->idx, true);
-	spin_unlock_bh(&dev->ps_lock);
-
-	spin_lock_bh(&dev->sta_poll_lock);
-	if (!list_empty(&msta->poll_list))
-		list_del_init(&msta->poll_list);
-	spin_unlock_bh(&dev->sta_poll_lock);
-
-	mt7603_wtbl_clear(dev, wcid->idx);
-}
-
-static void
-mt7603_ps_tx_list(struct mt7603_dev *dev, struct sk_buff_head *list)
-{
-	struct sk_buff *skb;
-
-	while ((skb = __skb_dequeue(list)) != NULL) {
-		int qid = skb_get_queue_mapping(skb);
-
-		mt76_tx_queue_skb_raw(dev, dev->mphy.q_tx[qid], skb, 0);
-	}
-}
-
-void
-mt7603_sta_ps(struct mt76_dev *mdev, struct ieee80211_sta *sta, bool ps)
-{
-	struct mt7603_dev *dev = container_of(mdev, struct mt7603_dev, mt76);
-	struct mt7603_sta *msta = (struct mt7603_sta *)sta->drv_priv;
-	struct sk_buff_head list;
-
-	mt76_stop_tx_queues(&dev->mphy, sta, true);
-	mt7603_wtbl_set_ps(dev, msta, ps);
-	if (ps)
-		return;
-
-	__skb_queue_head_init(&list);
-
-	spin_lock_bh(&dev->ps_lock);
-	skb_queue_splice_tail_init(&msta->psq, &list);
-	spin_unlock_bh(&dev->ps_lock);
-
-	mt7603_ps_tx_list(dev, &list);
-}
-
-static void
-mt7603_ps_set_more_data(struct sk_buff *skb)
-{
-	struct ieee80211_hdr *hdr;
-
-	hdr = (struct ieee80211_hdr *)&skb->data[MT_TXD_SIZE];
-	hdr->frame_control |= cpu_to_le16(IEEE80211_FCTL_MOREDATA);
-}
-
-static void
-mt7603_release_buffered_frames(struct ieee80211_hw *hw,
-			       struct ieee80211_sta *sta,
-			       u16 tids, int nframes,
-			       enum ieee80211_frame_release_type reason,
-			       bool more_data)
-{
-	struct mt7603_dev *dev = hw->priv;
-	struct mt7603_sta *msta = (struct mt7603_sta *)sta->drv_priv;
-	struct sk_buff_head list;
-	struct sk_buff *skb, *tmp;
-
-	__skb_queue_head_init(&list);
-
-	mt7603_wtbl_set_ps(dev, msta, false);
-
-	spin_lock_bh(&dev->ps_lock);
-	skb_queue_walk_safe(&msta->psq, skb, tmp) {
-		if (!nframes)
-			break;
-
-		if (!(tids & BIT(skb->priority)))
-			continue;
-
-		skb_set_queue_mapping(skb, MT_TXQ_PSD);
-		__skb_unlink(skb, &msta->psq);
-		mt7603_ps_set_more_data(skb);
-		__skb_queue_tail(&list, skb);
-		nframes--;
-	}
-	spin_unlock_bh(&dev->ps_lock);
-
-	if (!skb_queue_empty(&list))
-		ieee80211_sta_eosp(sta);
-
-	mt7603_ps_tx_list(dev, &list);
-
-	if (nframes)
-		mt76_release_buffered_frames(hw, sta, tids, nframes, reason,
-					     more_data);
-}
-
-static int
-mt7603_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
-	       struct ieee80211_vif *vif, struct ieee80211_sta *sta,
-	       struct ieee80211_key_conf *key)
-{
-	struct mt7603_dev *dev = hw->priv;
-	struct mt7603_vif *mvif = (struct mt7603_vif *)vif->drv_priv;
-	struct mt7603_sta *msta = sta ? (struct mt7603_sta *)sta->drv_priv :
-				  &mvif->sta;
-	struct mt76_wcid *wcid = &msta->wcid;
-	int idx = key->keyidx;
-
-	/* fall back to sw encryption for unsupported ciphers */
-	switch (key->cipher) {
-	case WLAN_CIPHER_SUITE_TKIP:
-	case WLAN_CIPHER_SUITE_CCMP:
-		break;
-	default:
-		return -EOPNOTSUPP;
-	}
-
-	/*
-	 * The hardware does not support per-STA RX GTK, fall back
-	 * to software mode for these.
-	 */
-	if ((vif->type == NL80211_IFTYPE_ADHOC ||
-	     vif->type == NL80211_IFTYPE_MESH_POINT) &&
-	    (key->cipher == WLAN_CIPHER_SUITE_TKIP ||
-	     key->cipher == WLAN_CIPHER_SUITE_CCMP) &&
-	    !(key->flags & IEEE80211_KEY_FLAG_PAIRWISE))
-		return -EOPNOTSUPP;
-
-	if (cmd == SET_KEY) {
-		key->hw_key_idx = wcid->idx;
-		wcid->hw_key_idx = idx;
-	} else {
-		if (idx == wcid->hw_key_idx)
-			wcid->hw_key_idx = -1;
-
-		key = NULL;
-	}
-	mt76_wcid_key_setup(&dev->mt76, wcid, key);
-
-	return mt7603_wtbl_set_key(dev, wcid->idx, key);
-}
-
-static int
-mt7603_conf_tx(struct ieee80211_hw *hw, struct ieee80211_vif *vif, u16 queue,
-	       const struct ieee80211_tx_queue_params *params)
-{
-	struct mt7603_dev *dev = hw->priv;
-	u16 cw_min = (1 << 5) - 1;
-	u16 cw_max = (1 << 10) - 1;
-	u32 val;
-
-	queue = dev->mphy.q_tx[queue]->hw_idx;
-
-	if (params->cw_min)
-		cw_min = params->cw_min;
-	if (params->cw_max)
-		cw_max = params->cw_max;
-
-	mutex_lock(&dev->mt76.mutex);
-	mt7603_mac_stop(dev);
-
-	val = mt76_rr(dev, MT_WMM_TXOP(queue));
-	val &= ~(MT_WMM_TXOP_MASK << MT_WMM_TXOP_SHIFT(queue));
-	val |= params->txop << MT_WMM_TXOP_SHIFT(queue);
-	mt76_wr(dev, MT_WMM_TXOP(queue), val);
-
-	val = mt76_rr(dev, MT_WMM_AIFSN);
-	val &= ~(MT_WMM_AIFSN_MASK << MT_WMM_AIFSN_SHIFT(queue));
-	val |= params->aifs << MT_WMM_AIFSN_SHIFT(queue);
-	mt76_wr(dev, MT_WMM_AIFSN, val);
-
-	val = mt76_rr(dev, MT_WMM_CWMIN);
-	val &= ~(MT_WMM_CWMIN_MASK << MT_WMM_CWMIN_SHIFT(queue));
-	val |= cw_min << MT_WMM_CWMIN_SHIFT(queue);
-	mt76_wr(dev, MT_WMM_CWMIN, val);
-
-	val = mt76_rr(dev, MT_WMM_CWMAX(queue));
-	val &= ~(MT_WMM_CWMAX_MASK << MT_WMM_CWMAX_SHIFT(queue));
-	val |= cw_max << MT_WMM_CWMAX_SHIFT(queue);
-	mt76_wr(dev, MT_WMM_CWMAX(queue), val);
-
-	mt7603_mac_start(dev);
-	mutex_unlock(&dev->mt76.mutex);
-
-	return 0;
-}
-
-static void
-mt7603_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
-	     u32 queues, bool drop)
-{
-}
-
-static int
-mt7603_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
-		    struct ieee80211_ampdu_params *params)
-{
-	enum ieee80211_ampdu_mlme_action action = params->action;
-	struct mt7603_dev *dev = hw->priv;
-	struct ieee80211_sta *sta = params->sta;
-	struct ieee80211_txq *txq = sta->txq[params->tid];
-	struct mt7603_sta *msta = (struct mt7603_sta *)sta->drv_priv;
-	u16 tid = params->tid;
-	u16 ssn = params->ssn;
-	u8 ba_size = params->buf_size;
-	struct mt76_txq *mtxq;
-	int ret = 0;
-
-	if (!txq)
-		return -EINVAL;
-
-	mtxq = (struct mt76_txq *)txq->drv_priv;
-
-	mutex_lock(&dev->mt76.mutex);
-	switch (action) {
-	case IEEE80211_AMPDU_RX_START:
-		mt76_rx_aggr_start(&dev->mt76, &msta->wcid, tid, ssn,
-				   params->buf_size);
-		mt7603_mac_rx_ba_reset(dev, sta->addr, tid);
-		break;
-	case IEEE80211_AMPDU_RX_STOP:
-		mt76_rx_aggr_stop(&dev->mt76, &msta->wcid, tid);
-		break;
-	case IEEE80211_AMPDU_TX_OPERATIONAL:
-		mtxq->aggr = true;
-		mtxq->send_bar = false;
-		mt7603_mac_tx_ba_reset(dev, msta->wcid.idx, tid, ba_size);
-		break;
-	case IEEE80211_AMPDU_TX_STOP_FLUSH:
-	case IEEE80211_AMPDU_TX_STOP_FLUSH_CONT:
-		mtxq->aggr = false;
-		mt7603_mac_tx_ba_reset(dev, msta->wcid.idx, tid, -1);
-		break;
-	case IEEE80211_AMPDU_TX_START:
-		mtxq->agg_ssn = IEEE80211_SN_TO_SEQ(ssn);
-		ret = IEEE80211_AMPDU_TX_START_IMMEDIATE;
-		break;
-	case IEEE80211_AMPDU_TX_STOP_CONT:
-		mtxq->aggr = false;
-		mt7603_mac_tx_ba_reset(dev, msta->wcid.idx, tid, -1);
-		ieee80211_stop_tx_ba_cb_irqsafe(vif, sta->addr, tid);
-		break;
-	}
-	mutex_unlock(&dev->mt76.mutex);
-
-	return ret;
-}
-
-static void
-mt7603_sta_rate_tbl_update(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
-			   struct ieee80211_sta *sta)
-{
-	struct mt7603_dev *dev = hw->priv;
-	struct mt7603_sta *msta = (struct mt7603_sta *)sta->drv_priv;
-	struct ieee80211_sta_rates *sta_rates = rcu_dereference(sta->rates);
-	int i;
-
-	if (!sta_rates)
-		return;
-
-	spin_lock_bh(&dev->mt76.lock);
-	for (i = 0; i < ARRAY_SIZE(msta->rates); i++) {
-		msta->rates[i].idx = sta_rates->rate[i].idx;
-		msta->rates[i].count = sta_rates->rate[i].count;
-		msta->rates[i].flags = sta_rates->rate[i].flags;
-
-		if (msta->rates[i].idx < 0 || !msta->rates[i].count)
-			break;
-	}
-	msta->n_rates = i;
-	mt7603_wtbl_set_rates(dev, msta, NULL, msta->rates);
-	msta->rate_probe = false;
-	mt7603_wtbl_set_smps(dev, msta,
-			     sta->smps_mode == IEEE80211_SMPS_DYNAMIC);
-	spin_unlock_bh(&dev->mt76.lock);
-}
-
-static void
-mt7603_set_coverage_class(struct ieee80211_hw *hw, s16 coverage_class)
-{
-	struct mt7603_dev *dev = hw->priv;
-
-	mutex_lock(&dev->mt76.mutex);
-	dev->coverage_class = max_t(s16, coverage_class, 0);
-	mt7603_mac_set_timing(dev);
-	mutex_unlock(&dev->mt76.mutex);
-}
-
-static void mt7603_tx(struct ieee80211_hw *hw,
-		      struct ieee80211_tx_control *control,
-		      struct sk_buff *skb)
-{
-	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
-	struct ieee80211_vif *vif = info->control.vif;
-	struct mt7603_dev *dev = hw->priv;
-	struct mt76_wcid *wcid = &dev->global_sta.wcid;
-
-	if (control->sta) {
-		struct mt7603_sta *msta;
-
-		msta = (struct mt7603_sta *)control->sta->drv_priv;
-		wcid = &msta->wcid;
-	} else if (vif) {
-		struct mt7603_vif *mvif;
-
-		mvif = (struct mt7603_vif *)vif->drv_priv;
-		wcid = &mvif->sta.wcid;
-	}
-
-	mt76_tx(&dev->mphy, control->sta, wcid, skb);
-}
-
-const struct ieee80211_ops mt7603_ops = {
-	.tx = mt7603_tx,
-	.start = mt7603_start,
-	.stop = mt7603_stop,
-	.add_interface = mt7603_add_interface,
-	.remove_interface = mt7603_remove_interface,
-	.config = mt7603_config,
-	.configure_filter = mt7603_configure_filter,
-	.bss_info_changed = mt7603_bss_info_changed,
-	.sta_state = mt76_sta_state,
-	.sta_pre_rcu_remove = mt76_sta_pre_rcu_remove,
-	.set_key = mt7603_set_key,
-	.conf_tx = mt7603_conf_tx,
-	.sw_scan_start = mt76_sw_scan,
-	.sw_scan_complete = mt76_sw_scan_complete,
-	.flush = mt7603_flush,
-	.ampdu_action = mt7603_ampdu_action,
-	.get_txpower = mt76_get_txpower,
-	.wake_tx_queue = mt76_wake_tx_queue,
-	.sta_rate_tbl_update = mt7603_sta_rate_tbl_update,
-	.release_buffered_frames = mt7603_release_buffered_frames,
-	.set_coverage_class = mt7603_set_coverage_class,
-	.set_tim = mt76_set_tim,
-	.get_survey = mt76_get_survey,
-	.get_antenna = mt76_get_antenna,
-	.set_sar_specs = mt7603_set_sar_specs,
-};
-
-MODULE_LICENSE("Dual BSD/GPL");
-
-static int __init mt7603_init(void)
-{
-	int ret;
-
-	ret = platform_driver_register(&mt76_wmac_driver);
-	if (ret)
-		return ret;
-
-#ifdef CONFIG_PCI
-	ret = pci_register_driver(&mt7603_pci_driver);
-	if (ret)
-		platform_driver_unregister(&mt76_wmac_driver);
-#endif
-	return ret;
-}
-
-static void __exit mt7603_exit(void)
-{
-#ifdef CONFIG_PCI
-	pci_unregister_driver(&mt7603_pci_driver);
-#endif
-	platform_driver_unregister(&mt76_wmac_driver);
-}
-
-module_init(mt7603_init);
-module_exit(mt7603_exit);
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt7603/mcu.c b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt7603/mcu.c
deleted file mode 100644
index 7884b95..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt7603/mcu.c
+++ /dev/null
@@ -1,433 +0,0 @@
-// SPDX-License-Identifier: ISC
-
-#include <linux/firmware.h>
-#include "mt7603.h"
-#include "mcu.h"
-#include "eeprom.h"
-
-#define MCU_SKB_RESERVE	8
-
-struct mt7603_fw_trailer {
-	char fw_ver[10];
-	char build_date[15];
-	__le32 dl_len;
-} __packed;
-
-static int
-mt7603_mcu_parse_response(struct mt76_dev *mdev, int cmd,
-			  struct sk_buff *skb, int seq)
-{
-	struct mt7603_dev *dev = container_of(mdev, struct mt7603_dev, mt76);
-	struct mt7603_mcu_rxd *rxd;
-
-	if (!skb) {
-		dev_err(mdev->dev, "MCU message %02x (seq %d) timed out\n",
-			abs(cmd), seq);
-		dev->mcu_hang = MT7603_WATCHDOG_TIMEOUT;
-		return -ETIMEDOUT;
-	}
-
-	rxd = (struct mt7603_mcu_rxd *)skb->data;
-	if (seq != rxd->seq)
-		return -EAGAIN;
-
-	return 0;
-}
-
-static int
-mt7603_mcu_skb_send_msg(struct mt76_dev *mdev, struct sk_buff *skb,
-			int cmd, int *wait_seq)
-{
-	struct mt7603_dev *dev = container_of(mdev, struct mt7603_dev, mt76);
-	int hdrlen = dev->mcu_running ? sizeof(struct mt7603_mcu_txd) : 12;
-	struct mt7603_mcu_txd *txd;
-	u8 seq;
-
-	mdev->mcu.timeout = 3 * HZ;
-
-	seq = ++mdev->mcu.msg_seq & 0xf;
-	if (!seq)
-		seq = ++mdev->mcu.msg_seq & 0xf;
-
-	txd = (struct mt7603_mcu_txd *)skb_push(skb, hdrlen);
-
-	txd->len = cpu_to_le16(skb->len);
-	if (cmd == -MCU_CMD_FW_SCATTER)
-		txd->pq_id = cpu_to_le16(MCU_PORT_QUEUE_FW);
-	else
-		txd->pq_id = cpu_to_le16(MCU_PORT_QUEUE);
-	txd->pkt_type = MCU_PKT_ID;
-	txd->seq = seq;
-
-	if (cmd < 0) {
-		txd->cid = -cmd;
-		txd->set_query = MCU_Q_NA;
-	} else {
-		txd->cid = MCU_CMD_EXT_CID;
-		txd->ext_cid = cmd;
-		txd->set_query = MCU_Q_SET;
-		txd->ext_cid_ack = 1;
-	}
-
-	if (wait_seq)
-		*wait_seq = seq;
-
-	return mt76_tx_queue_skb_raw(dev, mdev->q_mcu[MT_MCUQ_WM], skb, 0);
-}
-
-static int
-mt7603_mcu_init_download(struct mt7603_dev *dev, u32 addr, u32 len)
-{
-	struct {
-		__le32 addr;
-		__le32 len;
-		__le32 mode;
-	} req = {
-		.addr = cpu_to_le32(addr),
-		.len = cpu_to_le32(len),
-		.mode = cpu_to_le32(BIT(31)),
-	};
-
-	return mt76_mcu_send_msg(&dev->mt76, -MCU_CMD_TARGET_ADDRESS_LEN_REQ,
-				 &req, sizeof(req), true);
-}
-
-static int
-mt7603_mcu_start_firmware(struct mt7603_dev *dev, u32 addr)
-{
-	struct {
-		__le32 override;
-		__le32 addr;
-	} req = {
-		.override = cpu_to_le32(addr ? 1 : 0),
-		.addr = cpu_to_le32(addr),
-	};
-
-	return mt76_mcu_send_msg(&dev->mt76, -MCU_CMD_FW_START_REQ, &req,
-				 sizeof(req), true);
-}
-
-static int
-mt7603_mcu_restart(struct mt76_dev *dev)
-{
-	return mt76_mcu_send_msg(dev, -MCU_CMD_RESTART_DL_REQ, NULL, 0, true);
-}
-
-static int mt7603_load_firmware(struct mt7603_dev *dev)
-{
-	const struct firmware *fw;
-	const struct mt7603_fw_trailer *hdr;
-	const char *firmware;
-	int dl_len;
-	u32 addr, val;
-	int ret;
-
-	if (is_mt7628(dev)) {
-		if (mt76xx_rev(dev) == MT7628_REV_E1)
-			firmware = MT7628_FIRMWARE_E1;
-		else
-			firmware = MT7628_FIRMWARE_E2;
-	} else {
-		if (mt76xx_rev(dev) < MT7603_REV_E2)
-			firmware = MT7603_FIRMWARE_E1;
-		else
-			firmware = MT7603_FIRMWARE_E2;
-	}
-
-	ret = request_firmware(&fw, firmware, dev->mt76.dev);
-	if (ret)
-		return ret;
-
-	if (!fw || !fw->data || fw->size < sizeof(*hdr)) {
-		dev_err(dev->mt76.dev, "Invalid firmware\n");
-		ret = -EINVAL;
-		goto out;
-	}
-
-	hdr = (const struct mt7603_fw_trailer *)(fw->data + fw->size -
-						 sizeof(*hdr));
-
-	dev_info(dev->mt76.dev, "Firmware Version: %.10s\n", hdr->fw_ver);
-	dev_info(dev->mt76.dev, "Build Time: %.15s\n", hdr->build_date);
-
-	addr = mt7603_reg_map(dev, 0x50012498);
-	mt76_wr(dev, addr, 0x5);
-	mt76_wr(dev, addr, 0x5);
-	udelay(1);
-
-	/* switch to bypass mode */
-	mt76_rmw(dev, MT_SCH_4, MT_SCH_4_FORCE_QID,
-		 MT_SCH_4_BYPASS | FIELD_PREP(MT_SCH_4_FORCE_QID, 5));
-
-	val = mt76_rr(dev, MT_TOP_MISC2);
-	if (val & BIT(1)) {
-		dev_info(dev->mt76.dev, "Firmware already running...\n");
-		goto running;
-	}
-
-	if (!mt76_poll_msec(dev, MT_TOP_MISC2, BIT(0) | BIT(1), BIT(0), 500)) {
-		dev_err(dev->mt76.dev, "Timeout waiting for ROM code to become ready\n");
-		ret = -EIO;
-		goto out;
-	}
-
-	dl_len = le32_to_cpu(hdr->dl_len) + 4;
-	ret = mt7603_mcu_init_download(dev, MCU_FIRMWARE_ADDRESS, dl_len);
-	if (ret) {
-		dev_err(dev->mt76.dev, "Download request failed\n");
-		goto out;
-	}
-
-	ret = mt76_mcu_send_firmware(&dev->mt76, -MCU_CMD_FW_SCATTER,
-				     fw->data, dl_len);
-	if (ret) {
-		dev_err(dev->mt76.dev, "Failed to send firmware to device\n");
-		goto out;
-	}
-
-	ret = mt7603_mcu_start_firmware(dev, MCU_FIRMWARE_ADDRESS);
-	if (ret) {
-		dev_err(dev->mt76.dev, "Failed to start firmware\n");
-		goto out;
-	}
-
-	if (!mt76_poll_msec(dev, MT_TOP_MISC2, BIT(1), BIT(1), 500)) {
-		dev_err(dev->mt76.dev, "Timeout waiting for firmware to initialize\n");
-		ret = -EIO;
-		goto out;
-	}
-
-running:
-	mt76_clear(dev, MT_SCH_4, MT_SCH_4_FORCE_QID | MT_SCH_4_BYPASS);
-
-	mt76_set(dev, MT_SCH_4, BIT(8));
-	mt76_clear(dev, MT_SCH_4, BIT(8));
-
-	dev->mcu_running = true;
-	snprintf(dev->mt76.hw->wiphy->fw_version,
-		 sizeof(dev->mt76.hw->wiphy->fw_version),
-		 "%.10s-%.15s", hdr->fw_ver, hdr->build_date);
-	dev_info(dev->mt76.dev, "firmware init done\n");
-
-out:
-	release_firmware(fw);
-
-	return ret;
-}
-
-int mt7603_mcu_init(struct mt7603_dev *dev)
-{
-	static const struct mt76_mcu_ops mt7603_mcu_ops = {
-		.headroom = sizeof(struct mt7603_mcu_txd),
-		.mcu_skb_send_msg = mt7603_mcu_skb_send_msg,
-		.mcu_parse_response = mt7603_mcu_parse_response,
-		.mcu_restart = mt7603_mcu_restart,
-	};
-
-	dev->mt76.mcu_ops = &mt7603_mcu_ops;
-	return mt7603_load_firmware(dev);
-}
-
-void mt7603_mcu_exit(struct mt7603_dev *dev)
-{
-	__mt76_mcu_restart(&dev->mt76);
-	skb_queue_purge(&dev->mt76.mcu.res_q);
-}
-
-int mt7603_mcu_set_eeprom(struct mt7603_dev *dev)
-{
-	static const u16 req_fields[] = {
-#define WORD(_start)			\
-		_start,			\
-		_start + 1
-#define GROUP_2G(_start)		\
-		WORD(_start),		\
-		WORD(_start + 2),	\
-		WORD(_start + 4)
-
-		MT_EE_NIC_CONF_0 + 1,
-		WORD(MT_EE_NIC_CONF_1),
-		MT_EE_WIFI_RF_SETTING,
-		MT_EE_TX_POWER_DELTA_BW40,
-		MT_EE_TX_POWER_DELTA_BW80 + 1,
-		MT_EE_TX_POWER_EXT_PA_5G,
-		MT_EE_TEMP_SENSOR_CAL,
-		GROUP_2G(MT_EE_TX_POWER_0_START_2G),
-		GROUP_2G(MT_EE_TX_POWER_1_START_2G),
-		WORD(MT_EE_TX_POWER_CCK),
-		WORD(MT_EE_TX_POWER_OFDM_2G_6M),
-		WORD(MT_EE_TX_POWER_OFDM_2G_24M),
-		WORD(MT_EE_TX_POWER_OFDM_2G_54M),
-		WORD(MT_EE_TX_POWER_HT_BPSK_QPSK),
-		WORD(MT_EE_TX_POWER_HT_16_64_QAM),
-		WORD(MT_EE_TX_POWER_HT_64_QAM),
-		MT_EE_ELAN_RX_MODE_GAIN,
-		MT_EE_ELAN_RX_MODE_NF,
-		MT_EE_ELAN_RX_MODE_P1DB,
-		MT_EE_ELAN_BYPASS_MODE_GAIN,
-		MT_EE_ELAN_BYPASS_MODE_NF,
-		MT_EE_ELAN_BYPASS_MODE_P1DB,
-		WORD(MT_EE_STEP_NUM_NEG_6_7),
-		WORD(MT_EE_STEP_NUM_NEG_4_5),
-		WORD(MT_EE_STEP_NUM_NEG_2_3),
-		WORD(MT_EE_STEP_NUM_NEG_0_1),
-		WORD(MT_EE_REF_STEP_24G),
-		WORD(MT_EE_STEP_NUM_PLUS_1_2),
-		WORD(MT_EE_STEP_NUM_PLUS_3_4),
-		WORD(MT_EE_STEP_NUM_PLUS_5_6),
-		MT_EE_STEP_NUM_PLUS_7,
-		MT_EE_XTAL_FREQ_OFFSET,
-		MT_EE_XTAL_TRIM_2_COMP,
-		MT_EE_XTAL_TRIM_3_COMP,
-		MT_EE_XTAL_WF_RFCAL,
-
-		/* unknown fields below */
-		WORD(0x24),
-		0x34,
-		0x39,
-		0x3b,
-		WORD(0x42),
-		WORD(0x9e),
-		0xf2,
-		WORD(0xf8),
-		0xfa,
-		0x12e,
-		WORD(0x130), WORD(0x132), WORD(0x134), WORD(0x136),
-		WORD(0x138), WORD(0x13a), WORD(0x13c), WORD(0x13e),
-
-#undef GROUP_2G
-#undef WORD
-
-	};
-	struct req_data {
-		__le16 addr;
-		u8 val;
-		u8 pad;
-	} __packed;
-	struct {
-		u8 buffer_mode;
-		u8 len;
-		u8 pad[2];
-	} req_hdr = {
-		.buffer_mode = 1,
-		.len = ARRAY_SIZE(req_fields) - 1,
-	};
-	const int size = 0xff * sizeof(struct req_data);
-	u8 *req, *eep = (u8 *)dev->mt76.eeprom.data;
-	int i, ret, len = sizeof(req_hdr) + size;
-	struct req_data *data;
-
-	BUILD_BUG_ON(ARRAY_SIZE(req_fields) * sizeof(*data) > size);
-
-	req = kmalloc(len, GFP_KERNEL);
-	if (!req)
-		return -ENOMEM;
-
-	memcpy(req, &req_hdr, sizeof(req_hdr));
-	data = (struct req_data *)(req + sizeof(req_hdr));
-	memset(data, 0, size);
-	for (i = 0; i < ARRAY_SIZE(req_fields); i++) {
-		data[i].addr = cpu_to_le16(req_fields[i]);
-		data[i].val = eep[req_fields[i]];
-	}
-
-	ret = mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD_EFUSE_BUFFER_MODE,
-				req, len, true);
-	kfree(req);
-
-	return ret;
-}
-
-static int mt7603_mcu_set_tx_power(struct mt7603_dev *dev)
-{
-	struct {
-		u8 center_channel;
-		u8 tssi;
-		u8 temp_comp;
-		u8 target_power[2];
-		u8 rate_power_delta[14];
-		u8 bw_power_delta;
-		u8 ch_power_delta[6];
-		u8 temp_comp_power[17];
-		u8 reserved;
-	} req = {
-		.center_channel = dev->mphy.chandef.chan->hw_value,
-#define EEP_VAL(n) ((u8 *)dev->mt76.eeprom.data)[n]
-		.tssi = EEP_VAL(MT_EE_NIC_CONF_1 + 1),
-		.temp_comp = EEP_VAL(MT_EE_NIC_CONF_1),
-		.target_power = {
-			EEP_VAL(MT_EE_TX_POWER_0_START_2G + 2),
-			EEP_VAL(MT_EE_TX_POWER_1_START_2G + 2)
-		},
-		.bw_power_delta = EEP_VAL(MT_EE_TX_POWER_DELTA_BW40),
-		.ch_power_delta = {
-			EEP_VAL(MT_EE_TX_POWER_0_START_2G + 3),
-			EEP_VAL(MT_EE_TX_POWER_0_START_2G + 4),
-			EEP_VAL(MT_EE_TX_POWER_0_START_2G + 5),
-			EEP_VAL(MT_EE_TX_POWER_1_START_2G + 3),
-			EEP_VAL(MT_EE_TX_POWER_1_START_2G + 4),
-			EEP_VAL(MT_EE_TX_POWER_1_START_2G + 5)
-		},
-#undef EEP_VAL
-	};
-	u8 *eep = (u8 *)dev->mt76.eeprom.data;
-
-	memcpy(req.rate_power_delta, eep + MT_EE_TX_POWER_CCK,
-	       sizeof(req.rate_power_delta));
-
-	memcpy(req.temp_comp_power, eep + MT_EE_STEP_NUM_NEG_6_7,
-	       sizeof(req.temp_comp_power));
-
-	return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD_SET_TX_POWER_CTRL,
-				 &req, sizeof(req), true);
-}
-
-int mt7603_mcu_set_channel(struct mt7603_dev *dev)
-{
-	struct cfg80211_chan_def *chandef = &dev->mphy.chandef;
-	struct ieee80211_hw *hw = mt76_hw(dev);
-	int n_chains = hweight8(dev->mphy.antenna_mask);
-	struct {
-		u8 control_chan;
-		u8 center_chan;
-		u8 bw;
-		u8 tx_streams;
-		u8 rx_streams;
-		u8 _res0[7];
-		u8 txpower[21];
-		u8 _res1[3];
-	} req = {
-		.control_chan = chandef->chan->hw_value,
-		.center_chan = chandef->chan->hw_value,
-		.bw = MT_BW_20,
-		.tx_streams = n_chains,
-		.rx_streams = n_chains,
-	};
-	s8 tx_power = hw->conf.power_level * 2;
-	int i, ret;
-
-	if (dev->mphy.chandef.width == NL80211_CHAN_WIDTH_40) {
-		req.bw = MT_BW_40;
-		if (chandef->center_freq1 > chandef->chan->center_freq)
-			req.center_chan += 2;
-		else
-			req.center_chan -= 2;
-	}
-
-	tx_power = mt76_get_sar_power(&dev->mphy, chandef->chan, tx_power);
-	if (dev->mphy.antenna_mask == 3)
-		tx_power -= 6;
-	tx_power = min(tx_power, dev->tx_power_limit);
-
-	dev->mphy.txpower_cur = tx_power;
-
-	for (i = 0; i < ARRAY_SIZE(req.txpower); i++)
-		req.txpower[i] = tx_power;
-
-	ret = mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD_CHANNEL_SWITCH, &req,
-				sizeof(req), true);
-	if (ret)
-		return ret;
-
-	return mt7603_mcu_set_tx_power(dev);
-}
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt7603/mcu.h b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt7603/mcu.h
deleted file mode 100644
index 30df8a3..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt7603/mcu.h
+++ /dev/null
@@ -1,103 +0,0 @@
-/* SPDX-License-Identifier: ISC */
-
-#ifndef __MT7603_MCU_H
-#define __MT7603_MCU_H
-
-struct mt7603_mcu_txd {
-	__le16 len;
-	__le16 pq_id;
-
-	u8 cid;
-	u8 pkt_type;
-	u8 set_query;
-	u8 seq;
-
-	u8 uc_d2b0_rev;
-	u8 ext_cid;
-	u8 uc_d2b2_rev;
-	u8 ext_cid_ack;
-
-	u32 au4_d3_to_d7_rev[5];
-} __packed __aligned(4);
-
-struct mt7603_mcu_rxd {
-	__le16 len;
-	__le16 pkt_type_id;
-
-	u8 eid;
-	u8 seq;
-	__le16 __rsv;
-
-	u8 ext_eid;
-	u8 __rsv1[3];
-};
-
-#define MCU_PKT_ID		0xa0
-#define MCU_PORT_QUEUE		0x8000
-#define MCU_PORT_QUEUE_FW	0xc000
-
-#define MCU_FIRMWARE_ADDRESS	0x100000
-
-enum {
-	MCU_Q_QUERY,
-	MCU_Q_SET,
-	MCU_Q_RESERVED,
-	MCU_Q_NA
-};
-
-enum {
-	MCU_CMD_TARGET_ADDRESS_LEN_REQ = 0x01,
-	MCU_CMD_FW_START_REQ = 0x02,
-	MCU_CMD_INIT_ACCESS_REG = 0x3,
-	MCU_CMD_PATCH_START_REQ = 0x05,
-	MCU_CMD_PATCH_FINISH_REQ = 0x07,
-	MCU_CMD_PATCH_SEM_CONTROL = 0x10,
-	MCU_CMD_HIF_LOOPBACK = 0x20,
-	MCU_CMD_CH_PRIVILEGE = 0x20,
-	MCU_CMD_ACCESS_REG = 0xC2,
-	MCU_CMD_EXT_CID = 0xED,
-	MCU_CMD_FW_SCATTER = 0xEE,
-	MCU_CMD_RESTART_DL_REQ = 0xEF,
-};
-
-enum {
-	MCU_EXT_CMD_RF_REG_ACCESS = 0x02,
-	MCU_EXT_CMD_RF_TEST = 0x04,
-	MCU_EXT_CMD_RADIO_ON_OFF_CTRL = 0x05,
-	MCU_EXT_CMD_WIFI_RX_DISABLE = 0x06,
-	MCU_EXT_CMD_PM_STATE_CTRL = 0x07,
-	MCU_EXT_CMD_CHANNEL_SWITCH = 0x08,
-	MCU_EXT_CMD_NIC_CAPABILITY = 0x09,
-	MCU_EXT_CMD_PWR_SAVING = 0x0A,
-	MCU_EXT_CMD_MULTIPLE_REG_ACCESS = 0x0E,
-	MCU_EXT_CMD_AP_PWR_SAVING_CAPABILITY = 0xF,
-	MCU_EXT_CMD_SEC_ADDREMOVE_KEY = 0x10,
-	MCU_EXT_CMD_SET_TX_POWER_CTRL = 0x11,
-	MCU_EXT_CMD_FW_LOG_2_HOST = 0x13,
-	MCU_EXT_CMD_PS_RETRIEVE_START = 0x14,
-	MCU_EXT_CMD_LED_CTRL = 0x17,
-	MCU_EXT_CMD_PACKET_FILTER = 0x18,
-	MCU_EXT_CMD_PWR_MGT_BIT_WIFI = 0x1B,
-	MCU_EXT_CMD_EFUSE_BUFFER_MODE = 0x21,
-	MCU_EXT_CMD_THERMAL_PROTECT = 0x23,
-	MCU_EXT_CMD_EDCA_SET = 0x27,
-	MCU_EXT_CMD_SLOT_TIME_SET = 0x28,
-	MCU_EXT_CMD_CONFIG_INTERNAL_SETTING = 0x29,
-	MCU_EXT_CMD_NOA_OFFLOAD_CTRL = 0x2B,
-	MCU_EXT_CMD_GET_THEMAL_SENSOR = 0x2C,
-	MCU_EXT_CMD_WAKEUP_OPTION = 0x2E,
-	MCU_EXT_CMD_AC_QUEUE_CONTROL = 0x31,
-	MCU_EXT_CMD_BCN_UPDATE = 0x33
-};
-
-enum {
-	MCU_EXT_EVENT_CMD_RESULT = 0x0,
-	MCU_EXT_EVENT_RF_REG_ACCESS = 0x2,
-	MCU_EXT_EVENT_MULTI_CR_ACCESS = 0x0E,
-	MCU_EXT_EVENT_FW_LOG_2_HOST = 0x13,
-	MCU_EXT_EVENT_BEACON_LOSS = 0x1A,
-	MCU_EXT_EVENT_THERMAL_PROTECT = 0x22,
-	MCU_EXT_EVENT_BCN_UPDATE = 0x31,
-};
-
-#endif
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt7603/mt7603.h b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt7603/mt7603.h
deleted file mode 100644
index 0fd46d9..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt7603/mt7603.h
+++ /dev/null
@@ -1,265 +0,0 @@
-/* SPDX-License-Identifier: ISC */
-
-#ifndef __MT7603_H
-#define __MT7603_H
-
-#include <linux/interrupt.h>
-#include <linux/ktime.h>
-#include "../mt76.h"
-#include "regs.h"
-
-#define MT7603_MAX_INTERFACES	4
-#define MT7603_WTBL_SIZE	128
-#define MT7603_WTBL_RESERVED	(MT7603_WTBL_SIZE - 1)
-#define MT7603_WTBL_STA		(MT7603_WTBL_RESERVED - MT7603_MAX_INTERFACES)
-
-#define MT7603_RATE_RETRY	2
-
-#define MT7603_MCU_RX_RING_SIZE	64
-#define MT7603_RX_RING_SIZE     128
-#define MT7603_TX_RING_SIZE	256
-#define MT7603_PSD_RING_SIZE	128
-
-#define MT7603_FIRMWARE_E1	"mt7603_e1.bin"
-#define MT7603_FIRMWARE_E2	"mt7603_e2.bin"
-#define MT7628_FIRMWARE_E1	"mt7628_e1.bin"
-#define MT7628_FIRMWARE_E2	"mt7628_e2.bin"
-
-#define MT7603_EEPROM_SIZE	1024
-
-#define MT_AGG_SIZE_LIMIT(_n)	(((_n) + 1) * 4)
-
-#define MT7603_PRE_TBTT_TIME	5000 /* ms */
-
-#define MT7603_WATCHDOG_TIME	100 /* ms */
-#define MT7603_WATCHDOG_TIMEOUT	10 /* number of checks */
-
-#define MT7603_EDCCA_BLOCK_TH	10
-
-#define MT7603_CFEND_RATE_DEFAULT	0x69 /* chip default (24M) */
-#define MT7603_CFEND_RATE_11B		0x03 /* 11B LP, 11M */
-
-struct mt7603_vif;
-struct mt7603_sta;
-
-enum {
-	MT7603_REV_E1 = 0x00,
-	MT7603_REV_E2 = 0x10,
-	MT7628_REV_E1 = 0x8a00,
-};
-
-enum mt7603_bw {
-	MT_BW_20,
-	MT_BW_40,
-	MT_BW_80,
-};
-
-struct mt7603_rate_set {
-	struct ieee80211_tx_rate probe_rate;
-	struct ieee80211_tx_rate rates[4];
-};
-
-struct mt7603_sta {
-	struct mt76_wcid wcid; /* must be first */
-
-	struct mt7603_vif *vif;
-
-	struct list_head poll_list;
-	u32 tx_airtime_ac[4];
-
-	struct sk_buff_head psq;
-
-	struct ieee80211_tx_rate rates[4];
-
-	struct mt7603_rate_set rateset[2];
-	u32 rate_set_tsf;
-
-	u8 rate_count;
-	u8 n_rates;
-
-	u8 rate_probe;
-	u8 smps;
-
-	u8 ps;
-};
-
-struct mt7603_vif {
-	struct mt7603_sta sta; /* must be first */
-
-	u8 idx;
-};
-
-enum mt7603_reset_cause {
-	RESET_CAUSE_TX_HANG,
-	RESET_CAUSE_TX_BUSY,
-	RESET_CAUSE_RX_BUSY,
-	RESET_CAUSE_BEACON_STUCK,
-	RESET_CAUSE_RX_PSE_BUSY,
-	RESET_CAUSE_MCU_HANG,
-	RESET_CAUSE_RESET_FAILED,
-	__RESET_CAUSE_MAX
-};
-
-struct mt7603_dev {
-	union { /* must be first */
-		struct mt76_dev mt76;
-		struct mt76_phy mphy;
-	};
-
-	const struct mt76_bus_ops *bus_ops;
-
-	u32 rxfilter;
-
-	struct list_head sta_poll_list;
-	spinlock_t sta_poll_lock;
-
-	struct mt7603_sta global_sta;
-
-	u32 agc0, agc3;
-	u32 false_cca_ofdm, false_cca_cck;
-	unsigned long last_cca_adj;
-
-	u32 ampdu_ref;
-	u32 rx_ampdu_ts;
-	u8 rssi_offset[3];
-
-	u8 slottime;
-	s16 coverage_class;
-
-	s8 tx_power_limit;
-
-	ktime_t ed_time;
-
-	spinlock_t ps_lock;
-
-	u8 mcu_running;
-
-	u8 ed_monitor_enabled;
-	u8 ed_monitor;
-	s8 ed_trigger;
-	u8 ed_strict_mode;
-	u8 ed_strong_signal;
-
-	bool dynamic_sensitivity;
-	s8 sensitivity;
-	u8 sensitivity_limit;
-
-	u8 beacon_check;
-	u8 tx_hang_check;
-	u8 tx_dma_check;
-	u8 rx_dma_check;
-	u8 rx_pse_check;
-	u8 mcu_hang;
-
-	enum mt7603_reset_cause cur_reset_cause;
-
-	u16 tx_dma_idx[4];
-	u16 rx_dma_idx;
-
-	u32 reset_test;
-
-	unsigned int reset_cause[__RESET_CAUSE_MAX];
-};
-
-extern const struct mt76_driver_ops mt7603_drv_ops;
-extern const struct ieee80211_ops mt7603_ops;
-extern struct pci_driver mt7603_pci_driver;
-extern struct platform_driver mt76_wmac_driver;
-
-static inline bool is_mt7603(struct mt7603_dev *dev)
-{
-	return mt76xx_chip(dev) == 0x7603;
-}
-
-static inline bool is_mt7628(struct mt7603_dev *dev)
-{
-	return mt76xx_chip(dev) == 0x7628;
-}
-
-/* need offset to prevent conflict with ampdu_ack_len */
-#define MT_RATE_DRIVER_DATA_OFFSET	4
-
-u32 mt7603_reg_map(struct mt7603_dev *dev, u32 addr);
-
-irqreturn_t mt7603_irq_handler(int irq, void *dev_instance);
-
-int mt7603_register_device(struct mt7603_dev *dev);
-void mt7603_unregister_device(struct mt7603_dev *dev);
-int mt7603_eeprom_init(struct mt7603_dev *dev);
-int mt7603_dma_init(struct mt7603_dev *dev);
-void mt7603_dma_cleanup(struct mt7603_dev *dev);
-int mt7603_mcu_init(struct mt7603_dev *dev);
-void mt7603_init_debugfs(struct mt7603_dev *dev);
-
-static inline void mt7603_irq_enable(struct mt7603_dev *dev, u32 mask)
-{
-	mt76_set_irq_mask(&dev->mt76, MT_INT_MASK_CSR, 0, mask);
-}
-
-static inline void mt7603_irq_disable(struct mt7603_dev *dev, u32 mask)
-{
-	mt76_set_irq_mask(&dev->mt76, MT_INT_MASK_CSR, mask, 0);
-}
-
-void mt7603_mac_reset_counters(struct mt7603_dev *dev);
-void mt7603_mac_dma_start(struct mt7603_dev *dev);
-void mt7603_mac_start(struct mt7603_dev *dev);
-void mt7603_mac_stop(struct mt7603_dev *dev);
-void mt7603_mac_work(struct work_struct *work);
-void mt7603_mac_set_timing(struct mt7603_dev *dev);
-void mt7603_beacon_set_timer(struct mt7603_dev *dev, int idx, int intval);
-int mt7603_mac_fill_rx(struct mt7603_dev *dev, struct sk_buff *skb);
-void mt7603_mac_add_txs(struct mt7603_dev *dev, void *data);
-void mt7603_mac_rx_ba_reset(struct mt7603_dev *dev, void *addr, u8 tid);
-void mt7603_mac_tx_ba_reset(struct mt7603_dev *dev, int wcid, int tid,
-			    int ba_size);
-void mt7603_mac_sta_poll(struct mt7603_dev *dev);
-
-void mt7603_pse_client_reset(struct mt7603_dev *dev);
-
-int mt7603_mcu_set_channel(struct mt7603_dev *dev);
-int mt7603_mcu_set_eeprom(struct mt7603_dev *dev);
-void mt7603_mcu_exit(struct mt7603_dev *dev);
-
-void mt7603_wtbl_init(struct mt7603_dev *dev, int idx, int vif,
-		      const u8 *mac_addr);
-void mt7603_wtbl_clear(struct mt7603_dev *dev, int idx);
-void mt7603_wtbl_update_cap(struct mt7603_dev *dev, struct ieee80211_sta *sta);
-void mt7603_wtbl_set_rates(struct mt7603_dev *dev, struct mt7603_sta *sta,
-			   struct ieee80211_tx_rate *probe_rate,
-			   struct ieee80211_tx_rate *rates);
-int mt7603_wtbl_set_key(struct mt7603_dev *dev, int wcid,
-			struct ieee80211_key_conf *key);
-void mt7603_wtbl_set_ps(struct mt7603_dev *dev, struct mt7603_sta *sta,
-			bool enabled);
-void mt7603_wtbl_set_smps(struct mt7603_dev *dev, struct mt7603_sta *sta,
-			  bool enabled);
-void mt7603_filter_tx(struct mt7603_dev *dev, int idx, bool abort);
-
-int mt7603_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
-			  enum mt76_txq_id qid, struct mt76_wcid *wcid,
-			  struct ieee80211_sta *sta,
-			  struct mt76_tx_info *tx_info);
-
-void mt7603_tx_complete_skb(struct mt76_dev *mdev, struct mt76_queue_entry *e);
-
-void mt7603_queue_rx_skb(struct mt76_dev *mdev, enum mt76_rxq_id q,
-			 struct sk_buff *skb);
-void mt7603_rx_poll_complete(struct mt76_dev *mdev, enum mt76_rxq_id q);
-void mt7603_sta_ps(struct mt76_dev *mdev, struct ieee80211_sta *sta, bool ps);
-int mt7603_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
-		   struct ieee80211_sta *sta);
-void mt7603_sta_assoc(struct mt76_dev *mdev, struct ieee80211_vif *vif,
-		      struct ieee80211_sta *sta);
-void mt7603_sta_remove(struct mt76_dev *mdev, struct ieee80211_vif *vif,
-		       struct ieee80211_sta *sta);
-
-void mt7603_pre_tbtt_tasklet(struct tasklet_struct *t);
-
-void mt7603_update_channel(struct mt76_phy *mphy);
-
-void mt7603_edcca_set_strict(struct mt7603_dev *dev, bool val);
-void mt7603_cca_stats_reset(struct mt7603_dev *dev);
-
-void mt7603_init_edcca(struct mt7603_dev *dev);
-#endif
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt7603/pci.c b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt7603/pci.c
deleted file mode 100644
index 3d94cdb..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt7603/pci.c
+++ /dev/null
@@ -1,83 +0,0 @@
-// SPDX-License-Identifier: ISC
-
-#include <linux/kernel.h>
-#include <linux/module.h>
-#include <linux/pci.h>
-
-#include "mt7603.h"
-
-static const struct pci_device_id mt76pci_device_table[] = {
-	{ PCI_DEVICE(PCI_VENDOR_ID_MEDIATEK, 0x7603) },
-	{ },
-};
-
-static int
-mt76pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
-{
-	struct mt7603_dev *dev;
-	struct mt76_dev *mdev;
-	int ret;
-
-	ret = pcim_enable_device(pdev);
-	if (ret)
-		return ret;
-
-	ret = pcim_iomap_regions(pdev, BIT(0), pci_name(pdev));
-	if (ret)
-		return ret;
-
-	pci_set_master(pdev);
-
-	ret = dma_set_mask(&pdev->dev, DMA_BIT_MASK(32));
-	if (ret)
-		return ret;
-
-	mdev = mt76_alloc_device(&pdev->dev, sizeof(*dev), &mt7603_ops,
-				 &mt7603_drv_ops);
-	if (!mdev)
-		return -ENOMEM;
-
-	dev = container_of(mdev, struct mt7603_dev, mt76);
-	mt76_mmio_init(mdev, pcim_iomap_table(pdev)[0]);
-
-	mdev->rev = (mt76_rr(dev, MT_HW_CHIPID) << 16) |
-		    (mt76_rr(dev, MT_HW_REV) & 0xff);
-	dev_info(mdev->dev, "ASIC revision: %04x\n", mdev->rev);
-
-	mt76_wr(dev, MT_INT_MASK_CSR, 0);
-
-	ret = devm_request_irq(mdev->dev, pdev->irq, mt7603_irq_handler,
-			       IRQF_SHARED, KBUILD_MODNAME, dev);
-	if (ret)
-		goto error;
-
-	ret = mt7603_register_device(dev);
-	if (ret)
-		goto error;
-
-	return 0;
-error:
-	mt76_free_device(&dev->mt76);
-
-	return ret;
-}
-
-static void
-mt76pci_remove(struct pci_dev *pdev)
-{
-	struct mt76_dev *mdev = pci_get_drvdata(pdev);
-	struct mt7603_dev *dev = container_of(mdev, struct mt7603_dev, mt76);
-
-	mt7603_unregister_device(dev);
-}
-
-MODULE_DEVICE_TABLE(pci, mt76pci_device_table);
-MODULE_FIRMWARE(MT7603_FIRMWARE_E1);
-MODULE_FIRMWARE(MT7603_FIRMWARE_E2);
-
-struct pci_driver mt7603_pci_driver = {
-	.name		= KBUILD_MODNAME,
-	.id_table	= mt76pci_device_table,
-	.probe		= mt76pci_probe,
-	.remove		= mt76pci_remove,
-};
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt7603/regs.h b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt7603/regs.h
deleted file mode 100644
index 3b90109..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt7603/regs.h
+++ /dev/null
@@ -1,768 +0,0 @@
-/* SPDX-License-Identifier: ISC */
-
-#ifndef __MT7603_REGS_H
-#define __MT7603_REGS_H
-
-#define MT_HW_REV			0x1000
-#define MT_HW_CHIPID			0x1008
-#define MT_TOP_MISC2			0x1134
-
-#define MT_MCU_BASE			0x2000
-#define MT_MCU(ofs)			(MT_MCU_BASE + (ofs))
-
-#define MT_MCU_PCIE_REMAP_1		MT_MCU(0x500)
-#define MT_MCU_PCIE_REMAP_1_OFFSET	GENMASK(17, 0)
-#define MT_MCU_PCIE_REMAP_1_BASE	GENMASK(31, 18)
-
-#define MT_MCU_PCIE_REMAP_2		MT_MCU(0x504)
-#define MT_MCU_PCIE_REMAP_2_OFFSET	GENMASK(18, 0)
-#define MT_MCU_PCIE_REMAP_2_BASE	GENMASK(31, 19)
-
-#define MT_HIF_BASE			0x4000
-#define MT_HIF(ofs)			(MT_HIF_BASE + (ofs))
-
-#define MT_INT_SOURCE_CSR		MT_HIF(0x200)
-#define MT_INT_MASK_CSR			MT_HIF(0x204)
-#define MT_DELAY_INT_CFG		MT_HIF(0x210)
-
-#define MT_INT_RX_DONE(_n)		BIT(_n)
-#define MT_INT_RX_DONE_ALL		GENMASK(1, 0)
-#define MT_INT_TX_DONE_ALL		GENMASK(19, 4)
-#define MT_INT_TX_DONE(_n)		BIT((_n) + 4)
-
-#define MT_INT_RX_COHERENT		BIT(20)
-#define MT_INT_TX_COHERENT		BIT(21)
-#define MT_INT_MAC_IRQ3			BIT(27)
-
-#define MT_INT_MCU_CMD			BIT(30)
-
-#define MT_WPDMA_GLO_CFG		MT_HIF(0x208)
-#define MT_WPDMA_GLO_CFG_TX_DMA_EN	BIT(0)
-#define MT_WPDMA_GLO_CFG_TX_DMA_BUSY	BIT(1)
-#define MT_WPDMA_GLO_CFG_RX_DMA_EN	BIT(2)
-#define MT_WPDMA_GLO_CFG_RX_DMA_BUSY	BIT(3)
-#define MT_WPDMA_GLO_CFG_DMA_BURST_SIZE	GENMASK(5, 4)
-#define MT_WPDMA_GLO_CFG_TX_WRITEBACK_DONE	BIT(6)
-#define MT_WPDMA_GLO_CFG_BIG_ENDIAN	BIT(7)
-#define MT_WPDMA_GLO_CFG_HDR_SEG_LEN	GENMASK(15, 8)
-#define MT_WPDMA_GLO_CFG_SW_RESET	BIT(24)
-#define MT_WPDMA_GLO_CFG_FORCE_TX_EOF	BIT(25)
-#define MT_WPDMA_GLO_CFG_CLK_GATE_DIS	BIT(30)
-#define MT_WPDMA_GLO_CFG_RX_2B_OFFSET	BIT(31)
-
-#define MT_WPDMA_RST_IDX		MT_HIF(0x20c)
-
-#define MT_WPDMA_DEBUG			MT_HIF(0x244)
-#define MT_WPDMA_DEBUG_VALUE		GENMASK(17, 0)
-#define MT_WPDMA_DEBUG_SEL		BIT(27)
-#define MT_WPDMA_DEBUG_IDX		GENMASK(31, 28)
-
-#define MT_TX_RING_BASE			MT_HIF(0x300)
-#define MT_RX_RING_BASE			MT_HIF(0x400)
-
-#define MT_TXTIME_THRESH_BASE		MT_HIF(0x500)
-#define MT_TXTIME_THRESH(n)		(MT_TXTIME_THRESH_BASE + ((n) * 4))
-
-#define MT_PAGE_COUNT_BASE		MT_HIF(0x540)
-#define MT_PAGE_COUNT(n)		(MT_PAGE_COUNT_BASE + ((n) * 4))
-
-#define MT_SCH_1			MT_HIF(0x588)
-#define MT_SCH_2			MT_HIF(0x58c)
-#define MT_SCH_3			MT_HIF(0x590)
-
-#define MT_SCH_4			MT_HIF(0x594)
-#define MT_SCH_4_FORCE_QID		GENMASK(4, 0)
-#define MT_SCH_4_BYPASS			BIT(5)
-#define MT_SCH_4_RESET			BIT(8)
-
-#define MT_GROUP_THRESH_BASE		MT_HIF(0x598)
-#define MT_GROUP_THRESH(n)		(MT_GROUP_THRESH_BASE + ((n) * 4))
-
-#define MT_QUEUE_PRIORITY_1		MT_HIF(0x580)
-#define MT_QUEUE_PRIORITY_2		MT_HIF(0x584)
-
-#define MT_BMAP_0			MT_HIF(0x5b0)
-#define MT_BMAP_1			MT_HIF(0x5b4)
-#define MT_BMAP_2			MT_HIF(0x5b8)
-
-#define MT_HIGH_PRIORITY_1		MT_HIF(0x5bc)
-#define MT_HIGH_PRIORITY_2		MT_HIF(0x5c0)
-
-#define MT_PRIORITY_MASK		MT_HIF(0x5c4)
-
-#define MT_RSV_MAX_THRESH		MT_HIF(0x5c8)
-
-#define MT_PSE_BASE			0x8000
-#define MT_PSE(ofs)			(MT_PSE_BASE + (ofs))
-
-#define MT_MCU_DEBUG_RESET		MT_PSE(0x16c)
-#define MT_MCU_DEBUG_RESET_PSE		BIT(0)
-#define MT_MCU_DEBUG_RESET_PSE_S	BIT(1)
-#define MT_MCU_DEBUG_RESET_QUEUES	GENMASK(6, 2)
-
-#define MT_PSE_FC_P0			MT_PSE(0x120)
-#define MT_PSE_FC_P0_MIN_RESERVE	GENMASK(11, 0)
-#define MT_PSE_FC_P0_MAX_QUOTA		GENMASK(27, 16)
-
-#define MT_PSE_FRP			MT_PSE(0x138)
-#define MT_PSE_FRP_P0			GENMASK(2, 0)
-#define MT_PSE_FRP_P1			GENMASK(5, 3)
-#define MT_PSE_FRP_P2_RQ0		GENMASK(8, 6)
-#define MT_PSE_FRP_P2_RQ1		GENMASK(11, 9)
-#define MT_PSE_FRP_P2_RQ2		GENMASK(14, 12)
-
-#define MT_FC_RSV_COUNT_0		MT_PSE(0x13c)
-#define MT_FC_RSV_COUNT_0_P0		GENMASK(11, 0)
-#define MT_FC_RSV_COUNT_0_P1		GENMASK(27, 16)
-
-#define MT_FC_SP2_Q0Q1			MT_PSE(0x14c)
-#define MT_FC_SP2_Q0Q1_SRC_COUNT_Q0	GENMASK(11, 0)
-#define MT_FC_SP2_Q0Q1_SRC_COUNT_Q1	GENMASK(27, 16)
-
-#define MT_PSE_FW_SHARED		MT_PSE(0x17c)
-
-#define MT_PSE_RTA			MT_PSE(0x194)
-#define MT_PSE_RTA_QUEUE_ID		GENMASK(4, 0)
-#define MT_PSE_RTA_PORT_ID		GENMASK(6, 5)
-#define MT_PSE_RTA_REDIRECT_EN		BIT(7)
-#define MT_PSE_RTA_TAG_ID		GENMASK(15, 8)
-#define MT_PSE_RTA_WRITE		BIT(16)
-#define MT_PSE_RTA_BUSY			BIT(31)
-
-#define MT_WF_PHY_BASE			0x10000
-#define MT_WF_PHY_OFFSET		0x1000
-#define MT_WF_PHY(ofs)			(MT_WF_PHY_BASE + (ofs))
-
-#define MT_AGC_BASE			MT_WF_PHY(0x500)
-#define MT_AGC(n)			(MT_AGC_BASE + ((n) * 4))
-
-#define MT_AGC1_BASE			MT_WF_PHY(0x1500)
-#define MT_AGC1(n)			(MT_AGC1_BASE + ((n) * 4))
-
-#define MT_AGC_41_RSSI_0		GENMASK(23, 16)
-#define MT_AGC_41_RSSI_1		GENMASK(7, 0)
-
-#define MT_RXTD_BASE			MT_WF_PHY(0x600)
-#define MT_RXTD(n)			(MT_RXTD_BASE + ((n) * 4))
-
-#define MT_RXTD_6_ACI_TH		GENMASK(4, 0)
-#define MT_RXTD_6_CCAED_TH		GENMASK(14, 8)
-
-#define MT_RXTD_8_LOWER_SIGNAL		GENMASK(5, 0)
-
-#define MT_RXTD_13_ACI_TH_EN		BIT(0)
-
-#define MT_WF_PHY_CR_TSSI_BASE		MT_WF_PHY(0xd00)
-#define MT_WF_PHY_CR_TSSI(phy, n)	(MT_WF_PHY_CR_TSSI_BASE +	\
-					 ((phy) * MT_WF_PHY_OFFSET) +	\
-					 ((n) * 4))
-
-#define MT_PHYCTRL_BASE			MT_WF_PHY(0x4100)
-#define MT_PHYCTRL(n)			(MT_PHYCTRL_BASE + ((n) * 4))
-
-#define MT_PHYCTRL_2_STATUS_RESET	BIT(6)
-#define MT_PHYCTRL_2_STATUS_EN		BIT(7)
-
-#define MT_PHYCTRL_STAT_PD		MT_PHYCTRL(3)
-#define MT_PHYCTRL_STAT_PD_OFDM		GENMASK(31, 16)
-#define MT_PHYCTRL_STAT_PD_CCK		GENMASK(15, 0)
-
-#define MT_PHYCTRL_STAT_MDRDY		MT_PHYCTRL(8)
-#define MT_PHYCTRL_STAT_MDRDY_OFDM	GENMASK(31, 16)
-#define MT_PHYCTRL_STAT_MDRDY_CCK	GENMASK(15, 0)
-
-#define MT_WF_AGG_BASE			0x21200
-#define MT_WF_AGG(ofs)			(MT_WF_AGG_BASE + (ofs))
-
-#define MT_AGG_ARCR			MT_WF_AGG(0x010)
-#define MT_AGG_ARCR_INIT_RATE1		BIT(0)
-#define MT_AGG_ARCR_FB_SGI_DISABLE	BIT(1)
-#define MT_AGG_ARCR_RATE8_DOWN_WRAP	BIT(2)
-#define MT_AGG_ARCR_RTS_RATE_THR	GENMASK(12, 8)
-#define MT_AGG_ARCR_RATE_DOWN_RATIO	GENMASK(17, 16)
-#define MT_AGG_ARCR_RATE_DOWN_RATIO_EN	BIT(19)
-#define MT_AGG_ARCR_RATE_UP_EXTRA_TH	GENMASK(22, 20)
-#define MT_AGG_ARCR_SPE_DIS_TH		GENMASK(27, 24)
-
-#define MT_AGG_ARUCR			MT_WF_AGG(0x014)
-#define MT_AGG_ARDCR			MT_WF_AGG(0x018)
-#define MT_AGG_ARxCR_LIMIT_SHIFT(_n)	(4 * (_n))
-#define MT_AGG_ARxCR_LIMIT(_n)		GENMASK(2 + \
-						MT_AGG_ARxCR_LIMIT_SHIFT(_n), \
-						MT_AGG_ARxCR_LIMIT_SHIFT(_n))
-
-#define MT_AGG_LIMIT			MT_WF_AGG(0x040)
-#define MT_AGG_LIMIT_1			MT_WF_AGG(0x044)
-#define MT_AGG_LIMIT_AC(_n)		GENMASK(((_n) + 1) * 8 - 1, (_n) * 8)
-
-#define MT_AGG_BA_SIZE_LIMIT_0		MT_WF_AGG(0x048)
-#define MT_AGG_BA_SIZE_LIMIT_1		MT_WF_AGG(0x04c)
-#define MT_AGG_BA_SIZE_LIMIT_SHIFT	8
-
-#define MT_AGG_PCR			MT_WF_AGG(0x050)
-#define MT_AGG_PCR_MM			BIT(16)
-#define MT_AGG_PCR_GF			BIT(17)
-#define MT_AGG_PCR_BW40			BIT(18)
-#define MT_AGG_PCR_RIFS			BIT(19)
-#define MT_AGG_PCR_BW80			BIT(20)
-#define MT_AGG_PCR_BW160		BIT(21)
-#define MT_AGG_PCR_ERP			BIT(22)
-
-#define MT_AGG_PCR_RTS			MT_WF_AGG(0x054)
-#define MT_AGG_PCR_RTS_THR		GENMASK(19, 0)
-#define MT_AGG_PCR_RTS_PKT_THR		GENMASK(31, 25)
-
-#define MT_AGG_ASRCR			MT_WF_AGG(0x060)
-#define MT_AGG_ASRCR_RANGE(val, n)	(((val) >> ((n) << 3)) & GENMASK(5, 0))
-
-#define MT_AGG_CONTROL			MT_WF_AGG(0x070)
-#define MT_AGG_CONTROL_NO_BA_RULE	BIT(0)
-#define MT_AGG_CONTROL_NO_BA_AR_RULE	BIT(1)
-#define MT_AGG_CONTROL_CFEND_SPE_EN	BIT(3)
-#define MT_AGG_CONTROL_CFEND_RATE	GENMASK(15, 4)
-#define MT_AGG_CONTROL_BAR_SPE_EN	BIT(19)
-#define MT_AGG_CONTROL_BAR_RATE		GENMASK(31, 20)
-
-#define MT_AGG_TMP			MT_WF_AGG(0x0d8)
-
-#define MT_AGG_BWCR			MT_WF_AGG(0x0ec)
-#define MT_AGG_BWCR_BW			GENMASK(3, 2)
-
-#define MT_AGG_RETRY_CONTROL		MT_WF_AGG(0x0f4)
-#define MT_AGG_RETRY_CONTROL_RTS_LIMIT	GENMASK(11, 7)
-#define MT_AGG_RETRY_CONTROL_BAR_LIMIT	GENMASK(15, 12)
-
-#define MT_WF_DMA_BASE			0x21c00
-#define MT_WF_DMA(ofs)			(MT_WF_DMA_BASE + (ofs))
-
-#define MT_DMA_DCR0			MT_WF_DMA(0x000)
-#define MT_DMA_DCR0_MAX_RX_LEN		GENMASK(15, 0)
-#define MT_DMA_DCR0_DAMSDU		BIT(16)
-#define MT_DMA_DCR0_RX_VEC_DROP		BIT(17)
-
-#define MT_DMA_DCR1			MT_WF_DMA(0x004)
-
-#define MT_DMA_FQCR0			MT_WF_DMA(0x008)
-#define MT_DMA_FQCR0_TARGET_WCID	GENMASK(7, 0)
-#define MT_DMA_FQCR0_TARGET_BSS		GENMASK(13, 8)
-#define MT_DMA_FQCR0_TARGET_QID		GENMASK(20, 16)
-#define MT_DMA_FQCR0_DEST_PORT_ID	GENMASK(23, 22)
-#define MT_DMA_FQCR0_DEST_QUEUE_ID	GENMASK(28, 24)
-#define MT_DMA_FQCR0_MODE		BIT(29)
-#define MT_DMA_FQCR0_STATUS		BIT(30)
-#define MT_DMA_FQCR0_BUSY		BIT(31)
-
-#define MT_DMA_RCFR0			MT_WF_DMA(0x070)
-#define MT_DMA_VCFR0			MT_WF_DMA(0x07c)
-
-#define MT_DMA_TCFR0			MT_WF_DMA(0x080)
-#define MT_DMA_TCFR1			MT_WF_DMA(0x084)
-#define MT_DMA_TCFR_TXS_AGGR_TIMEOUT	GENMASK(27, 16)
-#define MT_DMA_TCFR_TXS_QUEUE		BIT(14)
-#define MT_DMA_TCFR_TXS_AGGR_COUNT	GENMASK(12, 8)
-#define MT_DMA_TCFR_TXS_BIT_MAP		GENMASK(6, 0)
-
-#define MT_DMA_TMCFR0			MT_WF_DMA(0x088)
-
-#define MT_WF_ARB_BASE			0x21400
-#define MT_WF_ARB(ofs)			(MT_WF_ARB_BASE + (ofs))
-
-#define MT_WMM_AIFSN			MT_WF_ARB(0x020)
-#define MT_WMM_AIFSN_MASK		GENMASK(3, 0)
-#define MT_WMM_AIFSN_SHIFT(_n)		((_n) * 4)
-
-#define MT_WMM_CWMAX_BASE		MT_WF_ARB(0x028)
-#define MT_WMM_CWMAX(_n)		(MT_WMM_CWMAX_BASE + (((_n) / 2) << 2))
-#define MT_WMM_CWMAX_SHIFT(_n)		(((_n) & 1) * 16)
-#define MT_WMM_CWMAX_MASK		GENMASK(15, 0)
-
-#define MT_WMM_CWMIN			MT_WF_ARB(0x040)
-#define MT_WMM_CWMIN_MASK		GENMASK(7, 0)
-#define MT_WMM_CWMIN_SHIFT(_n)		((_n) * 8)
-
-#define MT_WF_ARB_RQCR			MT_WF_ARB(0x070)
-#define MT_WF_ARB_RQCR_RX_START		BIT(0)
-#define MT_WF_ARB_RQCR_RXV_START	BIT(4)
-#define MT_WF_ARB_RQCR_RXV_R_EN		BIT(7)
-#define MT_WF_ARB_RQCR_RXV_T_EN		BIT(8)
-
-#define MT_ARB_SCR			MT_WF_ARB(0x080)
-#define MT_ARB_SCR_BCNQ_OPMODE_MASK	GENMASK(1, 0)
-#define MT_ARB_SCR_BCNQ_OPMODE_SHIFT(n)	((n) * 2)
-#define MT_ARB_SCR_TX_DISABLE		BIT(8)
-#define MT_ARB_SCR_RX_DISABLE		BIT(9)
-#define MT_ARB_SCR_BCNQ_EMPTY_SKIP	BIT(28)
-#define MT_ARB_SCR_TTTT_BTIM_PRIO	BIT(29)
-#define MT_ARB_SCR_TBTT_BCN_PRIO	BIT(30)
-#define MT_ARB_SCR_TBTT_BCAST_PRIO	BIT(31)
-
-enum {
-	MT_BCNQ_OPMODE_STA =	0,
-	MT_BCNQ_OPMODE_AP =	1,
-	MT_BCNQ_OPMODE_ADHOC =	2,
-};
-
-#define MT_WF_ARB_TX_START_0		MT_WF_ARB(0x100)
-#define MT_WF_ARB_TX_START_1		MT_WF_ARB(0x104)
-#define MT_WF_ARB_TX_FLUSH_0		MT_WF_ARB(0x108)
-#define MT_WF_ARB_TX_FLUSH_1		MT_WF_ARB(0x10c)
-#define MT_WF_ARB_TX_STOP_0		MT_WF_ARB(0x110)
-#define MT_WF_ARB_TX_STOP_1		MT_WF_ARB(0x114)
-
-#define MT_WF_ARB_BCN_START		MT_WF_ARB(0x118)
-#define MT_WF_ARB_BCN_START_BSSn(n)	BIT(0 + (n))
-#define MT_WF_ARB_BCN_START_T_PRE_TTTT	BIT(10)
-#define MT_WF_ARB_BCN_START_T_TTTT	BIT(11)
-#define MT_WF_ARB_BCN_START_T_PRE_TBTT	BIT(12)
-#define MT_WF_ARB_BCN_START_T_TBTT	BIT(13)
-#define MT_WF_ARB_BCN_START_T_SLOT_IDLE	BIT(14)
-#define MT_WF_ARB_BCN_START_T_TX_START	BIT(15)
-#define MT_WF_ARB_BCN_START_BSS0n(n)	BIT((n) ? 16 + ((n) - 1) : 0)
-
-#define MT_WF_ARB_BCN_FLUSH		MT_WF_ARB(0x11c)
-#define MT_WF_ARB_BCN_FLUSH_BSSn(n)	BIT(0 + (n))
-#define MT_WF_ARB_BCN_FLUSH_BSS0n(n)	BIT((n) ? 16 + ((n) - 1) : 0)
-
-#define MT_WF_ARB_CAB_START		MT_WF_ARB(0x120)
-#define MT_WF_ARB_CAB_START_BSSn(n)	BIT(0 + (n))
-#define MT_WF_ARB_CAB_START_BSS0n(n)	BIT((n) ? 16 + ((n) - 1) : 0)
-
-#define MT_WF_ARB_CAB_FLUSH		MT_WF_ARB(0x124)
-#define MT_WF_ARB_CAB_FLUSH_BSSn(n)	BIT(0 + (n))
-#define MT_WF_ARB_CAB_FLUSH_BSS0n(n)	BIT((n) ? 16 + ((n) - 1) : 0)
-
-#define MT_WF_ARB_CAB_COUNT(n)		MT_WF_ARB(0x128 + (n) * 4)
-#define MT_WF_ARB_CAB_COUNT_SHIFT	4
-#define MT_WF_ARB_CAB_COUNT_MASK	GENMASK(3, 0)
-#define MT_WF_ARB_CAB_COUNT_B0_REG(n)	MT_WF_ARB_CAB_COUNT(((n) > 12 ? 2 : \
-							     ((n) > 4 ? 1 : 0)))
-#define MT_WF_ARB_CAB_COUNT_B0_SHIFT(n)	(((n) > 12 ? (n) - 12 : \
-					 ((n) > 4 ? (n) - 4 : \
-					  (n) ? (n) + 3 : 0)) * 4)
-
-#define MT_TX_ABORT			MT_WF_ARB(0x134)
-#define MT_TX_ABORT_EN			BIT(0)
-#define MT_TX_ABORT_WCID		GENMASK(15, 8)
-
-#define MT_WF_TMAC_BASE			0x21600
-#define MT_WF_TMAC(ofs)			(MT_WF_TMAC_BASE + (ofs))
-
-#define MT_TMAC_TCR			MT_WF_TMAC(0x000)
-#define MT_TMAC_TCR_BLINK_SEL		GENMASK(7, 6)
-#define MT_TMAC_TCR_PRE_RTS_GUARD	GENMASK(11, 8)
-#define MT_TMAC_TCR_PRE_RTS_SEC_IDLE	GENMASK(13, 12)
-#define MT_TMAC_TCR_RTS_SIGTA		BIT(14)
-#define MT_TMAC_TCR_LDPC_OFS		BIT(15)
-#define MT_TMAC_TCR_TX_STREAMS		GENMASK(17, 16)
-#define MT_TMAC_TCR_SCH_IDLE_SEL	GENMASK(19, 18)
-#define MT_TMAC_TCR_SCH_DET_PER_IOD	BIT(20)
-#define MT_TMAC_TCR_DCH_DET_DISABLE	BIT(21)
-#define MT_TMAC_TCR_TX_RIFS		BIT(22)
-#define MT_TMAC_TCR_RX_RIFS_MODE	BIT(23)
-#define MT_TMAC_TCR_TXOP_TBTT_CTL	BIT(24)
-#define MT_TMAC_TCR_TBTT_TX_STOP_CTL	BIT(25)
-#define MT_TMAC_TCR_TXOP_BURST_STOP	BIT(26)
-#define MT_TMAC_TCR_RDG_RA_MODE		BIT(27)
-#define MT_TMAC_TCR_RDG_RESP		BIT(29)
-#define MT_TMAC_TCR_RDG_NO_PENDING	BIT(30)
-#define MT_TMAC_TCR_SMOOTHING		BIT(31)
-
-#define MT_WMM_TXOP_BASE		MT_WF_TMAC(0x010)
-#define MT_WMM_TXOP(_n)			(MT_WMM_TXOP_BASE + \
-					 ((((_n) / 2) ^ 0x1) << 2))
-#define MT_WMM_TXOP_SHIFT(_n)		(((_n) & 1) * 16)
-#define MT_WMM_TXOP_MASK		GENMASK(15, 0)
-
-#define MT_TIMEOUT_CCK			MT_WF_TMAC(0x090)
-#define MT_TIMEOUT_OFDM			MT_WF_TMAC(0x094)
-#define MT_TIMEOUT_VAL_PLCP		GENMASK(15, 0)
-#define MT_TIMEOUT_VAL_CCA		GENMASK(31, 16)
-
-#define MT_TXREQ			MT_WF_TMAC(0x09c)
-#define MT_TXREQ_CCA_SRC_SEL		GENMASK(31, 30)
-
-#define MT_RXREQ			MT_WF_TMAC(0x0a0)
-#define MT_RXREQ_DELAY			GENMASK(8, 0)
-
-#define MT_IFS				MT_WF_TMAC(0x0a4)
-#define MT_IFS_EIFS			GENMASK(8, 0)
-#define MT_IFS_RIFS			GENMASK(14, 10)
-#define MT_IFS_SIFS			GENMASK(22, 16)
-#define MT_IFS_SLOT			GENMASK(30, 24)
-
-#define MT_TMAC_PCR			MT_WF_TMAC(0x0b4)
-#define MT_TMAC_PCR_RATE		GENMASK(8, 0)
-#define MT_TMAC_PCR_RATE_FIXED		BIT(15)
-#define MT_TMAC_PCR_ANT_ID		GENMASK(21, 16)
-#define MT_TMAC_PCR_ANT_ID_SEL		BIT(22)
-#define MT_TMAC_PCR_SPE_EN		BIT(23)
-#define MT_TMAC_PCR_ANT_PRI		GENMASK(26, 24)
-#define MT_TMAC_PCR_ANT_PRI_SEL		GENMASK(27)
-
-#define MT_WF_RMAC_BASE			0x21800
-#define MT_WF_RMAC(ofs)			(MT_WF_RMAC_BASE + (ofs))
-
-#define MT_WF_RFCR			MT_WF_RMAC(0x000)
-#define MT_WF_RFCR_DROP_STBC_MULTI	BIT(0)
-#define MT_WF_RFCR_DROP_FCSFAIL		BIT(1)
-#define MT_WF_RFCR_DROP_VERSION		BIT(3)
-#define MT_WF_RFCR_DROP_PROBEREQ	BIT(4)
-#define MT_WF_RFCR_DROP_MCAST		BIT(5)
-#define MT_WF_RFCR_DROP_BCAST		BIT(6)
-#define MT_WF_RFCR_DROP_MCAST_FILTERED	BIT(7)
-#define MT_WF_RFCR_DROP_A3_MAC		BIT(8)
-#define MT_WF_RFCR_DROP_A3_BSSID	BIT(9)
-#define MT_WF_RFCR_DROP_A2_BSSID	BIT(10)
-#define MT_WF_RFCR_DROP_OTHER_BEACON	BIT(11)
-#define MT_WF_RFCR_DROP_FRAME_REPORT	BIT(12)
-#define MT_WF_RFCR_DROP_CTL_RSV		BIT(13)
-#define MT_WF_RFCR_DROP_CTS		BIT(14)
-#define MT_WF_RFCR_DROP_RTS		BIT(15)
-#define MT_WF_RFCR_DROP_DUPLICATE	BIT(16)
-#define MT_WF_RFCR_DROP_OTHER_BSS	BIT(17)
-#define MT_WF_RFCR_DROP_OTHER_UC	BIT(18)
-#define MT_WF_RFCR_DROP_OTHER_TIM	BIT(19)
-#define MT_WF_RFCR_DROP_NDPA		BIT(20)
-#define MT_WF_RFCR_DROP_UNWANTED_CTL	BIT(21)
-
-#define MT_BSSID0(idx)			MT_WF_RMAC(0x004 + (idx) * 8)
-#define MT_BSSID1(idx)			MT_WF_RMAC(0x008 + (idx) * 8)
-#define MT_BSSID1_VALID			BIT(16)
-
-#define MT_MAC_ADDR0(idx)		MT_WF_RMAC(0x024 + (idx) * 8)
-#define MT_MAC_ADDR1(idx)		MT_WF_RMAC(0x028 + (idx) * 8)
-#define MT_MAC_ADDR1_ADDR		GENMASK(15, 0)
-#define MT_MAC_ADDR1_VALID		BIT(16)
-
-#define MT_BA_CONTROL_0			MT_WF_RMAC(0x068)
-#define MT_BA_CONTROL_1			MT_WF_RMAC(0x06c)
-#define MT_BA_CONTROL_1_ADDR		GENMASK(15, 0)
-#define MT_BA_CONTROL_1_TID		GENMASK(19, 16)
-#define MT_BA_CONTROL_1_IGNORE_TID	BIT(20)
-#define MT_BA_CONTROL_1_IGNORE_ALL	BIT(21)
-#define MT_BA_CONTROL_1_RESET		BIT(22)
-
-#define MT_WF_RMACDR			MT_WF_RMAC(0x078)
-#define MT_WF_RMACDR_TSF_PROBERSP_DIS	BIT(0)
-#define MT_WF_RMACDR_TSF_TIM		BIT(4)
-#define MT_WF_RMACDR_MBSSID_MASK	GENMASK(25, 24)
-#define MT_WF_RMACDR_CHECK_HTC_BY_RATE	BIT(26)
-#define MT_WF_RMACDR_MAXLEN_20BIT	BIT(30)
-
-#define MT_WF_RMAC_RMCR			MT_WF_RMAC(0x080)
-#define MT_WF_RMAC_RMCR_SMPS_MODE	GENMASK(21, 20)
-#define MT_WF_RMAC_RMCR_RX_STREAMS	GENMASK(24, 22)
-#define MT_WF_RMAC_RMCR_SMPS_RTS	BIT(25)
-
-#define MT_WF_RMAC_CH_FREQ		MT_WF_RMAC(0x090)
-#define MT_WF_RMAC_MAXMINLEN		MT_WF_RMAC(0x098)
-#define MT_WF_RFCR1			MT_WF_RMAC(0x0a4)
-#define MT_WF_RMAC_TMR_PA		MT_WF_RMAC(0x0e0)
-
-#define MT_WF_SEC_BASE			0x21a00
-#define MT_WF_SEC(ofs)			(MT_WF_SEC_BASE + (ofs))
-
-#define MT_SEC_SCR			MT_WF_SEC(0x004)
-#define MT_SEC_SCR_MASK_ORDER		GENMASK(1, 0)
-
-#define MT_WTBL_OFF_BASE		0x23000
-#define MT_WTBL_OFF(n)			(MT_WTBL_OFF_BASE + (n))
-
-#define MT_WTBL_UPDATE			MT_WTBL_OFF(0x000)
-#define MT_WTBL_UPDATE_WLAN_IDX		GENMASK(7, 0)
-#define MT_WTBL_UPDATE_WTBL2		BIT(11)
-#define MT_WTBL_UPDATE_ADM_COUNT_CLEAR	BIT(12)
-#define MT_WTBL_UPDATE_RATE_UPDATE	BIT(13)
-#define MT_WTBL_UPDATE_TX_COUNT_CLEAR	BIT(14)
-#define MT_WTBL_UPDATE_RX_COUNT_CLEAR	BIT(15)
-#define MT_WTBL_UPDATE_BUSY		BIT(16)
-
-#define MT_WTBL_RMVTCR			MT_WTBL_OFF(0x008)
-#define MT_WTBL_RMVTCR_RX_MV_MODE	BIT(23)
-
-#define MT_LPON_BASE			0x24000
-#define MT_LPON(n)			(MT_LPON_BASE + (n))
-
-#define MT_LPON_T0CR			MT_LPON(0x010)
-#define MT_LPON_T0CR_MODE		GENMASK(1, 0)
-
-#define MT_LPON_UTTR0			MT_LPON(0x018)
-#define MT_LPON_UTTR1			MT_LPON(0x01c)
-
-#define MT_LPON_BTEIR			MT_LPON(0x020)
-#define MT_LPON_BTEIR_MBSS_MODE		GENMASK(31, 29)
-
-#define MT_PRE_TBTT			MT_LPON(0x030)
-#define MT_PRE_TBTT_MASK		GENMASK(7, 0)
-#define MT_PRE_TBTT_SHIFT		8
-
-#define MT_TBTT				MT_LPON(0x034)
-#define MT_TBTT_PERIOD			GENMASK(15, 0)
-#define MT_TBTT_DTIM_PERIOD		GENMASK(23, 16)
-#define MT_TBTT_TBTT_WAKE_PERIOD	GENMASK(27, 24)
-#define MT_TBTT_DTIM_WAKE_PERIOD	GENMASK(30, 28)
-#define MT_TBTT_CAL_ENABLE		BIT(31)
-
-#define MT_TBTT_TIMER_CFG		MT_LPON(0x05c)
-
-#define MT_LPON_SBTOR(n)		MT_LPON(0x0a0)
-#define MT_LPON_SBTOR_SUB_BSS_EN	BIT(29)
-#define MT_LPON_SBTOR_TIME_OFFSET	GENMASK(19, 0)
-
-#define MT_INT_WAKEUP_BASE		0x24400
-#define MT_INT_WAKEUP(n)		(MT_INT_WAKEUP_BASE + (n))
-
-#define MT_HW_INT_STATUS(n)		MT_INT_WAKEUP(0x3c + (n) * 8)
-#define MT_HW_INT_MASK(n)		MT_INT_WAKEUP(0x40 + (n) * 8)
-
-#define MT_HW_INT3_TBTT0		BIT(15)
-#define MT_HW_INT3_PRE_TBTT0		BIT(31)
-
-#define MT_WTBL1_BASE			0x28000
-
-#define MT_WTBL_ON_BASE			(MT_WTBL1_BASE + 0x2000)
-#define MT_WTBL_ON(_n)			(MT_WTBL_ON_BASE + (_n))
-
-#define MT_WTBL_RIUCR0			MT_WTBL_ON(0x200)
-
-#define MT_WTBL_RIUCR1			MT_WTBL_ON(0x204)
-#define MT_WTBL_RIUCR1_RATE0		GENMASK(11, 0)
-#define MT_WTBL_RIUCR1_RATE1		GENMASK(23, 12)
-#define MT_WTBL_RIUCR1_RATE2_LO		GENMASK(31, 24)
-
-#define MT_WTBL_RIUCR2			MT_WTBL_ON(0x208)
-#define MT_WTBL_RIUCR2_RATE2_HI		GENMASK(3, 0)
-#define MT_WTBL_RIUCR2_RATE3		GENMASK(15, 4)
-#define MT_WTBL_RIUCR2_RATE4		GENMASK(27, 16)
-#define MT_WTBL_RIUCR2_RATE5_LO		GENMASK(31, 28)
-
-#define MT_WTBL_RIUCR3			MT_WTBL_ON(0x20c)
-#define MT_WTBL_RIUCR3_RATE5_HI		GENMASK(7, 0)
-#define MT_WTBL_RIUCR3_RATE6		GENMASK(19, 8)
-#define MT_WTBL_RIUCR3_RATE7		GENMASK(31, 20)
-
-#define MT_MIB_BASE			0x2c000
-#define MT_MIB(_n)			(MT_MIB_BASE + (_n))
-
-#define MT_MIB_CTL			MT_MIB(0x00)
-#define MT_MIB_CTL_PSCCA_TIME		GENMASK(13, 11)
-#define MT_MIB_CTL_CCA_NAV_TX		GENMASK(16, 14)
-#define MT_MIB_CTL_ED_TIME		GENMASK(30, 28)
-#define MT_MIB_CTL_READ_CLR_DIS		BIT(31)
-
-#define MT_MIB_STAT(_n)			MT_MIB(0x08 + (_n) * 4)
-
-#define MT_MIB_STAT_CCA			MT_MIB_STAT(9)
-#define MT_MIB_STAT_CCA_MASK		GENMASK(23, 0)
-
-#define MT_MIB_STAT_PSCCA		MT_MIB_STAT(16)
-#define MT_MIB_STAT_PSCCA_MASK		GENMASK(23, 0)
-
-#define MT_TX_AGG_CNT(n)		MT_MIB(0xa8 + ((n) << 2))
-
-#define MT_MIB_STAT_ED			MT_MIB_STAT(18)
-#define MT_MIB_STAT_ED_MASK		GENMASK(23, 0)
-
-#define MT_PCIE_REMAP_BASE_1		0x40000
-#define MT_PCIE_REMAP_BASE_2		0x80000
-
-#define MT_TX_HW_QUEUE_MGMT		4
-#define MT_TX_HW_QUEUE_MCU		5
-#define MT_TX_HW_QUEUE_BCN		7
-#define MT_TX_HW_QUEUE_BMC		8
-
-#define MT_LED_BASE_PHYS		0x80024000
-#define MT_LED_PHYS(_n)			(MT_LED_BASE_PHYS + (_n))
-
-#define MT_LED_CTRL			MT_LED_PHYS(0x00)
-
-#define MT_LED_CTRL_REPLAY(_n)		BIT(0 + (8 * (_n)))
-#define MT_LED_CTRL_POLARITY(_n)	BIT(1 + (8 * (_n)))
-#define MT_LED_CTRL_TX_BLINK_MODE(_n)	BIT(2 + (8 * (_n)))
-#define MT_LED_CTRL_TX_MANUAL_BLINK(_n)	BIT(3 + (8 * (_n)))
-#define MT_LED_CTRL_TX_OVER_BLINK(_n)	BIT(5 + (8 * (_n)))
-#define MT_LED_CTRL_KICK(_n)		BIT(7 + (8 * (_n)))
-
-#define MT_LED_STATUS_0(_n)		MT_LED_PHYS(0x10 + ((_n) * 8))
-#define MT_LED_STATUS_1(_n)		MT_LED_PHYS(0x14 + ((_n) * 8))
-#define MT_LED_STATUS_OFF		GENMASK(31, 24)
-#define MT_LED_STATUS_ON		GENMASK(23, 16)
-#define MT_LED_STATUS_DURATION		GENMASK(15, 0)
-
-#define MT_CLIENT_BASE_PHYS_ADDR	0x800c0000
-
-#define MT_CLIENT_TMAC_INFO_TEMPLATE	0x040
-
-#define MT_CLIENT_STATUS		0x06c
-
-#define MT_CLIENT_RESET_TX		0x070
-#define MT_CLIENT_RESET_TX_R_E_1	BIT(16)
-#define MT_CLIENT_RESET_TX_R_E_2	BIT(17)
-#define MT_CLIENT_RESET_TX_R_E_1_S	BIT(20)
-#define MT_CLIENT_RESET_TX_R_E_2_S	BIT(21)
-
-#define MT_EFUSE_BASE			0x81070000
-
-#define MT_EFUSE_BASE_CTRL		0x000
-#define MT_EFUSE_BASE_CTRL_EMPTY	BIT(30)
-
-#define MT_EFUSE_CTRL			0x008
-#define MT_EFUSE_CTRL_AOUT		GENMASK(5, 0)
-#define MT_EFUSE_CTRL_MODE		GENMASK(7, 6)
-#define MT_EFUSE_CTRL_LDO_OFF_TIME	GENMASK(13, 8)
-#define MT_EFUSE_CTRL_LDO_ON_TIME	GENMASK(15, 14)
-#define MT_EFUSE_CTRL_AIN		GENMASK(25, 16)
-#define MT_EFUSE_CTRL_VALID		BIT(29)
-#define MT_EFUSE_CTRL_KICK		BIT(30)
-#define MT_EFUSE_CTRL_SEL		BIT(31)
-
-#define MT_EFUSE_WDATA(_i)		(0x010 + ((_i) * 4))
-#define MT_EFUSE_RDATA(_i)		(0x030 + ((_i) * 4))
-
-#define MT_CLIENT_RXINF			0x068
-#define MT_CLIENT_RXINF_RXSH_GROUPS	GENMASK(2, 0)
-
-#define MT_PSE_BASE_PHYS_ADDR		0xa0000000
-
-#define MT_PSE_WTBL_2_PHYS_ADDR		0xa5000000
-
-#define MT_WTBL1_SIZE			(8 * 4)
-#define MT_WTBL2_SIZE			(16 * 4)
-#define MT_WTBL3_OFFSET			(MT7603_WTBL_SIZE * MT_WTBL2_SIZE)
-#define MT_WTBL3_SIZE			(16 * 4)
-#define MT_WTBL4_OFFSET			(MT7603_WTBL_SIZE * MT_WTBL3_SIZE + \
-					 MT_WTBL3_OFFSET)
-#define MT_WTBL4_SIZE			(8 * 4)
-
-#define MT_WTBL1_W0_ADDR_HI		GENMASK(15, 0)
-#define MT_WTBL1_W0_MUAR_IDX		GENMASK(21, 16)
-#define MT_WTBL1_W0_RX_CHECK_A1		BIT(22)
-#define MT_WTBL1_W0_KEY_IDX		GENMASK(24, 23)
-#define MT_WTBL1_W0_RX_CHECK_KEY_IDX	BIT(25)
-#define MT_WTBL1_W0_RX_KEY_VALID	BIT(26)
-#define MT_WTBL1_W0_RX_IK_VALID		BIT(27)
-#define MT_WTBL1_W0_RX_VALID		BIT(28)
-#define MT_WTBL1_W0_RX_CHECK_A2		BIT(29)
-#define MT_WTBL1_W0_RX_DATA_VALID	BIT(30)
-#define MT_WTBL1_W0_WRITE_BURST		BIT(31)
-
-#define MT_WTBL1_W1_ADDR_LO		GENMASK(31, 0)
-
-#define MT_WTBL1_W2_MPDU_DENSITY	GENMASK(2, 0)
-#define MT_WTBL1_W2_KEY_TYPE		GENMASK(6, 3)
-#define MT_WTBL1_W2_EVEN_PN		BIT(7)
-#define MT_WTBL1_W2_TO_DS		BIT(8)
-#define MT_WTBL1_W2_FROM_DS		BIT(9)
-#define MT_WTBL1_W2_HEADER_TRANS	BIT(10)
-#define MT_WTBL1_W2_AMPDU_FACTOR	GENMASK(13, 11)
-#define MT_WTBL1_W2_PWR_MGMT		BIT(14)
-#define MT_WTBL1_W2_RDG			BIT(15)
-#define MT_WTBL1_W2_RTS			BIT(16)
-#define MT_WTBL1_W2_CFACK		BIT(17)
-#define MT_WTBL1_W2_RDG_BA		BIT(18)
-#define MT_WTBL1_W2_SMPS		BIT(19)
-#define MT_WTBL1_W2_TXS_BAF_REPORT	BIT(20)
-#define MT_WTBL1_W2_DYN_BW		BIT(21)
-#define MT_WTBL1_W2_LDPC		BIT(22)
-#define MT_WTBL1_W2_ITXBF		BIT(23)
-#define MT_WTBL1_W2_ETXBF		BIT(24)
-#define MT_WTBL1_W2_TXOP_PS		BIT(25)
-#define MT_WTBL1_W2_MESH		BIT(26)
-#define MT_WTBL1_W2_QOS			BIT(27)
-#define MT_WTBL1_W2_HT			BIT(28)
-#define MT_WTBL1_W2_VHT			BIT(29)
-#define MT_WTBL1_W2_ADMISSION_CONTROL	BIT(30)
-#define MT_WTBL1_W2_GROUP_ID		BIT(31)
-
-#define MT_WTBL1_W3_WTBL2_FRAME_ID	GENMASK(10, 0)
-#define MT_WTBL1_W3_WTBL2_ENTRY_ID	GENMASK(15, 11)
-#define MT_WTBL1_W3_WTBL4_FRAME_ID	GENMASK(26, 16)
-#define MT_WTBL1_W3_CHECK_PER		BIT(27)
-#define MT_WTBL1_W3_KEEP_I_PSM		BIT(28)
-#define MT_WTBL1_W3_I_PSM		BIT(29)
-#define MT_WTBL1_W3_POWER_SAVE		BIT(30)
-#define MT_WTBL1_W3_SKIP_TX		BIT(31)
-
-#define MT_WTBL1_W4_WTBL3_FRAME_ID	GENMASK(10, 0)
-#define MT_WTBL1_W4_WTBL3_ENTRY_ID	GENMASK(16, 11)
-#define MT_WTBL1_W4_WTBL4_ENTRY_ID	GENMASK(22, 17)
-#define MT_WTBL1_W4_PARTIAL_AID		GENMASK(31, 23)
-
-#define MT_WTBL2_W0_PN_LO		GENMASK(31, 0)
-
-#define MT_WTBL2_W1_PN_HI		GENMASK(15, 0)
-#define MT_WTBL2_W1_NON_QOS_SEQNO	GENMASK(27, 16)
-
-#define MT_WTBL2_W2_TID0_SN		GENMASK(11, 0)
-#define MT_WTBL2_W2_TID1_SN		GENMASK(23, 12)
-#define MT_WTBL2_W2_TID2_SN_LO		GENMASK(31, 24)
-
-#define MT_WTBL2_W3_TID2_SN_HI		GENMASK(3, 0)
-#define MT_WTBL2_W3_TID3_SN		GENMASK(15, 4)
-#define MT_WTBL2_W3_TID4_SN		GENMASK(27, 16)
-#define MT_WTBL2_W3_TID5_SN_LO		GENMASK(31, 28)
-
-#define MT_WTBL2_W4_TID5_SN_HI		GENMASK(7, 0)
-#define MT_WTBL2_W4_TID6_SN		GENMASK(19, 8)
-#define MT_WTBL2_W4_TID7_SN		GENMASK(31, 20)
-
-#define MT_WTBL2_W5_TX_COUNT_RATE1	GENMASK(15, 0)
-#define MT_WTBL2_W5_FAIL_COUNT_RATE1	GENAMSK(31, 16)
-
-#define MT_WTBL2_W6_TX_COUNT_RATE2	GENMASK(7, 0)
-#define MT_WTBL2_W6_TX_COUNT_RATE3	GENMASK(15, 8)
-#define MT_WTBL2_W6_TX_COUNT_RATE4	GENMASK(23, 16)
-#define MT_WTBL2_W6_TX_COUNT_RATE5	GENMASK(31, 24)
-
-#define MT_WTBL2_W7_TX_COUNT_CUR_BW	GENMASK(15, 0)
-#define MT_WTBL2_W7_FAIL_COUNT_CUR_BW	GENMASK(31, 16)
-
-#define MT_WTBL2_W8_TX_COUNT_OTHER_BW	GENMASK(15, 0)
-#define MT_WTBL2_W8_FAIL_COUNT_OTHER_BW	GENMASK(31, 16)
-
-#define MT_WTBL2_W9_POWER_OFFSET	GENMASK(4, 0)
-#define MT_WTBL2_W9_SPATIAL_EXT		BIT(5)
-#define MT_WTBL2_W9_ANT_PRIORITY	GENMASK(8, 6)
-#define MT_WTBL2_W9_CC_BW_SEL		GENMASK(10, 9)
-#define MT_WTBL2_W9_CHANGE_BW_RATE	GENMASK(13, 11)
-#define MT_WTBL2_W9_BW_CAP		GENMASK(15, 14)
-#define MT_WTBL2_W9_SHORT_GI_20		BIT(16)
-#define MT_WTBL2_W9_SHORT_GI_40		BIT(17)
-#define MT_WTBL2_W9_SHORT_GI_80		BIT(18)
-#define MT_WTBL2_W9_SHORT_GI_160	BIT(19)
-#define MT_WTBL2_W9_MPDU_FAIL_COUNT	GENMASK(25, 23)
-#define MT_WTBL2_W9_MPDU_OK_COUNT	GENMASK(28, 26)
-#define MT_WTBL2_W9_RATE_IDX		GENMASK(31, 29)
-
-#define MT_WTBL2_W10_RATE1		GENMASK(11, 0)
-#define MT_WTBL2_W10_RATE2		GENMASK(23, 12)
-#define MT_WTBL2_W10_RATE3_LO		GENMASK(31, 24)
-
-#define MT_WTBL2_W11_RATE3_HI		GENMASK(3, 0)
-#define MT_WTBL2_W11_RATE4		GENMASK(15, 4)
-#define MT_WTBL2_W11_RATE5		GENMASK(27, 16)
-#define MT_WTBL2_W11_RATE6_LO		GENMASK(31, 28)
-
-#define MT_WTBL2_W12_RATE6_HI		GENMASK(7, 0)
-#define MT_WTBL2_W12_RATE7		GENMASK(19, 8)
-#define MT_WTBL2_W12_RATE8		GENMASK(31, 20)
-
-#define MT_WTBL2_W13_AVG_RCPI0		GENMASK(7, 0)
-#define MT_WTBL2_W13_AVG_RCPI1		GENMASK(15, 8)
-#define MT_WTBL2_W13_AVG_RCPI2		GENAMSK(23, 16)
-
-#define MT_WTBL2_W14_CC_NOISE_1S	GENMASK(6, 0)
-#define MT_WTBL2_W14_CC_NOISE_2S	GENMASK(13, 7)
-#define MT_WTBL2_W14_CC_NOISE_3S	GENMASK(20, 14)
-#define MT_WTBL2_W14_CHAN_EST_RMS	GENMASK(24, 21)
-#define MT_WTBL2_W14_CC_NOISE_SEL	BIT(15)
-#define MT_WTBL2_W14_ANT_SEL		GENMASK(31, 26)
-
-#define MT_WTBL2_W15_BA_WIN_SIZE	GENMASK(2, 0)
-#define MT_WTBL2_W15_BA_WIN_SIZE_SHIFT	3
-#define MT_WTBL2_W15_BA_EN_TIDS		GENMASK(31, 24)
-
-#define MT_WTBL1_OR			(MT_WTBL1_BASE + 0x2300)
-#define MT_WTBL1_OR_PSM_WRITE		BIT(31)
-
-#endif
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt7603/soc.c b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt7603/soc.c
deleted file mode 100644
index ba92703..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt7603/soc.c
+++ /dev/null
@@ -1,82 +0,0 @@
-// SPDX-License-Identifier: ISC
-
-#include <linux/kernel.h>
-#include <linux/module.h>
-#include <linux/platform_device.h>
-
-#include "mt7603.h"
-
-static int
-mt76_wmac_probe(struct platform_device *pdev)
-{
-	struct mt7603_dev *dev;
-	void __iomem *mem_base;
-	struct mt76_dev *mdev;
-	int irq;
-	int ret;
-
-	irq = platform_get_irq(pdev, 0);
-	if (irq < 0)
-		return irq;
-
-	mem_base = devm_platform_ioremap_resource(pdev, 0);
-	if (IS_ERR(mem_base))
-		return PTR_ERR(mem_base);
-
-	mdev = mt76_alloc_device(&pdev->dev, sizeof(*dev), &mt7603_ops,
-				 &mt7603_drv_ops);
-	if (!mdev)
-		return -ENOMEM;
-
-	dev = container_of(mdev, struct mt7603_dev, mt76);
-	mt76_mmio_init(mdev, mem_base);
-
-	mdev->rev = (mt76_rr(dev, MT_HW_CHIPID) << 16) |
-		    (mt76_rr(dev, MT_HW_REV) & 0xff);
-	dev_info(mdev->dev, "ASIC revision: %04x\n", mdev->rev);
-
-	mt76_wr(dev, MT_INT_MASK_CSR, 0);
-
-	ret = devm_request_irq(mdev->dev, irq, mt7603_irq_handler,
-			       IRQF_SHARED, KBUILD_MODNAME, dev);
-	if (ret)
-		goto error;
-
-	ret = mt7603_register_device(dev);
-	if (ret)
-		goto error;
-
-	return 0;
-error:
-	ieee80211_free_hw(mt76_hw(dev));
-	return ret;
-}
-
-static int
-mt76_wmac_remove(struct platform_device *pdev)
-{
-	struct mt76_dev *mdev = platform_get_drvdata(pdev);
-	struct mt7603_dev *dev = container_of(mdev, struct mt7603_dev, mt76);
-
-	mt7603_unregister_device(dev);
-
-	return 0;
-}
-
-static const struct of_device_id of_wmac_match[] = {
-	{ .compatible = "mediatek,mt7628-wmac" },
-	{},
-};
-
-MODULE_DEVICE_TABLE(of, of_wmac_match);
-MODULE_FIRMWARE(MT7628_FIRMWARE_E1);
-MODULE_FIRMWARE(MT7628_FIRMWARE_E2);
-
-struct platform_driver mt76_wmac_driver = {
-	.probe		= mt76_wmac_probe,
-	.remove		= mt76_wmac_remove,
-	.driver = {
-		.name = "mt76_wmac",
-		.of_match_table = of_wmac_match,
-	},
-};
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt7615/Kconfig b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt7615/Kconfig
deleted file mode 100644
index 30fba36..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt7615/Kconfig
+++ /dev/null
@@ -1,56 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0-only
-
-config MT7615_COMMON
-	tristate
-	select WANT_DEV_COREDUMP
-	select MT76_CONNAC_LIB
-
-config MT7615E
-	tristate "MediaTek MT7615E and MT7663E (PCIe) support"
-	select MT7615_COMMON
-	depends on MAC80211
-	depends on PCI
-	help
-	  This adds support for MT7615-based wireless PCIe devices,
-	  which support concurrent dual-band operation at both 5GHz
-	  and 2.4GHz, IEEE 802.11ac 4x4:4SS 1733Mbps PHY rate, wave2
-	  MU-MIMO up to 4 users/group and 160MHz channels.
-
-	  To compile this driver as a module, choose M here.
-
-config MT7622_WMAC
-	bool "MT7622 (SoC) WMAC support"
-	depends on MT7615E
-	depends on ARCH_MEDIATEK || COMPILE_TEST
-	select REGMAP
-	default y
-	help
-	  This adds support for the built-in WMAC on MT7622 SoC devices
-	  which has the same feature set as a MT7615, but limited to
-	  2.4 GHz only.
-
-config MT7663_USB_SDIO_COMMON
-	tristate
-	select MT7615_COMMON
-
-config MT7663U
-	tristate "MediaTek MT7663U (USB) support"
-	select MT76_USB
-	select MT7663_USB_SDIO_COMMON
-	depends on MAC80211
-	depends on USB
-	help
-	  This adds support for MT7663U 802.11ac 2x2:2 wireless devices.
-
-	  To compile this driver as a module, choose M here.
-
-config MT7663S
-	tristate "MediaTek MT7663S (SDIO) support"
-	select MT76_SDIO
-	select MT7663_USB_SDIO_COMMON
-	depends on MAC80211
-	depends on MMC
-	help
-	  This adds support for MT7663S 802.11ac 2x2:2 wireless devices.
-
-	  To compile this driver as a module, choose M here.
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt7615/Makefile b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt7615/Makefile
deleted file mode 100644
index 3564d33..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt7615/Makefile
+++ /dev/null
@@ -1,21 +0,0 @@
-#SPDX-License-Identifier: ISC
-
-EXTRA_CFLAGS += -DCONFIG_MT76_LEDS
-obj-$(CONFIG_MT7615_COMMON) += mt7615-common.o
-obj-$(CONFIG_MT7615E) += mt7615e.o
-obj-$(CONFIG_MT7663_USB_SDIO_COMMON) += mt7663-usb-sdio-common.o
-obj-$(CONFIG_MT7663U) += mt7663u.o
-obj-$(CONFIG_MT7663S) += mt7663s.o
-
-CFLAGS_trace.o := -I$(src)
-
-mt7615-common-y := main.o init.o mcu.o eeprom.o mac.o \
-		   debugfs.o trace.o
-mt7615-common-$(CONFIG_NL80211_TESTMODE) += testmode.o
-
-mt7615e-y := pci.o pci_init.o dma.o pci_mac.o mmio.o
-mt7615e-$(CONFIG_MT7622_WMAC) += soc.o
-
-mt7663-usb-sdio-common-y := usb_sdio.o
-mt7663u-y := usb.o usb_mcu.o
-mt7663s-y := sdio.o sdio_mcu.o
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt7615/debugfs.c b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt7615/debugfs.c
deleted file mode 100644
index c26b45a..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt7615/debugfs.c
+++ /dev/null
@@ -1,611 +0,0 @@
-// SPDX-License-Identifier: ISC
-
-#include "mt7615.h"
-
-static int
-mt7615_reg_set(void *data, u64 val)
-{
-	struct mt7615_dev *dev = data;
-
-	mt7615_mutex_acquire(dev);
-	mt76_wr(dev, dev->mt76.debugfs_reg, val);
-	mt7615_mutex_release(dev);
-
-	return 0;
-}
-
-static int
-mt7615_reg_get(void *data, u64 *val)
-{
-	struct mt7615_dev *dev = data;
-
-	mt7615_mutex_acquire(dev);
-	*val = mt76_rr(dev, dev->mt76.debugfs_reg);
-	mt7615_mutex_release(dev);
-
-	return 0;
-}
-
-DEFINE_DEBUGFS_ATTRIBUTE(fops_regval, mt7615_reg_get, mt7615_reg_set,
-			 "0x%08llx\n");
-
-static int
-mt7615_radar_pattern_set(void *data, u64 val)
-{
-	struct mt7615_dev *dev = data;
-	int err;
-
-	if (!mt7615_wait_for_mcu_init(dev))
-		return 0;
-
-	mt7615_mutex_acquire(dev);
-	err = mt7615_mcu_rdd_send_pattern(dev);
-	mt7615_mutex_release(dev);
-
-	return err;
-}
-
-DEFINE_DEBUGFS_ATTRIBUTE(fops_radar_pattern, NULL,
-			 mt7615_radar_pattern_set, "%lld\n");
-
-static int mt7615_config(void *data, u64 val)
-{
-	struct mt7615_dev *dev = data;
-	int ret;
-
-	mt7615_mutex_acquire(dev);
-	ret = mt76_connac_mcu_chip_config(&dev->mt76);
-	mt7615_mutex_release(dev);
-
-	return ret;
-}
-
-DEFINE_DEBUGFS_ATTRIBUTE(fops_config, NULL, mt7615_config, "%lld\n");
-
-static int
-mt7615_scs_set(void *data, u64 val)
-{
-	struct mt7615_dev *dev = data;
-	struct mt7615_phy *ext_phy;
-
-	if (!mt7615_wait_for_mcu_init(dev))
-		return 0;
-
-	mt7615_mac_set_scs(&dev->phy, val);
-	ext_phy = mt7615_ext_phy(dev);
-	if (ext_phy)
-		mt7615_mac_set_scs(ext_phy, val);
-
-	return 0;
-}
-
-static int
-mt7615_scs_get(void *data, u64 *val)
-{
-	struct mt7615_dev *dev = data;
-
-	*val = dev->phy.scs_en;
-
-	return 0;
-}
-
-DEFINE_DEBUGFS_ATTRIBUTE(fops_scs, mt7615_scs_get,
-			 mt7615_scs_set, "%lld\n");
-
-static int
-mt7615_pm_set(void *data, u64 val)
-{
-	struct mt7615_dev *dev = data;
-	struct mt76_connac_pm *pm = &dev->pm;
-	int ret = 0;
-
-	if (!mt7615_wait_for_mcu_init(dev))
-		return 0;
-
-	if (!mt7615_firmware_offload(dev) || mt76_is_usb(&dev->mt76))
-		return -EOPNOTSUPP;
-
-	mutex_lock(&dev->mt76.mutex);
-
-	if (val == pm->enable)
-		goto out;
-
-	if (dev->phy.n_beacon_vif) {
-		ret = -EBUSY;
-		goto out;
-	}
-
-	if (!pm->enable) {
-		pm->stats.last_wake_event = jiffies;
-		pm->stats.last_doze_event = jiffies;
-	}
-	/* make sure the chip is awake here and ps_work is scheduled
-	 * just at end of the this routine.
-	 */
-	pm->enable = false;
-	mt76_connac_pm_wake(&dev->mphy, pm);
-
-	pm->enable = val;
-	mt76_connac_power_save_sched(&dev->mphy, pm);
-out:
-	mutex_unlock(&dev->mt76.mutex);
-
-	return ret;
-}
-
-static int
-mt7615_pm_get(void *data, u64 *val)
-{
-	struct mt7615_dev *dev = data;
-
-	*val = dev->pm.enable;
-
-	return 0;
-}
-
-DEFINE_DEBUGFS_ATTRIBUTE(fops_pm, mt7615_pm_get, mt7615_pm_set, "%lld\n");
-
-static int
-mt7615_pm_stats(struct seq_file *s, void *data)
-{
-	struct mt7615_dev *dev = dev_get_drvdata(s->private);
-	struct mt76_connac_pm *pm = &dev->pm;
-	unsigned long awake_time = pm->stats.awake_time;
-	unsigned long doze_time = pm->stats.doze_time;
-
-	if (!test_bit(MT76_STATE_PM, &dev->mphy.state))
-		awake_time += jiffies - pm->stats.last_wake_event;
-	else
-		doze_time += jiffies - pm->stats.last_doze_event;
-
-	seq_printf(s, "awake time: %14u\ndoze time: %15u\n",
-		   jiffies_to_msecs(awake_time),
-		   jiffies_to_msecs(doze_time));
-
-	return 0;
-}
-
-static int
-mt7615_pm_idle_timeout_set(void *data, u64 val)
-{
-	struct mt7615_dev *dev = data;
-
-	dev->pm.idle_timeout = msecs_to_jiffies(val);
-
-	return 0;
-}
-
-static int
-mt7615_pm_idle_timeout_get(void *data, u64 *val)
-{
-	struct mt7615_dev *dev = data;
-
-	*val = jiffies_to_msecs(dev->pm.idle_timeout);
-
-	return 0;
-}
-
-DEFINE_DEBUGFS_ATTRIBUTE(fops_pm_idle_timeout, mt7615_pm_idle_timeout_get,
-			 mt7615_pm_idle_timeout_set, "%lld\n");
-
-static int
-mt7615_dbdc_set(void *data, u64 val)
-{
-	struct mt7615_dev *dev = data;
-
-	if (!mt7615_wait_for_mcu_init(dev))
-		return 0;
-
-	if (val)
-		mt7615_register_ext_phy(dev);
-	else
-		mt7615_unregister_ext_phy(dev);
-
-	return 0;
-}
-
-static int
-mt7615_dbdc_get(void *data, u64 *val)
-{
-	struct mt7615_dev *dev = data;
-
-	*val = !!mt7615_ext_phy(dev);
-
-	return 0;
-}
-
-DEFINE_DEBUGFS_ATTRIBUTE(fops_dbdc, mt7615_dbdc_get,
-			 mt7615_dbdc_set, "%lld\n");
-
-static int
-mt7615_fw_debug_set(void *data, u64 val)
-{
-	struct mt7615_dev *dev = data;
-
-	if (!mt7615_wait_for_mcu_init(dev))
-		return 0;
-
-	dev->fw_debug = val;
-
-	mt7615_mutex_acquire(dev);
-	mt7615_mcu_fw_log_2_host(dev, dev->fw_debug ? 2 : 0);
-	mt7615_mutex_release(dev);
-
-	return 0;
-}
-
-static int
-mt7615_fw_debug_get(void *data, u64 *val)
-{
-	struct mt7615_dev *dev = data;
-
-	*val = dev->fw_debug;
-
-	return 0;
-}
-
-DEFINE_DEBUGFS_ATTRIBUTE(fops_fw_debug, mt7615_fw_debug_get,
-			 mt7615_fw_debug_set, "%lld\n");
-
-static int
-mt7615_reset_test_set(void *data, u64 val)
-{
-	struct mt7615_dev *dev = data;
-	struct sk_buff *skb;
-
-	if (!mt7615_wait_for_mcu_init(dev))
-		return 0;
-
-	skb = alloc_skb(1, GFP_KERNEL);
-	if (!skb)
-		return -ENOMEM;
-
-	skb_put(skb, 1);
-
-	mt7615_mutex_acquire(dev);
-	mt76_tx_queue_skb_raw(dev, dev->mphy.q_tx[0], skb, 0);
-	mt7615_mutex_release(dev);
-
-	return 0;
-}
-
-DEFINE_DEBUGFS_ATTRIBUTE(fops_reset_test, NULL,
-			 mt7615_reset_test_set, "%lld\n");
-
-static void
-mt7615_ampdu_stat_read_phy(struct mt7615_phy *phy,
-			   struct seq_file *file)
-{
-	struct mt7615_dev *dev = file->private;
-	u32 reg = is_mt7663(&dev->mt76) ? MT_MIB_ARNG(0) : MT_AGG_ASRCR0;
-	bool ext_phy = phy != &dev->phy;
-	int bound[7], i, range;
-
-	if (!phy)
-		return;
-
-	range = mt76_rr(dev, reg);
-	for (i = 0; i < 4; i++)
-		bound[i] = MT_AGG_ASRCR_RANGE(range, i) + 1;
-
-	range = mt76_rr(dev, reg + 4);
-	for (i = 0; i < 3; i++)
-		bound[i + 4] = MT_AGG_ASRCR_RANGE(range, i) + 1;
-
-	seq_printf(file, "\nPhy %d\n", ext_phy);
-
-	seq_printf(file, "Length: %8d | ", bound[0]);
-	for (i = 0; i < ARRAY_SIZE(bound) - 1; i++)
-		seq_printf(file, "%3d -%3d | ",
-			   bound[i], bound[i + 1]);
-	seq_puts(file, "\nCount:  ");
-
-	range = ext_phy ? ARRAY_SIZE(dev->mt76.aggr_stats) / 2 : 0;
-	for (i = 0; i < ARRAY_SIZE(bound); i++)
-		seq_printf(file, "%8d | ", dev->mt76.aggr_stats[i + range]);
-	seq_puts(file, "\n");
-
-	seq_printf(file, "BA miss count: %d\n", phy->mib.ba_miss_cnt);
-	seq_printf(file, "PER: %ld.%1ld%%\n",
-		   phy->mib.aggr_per / 10, phy->mib.aggr_per % 10);
-}
-
-static int
-mt7615_ampdu_stat_show(struct seq_file *file, void *data)
-{
-	struct mt7615_dev *dev = file->private;
-
-	mt7615_mutex_acquire(dev);
-
-	mt7615_ampdu_stat_read_phy(&dev->phy, file);
-	mt7615_ampdu_stat_read_phy(mt7615_ext_phy(dev), file);
-
-	mt7615_mutex_release(dev);
-
-	return 0;
-}
-
-DEFINE_SHOW_ATTRIBUTE(mt7615_ampdu_stat);
-
-static void
-mt7615_radio_read_phy(struct mt7615_phy *phy, struct seq_file *s)
-{
-	struct mt7615_dev *dev = dev_get_drvdata(s->private);
-	bool ext_phy = phy != &dev->phy;
-
-	if (!phy)
-		return;
-
-	seq_printf(s, "Radio %d sensitivity: ofdm=%d cck=%d\n", ext_phy,
-		   phy->ofdm_sensitivity, phy->cck_sensitivity);
-	seq_printf(s, "Radio %d false CCA: ofdm=%d cck=%d\n", ext_phy,
-		   phy->false_cca_ofdm, phy->false_cca_cck);
-}
-
-static int
-mt7615_radio_read(struct seq_file *s, void *data)
-{
-	struct mt7615_dev *dev = dev_get_drvdata(s->private);
-
-	mt7615_radio_read_phy(&dev->phy, s);
-	mt7615_radio_read_phy(mt7615_ext_phy(dev), s);
-
-	return 0;
-}
-
-static int
-mt7615_queues_acq(struct seq_file *s, void *data)
-{
-	struct mt7615_dev *dev = dev_get_drvdata(s->private);
-	int i;
-
-	mt7615_mutex_acquire(dev);
-
-	for (i = 0; i < 16; i++) {
-		int j, wmm_idx = i % MT7615_MAX_WMM_SETS;
-		int acs = i / MT7615_MAX_WMM_SETS;
-		u32 ctrl, val, qlen = 0;
-
-		if (wmm_idx == 3 && is_mt7663(&dev->mt76))
-			continue;
-
-		val = mt76_rr(dev, MT_PLE_AC_QEMPTY(acs, wmm_idx));
-		ctrl = BIT(31) | BIT(15) | (acs << 8);
-
-		for (j = 0; j < 32; j++) {
-			if (val & BIT(j))
-				continue;
-
-			mt76_wr(dev, MT_PLE_FL_Q0_CTRL,
-				ctrl | (j + (wmm_idx << 5)));
-			qlen += mt76_get_field(dev, MT_PLE_FL_Q3_CTRL,
-					       GENMASK(11, 0));
-		}
-		seq_printf(s, "AC%d%d: queued=%d\n", wmm_idx, acs, qlen);
-	}
-
-	mt7615_mutex_release(dev);
-
-	return 0;
-}
-
-static int
-mt7615_queues_read(struct seq_file *s, void *data)
-{
-	struct mt7615_dev *dev = dev_get_drvdata(s->private);
-	struct {
-		struct mt76_queue *q;
-		char *queue;
-	} queue_map[] = {
-		{ dev->mphy.q_tx[MT_TXQ_BE], "PDMA0" },
-		{ dev->mt76.q_mcu[MT_MCUQ_WM], "MCUQ" },
-		{ dev->mt76.q_mcu[MT_MCUQ_FWDL], "MCUFWQ" },
-	};
-	int i;
-
-	for (i = 0; i < ARRAY_SIZE(queue_map); i++) {
-		struct mt76_queue *q = queue_map[i].q;
-
-		seq_printf(s,
-			   "%s:	queued=%d head=%d tail=%d\n",
-			   queue_map[i].queue, q->queued, q->head,
-			   q->tail);
-	}
-
-	return 0;
-}
-
-static int
-mt7615_rf_reg_set(void *data, u64 val)
-{
-	struct mt7615_dev *dev = data;
-
-	mt7615_rf_wr(dev, dev->debugfs_rf_wf, dev->debugfs_rf_reg, val);
-
-	return 0;
-}
-
-static int
-mt7615_rf_reg_get(void *data, u64 *val)
-{
-	struct mt7615_dev *dev = data;
-
-	*val = mt7615_rf_rr(dev, dev->debugfs_rf_wf, dev->debugfs_rf_reg);
-
-	return 0;
-}
-
-DEFINE_DEBUGFS_ATTRIBUTE(fops_rf_reg, mt7615_rf_reg_get, mt7615_rf_reg_set,
-			 "0x%08llx\n");
-
-static ssize_t
-mt7615_ext_mac_addr_read(struct file *file, char __user *userbuf,
-			 size_t count, loff_t *ppos)
-{
-	struct mt7615_dev *dev = file->private_data;
-	u32 len = 32 * ((ETH_ALEN * 3) + 4) + 1;
-	u8 addr[ETH_ALEN];
-	char *buf;
-	int ofs = 0;
-	int i;
-
-	buf = kzalloc(len, GFP_KERNEL);
-	if (!buf)
-		return -ENOMEM;
-
-	for (i = 0; i < 32; i++) {
-		if (!(dev->muar_mask & BIT(i)))
-			continue;
-
-		mt76_wr(dev, MT_WF_RMAC_MAR1,
-			FIELD_PREP(MT_WF_RMAC_MAR1_IDX, i * 2) |
-			MT_WF_RMAC_MAR1_START);
-		put_unaligned_le32(mt76_rr(dev, MT_WF_RMAC_MAR0), addr);
-		put_unaligned_le16((mt76_rr(dev, MT_WF_RMAC_MAR1) &
-				    MT_WF_RMAC_MAR1_ADDR), addr + 4);
-		ofs += snprintf(buf + ofs, len - ofs, "%d=%pM\n", i, addr);
-	}
-
-	ofs = simple_read_from_buffer(userbuf, count, ppos, buf, ofs);
-
-	kfree(buf);
-	return ofs;
-}
-
-static ssize_t
-mt7615_ext_mac_addr_write(struct file *file, const char __user *userbuf,
-			  size_t count, loff_t *ppos)
-{
-	struct mt7615_dev *dev = file->private_data;
-	unsigned long idx = 0;
-	u8 addr[ETH_ALEN];
-	char buf[32];
-	char *p;
-
-	if (count > sizeof(buf))
-		return -EINVAL;
-
-	if (copy_from_user(buf, userbuf, count))
-		return -EFAULT;
-
-	buf[sizeof(buf) - 1] = '\0';
-
-	p = strchr(buf, '=');
-	if (p) {
-		*p = 0;
-		p++;
-
-		if (kstrtoul(buf, 0, &idx) || idx > 31)
-			return -EINVAL;
-	} else {
-		idx = 0;
-		p = buf;
-	}
-
-	if (!mac_pton(p, addr))
-		return -EINVAL;
-
-	if (is_valid_ether_addr(addr)) {
-		dev->muar_mask |= BIT(idx);
-	} else {
-		memset(addr, 0, sizeof(addr));
-		dev->muar_mask &= ~BIT(idx);
-	}
-
-	mt76_rmw_field(dev, MT_WF_RMAC_MORE(0), MT_WF_RMAC_MORE_MUAR_MODE, 1);
-	mt76_wr(dev, MT_WF_RMAC_MAR0, get_unaligned_le32(addr));
-	mt76_wr(dev, MT_WF_RMAC_MAR1,
-		get_unaligned_le16(addr + 4) |
-		FIELD_PREP(MT_WF_RMAC_MAR1_IDX, idx * 2) |
-		MT_WF_RMAC_MAR1_START |
-		MT_WF_RMAC_MAR1_WRITE);
-
-	mt76_rmw_field(dev, MT_WF_RMAC_MORE(0), MT_WF_RMAC_MORE_MUAR_MODE, !!dev->muar_mask);
-
-	return count;
-}
-
-static const struct file_operations fops_ext_mac_addr = {
-	.open = simple_open,
-	.llseek = generic_file_llseek,
-	.read = mt7615_ext_mac_addr_read,
-	.write = mt7615_ext_mac_addr_write,
-	.owner = THIS_MODULE,
-};
-
-static int
-mt7663s_sched_quota_read(struct seq_file *s, void *data)
-{
-	struct mt7615_dev *dev = dev_get_drvdata(s->private);
-	struct mt76_sdio *sdio = &dev->mt76.sdio;
-
-	seq_printf(s, "pse_data_quota\t%d\n", sdio->sched.pse_data_quota);
-	seq_printf(s, "ple_data_quota\t%d\n", sdio->sched.ple_data_quota);
-	seq_printf(s, "pse_mcu_quota\t%d\n", sdio->sched.pse_mcu_quota);
-	seq_printf(s, "sched_deficit\t%d\n", sdio->sched.deficit);
-
-	return 0;
-}
-
-int mt7615_init_debugfs(struct mt7615_dev *dev)
-{
-	struct dentry *dir;
-
-	dir = mt76_register_debugfs_fops(&dev->mphy, &fops_regval);
-	if (!dir)
-		return -ENOMEM;
-
-	if (is_mt7615(&dev->mt76))
-		debugfs_create_devm_seqfile(dev->mt76.dev, "xmit-queues", dir,
-					    mt7615_queues_read);
-	else
-		debugfs_create_devm_seqfile(dev->mt76.dev, "xmit-queues", dir,
-					    mt76_queues_read);
-	debugfs_create_devm_seqfile(dev->mt76.dev, "acq", dir,
-				    mt7615_queues_acq);
-	debugfs_create_file("ampdu_stat", 0400, dir, dev, &mt7615_ampdu_stat_fops);
-	debugfs_create_file("scs", 0600, dir, dev, &fops_scs);
-	debugfs_create_file("dbdc", 0600, dir, dev, &fops_dbdc);
-	debugfs_create_file("fw_debug", 0600, dir, dev, &fops_fw_debug);
-	debugfs_create_file("runtime-pm", 0600, dir, dev, &fops_pm);
-	debugfs_create_file("idle-timeout", 0600, dir, dev,
-			    &fops_pm_idle_timeout);
-	debugfs_create_devm_seqfile(dev->mt76.dev, "runtime_pm_stats", dir,
-				    mt7615_pm_stats);
-	debugfs_create_devm_seqfile(dev->mt76.dev, "radio", dir,
-				    mt7615_radio_read);
-
-	if (is_mt7615(&dev->mt76)) {
-		debugfs_create_u32("dfs_hw_pattern", 0400, dir,
-				   &dev->hw_pattern);
-		/* test pattern knobs */
-		debugfs_create_u8("pattern_len", 0600, dir,
-				  &dev->radar_pattern.n_pulses);
-		debugfs_create_u32("pulse_period", 0600, dir,
-				   &dev->radar_pattern.period);
-		debugfs_create_u16("pulse_width", 0600, dir,
-				   &dev->radar_pattern.width);
-		debugfs_create_u16("pulse_power", 0600, dir,
-				   &dev->radar_pattern.power);
-		debugfs_create_file("radar_trigger", 0200, dir, dev,
-				    &fops_radar_pattern);
-	}
-
-	debugfs_create_file("reset_test", 0200, dir, dev,
-			    &fops_reset_test);
-	debugfs_create_file("ext_mac_addr", 0600, dir, dev, &fops_ext_mac_addr);
-
-	debugfs_create_u32("rf_wfidx", 0600, dir, &dev->debugfs_rf_wf);
-	debugfs_create_u32("rf_regidx", 0600, dir, &dev->debugfs_rf_reg);
-	debugfs_create_file_unsafe("rf_regval", 0600, dir, dev,
-				   &fops_rf_reg);
-	if (is_mt7663(&dev->mt76))
-		debugfs_create_file("chip_config", 0600, dir, dev,
-				    &fops_config);
-	if (mt76_is_sdio(&dev->mt76))
-		debugfs_create_devm_seqfile(dev->mt76.dev, "sched-quota", dir,
-					    mt7663s_sched_quota_read);
-
-	return 0;
-}
-EXPORT_SYMBOL_GPL(mt7615_init_debugfs);
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt7615/dma.c b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt7615/dma.c
deleted file mode 100644
index ec729db..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt7615/dma.c
+++ /dev/null
@@ -1,315 +0,0 @@
-// SPDX-License-Identifier: ISC
-/* Copyright (C) 2019 MediaTek Inc.
- *
- * Author: Ryder Lee <ryder.lee@mediatek.com>
- *         Roy Luo <royluo@google.com>
- *         Lorenzo Bianconi <lorenzo@kernel.org>
- *         Felix Fietkau <nbd@nbd.name>
- */
-
-#include "mt7615.h"
-#include "../dma.h"
-#include "mac.h"
-
-static int
-mt7622_init_tx_queues_multi(struct mt7615_dev *dev)
-{
-	static const u8 wmm_queue_map[] = {
-		[IEEE80211_AC_BK] = MT7622_TXQ_AC0,
-		[IEEE80211_AC_BE] = MT7622_TXQ_AC1,
-		[IEEE80211_AC_VI] = MT7622_TXQ_AC2,
-		[IEEE80211_AC_VO] = MT7622_TXQ_AC3,
-	};
-	int ret;
-	int i;
-
-	for (i = 0; i < ARRAY_SIZE(wmm_queue_map); i++) {
-		ret = mt76_init_tx_queue(&dev->mphy, i, wmm_queue_map[i],
-					 MT7615_TX_RING_SIZE / 2,
-					 MT_TX_RING_BASE, 0);
-		if (ret)
-			return ret;
-	}
-
-	ret = mt76_init_tx_queue(&dev->mphy, MT_TXQ_PSD, MT7622_TXQ_MGMT,
-				 MT7615_TX_MGMT_RING_SIZE,
-				 MT_TX_RING_BASE, 0);
-	if (ret)
-		return ret;
-
-	return mt76_init_mcu_queue(&dev->mt76, MT_MCUQ_WM, MT7622_TXQ_MCU,
-				   MT7615_TX_MCU_RING_SIZE, MT_TX_RING_BASE);
-}
-
-static int
-mt7615_init_tx_queues(struct mt7615_dev *dev)
-{
-	int ret;
-
-	ret = mt76_init_mcu_queue(&dev->mt76, MT_MCUQ_FWDL, MT7615_TXQ_FWDL,
-				  MT7615_TX_FWDL_RING_SIZE, MT_TX_RING_BASE);
-	if (ret)
-		return ret;
-
-	if (!is_mt7615(&dev->mt76))
-		return mt7622_init_tx_queues_multi(dev);
-
-	ret = mt76_connac_init_tx_queues(&dev->mphy, 0, MT7615_TX_RING_SIZE,
-					 MT_TX_RING_BASE, 0);
-	if (ret)
-		return ret;
-
-	return mt76_init_mcu_queue(&dev->mt76, MT_MCUQ_WM, MT7615_TXQ_MCU,
-				   MT7615_TX_MCU_RING_SIZE, MT_TX_RING_BASE);
-}
-
-static int mt7615_poll_tx(struct napi_struct *napi, int budget)
-{
-	struct mt7615_dev *dev;
-
-	dev = container_of(napi, struct mt7615_dev, mt76.tx_napi);
-	if (!mt76_connac_pm_ref(&dev->mphy, &dev->pm)) {
-		napi_complete(napi);
-		queue_work(dev->mt76.wq, &dev->pm.wake_work);
-		return 0;
-	}
-
-	mt76_queue_tx_cleanup(dev, dev->mt76.q_mcu[MT_MCUQ_WM], false);
-	if (napi_complete(napi))
-		mt7615_irq_enable(dev, mt7615_tx_mcu_int_mask(dev));
-
-	mt76_connac_pm_unref(&dev->mphy, &dev->pm);
-
-	return 0;
-}
-
-static int mt7615_poll_rx(struct napi_struct *napi, int budget)
-{
-	struct mt7615_dev *dev;
-	int done;
-
-	dev = container_of(napi->dev, struct mt7615_dev, mt76.napi_dev);
-
-	if (!mt76_connac_pm_ref(&dev->mphy, &dev->pm)) {
-		napi_complete(napi);
-		queue_work(dev->mt76.wq, &dev->pm.wake_work);
-		return 0;
-	}
-	done = mt76_dma_rx_poll(napi, budget);
-	mt76_connac_pm_unref(&dev->mphy, &dev->pm);
-
-	return done;
-}
-
-int mt7615_wait_pdma_busy(struct mt7615_dev *dev)
-{
-	struct mt76_dev *mdev = &dev->mt76;
-
-	if (!is_mt7663(mdev)) {
-		u32 mask = MT_PDMA_TX_BUSY | MT_PDMA_RX_BUSY;
-		u32 reg = mt7615_reg_map(dev, MT_PDMA_BUSY);
-
-		if (!mt76_poll_msec(dev, reg, mask, 0, 1000)) {
-			dev_err(mdev->dev, "PDMA engine busy\n");
-			return -EIO;
-		}
-
-		return 0;
-	}
-
-	if (!mt76_poll_msec(dev, MT_PDMA_BUSY_STATUS,
-			    MT_PDMA_TX_IDX_BUSY, 0, 1000)) {
-		dev_err(mdev->dev, "PDMA engine tx busy\n");
-		return -EIO;
-	}
-
-	if (!mt76_poll_msec(dev, MT_PSE_PG_INFO,
-			    MT_PSE_SRC_CNT, 0, 1000)) {
-		dev_err(mdev->dev, "PSE engine busy\n");
-		return -EIO;
-	}
-
-	if (!mt76_poll_msec(dev, MT_PDMA_BUSY_STATUS,
-			    MT_PDMA_BUSY_IDX, 0, 1000)) {
-		dev_err(mdev->dev, "PDMA engine busy\n");
-		return -EIO;
-	}
-
-	return 0;
-}
-
-static void mt7622_dma_sched_init(struct mt7615_dev *dev)
-{
-	u32 reg = mt7615_reg_map(dev, MT_DMASHDL_BASE);
-	int i;
-
-	mt76_rmw(dev, reg + MT_DMASHDL_PKT_MAX_SIZE,
-		 MT_DMASHDL_PKT_MAX_SIZE_PLE | MT_DMASHDL_PKT_MAX_SIZE_PSE,
-		 FIELD_PREP(MT_DMASHDL_PKT_MAX_SIZE_PLE, 1) |
-		 FIELD_PREP(MT_DMASHDL_PKT_MAX_SIZE_PSE, 8));
-
-	for (i = 0; i <= 5; i++)
-		mt76_wr(dev, reg + MT_DMASHDL_GROUP_QUOTA(i),
-			FIELD_PREP(MT_DMASHDL_GROUP_QUOTA_MIN, 0x10) |
-			FIELD_PREP(MT_DMASHDL_GROUP_QUOTA_MAX, 0x800));
-
-	mt76_wr(dev, reg + MT_DMASHDL_Q_MAP(0), 0x42104210);
-	mt76_wr(dev, reg + MT_DMASHDL_Q_MAP(1), 0x42104210);
-	mt76_wr(dev, reg + MT_DMASHDL_Q_MAP(2), 0x5);
-	mt76_wr(dev, reg + MT_DMASHDL_Q_MAP(3), 0);
-
-	mt76_wr(dev, reg + MT_DMASHDL_SCHED_SET0, 0x6012345f);
-	mt76_wr(dev, reg + MT_DMASHDL_SCHED_SET1, 0xedcba987);
-}
-
-static void mt7663_dma_sched_init(struct mt7615_dev *dev)
-{
-	int i;
-
-	mt76_rmw(dev, MT_DMA_SHDL(MT_DMASHDL_PKT_MAX_SIZE),
-		 MT_DMASHDL_PKT_MAX_SIZE_PLE | MT_DMASHDL_PKT_MAX_SIZE_PSE,
-		 FIELD_PREP(MT_DMASHDL_PKT_MAX_SIZE_PLE, 1) |
-		 FIELD_PREP(MT_DMASHDL_PKT_MAX_SIZE_PSE, 8));
-
-	/* enable refill control group 0, 1, 2, 4, 5 */
-	mt76_wr(dev, MT_DMA_SHDL(MT_DMASHDL_REFILL), 0xffc80000);
-	/* enable group 0, 1, 2, 4, 5, 15 */
-	mt76_wr(dev, MT_DMA_SHDL(MT_DMASHDL_OPTIONAL), 0x70068037);
-
-	/* each group min quota must larger then PLE_PKT_MAX_SIZE_NUM */
-	for (i = 0; i < 5; i++)
-		mt76_wr(dev, MT_DMA_SHDL(MT_DMASHDL_GROUP_QUOTA(i)),
-			FIELD_PREP(MT_DMASHDL_GROUP_QUOTA_MIN, 0x40) |
-			FIELD_PREP(MT_DMASHDL_GROUP_QUOTA_MAX, 0x800));
-	mt76_wr(dev, MT_DMA_SHDL(MT_DMASHDL_GROUP_QUOTA(5)),
-		FIELD_PREP(MT_DMASHDL_GROUP_QUOTA_MIN, 0x40) |
-		FIELD_PREP(MT_DMASHDL_GROUP_QUOTA_MAX, 0x40));
-	mt76_wr(dev, MT_DMA_SHDL(MT_DMASHDL_GROUP_QUOTA(15)),
-		FIELD_PREP(MT_DMASHDL_GROUP_QUOTA_MIN, 0x20) |
-		FIELD_PREP(MT_DMASHDL_GROUP_QUOTA_MAX, 0x20));
-
-	mt76_wr(dev, MT_DMA_SHDL(MT_DMASHDL_Q_MAP(0)), 0x42104210);
-	mt76_wr(dev, MT_DMA_SHDL(MT_DMASHDL_Q_MAP(1)), 0x42104210);
-	mt76_wr(dev, MT_DMA_SHDL(MT_DMASHDL_Q_MAP(2)), 0x00050005);
-	mt76_wr(dev, MT_DMA_SHDL(MT_DMASHDL_Q_MAP(3)), 0);
-	/* ALTX0 and ALTX1 QID mapping to group 5 */
-	mt76_wr(dev, MT_DMA_SHDL(MT_DMASHDL_SCHED_SET0), 0x6012345f);
-	mt76_wr(dev, MT_DMA_SHDL(MT_DMASHDL_SCHED_SET1), 0xedcba987);
-}
-
-void mt7615_dma_start(struct mt7615_dev *dev)
-{
-	/* start dma engine */
-	mt76_set(dev, MT_WPDMA_GLO_CFG,
-		 MT_WPDMA_GLO_CFG_TX_DMA_EN |
-		 MT_WPDMA_GLO_CFG_RX_DMA_EN |
-		 MT_WPDMA_GLO_CFG_TX_WRITEBACK_DONE);
-
-	if (is_mt7622(&dev->mt76))
-		mt7622_dma_sched_init(dev);
-
-	if (is_mt7663(&dev->mt76)) {
-		mt7663_dma_sched_init(dev);
-
-		mt76_wr(dev, MT_MCU2HOST_INT_ENABLE, MT7663_MCU_CMD_ERROR_MASK);
-	}
-
-}
-
-int mt7615_dma_init(struct mt7615_dev *dev)
-{
-	int rx_ring_size = MT7615_RX_RING_SIZE;
-	u32 mask;
-	int ret;
-
-	mt76_dma_attach(&dev->mt76);
-
-	mt76_wr(dev, MT_WPDMA_GLO_CFG,
-		MT_WPDMA_GLO_CFG_TX_WRITEBACK_DONE |
-		MT_WPDMA_GLO_CFG_FIFO_LITTLE_ENDIAN |
-		MT_WPDMA_GLO_CFG_OMIT_TX_INFO);
-
-	mt76_rmw_field(dev, MT_WPDMA_GLO_CFG,
-		       MT_WPDMA_GLO_CFG_TX_BT_SIZE_BIT0, 0x1);
-
-	mt76_rmw_field(dev, MT_WPDMA_GLO_CFG,
-		       MT_WPDMA_GLO_CFG_TX_BT_SIZE_BIT21, 0x1);
-
-	mt76_rmw_field(dev, MT_WPDMA_GLO_CFG,
-		       MT_WPDMA_GLO_CFG_DMA_BURST_SIZE, 0x3);
-
-	mt76_rmw_field(dev, MT_WPDMA_GLO_CFG,
-		       MT_WPDMA_GLO_CFG_MULTI_DMA_EN, 0x3);
-
-	if (is_mt7615(&dev->mt76)) {
-		mt76_set(dev, MT_WPDMA_GLO_CFG,
-			 MT_WPDMA_GLO_CFG_FIRST_TOKEN_ONLY);
-
-		mt76_wr(dev, MT_WPDMA_GLO_CFG1, 0x1);
-		mt76_wr(dev, MT_WPDMA_TX_PRE_CFG, 0xf0000);
-		mt76_wr(dev, MT_WPDMA_RX_PRE_CFG, 0xf7f0000);
-		mt76_wr(dev, MT_WPDMA_ABT_CFG, 0x4000026);
-		mt76_wr(dev, MT_WPDMA_ABT_CFG1, 0x18811881);
-		mt76_set(dev, 0x7158, BIT(16));
-		mt76_clear(dev, 0x7000, BIT(23));
-	}
-
-	mt76_wr(dev, MT_WPDMA_RST_IDX, ~0);
-
-	ret = mt7615_init_tx_queues(dev);
-	if (ret)
-		return ret;
-
-	/* init rx queues */
-	ret = mt76_queue_alloc(dev, &dev->mt76.q_rx[MT_RXQ_MCU], 1,
-			       MT7615_RX_MCU_RING_SIZE, MT_RX_BUF_SIZE,
-			       MT_RX_RING_BASE);
-	if (ret)
-		return ret;
-
-	if (!is_mt7615(&dev->mt76))
-	    rx_ring_size /= 2;
-
-	ret = mt76_queue_alloc(dev, &dev->mt76.q_rx[MT_RXQ_MAIN], 0,
-			       rx_ring_size, MT_RX_BUF_SIZE, MT_RX_RING_BASE);
-	if (ret)
-		return ret;
-
-	mt76_wr(dev, MT_DELAY_INT_CFG, 0);
-
-	ret = mt76_init_queues(dev, mt7615_poll_rx);
-	if (ret < 0)
-		return ret;
-
-	netif_tx_napi_add(&dev->mt76.tx_napi_dev, &dev->mt76.tx_napi,
-			  mt7615_poll_tx, NAPI_POLL_WEIGHT);
-	napi_enable(&dev->mt76.tx_napi);
-
-	mt76_poll(dev, MT_WPDMA_GLO_CFG,
-		  MT_WPDMA_GLO_CFG_TX_DMA_BUSY |
-		  MT_WPDMA_GLO_CFG_RX_DMA_BUSY, 0, 1000);
-
-	/* enable interrupts for TX/RX rings */
-
-	mask = MT_INT_RX_DONE_ALL | mt7615_tx_mcu_int_mask(dev);
-	if (is_mt7663(&dev->mt76))
-	    mask |= MT7663_INT_MCU_CMD;
-	else
-	    mask |= MT_INT_MCU_CMD;
-
-	mt7615_irq_enable(dev, mask);
-
-	mt7615_dma_start(dev);
-
-	return 0;
-}
-
-void mt7615_dma_cleanup(struct mt7615_dev *dev)
-{
-	mt76_clear(dev, MT_WPDMA_GLO_CFG,
-		   MT_WPDMA_GLO_CFG_TX_DMA_EN |
-		   MT_WPDMA_GLO_CFG_RX_DMA_EN);
-	mt76_set(dev, MT_WPDMA_GLO_CFG, MT_WPDMA_GLO_CFG_SW_RESET);
-
-	mt76_dma_cleanup(&dev->mt76);
-}
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt7615/eeprom.c b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt7615/eeprom.c
deleted file mode 100644
index 6dbaaf9..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt7615/eeprom.c
+++ /dev/null
@@ -1,353 +0,0 @@
-// SPDX-License-Identifier: ISC
-/* Copyright (C) 2019 MediaTek Inc.
- *
- * Author: Ryder Lee <ryder.lee@mediatek.com>
- *         Felix Fietkau <nbd@nbd.name>
- */
-
-#include <linux/of.h>
-#include "mt7615.h"
-#include "eeprom.h"
-
-static int mt7615_efuse_read(struct mt7615_dev *dev, u32 base,
-			     u16 addr, u8 *data)
-{
-	u32 val;
-	int i;
-
-	val = mt76_rr(dev, base + MT_EFUSE_CTRL);
-	val &= ~(MT_EFUSE_CTRL_AIN | MT_EFUSE_CTRL_MODE);
-	val |= FIELD_PREP(MT_EFUSE_CTRL_AIN, addr & ~0xf);
-	val |= MT_EFUSE_CTRL_KICK;
-	mt76_wr(dev, base + MT_EFUSE_CTRL, val);
-
-	if (!mt76_poll(dev, base + MT_EFUSE_CTRL, MT_EFUSE_CTRL_KICK, 0, 1000))
-		return -ETIMEDOUT;
-
-	udelay(2);
-
-	val = mt76_rr(dev, base + MT_EFUSE_CTRL);
-	if ((val & MT_EFUSE_CTRL_AOUT) == MT_EFUSE_CTRL_AOUT ||
-	    WARN_ON_ONCE(!(val & MT_EFUSE_CTRL_VALID))) {
-		memset(data, 0x0, 16);
-		return 0;
-	}
-
-	for (i = 0; i < 4; i++) {
-		val = mt76_rr(dev, base + MT_EFUSE_RDATA(i));
-		put_unaligned_le32(val, data + 4 * i);
-	}
-
-	return 0;
-}
-
-static int mt7615_efuse_init(struct mt7615_dev *dev, u32 base)
-{
-	int i, len = MT7615_EEPROM_SIZE;
-	void *buf;
-	u32 val;
-
-	val = mt76_rr(dev, base + MT_EFUSE_BASE_CTRL);
-	if (val & MT_EFUSE_BASE_CTRL_EMPTY)
-		return 0;
-
-	dev->mt76.otp.data = devm_kzalloc(dev->mt76.dev, len, GFP_KERNEL);
-	dev->mt76.otp.size = len;
-	if (!dev->mt76.otp.data)
-		return -ENOMEM;
-
-	buf = dev->mt76.otp.data;
-	for (i = 0; i + 16 <= len; i += 16) {
-		int ret;
-
-		ret = mt7615_efuse_read(dev, base, i, buf + i);
-		if (ret)
-			return ret;
-	}
-
-	return 0;
-}
-
-static int mt7615_eeprom_load(struct mt7615_dev *dev, u32 addr)
-{
-	int ret;
-
-	ret = mt76_eeprom_init(&dev->mt76, MT7615_EEPROM_FULL_SIZE);
-	if (ret < 0)
-		return ret;
-
-	return mt7615_efuse_init(dev, addr);
-}
-
-static int mt7615_check_eeprom(struct mt76_dev *dev)
-{
-	u16 val = get_unaligned_le16(dev->eeprom.data);
-
-	switch (val) {
-	case 0x7615:
-	case 0x7622:
-	case 0x7663:
-		return 0;
-	default:
-		return -EINVAL;
-	}
-}
-
-static void
-mt7615_eeprom_parse_hw_band_cap(struct mt7615_dev *dev)
-{
-	u8 val, *eeprom = dev->mt76.eeprom.data;
-
-	if (is_mt7663(&dev->mt76)) {
-		/* dual band */
-		dev->mphy.cap.has_2ghz = true;
-		dev->mphy.cap.has_5ghz = true;
-		return;
-	}
-
-	if (is_mt7622(&dev->mt76)) {
-		/* 2GHz only */
-		dev->mphy.cap.has_2ghz = true;
-		return;
-	}
-
-	if (is_mt7611(&dev->mt76)) {
-		/* 5GHz only */
-		dev->mphy.cap.has_5ghz = true;
-		return;
-	}
-
-	val = FIELD_GET(MT_EE_NIC_WIFI_CONF_BAND_SEL,
-			eeprom[MT_EE_WIFI_CONF]);
-	switch (val) {
-	case MT_EE_5GHZ:
-		dev->mphy.cap.has_5ghz = true;
-		break;
-	case MT_EE_2GHZ:
-		dev->mphy.cap.has_2ghz = true;
-		break;
-	case MT_EE_DBDC:
-		dev->dbdc_support = true;
-		fallthrough;
-	default:
-		dev->mphy.cap.has_2ghz = true;
-		dev->mphy.cap.has_5ghz = true;
-		break;
-	}
-}
-
-static void mt7615_eeprom_parse_hw_cap(struct mt7615_dev *dev)
-{
-	u8 *eeprom = dev->mt76.eeprom.data;
-	u8 tx_mask, max_nss;
-
-	mt7615_eeprom_parse_hw_band_cap(dev);
-
-	if (is_mt7663(&dev->mt76)) {
-		max_nss = 2;
-		tx_mask = FIELD_GET(MT_EE_HW_CONF1_TX_MASK,
-				    eeprom[MT7663_EE_HW_CONF1]);
-	} else {
-		u32 val;
-
-		/* read tx-rx mask from eeprom */
-		val = mt76_rr(dev, MT_TOP_STRAP_STA);
-		max_nss = val & MT_TOP_3NSS ? 3 : 4;
-
-		tx_mask =  FIELD_GET(MT_EE_NIC_CONF_TX_MASK,
-				     eeprom[MT_EE_NIC_CONF_0]);
-	}
-	if (!tx_mask || tx_mask > max_nss)
-		tx_mask = max_nss;
-
-	dev->chainmask = BIT(tx_mask) - 1;
-	dev->mphy.antenna_mask = dev->chainmask;
-	dev->mphy.chainmask = dev->chainmask;
-}
-
-static int mt7663_eeprom_get_target_power_index(struct mt7615_dev *dev,
-						struct ieee80211_channel *chan,
-						u8 chain_idx)
-{
-	int index, group;
-
-	if (chain_idx > 1)
-		return -EINVAL;
-
-	if (chan->band == NL80211_BAND_2GHZ)
-		return MT7663_EE_TX0_2G_TARGET_POWER + (chain_idx << 4);
-
-	group = mt7615_get_channel_group(chan->hw_value);
-	if (chain_idx == 1)
-		index = MT7663_EE_TX1_5G_G0_TARGET_POWER;
-	else
-		index = MT7663_EE_TX0_5G_G0_TARGET_POWER;
-
-	return index + group * 3;
-}
-
-int mt7615_eeprom_get_target_power_index(struct mt7615_dev *dev,
-					 struct ieee80211_channel *chan,
-					 u8 chain_idx)
-{
-	int index;
-
-	if (is_mt7663(&dev->mt76))
-		return mt7663_eeprom_get_target_power_index(dev, chan,
-							    chain_idx);
-
-	if (chain_idx > 3)
-		return -EINVAL;
-
-	/* TSSI disabled */
-	if (mt7615_ext_pa_enabled(dev, chan->band)) {
-		if (chan->band == NL80211_BAND_2GHZ)
-			return MT_EE_EXT_PA_2G_TARGET_POWER;
-		else
-			return MT_EE_EXT_PA_5G_TARGET_POWER;
-	}
-
-	/* TSSI enabled */
-	if (chan->band == NL80211_BAND_2GHZ) {
-		index = MT_EE_TX0_2G_TARGET_POWER + chain_idx * 6;
-	} else {
-		int group = mt7615_get_channel_group(chan->hw_value);
-
-		switch (chain_idx) {
-		case 1:
-			index = MT_EE_TX1_5G_G0_TARGET_POWER;
-			break;
-		case 2:
-			index = MT_EE_TX2_5G_G0_TARGET_POWER;
-			break;
-		case 3:
-			index = MT_EE_TX3_5G_G0_TARGET_POWER;
-			break;
-		case 0:
-		default:
-			index = MT_EE_TX0_5G_G0_TARGET_POWER;
-			break;
-		}
-		index += 5 * group;
-	}
-
-	return index;
-}
-
-int mt7615_eeprom_get_power_delta_index(struct mt7615_dev *dev,
-					enum nl80211_band band)
-{
-	/* assume the first rate has the highest power offset */
-	if (is_mt7663(&dev->mt76)) {
-		if (band == NL80211_BAND_2GHZ)
-			return MT_EE_TX0_5G_G0_TARGET_POWER;
-		else
-			return MT7663_EE_5G_RATE_POWER;
-	}
-
-	if (band == NL80211_BAND_2GHZ)
-		return MT_EE_2G_RATE_POWER;
-	else
-		return MT_EE_5G_RATE_POWER;
-}
-
-static void mt7615_apply_cal_free_data(struct mt7615_dev *dev)
-{
-	static const u16 ical[] = {
-		0x53, 0x54, 0x55, 0x56, 0x57, 0x5c, 0x5d, 0x62, 0x63, 0x68,
-		0x69, 0x6e, 0x6f, 0x73, 0x74, 0x78, 0x79, 0x82, 0x83, 0x87,
-		0x88, 0x8c, 0x8d, 0x91, 0x92, 0x96, 0x97, 0x9b, 0x9c, 0xa0,
-		0xa1, 0xaa, 0xab, 0xaf, 0xb0, 0xb4, 0xb5, 0xb9, 0xba, 0xf4,
-		0xf7, 0xff,
-		0x140, 0x141, 0x145, 0x146, 0x14a, 0x14b, 0x154, 0x155, 0x159,
-		0x15a, 0x15e, 0x15f, 0x163, 0x164, 0x168, 0x169, 0x16d, 0x16e,
-		0x172, 0x173, 0x17c, 0x17d, 0x181, 0x182, 0x186, 0x187, 0x18b,
-		0x18c
-	};
-	static const u16 ical_nocheck[] = {
-		0x110, 0x111, 0x112, 0x113, 0x114, 0x115, 0x116, 0x117, 0x118,
-		0x1b5, 0x1b6, 0x1b7, 0x3ac, 0x3ad, 0x3ae, 0x3af, 0x3b0, 0x3b1,
-		0x3b2
-	};
-	u8 *eeprom = dev->mt76.eeprom.data;
-	u8 *otp = dev->mt76.otp.data;
-	int i;
-
-	if (!otp)
-		return;
-
-	for (i = 0; i < ARRAY_SIZE(ical); i++)
-		if (!otp[ical[i]])
-			return;
-
-	for (i = 0; i < ARRAY_SIZE(ical); i++)
-		eeprom[ical[i]] = otp[ical[i]];
-
-	for (i = 0; i < ARRAY_SIZE(ical_nocheck); i++)
-		eeprom[ical_nocheck[i]] = otp[ical_nocheck[i]];
-}
-
-static void mt7622_apply_cal_free_data(struct mt7615_dev *dev)
-{
-	static const u16 ical[] = {
-		0x53, 0x54, 0x55, 0x56, 0xf4, 0xf7, 0x144, 0x156, 0x15b
-	};
-	u8 *eeprom = dev->mt76.eeprom.data;
-	u8 *otp = dev->mt76.otp.data;
-	int i;
-
-	if (!otp)
-		return;
-
-	for (i = 0; i < ARRAY_SIZE(ical); i++) {
-		if (!otp[ical[i]])
-			continue;
-
-		eeprom[ical[i]] = otp[ical[i]];
-	}
-}
-
-static void mt7615_cal_free_data(struct mt7615_dev *dev)
-{
-	struct device_node *np = dev->mt76.dev->of_node;
-
-	if (!np || !of_property_read_bool(np, "mediatek,eeprom-merge-otp"))
-		return;
-
-	switch (mt76_chip(&dev->mt76)) {
-	case 0x7622:
-		mt7622_apply_cal_free_data(dev);
-		break;
-	case 0x7615:
-	case 0x7611:
-		mt7615_apply_cal_free_data(dev);
-		break;
-	}
-}
-
-int mt7615_eeprom_init(struct mt7615_dev *dev, u32 addr)
-{
-	int ret;
-
-	ret = mt7615_eeprom_load(dev, addr);
-	if (ret < 0)
-		return ret;
-
-	ret = mt7615_check_eeprom(&dev->mt76);
-	if (ret && dev->mt76.otp.data) {
-		memcpy(dev->mt76.eeprom.data, dev->mt76.otp.data,
-		       MT7615_EEPROM_SIZE);
-	} else {
-		dev->flash_eeprom = true;
-		mt7615_cal_free_data(dev);
-	}
-
-	mt7615_eeprom_parse_hw_cap(dev);
-	memcpy(dev->mphy.macaddr, dev->mt76.eeprom.data + MT_EE_MAC_ADDR,
-	       ETH_ALEN);
-
-	mt76_eeprom_override(&dev->mphy);
-
-	return 0;
-}
-EXPORT_SYMBOL_GPL(mt7615_eeprom_init);
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt7615/eeprom.h b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt7615/eeprom.h
deleted file mode 100644
index a024dee..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt7615/eeprom.h
+++ /dev/null
@@ -1,116 +0,0 @@
-/* SPDX-License-Identifier: ISC */
-/* Copyright (C) 2019 MediaTek Inc. */
-
-#ifndef __MT7615_EEPROM_H
-#define __MT7615_EEPROM_H
-
-#include "mt7615.h"
-
-
-#define MT7615_EEPROM_DCOC_OFFSET		MT7615_EEPROM_SIZE
-#define MT7615_EEPROM_DCOC_SIZE			256
-#define MT7615_EEPROM_DCOC_COUNT		34
-
-#define MT7615_EEPROM_TXDPD_OFFSET		(MT7615_EEPROM_SIZE + \
-						 MT7615_EEPROM_DCOC_COUNT * \
-						 MT7615_EEPROM_DCOC_SIZE)
-#define MT7615_EEPROM_TXDPD_SIZE		216
-#define MT7615_EEPROM_TXDPD_COUNT		(44 + 3)
-
-#define MT7615_EEPROM_FULL_SIZE			(MT7615_EEPROM_TXDPD_OFFSET + \
-						 MT7615_EEPROM_TXDPD_COUNT * \
-						 MT7615_EEPROM_TXDPD_SIZE)
-
-enum mt7615_eeprom_field {
-	MT_EE_CHIP_ID =				0x000,
-	MT_EE_VERSION =				0x002,
-	MT_EE_MAC_ADDR =			0x004,
-	MT_EE_NIC_CONF_0 =			0x034,
-	MT_EE_NIC_CONF_1 =			0x036,
-	MT_EE_WIFI_CONF =			0x03e,
-	MT_EE_CALDATA_FLASH =			0x052,
-	MT_EE_TX0_2G_TARGET_POWER =		0x058,
-	MT_EE_TX0_5G_G0_TARGET_POWER =		0x070,
-	MT7663_EE_5G_RATE_POWER =		0x089,
-	MT_EE_TX1_5G_G0_TARGET_POWER =		0x098,
-	MT_EE_2G_RATE_POWER =			0x0be,
-	MT_EE_5G_RATE_POWER =			0x0d5,
-	MT7663_EE_TX0_2G_TARGET_POWER =		0x0e3,
-	MT_EE_EXT_PA_2G_TARGET_POWER =		0x0f2,
-	MT_EE_EXT_PA_5G_TARGET_POWER =		0x0f3,
-	MT_EE_TX2_5G_G0_TARGET_POWER =		0x142,
-	MT_EE_TX3_5G_G0_TARGET_POWER =		0x16a,
-	MT7663_EE_HW_CONF1 =			0x1b0,
-	MT7663_EE_TX0_5G_G0_TARGET_POWER =	0x245,
-	MT7663_EE_TX1_5G_G0_TARGET_POWER =	0x2b5,
-
-	MT7615_EE_MAX =				0x3bf,
-	MT7622_EE_MAX =				0x3db,
-	MT7663_EE_MAX =				0x400,
-};
-
-#define MT_EE_RATE_POWER_MASK			GENMASK(5, 0)
-#define MT_EE_RATE_POWER_SIGN			BIT(6)
-#define MT_EE_RATE_POWER_EN			BIT(7)
-
-#define MT_EE_CALDATA_FLASH_TX_DPD		BIT(0)
-#define MT_EE_CALDATA_FLASH_RX_CAL		BIT(1)
-
-#define MT_EE_NIC_CONF_TX_MASK			GENMASK(7, 4)
-#define MT_EE_NIC_CONF_RX_MASK			GENMASK(3, 0)
-
-#define MT_EE_HW_CONF1_TX_MASK			GENMASK(2, 0)
-
-#define MT_EE_NIC_CONF_TSSI_2G			BIT(5)
-#define MT_EE_NIC_CONF_TSSI_5G			BIT(6)
-
-#define MT_EE_NIC_WIFI_CONF_BAND_SEL		GENMASK(5, 4)
-enum mt7615_eeprom_band {
-	MT_EE_DUAL_BAND,
-	MT_EE_5GHZ,
-	MT_EE_2GHZ,
-	MT_EE_DBDC,
-};
-
-enum mt7615_channel_group {
-	MT_CH_5G_JAPAN,
-	MT_CH_5G_UNII_1,
-	MT_CH_5G_UNII_2A,
-	MT_CH_5G_UNII_2B,
-	MT_CH_5G_UNII_2E_1,
-	MT_CH_5G_UNII_2E_2,
-	MT_CH_5G_UNII_2E_3,
-	MT_CH_5G_UNII_3,
-	__MT_CH_MAX
-};
-
-static inline enum mt7615_channel_group
-mt7615_get_channel_group(int channel)
-{
-	if (channel >= 184 && channel <= 196)
-		return MT_CH_5G_JAPAN;
-	if (channel <= 48)
-		return MT_CH_5G_UNII_1;
-	if (channel <= 64)
-		return MT_CH_5G_UNII_2A;
-	if (channel <= 114)
-		return MT_CH_5G_UNII_2E_1;
-	if (channel <= 144)
-		return MT_CH_5G_UNII_2E_2;
-	if (channel <= 161)
-		return MT_CH_5G_UNII_2E_3;
-	return MT_CH_5G_UNII_3;
-}
-
-static inline bool
-mt7615_ext_pa_enabled(struct mt7615_dev *dev, enum nl80211_band band)
-{
-	u8 *eep = dev->mt76.eeprom.data;
-
-	if (band == NL80211_BAND_5GHZ)
-		return !(eep[MT_EE_NIC_CONF_1 + 1] & MT_EE_NIC_CONF_TSSI_5G);
-	else
-		return !(eep[MT_EE_NIC_CONF_1 + 1] & MT_EE_NIC_CONF_TSSI_2G);
-}
-
-#endif
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt7615/init.c b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt7615/init.c
deleted file mode 100644
index 07a1fea..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt7615/init.c
+++ /dev/null
@@ -1,561 +0,0 @@
-// SPDX-License-Identifier: ISC
-/* Copyright (C) 2019 MediaTek Inc.
- *
- * Author: Roy Luo <royluo@google.com>
- *         Ryder Lee <ryder.lee@mediatek.com>
- *         Felix Fietkau <nbd@nbd.name>
- *         Lorenzo Bianconi <lorenzo@kernel.org>
- */
-
-#include <linux/etherdevice.h>
-#include <linux/hwmon.h>
-#include <linux/hwmon-sysfs.h>
-#include "mt7615.h"
-#include "mac.h"
-#include "mcu.h"
-#include "eeprom.h"
-
-static ssize_t mt7615_thermal_show_temp(struct device *dev,
-					struct device_attribute *attr,
-					char *buf)
-{
-	struct mt7615_dev *mdev = dev_get_drvdata(dev);
-	int temperature;
-
-	if (!mt7615_wait_for_mcu_init(mdev))
-		return 0;
-
-	mt7615_mutex_acquire(mdev);
-	temperature = mt7615_mcu_get_temperature(mdev);
-	mt7615_mutex_release(mdev);
-
-	if (temperature < 0)
-		return temperature;
-
-	/* display in millidegree celcius */
-	return sprintf(buf, "%u\n", temperature * 1000);
-}
-
-static SENSOR_DEVICE_ATTR(temp1_input, 0444, mt7615_thermal_show_temp,
-			  NULL, 0);
-
-static struct attribute *mt7615_hwmon_attrs[] = {
-	&sensor_dev_attr_temp1_input.dev_attr.attr,
-	NULL,
-};
-ATTRIBUTE_GROUPS(mt7615_hwmon);
-
-int mt7615_thermal_init(struct mt7615_dev *dev)
-{
-	struct wiphy *wiphy = mt76_hw(dev)->wiphy;
-	struct device *hwmon;
-	const char *name;
-
-	if (!IS_REACHABLE(CONFIG_HWMON))
-		return 0;
-
-	name = devm_kasprintf(&wiphy->dev, GFP_KERNEL, "mt7615_%s",
-			      wiphy_name(wiphy));
-	hwmon = devm_hwmon_device_register_with_groups(&wiphy->dev, name, dev,
-						       mt7615_hwmon_groups);
-	if (IS_ERR(hwmon))
-		return PTR_ERR(hwmon);
-
-	return 0;
-}
-EXPORT_SYMBOL_GPL(mt7615_thermal_init);
-
-static void
-mt7615_phy_init(struct mt7615_dev *dev)
-{
-	/* disable rf low power beacon mode */
-	mt76_set(dev, MT_WF_PHY_WF2_RFCTRL0(0), MT_WF_PHY_WF2_RFCTRL0_LPBCN_EN);
-	mt76_set(dev, MT_WF_PHY_WF2_RFCTRL0(1), MT_WF_PHY_WF2_RFCTRL0_LPBCN_EN);
-}
-
-static void
-mt7615_init_mac_chain(struct mt7615_dev *dev, int chain)
-{
-	u32 val;
-
-	if (!chain)
-		val = MT_CFG_CCR_MAC_D0_1X_GC_EN | MT_CFG_CCR_MAC_D0_2X_GC_EN;
-	else
-		val = MT_CFG_CCR_MAC_D1_1X_GC_EN | MT_CFG_CCR_MAC_D1_2X_GC_EN;
-
-	/* enable band 0/1 clk */
-	mt76_set(dev, MT_CFG_CCR, val);
-
-	mt76_rmw(dev, MT_TMAC_TRCR(chain),
-		 MT_TMAC_TRCR_CCA_SEL | MT_TMAC_TRCR_SEC_CCA_SEL,
-		 FIELD_PREP(MT_TMAC_TRCR_CCA_SEL, 2) |
-		 FIELD_PREP(MT_TMAC_TRCR_SEC_CCA_SEL, 0));
-
-	mt76_wr(dev, MT_AGG_ACR(chain),
-		MT_AGG_ACR_PKT_TIME_EN | MT_AGG_ACR_NO_BA_AR_RULE |
-		FIELD_PREP(MT_AGG_ACR_CFEND_RATE, MT7615_CFEND_RATE_DEFAULT) |
-		FIELD_PREP(MT_AGG_ACR_BAR_RATE, MT7615_BAR_RATE_DEFAULT));
-
-	mt76_wr(dev, MT_AGG_ARUCR(chain),
-		FIELD_PREP(MT_AGG_ARxCR_LIMIT(0), 7) |
-		FIELD_PREP(MT_AGG_ARxCR_LIMIT(1), 2) |
-		FIELD_PREP(MT_AGG_ARxCR_LIMIT(2), 2) |
-		FIELD_PREP(MT_AGG_ARxCR_LIMIT(3), 2) |
-		FIELD_PREP(MT_AGG_ARxCR_LIMIT(4), 1) |
-		FIELD_PREP(MT_AGG_ARxCR_LIMIT(5), 1) |
-		FIELD_PREP(MT_AGG_ARxCR_LIMIT(6), 1) |
-		FIELD_PREP(MT_AGG_ARxCR_LIMIT(7), 1));
-
-	mt76_wr(dev, MT_AGG_ARDCR(chain),
-		FIELD_PREP(MT_AGG_ARxCR_LIMIT(0), MT7615_RATE_RETRY - 1) |
-		FIELD_PREP(MT_AGG_ARxCR_LIMIT(1), MT7615_RATE_RETRY - 1) |
-		FIELD_PREP(MT_AGG_ARxCR_LIMIT(2), MT7615_RATE_RETRY - 1) |
-		FIELD_PREP(MT_AGG_ARxCR_LIMIT(3), MT7615_RATE_RETRY - 1) |
-		FIELD_PREP(MT_AGG_ARxCR_LIMIT(4), MT7615_RATE_RETRY - 1) |
-		FIELD_PREP(MT_AGG_ARxCR_LIMIT(5), MT7615_RATE_RETRY - 1) |
-		FIELD_PREP(MT_AGG_ARxCR_LIMIT(6), MT7615_RATE_RETRY - 1) |
-		FIELD_PREP(MT_AGG_ARxCR_LIMIT(7), MT7615_RATE_RETRY - 1));
-
-	mt76_clear(dev, MT_DMA_RCFR0(chain), MT_DMA_RCFR0_MCU_RX_TDLS);
-	if (!mt7615_firmware_offload(dev)) {
-		u32 mask, set;
-
-		mask = MT_DMA_RCFR0_MCU_RX_MGMT |
-		       MT_DMA_RCFR0_MCU_RX_CTL_NON_BAR |
-		       MT_DMA_RCFR0_MCU_RX_CTL_BAR |
-		       MT_DMA_RCFR0_MCU_RX_BYPASS |
-		       MT_DMA_RCFR0_RX_DROPPED_UCAST |
-		       MT_DMA_RCFR0_RX_DROPPED_MCAST;
-		set = FIELD_PREP(MT_DMA_RCFR0_RX_DROPPED_UCAST, 2) |
-		      FIELD_PREP(MT_DMA_RCFR0_RX_DROPPED_MCAST, 2);
-		mt76_rmw(dev, MT_DMA_RCFR0(chain), mask, set);
-	}
-}
-
-static void
-mt7615_mac_init(struct mt7615_dev *dev)
-{
-	int i;
-
-	mt7615_init_mac_chain(dev, 0);
-
-	mt76_rmw_field(dev, MT_TMAC_CTCR0,
-		       MT_TMAC_CTCR0_INS_DDLMT_REFTIME, 0x3f);
-	mt76_rmw_field(dev, MT_TMAC_CTCR0,
-		       MT_TMAC_CTCR0_INS_DDLMT_DENSITY, 0x3);
-	mt76_rmw(dev, MT_TMAC_CTCR0,
-		 MT_TMAC_CTCR0_INS_DDLMT_VHT_SMPDU_EN |
-		 MT_TMAC_CTCR0_INS_DDLMT_EN,
-		 MT_TMAC_CTCR0_INS_DDLMT_VHT_SMPDU_EN |
-		 MT_TMAC_CTCR0_INS_DDLMT_EN);
-
-	mt76_connac_mcu_set_rts_thresh(&dev->mt76, 0x92b, 0);
-	mt7615_mac_set_scs(&dev->phy, true);
-
-	mt76_rmw(dev, MT_AGG_SCR, MT_AGG_SCR_NLNAV_MID_PTEC_DIS,
-		 MT_AGG_SCR_NLNAV_MID_PTEC_DIS);
-
-	mt76_wr(dev, MT_AGG_ARCR,
-		FIELD_PREP(MT_AGG_ARCR_RTS_RATE_THR, 2) |
-		MT_AGG_ARCR_RATE_DOWN_RATIO_EN |
-		FIELD_PREP(MT_AGG_ARCR_RATE_DOWN_RATIO, 1) |
-		FIELD_PREP(MT_AGG_ARCR_RATE_UP_EXTRA_TH, 4));
-
-	for (i = 0; i < MT7615_WTBL_SIZE; i++)
-		mt7615_mac_wtbl_update(dev, i,
-				       MT_WTBL_UPDATE_ADM_COUNT_CLEAR);
-
-	mt76_set(dev, MT_WF_RMAC_MIB_TIME0, MT_WF_RMAC_MIB_RXTIME_EN);
-	mt76_set(dev, MT_WF_RMAC_MIB_AIRTIME0, MT_WF_RMAC_MIB_RXTIME_EN);
-
-	mt76_wr(dev, MT_DMA_DCR0,
-		FIELD_PREP(MT_DMA_DCR0_MAX_RX_LEN, 3072) |
-		MT_DMA_DCR0_RX_VEC_DROP | MT_DMA_DCR0_DAMSDU_EN |
-		MT_DMA_DCR0_RX_HDR_TRANS_EN);
-	/* disable TDLS filtering */
-	mt76_clear(dev, MT_WF_PFCR, MT_WF_PFCR_TDLS_EN);
-	mt76_set(dev, MT_WF_MIB_SCR0, MT_MIB_SCR0_AGG_CNT_RANGE_EN);
-	if (is_mt7663(&dev->mt76)) {
-		mt76_wr(dev, MT_WF_AGG(0x160), 0x5c341c02);
-		mt76_wr(dev, MT_WF_AGG(0x164), 0x70708040);
-	} else {
-		mt7615_init_mac_chain(dev, 1);
-	}
-	mt7615_mcu_set_rx_hdr_trans_blacklist(dev);
-}
-
-static void
-mt7615_check_offload_capability(struct mt7615_dev *dev)
-{
-	struct ieee80211_hw *hw = mt76_hw(dev);
-	struct wiphy *wiphy = hw->wiphy;
-
-	if (mt7615_firmware_offload(dev)) {
-		ieee80211_hw_set(hw, SUPPORTS_PS);
-		ieee80211_hw_set(hw, SUPPORTS_DYNAMIC_PS);
-
-		wiphy->flags &= ~WIPHY_FLAG_4ADDR_STATION;
-		wiphy->max_remain_on_channel_duration = 5000;
-		wiphy->features |= NL80211_FEATURE_SCHED_SCAN_RANDOM_MAC_ADDR |
-				   NL80211_FEATURE_SCAN_RANDOM_MAC_ADDR |
-				   WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL |
-				   NL80211_FEATURE_P2P_GO_CTWIN |
-				   NL80211_FEATURE_P2P_GO_OPPPS;
-	} else {
-		dev->ops->hw_scan = NULL;
-		dev->ops->cancel_hw_scan = NULL;
-		dev->ops->sched_scan_start = NULL;
-		dev->ops->sched_scan_stop = NULL;
-		dev->ops->set_rekey_data = NULL;
-		dev->ops->remain_on_channel = NULL;
-		dev->ops->cancel_remain_on_channel = NULL;
-
-		wiphy->max_sched_scan_plan_interval = 0;
-		wiphy->max_sched_scan_ie_len = 0;
-		wiphy->max_scan_ie_len = IEEE80211_MAX_DATA_LEN;
-		wiphy->max_sched_scan_ssids = 0;
-		wiphy->max_match_sets = 0;
-		wiphy->max_sched_scan_reqs = 0;
-	}
-}
-
-bool mt7615_wait_for_mcu_init(struct mt7615_dev *dev)
-{
-	flush_work(&dev->mcu_work);
-
-	return test_bit(MT76_STATE_MCU_RUNNING, &dev->mphy.state);
-}
-EXPORT_SYMBOL_GPL(mt7615_wait_for_mcu_init);
-
-static const struct ieee80211_iface_limit if_limits[] = {
-	{
-		.max = 1,
-		.types = BIT(NL80211_IFTYPE_ADHOC)
-	}, {
-		.max = MT7615_MAX_INTERFACES,
-		.types = BIT(NL80211_IFTYPE_AP) |
-#ifdef CONFIG_MAC80211_MESH
-			 BIT(NL80211_IFTYPE_MESH_POINT) |
-#endif
-			 BIT(NL80211_IFTYPE_P2P_CLIENT) |
-			 BIT(NL80211_IFTYPE_P2P_GO) |
-			 BIT(NL80211_IFTYPE_STATION)
-	}
-};
-
-static const struct ieee80211_iface_combination if_comb_radar[] = {
-	{
-		.limits = if_limits,
-		.n_limits = ARRAY_SIZE(if_limits),
-		.max_interfaces = MT7615_MAX_INTERFACES,
-		.num_different_channels = 1,
-		.beacon_int_infra_match = true,
-		.radar_detect_widths = BIT(NL80211_CHAN_WIDTH_20_NOHT) |
-				       BIT(NL80211_CHAN_WIDTH_20) |
-				       BIT(NL80211_CHAN_WIDTH_40) |
-				       BIT(NL80211_CHAN_WIDTH_80) |
-				       BIT(NL80211_CHAN_WIDTH_160) |
-				       BIT(NL80211_CHAN_WIDTH_80P80),
-	}
-};
-
-static const struct ieee80211_iface_combination if_comb[] = {
-	{
-		.limits = if_limits,
-		.n_limits = ARRAY_SIZE(if_limits),
-		.max_interfaces = MT7615_MAX_INTERFACES,
-		.num_different_channels = 1,
-		.beacon_int_infra_match = true,
-	}
-};
-
-void mt7615_init_txpower(struct mt7615_dev *dev,
-			 struct ieee80211_supported_band *sband)
-{
-	int i, n_chains = hweight8(dev->mphy.antenna_mask), target_chains;
-	int delta_idx, delta = mt76_tx_power_nss_delta(n_chains);
-	u8 *eep = (u8 *)dev->mt76.eeprom.data;
-	enum nl80211_band band = sband->band;
-	struct mt76_power_limits limits;
-	u8 rate_val;
-
-	delta_idx = mt7615_eeprom_get_power_delta_index(dev, band);
-	rate_val = eep[delta_idx];
-	if ((rate_val & ~MT_EE_RATE_POWER_MASK) ==
-	    (MT_EE_RATE_POWER_EN | MT_EE_RATE_POWER_SIGN))
-		delta += rate_val & MT_EE_RATE_POWER_MASK;
-
-	if (!is_mt7663(&dev->mt76) && mt7615_ext_pa_enabled(dev, band))
-		target_chains = 1;
-	else
-		target_chains = n_chains;
-
-	for (i = 0; i < sband->n_channels; i++) {
-		struct ieee80211_channel *chan = &sband->channels[i];
-		u8 target_power = 0;
-		int j;
-
-		for (j = 0; j < target_chains; j++) {
-			int index;
-
-			index = mt7615_eeprom_get_target_power_index(dev, chan, j);
-			if (index < 0)
-				continue;
-
-			target_power = max(target_power, eep[index]);
-		}
-
-		target_power = mt76_get_rate_power_limits(&dev->mphy, chan,
-							  &limits,
-							  target_power);
-		target_power += delta;
-		target_power = DIV_ROUND_UP(target_power, 2);
-		chan->max_power = min_t(int, chan->max_reg_power,
-					target_power);
-		chan->orig_mpwr = target_power;
-	}
-}
-EXPORT_SYMBOL_GPL(mt7615_init_txpower);
-
-void mt7615_init_work(struct mt7615_dev *dev)
-{
-	mt7615_mcu_set_eeprom(dev);
-	mt7615_mac_init(dev);
-	mt7615_phy_init(dev);
-	mt7615_mcu_del_wtbl_all(dev);
-	mt7615_check_offload_capability(dev);
-}
-EXPORT_SYMBOL_GPL(mt7615_init_work);
-
-static void
-mt7615_regd_notifier(struct wiphy *wiphy,
-		     struct regulatory_request *request)
-{
-	struct ieee80211_hw *hw = wiphy_to_ieee80211_hw(wiphy);
-	struct mt7615_dev *dev = mt7615_hw_dev(hw);
-	struct mt76_phy *mphy = hw->priv;
-	struct mt7615_phy *phy = mphy->priv;
-	struct cfg80211_chan_def *chandef = &mphy->chandef;
-
-	memcpy(dev->mt76.alpha2, request->alpha2, sizeof(dev->mt76.alpha2));
-	dev->mt76.region = request->dfs_region;
-
-	mt7615_init_txpower(dev, &mphy->sband_2g.sband);
-	mt7615_init_txpower(dev, &mphy->sband_5g.sband);
-
-	mt7615_mutex_acquire(dev);
-
-	if (chandef->chan->flags & IEEE80211_CHAN_RADAR)
-		mt7615_dfs_init_radar_detector(phy);
-
-	if (mt7615_firmware_offload(phy->dev)) {
-		mt76_connac_mcu_set_channel_domain(mphy);
-		mt76_connac_mcu_set_rate_txpower(mphy);
-	}
-
-	mt7615_mutex_release(dev);
-}
-
-static void
-mt7615_init_wiphy(struct ieee80211_hw *hw)
-{
-	struct mt7615_phy *phy = mt7615_hw_phy(hw);
-	struct wiphy *wiphy = hw->wiphy;
-
-	hw->queues = 4;
-	hw->max_rates = 3;
-	hw->max_report_rates = 7;
-	hw->max_rate_tries = 11;
-	hw->netdev_features = NETIF_F_RXCSUM;
-
-	hw->radiotap_timestamp.units_pos =
-		IEEE80211_RADIOTAP_TIMESTAMP_UNIT_US;
-
-	phy->slottime = 9;
-
-	hw->sta_data_size = sizeof(struct mt7615_sta);
-	hw->vif_data_size = sizeof(struct mt7615_vif);
-
-	if (is_mt7663(&phy->dev->mt76)) {
-		wiphy->iface_combinations = if_comb;
-		wiphy->n_iface_combinations = ARRAY_SIZE(if_comb);
-	} else {
-		wiphy->iface_combinations = if_comb_radar;
-		wiphy->n_iface_combinations = ARRAY_SIZE(if_comb_radar);
-	}
-	wiphy->reg_notifier = mt7615_regd_notifier;
-
-	wiphy->max_sched_scan_plan_interval =
-		MT76_CONNAC_MAX_TIME_SCHED_SCAN_INTERVAL;
-	wiphy->max_sched_scan_ie_len = IEEE80211_MAX_DATA_LEN;
-	wiphy->max_scan_ie_len = MT76_CONNAC_SCAN_IE_LEN;
-	wiphy->max_sched_scan_ssids = MT76_CONNAC_MAX_SCHED_SCAN_SSID;
-	wiphy->max_match_sets = MT76_CONNAC_MAX_SCAN_MATCH;
-	wiphy->max_sched_scan_reqs = 1;
-	wiphy->max_scan_ssids = 4;
-
-	wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_SET_SCAN_DWELL);
-	wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_VHT_IBSS);
-
-	ieee80211_hw_set(hw, SINGLE_SCAN_ON_ALL_BANDS);
-	ieee80211_hw_set(hw, TX_STATUS_NO_AMPDU_LEN);
-	ieee80211_hw_set(hw, WANT_MONITOR_VIF);
-	ieee80211_hw_set(hw, SUPPORTS_RX_DECAP_OFFLOAD);
-	ieee80211_hw_set(hw, SUPPORTS_VHT_EXT_NSS_BW);
-
-	if (is_mt7615(&phy->dev->mt76))
-		hw->max_tx_fragments = MT_TXP_MAX_BUF_NUM;
-	else
-		hw->max_tx_fragments = MT_HW_TXP_MAX_BUF_NUM;
-
-	phy->mt76->sband_2g.sband.ht_cap.cap |= IEEE80211_HT_CAP_LDPC_CODING;
-	phy->mt76->sband_5g.sband.ht_cap.cap |= IEEE80211_HT_CAP_LDPC_CODING;
-	phy->mt76->sband_5g.sband.vht_cap.cap |=
-			IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MASK;
-}
-
-static void
-mt7615_cap_dbdc_enable(struct mt7615_dev *dev)
-{
-	dev->mphy.sband_5g.sband.vht_cap.cap &=
-			~(IEEE80211_VHT_CAP_SHORT_GI_160 |
-			  IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ);
-	if (dev->chainmask == 0xf)
-		dev->mphy.antenna_mask = dev->chainmask >> 2;
-	else
-		dev->mphy.antenna_mask = dev->chainmask >> 1;
-	dev->mphy.chainmask = dev->mphy.antenna_mask;
-	dev->mphy.hw->wiphy->available_antennas_rx = dev->mphy.chainmask;
-	dev->mphy.hw->wiphy->available_antennas_tx = dev->mphy.chainmask;
-	mt76_set_stream_caps(&dev->mphy, true);
-}
-
-static void
-mt7615_cap_dbdc_disable(struct mt7615_dev *dev)
-{
-	dev->mphy.sband_5g.sband.vht_cap.cap |=
-			IEEE80211_VHT_CAP_SHORT_GI_160 |
-			IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ;
-	dev->mphy.antenna_mask = dev->chainmask;
-	dev->mphy.chainmask = dev->chainmask;
-	dev->mphy.hw->wiphy->available_antennas_rx = dev->chainmask;
-	dev->mphy.hw->wiphy->available_antennas_tx = dev->chainmask;
-	mt76_set_stream_caps(&dev->mphy, true);
-}
-
-int mt7615_register_ext_phy(struct mt7615_dev *dev)
-{
-	struct mt7615_phy *phy = mt7615_ext_phy(dev);
-	struct mt76_phy *mphy;
-	int i, ret;
-
-	if (!is_mt7615(&dev->mt76))
-		return -EOPNOTSUPP;
-
-	if (test_bit(MT76_STATE_RUNNING, &dev->mphy.state))
-		return -EINVAL;
-
-	if (phy)
-		return 0;
-
-	mt7615_cap_dbdc_enable(dev);
-	mphy = mt76_alloc_phy(&dev->mt76, sizeof(*phy), &mt7615_ops, MT_BAND1);
-	if (!mphy)
-		return -ENOMEM;
-
-	phy = mphy->priv;
-	phy->dev = dev;
-	phy->mt76 = mphy;
-	mphy->chainmask = dev->chainmask & ~dev->mphy.chainmask;
-	mphy->antenna_mask = BIT(hweight8(mphy->chainmask)) - 1;
-	mt7615_init_wiphy(mphy->hw);
-
-	INIT_DELAYED_WORK(&mphy->mac_work, mt7615_mac_work);
-	INIT_DELAYED_WORK(&phy->scan_work, mt7615_scan_work);
-	skb_queue_head_init(&phy->scan_event_list);
-
-	INIT_WORK(&phy->roc_work, mt7615_roc_work);
-	timer_setup(&phy->roc_timer, mt7615_roc_timer, 0);
-	init_waitqueue_head(&phy->roc_wait);
-
-	mt7615_mac_set_scs(phy, true);
-
-	/*
-	 * Make the secondary PHY MAC address local without overlapping with
-	 * the usual MAC address allocation scheme on multiple virtual interfaces
-	 */
-	memcpy(mphy->macaddr, dev->mt76.eeprom.data + MT_EE_MAC_ADDR,
-	       ETH_ALEN);
-	mphy->macaddr[0] |= 2;
-	mphy->macaddr[0] ^= BIT(7);
-	mt76_eeprom_override(mphy);
-
-	/* second phy can only handle 5 GHz */
-	mphy->cap.has_5ghz = true;
-
-	/* mt7615 second phy shares the same hw queues with the primary one */
-	for (i = 0; i <= MT_TXQ_PSD ; i++)
-		mphy->q_tx[i] = dev->mphy.q_tx[i];
-
-	ret = mt76_register_phy(mphy, true, mt76_rates,
-				ARRAY_SIZE(mt76_rates));
-	if (ret)
-		ieee80211_free_hw(mphy->hw);
-
-	return ret;
-}
-EXPORT_SYMBOL_GPL(mt7615_register_ext_phy);
-
-void mt7615_unregister_ext_phy(struct mt7615_dev *dev)
-{
-	struct mt7615_phy *phy = mt7615_ext_phy(dev);
-	struct mt76_phy *mphy = dev->mt76.phys[MT_BAND1];
-
-	if (!phy)
-		return;
-
-	mt7615_cap_dbdc_disable(dev);
-	mt76_unregister_phy(mphy);
-	ieee80211_free_hw(mphy->hw);
-}
-EXPORT_SYMBOL_GPL(mt7615_unregister_ext_phy);
-
-void mt7615_init_device(struct mt7615_dev *dev)
-{
-	struct ieee80211_hw *hw = mt76_hw(dev);
-
-	dev->phy.dev = dev;
-	dev->phy.mt76 = &dev->mt76.phy;
-	dev->mt76.phy.priv = &dev->phy;
-	dev->mt76.tx_worker.fn = mt7615_tx_worker;
-
-	INIT_DELAYED_WORK(&dev->pm.ps_work, mt7615_pm_power_save_work);
-	INIT_WORK(&dev->pm.wake_work, mt7615_pm_wake_work);
-	spin_lock_init(&dev->pm.wake.lock);
-	mutex_init(&dev->pm.mutex);
-	init_waitqueue_head(&dev->pm.wait);
-	spin_lock_init(&dev->pm.txq_lock);
-	INIT_DELAYED_WORK(&dev->mphy.mac_work, mt7615_mac_work);
-	INIT_DELAYED_WORK(&dev->phy.scan_work, mt7615_scan_work);
-	INIT_DELAYED_WORK(&dev->coredump.work, mt7615_coredump_work);
-	skb_queue_head_init(&dev->phy.scan_event_list);
-	skb_queue_head_init(&dev->coredump.msg_list);
-	INIT_LIST_HEAD(&dev->sta_poll_list);
-	spin_lock_init(&dev->sta_poll_lock);
-	init_waitqueue_head(&dev->reset_wait);
-	init_waitqueue_head(&dev->phy.roc_wait);
-
-	INIT_WORK(&dev->phy.roc_work, mt7615_roc_work);
-	timer_setup(&dev->phy.roc_timer, mt7615_roc_timer, 0);
-
-	mt7615_init_wiphy(hw);
-	dev->pm.idle_timeout = MT7615_PM_TIMEOUT;
-	dev->pm.stats.last_wake_event = jiffies;
-	dev->pm.stats.last_doze_event = jiffies;
-	mt7615_cap_dbdc_disable(dev);
-
-#ifdef CONFIG_NL80211_TESTMODE
-	dev->mt76.test_ops = &mt7615_testmode_ops;
-#endif
-}
-EXPORT_SYMBOL_GPL(mt7615_init_device);
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt7615/mac.c b/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt7615/mac.c
deleted file mode 100644
index 2ce1705..0000000
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/src/mt7615/mac.c
+++ /dev/null
@@ -1,2383 +0,0 @@
-// SPDX-License-Identifier: ISC
-/* Copyright (C) 2019 MediaTek Inc.
- *
- * Author: Ryder Lee <ryder.lee@mediatek.com>
- *         Roy Luo <royluo@google.com>
- *         Felix Fietkau <nbd@nbd.name>
- *         Lorenzo Bianconi <lorenzo@kernel.org>
- */
-
-#include <linux/devcoredump.h>
-#include <linux/etherdevice.h>
-#include <linux/timekeeping.h>
-#include "mt7615.h"
-#include "../trace.h"
-#include "../dma.h"
-#include "mt7615_trace.h"
-#include "mac.h"
-#include "mcu.h"
-
-#define to_rssi(field, rxv)		((FIELD_GET(field, rxv) - 220) / 2)
-
-static const struct mt7615_dfs_radar_spec etsi_radar_specs = {
-	.pulse_th = { 110, -10, -80, 40, 5200, 128, 5200 },
-	.radar_pattern = {
-		[5] =  { 1, 0,  6, 32, 28, 0, 17,  990, 5010, 1, 1 },
-		[6] =  { 1, 0,  9, 32, 28, 0, 27,  615, 5010, 1, 1 },
-		[7] =  { 1, 0, 15, 32, 28, 0, 27,  240,  445, 1, 1 },
-		[8] =  { 1, 0, 12, 32, 28, 0, 42,  240,  510, 1, 1 },
-		[9] =  { 1, 1,  0,  0,  0, 0, 14, 2490, 3343, 0, 0, 12, 32, 28 },
-		[10] = { 1, 1,  0,  0,  0, 0, 14, 2490, 3343, 0, 0, 15, 32, 24 },
-		[11] = { 1, 1,  0,  0,  0, 0, 14,  823, 2510, 0, 0, 18, 32, 28 },
-		[12] = { 1, 1,  0,  0,  0, 0, 14,  823, 2510, 0, 0, 27, 32, 24 },
-	},
-};
-
-static const struct mt7615_dfs_radar_spec fcc_radar_specs = {
-	.pulse_th = { 110, -10, -80, 40, 5200, 128, 5200 },
-	.radar_pattern = {
-		[0] = { 1, 0,  9,  32, 28, 0, 13, 508, 3076, 1,  1 },
-		[1] = { 1, 0, 12,  32, 28, 0, 17, 140,  240, 1,  1 },
-		[2] = { 1, 0,  8,  32, 28, 0, 22, 190,  510, 1,  1 },
-		[3] = { 1, 0,  6,  32, 28, 0, 32, 190,  510, 1,  1 },
-		[4] = { 1, 0,  9, 255, 28, 0, 13, 323,  343, 1, 32 },
-	},
-};
-
-static const struct mt7615_dfs_radar_spec jp_radar_specs = {
-	.pulse_th = { 110, -10, -80, 40, 5200, 128, 5200 },
-	.radar_pattern = {
-		[0] =  { 1, 0,  8, 32, 28, 0, 13,  508, 3076, 1,  1 },
-		[1] =  { 1, 0, 12, 32, 28, 0, 17,  140,  240, 1,  1 },
-		[2] =  { 1, 0,  8, 32, 28, 0, 22,  190,  510, 1,  1 },
-		[3] =  { 1, 0,  6, 32, 28, 0, 32,  190,  510, 1,  1 },
-		[4] =  { 1, 0,  9, 32, 28, 0, 13,  323,  343, 1, 32 },
-		[13] = { 1, 0, 8,  32, 28, 0, 14, 3836, 3856, 1,  1 },
-		[14] = { 1, 0, 8,  32, 28, 0, 14, 3990, 4010, 1,  1 },
-	},
-};
-
-static enum mt76_cipher_type
-mt7615_mac_get_cipher(int cipher)
-{
-	switch (cipher) {
-	case WLAN_CIPHER_SUITE_WEP40:
-		return MT_CIPHER_WEP40;
-	case WLAN_CIPHER_SUITE_WEP104:
-		return MT_CIPHER_WEP104;
-	case WLAN_CIPHER_SUITE_TKIP:
-		return MT_CIPHER_TKIP;
-	case WLAN_CIPHER_SUITE_AES_CMAC:
-		return MT_CIPHER_BIP_CMAC_128;
-	case WLAN_CIPHER_SUITE_CCMP:
-		return MT_CIPHER_AES_CCMP;
-	case WLAN_CIPHER_SUITE_CCMP_256:
-		return MT_CIPHER_CCMP_256;
-	case WLAN_CIPHER_SUITE_GCMP:
-		return MT_CIPHER_GCMP;
-	case WLAN_CIPHER_SUITE_GCMP_256:
-		return MT_CIPHER_GCMP_256;
-	case WLAN_CIPHER_SUITE_SMS4:
-		return MT_CIPHER_WAPI;
-	default:
-		return MT_CIPHER_NONE;
-	}
-}
-
-static struct mt76_wcid *mt7615_rx_get_wcid(struct mt7615_dev *dev,
-					    u8 idx, bool unicast)
-{
-	struct mt7615_sta *sta;
-	struct mt76_wcid *wcid;
-
-	if (idx >= MT7615_WTBL_SIZE)
-		return NULL;
-
-	wcid = rcu_dereference(dev->mt76.wcid[idx]);
-	if (unicast || !wcid)
-		return wcid;
-
-	if (!wcid->sta)
-		return NULL;
-
-	sta = container_of(wcid, struct mt7615_sta, wcid);
-	if (!sta->vif)
-		return NULL;
-
-	return &sta->vif->sta.wcid;
-}
-
-void mt7615_mac_reset_counters(struct mt7615_dev *dev)
-{
-	struct mt76_phy *mphy_ext = dev->mt76.phys[MT_BAND1];
-	int i;
-
-	for (i = 0; i < 4; i++) {
-		mt76_rr(dev, MT_TX_AGG_CNT(0, i));
-		mt76_rr(dev, MT_TX_AGG_CNT(1, i));
-	}
-
-	memset(dev->mt76.aggr_stats, 0, sizeof(dev->mt76.aggr_stats));
-	dev->mt76.phy.survey_time = ktime_get_boottime();
-	if (mphy_ext)
-		mphy_ext->survey_time = ktime_get_boottime();
-
-	/* reset airtime counters */
-	mt76_rr(dev, MT_MIB_SDR9(0));
-	mt76_rr(dev, MT_MIB_SDR9(1));
-
-	mt76_rr(dev, MT_MIB_SDR36(0));
-	mt76_rr(dev, MT_MIB_SDR36(1));
-
-	mt76_rr(dev, MT_MIB_SDR37(0));
-	mt76_rr(dev, MT_MIB_SDR37(1));
-
-	mt76_set(dev, MT_WF_RMAC_MIB_TIME0, MT_WF_RMAC_MIB_RXTIME_CLR);
-	mt76_set(dev, MT_WF_RMAC_MIB_AIRTIME0, MT_WF_RMAC_MIB_RXTIME_CLR);
-}
-
-void mt7615_mac_set_timing(struct mt7615_phy *phy)
-{
-	s16 coverage_class = phy->coverage_class;
-	struct mt7615_dev *dev = phy->dev;
-	bool ext_phy = phy != &dev->phy;
-	u32 val, reg_offset;
-	u32 cck = FIELD_PREP(MT_TIMEOUT_VAL_PLCP, 231) |
-		  FIELD_PREP(MT_TIMEOUT_VAL_CCA, 48);
-	u32 ofdm = FIELD_PREP(MT_TIMEOUT_VAL_PLCP, 60) |
-		   FIELD_PREP(MT_TIMEOUT_VAL_CCA, 28);
-	int sifs, offset;
-	bool is_5ghz = phy->mt76->chandef.chan->band == NL80211_BAND_5GHZ;
-
-	if (!test_bit(MT76_STATE_RUNNING, &phy->mt76->state))
-		return;
-
-	if (is_5ghz)
-		sifs = 16;
-	else
-		sifs = 10;
-
-	if (ext_phy) {
-		coverage_class = max_t(s16, dev->phy.coverage_class,
-				       coverage_class);
-		mt76_set(dev, MT_ARB_SCR,
-			 MT_ARB_SCR_TX1_DISABLE | MT_ARB_SCR_RX1_DISABLE);
-	} else {
-		struct mt7615_phy *phy_ext = mt7615_ext_phy(dev);
-
-		if (phy_ext)
-			coverage_class = max_t(s16, phy_ext->coverage_class,
-					       coverage_class);
-		mt76_set(dev, MT_ARB_SCR,
-			 MT_ARB_SCR_TX0_DISABLE | MT_ARB_SCR_RX0_DISABLE);
-	}
-	udelay(1);
-
-	offset = 3 * coverage_class;
-	reg_offset = FIELD_PREP(MT_TIMEOUT_VAL_PLCP, offset) |
-		     FIELD_PREP(MT_TIMEOUT_VAL_CCA, offset);
-	mt76_wr(dev, MT_TMAC_CDTR, cck + reg_offset);
-	mt76_wr(dev, MT_TMAC_ODTR, ofdm + reg_offset);
-
-	mt76_wr(dev, MT_TMAC_ICR(ext_phy),
-		FIELD_PREP(MT_IFS_EIFS, 360) |
-		FIELD_PREP(MT_IFS_RIFS, 2) |
-		FIELD_PREP(MT_IFS_SIFS, sifs) |
-		FIELD_PREP(MT_IFS_SLOT, phy->slottime));
-
-	if (phy->slottime < 20 || is_5ghz)
-		val = MT7615_CFEND_RATE_DEFAULT;
-	else
-		val = MT7615_CFEND_RATE_11B;
-
-	mt76_rmw_field(dev, MT_AGG_ACR(ext_phy), MT_AGG_ACR_CFEND_RATE, val);
-	if (ext_phy)
-		mt76_clear(dev, MT_ARB_SCR,
-			   MT_ARB_SCR_TX1_DISABLE | MT_ARB_SCR_RX1_DISABLE);
-	else
-		mt76_clear(dev, MT_ARB_SCR,
-			   MT_ARB_SCR_TX0_DISABLE | MT_ARB_SCR_RX0_DISABLE);
-
-}
-
-static void
-mt7615_get_status_freq_info(struct mt7615_dev *dev, struct mt76_phy *mphy,
-			    struct mt76_rx_status *status, u8 chfreq)
-{
-	if (!test_bit(MT76_HW_SCANNING, &mphy->state) &&
-	    !test_bit(MT76_HW_SCHED_SCANNING, &mphy->state) &&
-	    !test_bit(MT76_STATE_ROC, &mphy->state)) {
-		status->freq = mphy->chandef.chan->center_freq;
-		status->band = mphy->chandef.chan->band;
-		return;
-	}
-
-	status->band = chfreq <= 14 ? NL80211_BAND_2GHZ : NL80211_BAND_5GHZ;
-	status->freq = ieee80211_channel_to_frequency(chfreq, status->band);
-}
-
-static void mt7615_mac_fill_tm_rx(struct mt7615_phy *phy, __le32 *rxv)
-{
-#ifdef CONFIG_NL80211_TESTMODE
-	u32 rxv1 = le32_to_cpu(rxv[0]);
-	u32 rxv3 = le32_to_cpu(rxv[2]);
-	u32 rxv4 = le32_to_cpu(rxv[3]);
-	u32 rxv5 = le32_to_cpu(rxv[4]);
-	u8 cbw = FIELD_GET(MT_RXV1_FRAME_MODE, rxv1);
-	u8 mode = FIELD_GET(MT_RXV1_TX_MODE, rxv1);
-	s16 foe = FIELD_GET(MT_RXV5_FOE, rxv5);
-	u32 foe_const = (BIT(cbw + 1) & 0xf) * 10000;
-
-	if (!mode) {
-		/* CCK */
-		foe &= ~BIT(11);
-		foe *= 1000;
-		foe >>= 11;
-	} else {
-		if (foe > 2048)
-			foe -= 4096;
-
-		foe = (foe * foe_const) >> 15;
-	}
-
-	phy->test.last_freq_offset = foe;
-	phy->test.last_rcpi[0] = FIELD_GET(MT_RXV4_RCPI0, rxv4);
-	phy->test.last_rcpi[1] = FIELD_GET(MT_RXV4_RCPI1, rxv4);
-	phy->test.last_rcpi[2] = FIELD_GET(MT_RXV4_RCPI2, rxv4);
-	phy->test.last_rcpi[3] = FIELD_GET(MT_RXV4_RCPI3, rxv4);
-	phy->test.last_ib_rssi[0] = FIELD_GET(MT_RXV3_IB_RSSI, rxv3);
-	phy->test.last_wb_rssi[0] = FIELD_GET(MT_RXV3_WB_RSSI, rxv3);
-#endif
-}
-
-/* The HW does not translate the mac header to 802.3 for mesh point */
-static int mt7615_reverse_frag0_hdr_trans(struct sk_buff *skb, u16 hdr_gap)
-{
-	struct mt76_rx_status *status = (struct mt76_rx_status *)skb->cb;
-	struct ethhdr *eth_hdr = (struct ethhdr *)(skb->data + hdr_gap);
-	struct mt7615_sta *msta = (struct mt7615_sta *)status->wcid;
-	__le32 *rxd = (__le32 *)skb->data;
-	struct ieee80211_sta *sta;
-	struct ieee80211_vif *vif;
-	struct ieee80211_hdr hdr;
-	u16 frame_control;
-
-	if (le32_get_bits(rxd[1], MT_RXD1_NORMAL_ADDR_TYPE) !=
-	    MT_RXD1_NORMAL_U2M)
-		return -EINVAL;
-
-	if (!(le32_to_cpu(rxd[0]) & MT_RXD0_NORMAL_GROUP_4))
-		return -EINVAL;
-
-	if (!msta || !msta->vif)
-		return -EINVAL;
-
-	sta = container_of((void *)msta, struct ieee80211_sta, drv_priv);
-	vif = container_of((void *)msta->vif, struct ieee80211_vif, drv_priv);
-
-	/* store the info from RXD and ethhdr to avoid being overridden */
-	frame_control = le32_get_bits(rxd[4], MT_RXD4_FRAME_CONTROL);
-	hdr.frame_control = cpu_to_le16(frame_control);
-	hdr.seq_ctrl = cpu_to_le16(le32_get_bits(rxd[6], MT_RXD6_SEQ_CTRL));
-	hdr.duration_id = 0;
-
-	ether_addr_copy(hdr.addr1, vif->addr);
-	ether_addr_copy(hdr.addr2, sta->addr);
-	switch (frame_control & (IEEE80211_FCTL_TODS |
-				 IEEE80211_FCTL_FROMDS)) {
-	case 0:
-		ether_addr_copy(hdr.addr3, vif->bss_conf.bssid);
-		break;
-	case IEEE80211_FCTL_FROMDS:
-		ether_addr_copy(hdr.addr3, eth_hdr->h_source);
-		break;
-	case IEEE80211_FCTL_TODS:
-		ether_addr_copy(hdr.addr3, eth_hdr->h_dest);
-		break;
-	case IEEE80211_FCTL_TODS | IEEE80211_FCTL_FROMDS:
-		ether_addr_copy(hdr.addr3, eth_hdr->h_dest);
-		ether_addr_copy(hdr.addr4, eth_hdr->h_source);
-		break;
-	default:
-		break;
-	}
-
-	skb_pull(skb, hdr_gap + sizeof(struct ethhdr) - 2);
-	if (eth_hdr->h_proto == cpu_to_be16(ETH_P_AARP) ||
-	    eth_hdr->h_proto == cpu_to_be16(ETH_P_IPX))
-		ether_addr_copy(skb_push(skb, ETH_ALEN), bridge_tunnel_header);
-	else if (be16_to_cpu(eth_hdr->h_proto) >= ETH_P_802_3_MIN)
-		ether_addr_copy(skb_push(skb, ETH_ALEN), rfc1042_header);
-	else
-		skb_pull(skb, 2);
-
-	if (ieee80211_has_order(hdr.frame_control))
-		memcpy(skb_push(skb, IEEE80211_HT_CTL_LEN), &rxd[7],
-		       IEEE80211_HT_CTL_LEN);
-
-	if (ieee80211_is_data_qos(hdr.frame_control)) {
-		__le16 qos_ctrl;
-
-		qos_ctrl = cpu_to_le16(le32_get_bits(rxd[6], MT_RXD6_QOS_CTL));
-		memcpy(skb_push(skb, IEEE80211_QOS_CTL_LEN), &qos_ctrl,
-		       IEEE80211_QOS_CTL_LEN);
-	}
-
-	if (ieee80211_has_a4(hdr.frame_control))
-		memcpy(skb_push(skb, sizeof(hdr)), &hdr, sizeof(hdr));
-	else
-		memcpy(skb_push(skb, sizeof(hdr) - 6), &hdr, sizeof(hdr) - 6);
-
-	status->flag &= ~(RX_FLAG_RADIOTAP_HE | RX_FLAG_RADIOTAP_HE_MU);
-	return 0;
-}
-
-static int mt7615_mac_fill_rx(struct mt7615_dev *dev, struct sk_buff *skb)
-{
-	struct mt76_rx_status *status = (struct mt76_rx_status *)skb->cb;
-	struct mt76_phy *mphy = &dev->mt76.phy;
-	struct mt7615_phy *phy = &dev->phy;
-	struct ieee80211_supported_band *sband;
-	struct ieee80211_hdr *hdr;
-	struct mt7615_phy *phy2;
-	__le32 *rxd = (__le32 *)skb->data;
-	u32 rxd0 = le32_to_cpu(rxd[0]);
-	u32 rxd1 = le32_to_cpu(rxd[1]);
-	u32 rxd2 = le32_to_cpu(rxd[2]);
-	u32 csum_mask = MT_RXD0_NORMAL_IP_SUM | MT_RXD0_NORMAL_UDP_TCP_SUM;
-	u32 csum_status = *(u32 *)skb->cb;
-	bool unicast, hdr_trans, remove_pad, insert_ccmp_hdr = false;
-	u16 hdr_gap;
-	int phy_idx;
-	int i, idx;
-	u8 chfreq, amsdu_info, qos_ctl = 0;
-	u16 seq_ctrl = 0;
-	__le16 fc = 0;
-
-	memset(status, 0, sizeof(*status));
-
-	chfreq = FIELD_GET(MT_RXD1_NORMAL_CH_FREQ, rxd1);
-
-	phy2 = dev->mt76.phys[MT_BAND1] ? dev->mt76.phys[MT_BAND1]->priv : NULL;
-	if (!phy2)
-		phy_idx = 0;
-	else if (phy2->chfreq == phy->chfreq)
-		phy_idx = -1;
-	else if (phy->chfreq == chfreq)
-		phy_idx = 0;
-	else if (phy2->chfreq == chfreq)
-		phy_idx = 1;
-	else
-		phy_idx = -1;
-
-	if (rxd2 & MT_RXD2_NORMAL_AMSDU_ERR)
-		return -EINVAL;
-
-	hdr_trans = rxd1 & MT_RXD1_NORMAL_HDR_TRANS;
-	if (hdr_trans && (rxd2 & MT_RXD2_NORMAL_CM))
-		return -EINVAL;
-
-	/* ICV error or CCMP/BIP/WPI MIC error */
-	if (rxd2 & MT_RXD2_NORMAL_ICV_ERR)
-		status->flag |= RX_FLAG_ONLY_MONITOR;
-
-	unicast = (rxd1 & MT_RXD1_NORMAL_ADDR_TYPE) == MT_RXD1_NORMAL_U2M;
-	idx = FIELD_GET(MT_RXD2_NORMAL_WLAN_IDX, rxd2);
-	status->wcid = mt7615_rx_get_wcid(dev, idx, unicast);
-
-	if (status->wcid) {
-		struct mt7615_sta *msta;
-
-		msta = container_of(status->wcid, struct mt7615_sta, wcid);
-		spin_lock_bh(&dev->sta_poll_lock);
-		if (list_empty(&msta->poll_list))
-			list_add_tail(&msta->poll_list, &dev->sta_poll_list);
-		spin_unlock_bh(&dev->sta_poll_lock);
-	}
-
-	if (mt76_is_mmio(&dev->mt76) && (rxd0 & csum_mask) == csum_mask &&
-	    !(csum_status & (BIT(0) | BIT(2) | BIT(3))))
-		skb->ip_summed = CHECKSUM_UNNECESSARY;
-
-	if (rxd2 & MT_RXD2_NORMAL_FCS_ERR)
-		status->flag |= RX_FLAG_FAILED_FCS_CRC;
-
-	if (rxd2 & MT_RXD2_NORMAL_TKIP_MIC_ERR)
-		status->flag |= RX_FLAG_MMIC_ERROR;
-
-	if (FIELD_GET(MT_RXD2_NORMAL_SEC_MODE, rxd2) != 0 &&
-	    !(rxd2 & (MT_RXD2_NORMAL_CLM | MT_RXD2_NORMAL_CM))) {
-		status->flag |= RX_FLAG_DECRYPTED;
-		status->flag |= RX_FLAG_IV_STRIPPED;
-		status->flag |= RX_FLAG_MMIC_STRIPPED | RX_FLAG_MIC_STRIPPED;
-	}
-
-	remove_pad = rxd1 & MT_RXD1_NORMAL_HDR_OFFSET;
-
-	if (rxd2 & MT_RXD2_NORMAL_MAX_LEN_ERROR)
-		return -EINVAL;
-
-	rxd += 4;
-	if (rxd0 & MT_RXD0_NORMAL_GROUP_4) {
-		u32 v0 = le32_to_cpu(rxd[0]);
-		u32 v2 = le32_to_cpu(rxd[2]);
-
-		fc = cpu_to_le16(FIELD_GET(MT_RXD4_FRAME_CONTROL, v0));
-		qos_ctl = FIELD_GET(MT_RXD6_QOS_CTL, v2);
-		seq_ctrl = FIELD_GET(MT_RXD6_SEQ_CTRL, v2);
-
-		rxd += 4;
-		if ((u8 *)rxd - skb->data >= skb->len)
-			return -EINVAL;
-	}
-
-	if (rxd0 & MT_RXD0_NORMAL_GROUP_1) {
-		u8 *data = (u8 *)rxd;
-
-		if (status->flag & RX_FLAG_DECRYPTED) {
-			switch (FIELD_GET(MT_RXD2_NORMAL_SEC_MODE, rxd2)) {
-			case MT_CIPHER_AES_CCMP:
-			case MT_CIPHER_CCMP_CCX:
-			case MT_CIPHER_CCMP_256:
-				insert_ccmp_hdr =
-					FIELD_GET(MT_RXD2_NORMAL_FRAG, rxd2);
-				fallthrough;
-			case MT_CIPHER_TKIP:
-			case MT_CIPHER_TKIP_NO_MIC:
-			case MT_CIPHER_GCMP:
-			case MT_CIPHER_GCMP_256:
-				status->iv[0] = data[5];
-				status->iv[1] = data[4];
-				status->iv[2] = data[3];
-				status->iv[3] = data[2];
-				status->iv[4] = data[1];
-				status->iv[5] = data[0];
-				break;
-			default:
-				break;
-			}
-		}
-		rxd += 4;
-		if ((u8 *)rxd - skb->data >= skb->len)
-			return -EINVAL;
-	}
-
-	if (rxd0 & MT_RXD0_NORMAL_GROUP_2) {
-		status->timestamp = le32_to_cpu(rxd[0]);
-		status->flag |= RX_FLAG_MACTIME_START;
-
-		if (!(rxd2 & (MT_RXD2_NORMAL_NON_AMPDU_SUB |
-			      MT_RXD2_NORMAL_NON_AMPDU))) {
-			status->flag |= RX_FLAG_AMPDU_DETAILS;
-
-			/* all subframes of an A-MPDU have the same timestamp */
-			if (phy->rx_ampdu_ts != status->timestamp) {
-				if (!++phy->ampdu_ref)
-					phy->ampdu_ref++;
-			}
-			phy->rx_ampdu_ts = status->timestamp;
-
-			status->ampdu_ref = phy->ampdu_ref;
-		}
-
-		rxd += 2;
-		if ((u8 *)rxd - skb->data >= skb->len)
-			return -EINVAL;
-	}
-
-	if (rxd0 & MT_RXD0_NORMAL_GROUP_3) {
-		u32 rxdg5 = le32_to_cpu(rxd[5]);
-
-		/*
-		 * If both PHYs are on the same channel and we don't have a WCID,
-		 * we need to figure out which PHY this packet was received on.
-		 * On the primary PHY, the noise value for the chains belonging to the
-		 * second PHY will be set to the noise value of the last packet from
-		 * that PHY.
-		 */
-		if (phy_idx < 0) {
-			int first_chain = ffs(phy2->mt76->chainmask) - 1;
-
-			phy_idx = ((rxdg5 >> (first_chain * 8)) & 0xff) == 0;
-		}
-	}
-
-	if (phy_idx == 1 && phy2) {
-		mphy = dev->mt76.phys[MT_BAND1];
-		phy = phy2;
-		status->phy_idx = phy_idx;
-	}
-
-	if (!mt7615_firmware_offload(dev) && chfreq != phy->chfreq)
-		return -EINVAL;
-
-	mt7615_get_status_freq_info(dev, mphy, status, chfreq);
-	if (status->band == NL80211_BAND_5GHZ)
-		sband = &mphy->sband_5g.sband;
-	else
-		sband = &mphy->sband_2g.sband;
-
-	if (!test_bit(MT76_STATE_RUNNING, &mphy->state))
-		return -EINVAL;
-
-	if (!sband->channels)
-		return -EINVAL;
-
-	if (rxd0 & MT_RXD0_NORMAL_GROUP_3) {
-		u32 rxdg0 = le32_to_cpu(rxd[0]);
-		u32 rxdg1 = le32_to_cpu(rxd[1]);
-		u32 rxdg3 = le32_to_cpu(rxd[3]);
-		u8 stbc = FIELD_GET(MT_RXV1_HT_STBC, rxdg0);
-		bool cck = false;
-
-		i = FIELD_GET(MT_RXV1_TX_RATE, rxdg0);
-		switch (FIELD_GET(MT_RXV1_TX_MODE, rxdg0)) {
-		case MT_PHY_TYPE_CCK:
-			cck = true;
-			fallthrough;
-		case MT_PHY_TYPE_OFDM:
-			i = mt76_get_rate(&dev->mt76, sband, i, cck);
-			break;
-		case MT_PHY_TYPE_HT_GF:
-		case MT_PHY_TYPE_HT:
-			status->encoding = RX_ENC_HT;
-			if (i > 31)
-				return -EINVAL;
-			break;
-		case MT_PHY_TYPE_VHT:
-			status->nss = FIELD_GET(MT_RXV2_NSTS, rxdg1) + 1;
-			status->encoding = RX_ENC_VHT;
-			break;
-		default:
-			return -EINVAL;
-		}
-		status->rate_idx = i;
-
-		switch (FIELD_GET(MT_RXV1_FRAME_MODE, rxdg0)) {
-		case MT_PHY_BW_20:
-			break;
-		case MT_PHY_BW_40:
-			status->bw = RATE_INFO_BW_40;
-			break;
-		case MT_PHY_BW_80:
-			status->bw = RATE_INFO_BW_80;
-			break;
-		case MT_PHY_BW_160:
-			status->bw = RATE_INFO_BW_160;
-			break;
-		default:
-			return -EINVAL;
-		}
-
-		if (rxdg0 & MT_RXV1_HT_SHORT_GI)
-			status->enc_flags |= RX_ENC_FLAG_SHORT_GI;
-		if (rxdg0 & MT_RXV1_HT_AD_CODE)
-			status->enc_flags |= RX_ENC_FLAG_LDPC;
-
-		status->enc_flags |= RX_ENC_FLAG_STBC_MASK * stbc;
-
-		status->chains = mphy->antenna_mask;
-		status->chain_signal[0] = to_rssi(MT_RXV4_RCPI0, rxdg3);
-		status->chain_signal[1] = to_rssi(MT_RXV4_RCPI1, rxdg3);
-		status->chain_signal[2] = to_rssi(MT_RXV4_RCPI2, rxdg3);
-		status->chain_signal[3] = to_rssi(MT_RXV4_RCPI3, rxdg3);
-
-		mt7615_mac_fill_tm_rx(mphy->priv, rxd);
-
-		rxd += 6;
-		if ((u8 *)rxd - skb->data >= skb->len)
-			return -EINVAL;
-	}
-
-	amsdu_info = FIELD_GET(MT_RXD1_NORMAL_PAYLOAD_FORMAT, rxd1);
-	status->amsdu = !!amsdu_info;
-	if (status->amsdu) {
-		status->first_amsdu = amsdu_info == MT_RXD1_FIRST_AMSDU_FRAME;
-		status->last_amsdu = amsdu_info == MT_RXD1_LAST_AMSDU_FRAME;
-	}
-
-	hdr_gap = (u8 *)rxd - skb->data + 2 * remove_pad;
-	if (hdr_trans && ieee80211_has_morefrags(fc)) {
-		if (mt7615_reverse_frag0_hdr_trans(skb, hdr_gap))
-			return -EINVAL;
-		hdr_trans = false;
-	} else {
-		int pad_start = 0;
-
-		skb_pull(skb, hdr_gap);
-		if (!hdr_trans && status->amsdu) {
-			pad_start = ieee80211_get_hdrlen_from_skb(skb);
-		} else if (hdr_trans && (rxd2 & MT_RXD2_NORMAL_HDR_TRANS_ERROR)) {
-			/*
-			 * When header translation failure is indicated,
-			 * the hardware will insert an extra 2-byte field
-			 * containing the data length after the protocol
-			 * type field. This happens either when the LLC-SNAP
-			 * pattern did not match, or if a VLAN header was
-			 * detected.
-			 */
-			pad_start = 12;
-			if (get_unaligned_be16(skb->data + pad_start) == ETH_P_8021Q)
-				pad_start += 4;
-			else
-				pad_start = 0;
-		}
-
-		if (pad_start) {
-			memmove(skb->data + 2, skb->data, pad_start);
-			skb_pull(skb, 2);
-		}
-	}
-
-	if (insert_ccmp_hdr && !hdr_trans) {
-		u8 key_id = FIELD_GET(MT_RXD1_NORMAL_KEY_ID, rxd1);
-
-		mt76_insert_ccmp_hdr(skb, key_id);
-	}
-
-	if (!hdr_trans) {
-		hdr = (struct ieee80211_hdr *)skb->data;
-		fc = hdr->frame_control;
-		if (ieee80211_is_data_qos(fc)) {
-			seq_ctrl = le16_to_cpu(hdr->seq_ctrl);
-			qos_ctl = *ieee80211_get_qos_ctl(hdr);
-		}
-	} else {
-		status->flag |= RX_FLAG_8023;
-	}
-
-	if (!status->wcid || !ieee80211_is_data_qos(fc))
-		return 0;
-
-	status->aggr = unicast &&
-		       !ieee80211_is_qos_nullfunc(fc);
-	status->qos_ctl = qos_ctl;
-	status->seqno = IEEE80211_SEQ_TO_SN(seq_ctrl);
-
-	return 0;
-}
-
-void mt7615_sta_ps(struct mt76_dev *mdev, struct ieee80211_sta *sta, bool ps)
-{
-}
-EXPORT_SYMBOL_GPL(mt7615_sta_ps);
-
-static u16
-mt7615_mac_tx_rate_val(struct mt7615_dev *dev,
-		       struct mt76_phy *mphy,