> +static int aqc111_change_mtu(struct net_device *net, int new_mtu)
> +{
> +     struct usbnet *dev = netdev_priv(net);
> +     u16 reg16 = 0;
> +     u8 buf[5];
> +
> +     if (new_mtu <= 0 || new_mtu > 16334) {
> +             netdev_info(net, "Invalid MTU %d requested, hw max 16334",
> +                         new_mtu);
> +             return -EINVAL;
> +     }

Please set net->min_mtu, and net->max_mtu, and the core should do this
checking for you. See dev_set_mtu_ext().

         Andrew

Reply via email to