diff options
Diffstat (limited to 'drivers/net/wireless/iwlegacy/iwl-core.c')
-rw-r--r-- | drivers/net/wireless/iwlegacy/iwl-core.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/drivers/net/wireless/iwlegacy/iwl-core.c b/drivers/net/wireless/iwlegacy/iwl-core.c index c1511b14b239..d743373a9424 100644 --- a/drivers/net/wireless/iwlegacy/iwl-core.c +++ b/drivers/net/wireless/iwlegacy/iwl-core.c | |||
@@ -211,10 +211,7 @@ int iwl_legacy_init_geos(struct iwl_priv *priv) | |||
211 | if (!iwl_legacy_is_channel_valid(ch)) | 211 | if (!iwl_legacy_is_channel_valid(ch)) |
212 | continue; | 212 | continue; |
213 | 213 | ||
214 | if (iwl_legacy_is_channel_a_band(ch)) | 214 | sband = &priv->bands[ch->band]; |
215 | sband = &priv->bands[IEEE80211_BAND_5GHZ]; | ||
216 | else | ||
217 | sband = &priv->bands[IEEE80211_BAND_2GHZ]; | ||
218 | 215 | ||
219 | geo_ch = &sband->channels[sband->n_channels++]; | 216 | geo_ch = &sband->channels[sband->n_channels++]; |
220 | 217 | ||
@@ -2117,10 +2114,9 @@ int iwl_legacy_mac_config(struct ieee80211_hw *hw, u32 changed) | |||
2117 | IWL_DEBUG_MAC80211(priv, "enter to channel %d changed 0x%X\n", | 2114 | IWL_DEBUG_MAC80211(priv, "enter to channel %d changed 0x%X\n", |
2118 | channel->hw_value, changed); | 2115 | channel->hw_value, changed); |
2119 | 2116 | ||
2120 | if (unlikely(!priv->cfg->mod_params->disable_hw_scan && | 2117 | if (unlikely(test_bit(STATUS_SCANNING, &priv->status))) { |
2121 | test_bit(STATUS_SCANNING, &priv->status))) { | ||
2122 | scan_active = 1; | 2118 | scan_active = 1; |
2123 | IWL_DEBUG_MAC80211(priv, "leave - scanning\n"); | 2119 | IWL_DEBUG_MAC80211(priv, "scan active\n"); |
2124 | } | 2120 | } |
2125 | 2121 | ||
2126 | if (changed & (IEEE80211_CONF_CHANGE_SMPS | | 2122 | if (changed & (IEEE80211_CONF_CHANGE_SMPS | |
@@ -2433,11 +2429,13 @@ void iwl_legacy_mac_bss_info_changed(struct ieee80211_hw *hw, | |||
2433 | 2429 | ||
2434 | IWL_DEBUG_MAC80211(priv, "changes = 0x%X\n", changes); | 2430 | IWL_DEBUG_MAC80211(priv, "changes = 0x%X\n", changes); |
2435 | 2431 | ||
2436 | if (!iwl_legacy_is_alive(priv)) | ||
2437 | return; | ||
2438 | |||
2439 | mutex_lock(&priv->mutex); | 2432 | mutex_lock(&priv->mutex); |
2440 | 2433 | ||
2434 | if (!iwl_legacy_is_alive(priv)) { | ||
2435 | mutex_unlock(&priv->mutex); | ||
2436 | return; | ||
2437 | } | ||
2438 | |||
2441 | if (changes & BSS_CHANGED_QOS) { | 2439 | if (changes & BSS_CHANGED_QOS) { |
2442 | unsigned long flags; | 2440 | unsigned long flags; |
2443 | 2441 | ||
@@ -2646,7 +2644,7 @@ unplugged: | |||
2646 | 2644 | ||
2647 | none: | 2645 | none: |
2648 | /* re-enable interrupts here since we don't have anything to service. */ | 2646 | /* re-enable interrupts here since we don't have anything to service. */ |
2649 | /* only Re-enable if diabled by irq */ | 2647 | /* only Re-enable if disabled by irq */ |
2650 | if (test_bit(STATUS_INT_ENABLED, &priv->status)) | 2648 | if (test_bit(STATUS_INT_ENABLED, &priv->status)) |
2651 | iwl_legacy_enable_interrupts(priv); | 2649 | iwl_legacy_enable_interrupts(priv); |
2652 | spin_unlock_irqrestore(&priv->lock, flags); | 2650 | spin_unlock_irqrestore(&priv->lock, flags); |