From: Inaky Perez-Gonzalez <inaky@linux.intel.com>
To: wimax@linuxwimax.org
Cc: netdev@vger.kernel.org, Harvey Harrison <harvey.harrison@gmail.com>
Subject: [PATCH] wimax: replace uses of __constant_{endian}
Date: Sun, 1 Mar 2009 01:42:53 -0800 [thread overview]
Message-ID: <1235900574-15319-7-git-send-email-inaky@linux.intel.com> (raw)
In-Reply-To: <1235900574-15319-6-git-send-email-inaky@linux.intel.com>
From: Harvey Harrison <harvey.harrison@gmail.com>
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>
---
drivers/net/wimax/i2400m/netdev.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/net/wimax/i2400m/netdev.c b/drivers/net/wimax/i2400m/netdev.c
index 2bdd0cd..a98eb4b 100644
--- a/drivers/net/wimax/i2400m/netdev.c
+++ b/drivers/net/wimax/i2400m/netdev.c
@@ -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);
--
1.5.6.5
next prev parent reply other threads:[~2009-03-01 9:42 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-01 9:42 [PATCH] wimax/i2400m: add the ability to fallback to other firmware files if the default is not there Inaky Perez-Gonzalez
2009-03-01 9:42 ` [PATCH] wimax/i2400m: drop support for deprecated major fw interface, add for new minor Inaky Perez-Gonzalez
2009-03-01 9:42 ` [PATCH] wimax/i2400m: firmware_check() encodes the firmware version in i2400m->fw_version Inaky Perez-Gonzalez
2009-03-01 9:42 ` [PATCH] wimax/i2400m: allow control of the base-station idle mode timeout Inaky Perez-Gonzalez
2009-03-01 9:42 ` [PATCH] wimax: struct device - replace bus_id with dev_name(), dev_set_name() Inaky Perez-Gonzalez
2009-03-01 9:42 ` [PATCH] wimax/i2400m: support extended data RX protocol (no need to reallocate skbs) Inaky Perez-Gonzalez
2009-03-01 9:42 ` Inaky Perez-Gonzalez [this message]
2009-03-01 9:42 ` [PATCH] wimax/i2400m: implement RX reorder support Inaky Perez-Gonzalez
2009-03-01 19:06 ` [PATCH] wimax: replace uses of __constant_{endian} Harvey Harrison
2009-03-02 0:07 ` Inaky Perez-Gonzalez
2009-03-01 9:56 ` [PATCH] WiMAX-next for 2.6.30 Inaky Perez-Gonzalez
2009-03-02 11:12 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1235900574-15319-7-git-send-email-inaky@linux.intel.com \
--to=inaky@linux.intel.com \
--cc=harvey.harrison@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=wimax@linuxwimax.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).