There're two entry points to set the promiscuous and allmulti mode. One
is ioctl and another is the init routine. Well they share almost the
identical logic so refactor a little to make the code clear.
While here, for the ioctl, translate the error to EINVAL to avoid
confusing the net stack.
MFC after: 1 week