mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-11-03 05:03:56 +08:00
🌴 Sync 2026-03-05 23:51:42
This commit is contained in:
1 parent
97c049ed0a
commit
0acff03804
14253 files changed
+3893239
No files matched your search
@@ -0,0 +1,62 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
# Copyright (C) 2021-2022 ImmortalWrt.org
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=rtl8189es
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_URL:=https://github.com/jwrdegoede/rtl8189ES_linux.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_DATE:=2025-09-27
|
||||
PKG_SOURCE_VERSION:=0a5d04114fac3c9f48a343cb905fbb6a3f9f5df5
|
||||
PKG_MIRROR_HASH:=skip
|
||||
|
||||
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/rtl8189es
|
||||
SUBMENU:=Wireless Drivers
|
||||
TITLE:=Realtek RTL8189ETV SDIO WiFi
|
||||
DEPENDS:=+kmod-cfg80211 +kmod-mmc
|
||||
FILES:=$(PKG_BUILD_DIR)/rtl8189es.ko
|
||||
AUTOLOAD:=$(call AutoProbe,rtl8189es)
|
||||
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 \
|
||||
-DBUILD_OPENWRT
|
||||
|
||||
define Build/Compile
|
||||
+$(KERNEL_MAKE) $(PKG_JOBS) \
|
||||
M="$(PKG_BUILD_DIR)" \
|
||||
NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \
|
||||
CONFIG_RTL8189ES=m \
|
||||
USER_MODULE_NAME=rtl8189es \
|
||||
modules
|
||||
endef
|
||||
|
||||
define KernelPackage/rtl8189es/install
|
||||
$(INSTALL_DIR) $(1)/etc/uci-defaults
|
||||
$(INSTALL_DATA) ./files/50_rtl-wifi $(1)/etc/uci-defaults/
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,rtl8189es))
|
||||
@@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
sed -i '/iw dev "$wdev" del/d' /lib/netifd/wireless/mac80211.sh
|
||||
ip link set dev wlan0 up
|
||||
|
||||
exit 0
|
||||
@@ -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 */
|
||||
@@ -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"
|
||||
|
||||
#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
|
||||
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
|
||||
@@ -0,0 +1,60 @@
|
||||
--- 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(6,3, 0)) && (LINUX_VERSION_CODE < KERNEL_VERSION(6, 9, 0))
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,3, 0)) && (LINUX_VERSION_CODE < KERNEL_VERSION(6, 9, 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);
|
||||
@@ -3253,7 +3253,7 @@ exit:
|
||||
return ret;
|
||||
}
|
||||
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,17,0)
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,17,0)) || defined(BUILD_OPENWRT)
|
||||
static int cfg80211_rtw_set_wiphy_params(struct wiphy *wiphy, int ifindex, u32 changed)
|
||||
#else
|
||||
static int cfg80211_rtw_set_wiphy_params(struct wiphy *wiphy, u32 changed)
|
||||
@@ -4165,7 +4165,7 @@ static int cfg80211_rtw_set_txpower(stru
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0))
|
||||
struct wireless_dev *wdev,
|
||||
#endif
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,17,0)
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,17,0)) || defined(BUILD_OPENWRT)
|
||||
int ifindex,
|
||||
#endif
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 36)) || defined(COMPAT_KERNEL_RELEASE)
|
||||
@@ -4230,10 +4230,10 @@ static int cfg80211_rtw_get_txpower(stru
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0))
|
||||
struct wireless_dev *wdev,
|
||||
#endif
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,17,0)
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,17,0)) || defined(BUILD_OPENWRT)
|
||||
int ifindex,
|
||||
#endif
|
||||
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 14, 0))
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 14, 0)) || defined(BUILD_OPENWRT)
|
||||
unsigned int link_id,
|
||||
#endif
|
||||
int *dbm)
|
||||
@@ -5161,7 +5161,7 @@ exit:
|
||||
return ret;
|
||||
}
|
||||
|
||||
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 7, 0))
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 7, 0)) || defined(BUILD_OPENWRT)
|
||||
static int cfg80211_rtw_change_beacon(struct wiphy *wiphy, struct net_device *ndev,
|
||||
struct cfg80211_ap_update *params)
|
||||
{
|
||||
@@ -6091,7 +6091,7 @@ static int cfg80211_rtw_set_channel(stru
|
||||
#endif /*#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 6, 0))*/
|
||||
|
||||
static int cfg80211_rtw_set_monitor_channel(struct wiphy *wiphy
|
||||
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 13, 0))
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 13, 0)) || defined(BUILD_OPENWRT)
|
||||
, struct net_device *dev
|
||||
, struct cfg80211_chan_def *chandef
|
||||
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0))
|
||||
Reference in new issue
Block a user