From: Samuel Ortiz Date: Fri, 16 Oct 2009 05:18:56 +0000 (+0800) Subject: iwmc3200wifi: Do not handle wifi command if the interface is not ready X-Git-Tag: MMI-PSA29.97-13-9~25754^2~599^2~60 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=56e3f085f5b5e49cca37a3d1b0aa4266b984eb12;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git iwmc3200wifi: Do not handle wifi command if the interface is not ready When resetting or bringing the interface down, we should just reject any wifi related command. Signed-off-by: Samuel Ortiz Signed-off-by: Zhu Yi Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/iwmc3200wifi/commands.c b/drivers/net/wireless/iwmc3200wifi/commands.c index d5125b7659a8..25fb8dfd83b5 100644 --- a/drivers/net/wireless/iwmc3200wifi/commands.c +++ b/drivers/net/wireless/iwmc3200wifi/commands.c @@ -76,6 +76,11 @@ int iwm_send_wifi_if_cmd(struct iwm_priv *iwm, void *payload, u16 payload_size, int ret; u8 oid = hdr->oid; + if (!test_bit(IWM_STATUS_READY, &iwm->status)) { + IWM_ERR(iwm, "Interface is not ready yet"); + return -EAGAIN; + } + umac_cmd.id = UMAC_CMD_OPCODE_WIFI_IF_WRAPPER; umac_cmd.resp = resp;