]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/arcnet/arc-rawmode.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/shaggy...
[linux-2.6-omap-h63xx.git] / drivers / net / arcnet / arc-rawmode.c
index e7555d4e6ff1c98e44cae1de1cc1048e33d4816c..3ff9affb1a914e212de008728985598e8e724bf8 100644 (file)
@@ -87,14 +87,14 @@ MODULE_LICENSE("GPL");
 static void rx(struct net_device *dev, int bufnum,
               struct archdr *pkthdr, int length)
 {
-       struct arcnet_local *lp = dev->priv;
+       struct arcnet_local *lp = netdev_priv(dev);
        struct sk_buff *skb;
        struct archdr *pkt = pkthdr;
        int ofs;
 
        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 */
@@ -125,7 +125,6 @@ static void rx(struct net_device *dev, int bufnum,
        skb->protocol = __constant_htons(ETH_P_ARCNET);
 ;
        netif_rx(skb);
-       dev->last_rx = jiffies;
 }
 
 
@@ -168,7 +167,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 arcnet_local *lp = dev->priv;
+       struct arcnet_local *lp = netdev_priv(dev);
        struct arc_hardware *hard = &pkt->hard;
        int ofs;
 
@@ -183,7 +182,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) {