aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl4965-base.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl4965-base.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl4965-base.c26
1 files changed, 6 insertions, 20 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c
index d0bbcaaeb94c..883b42f7e998 100644
--- a/drivers/net/wireless/iwlwifi/iwl4965-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c
@@ -4633,17 +4633,6 @@ static int iwl4965_get_channels_for_scan(struct iwl_priv *priv,
4633 if (channels[i].flags & IEEE80211_CHAN_DISABLED) 4633 if (channels[i].flags & IEEE80211_CHAN_DISABLED)
4634 continue; 4634 continue;
4635 4635
4636 if (ieee80211_frequency_to_channel(channels[i].center_freq) ==
4637 le16_to_cpu(priv->active_rxon.channel)) {
4638 if (iwl_is_associated(priv)) {
4639 IWL_DEBUG_SCAN
4640 ("Skipping current channel %d\n",
4641 le16_to_cpu(priv->active_rxon.channel));
4642 continue;
4643 }
4644 } else if (priv->only_active_channel)
4645 continue;
4646
4647 scan_ch->channel = ieee80211_frequency_to_channel(channels[i].center_freq); 4636 scan_ch->channel = ieee80211_frequency_to_channel(channels[i].center_freq);
4648 4637
4649 ch_info = iwl_get_channel_info(priv, band, 4638 ch_info = iwl_get_channel_info(priv, band,
@@ -5824,11 +5813,15 @@ static void iwl4965_bg_request_scan(struct work_struct *data)
5824 priv->direct_ssid, priv->direct_ssid_len); 5813 priv->direct_ssid, priv->direct_ssid_len);
5825 direct_mask = 1; 5814 direct_mask = 1;
5826 } else if (!iwl_is_associated(priv) && priv->essid_len) { 5815 } else if (!iwl_is_associated(priv) && priv->essid_len) {
5816 IWL_DEBUG_SCAN
5817 ("Kicking off one direct scan for '%s' when not associated\n",
5818 iwl4965_escape_essid(priv->essid, priv->essid_len));
5827 scan->direct_scan[0].id = WLAN_EID_SSID; 5819 scan->direct_scan[0].id = WLAN_EID_SSID;
5828 scan->direct_scan[0].len = priv->essid_len; 5820 scan->direct_scan[0].len = priv->essid_len;
5829 memcpy(scan->direct_scan[0].ssid, priv->essid, priv->essid_len); 5821 memcpy(scan->direct_scan[0].ssid, priv->essid, priv->essid_len);
5830 direct_mask = 1; 5822 direct_mask = 1;
5831 } else { 5823 } else {
5824 IWL_DEBUG_SCAN("Kicking off one indirect scan.\n");
5832 direct_mask = 0; 5825 direct_mask = 0;
5833 } 5826 }
5834 5827
@@ -5881,23 +5874,18 @@ static void iwl4965_bg_request_scan(struct work_struct *data)
5881 if (priv->iw_mode == IEEE80211_IF_TYPE_MNTR) 5874 if (priv->iw_mode == IEEE80211_IF_TYPE_MNTR)
5882 scan->filter_flags = RXON_FILTER_PROMISC_MSK; 5875 scan->filter_flags = RXON_FILTER_PROMISC_MSK;
5883 5876
5884 if (direct_mask) { 5877 if (direct_mask)
5885 IWL_DEBUG_SCAN
5886 ("Initiating direct scan for %s.\n",
5887 iwl4965_escape_essid(priv->essid, priv->essid_len));
5888 scan->channel_count = 5878 scan->channel_count =
5889 iwl4965_get_channels_for_scan( 5879 iwl4965_get_channels_for_scan(
5890 priv, band, 1, /* active */ 5880 priv, band, 1, /* active */
5891 direct_mask, 5881 direct_mask,
5892 (void *)&scan->data[le16_to_cpu(scan->tx_cmd.len)]); 5882 (void *)&scan->data[le16_to_cpu(scan->tx_cmd.len)]);
5893 } else { 5883 else
5894 IWL_DEBUG_SCAN("Initiating indirect scan.\n");
5895 scan->channel_count = 5884 scan->channel_count =
5896 iwl4965_get_channels_for_scan( 5885 iwl4965_get_channels_for_scan(
5897 priv, band, 0, /* passive */ 5886 priv, band, 0, /* passive */
5898 direct_mask, 5887 direct_mask,
5899 (void *)&scan->data[le16_to_cpu(scan->tx_cmd.len)]); 5888 (void *)&scan->data[le16_to_cpu(scan->tx_cmd.len)]);
5900 }
5901 5889
5902 cmd.len += le16_to_cpu(scan->tx_cmd.len) + 5890 cmd.len += le16_to_cpu(scan->tx_cmd.len) +
5903 scan->channel_count * sizeof(struct iwl4965_scan_channel); 5891 scan->channel_count * sizeof(struct iwl4965_scan_channel);
@@ -7061,8 +7049,6 @@ static void iwl4965_mac_reset_tsf(struct ieee80211_hw *hw)
7061 return; 7049 return;
7062 } 7050 }
7063 7051
7064 priv->only_active_channel = 0;
7065
7066 iwl4965_set_rate(priv); 7052 iwl4965_set_rate(priv);
7067 7053
7068 mutex_unlock(&priv->mutex); 7054 mutex_unlock(&priv->mutex);