Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7fd71e58b038a7244c2ac1ee579c43947f3968c4
Commit:     7fd71e58b038a7244c2ac1ee579c43947f3968c4
Parent:     71f1bb1a8f17db3caba1237dfd478c2a13faf63e
Author:     Al Viro <[EMAIL PROTECTED]>
AuthorDate: Sat Dec 22 17:27:24 2007 +0000
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Sat Dec 22 22:53:06 2007 -0500

    cycx: annotations and fixes (.24 fodder?)
    
    skb->protocol is net-endian, TYVM...
    
    Signed-off-by: Al Viro <[EMAIL PROTECTED]>
    Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 drivers/net/wan/cycx_x25.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/net/wan/cycx_x25.c b/drivers/net/wan/cycx_x25.c
index 8a1778c..d3b28b0 100644
--- a/drivers/net/wan/cycx_x25.c
+++ b/drivers/net/wan/cycx_x25.c
@@ -503,7 +503,7 @@ static int cycx_netdevice_init(struct net_device *dev)
        dev->addr_len           = 0;            /* hardware address length */
 
        if (!chan->svc)
-               *(u16*)dev->dev_addr = htons(chan->lcn);
+               *(__be16*)dev->dev_addr = htons(chan->lcn);
 
        /* Initialize hardware parameters (just for reference) */
        dev->irq                = wandev->irq;
@@ -565,7 +565,7 @@ static int cycx_netdevice_hard_header(struct sk_buff *skb,
                                      const void *daddr, const void *saddr,
                                      unsigned len)
 {
-       skb->protocol = type;
+       skb->protocol = htons(type);
 
        return dev->hard_header_len;
 }
@@ -600,15 +600,15 @@ static int cycx_netdevice_hard_start_xmit(struct sk_buff 
*skb,
        struct cycx_device *card = chan->card;
 
        if (!chan->svc)
-               chan->protocol = skb->protocol;
+               chan->protocol = ntohs(skb->protocol);
 
        if (card->wandev.state != WAN_CONNECTED)
                ++chan->ifstats.tx_dropped;
        else if (chan->svc && chan->protocol &&
-                chan->protocol != skb->protocol) {
+                chan->protocol != ntohs(skb->protocol)) {
                printk(KERN_INFO
                       "%s: unsupported Ethertype 0x%04X on interface %s!\n",
-                      card->devname, skb->protocol, dev->name);
+                      card->devname, ntohs(skb->protocol), dev->name);
                ++chan->ifstats.tx_errors;
        } else if (chan->protocol == ETH_P_IP) {
                switch (chan->state) {
@@ -1401,7 +1401,7 @@ static void cycx_x25_set_chan_state(struct net_device 
*dev, u8 state)
                switch (state) {
                case WAN_CONNECTED:
                        string_state = "connected!";
-                       *(u16*)dev->dev_addr = htons(chan->lcn);
+                       *(__be16*)dev->dev_addr = htons(chan->lcn);
                        netif_wake_queue(dev);
                        reset_timer(dev);
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to