Skip to content

Commit

Permalink
[BNX2]: Endian fixes.
Browse files Browse the repository at this point in the history
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Alexey Dobriyan authored and David S. Miller committed Jun 18, 2006
1 parent 8ef80ae commit d1e100b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/bnx2.c
Original file line number Diff line number Diff line change
Expand Up @@ -1820,7 +1820,7 @@ bnx2_rx_int(struct bnx2 *bp, int budget)
skb->protocol = eth_type_trans(skb, bp->dev);

if ((len > (bp->dev->mtu + ETH_HLEN)) &&
(htons(skb->protocol) != 0x8100)) {
(ntohs(skb->protocol) != 0x8100)) {

dev_kfree_skb_irq(skb);
goto next_rx;
Expand Down Expand Up @@ -4310,7 +4310,7 @@ bnx2_start_xmit(struct sk_buff *skb, struct net_device *dev)
ip_tcp_len = (skb->nh.iph->ihl << 2) + sizeof(struct tcphdr);

skb->nh.iph->check = 0;
skb->nh.iph->tot_len = ntohs(mss + ip_tcp_len + tcp_opt_len);
skb->nh.iph->tot_len = htons(mss + ip_tcp_len + tcp_opt_len);
skb->h.th->check =
~csum_tcpudp_magic(skb->nh.iph->saddr,
skb->nh.iph->daddr,
Expand Down

0 comments on commit d1e100b

Please sign in to comment.