aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-trans-rx-pcie.c
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2011-08-26 02:11:19 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-08-29 15:30:31 -0400
commitfd656935cd05f522d7db97386633f6a0d7751218 (patch)
treec4633b2033c45e85f759789602116c84757f0dd5 /drivers/net/wireless/iwlwifi/iwl-trans-rx-pcie.c
parent5f85a7890cbfd2be8f4c6620b2a6774d6b5ac647 (diff)
iwlagn: remove dereferences of priv from transport
There are still quite a few, but much less. A few fields have been moved /copied to hw_params which sits in the shared area: * priv->cfg->base_params->num_of_ampdu_queues * priv->cfg->base_params->shadow_reg_enable * priv->cfg->sku * priv->ucode_owner Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-trans-rx-pcie.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-trans-rx-pcie.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans-rx-pcie.c b/drivers/net/wireless/iwlwifi/iwl-trans-rx-pcie.c
index 5cff771af92f..a0699c0ef4f8 100644
--- a/drivers/net/wireless/iwlwifi/iwl-trans-rx-pcie.c
+++ b/drivers/net/wireless/iwlwifi/iwl-trans-rx-pcie.c
@@ -130,7 +130,6 @@ static int iwl_rx_queue_space(const struct iwl_rx_queue *q)
130void iwl_rx_queue_update_write_ptr(struct iwl_trans *trans, 130void iwl_rx_queue_update_write_ptr(struct iwl_trans *trans,
131 struct iwl_rx_queue *q) 131 struct iwl_rx_queue *q)
132{ 132{
133 struct iwl_priv *priv = priv(trans);
134 unsigned long flags; 133 unsigned long flags;
135 u32 reg; 134 u32 reg;
136 135
@@ -139,34 +138,34 @@ void iwl_rx_queue_update_write_ptr(struct iwl_trans *trans,
139 if (q->need_update == 0) 138 if (q->need_update == 0)
140 goto exit_unlock; 139 goto exit_unlock;
141 140
142 if (priv->cfg->base_params->shadow_reg_enable) { 141 if (hw_params(trans).shadow_reg_enable) {
143 /* shadow register enabled */ 142 /* shadow register enabled */
144 /* Device expects a multiple of 8 */ 143 /* Device expects a multiple of 8 */
145 q->write_actual = (q->write & ~0x7); 144 q->write_actual = (q->write & ~0x7);
146 iwl_write32(bus(priv), FH_RSCSR_CHNL0_WPTR, q->write_actual); 145 iwl_write32(bus(trans), FH_RSCSR_CHNL0_WPTR, q->write_actual);
147 } else { 146 } else {
148 /* If power-saving is in use, make sure device is awake */ 147 /* If power-saving is in use, make sure device is awake */
149 if (test_bit(STATUS_POWER_PMI, &trans->shrd->status)) { 148 if (test_bit(STATUS_POWER_PMI, &trans->shrd->status)) {
150 reg = iwl_read32(bus(priv), CSR_UCODE_DRV_GP1); 149 reg = iwl_read32(bus(trans), CSR_UCODE_DRV_GP1);
151 150
152 if (reg & CSR_UCODE_DRV_GP1_BIT_MAC_SLEEP) { 151 if (reg & CSR_UCODE_DRV_GP1_BIT_MAC_SLEEP) {
153 IWL_DEBUG_INFO(trans, 152 IWL_DEBUG_INFO(trans,
154 "Rx queue requesting wakeup," 153 "Rx queue requesting wakeup,"
155 " GP1 = 0x%x\n", reg); 154 " GP1 = 0x%x\n", reg);
156 iwl_set_bit(bus(priv), CSR_GP_CNTRL, 155 iwl_set_bit(bus(trans), CSR_GP_CNTRL,
157 CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ); 156 CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ);
158 goto exit_unlock; 157 goto exit_unlock;
159 } 158 }
160 159
161 q->write_actual = (q->write & ~0x7); 160 q->write_actual = (q->write & ~0x7);
162 iwl_write_direct32(bus(priv), FH_RSCSR_CHNL0_WPTR, 161 iwl_write_direct32(bus(trans), FH_RSCSR_CHNL0_WPTR,
163 q->write_actual); 162 q->write_actual);
164 163
165 /* Else device is assumed to be awake */ 164 /* Else device is assumed to be awake */
166 } else { 165 } else {
167 /* Device expects a multiple of 8 */ 166 /* Device expects a multiple of 8 */
168 q->write_actual = (q->write & ~0x7); 167 q->write_actual = (q->write & ~0x7);
169 iwl_write_direct32(bus(priv), FH_RSCSR_CHNL0_WPTR, 168 iwl_write_direct32(bus(trans), FH_RSCSR_CHNL0_WPTR,
170 q->write_actual); 169 q->write_actual);
171 } 170 }
172 } 171 }
@@ -1032,7 +1031,7 @@ void iwl_irq_tasklet(struct iwl_trans *trans)
1032 IWL_DEBUG_ISR(trans, "Wakeup interrupt\n"); 1031 IWL_DEBUG_ISR(trans, "Wakeup interrupt\n");
1033 iwl_rx_queue_update_write_ptr(trans, &trans_pcie->rxq); 1032 iwl_rx_queue_update_write_ptr(trans, &trans_pcie->rxq);
1034 for (i = 0; i < hw_params(trans).max_txq_num; i++) 1033 for (i = 0; i < hw_params(trans).max_txq_num; i++)
1035 iwl_txq_update_write_ptr(priv(trans), 1034 iwl_txq_update_write_ptr(trans,
1036 &priv(trans)->txq[i]); 1035 &priv(trans)->txq[i]);
1037 1036
1038 isr_stats->wakeup++; 1037 isr_stats->wakeup++;