diff options
author | Stanislaw Gruszka <sgruszka@redhat.com> | 2011-04-28 11:51:32 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-04-29 15:36:14 -0400 |
commit | 28a6e577c65cc317fed5265efc43ce9282928bd4 (patch) | |
tree | 4d99bbef18582fe6f1d211920e25d3705be0a87d /drivers/net/wireless/iwlegacy/iwl-core.c | |
parent | 81e63263aa3c5bfa64aa3206f4be3e59afc1c183 (diff) | |
download | linux-stable-28a6e577c65cc317fed5265efc43ce9282928bd4.tar.gz linux-stable-28a6e577c65cc317fed5265efc43ce9282928bd4.tar.bz2 linux-stable-28a6e577c65cc317fed5265efc43ce9282928bd4.zip |
iwlegacy: more priv->mutex serialization
Check status bits with mutex taken, because when we wait for mutex
unlock, status can change. Patch should also make remaining sync
commands be send with priv->mutex taken. That will prevent execute
these commands when we are currently reset firmware, what could
possibly cause troubles.
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlegacy/iwl-core.c')
-rw-r--r-- | drivers/net/wireless/iwlegacy/iwl-core.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/wireless/iwlegacy/iwl-core.c b/drivers/net/wireless/iwlegacy/iwl-core.c index 553c91b3a258..0073f9239197 100644 --- a/drivers/net/wireless/iwlegacy/iwl-core.c +++ b/drivers/net/wireless/iwlegacy/iwl-core.c @@ -2429,11 +2429,13 @@ void iwl_legacy_mac_bss_info_changed(struct ieee80211_hw *hw, IWL_DEBUG_MAC80211(priv, "changes = 0x%X\n", changes); - if (!iwl_legacy_is_alive(priv)) - return; - mutex_lock(&priv->mutex); + if (!iwl_legacy_is_alive(priv)) { + mutex_unlock(&priv->mutex); + return; + } + if (changes & BSS_CHANGED_QOS) { unsigned long flags; |