diff options
Diffstat (limited to 'drivers/net/wan/cycx_x25.c')
-rw-r--r-- | drivers/net/wan/cycx_x25.c | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/drivers/net/wan/cycx_x25.c b/drivers/net/wan/cycx_x25.c index 46e053106d4d..8a1778cf98d1 100644 --- a/drivers/net/wan/cycx_x25.c +++ b/drivers/net/wan/cycx_x25.c | |||
@@ -131,14 +131,15 @@ static int cycx_wan_update(struct wan_device *wandev), | |||
131 | cycx_wan_del_if(struct wan_device *wandev, struct net_device *dev); | 131 | cycx_wan_del_if(struct wan_device *wandev, struct net_device *dev); |
132 | 132 | ||
133 | /* Network device interface */ | 133 | /* Network device interface */ |
134 | static int cycx_netdevice_init(struct net_device *dev), | 134 | static int cycx_netdevice_init(struct net_device *dev); |
135 | cycx_netdevice_open(struct net_device *dev), | 135 | static int cycx_netdevice_open(struct net_device *dev); |
136 | cycx_netdevice_stop(struct net_device *dev), | 136 | static int cycx_netdevice_stop(struct net_device *dev); |
137 | cycx_netdevice_hard_header(struct sk_buff *skb, | 137 | static int cycx_netdevice_hard_header(struct sk_buff *skb, |
138 | struct net_device *dev, u16 type, | 138 | struct net_device *dev, u16 type, |
139 | void *daddr, void *saddr, unsigned len), | 139 | const void *daddr, const void *saddr, |
140 | cycx_netdevice_rebuild_header(struct sk_buff *skb), | 140 | unsigned len); |
141 | cycx_netdevice_hard_start_xmit(struct sk_buff *skb, | 141 | static int cycx_netdevice_rebuild_header(struct sk_buff *skb); |
142 | static int cycx_netdevice_hard_start_xmit(struct sk_buff *skb, | ||
142 | struct net_device *dev); | 143 | struct net_device *dev); |
143 | 144 | ||
144 | static struct net_device_stats * | 145 | static struct net_device_stats * |
@@ -468,7 +469,14 @@ static int cycx_wan_del_if(struct wan_device *wandev, struct net_device *dev) | |||
468 | return 0; | 469 | return 0; |
469 | } | 470 | } |
470 | 471 | ||
472 | |||
471 | /* Network Device Interface */ | 473 | /* Network Device Interface */ |
474 | |||
475 | static const struct header_ops cycx_header_ops = { | ||
476 | .create = cycx_netdevice_hard_header, | ||
477 | .rebuild = cycx_netdevice_rebuild_header, | ||
478 | }; | ||
479 | |||
472 | /* Initialize Linux network interface. | 480 | /* Initialize Linux network interface. |
473 | * | 481 | * |
474 | * This routine is called only once for each interface, during Linux network | 482 | * This routine is called only once for each interface, during Linux network |
@@ -483,8 +491,8 @@ static int cycx_netdevice_init(struct net_device *dev) | |||
483 | /* Initialize device driver entry points */ | 491 | /* Initialize device driver entry points */ |
484 | dev->open = cycx_netdevice_open; | 492 | dev->open = cycx_netdevice_open; |
485 | dev->stop = cycx_netdevice_stop; | 493 | dev->stop = cycx_netdevice_stop; |
486 | dev->hard_header = cycx_netdevice_hard_header; | 494 | dev->header_ops = &cycx_header_ops; |
487 | dev->rebuild_header = cycx_netdevice_rebuild_header; | 495 | |
488 | dev->hard_start_xmit = cycx_netdevice_hard_start_xmit; | 496 | dev->hard_start_xmit = cycx_netdevice_hard_start_xmit; |
489 | dev->get_stats = cycx_netdevice_get_stats; | 497 | dev->get_stats = cycx_netdevice_get_stats; |
490 | 498 | ||
@@ -554,7 +562,8 @@ static int cycx_netdevice_stop(struct net_device *dev) | |||
554 | * Return: media header length. */ | 562 | * Return: media header length. */ |
555 | static int cycx_netdevice_hard_header(struct sk_buff *skb, | 563 | static int cycx_netdevice_hard_header(struct sk_buff *skb, |
556 | struct net_device *dev, u16 type, | 564 | struct net_device *dev, u16 type, |
557 | void *daddr, void *saddr, unsigned len) | 565 | const void *daddr, const void *saddr, |
566 | unsigned len) | ||
558 | { | 567 | { |
559 | skb->protocol = type; | 568 | skb->protocol = type; |
560 | 569 | ||