diff options
author | Arpan Kapoor | 2018-09-23 11:35:52 +0530 |
---|---|---|
committer | Arpan Kapoor | 2018-09-23 11:35:52 +0530 |
commit | 5d6bf311c4ade756e140e5cb0f8ba7c46a20acac (patch) | |
tree | 356e84b9fb488c3481f768427de5254863f6e0d3 | |
parent | a1a63b5a6609d304e1b5b0da1c0dd7930a02ac54 (diff) | |
download | aur-5d6bf311c4ade756e140e5cb0f8ba7c46a20acac.tar.gz |
Fix for timer_list changes in 4.15
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | PKGBUILD | 4 | ||||
-rw-r--r-- | linux-4.15.patch | 120 |
3 files changed, 126 insertions, 2 deletions
@@ -1,7 +1,7 @@ pkgbase = 8188eu-dkms pkgdesc = Driver for Realtek RTL8188EUS (RTL8188EUS, RTL8188ETV) WLAN pkgver = v4.3.0.8_13968 - pkgrel = 7 + pkgrel = 8 url = http://www.realtek.com.tw/ install = 8188eu-dkms.install arch = any @@ -17,6 +17,7 @@ pkgbase = 8188eu-dkms source = linux-4.3.patch source = linux-4.6.patch source = linux-4.11.patch + source = linux-4.15.patch source = no_debug.patch sha256sums = c5604632f88ab6c68074635c73403a3f612f9f69b52af8fe9b96cf851db7a832 sha256sums = edaeafe28410017fabb742d6ccdf060a945150fb56e41084adb7b9dd66739e2b @@ -28,6 +29,7 @@ pkgbase = 8188eu-dkms sha256sums = 146a8d3b931861538ee36908e28d8ad774d5de0916e01511f48d84827c59cd99 sha256sums = 936e1701b72e5ecb6b79eba722da0586cee9aabc323ddc5a69b2c07d885d1fa1 sha256sums = cd4f16d4a9f2eb6965e3721e6cd7aa70656a50aa2b139e0630342999bac0b2c2 + sha256sums = 18c1aeb9b574c1ecd689435908adbd006bb73f2a723f319e18f044b9c3a3f6dd sha256sums = 9b8453c15e39cf68ccc1a0d7dfb093439f89e3b2e7c40dd0fa8d0b8aa9956cdd pkgname = 8188eu-dkms @@ -3,7 +3,7 @@ _pkgname=8188eu pkgname="${_pkgname}-dkms" pkgver=v4.3.0.8_13968 -pkgrel=7 +pkgrel=8 pkgdesc='Driver for Realtek RTL8188EUS (RTL8188EUS, RTL8188ETV) WLAN' arch=('any') url='http://www.realtek.com.tw/' @@ -20,6 +20,7 @@ source=("https://www.dropbox.com/s/afs5d2yfgwurqm2/${_pkgname}-${pkgver}.tar.xz? linux-4.3.patch linux-4.6.patch linux-4.11.patch + linux-4.15.patch no_debug.patch) sha256sums=('c5604632f88ab6c68074635c73403a3f612f9f69b52af8fe9b96cf851db7a832' 'edaeafe28410017fabb742d6ccdf060a945150fb56e41084adb7b9dd66739e2b' @@ -31,6 +32,7 @@ sha256sums=('c5604632f88ab6c68074635c73403a3f612f9f69b52af8fe9b96cf851db7a832' '146a8d3b931861538ee36908e28d8ad774d5de0916e01511f48d84827c59cd99' '936e1701b72e5ecb6b79eba722da0586cee9aabc323ddc5a69b2c07d885d1fa1' 'cd4f16d4a9f2eb6965e3721e6cd7aa70656a50aa2b139e0630342999bac0b2c2' + '18c1aeb9b574c1ecd689435908adbd006bb73f2a723f319e18f044b9c3a3f6dd' '9b8453c15e39cf68ccc1a0d7dfb093439f89e3b2e7c40dd0fa8d0b8aa9956cdd') prepare() { diff --git a/linux-4.15.patch b/linux-4.15.patch new file mode 100644 index 000000000000..2098566c1ce8 --- /dev/null +++ b/linux-4.15.patch @@ -0,0 +1,120 @@ +diff --git a/hal/OUTSRC/odm_types.h b/hal/OUTSRC/odm_types.h +index 27cecce..0d3407a 100644 +--- a/hal/OUTSRC/odm_types.h ++++ b/hal/OUTSRC/odm_types.h +@@ -148,7 +148,11 @@ typedef enum _RT_SPINLOCK_TYPE{ + + typedef struct rtl8192cd_priv *prtl8192cd_priv; + typedef struct stat_info STA_INFO_T,*PSTA_INFO_T; ++#if defined(LINUX_VERSION_CODE) && (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)) ++ typedef struct legacy_timer_emu RT_TIMER, *PRT_TIMER; ++#else + typedef struct timer_list RT_TIMER, *PRT_TIMER; ++#endif + typedef void * RT_TIMER_CALL_BACK; + + #define DEV_BUS_TYPE RT_PCI_INTERFACE +@@ -175,7 +179,11 @@ typedef enum _RT_SPINLOCK_TYPE{ + + typedef struct rtl8192cd_priv *prtl8192cd_priv; + typedef struct stat_info STA_INFO_T,*PSTA_INFO_T; ++#if defined(LINUX_VERSION_CODE) && (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)) ++ typedef struct legacy_timer_emu RT_TIMER, *PRT_TIMER; ++#else + typedef struct timer_list RT_TIMER, *PRT_TIMER; ++#endif + typedef void * RT_TIMER_CALL_BACK; + + #define DEV_BUS_TYPE RT_PCI_INTERFACE +@@ -238,7 +246,11 @@ typedef enum _RT_SPINLOCK_TYPE{ + #define ODM_ENDIAN_TYPE ODM_ENDIAN_BIG + #endif + ++#if defined(LINUX_VERSION_CODE) && (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)) ++ typedef struct legacy_timer_emu RT_TIMER, *PRT_TIMER; ++#else + typedef struct timer_list RT_TIMER, *PRT_TIMER; ++#endif + typedef void * RT_TIMER_CALL_BACK; + #define STA_INFO_T struct sta_info + #define PSTA_INFO_T struct sta_info * +diff --git a/include/osdep_service.h b/include/osdep_service.h +index b262938..0464e02 100644 +--- a/include/osdep_service.h ++++ b/include/osdep_service.h +@@ -318,8 +318,12 @@ extern void rtw_init_timer(_timer *ptimer, void *padapter, void *pfunc); + __inline static unsigned char _cancel_timer_ex(_timer *ptimer) + { + #ifdef PLATFORM_LINUX ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)) ++ return del_timer_sync(&ptimer->t); ++#else + return del_timer_sync(ptimer); + #endif ++#endif + #ifdef PLATFORM_FREEBSD + _cancel_timer(ptimer,0); + return 0; +diff --git a/include/osdep_service_linux.h b/include/osdep_service_linux.h +index 3cf1c30..d733520 100644 +--- a/include/osdep_service_linux.h ++++ b/include/osdep_service_linux.h +@@ -124,7 +124,15 @@ + #else
+ typedef struct semaphore _mutex;
+ #endif
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0))
++ typedef struct legacy_timer_emu {
++ struct timer_list t;
++ void (*function)(unsigned long);
++ unsigned long data;
++ } _timer;
++#else
+ typedef struct timer_list _timer;
++#endif
+
+ struct __queue {
+ struct list_head queue;
+@@ -256,23 +264,41 @@ __inline static void rtw_list_delete(_list *plist) + }
+
+ #define RTW_TIMER_HDL_ARGS void *FunctionContext
+-
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0))
++static void legacy_timer_emu_func(struct timer_list *t)
++{
++ struct legacy_timer_emu *lt = from_timer(lt, t, t);
++ lt->function(lt->data);
++}
++#endif
+ __inline static void _init_timer(_timer *ptimer,_nic_hdl nic_hdl,void *pfunc,void* cntx)
+ {
+ //setup_timer(ptimer, pfunc,(u32)cntx);
+ ptimer->function = pfunc;
+ ptimer->data = (unsigned long)cntx;
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0))
++ timer_setup(&ptimer->t, legacy_timer_emu_func, 0);
++#else
+ init_timer(ptimer);
++#endif
+ }
+
+ __inline static void _set_timer(_timer *ptimer,u32 delay_time)
+ {
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0))
++ mod_timer(&ptimer->t, (jiffies+(delay_time*HZ/1000)));
++#else
+ mod_timer(ptimer , (jiffies+(delay_time*HZ/1000)));
++#endif
+ }
+
+ __inline static void _cancel_timer(_timer *ptimer,u8 *bcancelled)
+ {
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0))
++ del_timer_sync(&ptimer->t);
++#else
+ del_timer_sync(ptimer);
++#endif
+ *bcancelled= _TRUE;//TRUE ==1; FALSE==0
+ }
+
|