switch: warn if ndo_do_ioctl is not implemented in the Ethernet driver
authorHauke Mehrtens <hauke@hauke-m.de>
Sat, 22 Sep 2012 12:29:23 +0000 (12:29 +0000)
committerHauke Mehrtens <hauke@hauke-m.de>
Sat, 22 Sep 2012 12:29:23 +0000 (12:29 +0000)
SVN-Revision: 33506

package/switch/src/switch-robo.c

index 5b849cb33d78fd5bce0d0883fff4ccbfedb5ebec..f1160c8894a160389f9c4e9780fe5153e3256159 100644 (file)
@@ -269,6 +269,10 @@ static int robo_probe(char *devname)
                printk("No such device\n");
                return 1;
        }
+       if (!robo.dev->netdev_ops || !robo.dev->netdev_ops->ndo_do_ioctl) {
+               printk("ndo_do_ioctl not implemented in ethernet driver\n");
+               return 1;
+       }
 
        robo.device = devname;
        for (i = 0; i < 5; i++)