Rask Ingemann Lambertsen wrote:
What do you propose? Do we need something like
int vlan_adjust_mtu (int mtu)
{
#ifdef CONFIG_VLANN_8021Q
return (mtu - VLAN_HLEN);
#else
return (mtu);
#endif
}
and
int foobar_change_mtu (struct net_device *dev, int mtu)
{
mtu = vlan_adjust_mtu (mtu);
/* check hardware limits. */
...
dev->mtu = mtu;
return (0);
}
? Ben, this would also keep you happy, right?
I was thinking the check could be made run-time, but in reality, this is
a very minor detail. It may be better to just hard-code it like you
had it originally. I don't like the patch above, I'd rather see the
#ifdef when checking for the maximum hardware limit, if anywhere.
Thanks,
Ben
--
Ben Greear <greearb@xxxxxxxxxxxxxxx>
Candela Technologies Inc http://www.candelatech.com
|