mirror of
https://github.com/hanwckf/immortalwrt-mt798x.git
synced 2025-01-07 01:53:34 +08:00
rtl8192eu: add new package
Also removed obsolete packages. (cherry picked from commit de9c37bc1b00fce6a91b9f84375c1c07f67e8528)
This commit is contained in:
parent
e2b112672a
commit
a2d8d47ddb
@ -1,66 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2006-2018 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=rtl8192du
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/lwfinger/rtl8192du
|
||||
PKG_SOURCE_DATE:=2020-12-12
|
||||
PKG_SOURCE_VERSION:=331ec03d89d0c0ebe771c4011846f029f6af33d3
|
||||
PKG_MIRROR_HASH:=f0acb833dd51cde41b982be3d341356548c7454d33afecbd25b2e03dea6d53b0
|
||||
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_MAINTAINER:=Larry Finger <Larry.Finger@lwfinger.net>
|
||||
|
||||
STAMP_CONFIGURED_DEPENDS := $(STAGING_DIR)/usr/include/mac80211-backport/backport/autoconf.h
|
||||
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define KernelPackage/rtl8192du
|
||||
SUBMENU:=Wireless Drivers
|
||||
TITLE:=Realtek RTL8192DU support
|
||||
DEPENDS:=+kmod-cfg80211 +kmod-usb-core +@DRIVER_11N_SUPPORT
|
||||
FILES:= $(PKG_BUILD_DIR)/8192du.ko
|
||||
AUTOLOAD:=$(call AutoProbe,8192du)
|
||||
endef
|
||||
|
||||
define KernelPackage/rtl8192du/description
|
||||
Kernel modules for the Realtek 8192DU USB 802.11n wireless USB adapters
|
||||
endef
|
||||
|
||||
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 += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT -DCONFIG_CONCURRENT_MODE -DBUILD_OPENWRT
|
||||
|
||||
define Build/Compile
|
||||
+$(MAKE) $(PKG_JOBS) -C $(LINUX_DIR) \
|
||||
$(KERNEL_MAKE_FLAGS) \
|
||||
M="$(PKG_BUILD_DIR)" \
|
||||
NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \
|
||||
CONFIG_RTL8192DU=m \
|
||||
modules
|
||||
endef
|
||||
|
||||
define KernelPackage/rtl8192du/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/rtlwifi
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/rtl8192dufw.bin $(1)/lib/firmware/rtlwifi/
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/rtl8192dufw_wol.bin $(1)/lib/firmware/rtlwifi/
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,rtl8192du))
|
@ -1,14 +0,0 @@
|
||||
diff --git a/core/rtw_br_ext.c b/core/rtw_br_ext.c
|
||||
index 964b366..ec1c620 100644
|
||||
--- a/core/rtw_br_ext.c
|
||||
+++ b/core/rtw_br_ext.c
|
||||
@@ -51,6 +51,9 @@
|
||||
#include <linux/icmpv6.h>
|
||||
#include <net/ndisc.h>
|
||||
#include <net/checksum.h>
|
||||
+#ifndef _HAVE_ARCH_IPV6_CSUM
|
||||
+#include <net/ip6_checksum.h>
|
||||
+#endif
|
||||
#endif
|
||||
#endif
|
||||
|
74
package/kernel/rtl8192eu/Makefile
Normal file
74
package/kernel/rtl8192eu/Makefile
Normal file
@ -0,0 +1,74 @@
|
||||
#
|
||||
# Copyright (C) 2021 ImmortalWrt
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v3.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=rtl8192eu
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_URL:=https://github.com/Mange/rtl8192eu-linux-driver.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_DATE:=2021-05-12
|
||||
PKG_SOURCE_VERSION:=546419675335bb80d4548e22ccef915573a5a1e2
|
||||
PKG_MIRROR_HASH:=a425a934d973aad20bc51ab2d1131bb81d2c6ebab687a029310e78cf9c81c4f3
|
||||
|
||||
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/rtl8192eu
|
||||
SUBMENU:=Wireless Drivers
|
||||
TITLE:=Realtek RTL8192EU support
|
||||
DEPENDS:=+kmod-cfg80211 +kmod-usb-core +@DRIVER_11N_SUPPORT
|
||||
FILES:=$(PKG_BUILD_DIR)/rtl8192eu.ko
|
||||
AUTOLOAD:=$(call AutoProbe,rtl8192eu)
|
||||
endef
|
||||
|
||||
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
|
||||
|
||||
EXTRA_CFLAGS:= \
|
||||
-DRTW_SINGLE_WIPHY \
|
||||
-DRTW_USE_CFG80211_STA_EVENT \
|
||||
-DCONFIG_IOCTL_CFG80211 \
|
||||
-DCONFIG_CONCURRENT_MODE \
|
||||
-DBUILD_OPENWRT
|
||||
|
||||
ifeq ($(CONFIG_BIG_ENDIAN),y)
|
||||
EXTRA_CFLAGS += -DCONFIG_BIG_ENDIAN
|
||||
else
|
||||
EXTRA_CFLAGS += -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) \
|
||||
modules
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,rtl8192eu))
|
@ -0,0 +1,15 @@
|
||||
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>
|
@ -0,0 +1,11 @@
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -124,7 +124,7 @@ CONFIG_MP_VHT_HW_TX_MODE = n
|
||||
###################### Platform Related #######################
|
||||
CONFIG_PLATFORM_ARM_RPI = n
|
||||
CONFIG_PLATFORM_ARM_AARCH64 = n
|
||||
-CONFIG_PLATFORM_I386_PC = y
|
||||
+CONFIG_PLATFORM_I386_PC = n
|
||||
CONFIG_PLATFORM_ANDROID_X86 = n
|
||||
CONFIG_PLATFORM_ANDROID_INTEL_X86 = n
|
||||
CONFIG_PLATFORM_JB_X86 = n
|
@ -0,0 +1,39 @@
|
||||
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
|
@ -1,6 +1,6 @@
|
||||
--- a/os_dep/ioctl_cfg80211.c
|
||||
+++ b/os_dep/ioctl_cfg80211.c
|
||||
@@ -4941,7 +4941,7 @@ exit:
|
||||
--- a/os_dep/linux/ioctl_cfg80211.c
|
||||
+++ b/os_dep/linux/ioctl_cfg80211.c
|
||||
@@ -7484,7 +7484,7 @@ exit:
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -9,12 +9,12 @@
|
||||
static void cfg80211_rtw_mgmt_frame_register(struct wiphy *wiphy,
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0))
|
||||
struct wireless_dev *wdev,
|
||||
@@ -5355,7 +5355,7 @@ static struct cfg80211_ops rtw_cfg80211_ops = {
|
||||
@@ -9948,7 +9948,7 @@ static struct cfg80211_ops rtw_cfg80211_ops = {
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) || defined(COMPAT_KERNEL_RELEASE)
|
||||
#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,
|
||||
#endif
|
||||
#elif (LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,34) && LINUX_VERSION_CODE<=KERNEL_VERSION(2,6,35))
|
||||
#else
|
||||
.update_mgmt_frame_registrations = cfg80211_rtw_mgmt_frame_register,
|
Loading…
x
Reference in New Issue
Block a user