iwlwifi: power management checking for shadow register
authorWey-Yi Guy <wey-yi.w.guy@intel.com>
Tue, 23 Nov 2010 18:58:55 +0000 (10:58 -0800)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 24 Nov 2010 21:19:37 +0000 (16:19 -0500)
If shadow register is enable, modify the power management
command to inform uCode

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-power.c

index 306c852b1578f825d0b012e6b3c1733e9cd6f51e..21c5e6abfbd037b0990e0ae8b6a985d754207951 100644 (file)
@@ -163,6 +163,11 @@ static void iwl_static_sleep_cmd(struct iwl_priv *priv,
        else
                cmd->flags &= ~IWL_POWER_SLEEP_OVER_DTIM_MSK;
 
+       if (priv->cfg->base_params->shadow_reg_enable)
+               cmd->flags |= IWL_POWER_SHADOW_REG_ENA;
+       else
+               cmd->flags &= ~IWL_POWER_SHADOW_REG_ENA;
+
        if (priv->cfg->bt_params &&
            priv->cfg->bt_params->advanced_bt_coexist) {
                if (!priv->cfg->bt_params->bt_sco_disable)
@@ -245,6 +250,11 @@ static void iwl_power_fill_sleep_cmd(struct iwl_priv *priv,
        if (priv->power_data.pci_pm)
                cmd->flags |= IWL_POWER_PCI_PM_MSK;
 
+       if (priv->cfg->base_params->shadow_reg_enable)
+               cmd->flags |= IWL_POWER_SHADOW_REG_ENA;
+       else
+               cmd->flags &= ~IWL_POWER_SHADOW_REG_ENA;
+
        if (priv->cfg->bt_params &&
            priv->cfg->bt_params->advanced_bt_coexist) {
                if (!priv->cfg->bt_params->bt_sco_disable)