Skip to content

Commit

Permalink
iwlwifi: do not send sync command while holding spinlock
Browse files Browse the repository at this point in the history
commit 10c994ca70e8e94bbc85a5bf13de5911ee8de4d2 "iwlwifi: fix remove key
error" fixed an error reported by mac80211 during interface down. The fix
involved changing an async command to synchronous. Unfortunately this was
inside a spinlock section in which we cannot sleep.

Modify the sending of the command back to async. This causes the mac80211
error "mac80211-phy0: failed to remove key (0, ff:ff:ff:ff:ff:ff) from
hardware (-16)." to return. This error is not serious since this occurs
during interface down and the keys will be cleared anyway when ucode is
unloaded. Having this error message is thus less serious than a potential
deadlock introduced when sleeping while holding a spinlock. We will have to
find another fix for that error.

This is a revert of the abovementioned commit.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Reinette Chatre authored and John W. Linville committed Sep 23, 2009
1 parent 6a211bf commit bba9887
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/wireless/iwlwifi/iwl-sta.c
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ int iwl_send_static_wepkey_cmd(struct iwl_priv *priv, u8 send_if_empty)
struct iwl_host_cmd cmd = {
.id = REPLY_WEPKEY,
.data = wep_cmd,
.flags = CMD_SYNC,
.flags = CMD_ASYNC,
};

memset(wep_cmd, 0, cmd_size +
Expand Down

0 comments on commit bba9887

Please sign in to comment.