rtl88x2bu: bump to latest git HEAD

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit 9ecd98c35f6a18af306de9e5738d8dec11196251)
This commit is contained in:
Tianling Shen 2022-12-27 14:18:51 +08:00
parent b84317664f
commit 7b5adca44d
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
4 changed files with 58 additions and 38 deletions

View File

@ -1,23 +1,19 @@
# SPDX-License-Identifier: GPL-2.0-only
#
# Copyright (C) 2021 ImmortalWrt
# <https://immortalwrt.org>
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# Copyright (C) 2021-2022 ImmortalWrt.org
include $(TOPDIR)/rules.mk
PKG_NAME:=rtl88x2bu
PKG_RELEASE:=1
PKG_SOURCE_URL:=https://github.com/morrownr/88x2bu.git
PKG_SOURCE_URL:=https://github.com/morrownr/88x2bu-20210702.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_DATE:=2021-11-09
PKG_SOURCE_VERSION:=47a666315d0a5ff37b53adb48ca21404787565cf
PKG_MIRROR_HASH:=454449d0d11dec7cfc4196899ddbb6cd4851dcc767b7f40e293820952a12b024
PKG_SOURCE_DATE:=2022-12-21
PKG_SOURCE_VERSION:=46e266521462a0cc40379debaa77c5fcc0bec258
PKG_MIRROR_HASH:=bf662d5e1904e49854ea40842168b80b6c36e9a47d0763f9e77bc1080a21c25d
PKG_LICENSE:=GPL-2.0
PKG_LICENSE:=GPL-2.0-only
PKG_LICENSE_FILES:=LICENSE
PKG_BUILD_PARALLEL:=1
@ -36,7 +32,8 @@ define KernelPackage/rtl88x2bu
PROVIDES:=kmod-rtl88x2bu
endef
NOSTDINC_FLAGS = \
NOSTDINC_FLAGS:= \
$(KERNEL_NOSTDINC_FLAGS) \
-I$(PKG_BUILD_DIR) \
-I$(PKG_BUILD_DIR)/include \
-I$(STAGING_DIR)/usr/include/mac80211-backport \
@ -46,27 +43,19 @@ NOSTDINC_FLAGS = \
-include backport/autoconf.h \
-include backport/backport.h
EXTRA_CFLAGS:= \
NOSTDINC_FLAGS+= \
-DRTW_SINGLE_WIPHY \
-DRTW_USE_CFG80211_STA_EVENT \
-DCONFIG_IOCTL_CFG80211 \
-DCONFIG_CONCURRENT_MODE \
-DBUILD_OPENWRT
EXTRA_KCONFIG:= \
CONFIG_RTL8822BU=m \
USER_MODULE_NAME=rtl88x2bu
MAKE_OPTS:= \
$(KERNEL_MAKE_FLAGS) \
M="$(PKG_BUILD_DIR)" \
NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \
USER_EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
$(EXTRA_KCONFIG)
define Build/Compile
+$(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" \
$(MAKE_OPTS) \
+$(KERNEL_MAKE) $(PKG_JOBS) \
M="$(PKG_BUILD_DIR)" \
NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \
CONFIG_RTL8822BU=m \
USER_MODULE_NAME=rtl88x2bu \
modules
endef

View File

@ -0,0 +1,31 @@
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,6 +1,6 @@
--- a/os_dep/linux/os_intfs.c
+++ b/os_dep/linux/os_intfs.c
@@ -309,7 +309,7 @@ int rtw_bfee_rf_number = 0; /*BeamformeeCapRfNum Rf path number, 0 for auto, ot
@@ -317,7 +317,7 @@ int rtw_bfee_rf_number = 0; /*Beamformee
#endif /* CONFIG_80211N_HT */
#ifdef CONFIG_80211AC_VHT
@ -8,8 +8,8 @@
+int rtw_vht_enable = 2; /* 0:disable, 1:enable, 2:force auto enable */
module_param(rtw_vht_enable, int, 0644);
int rtw_ampdu_factor = 7;
@@ -392,7 +392,7 @@ int rtw_drv_ant_band_switch = 1; /* 0:OFF , 1:ON, Driver control antenna band sw
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 */

View File

@ -1,29 +1,29 @@
--- a/os_dep/linux/ioctl_cfg80211.c
+++ b/os_dep/linux/ioctl_cfg80211.c
@@ -437,7 +437,7 @@ u8 rtw_cfg80211_ch_switch_notify(_adapter *adapter, u8 ch, u8 bw, u8 offset,
@@ -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))
+ #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 11, 0)) || defined(BUILD_OPENWRT)
-#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,
@@ -7808,7 +7808,7 @@ exit:
@@ -8331,7 +8331,7 @@ exit:
return ret;
}
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 8, 0))
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 8, 0)) && !defined(BUILD_OPENWRT)
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 8, 0) && !defined(RHEL8))
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 8, 0) && !defined(RHEL8) && !defined(BUILD_OPENWRT))
static void cfg80211_rtw_mgmt_frame_register(struct wiphy *wiphy,
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0))
struct wireless_dev *wdev,
@@ -10286,7 +10286,7 @@ static struct cfg80211_ops rtw_cfg80211_ops = {
@@ -10509,7 +10509,7 @@ static struct cfg80211_ops rtw_cfg80211_
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE)
.mgmt_tx = cfg80211_rtw_mgmt_tx,
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 8, 0))
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 8, 0)) && !defined(BUILD_OPENWRT)
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 8, 0) && !defined(RHEL8))
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 8, 0) && !defined(RHEL8) && !defined(BUILD_OPENWRT))
.mgmt_frame_register = cfg80211_rtw_mgmt_frame_register,
#else
.update_mgmt_frame_registrations = cfg80211_rtw_update_mgmt_frame_register,