]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[NET]: __be'ify *_type_trans()
authorAlexey Dobriyan <adobriyan@gmail.com>
Tue, 12 Jul 2005 19:08:43 +0000 (12:08 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 12 Jul 2005 19:08:43 +0000 (12:08 -0700)
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>
16 files changed:
drivers/net/myri_sbus.c
drivers/net/plip.c
drivers/net/wan/farsync.c
drivers/net/wan/hdlc_cisco.c
drivers/net/wan/hdlc_ppp.c
drivers/net/wan/hdlc_raw.c
drivers/s390/net/qeth_main.c
include/linux/etherdevice.h
include/linux/fddidevice.h
include/linux/hdlc.h
include/linux/wanrouter.h
include/net/x25device.h
net/802/fddi.c
net/atm/br2684.c
net/ethernet/eth.c
net/wanrouter/wanmain.c

index aad5494c83cfc9d4aa80b6a1421855762559f17e..f0996ce5c268698b060a784fbe1ab0661817b577 100644 (file)
@@ -369,7 +369,7 @@ static void myri_tx(struct myri_eth *mp, struct net_device *dev)
  * assume 802.3 if the type field is short enough to be a length.
  * This is normal practice and works for any 'now in use' protocol.
  */
-static unsigned short myri_type_trans(struct sk_buff *skb, struct net_device *dev)
+static __be16 myri_type_trans(struct sk_buff *skb, struct net_device *dev)
 {
        struct ethhdr *eth;
        unsigned char *rawp;
index f4b62405d2e5997a2639e53424481d136e776961..21537ee3a6a774ec9a3b2331d28c72ab699fbd55 100644 (file)
@@ -540,7 +540,7 @@ plip_receive(unsigned short nibble_timeout, struct net_device *dev,
  *     in far too many old systems not all even running Linux.
  */
  
-static unsigned short plip_type_trans(struct sk_buff *skb, struct net_device *dev)
+static __be16 plip_type_trans(struct sk_buff *skb, struct net_device *dev)
 {
        struct ethhdr *eth;
        unsigned char *rawp;
index 7217d44e885404ca310571dc246121ba0ab9d4b5..2c83cca34b8698cc269a0feda4def2b5a5d00c9d 100644 (file)
@@ -861,8 +861,7 @@ fst_tx_dma_complete(struct fst_card_info *card, struct fst_port_info *port,
 /*
  * Mark it for our own raw sockets interface
  */
-static unsigned short farsync_type_trans(struct sk_buff *skb,
-                                        struct net_device *dev)
+static __be16 farsync_type_trans(struct sk_buff *skb, struct net_device *dev)
 {
        skb->dev = dev;
        skb->mac.raw = skb->data;
index 87496843681a874d463b6aaa5ae56a73cb548ab6..48c03c11cd9a36bc28b115fe3a52c1c0ccbe9362 100644 (file)
@@ -91,8 +91,7 @@ static void cisco_keepalive_send(struct net_device *dev, u32 type,
 
 
 
-static unsigned short cisco_type_trans(struct sk_buff *skb,
-                                      struct net_device *dev)
+static __be16 cisco_type_trans(struct sk_buff *skb, struct net_device *dev)
 {
        hdlc_header *data = (hdlc_header*)skb->data;
 
index 7cd6195a2e4613c031098b341a1982bced827c3c..b81263eaede07c0be93f732b21f60289041ec081 100644 (file)
@@ -66,8 +66,7 @@ static void ppp_close(struct net_device *dev)
 
 
 
-static unsigned short ppp_type_trans(struct sk_buff *skb,
-                                    struct net_device *dev)
+static __be16 ppp_type_trans(struct sk_buff *skb, struct net_device *dev)
 {
        return __constant_htons(ETH_P_WAN_PPP);
 }
index c41fb70b69292e42f2cf4111f230096382f969c2..9456d31cb1c148150e41ecbe1b87837f2df19672 100644 (file)
@@ -24,8 +24,7 @@
 #include <linux/hdlc.h>
 
 
-static unsigned short raw_type_trans(struct sk_buff *skb,
-                                    struct net_device *dev)
+static __be16 raw_type_trans(struct sk_buff *skb, struct net_device *dev)
 {
        return __constant_htons(ETH_P_IP);
 }
index 3cb88c770037fd306490b39e07b06ad38ab1ce09..8f4d2999af8ebafe3721222f9038a58ee0db137e 100644 (file)
@@ -2210,7 +2210,7 @@ no_mem:
        return NULL;
 }
 
-static inline unsigned short
+static inline __be16
 qeth_type_trans(struct sk_buff *skb, struct net_device *dev)
 {
        struct qeth_card *card;
index cf3847edc50f6c0199965d338b6e687d36786b74..ce8518e658b6a0c2219071ed0fbfb0e462fb9115 100644 (file)
@@ -33,7 +33,7 @@ extern int            eth_header(struct sk_buff *skb, struct net_device *dev,
                                   unsigned short type, void *daddr,
                                   void *saddr, unsigned len);
 extern int             eth_rebuild_header(struct sk_buff *skb);
-extern unsigned short  eth_type_trans(struct sk_buff *skb, struct net_device *dev);
+extern __be16          eth_type_trans(struct sk_buff *skb, struct net_device *dev);
 extern void            eth_header_cache_update(struct hh_cache *hh, struct net_device *dev,
                                                unsigned char * haddr);
 extern int             eth_header_cache(struct neighbour *neigh,
index 002f6367697d8b8d1ad5d83a5df4aa060e222616..e61e42dfd3175c5436c8130b16963bfea2052d3e 100644 (file)
@@ -25,7 +25,7 @@
 #include <linux/if_fddi.h>
 
 #ifdef __KERNEL__
-extern unsigned short  fddi_type_trans(struct sk_buff *skb,
+extern __be16  fddi_type_trans(struct sk_buff *skb,
                                struct net_device *dev);
 extern struct net_device *alloc_fddidev(int sizeof_priv);
 #endif
index ed2927ef1ff7e5436a5257e38243066edfb8d5ef..df695e9ae32761a2bef2611c0c06b03e94fb5429 100644 (file)
@@ -242,8 +242,8 @@ static __inline__ struct net_device_stats *hdlc_stats(struct net_device *dev)
 }
 
 
-static __inline__ unsigned short hdlc_type_trans(struct sk_buff *skb,
-                                                struct net_device *dev)
+static __inline__ __be16 hdlc_type_trans(struct sk_buff *skb,
+                                        struct net_device *dev)
 {
        hdlc_device *hdlc = dev_to_hdlc(dev);
 
index 3e89f0f15f499fff92f2df9ea38b62825d60bfa9..1b6b76a4eb540c815da474250b58e28ce4688e92 100644 (file)
@@ -516,8 +516,7 @@ struct wan_device {
 /* Public functions available for device drivers */
 extern int register_wan_device(struct wan_device *wandev);
 extern int unregister_wan_device(char *name);
-unsigned short wanrouter_type_trans(struct sk_buff *skb,
-                                   struct net_device *dev);
+__be16 wanrouter_type_trans(struct sk_buff *skb, struct net_device *dev);
 int wanrouter_encapsulate(struct sk_buff *skb, struct net_device *dev,
                          unsigned short type);
 
index cf36a20ea3c523459485e92d469366504541599e..d45ae883bd1dabebf1e304bf29e6e5c382267a5f 100644 (file)
@@ -5,8 +5,7 @@
 #include <linux/if_packet.h>
 #include <linux/skbuff.h>
 
-static inline unsigned short x25_type_trans(struct sk_buff *skb,
-                                           struct net_device *dev)
+static inline __be16 x25_type_trans(struct sk_buff *skb, struct net_device *dev)
 {
        skb->mac.raw = skb->data;
        skb->input_dev = skb->dev = dev;
index ebcf4830d6f11a4da50fd17f40ee00f25c716c5a..5ce24c4bb840c7171b5948d797cb98b5267a9307 100644 (file)
@@ -122,10 +122,10 @@ static int fddi_rebuild_header(struct sk_buff     *skb)
  * the proper pointer to the start of packet data (skb->data).
  */
  
-unsigned short fddi_type_trans(struct sk_buff *skb, struct net_device *dev)
+__be16 fddi_type_trans(struct sk_buff *skb, struct net_device *dev)
 {
        struct fddihdr *fddi = (struct fddihdr *)skb->data;
-       unsigned short type;
+       __be16 type;
        
        /*
         * Set mac.raw field to point to FC byte, set data field to point
index e6954cf1459d1da367226ff0f5b954daa0d4e45e..289956c4dd3e8c1bc1501e9ed429a3f2de272ce8 100644 (file)
@@ -289,8 +289,7 @@ xmit will add the additional header part in that case */
  * This is similar to eth_type_trans, which cannot be used because of
  * our dev->hard_header_len
  */
-static inline unsigned short br_type_trans(struct sk_buff *skb,
-                                              struct net_device *dev)
+static inline __be16 br_type_trans(struct sk_buff *skb, struct net_device *dev)
 {
        struct ethhdr *eth;
        unsigned char *rawp;
index ab60ea63688e757b99de1afcc2a60a174899774e..f6dbfb99b14ddf76db0d26eae2d904fda3ccb5c0 100644 (file)
@@ -155,7 +155,7 @@ int eth_rebuild_header(struct sk_buff *skb)
  *     This is normal practice and works for any 'now in use' protocol.
  */
  
-unsigned short eth_type_trans(struct sk_buff *skb, struct net_device *dev)
+__be16 eth_type_trans(struct sk_buff *skb, struct net_device *dev)
 {
        struct ethhdr *eth;
        unsigned char *rawp;
index d6844ac226f5e17cead226a4e083ae0d7d81b5ea..13b650ad22e21a6a6bec891d5bfe8ce4efb52236 100644 (file)
@@ -358,10 +358,10 @@ int wanrouter_encapsulate(struct sk_buff *skb, struct net_device *dev,
  */
 
 
-unsigned short wanrouter_type_trans(struct sk_buff *skb, struct net_device *dev)
+__be16 wanrouter_type_trans(struct sk_buff *skb, struct net_device *dev)
 {
        int cnt = skb->data[0] ? 0 : 1; /* there may be a pad present */
-       unsigned short ethertype;
+       __be16 ethertype;
 
        switch (skb->data[cnt]) {
        case NLPID_IP:          /* IP datagramm */
@@ -379,7 +379,7 @@ unsigned short wanrouter_type_trans(struct sk_buff *skb, struct net_device *dev)
                                skb->data[cnt+3], dev->name);
                        return 0;
                }
-               ethertype = *((unsigned short*)&skb->data[cnt+4]);
+               ethertype = *((__be16*)&skb->data[cnt+4]);
                cnt += 6;
                break;