From 717137574c61dec1bd6d53412fc0d524b27446c8 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Wed, 17 Oct 2007 12:34:16 -0200 Subject: Make it backward compatible with kernels <2.6.24 From: Mauro Carvalho Chehab kernel-sync: Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/dvb/dvb-core/dvb_net.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'linux/drivers') diff --git a/linux/drivers/media/dvb/dvb-core/dvb_net.c b/linux/drivers/media/dvb/dvb-core/dvb_net.c index 589e3c1d2..793e004fe 100644 --- a/linux/drivers/media/dvb/dvb-core/dvb_net.c +++ b/linux/drivers/media/dvb/dvb-core/dvb_net.c @@ -1271,17 +1271,23 @@ static struct net_device_stats * dvb_net_get_stats(struct net_device *dev) return &((struct dvb_net_priv*) dev->priv)->stats; } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24) static const struct header_ops dvb_header_ops = { .create = eth_header, .parse = eth_header_parse, .rebuild = eth_rebuild_header, }; +#endif static void dvb_net_setup(struct net_device *dev) { ether_setup(dev); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24) dev->header_ops = &dvb_header_ops; +#else + dev->hard_header_cache = NULL; +#endif dev->open = dvb_net_open; dev->stop = dvb_net_stop; dev->hard_start_xmit = dvb_net_tx; -- cgit v1.2.3