From a0c4e698e479b95cc7836f5e1be95b6687023998 Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Mon, 4 Mar 2024 21:01:03 +0800 Subject: [PATCH] rtl88x2bu: remove outdated package Use upstream kmod-rtw88-8822bu driver instead. Signed-off-by: Tianling Shen (cherry picked from commit a6f0ac13f5a2f4d700d4fad82fe396e4b3a327ac) --- package/kernel/rtl88x2bu/Makefile | 62 --------- .../patches/001-use-kernel-byteorder.patch | 15 -- .../002-use-kernel-wireless-header.patch | 31 ----- .../patches/010-remove-repeat-flies.patch | 39 ------ ...nge-value-of-vht-enable-and-usb-mode.patch | 20 --- .../rtl88x2bu/patches/030-wireless-5.8.patch | 130 ------------------ 6 files changed, 297 deletions(-) delete mode 100644 package/kernel/rtl88x2bu/Makefile delete mode 100644 package/kernel/rtl88x2bu/patches/001-use-kernel-byteorder.patch delete mode 100644 package/kernel/rtl88x2bu/patches/002-use-kernel-wireless-header.patch delete mode 100644 package/kernel/rtl88x2bu/patches/010-remove-repeat-flies.patch delete mode 100644 package/kernel/rtl88x2bu/patches/020-change-value-of-vht-enable-and-usb-mode.patch delete mode 100644 package/kernel/rtl88x2bu/patches/030-wireless-5.8.patch diff --git a/package/kernel/rtl88x2bu/Makefile b/package/kernel/rtl88x2bu/Makefile deleted file mode 100644 index 66b02485d5..0000000000 --- a/package/kernel/rtl88x2bu/Makefile +++ /dev/null @@ -1,62 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only -# -# Copyright (C) 2021-2022 ImmortalWrt.org - -include $(TOPDIR)/rules.mk - -PKG_NAME:=rtl88x2bu -PKG_RELEASE:=1 - -PKG_SOURCE_URL:=https://github.com/morrownr/88x2bu-20210702.git -PKG_SOURCE_PROTO:=git -PKG_SOURCE_DATE:=2022-12-21 -PKG_SOURCE_VERSION:=46e266521462a0cc40379debaa77c5fcc0bec258 -PKG_MIRROR_HASH:=bf662d5e1904e49854ea40842168b80b6c36e9a47d0763f9e77bc1080a21c25d - -PKG_LICENSE:=GPL-2.0-only -PKG_LICENSE_FILES:=LICENSE - -PKG_BUILD_PARALLEL:=1 - -STAMP_CONFIGURED_DEPENDS := $(STAGING_DIR)/usr/include/mac80211-backport/backport/autoconf.h - -include $(INCLUDE_DIR)/kernel.mk -include $(INCLUDE_DIR)/package.mk - -define KernelPackage/rtl88x2bu - SUBMENU:=Wireless Drivers - TITLE:=Realtek 8812BU/8822BU support - DEPENDS:=+kmod-cfg80211 +kmod-usb-core +@DRIVER_11AC_SUPPORT - FILES:=$(PKG_BUILD_DIR)/rtl88x2bu.ko - AUTOLOAD:=$(call AutoProbe,rtl88x2bu) - PROVIDES:=kmod-rtl88x2bu -endef - -NOSTDINC_FLAGS:= \ - $(KERNEL_NOSTDINC_FLAGS) \ - -I$(PKG_BUILD_DIR) \ - -I$(PKG_BUILD_DIR)/include \ - -I$(STAGING_DIR)/usr/include/mac80211-backport \ - -I$(STAGING_DIR)/usr/include/mac80211-backport/uapi \ - -I$(STAGING_DIR)/usr/include/mac80211 \ - -I$(STAGING_DIR)/usr/include/mac80211/uapi \ - -include backport/autoconf.h \ - -include backport/backport.h - -NOSTDINC_FLAGS+= \ - -DRTW_SINGLE_WIPHY \ - -DRTW_USE_CFG80211_STA_EVENT \ - -DCONFIG_IOCTL_CFG80211 \ - -DCONFIG_CONCURRENT_MODE \ - -DBUILD_OPENWRT - -define Build/Compile - +$(KERNEL_MAKE) $(PKG_JOBS) \ - M="$(PKG_BUILD_DIR)" \ - NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \ - CONFIG_RTL8822BU=m \ - USER_MODULE_NAME=rtl88x2bu \ - modules -endef - -$(eval $(call KernelPackage,rtl88x2bu)) diff --git a/package/kernel/rtl88x2bu/patches/001-use-kernel-byteorder.patch b/package/kernel/rtl88x2bu/patches/001-use-kernel-byteorder.patch deleted file mode 100644 index e75a278339..0000000000 --- a/package/kernel/rtl88x2bu/patches/001-use-kernel-byteorder.patch +++ /dev/null @@ -1,15 +0,0 @@ -Fix compile problem when rtw_byteorder.h and asm/byteorder.h gets -included in addition for example indirectly, do not use realtek own copy -of the byteorder headers. - ---- a/include/drv_types.h -+++ b/include/drv_types.h -@@ -25,7 +25,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #include diff --git a/package/kernel/rtl88x2bu/patches/002-use-kernel-wireless-header.patch b/package/kernel/rtl88x2bu/patches/002-use-kernel-wireless-header.patch deleted file mode 100644 index c2c293ac97..0000000000 --- a/package/kernel/rtl88x2bu/patches/002-use-kernel-wireless-header.patch +++ /dev/null @@ -1,31 +0,0 @@ -Fix wireless.h to use linux kernel header files -including uapi version of wireless.h - ---- a/include/linux/wireless.h -+++ b/include/linux/wireless.h -@@ -18,16 +18,17 @@ - - /***************************** INCLUDES *****************************/ - --#if 0 -+#if 1 - #include /* for __u* and __s* typedefs */ - #include /* for "struct sockaddr" et al */ - #include /* for IFNAMSIZ and co... */ -+ #include -+ #include - #else - #define __user - /* typedef uint16_t __u16; */ - #include /* for "struct sockaddr" et al */ - #include /* for IFNAMSIZ and co... */ --#endif - - /****************************** TYPES ******************************/ - #ifdef CONFIG_COMPAT -@@ -84,4 +85,5 @@ struct iwreq { - union iwreq_data u; - }; - -+#endif - #endif /* _LINUX_WIRELESS_H */ diff --git a/package/kernel/rtl88x2bu/patches/010-remove-repeat-flies.patch b/package/kernel/rtl88x2bu/patches/010-remove-repeat-flies.patch deleted file mode 100644 index 67cfa1d87a..0000000000 --- a/package/kernel/rtl88x2bu/patches/010-remove-repeat-flies.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 9b2b0ec1bc2d31ddf93ed74d63fdfa6044e329a4 Mon Sep 17 00:00:00 2001 -From: Ben Greear -Date: Fri, 9 Nov 2018 16:21:43 -0800 -Subject: [PATCH] Fix build against openwrt backports tree. - -Like breaks builds elsewhere, can fix it up later. - -Signed-off-by: Ben Greear ---- - include/drv_conf.h | 4 +++- - .../{wireless.h => old_unused_rtl_wireless.h} | 0 - include/{autoconf.h => rtl_autoconf.h} | 0 - 3 files changed, 3 insertions(+), 1 deletions(-) - rename include/linux/{wireless.h => old_unused_rtl_wireless.h} (100%) - rename include/{autoconf.h => rtl_autoconf.h} (100%) - -diff --git a/include/drv_conf.h b/include/drv_conf.h -index 0d20a7e..f0a9f88 100644 ---- a/include/drv_conf.h -+++ b/include/drv_conf.h -@@ -14,7 +14,9 @@ - *****************************************************************************/ - #ifndef __DRV_CONF_H__ - #define __DRV_CONF_H__ --#include "autoconf.h" -+ -+#include -+#include "rtl_autoconf.h" - #include "hal_ic_cfg.h" - - #define CONFIG_RSSI_PRIORITY -diff --git a/include/linux/wireless.h b/include/linux/old_unused_rtl_wireless.h -similarity index 100% -rename from include/linux/wireless.h -rename to include/linux/old_unused_rtl_wireless.h -diff --git a/include/autoconf.h b/include/rtl_autoconf.h -similarity index 100% -rename from include/autoconf.h -rename to include/rtl_autoconf.h diff --git a/package/kernel/rtl88x2bu/patches/020-change-value-of-vht-enable-and-usb-mode.patch b/package/kernel/rtl88x2bu/patches/020-change-value-of-vht-enable-and-usb-mode.patch deleted file mode 100644 index 29051db730..0000000000 --- a/package/kernel/rtl88x2bu/patches/020-change-value-of-vht-enable-and-usb-mode.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/os_dep/linux/os_intfs.c -+++ b/os_dep/linux/os_intfs.c -@@ -317,7 +317,7 @@ int rtw_bfee_rf_number = 0; /*Beamformee - #endif /* CONFIG_80211N_HT */ - - #ifdef CONFIG_80211AC_VHT --int rtw_vht_enable = 1; /* 0:disable, 1:enable, 2:force auto enable */ -+int rtw_vht_enable = 2; /* 0:disable, 1:enable, 2:force auto enable */ - module_param(rtw_vht_enable, int, 0644); - - int rtw_vht_24g_enable = 1; /* 0:disable, 1:enable */ -@@ -415,7 +415,7 @@ int rtw_drv_ant_band_switch = 1; /* 0:OF - int rtw_single_ant_path; /*0:main ant , 1:aux ant , Fixed single antenna path, default main ant*/ - - /* 0: doesn't switch, 1: switch from usb2.0 to usb 3.0 2: switch from usb3.0 to usb 2.0 */ --int rtw_switch_usb_mode = 0; -+int rtw_switch_usb_mode = 1; - - #ifdef CONFIG_USB_AUTOSUSPEND - int rtw_enusbss = 1;/* 0:disable,1:enable */ diff --git a/package/kernel/rtl88x2bu/patches/030-wireless-5.8.patch b/package/kernel/rtl88x2bu/patches/030-wireless-5.8.patch deleted file mode 100644 index d6928d3404..0000000000 --- a/package/kernel/rtl88x2bu/patches/030-wireless-5.8.patch +++ /dev/null @@ -1,130 +0,0 @@ ---- a/os_dep/linux/ioctl_cfg80211.c -+++ b/os_dep/linux/ioctl_cfg80211.c -@@ -454,7 +454,7 @@ u8 rtw_cfg80211_ch_switch_notify(_adapte - - #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0)) - if (started) { --#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 11, 0) || defined(RHEL8)) -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 11, 0) || defined(RHEL8) || defined(BUILD_OPENWRT)) - - /* --- cfg80211_ch_switch_started_notfiy() --- - * A new parameter, bool quiet, is added from Linux kernel v5.11, -@@ -464,7 +464,7 @@ u8 rtw_cfg80211_ch_switch_notify(_adapte - * called by others with block-tx. - */ - --#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)) -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) || defined(BUILD_OPENWRT)) - cfg80211_ch_switch_started_notify(adapter->pnetdev, &chdef, 0, 0, false); - #else - cfg80211_ch_switch_started_notify(adapter->pnetdev, &chdef, 0, false); -@@ -479,7 +479,7 @@ u8 rtw_cfg80211_ch_switch_notify(_adapte - if (!rtw_cfg80211_allow_ch_switch_notify(adapter)) - goto exit; - --#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)) -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2) || defined(BUILD_OPENWRT)) - cfg80211_ch_switch_notify(adapter->pnetdev, &chdef, 0); - #else - cfg80211_ch_switch_notify(adapter->pnetdev, &chdef); -@@ -498,7 +498,7 @@ u8 rtw_cfg80211_ch_switch_notify(_adapte - } - - ctype = rtw_chbw_to_nl80211_channel_type(ch, bw, offset, ht); --#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)) -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2) || defined(BUILD_OPENWRT)) - cfg80211_ch_switch_notify(adapter->pnetdev, freq, ctype, 0); - #else - cfg80211_ch_switch_notify(adapter->pnetdev, freq, ctype); -@@ -1151,7 +1151,7 @@ check_bss: - #endif - - #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0) --#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0)) -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0) || defined(BUILD_OPENWRT)) - roam_info.links[0].bssid = cur_network->network.MacAddress; - #else - roam_info.bssid = cur_network->network.MacAddress; -@@ -1915,7 +1915,7 @@ exit: - } - - static int cfg80211_rtw_add_key(struct wiphy *wiphy, struct net_device *ndev --#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)) -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) || defined(BUILD_OPENWRT)) - , int link_id - #endif - , u8 key_index -@@ -2080,7 +2080,7 @@ addkey_end: - } - - static int cfg80211_rtw_get_key(struct wiphy *wiphy, struct net_device *ndev --#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)) -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) || defined(BUILD_OPENWRT)) - , int link_id - #endif - , u8 keyid -@@ -2271,7 +2271,7 @@ exit: - } - - static int cfg80211_rtw_del_key(struct wiphy *wiphy, struct net_device *ndev, --#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)) -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) || defined(BUILD_OPENWRT)) - int link_id, - #endif - #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE) -@@ -2295,7 +2295,7 @@ static int cfg80211_rtw_del_key(struct w - - static int cfg80211_rtw_set_default_key(struct wiphy *wiphy, - struct net_device *ndev, --#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)) -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) || defined(BUILD_OPENWRT)) - int link_id, - #endif - u8 key_index -@@ -2347,7 +2347,7 @@ static int cfg80211_rtw_set_default_key( - #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30)) - int cfg80211_rtw_set_default_mgmt_key(struct wiphy *wiphy, - struct net_device *ndev, --#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)) -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) || defined(BUILD_OPENWRT)) - int link_id, - #endif - u8 key_index) -@@ -5408,7 +5408,7 @@ static int cfg80211_rtw_change_beacon(st - return ret; - } - --#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)) -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2) || defined(BUILD_OPENWRT)) - static int cfg80211_rtw_stop_ap(struct wiphy *wiphy, struct net_device *ndev, - unsigned int link_id) - #else -@@ -6789,7 +6789,7 @@ exit: - - #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)) - static int cfg80211_rtw_get_channel(struct wiphy *wiphy, --#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)) -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2) || defined(BUILD_OPENWRT)) - struct wireless_dev *wdev, unsigned int link_id, - #else - struct wireless_dev *wdev, -@@ -10728,7 +10728,7 @@ void rtw_wdev_unregister(struct wireless - rtw_cfg80211_indicate_scan_done(adapter, _TRUE); - - #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0)) || defined(COMPAT_KERNEL_RELEASE) -- #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)) -+ #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2) || defined(BUILD_OPENWRT)) - if (wdev->links[0].client.current_bss) { - #else - if (wdev->current_bss) { ---- a/os_dep/linux/os_intfs.c -+++ b/os_dep/linux/os_intfs.c -@@ -2157,7 +2157,7 @@ int rtw_os_ndev_register(_adapter *adapt - #if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)) - netif_napi_add_weight(ndev, &adapter->napi, rtw_recv_napi_poll, RTL_NAPI_WEIGHT); - #else -- netif_napi_add(ndev, &adapter->napi, rtw_recv_napi_poll, RTL_NAPI_WEIGHT); -+ netif_napi_add(ndev, &adapter->napi, rtw_recv_napi_poll); - #endif - #endif /* CONFIG_RTW_NAPI */ -