Commit b515eff3 authored by Tomasz Wlostowski's avatar Tomasz Wlostowski Committed by Alessandro Rubini

calibration ioctl: TX pattern can be enabled regardless of the link state

parent d38bd756
......@@ -786,23 +786,15 @@ static int calibration_ioctl(struct net_device *netdev, struct ifreq *rq,
switch(cal_req.cmd) {
case CAL_CMD_TX_ON:
if(nic->iface_up) {
tmp = phy_read(netdev, 0, MDIO_REG_WR_SPEC);
phy_write(netdev, 0, MDIO_REG_WR_SPEC,
tmp | MDIO_WR_SPEC_TX_CAL);
} else {
return -EFAULT;
}
break;
case CAL_CMD_TX_OFF:
if(nic->iface_up) {
tmp = phy_read(netdev, 0, MDIO_REG_WR_SPEC);
phy_write(netdev, 0, MDIO_REG_WR_SPEC,
tmp & (~MDIO_WR_SPEC_TX_CAL));
} else {
return -EFAULT;
}
break;
case CAL_CMD_RX_ON:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment