- /* Set settings */
- case ETHTOOL_SSET: {
- struct ethtool_cmd ecmd;
- u_char cr;
- u_long flags;
-
- /* DE205 is the only card with anything to set */
- if (lp->adapter_name[4] != '5')
- return -EOPNOTSUPP;
-
- if (copy_from_user(&ecmd, useraddr, sizeof(ecmd)))
- return -EFAULT;
-
- /* Sanity-check parameters */
- if (ecmd.speed != SPEED_10)
- return -EINVAL;
- if (ecmd.port != PORT_TP && ecmd.port != PORT_BNC)
- return -EINVAL; /* AUI is not software-selectable */
- if (ecmd.transceiver != XCVR_INTERNAL)
- return -EINVAL;
- if (ecmd.duplex != DUPLEX_HALF)
- return -EINVAL;
- if (ecmd.phy_address != 0)
- return -EINVAL;
-
- spin_lock_irqsave(&lp->hw_lock, flags);
- cr = inb(EWRK3_CR);
-
- /* If Autoneg is set, change to Auto Port mode */
- /* Otherwise, disable Auto Port and set port explicitly */
- if (ecmd.autoneg) {
- cr &= ~CR_APD;
- } else {
- cr |= CR_APD;
- if (ecmd.port == PORT_TP)
- cr &= ~CR_PSEL; /* Force TP */
- else
- cr |= CR_PSEL; /* Force BNC */
- }
-
- /* Commit the changes */
- outb(cr, EWRK3_CR);
+ ecmd->supported |= SUPPORTED_10baseT_Half;
+ ecmd->speed = SPEED_10;
+ ecmd->duplex = DUPLEX_HALF;
+ return 0;
+}