iwlwifi: style fixes to usage of << and >> operators
[safe/jmp/linux-2.6] / drivers / net / arcnet / arc-rawmode.c
index e1ea29b..e0a18e7 100644 (file)
@@ -42,7 +42,7 @@ static int build_header(struct sk_buff *skb, struct net_device *dev,
 static int prepare_tx(struct net_device *dev, struct archdr *pkt, int length,
                      int bufnum);
 
-struct ArcProto rawmode_proto =
+static struct ArcProto rawmode_proto =
 {
        .suffix         = 'r',
        .mtu            = XMTU,
@@ -94,7 +94,7 @@ static void rx(struct net_device *dev, int bufnum,
 
        BUGMSG(D_DURING, "it's a raw packet (length=%d)\n", length);
 
-       if (length >= MinTU)
+       if (length > MTU)
                ofs = 512 - length;
        else
                ofs = 256 - length;
@@ -110,7 +110,7 @@ static void rx(struct net_device *dev, int bufnum,
 
        pkt = (struct archdr *) skb->data;
 
-       skb->mac.raw = skb->data;
+       skb_reset_mac_header(skb);
        skb_pull(skb, ARC_HDR_SIZE);
 
        /* up to sizeof(pkt->soft) has already been copied from the card */
@@ -183,7 +183,7 @@ static int prepare_tx(struct net_device *dev, struct archdr *pkt, int length,
                       length, XMTU);
                length = XMTU;
        }
-       if (length > MinTU) {
+       if (length >= MinTU) {
                hard->offset[0] = 0;
                hard->offset[1] = ofs = 512 - length;
        } else if (length > MTU) {