1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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);
}
|