🗽 Sync 2024-03-04 08:49:09

This commit is contained in:
github-actions[bot] 2024-03-04 08:49:09 +08:00
parent 582064e1d4
commit bf9b44428c
17 changed files with 100 additions and 507 deletions

View File

@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=autocore
PKG_FLAGS:=nonshared
PKG_RELEASE:=81
PKG_RELEASE:=82
PKG_CONFIG_DEPENDS:= \
CONFIG_TARGET_bcm27xx \
@ -20,7 +20,7 @@ include $(INCLUDE_DIR)/target.mk
define Package/autocore
TITLE:=auto core loadbalance script.
DEPENDS:=@(aarch64||arm||i386||i686||x86_64) \
+TARGET_bcm27xx:bcm27xx-userland \
+TARGET_bcm27xx:bcm27xx-utils \
+TARGET_bcm53xx:nvram \
+TARGET_x86:ethtool \
+TARGET_x86:lm-sensors
@ -40,7 +40,7 @@ endif
$(INSTALL_DIR) $(1)/sbin
$(INSTALL_BIN) ./files/cpuinfo $(1)/sbin/
ifneq ($(filter ipq% mediatek%, $(TARGETID)),)
ifneq ($(filter ipq% mediatek% qualcommax%, $(TARGETID)),)
$(INSTALL_BIN) ./files/tempinfo $(1)/sbin/
endif

View File

