[SK_BUFF]: Introduce skb_reset_mac_header(skb)
[powerpc.git] / net / atm / br2684.c
index 83a1c1b..900d42c 100644 (file)
@@ -182,7 +182,7 @@ static int br2684_xmit_vcc(struct sk_buff *skb, struct br2684_dev *brdev,
        ATM_SKB(skb)->vcc = atmvcc = brvcc->atmvcc;
        DPRINTK("atm_skb(%p)->vcc(%p)->dev(%p)\n", skb, atmvcc, atmvcc->dev);
        if (!atm_may_send(atmvcc, skb->truesize)) {
-               /* we free this here for now, because we cannot know in a higher 
+               /* we free this here for now, because we cannot know in a higher
                        layer whether the skb point it supplied wasn't freed yet.
                        now, it always is.
                */
@@ -375,11 +375,11 @@ packet_fails_filter(__be16 type, struct br2684_vcc *brvcc, struct sk_buff *skb)
 {
        if (brvcc->filter.netmask == 0)
                return 0;                       /* no filter in place */
-       if (type == __constant_htons(ETH_P_IP) &&
+       if (type == htons(ETH_P_IP) &&
            (((struct iphdr *) (skb->data))->daddr & brvcc->filter.
             netmask) == brvcc->filter.prefix)
                return 0;
-       if (type == __constant_htons(ETH_P_ARP))
+       if (type == htons(ETH_P_ARP))
                return 0;
        /* TODO: we should probably filter ARPs too.. don't want to have
         *   them returning values that don't make sense, or is that ok?
@@ -458,7 +458,7 @@ static void br2684_push(struct atm_vcc *atmvcc, struct sk_buff *skb)
        /* FIXME: tcpdump shows that pointer to mac header is 2 bytes earlier,
           than should be. What else should I set? */
        skb_pull(skb, plen);
-       skb->mac.raw = ((char *) (skb->data)) - ETH_HLEN;
+       skb->mac.raw = skb->data - ETH_HLEN;
        skb->pkt_type = PACKET_HOST;
 #ifdef CONFIG_BR2684_FAST_TRANS
        skb->protocol = ((u16 *) skb->data)[-1];
@@ -718,7 +718,7 @@ static void *br2684_seq_next(struct seq_file *seq, void *v, loff_t *pos)
 
        ++*pos;
 
-       brd = list_entry(brd->br2684_devs.next, 
+       brd = list_entry(brd->br2684_devs.next,
                         struct br2684_dev, br2684_devs);
        return (&brd->br2684_devs != &br2684_devs) ? brd : NULL;
 }
@@ -784,7 +784,7 @@ static int br2684_proc_open(struct inode *inode, struct file *file)
        return seq_open(file, &br2684_seq_ops);
 }
 
-static struct file_operations br2684_proc_ops = {
+static const struct file_operations br2684_proc_ops = {
        .owner   = THIS_MODULE,
        .open    = br2684_proc_open,
        .read    = seq_read,