aboutsummaryrefslogtreecommitdiffstats
path: root/net/ax25/ax25_ip.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/ax25/ax25_ip.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/ax25/ax25_ip.c')
-rw-r--r--net/ax25/ax25_ip.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/net/ax25/ax25_ip.c b/net/ax25/ax25_ip.c
index 930e4918037f..f047a57aa95c 100644
--- a/net/ax25/ax25_ip.c
+++ b/net/ax25/ax25_ip.c
@@ -46,7 +46,9 @@
46 46
47#ifdef CONFIG_INET 47#ifdef CONFIG_INET
48 48
49int ax25_hard_header(struct sk_buff *skb, struct net_device *dev, unsigned short type, void *daddr, void *saddr, unsigned len) 49int ax25_hard_header(struct sk_buff *skb, struct net_device *dev,
50 unsigned short type, const void *daddr,
51 const void *saddr, unsigned len)
50{ 52{
51 unsigned char *buff; 53 unsigned char *buff;
52 54
@@ -215,7 +217,9 @@ put:
215 217
216#else /* INET */ 218#else /* INET */
217 219
218int ax25_hard_header(struct sk_buff *skb, struct net_device *dev, unsigned short type, void *daddr, void *saddr, unsigned len) 220int ax25_hard_header(struct sk_buff *skb, struct net_device *dev,
221 unsigned short type, const void *daddr,
222 const void *saddr, unsigned len)
219{ 223{
220 return -AX25_HEADER_LEN; 224 return -AX25_HEADER_LEN;
221} 225}
@@ -227,5 +231,12 @@ int ax25_rebuild_header(struct sk_buff *skb)
227 231
228#endif 232#endif
229 233
234const struct header_ops ax25_header_ops = {
235 .create = ax25_hard_header,
236 .rebuild = ax25_rebuild_header,
237};
238
230EXPORT_SYMBOL(ax25_hard_header); 239EXPORT_SYMBOL(ax25_hard_header);
231EXPORT_SYMBOL(ax25_rebuild_header); 240EXPORT_SYMBOL(ax25_rebuild_header);
241EXPORT_SYMBOL(ax25_header_ops);
242