diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2005-07-12 15:08:43 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-07-12 15:08:43 -0400 |
commit | ab611487d8ada506e511d2b8f22fb8e7be9939b9 (patch) | |
tree | caa87031e209e8845f84209b69c6c8225def945f | |
parent | 84531c24f27b02daa8e54e2bb6dc74a730fdf0a5 (diff) |
[NET]: __be'ify *_type_trans()
tr_type_trans(), hippi_type_trans() left as-is.
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/myri_sbus.c | 2 | ||||
-rw-r--r-- | drivers/net/plip.c | 2 | ||||
-rw-r--r-- | drivers/net/wan/farsync.c | 3 | ||||
-rw-r--r-- | drivers/net/wan/hdlc_cisco.c | 3 | ||||
-rw-r--r-- | drivers/net/wan/hdlc_ppp.c | 3 | ||||
-rw-r--r-- | drivers/net/wan/hdlc_raw.c | 3 | ||||
-rw-r--r-- | drivers/s390/net/qeth_main.c | 2 | ||||
-rw-r--r-- | include/linux/etherdevice.h | 2 | ||||
-rw-r--r-- | include/linux/fddidevice.h | 2 | ||||
-rw-r--r-- | include/linux/hdlc.h | 4 | ||||
-rw-r--r-- | include/linux/wanrouter.h | 3 | ||||
-rw-r--r-- | include/net/x25device.h | 3 | ||||
-rw-r--r-- | net/802/fddi.c | 4 | ||||
-rw-r--r-- | net/atm/br2684.c | 3 | ||||
-rw-r--r-- | net/ethernet/eth.c | 2 | ||||
-rw-r--r-- | net/wanrouter/wanmain.c | 6 |
16 files changed, 20 insertions, 27 deletions
diff --git a/drivers/net/myri_sbus.c b/drivers/net/myri_sbus.c index aad5494c83cf..f0996ce5c268 100644 --- a/drivers/net/myri_sbus.c +++ b/drivers/net/myri_sbus.c | |||
@@ -369,7 +369,7 @@ static void myri_tx(struct myri_eth *mp, struct net_device *dev) | |||
369 | * assume 802.3 if the type field is short enough to be a length. | 369 | * assume 802.3 if the type field is short enough to be a length. |
370 | * This is normal practice and works for any 'now in use' protocol. | 370 | * This is normal practice and works for any 'now in use' protocol. |
371 | */ | 371 | */ |
372 | static unsigned short myri_type_trans(struct sk_buff *skb, struct net_device *dev) | 372 | static __be16 myri_type_trans(struct sk_buff *skb, struct net_device *dev) |
373 | { | 373 | { |
374 | struct ethhdr *eth; | 374 | struct ethhdr *eth; |
375 | unsigned char *rawp; | 375 | unsigned char *rawp; |
diff --git a/drivers/net/plip.c b/drivers/net/plip.c index f4b62405d2e5..21537ee3a6a7 100644 --- a/drivers/net/plip.c +++ b/drivers/net/plip.c | |||
@@ -540,7 +540,7 @@ plip_receive(unsigned short nibble_timeout, struct net_device *dev, | |||
540 | * in far too many old systems not all even running Linux. | 540 | * in far too many old systems not all even running Linux. |
541 | */ | 541 | */ |
542 | 542 | ||
543 | static unsigned short plip_type_trans(struct sk_buff *skb, struct net_device *dev) | 543 | static __be16 plip_type_trans(struct sk_buff *skb, struct net_device *dev) |
544 | { | 544 | { |
545 | struct ethhdr *eth; | 545 | struct ethhdr *eth; |
546 | unsigned char *rawp; | 546 | unsigned char *rawp; |
diff --git a/drivers/net/wan/farsync.c b/drivers/net/wan/farsync.c index 7217d44e8854..2c83cca34b86 100644 --- a/drivers/net/wan/farsync.c +++ b/drivers/net/wan/farsync.c | |||
@@ -861,8 +861,7 @@ fst_tx_dma_complete(struct fst_card_info *card, struct fst_port_info *port, | |||
861 | /* | 861 | /* |
862 | * Mark it for our own raw sockets interface | 862 | * Mark it for our own raw sockets interface |
863 | */ | 863 | */ |
864 | static unsigned short farsync_type_trans(struct sk_buff *skb, | 864 | static __be16 farsync_type_trans(struct sk_buff *skb, struct net_device *dev) |
865 | struct net_device *dev) | ||
866 | { | 865 | { |
867 | skb->dev = dev; | 866 | skb->dev = dev; |
868 | skb->mac.raw = skb->data; | 867 | skb->mac.raw = skb->data; |
diff --git a/drivers/net/wan/hdlc_cisco.c b/drivers/net/wan/hdlc_cisco.c index 87496843681a..48c03c11cd9a 100644 --- a/drivers/net/wan/hdlc_cisco.c +++ b/drivers/net/wan/hdlc_cisco.c | |||
@@ -91,8 +91,7 @@ static void cisco_keepalive_send(struct net_device *dev, u32 type, | |||
91 | 91 | ||
92 | 92 | ||
93 | 93 | ||
94 | static unsigned short cisco_type_trans(struct sk_buff *skb, | 94 | static __be16 cisco_type_trans(struct sk_buff *skb, struct net_device *dev) |
95 | struct net_device *dev) | ||
96 | { | 95 | { |
97 | hdlc_header *data = (hdlc_header*)skb->data; | 96 | hdlc_header *data = (hdlc_header*)skb->data; |
98 | 97 | ||
diff --git a/drivers/net/wan/hdlc_ppp.c b/drivers/net/wan/hdlc_ppp.c index 7cd6195a2e46..b81263eaede0 100644 --- a/drivers/net/wan/hdlc_ppp.c +++ b/drivers/net/wan/hdlc_ppp.c | |||
@@ -66,8 +66,7 @@ static void ppp_close(struct net_device *dev) | |||
66 | 66 | ||
67 | 67 | ||
68 | 68 | ||
69 | static unsigned short ppp_type_trans(struct sk_buff *skb, | 69 | static __be16 ppp_type_trans(struct sk_buff *skb, struct net_device *dev) |
70 | struct net_device *dev) | ||
71 | { | 70 | { |
72 | return __constant_htons(ETH_P_WAN_PPP); | 71 | return __constant_htons(ETH_P_WAN_PPP); |
73 | } | 72 | } |
diff --git a/drivers/net/wan/hdlc_raw.c b/drivers/net/wan/hdlc_raw.c index c41fb70b6929..9456d31cb1c1 100644 --- a/drivers/net/wan/hdlc_raw.c +++ b/drivers/net/wan/hdlc_raw.c | |||
@@ -24,8 +24,7 @@ | |||
24 | #include <linux/hdlc.h> | 24 | #include <linux/hdlc.h> |
25 | 25 | ||
26 | 26 | ||
27 | static unsigned short raw_type_trans(struct sk_buff *skb, | 27 | static __be16 raw_type_trans(struct sk_buff *skb, struct net_device *dev) |
28 | struct net_device *dev) | ||
29 | { | 28 | { |
30 | return __constant_htons(ETH_P_IP); | 29 | return __constant_htons(ETH_P_IP); |
31 | } | 30 | } |
diff --git a/drivers/s390/net/qeth_main.c b/drivers/s390/net/qeth_main.c index 3cb88c770037..8f4d2999af8e 100644 --- a/drivers/s390/net/qeth_main.c +++ b/drivers/s390/net/qeth_main.c | |||
@@ -2210,7 +2210,7 @@ no_mem: | |||
2210 | return NULL; | 2210 | return NULL; |
2211 | } | 2211 | } |
2212 | 2212 | ||
2213 | static inline unsigned short | 2213 | static inline __be16 |
2214 | qeth_type_trans(struct sk_buff *skb, struct net_device *dev) | 2214 | qeth_type_trans(struct sk_buff *skb, struct net_device *dev) |
2215 | { | 2215 | { |
2216 | struct qeth_card *card; | 2216 | struct qeth_card *card; |
diff --git a/include/linux/etherdevice.h b/include/linux/etherdevice.h index cf3847edc50f..ce8518e658b6 100644 --- a/include/linux/etherdevice.h +++ b/include/linux/etherdevice.h | |||
@@ -33,7 +33,7 @@ extern int eth_header(struct sk_buff *skb, struct net_device *dev, | |||
33 | unsigned short type, void *daddr, | 33 | unsigned short type, void *daddr, |
34 | void *saddr, unsigned len); | 34 | void *saddr, unsigned len); |
35 | extern int eth_rebuild_header(struct sk_buff *skb); | 35 | extern int eth_rebuild_header(struct sk_buff *skb); |
36 | extern unsigned short eth_type_trans(struct sk_buff *skb, struct net_device *dev); | 36 | extern __be16 eth_type_trans(struct sk_buff *skb, struct net_device *dev); |
37 | extern void eth_header_cache_update(struct hh_cache *hh, struct net_device *dev, | 37 | extern void eth_header_cache_update(struct hh_cache *hh, struct net_device *dev, |
38 | unsigned char * haddr); | 38 | unsigned char * haddr); |
39 | extern int eth_header_cache(struct neighbour *neigh, | 39 | extern int eth_header_cache(struct neighbour *neigh, |
diff --git a/include/linux/fddidevice.h b/include/linux/fddidevice.h index 002f6367697d..e61e42dfd317 100644 --- a/include/linux/fddidevice.h +++ b/include/linux/fddidevice.h | |||
@@ -25,7 +25,7 @@ | |||
25 | #include <linux/if_fddi.h> | 25 | #include <linux/if_fddi.h> |
26 | 26 | ||
27 | #ifdef __KERNEL__ | 27 | #ifdef __KERNEL__ |
28 | extern unsigned short fddi_type_trans(struct sk_buff *skb, | 28 | extern __be16 fddi_type_trans(struct sk_buff *skb, |
29 | struct net_device *dev); | 29 | struct net_device *dev); |
30 | extern struct net_device *alloc_fddidev(int sizeof_priv); | 30 | extern struct net_device *alloc_fddidev(int sizeof_priv); |
31 | #endif | 31 | #endif |
diff --git a/include/linux/hdlc.h b/include/linux/hdlc.h index ed2927ef1ff7..df695e9ae327 100644 --- a/include/linux/hdlc.h +++ b/include/linux/hdlc.h | |||
@@ -242,8 +242,8 @@ static __inline__ struct net_device_stats *hdlc_stats(struct net_device *dev) | |||
242 | } | 242 | } |
243 | 243 | ||
244 | 244 | ||
245 | static __inline__ unsigned short hdlc_type_trans(struct sk_buff *skb, | 245 | static __inline__ __be16 hdlc_type_trans(struct sk_buff *skb, |
246 | struct net_device *dev) | 246 | struct net_device *dev) |
247 | { | 247 | { |
248 | hdlc_device *hdlc = dev_to_hdlc(dev); | 248 | hdlc_device *hdlc = dev_to_hdlc(dev); |
249 | 249 | ||
diff --git a/include/linux/wanrouter.h b/include/linux/wanrouter.h index 3e89f0f15f49..1b6b76a4eb54 100644 --- a/include/linux/wanrouter.h +++ b/include/linux/wanrouter.h | |||
@@ -516,8 +516,7 @@ struct wan_device { | |||
516 | /* Public functions available for device drivers */ | 516 | /* Public functions available for device drivers */ |
517 | extern int register_wan_device(struct wan_device *wandev); | 517 | extern int register_wan_device(struct wan_device *wandev); |
518 | extern int unregister_wan_device(char *name); | 518 | extern int unregister_wan_device(char *name); |
519 | unsigned short wanrouter_type_trans(struct sk_buff *skb, | 519 | __be16 wanrouter_type_trans(struct sk_buff *skb, struct net_device *dev); |
520 | struct net_device *dev); | ||
521 | int wanrouter_encapsulate(struct sk_buff *skb, struct net_device *dev, | 520 | int wanrouter_encapsulate(struct sk_buff *skb, struct net_device *dev, |
522 | unsigned short type); | 521 | unsigned short type); |
523 | 522 | ||
diff --git a/include/net/x25device.h b/include/net/x25device.h index cf36a20ea3c5..d45ae883bd1d 100644 --- a/include/net/x25device.h +++ b/include/net/x25device.h | |||
@@ -5,8 +5,7 @@ | |||
5 | #include <linux/if_packet.h> | 5 | #include <linux/if_packet.h> |
6 | #include <linux/skbuff.h> | 6 | #include <linux/skbuff.h> |
7 | 7 | ||
8 | static inline unsigned short x25_type_trans(struct sk_buff *skb, | 8 | static inline __be16 x25_type_trans(struct sk_buff *skb, struct net_device *dev) |
9 | struct net_device *dev) | ||
10 | { | 9 | { |
11 | skb->mac.raw = skb->data; | 10 | skb->mac.raw = skb->data; |
12 | skb->input_dev = skb->dev = dev; | 11 | skb->input_dev = skb->dev = dev; |
diff --git a/net/802/fddi.c b/net/802/fddi.c index ebcf4830d6f1..5ce24c4bb840 100644 --- a/net/802/fddi.c +++ b/net/802/fddi.c | |||
@@ -122,10 +122,10 @@ static int fddi_rebuild_header(struct sk_buff *skb) | |||
122 | * the proper pointer to the start of packet data (skb->data). | 122 | * the proper pointer to the start of packet data (skb->data). |
123 | */ | 123 | */ |
124 | 124 | ||
125 | unsigned short fddi_type_trans(struct sk_buff *skb, struct net_device *dev) | 125 | __be16 fddi_type_trans(struct sk_buff *skb, struct net_device *dev) |
126 | { | 126 | { |
127 | struct fddihdr *fddi = (struct fddihdr *)skb->data; | 127 | struct fddihdr *fddi = (struct fddihdr *)skb->data; |
128 | unsigned short type; | 128 | __be16 type; |
129 | 129 | ||
130 | /* | 130 | /* |
131 | * Set mac.raw field to point to FC byte, set data field to point | 131 | * Set mac.raw field to point to FC byte, set data field to point |
diff --git a/net/atm/br2684.c b/net/atm/br2684.c index e6954cf1459d..289956c4dd3e 100644 --- a/net/atm/br2684.c +++ b/net/atm/br2684.c | |||
@@ -289,8 +289,7 @@ xmit will add the additional header part in that case */ | |||
289 | * This is similar to eth_type_trans, which cannot be used because of | 289 | * This is similar to eth_type_trans, which cannot be used because of |
290 | * our dev->hard_header_len | 290 | * our dev->hard_header_len |
291 | */ | 291 | */ |
292 | static inline unsigned short br_type_trans(struct sk_buff *skb, | 292 | static inline __be16 br_type_trans(struct sk_buff *skb, struct net_device *dev) |
293 | struct net_device *dev) | ||
294 | { | 293 | { |
295 | struct ethhdr *eth; | 294 | struct ethhdr *eth; |
296 | unsigned char *rawp; | 295 | unsigned char *rawp; |
diff --git a/net/ethernet/eth.c b/net/ethernet/eth.c index ab60ea63688e..f6dbfb99b14d 100644 --- a/net/ethernet/eth.c +++ b/net/ethernet/eth.c | |||
@@ -155,7 +155,7 @@ int eth_rebuild_header(struct sk_buff *skb) | |||
155 | * This is normal practice and works for any 'now in use' protocol. | 155 | * This is normal practice and works for any 'now in use' protocol. |
156 | */ | 156 | */ |
157 | 157 | ||
158 | unsigned short eth_type_trans(struct sk_buff *skb, struct net_device *dev) | 158 | __be16 eth_type_trans(struct sk_buff *skb, struct net_device *dev) |
159 | { | 159 | { |
160 | struct ethhdr *eth; | 160 | struct ethhdr *eth; |
161 | unsigned char *rawp; | 161 | unsigned char *rawp; |
diff --git a/net/wanrouter/wanmain.c b/net/wanrouter/wanmain.c index d6844ac226f5..13b650ad22e2 100644 --- a/net/wanrouter/wanmain.c +++ b/net/wanrouter/wanmain.c | |||
@@ -358,10 +358,10 @@ int wanrouter_encapsulate(struct sk_buff *skb, struct net_device *dev, | |||
358 | */ | 358 | */ |
359 | 359 | ||
360 | 360 | ||
361 | unsigned short wanrouter_type_trans(struct sk_buff *skb, struct net_device *dev) | 361 | __be16 wanrouter_type_trans(struct sk_buff *skb, struct net_device *dev) |
362 | { | 362 | { |
363 | int cnt = skb->data[0] ? 0 : 1; /* there may be a pad present */ | 363 | int cnt = skb->data[0] ? 0 : 1; /* there may be a pad present */ |
364 | unsigned short ethertype; | 364 | __be16 ethertype; |
365 | 365 | ||
366 | switch (skb->data[cnt]) { | 366 | switch (skb->data[cnt]) { |
367 | case NLPID_IP: /* IP datagramm */ | 367 | case NLPID_IP: /* IP datagramm */ |
@@ -379,7 +379,7 @@ unsigned short wanrouter_type_trans(struct sk_buff *skb, struct net_device *dev) | |||
379 | skb->data[cnt+3], dev->name); | 379 | skb->data[cnt+3], dev->name); |
380 | return 0; | 380 | return 0; |
381 | } | 381 | } |
382 | ethertype = *((unsigned short*)&skb->data[cnt+4]); | 382 | ethertype = *((__be16*)&skb->data[cnt+4]); |
383 | cnt += 6; | 383 | cnt += 6; |
384 | break; | 384 | break; |
385 | 385 | ||