mirror of
https://github.com/immortalwrt/immortalwrt
synced 2025-01-09 04:29:03 +08:00
rtl88x2bu: bump to latest git HEAD
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
parent
0760200edf
commit
9ecd98c35f
@ -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
|
||||
|
||||
|
@ -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 */
|
@ -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 */
|
||||
|
@ -1,29 +1,130 @@
|
||||
--- 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:
|
||||
@@ -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, 8, 0))
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 8, 0)) && !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 = {
|
||||
|
||||
#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)
|
||||
.mgmt_frame_register = cfg80211_rtw_mgmt_frame_register,
|
||||
-#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
|
||||
.update_mgmt_frame_registrations = cfg80211_rtw_update_mgmt_frame_register,
|
||||
@@ -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 */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user