@ -34,7 +34,7 @@ esac
case "$DISTRIB_TARGET" in
"bcm27xx"/*)
cpu_temp="$(vcgencmd measure_temp | awk -F '=' '{print $2}' | awk -F "'" '{print $1}')°C" ;;
"ipq40xx"/*|"ipq806x"/*|"ipq807x"/*|"mediatek"/*) ;;
"ipq40xx"/*|"ipq806x"/*|"mediatek"/*|"qualcommax"/*) ;;
"x86"/*)
if [ -n "$(uci -q get "wechatpush.config.server_host")" ]; then
cpu_temp="$(/usr/share/wechatpush/wechatpush soc)°C"

View File

@ -11,11 +11,11 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=fullconenat-nft
PKG_RELEASE:=4
PKG_RELEASE:=5
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/fullcone-nat-nftables/nft-fullcone.git
PKG_SOURCE_DATE:=2023-01-10
PKG_SOURCE_DATE:=2023-05-17
PKG_SOURCE_VERSION:=07d93b626ce5ea885cd16f9ab07fac3213c355d9
PKG_MIRROR_HASH:=skip

View File

@ -20,7 +20,7 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
START=99
START=51
USE_PROCD=1
PROG=/usr/bin/mosdns

View File

@ -6,8 +6,8 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=nftables
PKG_VERSION:=1.0.8
PKG_RELEASE:=9
PKG_VERSION:=1.0.9
PKG_RELEASE:=10
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://netfilter.org/projects/$(PKG_NAME)/files

View File

@ -5,15 +5,14 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=rtl8189es
PKG_RELEASE:=9
PKG_RELEASE:=10
PKG_SOURCE_URL:=https://github.com/jwrdegoede/rtl8189ES_linux.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_DATE:=2022-10-30
PKG_SOURCE_VERSION:=e58bd86c9d9408c648b1246a0dd76b16856ec172
PKG_SOURCE_DATE:=2023-07-09
PKG_SOURCE_VERSION:=05996691a5f3a61968a83f8b368454fd2c6885ca
PKG_MIRROR_HASH:=skip
PKG_MAINTAINER:=Hauke Mehrtens <hauke@hauke-m.de>
PKG_BUILD_PARALLEL:=1
STAMP_CONFIGURED_DEPENDS := $(STAGING_DIR)/usr/include/mac80211-backport/backport/autoconf.h

View File

@ -1,26 +1,15 @@
--- a/include/osdep_service_linux.h
+++ b/include/osdep_service_linux.h
@@ -220,7 +220,7 @@ typedef void *timer_hdl_context;
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
#endif
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0))
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0) && !defined(BUILD_OPENWRT))
/* Porting from linux kernel commits
48eab831ae8b9f7002a533fa4235eed63ea1f1a3
3f6cffb8604b537e3d7ea040d7f4368689638eaf
--- a/os_dep/linux/ioctl_cfg80211.c
+++ b/os_dep/linux/ioctl_cfg80211.c
@@ -438,7 +438,7 @@ u8 rtw_cfg80211_ch_switch_notify(_adapte
ret = rtw_chbw_to_cfg80211_chan_def(wiphy, &chdef, ch, bw, offset, ht);
if (ret != _SUCCESS)
goto exit;
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,19, 2))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,19, 2) || defined(BUILD_OPENWRT))
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,3, 0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,3, 0) || defined(BUILD_OPENWRT))
cfg80211_ch_switch_notify(adapter->pnetdev, &chdef, 0, 0);
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5,19, 2))
cfg80211_ch_switch_notify(adapter->pnetdev, &chdef, 0);
#else
cfg80211_ch_switch_notify(adapter->pnetdev, &chdef);
@@ -1112,7 +1112,7 @@ check_bss:
@@ -1114,7 +1114,7 @@ check_bss:
#endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
@ -29,7 +18,7 @@
roam_info.links[0].bssid = cur_network->network.MacAddress;
#else
roam_info.bssid = cur_network->network.MacAddress;
@@ -1679,7 +1679,7 @@ exit:
@@ -1681,7 +1681,7 @@ exit:
}
static int cfg80211_rtw_add_key(struct wiphy *wiphy, struct net_device *ndev
@ -38,7 +27,7 @@
,int link_id
#endif
, u8 key_index
@@ -1826,7 +1826,7 @@ addkey_end:
@@ -1828,7 +1828,7 @@ addkey_end:
}
static int cfg80211_rtw_get_key(struct wiphy *wiphy, struct net_device *ndev
@ -47,7 +36,7 @@
,int link_id
#endif
, u8 keyid
@@ -1994,7 +1994,7 @@ exit:
@@ -1996,7 +1996,7 @@ exit:
}
static int cfg80211_rtw_del_key(struct wiphy *wiphy, struct net_device *ndev,
@ -56,7 +45,7 @@
int link_id,
#endif
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE)
@@ -2018,7 +2018,7 @@ static int cfg80211_rtw_del_key(struct w
@@ -2020,7 +2020,7 @@ static int cfg80211_rtw_del_key(struct w
static int cfg80211_rtw_set_default_key(struct wiphy *wiphy,
struct net_device *ndev,
@ -65,7 +54,7 @@
int link_id,
#endif
u8 key_index
@@ -2070,7 +2070,7 @@ static int cfg80211_rtw_set_default_key(
@@ -2072,7 +2072,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,
@ -74,7 +63,7 @@
int link_id,
#endif
u8 key_index)
@@ -5158,7 +5158,7 @@ static int cfg80211_rtw_change_beacon(st
@@ -5160,7 +5160,7 @@ static int cfg80211_rtw_change_beacon(st
return ret;
}
@ -83,34 +72,7 @@
static int cfg80211_rtw_stop_ap(struct wiphy *wiphy, struct net_device *ndev, unsigned int link_id)
#else
static int cfg80211_rtw_stop_ap(struct wiphy *wiphy, struct net_device *ndev)
@@ -7609,7 +7609,7 @@ static void cfg80211_rtw_mgmt_frame_regi
#else
struct net_device *ndev,
#endif
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0) || defined(BUILD_OPENWRT))
struct mgmt_frame_regs *upd)
#else
u16 frame_type, bool reg)
@@ -7619,7 +7619,7 @@ static void cfg80211_rtw_mgmt_frame_regi
struct net_device *ndev = wdev_to_ndev(wdev);
#endif
_adapter *adapter;
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0) || defined(BUILD_OPENWRT))
u16 frame_type = BIT(upd->global_stypes << 4);
bool reg = false;
#endif
@@ -10047,7 +10047,7 @@ static struct cfg80211_ops rtw_cfg80211_
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34) && LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 35))
.action = cfg80211_rtw_mgmt_tx,
#endif
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0) || defined(BUILD_OPENWRT))
.update_mgmt_frame_registrations = cfg80211_rtw_mgmt_frame_register,
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE)
.mgmt_frame_register = cfg80211_rtw_mgmt_frame_register,
@@ -10261,7 +10261,7 @@ void rtw_wdev_unregister(struct wireless
@@ -10263,7 +10263,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)

View File

@ -1,67 +0,0 @@
# SDPX-License-Identifier: GPL-2.0-only
#
# Copyright (C) 2021-2022 ImmortalWrt.org
include $(TOPDIR)/rules.mk
PKG_NAME:=rtl8821cu
PKG_RELEASE:=32
PKG_SOURCE_URL:=https://github.com/brektrou/rtl8821CU.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_DATE:=2022-04-09
PKG_SOURCE_VERSION:=8c2226a74ae718439d56248bd2e44ccf717086d5
PKG_MIRROR_HASH:=skip
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/rtl8821cu
SUBMENU:=Wireless Drivers
TITLE:=Realtek RTL8811CU/RTL8821CU support
DEPENDS:=+kmod-cfg80211 +kmod-usb-core +@DRIVER_11AC_SUPPORT
FILES:=$(PKG_BUILD_DIR)/rtl8821cu.ko
AUTOLOAD:=$(call AutoProbe,rtl8821cu)
PROVIDES:=kmod-rtl8821cu
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
ifeq ($(BOARD),x86)
NOSTDINC_FLAGS+= -mhard-float
endif
define Build/Compile
+$(KERNEL_MAKE) $(PKG_JOBS) \
M="$(PKG_BUILD_DIR)" \
NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \
CONFIG_RTL8821CU=m \
$(if $(CONFIG_aarch64),CONFIG_MP_VHT_HW_TX_MODE=n) \
USER_MODULE_NAME=rtl8821cu \
modules
endef
$(eval $(call KernelPackage,rtl8821cu))

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"
#if defined(PLATFORM_LINUX) && defined (PLATFORM_WINDOWS)
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,11 +0,0 @@
--- a/os_dep/linux/os_intfs.c
+++ b/os_dep/linux/os_intfs.c
@@ -238,7 +238,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_ampdu_factor = 7;

View File

@ -1,54 +0,0 @@
--- a/os_dep/linux/ioctl_cfg80211.c
+++ b/os_dep/linux/ioctl_cfg80211.c
@@ -7149,7 +7149,7 @@ static void cfg80211_rtw_mgmt_frame_regi
#else
struct net_device *ndev,
#endif
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,8,0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,8,0)) || defined(BUILD_OPENWRT)
struct mgmt_frame_regs *upd)
#else
u16 frame_type, bool reg)
@@ -7178,7 +7178,7 @@ static void cfg80211_rtw_mgmt_frame_regi
/* Wait QC Verify */
return;
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,8,0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,8,0)) || defined(BUILD_OPENWRT)
SET_CFG80211_REPORT_MGMT(pwdev_priv, IEEE80211_STYPE_PROBE_REQ, upd->interface_stypes & BIT(IEEE80211_STYPE_PROBE_REQ >> 4));
#else
switch (frame_type) {
@@ -9467,7 +9467,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)
.update_mgmt_frame_registrations = cfg80211_rtw_mgmt_frame_register,
#else
.mgmt_frame_register = cfg80211_rtw_mgmt_frame_register,
--- a/os_dep/linux/os_intfs.c
+++ b/os_dep/linux/os_intfs.c
@@ -1306,6 +1306,14 @@ unsigned int rtw_classify8021d(struct sk
}
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,19,0))
+static u16 rtw_select_queue(struct net_device *dev, struct sk_buff *skb
+ , struct net_device *sb_dev
+ #if (LINUX_VERSION_CODE < KERNEL_VERSION(5,2,0))
+ , select_queue_fallback_t fallback
+ #endif
+)
+#else
static u16 rtw_select_queue(struct net_device *dev, struct sk_buff *skb
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 13, 0)
, void *accel_priv
@@ -1314,6 +1322,7 @@ static u16 rtw_select_queue(struct net_d
#endif
#endif
)
+#endif
{
_adapter *padapter = rtw_netdev_priv(dev);
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;

View File

@ -1,170 +0,0 @@
From ced770c458ec56e00c9a60e487292f9c83bb2bf4 Mon Sep 17 00:00:00 2001
From: Shiwei Zhang <ylxdzsw@gmail.com>
Date: Fri, 23 Dec 2022 14:27:38 +0800
Subject: [PATCH 3/3] fix for linux 6.1
---
os_dep/linux/ioctl_cfg80211.c | 14 +++++++-------
os_dep/linux/os_intfs.c | 2 +-
os_dep/osdep_service.c | 18 +++++++++---------
3 files changed, 17 insertions(+), 17 deletions(-)
--- a/include/ieee80211.h
+++ b/include/ieee80211.h
@@ -1529,18 +1529,18 @@ enum ieee80211_state {
(((Addr[2]) & 0xff) == 0xff) && (((Addr[3]) & 0xff) == 0xff) && (((Addr[4]) & 0xff) == 0xff) && \
(((Addr[5]) & 0xff) == 0xff))
#else
-extern __inline int is_multicast_mac_addr(const u8 *addr)
+__inline int is_multicast_mac_addr(const u8 *addr)
{
return (addr[0] != 0xff) && (0x01 & addr[0]);
}
-extern __inline int is_broadcast_mac_addr(const u8 *addr)
+__inline int is_broadcast_mac_addr(const u8 *addr)
{
return ((addr[0] == 0xff) && (addr[1] == 0xff) && (addr[2] == 0xff) && \
(addr[3] == 0xff) && (addr[4] == 0xff) && (addr[5] == 0xff));
}
-extern __inline int is_zero_mac_addr(const u8 *addr)
+__inline int is_zero_mac_addr(const u8 *addr)
{
return ((addr[0] == 0x00) && (addr[1] == 0x00) && (addr[2] == 0x00) && \
(addr[3] == 0x00) && (addr[4] == 0x00) && (addr[5] == 0x00));
--- a/os_dep/linux/ioctl_cfg80211.c
+++ b/os_dep/linux/ioctl_cfg80211.c
@@ -417,7 +417,7 @@ u8 rtw_cfg80211_ch_switch_notify(_adapte
if (ret != _SUCCESS)
goto exit;
- cfg80211_ch_switch_notify(adapter->pnetdev, &chdef);
+ cfg80211_ch_switch_notify(adapter->pnetdev, &chdef, 0);
#else
int freq = rtw_ch2freq(ch);
@@ -1085,7 +1085,7 @@ check_bss:
#endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
- roam_info.bssid = cur_network->network.MacAddress;
+ roam_info.links[0].bssid = cur_network->network.MacAddress;
roam_info.req_ie = pmlmepriv->assoc_req + sizeof(struct rtw_ieee80211_hdr_3addr) + 2;
roam_info.req_ie_len = pmlmepriv->assoc_req_len - sizeof(struct rtw_ieee80211_hdr_3addr) - 2;
roam_info.resp_ie = pmlmepriv->assoc_rsp + sizeof(struct rtw_ieee80211_hdr_3addr) + 6;
@@ -1635,8 +1635,8 @@ exit:
return ret;
}
-static int cfg80211_rtw_add_key(struct wiphy *wiphy, struct net_device *ndev
- , u8 key_index
+static int cfg80211_rtw_add_key(struct wiphy *wiphy, struct net_device *ndev,
+ int link_id, u8 key_index
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE)
, bool pairwise
#endif
@@ -1779,8 +1779,8 @@ addkey_end:
}
-static int cfg80211_rtw_get_key(struct wiphy *wiphy, struct net_device *ndev
- , u8 keyid
+static int cfg80211_rtw_get_key(struct wiphy *wiphy, struct net_device *ndev,
+ int link_id, u8 keyid
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE)
, bool pairwise
#endif
@@ -1944,7 +1944,7 @@ exit:
return ret;
}
-static int cfg80211_rtw_del_key(struct wiphy *wiphy, struct net_device *ndev,
+static int cfg80211_rtw_del_key(struct wiphy *wiphy, struct net_device *ndev, int link_id,
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE)
u8 key_index, bool pairwise, const u8 *mac_addr)
#else /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) */
@@ -1965,7 +1965,7 @@ static int cfg80211_rtw_del_key(struct w
}
static int cfg80211_rtw_set_default_key(struct wiphy *wiphy,
- struct net_device *ndev, u8 key_index
+ struct net_device *ndev, int link_id, u8 key_index
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 38)) || defined(COMPAT_KERNEL_RELEASE)
, bool unicast, bool multicast
#endif
@@ -2013,7 +2013,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, u8 key_index)
+ struct net_device *ndev, int link_id, u8 key_index)
{
#define SET_DEF_KEY_PARAM_FMT " key_index=%d"
#define SET_DEF_KEY_PARAM_ARG , key_index
@@ -4929,7 +4929,7 @@ static int cfg80211_rtw_change_beacon(st
return ret;
}
-static int cfg80211_rtw_stop_ap(struct wiphy *wiphy, struct net_device *ndev)
+static int cfg80211_rtw_stop_ap(struct wiphy *wiphy, struct net_device *ndev, unsigned int link_id)
{
_adapter *adapter = (_adapter *)rtw_netdev_priv(ndev);
@@ -9678,12 +9678,12 @@ 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 (wdev->current_bss) {
- RTW_INFO(FUNC_ADPT_FMT" clear current_bss by cfg80211_disconnected\n", FUNC_ADPT_ARG(adapter));
- rtw_cfg80211_indicate_disconnect(adapter, 0, 1);
- }
- #endif
+ // #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0)) || defined(COMPAT_KERNEL_RELEASE)
+ // if (wdev->current_bss) {
+ // RTW_INFO(FUNC_ADPT_FMT" clear current_bss by cfg80211_disconnected\n", FUNC_ADPT_ARG(adapter));
+ // rtw_cfg80211_indicate_disconnect(adapter, 0, 1);
+ // }
+ // #endif
if (pwdev_priv->pmon_ndev) {
RTW_INFO("%s, unregister monitor interface\n", __func__);
--- a/os_dep/linux/os_intfs.c
+++ b/os_dep/linux/os_intfs.c
@@ -1652,7 +1652,7 @@ int rtw_os_ndev_register(_adapter *adapt
u8 rtnl_lock_needed = rtw_rtnl_lock_needed(dvobj);
#ifdef CONFIG_RTW_NAPI
- netif_napi_add(ndev, &adapter->napi, rtw_recv_napi_poll, RTL_NAPI_WEIGHT);
+ netif_napi_add(ndev, &adapter->napi, rtw_recv_napi_poll);
#endif /* CONFIG_RTW_NAPI */
#if defined(CONFIG_IOCTL_CFG80211)
--- a/os_dep/osdep_service.c
+++ b/os_dep/osdep_service.c
@@ -2614,15 +2614,15 @@ u64 rtw_division64(u64 x, u64 y)
inline u32 rtw_random32(void)
{
#ifdef PLATFORM_LINUX
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0))
- return prandom_u32();
-#elif (LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 18))
- u32 random_int;
- get_random_bytes(&random_int , 4);
- return random_int;
-#else
- return random32();
-#endif
+// #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0))
+// return prandom_u32();
+// #elif (LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 18))
+// u32 random_int;
+// get_random_bytes(&random_int , 4);
+// return random_int;
+// #else
+ return get_random_u32();
+// #endif
#elif defined(PLATFORM_WINDOWS)
#error "to be implemented\n"
#elif defined(PLATFORM_FREEBSD)

View File

@ -5,12 +5,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=rtl88x2bu
PKG_RELEASE:=53
PKG_RELEASE:=54
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_SOURCE_DATE:=2023-09-19
PKG_SOURCE_VERSION:=09f261779d8544dfda02b786867a543f53901f7e
PKG_MIRROR_HASH:=skip
PKG_LICENSE:=GPL-2.0-only

View File

@ -1,6 +1,6 @@
--- 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
@@ -326,7 +326,7 @@ int rtw_bfee_rf_number = 0; /*Beamformee
#endif /* CONFIG_80211N_HT */
#ifdef CONFIG_80211AC_VHT
@ -9,7 +9,7 @@
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
@@ -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 */

View File

@ -1,130 +1,149 @@
--- 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
@@ -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))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) || defined(BUILD_OPENWRT))
cfg80211_ch_switch_started_notify(adapter->pnetdev, &chdef, 0, 0, false);
-#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, false);
@@ -479,7 +479,7 @@ u8 rtw_cfg80211_ch_switch_notify(_adapte
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))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2) || defined(BUILD_OPENWRT))
cfg80211_ch_switch_notify(adapter->pnetdev, &chdef, 0);
-#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);
@@ -498,7 +498,7 @@ u8 rtw_cfg80211_ch_switch_notify(_adapte
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))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2) || defined(BUILD_OPENWRT))
-#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);
@@ -1151,7 +1151,7 @@ check_bss:
@@ -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))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0) || defined(BUILD_OPENWRT))
-#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;
@@ -1915,7 +1915,7 @@ exit:
@@ -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))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) || defined(BUILD_OPENWRT))
-#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
@@ -2080,7 +2080,7 @@ addkey_end:
@@ -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))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) || defined(BUILD_OPENWRT))
-#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
@@ -2271,7 +2271,7 @@ exit:
@@ -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))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) || defined(BUILD_OPENWRT))
-#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)
@@ -2295,7 +2295,7 @@ static int cfg80211_rtw_del_key(struct w
@@ -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))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) || defined(BUILD_OPENWRT))
-#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
@@ -2347,7 +2347,7 @@ static int cfg80211_rtw_set_default_key(
@@ -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))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) || defined(BUILD_OPENWRT))
-#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)
@@ -5408,7 +5408,7 @@ static int cfg80211_rtw_change_beacon(st
@@ -5418,7 +5418,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))
-#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
@@ -6789,7 +6789,7 @@ exit:
@@ -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))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2) || defined(BUILD_OPENWRT))
-#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,
@@ -10728,7 +10728,7 @@ void rtw_wdev_unregister(struct wireless
@@ -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))
+ #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2) || defined(BUILD_OPENWRT))
- #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
@@ -2157,7 +2157,7 @@ int rtw_os_ndev_register(_adapter *adapt
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
@@ -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);
+ 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