rtl8188eu: fix build with kernel 6.18
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=rtl8188eu
|
||||
PKG_RELEASE:=2
|
||||
PKG_RELEASE:=3
|
||||
|
||||
PKG_SOURCE_URL:=https://github.com/aircrack-ng/rtl8188eus.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
|
||||
@@ -9,6 +9,15 @@
|
||||
#EXTRA_CFLAGS += -Wno-discarded-qualifiers
|
||||
EXTRA_CFLAGS += -Wno-uninitialized
|
||||
EXTRA_CFLAGS += -Wno-sometimes-uninitialized
|
||||
@@ -1958,6 +1960,8 @@ endif
|
||||
|
||||
endif
|
||||
|
||||
+ccflags-y += $(EXTRA_CFLAGS)
|
||||
+
|
||||
ifeq ($(CONFIG_MULTIDRV), y)
|
||||
|
||||
ifeq ($(CONFIG_SDIO_HCI), y)
|
||||
--- a/hal/phydm/phydm_phystatus.c
|
||||
+++ b/hal/phydm/phydm_phystatus.c
|
||||
@@ -1710,7 +1710,7 @@ phydm_process_rssi_for_dm(
|
||||
@@ -29,6 +38,31 @@
|
||||
sta->rssi_stat.ofdm_pkt_cnt -= (u8)((sta->rssi_stat.packet_map >> i) & BIT(0));
|
||||
sta->rssi_stat.packet_map = sta->rssi_stat.packet_map << 1;
|
||||
}
|
||||
--- a/include/osdep_service_linux.h
|
||||
+++ b/include/osdep_service_linux.h
|
||||
@@ -355,7 +355,9 @@ static inline void timer_hdl(struct time
|
||||
static inline void timer_hdl(unsigned long cntx)
|
||||
#endif
|
||||
{
|
||||
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0))
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 16, 0)) || defined(BUILD_OPENWRT)
|
||||
+ _timer *ptimer = timer_container_of(ptimer, in_timer, timer);
|
||||
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0))
|
||||
_timer *ptimer = from_timer(ptimer, in_timer, timer);
|
||||
#else
|
||||
_timer *ptimer = (_timer *)cntx;
|
||||
@@ -385,7 +387,11 @@ __inline static void _set_timer(_timer *
|
||||
|
||||
__inline static void _cancel_timer(_timer *ptimer, u8 *bcancelled)
|
||||
{
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)) || defined(BUILD_OPENWRT)
|
||||
+ *bcancelled = timer_delete_sync(&ptimer->timer) == 1 ? 1 : 0;
|
||||
+#else
|
||||
*bcancelled = del_timer_sync(&ptimer->timer) == 1 ? 1 : 0;
|
||||
+#endif
|
||||
}
|
||||
|
||||
static inline void _init_workitem(_workitem *pwork, void *pfunc, void *cntx)
|
||||
--- a/include/wlan_bssdef.h
|
||||
+++ b/include/wlan_bssdef.h
|
||||
@@ -95,7 +95,7 @@ typedef struct _NDIS_802_11_FIXED_IEs {
|
||||
|
||||
Reference in New Issue
Block a user