[brcm47xx] add patches for kernel 2.6.31
[openwrt-10.03/.git] / package / switch / src / switch-robo.c
index a0051a32fe89556c4e0103e2ad7015c136e7e64e..206359d07bd5511f66f8842a8b91a876fc7b9bd5 100644 (file)
@@ -101,7 +101,11 @@ static int do_ioctl(int cmd, void *buf)
                robo.ifr.ifr_data = (caddr_t) buf;
 
        set_fs(KERNEL_DS);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31)
+       ret = robo.dev->netdev_ops->ndo_do_ioctl(robo.dev, &robo.ifr, cmd);
+#else
        ret = robo.dev->do_ioctl(robo.dev, &robo.ifr, cmd);
+#endif
        set_fs(old_fs);
 
        return ret;