aboutsummaryrefslogtreecommitdiffstats
path: root/net/802/hippi.c
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 /net/802/hippi.c
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 'net/802/hippi.c')
-rw-r--r--net/802/hippi.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/net/802/hippi.c b/net/802/hippi.c
index 87ffc12b6891..e35dc1e0915d 100644
--- a/net/802/hippi.c
+++ b/net/802/hippi.c
@@ -45,8 +45,8 @@
45 */ 45 */
46 46
47static int hippi_header(struct sk_buff *skb, struct net_device *dev, 47static int hippi_header(struct sk_buff *skb, struct net_device *dev,
48 unsigned short type, void *daddr, void *saddr, 48 unsigned short type,
49 unsigned len) 49 const void *daddr, const void *saddr, unsigned len)
50{ 50{
51 struct hippi_hdr *hip = (struct hippi_hdr *)skb_push(skb, HIPPI_HLEN); 51 struct hippi_hdr *hip = (struct hippi_hdr *)skb_push(skb, HIPPI_HLEN);
52 struct hippi_cb *hcb = (struct hippi_cb *) skb->cb; 52 struct hippi_cb *hcb = (struct hippi_cb *) skb->cb;
@@ -182,16 +182,18 @@ static int hippi_neigh_setup_dev(struct net_device *dev, struct neigh_parms *p)
182 return 0; 182 return 0;
183} 183}
184 184
185static const struct header_ops hippi_header_ops = {
186 .create = hippi_header,
187 .rebuild = hippi_rebuild_header,
188};
189
190
185static void hippi_setup(struct net_device *dev) 191static void hippi_setup(struct net_device *dev)
186{ 192{
187 dev->set_multicast_list = NULL; 193 dev->set_multicast_list = NULL;
188 dev->change_mtu = hippi_change_mtu; 194 dev->change_mtu = hippi_change_mtu;
189 dev->hard_header = hippi_header; 195 dev->header_ops = &hippi_header_ops;
190 dev->rebuild_header = hippi_rebuild_header;
191 dev->set_mac_address = hippi_mac_addr; 196 dev->set_mac_address = hippi_mac_addr;
192 dev->hard_header_parse = NULL;
193 dev->hard_header_cache = NULL;
194 dev->header_cache_update = NULL;
195 dev->neigh_setup = hippi_neigh_setup_dev; 197 dev->neigh_setup = hippi_neigh_setup_dev;
196 198
197 /* 199 /*