
SIOCSMACSPEED and SIOCIFSETCHAR ioctl commands perform some of the same tasks.)
case SIOCSMACSPEED: 1
if ((speed != 0) && (speed != 10)) { status = EINVAL;
break;
}
break;
2
1
2
Determines whether the cmd argument is SIOCSMACSPEED.
If the LAN speed passed is anything other than 10 (0 means no change), fails the request. (The if_el device can only operate at 10 Mb per second.)
12.15 Resetting the Device (SIOCIFRESET ioctl Command)
The following code shows how the el_ioctl( ) routine implements the SIOCIFRESET ioctl command to reset the device. Support for the SIOCIFRESET command is optional. You can choose whether or not your driver supports it.
case SIOCIFRESET: 1
el_reset_locked(sc, ifp, unit); break;
2
1
2
Determines whether the cmd argument is SIOCIFRESET.
Calls the el_reset_locked( ) routine to restart the network interface.
12.16Setting Device Characteristics (SIOCIFSETCHAR ioctl Command)
The following code shows how the el_ioctl( ) routine implements the SIOCIFSETCHAR ioctl command to set characteristics:
case SIOCIFSETCHAR: 1 need_reset = 0; 2
if
break;
}
3
if
status = EINVAL; break;
}
4