iwlwifi: disable powersave for 4965
authorJohannes Berg <johannes@sipsolutions.net>
Fri, 11 Sep 2009 17:50:37 +0000 (10:50 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 14 Sep 2009 18:36:05 +0000 (14:36 -0400)
There's a bug in 4965 powersave that appears to
be related to the way it keeps track of its data
during sleep, but we haven't found it yet. Due to
that, using powersave may spontaneously cause the
device to SYSASSERT when transitioning from sleep
to wake. Therefore, disable powersave for 4965,
until (if ever, unfortunately) we can identify
and fix the problem.

Cf. http://bugzilla.intellinuxwireless.org/show_bug.cgi?id=1982
which was closed, but now has re-appeared with
IDLE mode, which probably means we never really
fixed it.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlwifi/iwl-4965.c
drivers/net/wireless/iwlwifi/iwl-core.c
drivers/net/wireless/iwlwifi/iwl-core.h
drivers/net/wireless/iwlwifi/iwl-power.c

index 6a13bfbc9d988aaaacc98442c4c2e02547c0e400..ca61d3796cef644798a1d81e67e52c734f4854d7 100644 (file)
@@ -2346,6 +2346,7 @@ struct iwl_cfg iwl4965_agn_cfg = {
        .mod_params = &iwl4965_mod_params,
        .use_isr_legacy = true,
        .ht_greenfield_support = false,
        .mod_params = &iwl4965_mod_params,
        .use_isr_legacy = true,
        .ht_greenfield_support = false,
+       .broken_powersave = true,
 };
 
 /* Module firmware */
 };
 
 /* Module firmware */
index acfd7b40afb8e3bf074098c3e172c571473a29d5..fd26c0dc9c544124b3bfb861519b058fdcb5e2c8 100644 (file)
@@ -1585,9 +1585,12 @@ int iwl_setup_mac(struct iwl_priv *priv)
        hw->flags = IEEE80211_HW_SIGNAL_DBM |
                    IEEE80211_HW_NOISE_DBM |
                    IEEE80211_HW_AMPDU_AGGREGATION |
        hw->flags = IEEE80211_HW_SIGNAL_DBM |
                    IEEE80211_HW_NOISE_DBM |
                    IEEE80211_HW_AMPDU_AGGREGATION |
-                   IEEE80211_HW_SPECTRUM_MGMT |
-                   IEEE80211_HW_SUPPORTS_PS |
-                   IEEE80211_HW_SUPPORTS_DYNAMIC_PS;
+                   IEEE80211_HW_SPECTRUM_MGMT;
+
+       if (!priv->cfg->broken_powersave)
+               hw->flags |= IEEE80211_HW_SUPPORTS_PS |
+                            IEEE80211_HW_SUPPORTS_DYNAMIC_PS;
+
        hw->wiphy->interface_modes =
                BIT(NL80211_IFTYPE_STATION) |
                BIT(NL80211_IFTYPE_ADHOC);
        hw->wiphy->interface_modes =
                BIT(NL80211_IFTYPE_STATION) |
                BIT(NL80211_IFTYPE_ADHOC);
index c04d2a270819316edf341e89d943f1f3f5e59cac..7ff9ffb2b7026c2280e7623eaa77d95f4ad89e2d 100644 (file)
@@ -252,6 +252,7 @@ struct iwl_cfg {
        const u16 max_ll_items;
        const bool shadow_ram_support;
        const bool ht_greenfield_support;
        const u16 max_ll_items;
        const bool shadow_ram_support;
        const bool ht_greenfield_support;
+       const bool broken_powersave;
 };
 
 /***************************
 };
 
 /***************************
index 4ec6a8307cc6bd35a067c4e26d681eadf3408a38..60be976afff8e49dd918d303f45e5fe6e9853759 100644 (file)
@@ -292,8 +292,9 @@ int iwl_power_update_mode(struct iwl_priv *priv, bool force)
        else
                dtimper = 1;
 
        else
                dtimper = 1;
 
-       /* TT power setting overwrites everything */
-       if (tt->state >= IWL_TI_1)
+       if (priv->cfg->broken_powersave)
+               iwl_power_sleep_cam_cmd(priv, &cmd);
+       else if (tt->state >= IWL_TI_1)
                iwl_static_sleep_cmd(priv, &cmd, tt->tt_power_mode, dtimper);
        else if (!enabled)
                iwl_power_sleep_cam_cmd(priv, &cmd);
                iwl_static_sleep_cmd(priv, &cmd, tt->tt_power_mode, dtimper);
        else if (!enabled)
                iwl_power_sleep_cam_cmd(priv, &cmd);