diff options
Diffstat (limited to 'drivers/net/wireless/iwlegacy/iwl3945-base.c')
-rw-r--r-- | drivers/net/wireless/iwlegacy/iwl3945-base.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/net/wireless/iwlegacy/iwl3945-base.c b/drivers/net/wireless/iwlegacy/iwl3945-base.c index 5037216041ca..ec9a93c9cb8f 100644 --- a/drivers/net/wireless/iwlegacy/iwl3945-base.c +++ b/drivers/net/wireless/iwlegacy/iwl3945-base.c | |||
@@ -646,7 +646,7 @@ static int il3945_tx_skb(struct il_priv *il, struct sk_buff *skb) | |||
646 | il_txq_update_write_ptr(il, txq); | 646 | il_txq_update_write_ptr(il, txq); |
647 | spin_unlock_irqrestore(&il->lock, flags); | 647 | spin_unlock_irqrestore(&il->lock, flags); |
648 | 648 | ||
649 | if ((il_queue_space(q) < q->high_mark) | 649 | if (il_queue_space(q) < q->high_mark |
650 | && il->mac80211_registered) { | 650 | && il->mac80211_registered) { |
651 | if (wait_write_ptr) { | 651 | if (wait_write_ptr) { |
652 | spin_lock_irqsave(&il->lock, flags); | 652 | spin_lock_irqsave(&il->lock, flags); |
@@ -974,7 +974,7 @@ static void il3945_rx_queue_restock(struct il_priv *il) | |||
974 | 974 | ||
975 | spin_lock_irqsave(&rxq->lock, flags); | 975 | spin_lock_irqsave(&rxq->lock, flags); |
976 | write = rxq->write & ~0x7; | 976 | write = rxq->write & ~0x7; |
977 | while ((il_rx_queue_space(rxq) > 0) && (rxq->free_count)) { | 977 | while (il_rx_queue_space(rxq) > 0 && rxq->free_count) { |
978 | /* Get next free Rx buffer, remove from free list */ | 978 | /* Get next free Rx buffer, remove from free list */ |
979 | element = rxq->rx_free.next; | 979 | element = rxq->rx_free.next; |
980 | rxb = list_entry(element, struct il_rx_mem_buffer, list); | 980 | rxb = list_entry(element, struct il_rx_mem_buffer, list); |
@@ -995,8 +995,8 @@ static void il3945_rx_queue_restock(struct il_priv *il) | |||
995 | 995 | ||
996 | /* If we've added more space for the firmware to place data, tell it. | 996 | /* If we've added more space for the firmware to place data, tell it. |
997 | * Increment device's write pointer in multiples of 8. */ | 997 | * Increment device's write pointer in multiples of 8. */ |
998 | if ((rxq->write_actual != (rxq->write & ~0x7)) | 998 | if (rxq->write_actual != (rxq->write & ~0x7) || |
999 | || (abs(rxq->write - rxq->read) > 7)) { | 999 | abs(rxq->write - rxq->read) > 7) { |
1000 | spin_lock_irqsave(&rxq->lock, flags); | 1000 | spin_lock_irqsave(&rxq->lock, flags); |
1001 | rxq->need_update = 1; | 1001 | rxq->need_update = 1; |
1002 | spin_unlock_irqrestore(&rxq->lock, flags); | 1002 | spin_unlock_irqrestore(&rxq->lock, flags); |
@@ -1041,7 +1041,7 @@ static void il3945_rx_allocate(struct il_priv *il, gfp_t priority) | |||
1041 | if (!page) { | 1041 | if (!page) { |
1042 | if (net_ratelimit()) | 1042 | if (net_ratelimit()) |
1043 | D_INFO("Failed to allocate SKB buffer.\n"); | 1043 | D_INFO("Failed to allocate SKB buffer.\n"); |
1044 | if ((rxq->free_count <= RX_LOW_WATERMARK) && | 1044 | if (rxq->free_count <= RX_LOW_WATERMARK && |
1045 | net_ratelimit()) | 1045 | net_ratelimit()) |
1046 | IL_ERR("Failed to allocate SKB buffer with %s. Only %u free buffers remaining.\n", | 1046 | IL_ERR("Failed to allocate SKB buffer with %s. Only %u free buffers remaining.\n", |
1047 | priority == GFP_ATOMIC ? "GFP_ATOMIC" : "GFP_KERNEL", | 1047 | priority == GFP_ATOMIC ? "GFP_ATOMIC" : "GFP_KERNEL", |
@@ -1254,8 +1254,8 @@ static void il3945_rx_handle(struct il_priv *il) | |||
1254 | * Ucode should set SEQ_RX_FRAME bit if ucode-originated, | 1254 | * Ucode should set SEQ_RX_FRAME bit if ucode-originated, |
1255 | * but apparently a few don't get set; catch them here. */ | 1255 | * but apparently a few don't get set; catch them here. */ |
1256 | reclaim = !(pkt->hdr.sequence & SEQ_RX_FRAME) && | 1256 | reclaim = !(pkt->hdr.sequence & SEQ_RX_FRAME) && |
1257 | (pkt->hdr.cmd != STATISTICS_NOTIFICATION) && | 1257 | pkt->hdr.cmd != STATISTICS_NOTIFICATION && |
1258 | (pkt->hdr.cmd != REPLY_TX); | 1258 | pkt->hdr.cmd != REPLY_TX; |
1259 | 1259 | ||
1260 | /* Based on type of command response or notification, | 1260 | /* Based on type of command response or notification, |
1261 | * handle those that need handling via function in | 1261 | * handle those that need handling via function in |
@@ -1659,7 +1659,7 @@ static void il3945_init_hw_rates(struct il_priv *il, | |||
1659 | rates[i].hw_value = i; /* Rate scaling will work on indexes */ | 1659 | rates[i].hw_value = i; /* Rate scaling will work on indexes */ |
1660 | rates[i].hw_value_short = i; | 1660 | rates[i].hw_value_short = i; |
1661 | rates[i].flags = 0; | 1661 | rates[i].flags = 0; |
1662 | if ((i > IWL39_LAST_OFDM_RATE) || (i < IL_FIRST_OFDM_RATE)) { | 1662 | if (i > IWL39_LAST_OFDM_RATE || i < IL_FIRST_OFDM_RATE) { |
1663 | /* | 1663 | /* |
1664 | * If CCK != 1M then set short preamble rate flag. | 1664 | * If CCK != 1M then set short preamble rate flag. |
1665 | */ | 1665 | */ |
@@ -3294,7 +3294,7 @@ static ssize_t il3945_show_measurement(struct device *d, | |||
3294 | il->measurement_status = 0; | 3294 | il->measurement_status = 0; |
3295 | spin_unlock_irqrestore(&il->lock, flags); | 3295 | spin_unlock_irqrestore(&il->lock, flags); |
3296 | 3296 | ||
3297 | while (size && (PAGE_SIZE - len)) { | 3297 | while (size && PAGE_SIZE - len) { |
3298 | hex_dump_to_buffer(data + ofs, size, 16, 1, buf + len, | 3298 | hex_dump_to_buffer(data + ofs, size, 16, 1, buf + len, |
3299 | PAGE_SIZE - len, 1); | 3299 | PAGE_SIZE - len, 1); |
3300 | len = strlen(buf); | 3300 | len = strlen(buf); |
@@ -3406,7 +3406,7 @@ static ssize_t il3945_store_antenna(struct device *d, | |||
3406 | return count; | 3406 | return count; |
3407 | } | 3407 | } |
3408 | 3408 | ||
3409 | if ((ant >= 0) && (ant <= 2)) { | 3409 | if (ant >= 0 && ant <= 2) { |
3410 | D_INFO("Setting antenna select to %d.\n", ant); | 3410 | D_INFO("Setting antenna select to %d.\n", ant); |
3411 | il3945_mod_params.antenna = (enum il3945_antenna)ant; | 3411 | il3945_mod_params.antenna = (enum il3945_antenna)ant; |
3412 | } else | 3412 | } else |