aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@linux-foundation.org>2007-10-09 04:40:57 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:52:52 -0400
commit3b04ddde02cf1b6f14f2697da5c20eca5715017f (patch)
tree9da1341a5a399a507b5ea6bf5a3047506b8d8f8f /drivers/media
parentb95cce3576813ac3f86bafa6b5daaaaf7574b0fe (diff)
[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. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/dvb/dvb-core/dvb_net.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/media/dvb/dvb-core/dvb_net.c b/drivers/media/dvb/dvb-core/dvb_net.c
index bdd797071cb0..06800e5a0770 100644
--- a/drivers/media/dvb/dvb-core/dvb_net.c
+++ b/drivers/media/dvb/dvb-core/dvb_net.c
@@ -1225,10 +1225,17 @@ static struct net_device_stats * dvb_net_get_stats(struct net_device *dev)
1225 return &((struct dvb_net_priv*) dev->priv)->stats; 1225 return &((struct dvb_net_priv*) dev->priv)->stats;
1226} 1226}
1227 1227
1228static const struct header_ops dvb_header_ops = {
1229 .create = eth_header,
1230 .parse = eth_header_parse,
1231 .rebuild = eth_rebuild_header,
1232};
1233
1228static void dvb_net_setup(struct net_device *dev) 1234static void dvb_net_setup(struct net_device *dev)
1229{ 1235{
1230 ether_setup(dev); 1236 ether_setup(dev);
1231 1237
1238 dev->header_ops = &dvb_header_ops;
1232 dev->open = dvb_net_open; 1239 dev->open = dvb_net_open;
1233 dev->stop = dvb_net_stop; 1240 dev->stop = dvb_net_stop;
1234 dev->hard_start_xmit = dvb_net_tx; 1241 dev->hard_start_xmit = dvb_net_tx;
@@ -1237,7 +1244,7 @@ static void dvb_net_setup(struct net_device *dev)
1237 dev->set_mac_address = dvb_net_set_mac; 1244 dev->set_mac_address = dvb_net_set_mac;
1238 dev->mtu = 4096; 1245 dev->mtu = 4096;
1239 dev->mc_count = 0; 1246 dev->mc_count = 0;
1240 dev->hard_header_cache = NULL; 1247
1241 dev->flags |= IFF_NOARP; 1248 dev->flags |= IFF_NOARP;
1242} 1249}
1243 1250