iwlagn: check for SMPS mode
authorWey-Yi Guy <wey-yi.w.guy@intel.com>
Thu, 10 Nov 2011 14:55:04 +0000 (06:55 -0800)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 11 Nov 2011 17:32:52 +0000 (12:32 -0500)
Check and report WARN only when its invalid

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlwifi/iwl-agn-lib.c
drivers/net/wireless/iwlwifi/iwl-agn-rxon.c

index 1a52ed29f2d64e4425552e603534dc0f1f16a54f..6465983fef34e6537ba8675fc5d936650ea406c2 100644 (file)
@@ -827,6 +827,7 @@ static int iwl_get_idle_rx_chain_count(struct iwl_priv *priv, int active_cnt)
        case IEEE80211_SMPS_STATIC:
        case IEEE80211_SMPS_DYNAMIC:
                return IWL_NUM_IDLE_CHAINS_SINGLE;
+       case IEEE80211_SMPS_AUTOMATIC:
        case IEEE80211_SMPS_OFF:
                return active_cnt;
        default:
index 4c52bee6812dc3cd629c37f77cc0aa7874993cae..8e45fba4fc868be694de1718ea2d38b590466779 100644 (file)
@@ -542,6 +542,9 @@ int iwlagn_mac_config(struct ieee80211_hw *hw, u32 changed)
 
        mutex_lock(&priv->shrd->mutex);
 
+       if (test_bit(STATUS_EXIT_PENDING, &priv->shrd->status))
+               goto out;
+
        if (unlikely(test_bit(STATUS_SCANNING, &priv->shrd->status))) {
                IWL_DEBUG_MAC80211(priv, "leave - scanning\n");
                goto out;