aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlegacy/iwl-3945.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwlegacy/iwl-3945.c')
-rw-r--r--drivers/net/wireless/iwlegacy/iwl-3945.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/drivers/net/wireless/iwlegacy/iwl-3945.c b/drivers/net/wireless/iwlegacy/iwl-3945.c
index cdea5b036480..fb69b745f8a7 100644
--- a/drivers/net/wireless/iwlegacy/iwl-3945.c
+++ b/drivers/net/wireless/iwlegacy/iwl-3945.c
@@ -173,7 +173,7 @@ void il3945_disable_events(struct il_priv *il)
173 disable_ptr = il_read_targ_mem(il, base + (4 * sizeof(u32))); 173 disable_ptr = il_read_targ_mem(il, base + (4 * sizeof(u32)));
174 array_size = il_read_targ_mem(il, base + (5 * sizeof(u32))); 174 array_size = il_read_targ_mem(il, base + (5 * sizeof(u32)));
175 175
176 if (IL_EVT_DISABLE && (array_size == IL_EVT_DISABLE_SIZE)) { 176 if (IL_EVT_DISABLE && array_size == IL_EVT_DISABLE_SIZE) {
177 D_INFO("Disabling selected uCode log events at 0x%x\n", 177 D_INFO("Disabling selected uCode log events at 0x%x\n",
178 disable_ptr); 178 disable_ptr);
179 for (i = 0; i < IL_EVT_DISABLE_SIZE; i++) 179 for (i = 0; i < IL_EVT_DISABLE_SIZE; i++)
@@ -293,9 +293,8 @@ static void il3945_tx_queue_reclaim(struct il_priv *il,
293 il->cfg->ops->lib->txq_free_tfd(il, txq); 293 il->cfg->ops->lib->txq_free_tfd(il, txq);
294 } 294 }
295 295
296 if (il_queue_space(q) > q->low_mark && (txq_id >= 0) && 296 if (il_queue_space(q) > q->low_mark && txq_id >= 0 &&
297 (txq_id != IWL39_CMD_QUEUE_NUM) && 297 txq_id != IWL39_CMD_QUEUE_NUM && il->mac80211_registered)
298 il->mac80211_registered)
299 il_wake_queue(il, txq); 298 il_wake_queue(il, txq);
300} 299}
301 300
@@ -316,7 +315,7 @@ static void il3945_rx_reply_tx(struct il_priv *il,
316 int rate_idx; 315 int rate_idx;
317 int fail; 316 int fail;
318 317
319 if ((index >= txq->q.n_bd) || (il_queue_used(&txq->q, index) == 0)) { 318 if (index >= txq->q.n_bd || il_queue_used(&txq->q, index) == 0) {
320 IL_ERR("Read index for DMA queue txq_id (%d) index %d " 319 IL_ERR("Read index for DMA queue txq_id (%d) index %d "
321 "is out of range [0-%d] %d %d\n", txq_id, 320 "is out of range [0-%d] %d %d\n", txq_id,
322 index, txq->q.n_bd, txq->q.write_ptr, 321 index, txq->q.n_bd, txq->q.write_ptr,
@@ -544,8 +543,8 @@ static void il3945_rx_reply_rx(struct il_priv *il,
544 return; 543 return;
545 } 544 }
546 545
547 if (!(rx_end->status & RX_RES_STATUS_NO_CRC32_ERROR) 546 if (!(rx_end->status & RX_RES_STATUS_NO_CRC32_ERROR) ||
548 || !(rx_end->status & RX_RES_STATUS_NO_RXE_OVERFLOW)) { 547 !(rx_end->status & RX_RES_STATUS_NO_RXE_OVERFLOW)) {
549 D_RX("Bad CRC or FIFO: 0x%08X.\n", rx_end->status); 548 D_RX("Bad CRC or FIFO: 0x%08X.\n", rx_end->status);
550 return; 549 return;
551 } 550 }
@@ -599,7 +598,7 @@ int il3945_hw_txq_attach_buf_to_tfd(struct il_priv *il,
599 598
600 count = TFD_CTL_COUNT_GET(le32_to_cpu(tfd->control_flags)); 599 count = TFD_CTL_COUNT_GET(le32_to_cpu(tfd->control_flags));
601 600
602 if ((count >= NUM_TFD_CHUNKS) || (count < 0)) { 601 if (count >= NUM_TFD_CHUNKS || count < 0) {
603 IL_ERR("Error can not send more than %d chunks\n", 602 IL_ERR("Error can not send more than %d chunks\n",
604 NUM_TFD_CHUNKS); 603 NUM_TFD_CHUNKS);
605 return -EINVAL; 604 return -EINVAL;
@@ -1053,7 +1052,7 @@ static int il3945_hw_reg_adjust_power_by_temp(int new_reading, int old_reading)
1053 */ 1052 */
1054static inline int il3945_hw_reg_temp_out_of_range(int temperature) 1053static inline int il3945_hw_reg_temp_out_of_range(int temperature)
1055{ 1054{
1056 return ((temperature < -260) || (temperature > 25)) ? 1 : 0; 1055 return (temperature < -260 || temperature > 25) ? 1 : 0;
1057} 1056}
1058 1057
1059int il3945_hw_get_temperature(struct il_priv *il) 1058int il3945_hw_get_temperature(struct il_priv *il)
@@ -1666,10 +1665,10 @@ static int il3945_send_rxon_assoc(struct il_priv *il,
1666 const struct il_rxon_cmd *rxon1 = &ctx->staging; 1665 const struct il_rxon_cmd *rxon1 = &ctx->staging;
1667 const struct il_rxon_cmd *rxon2 = &ctx->active; 1666 const struct il_rxon_cmd *rxon2 = &ctx->active;
1668 1667
1669 if ((rxon1->flags == rxon2->flags) && 1668 if (rxon1->flags == rxon2->flags &&
1670 (rxon1->filter_flags == rxon2->filter_flags) && 1669 rxon1->filter_flags == rxon2->filter_flags &&
1671 (rxon1->cck_basic_rates == rxon2->cck_basic_rates) && 1670 rxon1->cck_basic_rates == rxon2->cck_basic_rates &&
1672 (rxon1->ofdm_basic_rates == rxon2->ofdm_basic_rates)) { 1671 rxon1->ofdm_basic_rates == rxon2->ofdm_basic_rates) {
1673 D_INFO("Using current RXON_ASSOC. Not resending.\n"); 1672 D_INFO("Using current RXON_ASSOC. Not resending.\n");
1674 return 0; 1673 return 0;
1675 } 1674 }