diff options
Diffstat (limited to 'drivers/net/wan/cycx_x25.c')
-rw-r--r-- | 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 8a1778cf98d1..d3b28b01b9f9 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) | |||
503 | dev->addr_len = 0; /* hardware address length */ | 503 | dev->addr_len = 0; /* hardware address length */ |
504 | 504 | ||
505 | if (!chan->svc) | 505 | if (!chan->svc) |
506 | *(u16*)dev->dev_addr = htons(chan->lcn); | 506 | *(__be16*)dev->dev_addr = htons(chan->lcn); |
507 | 507 | ||
508 | /* Initialize hardware parameters (just for reference) */ | 508 | /* Initialize hardware parameters (just for reference) */ |
509 | dev->irq = wandev->irq; | 509 | dev->irq = wandev->irq; |
@@ -565,7 +565,7 @@ static int cycx_netdevice_hard_header(struct sk_buff *skb, | |||
565 | const void *daddr, const void *saddr, | 565 | const void *daddr, const void *saddr, |
566 | unsigned len) | 566 | unsigned len) |
567 | { | 567 | { |
568 | skb->protocol = type; | 568 | skb->protocol = htons(type); |
569 | 569 | ||
570 | return dev->hard_header_len; | 570 | return dev->hard_header_len; |
571 | } | 571 | } |
@@ -600,15 +600,15 @@ static int cycx_netdevice_hard_start_xmit(struct sk_buff *skb, | |||
600 | struct cycx_device *card = chan->card; | 600 | struct cycx_device *card = chan->card; |
601 | 601 | ||
602 | if (!chan->svc) | 602 | if (!chan->svc) |
603 | chan->protocol = skb->protocol; | 603 | chan->protocol = ntohs(skb->protocol); |
604 | 604 | ||
605 | if (card->wandev.state != WAN_CONNECTED) | 605 | if (card->wandev.state != WAN_CONNECTED) |
606 | ++chan->ifstats.tx_dropped; | 606 | ++chan->ifstats.tx_dropped; |
607 | else if (chan->svc && chan->protocol && | 607 | else if (chan->svc && chan->protocol && |
608 | chan->protocol != skb->protocol) { | 608 | chan->protocol != ntohs(skb->protocol)) { |
609 | printk(KERN_INFO | 609 | printk(KERN_INFO |
610 | "%s: unsupported Ethertype 0x%04X on interface %s!\n", | 610 | "%s: unsupported Ethertype 0x%04X on interface %s!\n", |
611 | card->devname, skb->protocol, dev->name); | 611 | card->devname, ntohs(skb->protocol), dev->name); |
612 | ++chan->ifstats.tx_errors; | 612 | ++chan->ifstats.tx_errors; |
613 | } else if (chan->protocol == ETH_P_IP) { | 613 | } else if (chan->protocol == ETH_P_IP) { |
614 | switch (chan->state) { | 614 | switch (chan->state) { |
@@ -1401,7 +1401,7 @@ static void cycx_x25_set_chan_state(struct net_device *dev, u8 state) | |||
1401 | switch (state) { | 1401 | switch (state) { |
1402 | case WAN_CONNECTED: | 1402 | case WAN_CONNECTED: |
1403 | string_state = "connected!"; | 1403 | string_state = "connected!"; |
1404 | *(u16*)dev->dev_addr = htons(chan->lcn); | 1404 | *(__be16*)dev->dev_addr = htons(chan->lcn); |
1405 | netif_wake_queue(dev); | 1405 | netif_wake_queue(dev); |
1406 | reset_timer(dev); | 1406 | reset_timer(dev); |
1407 | 1407 | ||