rtl8192eu: bump to latest git HEAD

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit 90a7dced2a)
This commit is contained in:
Tianling Shen 2022-12-27 15:15:07 +08:00
parent 3fdd47d733
commit d2494642aa
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
4 changed files with 52 additions and 29 deletions

View File

@ -1,6 +1,6 @@
# SPDX-License-Identifier: GPL-2.0-only
#
# Copyright (C) 2021 ImmortalWrt.org
# Copyright (C) 2021-2022 ImmortalWrt.org
include $(TOPDIR)/rules.mk
@ -9,9 +9,9 @@ PKG_RELEASE:=$(AUTORELEASE)
PKG_SOURCE_URL:=https://github.com/Mange/rtl8192eu-linux-driver.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_DATE:=2021-10-23
PKG_SOURCE_VERSION:=744bbe52976e51895fce2c1d4075f97a98dca2b2
PKG_MIRROR_HASH:=8624216a6dabfdfcde122b5f05da5cafae621a165c7b88c6f9cc6e451c000f58
PKG_SOURCE_DATE:=2022-12-26
PKG_SOURCE_VERSION:=aeed529c77282cc0d8a2b6eb29186711e25555ce
PKG_MIRROR_HASH:=83a158ecdc9c1642d4fbad9647d6b6853067a91a25b499a1a7dd719b556ccbe5
PKG_BUILD_PARALLEL:=1
@ -28,7 +28,7 @@ define KernelPackage/rtl8192eu
AUTOLOAD:=$(call AutoProbe,rtl8192eu)
endef
NOSTDINC_FLAGS = \
NOSTDINC_FLAGS:= \
-I$(PKG_BUILD_DIR) \
-I$(PKG_BUILD_DIR)/include \
-I$(STAGING_DIR)/usr/include/mac80211-backport \
@ -38,7 +38,7 @@ 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 \
@ -46,25 +46,17 @@ EXTRA_CFLAGS:= \
-DBUILD_OPENWRT
ifeq ($(CONFIG_BIG_ENDIAN),y)
EXTRA_CFLAGS += -DCONFIG_BIG_ENDIAN
NOSTDINC_FLAGS += -DCONFIG_BIG_ENDIAN
else
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
NOSTDINC_FLAGS += -DCONFIG_LITTLE_ENDIAN
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
+$(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" \
$(MAKE_OPTS) \
+$(KERNEL_MAKE) $(PKG_JOBS) \
M="$(PKG_BUILD_DIR)" \
NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \
CONFIG_RTL8192EU=m \
USER_MODULE_NAME=rtl8192eu \
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

@ -27,8 +27,8 @@ index 0d20a7e..f0a9f88 100644
+#include <generated/autoconf.h>
+#include "rtl_autoconf.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
similarity index 100%
rename from include/linux/wireless.h

View File

@ -1,15 +1,15 @@
--- a/os_dep/linux/ioctl_cfg80211.c
+++ b/os_dep/linux/ioctl_cfg80211.c
@@ -439,7 +439,7 @@ u8 rtw_cfg80211_ch_switch_notify(_adapte
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0))
@@ -441,7 +441,7 @@ u8 rtw_cfg80211_ch_switch_notify(_adapte
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(6, 1, 0))
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);
#else
cfg80211_ch_switch_started_notify(adapter->pnetdev, &chdef, 0);
@@ -7456,7 +7456,7 @@ exit:
@@ -7486,7 +7486,7 @@ exit:
return ret;
}
@ -18,7 +18,7 @@
static void cfg80211_rtw_mgmt_frame_register(struct wiphy *wiphy,
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0))
struct wireless_dev *wdev,
@@ -9920,7 +9920,7 @@ static struct cfg80211_ops rtw_cfg80211_
@@ -9948,7 +9948,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,