diff options
Diffstat (limited to 'drivers/net/hamradio/mkiss.c')
-rw-r--r-- | drivers/net/hamradio/mkiss.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/net/hamradio/mkiss.c b/drivers/net/hamradio/mkiss.c index d08fbc396648..9e43c47691ca 100644 --- a/drivers/net/hamradio/mkiss.c +++ b/drivers/net/hamradio/mkiss.c | |||
@@ -578,8 +578,9 @@ static int ax_open_dev(struct net_device *dev) | |||
578 | #if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE) | 578 | #if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE) |
579 | 579 | ||
580 | /* Return the frame type ID */ | 580 | /* Return the frame type ID */ |
581 | static int ax_header(struct sk_buff *skb, struct net_device *dev, unsigned short type, | 581 | static int ax_header(struct sk_buff *skb, struct net_device *dev, |
582 | void *daddr, void *saddr, unsigned len) | 582 | unsigned short type, const void *daddr, |
583 | const void *saddr, unsigned len) | ||
583 | { | 584 | { |
584 | #ifdef CONFIG_INET | 585 | #ifdef CONFIG_INET |
585 | if (type != htons(ETH_P_AX25)) | 586 | if (type != htons(ETH_P_AX25)) |
@@ -670,6 +671,11 @@ static struct net_device_stats *ax_get_stats(struct net_device *dev) | |||
670 | return &ax->stats; | 671 | return &ax->stats; |
671 | } | 672 | } |
672 | 673 | ||
674 | static const struct header_ops ax_header_ops = { | ||
675 | .create = ax_header, | ||
676 | .rebuild = ax_rebuild_header, | ||
677 | }; | ||
678 | |||
673 | static void ax_setup(struct net_device *dev) | 679 | static void ax_setup(struct net_device *dev) |
674 | { | 680 | { |
675 | /* Finish setting up the DEVICE info. */ | 681 | /* Finish setting up the DEVICE info. */ |
@@ -683,8 +689,8 @@ static void ax_setup(struct net_device *dev) | |||
683 | dev->addr_len = 0; | 689 | dev->addr_len = 0; |
684 | dev->type = ARPHRD_AX25; | 690 | dev->type = ARPHRD_AX25; |
685 | dev->tx_queue_len = 10; | 691 | dev->tx_queue_len = 10; |
686 | dev->hard_header = ax_header; | 692 | dev->header_ops = &ax_header_ops; |
687 | dev->rebuild_header = ax_rebuild_header; | 693 | |
688 | 694 | ||
689 | memcpy(dev->broadcast, &ax25_bcast, AX25_ADDR_LEN); | 695 | memcpy(dev->broadcast, &ax25_bcast, AX25_ADDR_LEN); |
690 | memcpy(dev->dev_addr, &ax25_defaddr, AX25_ADDR_LEN); | 696 | memcpy(dev->dev_addr, &ax25_defaddr, AX25_ADDR_LEN); |