diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-10-17 12:18:22 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-10-17 12:18:22 -0200 |
commit | c0b9721b6eaa5f1183f2b22f730626ecd195c832 (patch) | |
tree | 6bd005cab805a01dd0b14b1ec56efffceb331753 /linux/drivers | |
parent | aacb6236900eb6968c7a13eb3a81f938895ae24d (diff) | |
download | mediapointer-dvb-s2-c0b9721b6eaa5f1183f2b22f730626ecd195c832.tar.gz mediapointer-dvb-s2-c0b9721b6eaa5f1183f2b22f730626ecd195c832.tar.bz2 |
backport changeset 3b04ddde02cf1b6f14f2697da5c20eca5715017f
From: Mauro Carvalho Chehab <mchehab@infradead.org>
Original description:
[NET]: Move hardware header operations out of netdevice.
Since hardware header operations are part of the protocol class
not the device instance, make them into a separate object and
save memory.
kernel-sync:
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers')
-rw-r--r-- | linux/drivers/media/dvb/dvb-core/dvb_net.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/linux/drivers/media/dvb/dvb-core/dvb_net.c b/linux/drivers/media/dvb/dvb-core/dvb_net.c index 30b7ace57..589e3c1d2 100644 --- a/linux/drivers/media/dvb/dvb-core/dvb_net.c +++ b/linux/drivers/media/dvb/dvb-core/dvb_net.c @@ -1271,10 +1271,17 @@ static struct net_device_stats * dvb_net_get_stats(struct net_device *dev) return &((struct dvb_net_priv*) dev->priv)->stats; } +static const struct header_ops dvb_header_ops = { + .create = eth_header, + .parse = eth_header_parse, + .rebuild = eth_rebuild_header, +}; + static void dvb_net_setup(struct net_device *dev) { ether_setup(dev); + dev->header_ops = &dvb_header_ops; dev->open = dvb_net_open; dev->stop = dvb_net_stop; dev->hard_start_xmit = dvb_net_tx; @@ -1283,7 +1290,7 @@ static void dvb_net_setup(struct net_device *dev) dev->set_mac_address = dvb_net_set_mac; dev->mtu = 4096; dev->mc_count = 0; - dev->hard_header_cache = NULL; + dev->flags |= IFF_NOARP; } |