diff options
author | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2008-03-04 21:09:32 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-03-07 16:03:00 -0500 |
commit | b716bb918f8f7967e361770eb1545d2b4bcffc26 (patch) | |
tree | a7d6e5c7198bac43c59ceb67f2d3798f1e9cf459 | |
parent | 4bf775cdc08b8741f78fbf85e3d2e6bebe783d32 (diff) |
iwlwifi: Cancel scanning upon association
This patch cancels an ongoing HW scan upon association. Not doing this
resulted in instability in association.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl3945-base.c | 17 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl4965-base.c | 17 |
2 files changed, 12 insertions, 22 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index a130f5d077f0..4aaced0b9f26 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c | |||
@@ -7004,6 +7004,12 @@ static int iwl3945_mac_config_interface(struct ieee80211_hw *hw, | |||
7004 | if (conf == NULL) | 7004 | if (conf == NULL) |
7005 | return -EIO; | 7005 | return -EIO; |
7006 | 7006 | ||
7007 | if (priv->vif != vif) { | ||
7008 | IWL_DEBUG_MAC80211("leave - priv->vif != vif\n"); | ||
7009 | mutex_unlock(&priv->mutex); | ||
7010 | return 0; | ||
7011 | } | ||
7012 | |||
7007 | /* XXX: this MUST use conf->mac_addr */ | 7013 | /* XXX: this MUST use conf->mac_addr */ |
7008 | 7014 | ||
7009 | if ((priv->iw_mode == IEEE80211_IF_TYPE_AP) && | 7015 | if ((priv->iw_mode == IEEE80211_IF_TYPE_AP) && |
@@ -7028,17 +7034,6 @@ static int iwl3945_mac_config_interface(struct ieee80211_hw *hw, | |||
7028 | if (unlikely(test_bit(STATUS_SCANNING, &priv->status)) && | 7034 | if (unlikely(test_bit(STATUS_SCANNING, &priv->status)) && |
7029 | !(priv->hw->flags & IEEE80211_HW_NO_PROBE_FILTERING)) { | 7035 | !(priv->hw->flags & IEEE80211_HW_NO_PROBE_FILTERING)) { |
7030 | */ | 7036 | */ |
7031 | if (unlikely(test_bit(STATUS_SCANNING, &priv->status))) { | ||
7032 | IWL_DEBUG_MAC80211("leave - scanning\n"); | ||
7033 | mutex_unlock(&priv->mutex); | ||
7034 | return 0; | ||
7035 | } | ||
7036 | |||
7037 | if (priv->vif != vif) { | ||
7038 | IWL_DEBUG_MAC80211("leave - priv->vif != vif\n"); | ||
7039 | mutex_unlock(&priv->mutex); | ||
7040 | return 0; | ||
7041 | } | ||
7042 | 7037 | ||
7043 | if (priv->iw_mode == IEEE80211_IF_TYPE_AP) { | 7038 | if (priv->iw_mode == IEEE80211_IF_TYPE_AP) { |
7044 | if (!conf->bssid) { | 7039 | if (!conf->bssid) { |
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c index d362c4c82db2..5005c9513007 100644 --- a/drivers/net/wireless/iwlwifi/iwl4965-base.c +++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c | |||
@@ -7424,6 +7424,12 @@ static int iwl4965_mac_config_interface(struct ieee80211_hw *hw, | |||
7424 | if (conf == NULL) | 7424 | if (conf == NULL) |
7425 | return -EIO; | 7425 | return -EIO; |
7426 | 7426 | ||
7427 | if (priv->vif != vif) { | ||
7428 | IWL_DEBUG_MAC80211("leave - priv->vif != vif\n"); | ||
7429 | mutex_unlock(&priv->mutex); | ||
7430 | return 0; | ||
7431 | } | ||
7432 | |||
7427 | if ((priv->iw_mode == IEEE80211_IF_TYPE_AP) && | 7433 | if ((priv->iw_mode == IEEE80211_IF_TYPE_AP) && |
7428 | (!conf->beacon || !conf->ssid_len)) { | 7434 | (!conf->beacon || !conf->ssid_len)) { |
7429 | IWL_DEBUG_MAC80211 | 7435 | IWL_DEBUG_MAC80211 |
@@ -7446,17 +7452,6 @@ static int iwl4965_mac_config_interface(struct ieee80211_hw *hw, | |||
7446 | if (unlikely(test_bit(STATUS_SCANNING, &priv->status)) && | 7452 | if (unlikely(test_bit(STATUS_SCANNING, &priv->status)) && |
7447 | !(priv->hw->flags & IEEE80211_HW_NO_PROBE_FILTERING)) { | 7453 | !(priv->hw->flags & IEEE80211_HW_NO_PROBE_FILTERING)) { |
7448 | */ | 7454 | */ |
7449 | if (unlikely(test_bit(STATUS_SCANNING, &priv->status))) { | ||
7450 | IWL_DEBUG_MAC80211("leave - scanning\n"); | ||
7451 | mutex_unlock(&priv->mutex); | ||
7452 | return 0; | ||
7453 | } | ||
7454 | |||
7455 | if (priv->vif != vif) { | ||
7456 | IWL_DEBUG_MAC80211("leave - priv->vif != vif\n"); | ||
7457 | mutex_unlock(&priv->mutex); | ||
7458 | return 0; | ||
7459 | } | ||
7460 | 7455 | ||
7461 | if (priv->iw_mode == IEEE80211_IF_TYPE_AP) { | 7456 | if (priv->iw_mode == IEEE80211_IF_TYPE_AP) { |
7462 | if (!conf->bssid) { | 7457 | if (!conf->bssid) { |