iwlwifi: remove shadow_reg_enable from hw_params
authorJohannes Berg <johannes.berg@intel.com>
Tue, 6 Mar 2012 21:30:46 +0000 (13:30 -0800)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 7 Mar 2012 18:51:51 +0000 (13:51 -0500)
There's no need to copy shadow_reg_enable into
hw_params since it is a pure hardware parameter
that will never change, we can access it from
the config directly.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
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.c
drivers/net/wireless/iwlwifi/iwl-power.c
drivers/net/wireless/iwlwifi/iwl-shared.h
drivers/net/wireless/iwlwifi/iwl-trans-pcie-rx.c
drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c
drivers/net/wireless/iwlwifi/iwl-trans-pcie.c

index 863c27e20dbca36e701b994736c73de6debbe818..f8163717d7d1293bac18f97b979b4436b81c8caf 100644 (file)
@@ -1127,8 +1127,6 @@ static void iwl_set_hw_params(struct iwl_priv *priv)
 
        hw_params(priv).num_ampdu_queues =
                cfg(priv)->base_params->num_of_ampdu_queues;
-       hw_params(priv).shadow_reg_enable =
-               cfg(priv)->base_params->shadow_reg_enable;
        hw_params(priv).wd_timeout = cfg(priv)->base_params->wd_timeout;
 
        /* Device-specific setup */
index d76ff239d5f1c7fb491695f23c4ba3d247fa20cf..f79ff16e29f4393cfa01aaca273e6177a074da2c 100644 (file)
@@ -215,7 +215,7 @@ static void iwl_static_sleep_cmd(struct iwl_priv *priv,
        else
                cmd->flags &= ~IWL_POWER_SLEEP_OVER_DTIM_MSK;
 
-       if (hw_params(priv).shadow_reg_enable)
+       if (cfg(priv)->base_params->shadow_reg_enable)
                cmd->flags |= IWL_POWER_SHADOW_REG_ENA;
        else
                cmd->flags &= ~IWL_POWER_SHADOW_REG_ENA;
@@ -301,7 +301,7 @@ static void iwl_power_fill_sleep_cmd(struct iwl_priv *priv,
        if (priv->power_data.bus_pm)
                cmd->flags |= IWL_POWER_PCI_PM_MSK;
 
-       if (hw_params(priv).shadow_reg_enable)
+       if (cfg(priv)->base_params->shadow_reg_enable)
                cmd->flags |= IWL_POWER_SHADOW_REG_ENA;
        else
                cmd->flags &= ~IWL_POWER_SHADOW_REG_ENA;
index 30b942f7781413268543e74993f2e4d60ed2c033..a5ab58ce03077670b94e3c1198967cc5e3694eed 100644 (file)
@@ -185,7 +185,6 @@ struct iwl_hw_params {
        u8  valid_tx_ant;
        u8  valid_rx_ant;
        u8  ht40_channel;
-       bool shadow_reg_enable;
        u16 sku;
        u32 rx_page_order;
        u32 ct_kill_threshold;
index e8d3129d5bde6f9230b4d671be2fd2b3e9c3ff2e..911a9f113f1fb80e354227c91282c35ad718a001 100644 (file)
@@ -141,7 +141,7 @@ void iwl_rx_queue_update_write_ptr(struct iwl_trans *trans,
        if (q->need_update == 0)
                goto exit_unlock;
 
-       if (hw_params(trans).shadow_reg_enable) {
+       if (cfg(trans)->base_params->shadow_reg_enable) {
                /* shadow register enabled */
                /* Device expects a multiple of 8 */
                q->write_actual = (q->write & ~0x7);
index ca4ceeacc9893dd69564b5a9176d5da136bce4b1..2573f7149f167b3e987323179d0e3b3cc3fdd8b5 100644 (file)
@@ -136,7 +136,7 @@ void iwl_txq_update_write_ptr(struct iwl_trans *trans, struct iwl_tx_queue *txq)
        if (txq->need_update == 0)
                return;
 
-       if (hw_params(trans).shadow_reg_enable) {
+       if (cfg(trans)->base_params->shadow_reg_enable) {
                /* shadow register enabled */
                iwl_write32(trans, HBUS_TARG_WRPTR,
                            txq->q.write_ptr | (txq_id << 8));
index 4a2d4b58cdc8d93697c3f74fa64cba6838168533..44050fa414d1d44e8a09d5483cee378dca9432b2 100644 (file)
@@ -828,7 +828,7 @@ static int iwl_nic_init(struct iwl_trans *trans)
        if (iwl_tx_init(trans))
                return -ENOMEM;
 
-       if (hw_params(trans).shadow_reg_enable) {
+       if (cfg(trans)->base_params->shadow_reg_enable) {
                /* enable shadow regs in HW */
                iwl_set_bit(trans, CSR_MAC_SHADOW_REG_CTRL,
                        0x800FFFFF);