Commit f5276488 authored by Guy Cohen's avatar Guy Cohen Committed by John W. Linville

iwlwifi: fix current channel is not scanned

All channels should be scanned, including the current channel
when the client is associated.

Removed also unused flag to scan only active channels.
Signed-off-by: default avatarGuy Cohen <guy.cohen@intel.com>
Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: default avatarTomas Winkler <tomas.winkler@intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 21a75d77
...@@ -742,7 +742,6 @@ struct iwl3945_priv { ...@@ -742,7 +742,6 @@ struct iwl3945_priv {
u8 direct_ssid_len; u8 direct_ssid_len;
u8 direct_ssid[IW_ESSID_MAX_SIZE]; u8 direct_ssid[IW_ESSID_MAX_SIZE];
struct iwl3945_scan_cmd *scan; struct iwl3945_scan_cmd *scan;
u8 only_active_channel;
/* spinlock */ /* spinlock */
spinlock_t lock; /* protect general shared data */ spinlock_t lock; /* protect general shared data */
......
...@@ -996,7 +996,6 @@ struct iwl_priv { ...@@ -996,7 +996,6 @@ struct iwl_priv {
u8 direct_ssid_len; u8 direct_ssid_len;
u8 direct_ssid[IW_ESSID_MAX_SIZE]; u8 direct_ssid[IW_ESSID_MAX_SIZE];
struct iwl4965_scan_cmd *scan; struct iwl4965_scan_cmd *scan;
u8 only_active_channel;
/* spinlock */ /* spinlock */
spinlock_t lock; /* protect general shared data */ spinlock_t lock; /* protect general shared data */
......
...@@ -4968,17 +4968,6 @@ static int iwl3945_get_channels_for_scan(struct iwl3945_priv *priv, ...@@ -4968,17 +4968,6 @@ static int iwl3945_get_channels_for_scan(struct iwl3945_priv *priv,
if (channels[i].flags & IEEE80211_CHAN_DISABLED) if (channels[i].flags & IEEE80211_CHAN_DISABLED)
continue; continue;
if (channels[i].hw_value ==
le16_to_cpu(priv->active_rxon.channel)) {
if (iwl3945_is_associated(priv)) {
IWL_DEBUG_SCAN
("Skipping current channel %d\n",
le16_to_cpu(priv->active_rxon.channel));
continue;
}
} else if (priv->only_active_channel)
continue;
scan_ch->channel = channels[i].hw_value; scan_ch->channel = channels[i].hw_value;
ch_info = iwl3945_get_channel_info(priv, band, scan_ch->channel); ch_info = iwl3945_get_channel_info(priv, band, scan_ch->channel);
...@@ -7314,8 +7303,6 @@ static void iwl3945_mac_reset_tsf(struct ieee80211_hw *hw) ...@@ -7314,8 +7303,6 @@ static void iwl3945_mac_reset_tsf(struct ieee80211_hw *hw)
return; return;
} }
priv->only_active_channel = 0;
iwl3945_set_rate(priv); iwl3945_set_rate(priv);
mutex_unlock(&priv->mutex); mutex_unlock(&priv->mutex);
......
...@@ -4633,17 +4633,6 @@ static int iwl4965_get_channels_for_scan(struct iwl_priv *priv, ...@@ -4633,17 +4633,6 @@ static int iwl4965_get_channels_for_scan(struct iwl_priv *priv,
if (channels[i].flags & IEEE80211_CHAN_DISABLED) if (channels[i].flags & IEEE80211_CHAN_DISABLED)
continue; continue;
if (ieee80211_frequency_to_channel(channels[i].center_freq) ==
le16_to_cpu(priv->active_rxon.channel)) {
if (iwl_is_associated(priv)) {
IWL_DEBUG_SCAN
("Skipping current channel %d\n",
le16_to_cpu(priv->active_rxon.channel));
continue;
}
} else if (priv->only_active_channel)
continue;
scan_ch->channel = ieee80211_frequency_to_channel(channels[i].center_freq); scan_ch->channel = ieee80211_frequency_to_channel(channels[i].center_freq);
ch_info = iwl_get_channel_info(priv, band, ch_info = iwl_get_channel_info(priv, band,
...@@ -7061,8 +7050,6 @@ static void iwl4965_mac_reset_tsf(struct ieee80211_hw *hw) ...@@ -7061,8 +7050,6 @@ static void iwl4965_mac_reset_tsf(struct ieee80211_hw *hw)
return; return;
} }
priv->only_active_channel = 0;
iwl4965_set_rate(priv); iwl4965_set_rate(priv);
mutex_unlock(&priv->mutex); mutex_unlock(&priv->mutex);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment