rtl8192eu: bump to latest git HEAD
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
parent
5a12ff85ff
commit
90a7dced2a
@ -1,6 +1,6 @@
|
|||||||
# SPDX-License-Identifier: GPL-2.0-only
|
# SPDX-License-Identifier: GPL-2.0-only
|
||||||
#
|
#
|
||||||
# Copyright (C) 2021 ImmortalWrt.org
|
# Copyright (C) 2021-2022 ImmortalWrt.org
|
||||||
|
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
@ -9,9 +9,9 @@ PKG_RELEASE:=$(AUTORELEASE)
|
|||||||
|
|
||||||
PKG_SOURCE_URL:=https://github.com/Mange/rtl8192eu-linux-driver.git
|
PKG_SOURCE_URL:=https://github.com/Mange/rtl8192eu-linux-driver.git
|
||||||
PKG_SOURCE_PROTO:=git
|
PKG_SOURCE_PROTO:=git
|
||||||
PKG_SOURCE_DATE:=2021-10-23
|
PKG_SOURCE_DATE:=2022-12-26
|
||||||
PKG_SOURCE_VERSION:=744bbe52976e51895fce2c1d4075f97a98dca2b2
|
PKG_SOURCE_VERSION:=aeed529c77282cc0d8a2b6eb29186711e25555ce
|
||||||
PKG_MIRROR_HASH:=8624216a6dabfdfcde122b5f05da5cafae621a165c7b88c6f9cc6e451c000f58
|
PKG_MIRROR_HASH:=83a158ecdc9c1642d4fbad9647d6b6853067a91a25b499a1a7dd719b556ccbe5
|
||||||
|
|
||||||
PKG_BUILD_PARALLEL:=1
|
PKG_BUILD_PARALLEL:=1
|
||||||
|
|
||||||
@ -28,7 +28,7 @@ define KernelPackage/rtl8192eu
|
|||||||
AUTOLOAD:=$(call AutoProbe,rtl8192eu)
|
AUTOLOAD:=$(call AutoProbe,rtl8192eu)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
NOSTDINC_FLAGS = \
|
NOSTDINC_FLAGS:= \
|
||||||
-I$(PKG_BUILD_DIR) \
|
-I$(PKG_BUILD_DIR) \
|
||||||
-I$(PKG_BUILD_DIR)/include \
|
-I$(PKG_BUILD_DIR)/include \
|
||||||
-I$(STAGING_DIR)/usr/include/mac80211-backport \
|
-I$(STAGING_DIR)/usr/include/mac80211-backport \
|
||||||
@ -38,7 +38,7 @@ NOSTDINC_FLAGS = \
|
|||||||
-include backport/autoconf.h \
|
-include backport/autoconf.h \
|
||||||
-include backport/backport.h
|
-include backport/backport.h
|
||||||
|
|
||||||
EXTRA_CFLAGS:= \
|
NOSTDINC_FLAGS+= \
|
||||||
-DRTW_SINGLE_WIPHY \
|
-DRTW_SINGLE_WIPHY \
|
||||||
-DRTW_USE_CFG80211_STA_EVENT \
|
-DRTW_USE_CFG80211_STA_EVENT \
|
||||||
-DCONFIG_IOCTL_CFG80211 \
|
-DCONFIG_IOCTL_CFG80211 \
|
||||||
@ -46,25 +46,17 @@ EXTRA_CFLAGS:= \
|
|||||||
-DBUILD_OPENWRT
|
-DBUILD_OPENWRT
|
||||||
|
|
||||||
ifeq ($(CONFIG_BIG_ENDIAN),y)
|
ifeq ($(CONFIG_BIG_ENDIAN),y)
|
||||||
EXTRA_CFLAGS += -DCONFIG_BIG_ENDIAN
|
NOSTDINC_FLAGS += -DCONFIG_BIG_ENDIAN
|
||||||
else
|
else
|
||||||
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
|
NOSTDINC_FLAGS += -DCONFIG_LITTLE_ENDIAN
|
||||||
endif
|
endif
|
||||||
|
|
||||||
EXTRA_KCONFIG:= \
|
|
||||||
CONFIG_RTL8192EU=m \
|
|
||||||
USER_MODULE_NAME=rtl8192eu
|
|
||||||
|
|
||||||
MAKE_OPTS:= \
|
|
||||||
$(KERNEL_MAKE_FLAGS) \
|
|
||||||
M="$(PKG_BUILD_DIR)" \
|
|
||||||
NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \
|
|
||||||
USER_EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
|
|
||||||
$(EXTRA_KCONFIG)
|
|
||||||
|
|
||||||
define Build/Compile
|
define Build/Compile
|
||||||
+$(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" \
|
+$(KERNEL_MAKE) $(PKG_JOBS) \
|
||||||
$(MAKE_OPTS) \
|
M="$(PKG_BUILD_DIR)" \
|
||||||
|
NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \
|
||||||
|
CONFIG_RTL8192EU=m \
|
||||||
|
USER_MODULE_NAME=rtl8192eu \
|
||||||
modules
|
modules
|
||||||
endef
|
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 */
|
||||||
@ -27,8 +27,8 @@ index 0d20a7e..f0a9f88 100644
|
|||||||
+#include <generated/autoconf.h>
|
+#include <generated/autoconf.h>
|
||||||
+#include "rtl_autoconf.h"
|
+#include "rtl_autoconf.h"
|
||||||
#include "hal_ic_cfg.h"
|
#include "hal_ic_cfg.h"
|
||||||
#if defined(PLATFORM_LINUX) && defined (PLATFORM_WINDOWS)
|
|
||||||
|
|
||||||
|
#define CONFIG_RSSI_PRIORITY
|
||||||
diff --git a/include/linux/wireless.h b/include/linux/old_unused_rtl_wireless.h
|
diff --git a/include/linux/wireless.h b/include/linux/old_unused_rtl_wireless.h
|
||||||
similarity index 100%
|
similarity index 100%
|
||||||
rename from include/linux/wireless.h
|
rename from include/linux/wireless.h
|
||||||
|
|||||||
@ -1,29 +1,106 @@
|
|||||||
--- a/os_dep/linux/ioctl_cfg80211.c
|
--- a/os_dep/linux/ioctl_cfg80211.c
|
||||||
+++ b/os_dep/linux/ioctl_cfg80211.c
|
+++ b/os_dep/linux/ioctl_cfg80211.c
|
||||||
@@ -439,7 +439,7 @@ u8 rtw_cfg80211_ch_switch_notify(_adapte
|
@@ -439,9 +439,9 @@ u8 rtw_cfg80211_ch_switch_notify(_adapte
|
||||||
|
|
||||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0))
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0))
|
||||||
if (started) {
|
if (started) {
|
||||||
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 11, 0))
|
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
|
||||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 11, 0) || defined(BUILD_OPENWRT))
|
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) || defined(BUILD_OPENWRT))
|
||||||
|
cfg80211_ch_switch_started_notify(adapter->pnetdev, &chdef, 0, 0, false);
|
||||||
|
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 11, 0))
|
||||||
|
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 11, 0) || defined(BUILD_OPENWRT))
|
||||||
cfg80211_ch_switch_started_notify(adapter->pnetdev, &chdef, 0, false);
|
cfg80211_ch_switch_started_notify(adapter->pnetdev, &chdef, 0, false);
|
||||||
#else
|
#else
|
||||||
cfg80211_ch_switch_started_notify(adapter->pnetdev, &chdef, 0);
|
cfg80211_ch_switch_started_notify(adapter->pnetdev, &chdef, 0);
|
||||||
@@ -7456,7 +7456,7 @@ exit:
|
@@ -453,7 +453,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);
|
||||||
|
@@ -1129,7 +1129,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;
|
||||||
|
@@ -1695,7 +1695,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
|
||||||
|
@@ -1842,7 +1842,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
|
||||||
|
@@ -2010,7 +2010,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)
|
||||||
|
@@ -2034,7 +2034,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
|
||||||
|
@@ -2086,7 +2086,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)
|
||||||
|
@@ -5099,7 +5099,7 @@ static int cfg80211_rtw_change_beacon(st
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
-#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 8, 0)
|
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,19, 2))
|
||||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 8, 0) && !defined(BUILD_OPENWRT)
|
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,19, 2) || defined(BUILD_OPENWRT))
|
||||||
static void cfg80211_rtw_mgmt_frame_register(struct wiphy *wiphy,
|
static int cfg80211_rtw_stop_ap(struct wiphy *wiphy, struct net_device *ndev, unsigned int link_id)
|
||||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0))
|
|
||||||
struct wireless_dev *wdev,
|
|
||||||
@@ -9920,7 +9920,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)
|
|
||||||
.mgmt_frame_register = cfg80211_rtw_mgmt_frame_register,
|
|
||||||
#else
|
#else
|
||||||
.update_mgmt_frame_registrations = cfg80211_rtw_mgmt_frame_register,
|
static int cfg80211_rtw_stop_ap(struct wiphy *wiphy, struct net_device *ndev)
|
||||||
|
@@ -10160,7 +10160,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->connected) {
|
||||||
|
#else
|
||||||
|
if (wdev->current_bss) {
|
||||||
|
--- a/os_dep/linux/os_intfs.c
|
||||||
|
+++ b/os_dep/linux/os_intfs.c
|
||||||
|
@@ -1674,7 +1674,7 @@ int rtw_os_ndev_register(_adapter *adapt
|
||||||
|
|
||||||
|
#ifdef CONFIG_RTW_NAPI
|
||||||
|
netif_napi_add(ndev, &adapter->napi, rtw_recv_napi_poll
|
||||||
|
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(6, 1, 0))
|
||||||
|
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(6, 1, 0) && !defined(BUILD_OPENWRT))
|
||||||
|
, RTL_NAPI_WEIGHT
|
||||||
|
#endif
|
||||||
|
);
|
||||||
|
|||||||
@ -1,24 +0,0 @@
|
|||||||
--- a/include/ieee80211.h
|
|
||||||
+++ b/include/ieee80211.h
|
|
||||||
@@ -780,18 +780,18 @@ join_res:
|
|
||||||
#define PORT_FMT "%u"
|
|
||||||
#define PORT_ARG(x) ntohs(*((u16 *)(x)))
|
|
||||||
|
|
||||||
-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));
|
|
||||||
Loading…
Reference in New Issue
Block a user