aboutsummaryrefslogtreecommitdiffstats
path: root/net/netrom
diff options
context:
space:
mode:
Diffstat (limited to 'net/netrom')
-rw-r--r--net/netrom/nr_dev.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/net/netrom/nr_dev.c b/net/netrom/nr_dev.c
index c7b5d930e732..8c68da5ef0a1 100644
--- a/net/netrom/nr_dev.c
+++ b/net/netrom/nr_dev.c
@@ -95,8 +95,9 @@ static int nr_rebuild_header(struct sk_buff *skb)
95 95
96#endif 96#endif
97 97
98static int nr_header(struct sk_buff *skb, struct net_device *dev, unsigned short type, 98static int nr_header(struct sk_buff *skb, struct net_device *dev,
99 void *daddr, void *saddr, unsigned len) 99 unsigned short type,
100 const void *daddr, const void *saddr, unsigned len)
100{ 101{
101 unsigned char *buff = skb_push(skb, NR_NETWORK_LEN + NR_TRANSPORT_LEN); 102 unsigned char *buff = skb_push(skb, NR_NETWORK_LEN + NR_TRANSPORT_LEN);
102 103
@@ -193,6 +194,12 @@ static struct net_device_stats *nr_get_stats(struct net_device *dev)
193 return &nr->stats; 194 return &nr->stats;
194} 195}
195 196
197static const struct header_ops nr_header_ops = {
198 .create = nr_header,
199 .rebuild= nr_rebuild_header,
200};
201
202
196void nr_setup(struct net_device *dev) 203void nr_setup(struct net_device *dev)
197{ 204{
198 dev->mtu = NR_MAX_PACKET_SIZE; 205 dev->mtu = NR_MAX_PACKET_SIZE;
@@ -200,11 +207,10 @@ void nr_setup(struct net_device *dev)
200 dev->open = nr_open; 207 dev->open = nr_open;
201 dev->stop = nr_close; 208 dev->stop = nr_close;
202 209
203 dev->hard_header = nr_header; 210 dev->header_ops = &nr_header_ops;
204 dev->hard_header_len = NR_NETWORK_LEN + NR_TRANSPORT_LEN; 211 dev->hard_header_len = NR_NETWORK_LEN + NR_TRANSPORT_LEN;
205 dev->addr_len = AX25_ADDR_LEN; 212 dev->addr_len = AX25_ADDR_LEN;
206 dev->type = ARPHRD_NETROM; 213 dev->type = ARPHRD_NETROM;
207 dev->rebuild_header = nr_rebuild_header;
208 dev->set_mac_address = nr_set_mac_address; 214 dev->set_mac_address = nr_set_mac_address;
209 215
210 /* New-style flags. */ 216 /* New-style flags. */