]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/isdn/i4l/isdn_ppp.c
bonding: Convert more locks to _bh, acquire rtnl, for new locking
[linux-2.6-omap-h63xx.git] / drivers / isdn / i4l / isdn_ppp.c
index 4e3f127e4003612106c3b1fa10aab971bd88e69b..9f5fe372f83ddd5846685358458a977ddbedc425 100644 (file)
@@ -190,9 +190,11 @@ isdn_ppp_bind(isdn_net_local * lp)
                retval = -1;
                goto out;
        }
-       unit = isdn_ppp_if_get_unit(lp->name);  /* get unit number from interface name .. ugly! */
+       /* get unit number from interface name .. ugly! */
+       unit = isdn_ppp_if_get_unit(lp->netdev->dev->name);
        if (unit < 0) {
-               printk(KERN_ERR "isdn_ppp_bind: illegal interface name %s.\n", lp->name);
+               printk(KERN_ERR "isdn_ppp_bind: illegal interface name %s.\n",
+                       lp->netdev->dev->name);
                retval = -1;
                goto out;
        }
@@ -360,7 +362,7 @@ isdn_ppp_release(int min, struct file *file)
                 * isdn_ppp_free() sets is->lp to NULL and lp->ppp_slot to -1
                 * removing the IPPP_CONNECT flag omits calling of isdn_ppp_wakeup_daemon()
                 */
-               isdn_net_hangup(&p->dev);
+               isdn_net_hangup(p->dev);
        }
        for (i = 0; i < NUM_RCV_BUFFS; i++) {
                kfree(is->rq[i].buf);
@@ -507,7 +509,8 @@ isdn_ppp_ioctl(int min, struct file *file, unsigned int cmd, unsigned long arg)
                case PPPIOCGIFNAME:
                        if(!lp)
                                return -EINVAL;
-                       if ((r = set_arg(argp, lp->name, strlen(lp->name))))
+                       if ((r = set_arg(argp, lp->netdev->dev->name,
+                               strlen(lp->netdev->dev->name))))
                                return r;
                        break;
                case PPPIOCGMPFLAGS:    /* get configuration flags */
@@ -531,7 +534,7 @@ isdn_ppp_ioctl(int min, struct file *file, unsigned int cmd, unsigned long arg)
                                if (lp) {
                                        /* OK .. we are ready to send buffers */
                                        is->pppcfg = val; /* isdn_ppp_xmit test for SC_ENABLE_IP !!! */
-                                       netif_wake_queue(&lp->netdev->dev);
+                                       netif_wake_queue(lp->netdev->dev);
                                        break;
                                }
                        }
@@ -1023,7 +1026,7 @@ void isdn_ppp_receive(isdn_net_dev * net_dev, isdn_net_local * lp, struct sk_buf
 static void
 isdn_ppp_push_higher(isdn_net_dev * net_dev, isdn_net_local * lp, struct sk_buff *skb, int proto)
 {
-       struct net_device *dev = &net_dev->dev;
+       struct net_device *dev = net_dev->dev;
        struct ippp_struct *is, *mis;
        isdn_net_local *mlp = NULL;
        int slot;
@@ -1100,7 +1103,8 @@ isdn_ppp_push_higher(isdn_net_dev * net_dev, isdn_net_local * lp, struct sk_buff
                                        goto drop_packet;
                                }
                                skb_put(skb, skb_old->len + 128);
-                               memcpy(skb->data, skb_old->data, skb_old->len);
+                               skb_copy_from_linear_data(skb_old, skb->data,
+                                                         skb_old->len);
                                if (net_dev->local->ppp_slot < 0) {
                                        printk(KERN_ERR "%s: net_dev->local->ppp_slot(%d) out of range\n",
                                                __FUNCTION__, net_dev->local->ppp_slot);
@@ -1167,7 +1171,7 @@ isdn_ppp_push_higher(isdn_net_dev * net_dev, isdn_net_local * lp, struct sk_buff
                mlp->huptimer = 0;
 #endif /* CONFIG_IPPP_FILTER */
        skb->dev = dev;
-       skb->mac.raw = skb->data;
+       skb_reset_mac_header(skb);
        netif_rx(skb);
        /* net_dev->local->stats.rx_packets++; done in isdn_net.c */
        return;
@@ -1680,7 +1684,7 @@ static void isdn_ppp_mp_receive(isdn_net_dev * net_dev, isdn_net_local * lp,
         * - we hit a gap in the sequence, so no reassembly/processing is 
         *   possible ('start' would be set to NULL)
         *
-        * algorightm for this code is derived from code in the book
+        * algorithm for this code is derived from code in the book
         * 'PPP Design And Debugging' by James Carlson (Addison-Wesley)
         */
        while (start != NULL || newfrag != NULL) {
@@ -1902,7 +1906,9 @@ void isdn_ppp_mp_reassembly( isdn_net_dev * net_dev, isdn_net_local * lp,
                while( from != to ) {
                        unsigned int len = from->len - MP_HEADER_LEN;
 
-                       memcpy(skb_put(skb,len), from->data+MP_HEADER_LEN, len);
+                       skb_copy_from_linear_data_offset(from, MP_HEADER_LEN,
+                                                        skb_put(skb,len),
+                                                        len);
                        frag = from->next;
                        isdn_ppp_mp_free_skb(mp, from);
                        from = frag;