Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
[pandora-kernel.git] / drivers / net / wimax / i2400m / netdev.c
index 2bdd0cd..6b1fe7a 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);
@@ -519,14 +520,15 @@ void i2400m_net_erx(struct i2400m *i2400m, struct sk_buff *skb,
        struct device *dev = i2400m_dev(i2400m);
        int protocol;
 
-       d_fnstart(2, dev, "(i2400m %p skb %p [%zu] cs %d)\n",
+       d_fnstart(2, dev, "(i2400m %p skb %p [%u] cs %d)\n",
                  i2400m, skb, skb->len, cs);
        switch(cs) {
        case I2400M_CS_IPV4_0:
        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);
@@ -543,7 +545,7 @@ void i2400m_net_erx(struct i2400m *i2400m, struct sk_buff *skb,
        d_dump(4, dev, skb->data, skb->len);
        netif_rx_ni(skb);       /* see notes in function header */
 error:
-       d_fnend(2, dev, "(i2400m %p skb %p [%zu] cs %d) = void\n",
+       d_fnend(2, dev, "(i2400m %p skb %p [%u] cs %d) = void\n",
                i2400m, skb, skb->len, cs);
 }