]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/wan/dlci.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arjan/linux...
[linux-2.6-omap-h63xx.git] / drivers / net / wan / dlci.c
index 66be20c292b6dcd8855ec84830a15e7850c70baa..b14242768fad19c381cff1d3d232d4abcf5f7e24 100644 (file)
@@ -66,8 +66,8 @@ static void dlci_setup(struct net_device *);
  */
 
 static int dlci_header(struct sk_buff *skb, struct net_device *dev, 
-                           unsigned short type, void *daddr, void *saddr, 
-                           unsigned len)
+                      unsigned short type, const void *daddr,
+                      const void *saddr, unsigned len)
 {
        struct frhdr            hdr;
        struct dlci_local       *dlp;
@@ -361,7 +361,7 @@ static int dlci_add(struct dlci_add *dlci)
 
 
        /* validate slave device */
-       slave = dev_get_by_name(dlci->devname);
+       slave = dev_get_by_name(&init_net, dlci->devname);
        if (!slave)
                return -ENODEV;
 
@@ -427,7 +427,7 @@ static int dlci_del(struct dlci_add *dlci)
        int                     err;
 
        /* validate slave device */
-       master = __dev_get_by_name(dlci->devname);
+       master = __dev_get_by_name(&init_net, dlci->devname);
        if (!master)
                return(-ENODEV);
 
@@ -485,6 +485,10 @@ static int dlci_ioctl(unsigned int cmd, void __user *arg)
        return(err);
 }
 
+static const struct header_ops dlci_header_ops = {
+       .create = dlci_header,
+};
+
 static void dlci_setup(struct net_device *dev)
 {
        struct dlci_local *dlp = dev->priv;
@@ -494,7 +498,7 @@ static void dlci_setup(struct net_device *dev)
        dev->stop               = dlci_close;
        dev->do_ioctl           = dlci_dev_ioctl;
        dev->hard_start_xmit    = dlci_transmit;
-       dev->hard_header        = dlci_header;
+       dev->header_ops         = &dlci_header_ops;
        dev->get_stats          = dlci_get_stats;
        dev->change_mtu         = dlci_change_mtu;
        dev->destructor         = free_netdev;
@@ -513,6 +517,9 @@ static int dlci_dev_event(struct notifier_block *unused,
 {
        struct net_device *dev = (struct net_device *) ptr;
 
+       if (dev_net(dev) != &init_net)
+               return NOTIFY_DONE;
+
        if (event == NETDEV_UNREGISTER) {
                struct dlci_local *dlp;