diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl3945-base.c | 32 |
1 files changed, 28 insertions, 4 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index f1e19393a5f3..4f22a7174caf 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c | |||
@@ -6606,7 +6606,7 @@ static void iwl_bg_request_scan(struct work_struct *data) | |||
6606 | memcpy(scan->direct_scan[0].ssid, | 6606 | memcpy(scan->direct_scan[0].ssid, |
6607 | priv->direct_ssid, priv->direct_ssid_len); | 6607 | priv->direct_ssid, priv->direct_ssid_len); |
6608 | direct_mask = 1; | 6608 | direct_mask = 1; |
6609 | } else if (!iwl_is_associated(priv)) { | 6609 | } else if (!iwl_is_associated(priv) && priv->essid_len) { |
6610 | scan->direct_scan[0].id = WLAN_EID_SSID; | 6610 | scan->direct_scan[0].id = WLAN_EID_SSID; |
6611 | scan->direct_scan[0].len = priv->essid_len; | 6611 | scan->direct_scan[0].len = priv->essid_len; |
6612 | memcpy(scan->direct_scan[0].ssid, priv->essid, priv->essid_len); | 6612 | memcpy(scan->direct_scan[0].ssid, priv->essid, priv->essid_len); |
@@ -6745,6 +6745,10 @@ static void iwl_bg_post_associate(struct work_struct *data) | |||
6745 | 6745 | ||
6746 | mutex_lock(&priv->mutex); | 6746 | mutex_lock(&priv->mutex); |
6747 | 6747 | ||
6748 | if (!priv->interface_id || !priv->is_open) { | ||
6749 | mutex_unlock(&priv->mutex); | ||
6750 | return; | ||
6751 | } | ||
6748 | iwl_scan_cancel_timeout(priv, 200); | 6752 | iwl_scan_cancel_timeout(priv, 200); |
6749 | 6753 | ||
6750 | conf = ieee80211_get_hw_conf(priv->hw); | 6754 | conf = ieee80211_get_hw_conf(priv->hw); |
@@ -6885,9 +6889,19 @@ static void iwl_mac_stop(struct ieee80211_hw *hw) | |||
6885 | struct iwl_priv *priv = hw->priv; | 6889 | struct iwl_priv *priv = hw->priv; |
6886 | 6890 | ||
6887 | IWL_DEBUG_MAC80211("enter\n"); | 6891 | IWL_DEBUG_MAC80211("enter\n"); |
6892 | |||
6893 | |||
6894 | mutex_lock(&priv->mutex); | ||
6895 | /* stop mac, cancel any scan request and clear | ||
6896 | * RXON_FILTER_ASSOC_MSK BIT | ||
6897 | */ | ||
6888 | priv->is_open = 0; | 6898 | priv->is_open = 0; |
6889 | /*netif_stop_queue(dev); */ | 6899 | iwl_scan_cancel_timeout(priv, 100); |
6890 | flush_workqueue(priv->workqueue); | 6900 | cancel_delayed_work(&priv->post_associate); |
6901 | priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK; | ||
6902 | iwl_commit_rxon(priv); | ||
6903 | mutex_unlock(&priv->mutex); | ||
6904 | |||
6891 | IWL_DEBUG_MAC80211("leave\n"); | 6905 | IWL_DEBUG_MAC80211("leave\n"); |
6892 | } | 6906 | } |
6893 | 6907 | ||
@@ -7219,6 +7233,12 @@ static void iwl_mac_remove_interface(struct ieee80211_hw *hw, | |||
7219 | IWL_DEBUG_MAC80211("enter\n"); | 7233 | IWL_DEBUG_MAC80211("enter\n"); |
7220 | 7234 | ||
7221 | mutex_lock(&priv->mutex); | 7235 | mutex_lock(&priv->mutex); |
7236 | |||
7237 | iwl_scan_cancel_timeout(priv, 100); | ||
7238 | cancel_delayed_work(&priv->post_associate); | ||
7239 | priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK; | ||
7240 | iwl_commit_rxon(priv); | ||
7241 | |||
7222 | if (priv->interface_id == conf->if_id) { | 7242 | if (priv->interface_id == conf->if_id) { |
7223 | priv->interface_id = 0; | 7243 | priv->interface_id = 0; |
7224 | memset(priv->bssid, 0, ETH_ALEN); | 7244 | memset(priv->bssid, 0, ETH_ALEN); |
@@ -7271,7 +7291,8 @@ static int iwl_mac_hw_scan(struct ieee80211_hw *hw, u8 *ssid, size_t len) | |||
7271 | priv->direct_ssid_len = (u8) | 7291 | priv->direct_ssid_len = (u8) |
7272 | min((u8) len, (u8) IW_ESSID_MAX_SIZE); | 7292 | min((u8) len, (u8) IW_ESSID_MAX_SIZE); |
7273 | memcpy(priv->direct_ssid, ssid, priv->direct_ssid_len); | 7293 | memcpy(priv->direct_ssid, ssid, priv->direct_ssid_len); |
7274 | } | 7294 | } else |
7295 | priv->one_direct_scan = 0; | ||
7275 | 7296 | ||
7276 | rc = iwl_scan_initiate(priv); | 7297 | rc = iwl_scan_initiate(priv); |
7277 | 7298 | ||
@@ -8574,6 +8595,9 @@ static void iwl_pci_remove(struct pci_dev *pdev) | |||
8574 | iwl_rate_control_unregister(priv->hw); | 8595 | iwl_rate_control_unregister(priv->hw); |
8575 | } | 8596 | } |
8576 | 8597 | ||
8598 | /*netif_stop_queue(dev); */ | ||
8599 | flush_workqueue(priv->workqueue); | ||
8600 | |||
8577 | /* ieee80211_unregister_hw calls iwl_mac_stop, which flushes | 8601 | /* ieee80211_unregister_hw calls iwl_mac_stop, which flushes |
8578 | * priv->workqueue... so we can't take down the workqueue | 8602 | * priv->workqueue... so we can't take down the workqueue |
8579 | * until now... */ | 8603 | * until now... */ |