wimax: replace uses of __constant_{endian}
authorHarvey Harrison <harvey.harrison@gmail.com>
Sat, 28 Feb 2009 23:42:53 +0000 (23:42 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 2 Mar 2009 11:10:27 +0000 (03:10 -0800)
Base versions handle constant folding now.

Edited by Inaky to fix conflicts due to changes in netdev.c

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/wimax/i2400m/netdev.c

index 2bdd0cdbb31961f8c4026dbc59666467e3f88983..a98eb4bafc56ecd8c88042aeafb1431786d79b61 100644 (file)
@@ -402,13 +402,13 @@ void i2400m_tx_timeout(struct net_device *net_dev)
  */
 static
 void i2400m_rx_fake_eth_header(struct net_device *net_dev,
-                              void *_eth_hdr, int protocol)
+                              void *_eth_hdr, __be16 protocol)
 {
        struct ethhdr *eth_hdr = _eth_hdr;
 
        memcpy(eth_hdr->h_dest, net_dev->dev_addr, sizeof(eth_hdr->h_dest));
        memset(eth_hdr->h_source, 0, sizeof(eth_hdr->h_dest));
-       eth_hdr->h_proto = cpu_to_be16(protocol);
+       eth_hdr->h_proto = protocol;
 }
 
 
@@ -474,7 +474,8 @@ void i2400m_net_rx(struct i2400m *i2400m, struct sk_buff *skb_rx,
                memcpy(skb_put(skb, buf_len), buf, buf_len);
        }
        i2400m_rx_fake_eth_header(i2400m->wimax_dev.net_dev,
-                                 skb->data - ETH_HLEN, ETH_P_IP);
+                                 skb->data - ETH_HLEN,
+                                 cpu_to_be16(ETH_P_IP));
        skb_set_mac_header(skb, -ETH_HLEN);
        skb->dev = i2400m->wimax_dev.net_dev;
        skb->protocol = htons(ETH_P_IP);
@@ -526,7 +527,8 @@ void i2400m_net_erx(struct i2400m *i2400m, struct sk_buff *skb,
        case I2400M_CS_IPV4:
                protocol = ETH_P_IP;
                i2400m_rx_fake_eth_header(i2400m->wimax_dev.net_dev,
-                                         skb->data - ETH_HLEN, ETH_P_IP);
+                                         skb->data - ETH_HLEN,
+                                         cpu_to_be16(ETH_P_IP));
                skb_set_mac_header(skb, -ETH_HLEN);
                skb->dev = i2400m->wimax_dev.net_dev;
                skb->protocol = htons(ETH_P_IP);