Thread: [Ndiswrapper-general] [PATCH] make ndis.c build against 2.6.18-rc3 and later
Status: Beta
Brought to you by:
pgiri
From: Christian T. <ctr...@gm...> - 2006-08-10 10:22:36
|
Hi folks, the patch below is needed to build ndiswrapper-1.21 against 2.6.18-rc3-mm2 and vanilla -rc3 onwards. It appears this change will make it into the final 2.6.18 release: > commit 684c34d3904e9ce491c9f3dd2d20361edae139df > Author: Patrick McHardy <ka...@tr...> > Date: Sat Aug 5 00:57:21 2006 -0700 >=20 > [NET]: Replace CHECKSUM_HW by CHECKSUM_PARTIAL/CHECKSUM_COMPLETE > =20 > Replace CHECKSUM_HW by CHECKSUM_PARTIAL (for outgoing packets, whose > checksum still needs to be completed) and CHECKSUM_COMPLETE (for > incoming packets, device supplied full checksum). > =20 > Patch originally from Herbert Xu, updated by myself for 2.6.18-rc3. > =20 > Signed-off-by: Patrick McHardy <ka...@tr...> > Signed-off-by: David S. Miller <da...@da...> Compile tested against 2.6.18-rc3-mm2 and currently running on a 3crwe154g72 version 2.0 (softmac) cardbus device. Apologies for not signing up to the list right now, I already have a bunch of subscriptions yet to cancel... Signed-off-by: Christian Trefzer <ctr...@gm...> --- a/driver/ndis.c 2006-08-10 04:05:53.000000000 +0200 +++ b/driver/ndis.c 2006-08-10 04:05:46.000000000 +0200 @@ -2112,7 +2112,11 @@ (rx_csum_info->rx.tcp_succeeded || rx_csum_info->rx.ip_succeeded || rx_csum_info->rx.udp_succeeded)) { +#if LINUX_VERSION_CODE >=3D KERNEL_VERSION(2,6,18) + skb->ip_summed =3D CHECKSUM_COMPLETE; +#else skb->ip_summed =3D CHECKSUM_HW; +#endif skb->csum =3D rx_csum_info->value; } netif_rx(skb); @@ -2379,7 +2383,11 @@ if (wnd->rx_csum.ip_csum && rx_csum_info && (rx_csum_info->rx.tcp_succeeded || rx_csum_info->rx.ip_succeeded || rx_csum_info->rx.udp_succeeded)) { - skb->ip_summed =3D CHECKSUM_HW; +#if LINUX_VERSION_CODE >=3D KERNEL_VERSION(2,6,18) + skb->ip_summed =3D CHECKSUM_PARTIAL; +#else + skb->ip_summed =3D CHECKSUM_HW; +#endif skb->csum =3D rx_csum_info->value; } netif_rx(skb); |