rtl8188eu: bump to latest git HEAD
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
parent
9ecd98c35f
commit
57af11342b
@ -1,9 +1,6 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
# Copyright (C) 2021 ImmortalWrt
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
# Copyright (C) 2021-2022 ImmortalWrt.org
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
@ -12,9 +9,9 @@ PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PKG_SOURCE_URL:=https://github.com/aircrack-ng/rtl8188eus.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_DATE:=2022-03-20
|
||||
PKG_SOURCE_VERSION:=0958f294f90b49d6bad4972b14f90676e5d858d3
|
||||
PKG_MIRROR_HASH:=dead457e82a8b19a7fa66d7981c5f675e0d8d2d9d297aba5443c793822c22a8f
|
||||
PKG_SOURCE_DATE:=2022-12-19
|
||||
PKG_SOURCE_VERSION:=67be0af3736adc72fbf4f234c0d1d32afa8d5d06
|
||||
PKG_MIRROR_HASH:=384ed3451242746c5fd544f8f10badc52b8dcce792fdd4c661516b6abb2fc91b
|
||||
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
||||
@ -31,9 +28,10 @@ define KernelPackage/rtl8188eu
|
||||
AUTOLOAD:=$(call AutoProbe,rtl8188eu)
|
||||
endef
|
||||
|
||||
NOSTDINC_FLAGS = \
|
||||
NOSTDINC_FLAGS:= \
|
||||
-I$(PKG_BUILD_DIR) \
|
||||
-I$(PKG_BUILD_DIR)/include \
|
||||
-I$(PKG_BUILD_DIR)/platform \
|
||||
-I$(STAGING_DIR)/usr/include/mac80211-backport \
|
||||
-I$(STAGING_DIR)/usr/include/mac80211-backport/uapi \
|
||||
-I$(STAGING_DIR)/usr/include/mac80211 \
|
||||
@ -41,7 +39,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 \
|
||||
@ -49,25 +47,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_RTL8188EU=m \
|
||||
USER_MODULE_NAME=rtl8188eu
|
||||
|
||||
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_RTL8188EU=m \
|
||||
USER_MODULE_NAME=rtl8188eu \
|
||||
modules
|
||||
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 */
|
||||
@ -1,6 +1,6 @@
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -92,7 +92,7 @@ CONFIG_RTW_SDIO_PM_KEEP_POWER = y
|
||||
@@ -95,7 +95,7 @@ CONFIG_RTW_SDIO_PM_KEEP_POWER = y
|
||||
###################### MP HW TX MODE FOR VHT #######################
|
||||
CONFIG_MP_VHT_HW_TX_MODE = n
|
||||
###################### Platform Related #######################
|
||||
|
||||
@ -1,6 +1,100 @@
|
||||
--- a/include/ieee80211.h
|
||||
+++ b/include/ieee80211.h
|
||||
@@ -1529,7 +1529,7 @@ enum ieee80211_state {
|
||||
(((Addr[2]) & 0xff) == 0xff) && (((Addr[3]) & 0xff) == 0xff) && (((Addr[4]) & 0xff) == 0xff) && \
|
||||
(((Addr[5]) & 0xff) == 0xff))
|
||||
#else
|
||||
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 18, 00))
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 18, 00) && !defined(BUILD_OPENWRT))
|
||||
extern __inline int is_multicast_mac_addr(const u8 *addr)
|
||||
{
|
||||
return (addr[0] != 0xff) && (0x01 & addr[0]);
|
||||
--- a/os_dep/linux/ioctl_cfg80211.c
|
||||
+++ b/os_dep/linux/ioctl_cfg80211.c
|
||||
@@ -7094,7 +7094,7 @@ exit:
|
||||
@@ -417,7 +417,7 @@ u8 rtw_cfg80211_ch_switch_notify(_adapte
|
||||
if (ret != _SUCCESS)
|
||||
goto exit;
|
||||
|
||||
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 0))
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 0) || defined(BUILD_OPENWRT))
|
||||
cfg80211_ch_switch_notify(adapter->pnetdev, &chdef, 0);
|
||||
#else
|
||||
cfg80211_ch_switch_notify(adapter->pnetdev, &chdef);
|
||||
@@ -1103,7 +1103,7 @@ check_bss:
|
||||
#endif
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0) || defined(RHEL79))
|
||||
- #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;
|
||||
@@ -1660,6 +1660,9 @@ exit:
|
||||
}
|
||||
|
||||
static int cfg80211_rtw_add_key(struct wiphy *wiphy, struct net_device *ndev
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) || defined(BUILD_OPENWRT))
|
||||
+ , int link_id
|
||||
+#endif
|
||||
, u8 key_index
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE)
|
||||
, bool pairwise
|
||||
@@ -1804,6 +1807,9 @@ addkey_end:
|
||||
}
|
||||
|
||||
static int cfg80211_rtw_get_key(struct wiphy *wiphy, struct net_device *ndev
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) || defined(BUILD_OPENWRT))
|
||||
+ , int link_id
|
||||
+#endif
|
||||
, u8 keyid
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE)
|
||||
, bool pairwise
|
||||
@@ -1969,6 +1975,9 @@ exit:
|
||||
}
|
||||
|
||||
static int cfg80211_rtw_del_key(struct wiphy *wiphy, struct net_device *ndev,
|
||||
+#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)
|
||||
u8 key_index, bool pairwise, const u8 *mac_addr)
|
||||
#else /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) */
|
||||
@@ -1989,7 +1998,11 @@ 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,
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) || defined(BUILD_OPENWRT))
|
||||
+ int link_id,
|
||||
+#endif
|
||||
+ u8 key_index
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 38)) || defined(COMPAT_KERNEL_RELEASE)
|
||||
, bool unicast, bool multicast
|
||||
#endif
|
||||
@@ -2037,7 +2050,11 @@ 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,
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) || defined(BUILD_OPENWRT))
|
||||
+ int link_id,
|
||||
+#endif
|
||||
+ u8 key_index)
|
||||
{
|
||||
#define SET_DEF_KEY_PARAM_FMT " key_index=%d"
|
||||
#define SET_DEF_KEY_PARAM_ARG , key_index
|
||||
@@ -4884,7 +4901,7 @@ static int cfg80211_rtw_change_beacon(st
|
||||
return ret;
|
||||
}
|
||||
|
||||
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 0))
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 0) || defined(BUILD_OPENWRT))
|
||||
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)
|
||||
@@ -7106,7 +7123,7 @@ exit:
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -9,7 +103,7 @@
|
||||
static void cfg80211_rtw_update_mgmt_frame_register(struct wiphy *wiphy,
|
||||
struct wireless_dev *wdev,
|
||||
struct mgmt_frame_regs *upd)
|
||||
@@ -9430,7 +9430,7 @@ static struct cfg80211_ops rtw_cfg80211_
|
||||
@@ -9442,7 +9459,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,
|
||||
@ -18,3 +112,23 @@
|
||||
.update_mgmt_frame_registrations = cfg80211_rtw_update_mgmt_frame_register,
|
||||
#else
|
||||
.mgmt_frame_register = cfg80211_rtw_mgmt_frame_register,
|
||||
@@ -9646,7 +9663,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, 0))
|
||||
+ #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 0) || 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
|
||||
@@ -1618,7 +1618,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)
|
||||
|
||||
@ -1,24 +0,0 @@
|
||||
--- 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 static 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 static 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 static 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