rtl88x2bu: remove outdated package

Use upstream kmod-rtw88-8822bu driver instead.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
Tianling Shen
2024-03-04 21:01:03 +08:00
parent 6842cc89e6
commit a6f0ac13f5
6 changed files with 0 additions and 316 deletions

View File

@@ -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:=2
PKG_SOURCE_URL:=https://github.com/morrownr/88x2bu-20210702.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_DATE:=2023-09-19
PKG_SOURCE_VERSION:=09f261779d8544dfda02b786867a543f53901f7e
PKG_MIRROR_HASH:=5eb03fa5cc9773b8a41b4538e6557c15334b6fa70737ffda6cf64603133d5296
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))

View File

@@ -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 <drv_conf.h>
#include <basic_types.h>
#include <osdep_service.h>
-#include <rtw_byteorder.h>
+#include <asm/byteorder.h>
#include <wlan_bssdef.h>
#include <wifi.h>
#include <ieee80211.h>

View File

@@ -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 <linux/types.h> /* for __u* and __s* typedefs */
#include <linux/socket.h> /* for "struct sockaddr" et al */
#include <linux/if.h> /* for IFNAMSIZ and co... */
+ #include <linux/wireless.h>
+ #include <uapi/linux/wireless.h>
#else
#define __user
/* typedef uint16_t __u16; */
#include <sys/socket.h> /* for "struct sockaddr" et al */
#include <net/if.h> /* for IFNAMSIZ and co... */
-#endif
/****************************** TYPES ******************************/
#ifdef CONFIG_COMPAT
@@ -84,4 +85,5 @@ struct iwreq {
union iwreq_data u;
};
+#endif
#endif /* _LINUX_WIRELESS_H */

View File

@@ -1,39 +0,0 @@
From 9b2b0ec1bc2d31ddf93ed74d63fdfa6044e329a4 Mon Sep 17 00:00:00 2001
From: Ben Greear <greearb@candelatech.com>
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 <greearb@candelatech.com>
---
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 <generated/autoconf.h>
+#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

View File

@@ -1,20 +0,0 @@
--- a/os_dep/linux/os_intfs.c
+++ b/os_dep/linux/os_intfs.c
@@ -326,7 +326,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 */
@@ -424,7 +424,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 */

View File

@@ -1,149 +0,0 @@
--- a/os_dep/linux/ioctl_cfg80211.c
+++ b/os_dep/linux/ioctl_cfg80211.c
@@ -464,8 +464,8 @@ u8 rtw_cfg80211_ch_switch_notify(_adapte
* called by others with block-tx.
*/
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) || defined(RHEL88))
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) || defined(RHEL88) || defined(BUILD_OPENWRT))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0) || defined(BUILD_OPENWRT))
cfg80211_ch_switch_started_notify(adapter->pnetdev, &chdef, 0, 0, false, 0);
#else
cfg80211_ch_switch_started_notify(adapter->pnetdev, &chdef, 0, 0, false);
@@ -483,8 +483,8 @@ 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) || defined(RHEL88))
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2) || defined(RHEL88) || defined(BUILD_OPENWRT))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0) || defined(BUILD_OPENWRT))
cfg80211_ch_switch_notify(adapter->pnetdev, &chdef, 0, 0);
#else
cfg80211_ch_switch_notify(adapter->pnetdev, &chdef, 0);
@@ -506,7 +506,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) || defined(RHEL88))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2) || defined(RHEL88) || defined(BUILD_OPENWRT))
cfg80211_ch_switch_notify(adapter->pnetdev, freq, ctype, 0);
#else
cfg80211_ch_switch_notify(adapter->pnetdev, freq, ctype);
@@ -1159,7 +1159,7 @@ check_bss:
#endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0) || defined(RHEL88))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0) || defined(RHEL88) || defined(BUILD_OPENWRT))
roam_info.links[0].bssid = cur_network->network.MacAddress;
#else
roam_info.bssid = cur_network->network.MacAddress;
@@ -1923,7 +1923,7 @@ exit:
}
static int cfg80211_rtw_add_key(struct wiphy *wiphy, struct net_device *ndev
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) || defined(RHEL88))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) || defined(RHEL88) || defined(BUILD_OPENWRT))
, int link_id
#endif
, u8 key_index
@@ -2088,7 +2088,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) || defined(RHEL88))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) || defined(RHEL88) || defined(BUILD_OPENWRT))
, int link_id
#endif
, u8 keyid
@@ -2279,7 +2279,7 @@ exit:
}
static int cfg80211_rtw_del_key(struct wiphy *wiphy, struct net_device *ndev,
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) || defined(RHEL88))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) || defined(RHEL88) || defined(BUILD_OPENWRT))
int link_id,
#endif
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE)
@@ -2303,7 +2303,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) || defined(RHEL88))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) || defined(RHEL88) || defined(BUILD_OPENWRT))
int link_id,
#endif
u8 key_index
@@ -2355,7 +2355,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) || defined(RHEL88))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) || defined(RHEL88) || defined(BUILD_OPENWRT))
int link_id,
#endif
u8 key_index)
@@ -5418,7 +5418,7 @@ static int cfg80211_rtw_change_beacon(st
return ret;
}
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2) || defined(RHEL88))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2) || defined(RHEL88) || defined(BUILD_OPENWRT))
static int cfg80211_rtw_stop_ap(struct wiphy *wiphy, struct net_device *ndev,
unsigned int link_id)
#else
@@ -6803,7 +6803,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) || defined(RHEL88))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2) || defined(RHEL88) || defined(BUILD_OPENWRT))
struct wireless_dev *wdev, unsigned int link_id,
#else
struct wireless_dev *wdev,
@@ -8448,7 +8448,7 @@ static int cfg80211_rtw_tdls_mgmt(struct
#else
u8 *peer,
#endif
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 5, 0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 5, 0) || defined(BUILD_OPENWRT))
int link_id,
#endif
u8 action_code,
@@ -10745,7 +10745,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) || defined(RHEL88))
+ #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2) || defined(RHEL88) || 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
@@ -2166,7 +2166,11 @@ int rtw_os_ndev_register(_adapter *adapt
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) || defined(RHEL88))
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
+#ifndef BUILD_OPENWRT
+ , RTL_NAPI_WEIGHT
+#endif
+ );
#endif
#endif /* CONFIG_RTW_NAPI */
--- a/os_dep/linux/wifi_regd.c
+++ b/os_dep/linux/wifi_regd.c
@@ -405,7 +405,7 @@ int rtw_regd_init(struct wiphy *wiphy)
wiphy->regulatory_flags &= ~REGULATORY_DISABLE_BEACON_HINTS;
#endif
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0)) && (LINUX_VERSION_CODE < KERNEL_VERSION(6, 1, 39))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0)) && (LINUX_VERSION_CODE < KERNEL_VERSION(6, 1, 39) && !defined(BUILD_OPENWRT))
wiphy->regulatory_flags |= REGULATORY_IGNORE_STALE_KICKOFF;
#endif