kernel-5.4.patch 858 B

1234567891011121314151617181920212223
  1. diff -u -r ndiswrapper-1.62/driver/wrapndis.c ndiswrapper-1.62-5.4/driver/wrapndis.c
  2. --- ndiswrapper-1.62/driver/wrapndis.c 2019-02-11 04:11:14.000000000 +0000
  3. +++ ndiswrapper-1.62-5.4/driver/wrapndis.c 2019-11-26 00:02:39.035464963 +0000
  4. @@ -457,10 +457,18 @@
  5. for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) {
  6. skb_frag_t *frag = &skb_shinfo(skb)->frags[i];
  7. sg_element++;
  8. +#if LINUX_VERSION_CODE < KERNEL_VERSION(5,4,0)
  9. sg_element->length = frag->size;
  10. +#else
  11. + sg_element->length = skb_frag_size(frag);
  12. +#endif
  13. sg_element->address =
  14. pci_map_page(wnd->wd->pci.pdev, skb_frag_page(frag),
  15. +#if LINUX_VERSION_CODE < KERNEL_VERSION(5,4,0)
  16. frag->page_offset, frag->size,
  17. +#else
  18. + skb_frag_off(frag), skb_frag_size(frag),
  19. +#endif
  20. PCI_DMA_TODEVICE);
  21. TRACE3("%llx, %u", sg_element->address, sg_element->length);
  22. }