diff options
author | Johannes Berg <johannes.berg@intel.com> | 2013-06-20 15:56:49 -0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-06-25 06:14:43 -0400 |
commit | fecba09e424e58444a0b206031632d62977b79ec (patch) | |
tree | dbc2cfd45eef36c8a521bd195d3a485bb76dd483 /drivers/net | |
parent | c7df1f4bdaef7e0c860011a0cc979f6c3684b09a (diff) |
iwlwifi: always use 'rxq' as RX queue struct name
A few places use just 'q', use 'rxq' there like all
other places.
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/iwlwifi/pcie/rx.c | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/drivers/net/wireless/iwlwifi/pcie/rx.c b/drivers/net/wireless/iwlwifi/pcie/rx.c index 25e25ea1489d..fd848cd1583e 100644 --- a/drivers/net/wireless/iwlwifi/pcie/rx.c +++ b/drivers/net/wireless/iwlwifi/pcie/rx.c | |||
@@ -110,9 +110,10 @@ | |||
110 | /* | 110 | /* |
111 | * iwl_rxq_space - Return number of free slots available in queue. | 111 | * iwl_rxq_space - Return number of free slots available in queue. |
112 | */ | 112 | */ |
113 | static int iwl_rxq_space(const struct iwl_rxq *q) | 113 | static int iwl_rxq_space(const struct iwl_rxq *rxq) |
114 | { | 114 | { |
115 | int s = q->read - q->write; | 115 | int s = rxq->read - rxq->write; |
116 | |||
116 | if (s <= 0) | 117 | if (s <= 0) |
117 | s += RX_QUEUE_SIZE; | 118 | s += RX_QUEUE_SIZE; |
118 | /* keep some buffer to not confuse full and empty queue */ | 119 | /* keep some buffer to not confuse full and empty queue */ |
@@ -143,21 +144,22 @@ int iwl_pcie_rx_stop(struct iwl_trans *trans) | |||
143 | /* | 144 | /* |
144 | * iwl_pcie_rxq_inc_wr_ptr - Update the write pointer for the RX queue | 145 | * iwl_pcie_rxq_inc_wr_ptr - Update the write pointer for the RX queue |
145 | */ | 146 | */ |
146 | static void iwl_pcie_rxq_inc_wr_ptr(struct iwl_trans *trans, struct iwl_rxq *q) | 147 | static void iwl_pcie_rxq_inc_wr_ptr(struct iwl_trans *trans, |
148 | struct iwl_rxq *rxq) | ||
147 | { | 149 | { |
148 | unsigned long flags; | 150 | unsigned long flags; |
149 | u32 reg; | 151 | u32 reg; |
150 | 152 | ||
151 | spin_lock_irqsave(&q->lock, flags); | 153 | spin_lock_irqsave(&rxq->lock, flags); |
152 | 154 | ||
153 | if (q->need_update == 0) | 155 | if (rxq->need_update == 0) |
154 | goto exit_unlock; | 156 | goto exit_unlock; |
155 | 157 | ||
156 | if (trans->cfg->base_params->shadow_reg_enable) { | 158 | if (trans->cfg->base_params->shadow_reg_enable) { |
157 | /* shadow register enabled */ | 159 | /* shadow register enabled */ |
158 | /* Device expects a multiple of 8 */ | 160 | /* Device expects a multiple of 8 */ |
159 | q->write_actual = (q->write & ~0x7); | 161 | rxq->write_actual = (rxq->write & ~0x7); |
160 | iwl_write32(trans, FH_RSCSR_CHNL0_WPTR, q->write_actual); | 162 | iwl_write32(trans, FH_RSCSR_CHNL0_WPTR, rxq->write_actual); |
161 | } else { | 163 | } else { |
162 | struct iwl_trans_pcie *trans_pcie = | 164 | struct iwl_trans_pcie *trans_pcie = |
163 | IWL_TRANS_GET_PCIE_TRANS(trans); | 165 | IWL_TRANS_GET_PCIE_TRANS(trans); |
@@ -175,22 +177,22 @@ static void iwl_pcie_rxq_inc_wr_ptr(struct iwl_trans *trans, struct iwl_rxq *q) | |||
175 | goto exit_unlock; | 177 | goto exit_unlock; |
176 | } | 178 | } |
177 | 179 | ||
178 | q->write_actual = (q->write & ~0x7); | 180 | rxq->write_actual = (rxq->write & ~0x7); |
179 | iwl_write_direct32(trans, FH_RSCSR_CHNL0_WPTR, | 181 | iwl_write_direct32(trans, FH_RSCSR_CHNL0_WPTR, |
180 | q->write_actual); | 182 | rxq->write_actual); |
181 | 183 | ||
182 | /* Else device is assumed to be awake */ | 184 | /* Else device is assumed to be awake */ |
183 | } else { | 185 | } else { |
184 | /* Device expects a multiple of 8 */ | 186 | /* Device expects a multiple of 8 */ |
185 | q->write_actual = (q->write & ~0x7); | 187 | rxq->write_actual = (rxq->write & ~0x7); |
186 | iwl_write_direct32(trans, FH_RSCSR_CHNL0_WPTR, | 188 | iwl_write_direct32(trans, FH_RSCSR_CHNL0_WPTR, |
187 | q->write_actual); | 189 | rxq->write_actual); |
188 | } | 190 | } |
189 | } | 191 | } |
190 | q->need_update = 0; | 192 | rxq->need_update = 0; |
191 | 193 | ||
192 | exit_unlock: | 194 | exit_unlock: |
193 | spin_unlock_irqrestore(&q->lock, flags); | 195 | spin_unlock_irqrestore(&rxq->lock, flags); |
194 | } | 196 | } |
195 | 197 | ||
196 | /* | 198 | /* |