Skip to content

Commit

Permalink
iwmc3200wifi: Do not handle wifi command if the interface is not ready
Browse files Browse the repository at this point in the history
When resetting or bringing the interface down, we should just reject any wifi
related command.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Samuel Ortiz authored and John W. Linville committed Oct 27, 2009
1 parent 708567e commit 56e3f08
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/net/wireless/iwmc3200wifi/commands.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 56e3f08

Please sign in to comment.