ndiswrapper rebuild
This commit is contained in:
@@ -0,0 +1,69 @@
|
||||
diff --git a/ndiswrapper/driver/ntoskernel.c b/ndiswrapper/driver/ntoskernel.c
|
||||
index 4fe0dc1..4dd7a89 100644
|
||||
--- a/ndiswrapper/driver/ntoskernel.c
|
||||
+++ b/ndiswrapper/driver/ntoskernel.c
|
||||
@@ -2524,7 +2524,11 @@ int ntoskernel_init(void)
|
||||
info->task = NULL;
|
||||
info->count = 0;
|
||||
#ifdef CONFIG_SMP
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,3,0)
|
||||
cpumask_setall(&info->cpus_allowed);
|
||||
+#else
|
||||
+ cpumask_setall(&info->cpus_mask);
|
||||
+#endif
|
||||
#endif
|
||||
}
|
||||
} while (0);
|
||||
diff --git a/ndiswrapper/driver/ntoskernel.h b/ndiswrapper/driver/ntoskernel.h
|
||||
index 3c4c6ff..8a71ae3 100644
|
||||
--- a/ndiswrapper/driver/ntoskernel.h
|
||||
+++ b/ndiswrapper/driver/ntoskernel.h
|
||||
@@ -107,7 +107,11 @@ static cpumask_t cpumasks[NR_CPUS];
|
||||
#endif /* CONFIG_SMP */
|
||||
|
||||
#ifndef tsk_cpus_allowed
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,3,0)
|
||||
#define tsk_cpus_allowed(tsk) (&(tsk)->cpus_allowed)
|
||||
+#else
|
||||
+#define tsk_cpus_allowed(tsk) (&(tsk)->cpus_mask)
|
||||
+#endif
|
||||
#endif
|
||||
|
||||
#ifndef __packed
|
||||
@@ -631,7 +635,12 @@ struct irql_info {
|
||||
int count;
|
||||
struct mutex lock;
|
||||
#ifdef CONFIG_SMP
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,3,0)
|
||||
cpumask_t cpus_allowed;
|
||||
+#else
|
||||
+ const cpumask_t *cpus_ptr;
|
||||
+ cpumask_t cpus_mask;
|
||||
+#endif
|
||||
#endif
|
||||
struct task_struct *task;
|
||||
};
|
||||
@@ -658,7 +667,11 @@ static inline KIRQL raise_irql(KIRQL newirql)
|
||||
/* TODO: is this enough to pin down to current cpu? */
|
||||
#ifdef CONFIG_SMP
|
||||
assert(task_cpu(current) == smp_processor_id());
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,3,0)
|
||||
cpumask_copy(&info->cpus_allowed, tsk_cpus_allowed(current));
|
||||
+#else
|
||||
+ cpumask_copy(&info->cpus_mask, tsk_cpus_allowed(current));
|
||||
+#endif
|
||||
set_cpus_allowed_ptr(current, cpumask_of(smp_processor_id()));
|
||||
#endif
|
||||
put_cpu_var(irql_info);
|
||||
@@ -682,7 +695,11 @@ static inline void lower_irql(KIRQL oldirql)
|
||||
if (--info->count == 0) {
|
||||
info->task = NULL;
|
||||
#ifdef CONFIG_SMP
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,3,0)
|
||||
set_cpus_allowed_ptr(current, &info->cpus_allowed);
|
||||
+#else
|
||||
+ set_cpus_allowed_ptr(current, &info->cpus_mask);
|
||||
+#endif
|
||||
#endif
|
||||
mutex_unlock(&info->lock);
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
diff -u -r ndiswrapper-1.62/driver/wrapndis.c ndiswrapper-1.62-5.4/driver/wrapndis.c
|
||||
--- ndiswrapper-1.62/driver/wrapndis.c 2019-02-11 04:11:14.000000000 +0000
|
||||
+++ ndiswrapper-1.62-5.4/driver/wrapndis.c 2019-11-26 00:02:39.035464963 +0000
|
||||
@@ -457,10 +457,18 @@
|
||||
for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) {
|
||||
skb_frag_t *frag = &skb_shinfo(skb)->frags[i];
|
||||
sg_element++;
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,4,0)
|
||||
sg_element->length = frag->size;
|
||||
+#else
|
||||
+ sg_element->length = skb_frag_size(frag);
|
||||
+#endif
|
||||
sg_element->address =
|
||||
pci_map_page(wnd->wd->pci.pdev, skb_frag_page(frag),
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,4,0)
|
||||
frag->page_offset, frag->size,
|
||||
+#else
|
||||
+ skb_frag_off(frag), skb_frag_size(frag),
|
||||
+#endif
|
||||
PCI_DMA_TODEVICE);
|
||||
TRACE3("%llx, %u", sg_element->address, sg_element->length);
|
||||
}
|
||||
@@ -15,19 +15,18 @@
|
||||
<Description>module-ndiswrapper allows you to use Windows XP drivers for WLAN cards without proper Linux drivers.</Description>
|
||||
<Archive sha1sum="d98b97ff7e88d39b7966b4a3e7b7deeb7dc6e192" type="targz">http://download.sourceforge.net/ndiswrapper/ndiswrapper-1.62.tar.gz</Archive>
|
||||
<BuildDependencies>
|
||||
<Dependency version="4.19.56">kernel-module-headers</Dependency>
|
||||
<Dependency version="5.4.6">kernel-module-headers</Dependency>
|
||||
</BuildDependencies>
|
||||
<!--Patches>
|
||||
<Patch>linux-4.11.patch</Patch>
|
||||
<Patch>linux-4.13.patch</Patch>
|
||||
<Patch>linux-4.15.patch</Patch>
|
||||
</Patches-->
|
||||
<Patches>
|
||||
<Patch>kernel-5.3.patch</Patch>
|
||||
<Patch>kernel-5.4.patch</Patch>
|
||||
</Patches>
|
||||
</Source>
|
||||
|
||||
<Package>
|
||||
<Name>ndiswrapper</Name>
|
||||
<RuntimeDependencies>
|
||||
<Dependency version="4.19.56">kernel</Dependency>
|
||||
<Dependency version="5.4.6">kernel</Dependency>
|
||||
</RuntimeDependencies>
|
||||
<Files>
|
||||
<Path fileType="library" permanent="true">/lib/modules</Path>
|
||||
@@ -43,6 +42,13 @@
|
||||
</Package>
|
||||
|
||||
<History>
|
||||
<Update release="27">
|
||||
<Date>2019-12-27</Date>
|
||||
<Version>1.62</Version>
|
||||
<Comment>Rebuild</Comment>
|
||||
<Name>Idris Kalp</Name>
|
||||
<Email>idriskalp@gmail.com</Email>
|
||||
</Update>
|
||||
<Update release="26">
|
||||
<Date>2019-06-26</Date>
|
||||
<Version>1.62</Version>
|
||||
|
||||
Reference in New Issue
Block a user