{
int ret;
- if (test_bit(WL1271_FLAG_SDIO_FAILED, &wl->flags))
+ if (test_bit(WL1271_FLAG_IO_FAILED, &wl->flags))
return -EIO;
ret = wl->if_ops->write(wl->dev, addr, buf, len, fixed);
- if (ret)
- set_bit(WL1271_FLAG_SDIO_FAILED, &wl->flags);
+ if (ret && wl->state != WL1271_STATE_OFF)
+ set_bit(WL1271_FLAG_IO_FAILED, &wl->flags);
return ret;
}
{
int ret;
- if (test_bit(WL1271_FLAG_SDIO_FAILED, &wl->flags))
+ if (test_bit(WL1271_FLAG_IO_FAILED, &wl->flags))
return -EIO;
ret = wl->if_ops->read(wl->dev, addr, buf, len, fixed);
- if (ret)
- set_bit(WL1271_FLAG_SDIO_FAILED, &wl->flags);
+ if (ret && wl->state != WL1271_STATE_OFF)
+ set_bit(WL1271_FLAG_IO_FAILED, &wl->flags);
return ret;
}
WL1271_FLAG_RECOVERY_IN_PROGRESS,
WL1271_FLAG_VIF_CHANGE_IN_PROGRESS,
WL1271_FLAG_INTENDED_FW_RECOVERY,
- WL1271_FLAG_SDIO_FAILED,
+ WL1271_FLAG_IO_FAILED,
};
enum wl12xx_vif_flags {