summaryrefslogtreecommitdiff
path: root/net/ax25/ax25_ip.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@linux-foundation.org>2007-10-09 12:40:57 +0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-11 03:52:52 +0400
commit3b04ddde02cf1b6f14f2697da5c20eca5715017f (patch)
tree9da1341a5a399a507b5ea6bf5a3047506b8d8f8f /net/ax25/ax25_ip.c
parentb95cce3576813ac3f86bafa6b5daaaaf7574b0fe (diff)
downloadlinux-3b04ddde02cf1b6f14f2697da5c20eca5715017f.tar.xz
[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 @@
#ifdef CONFIG_INET
-int ax25_hard_header(struct sk_buff *skb, struct net_device *dev, unsigned short type, void *daddr, void *saddr, unsigned len)
+int ax25_hard_header(struct sk_buff *skb, struct net_device *dev,
+ unsigned short type, const void *daddr,
+ const void *saddr, unsigned len)
{
unsigned char *buff;
@@ -215,7 +217,9 @@ put:
#else /* INET */
-int ax25_hard_header(struct sk_buff *skb, struct net_device *dev, unsigned short type, void *daddr, void *saddr, unsigned len)
+int ax25_hard_header(struct sk_buff *skb, struct net_device *dev,
+ unsigned short type, const void *daddr,
+ const void *saddr, unsigned len)
{
return -AX25_HEADER_LEN;
}
@@ -227,5 +231,12 @@ int ax25_rebuild_header(struct sk_buff *skb)
#endif
+const struct header_ops ax25_header_ops = {
+ .create = ax25_hard_header,
+ .rebuild = ax25_rebuild_header,
+};
+
EXPORT_SYMBOL(ax25_hard_header);
EXPORT_SYMBOL(ax25_rebuild_header);
+EXPORT_SYMBOL(ax25_header_ops);
+