aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43/pio.c
diff options
context:
space:
mode:
authorMichael Buesch <mb@bu3sch.de>2007-09-20 14:13:40 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:52:07 -0400
commit1a09404a2338163f181d170c7abdc2242b6c6f03 (patch)
tree090a31041c1e294a2586f12679a17a5329129272 /drivers/net/wireless/b43/pio.c
parentfb8e4444cc8c7719d9947e21a93e2e84bb1b36eb (diff)
[B43]: Fix sparse warnings.
The remaining warning in phy.c will be fixed later. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wireless/b43/pio.c')
-rw-r--r--drivers/net/wireless/b43/pio.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/net/wireless/b43/pio.c b/drivers/net/wireless/b43/pio.c
index 4ac91fdd356e..67752a28eb9c 100644
--- a/drivers/net/wireless/b43/pio.c
+++ b/drivers/net/wireless/b43/pio.c
@@ -60,7 +60,7 @@ static u16 tx_get_next_word(const u8 * txhdr,
60 source = packet; 60 source = packet;
61 i -= txhdr_size; 61 i -= txhdr_size;
62 } 62 }
63 ret = le16_to_cpu(*((u16 *) (source + i))); 63 ret = le16_to_cpu(*((__le16 *)(source + i)));
64 *pos += 2; 64 *pos += 2;
65 65
66 return ret; 66 return ret;
@@ -104,7 +104,7 @@ static u16 generate_cookie(struct b43_pioqueue *queue,
104 struct b43_pio_txpacket *packet) 104 struct b43_pio_txpacket *packet)
105{ 105{
106 u16 cookie = 0x0000; 106 u16 cookie = 0x0000;
107 int packetindex; 107 u16 packetindex;
108 108
109 /* We use the upper 4 bits for the PIO 109 /* We use the upper 4 bits for the PIO
110 * controller ID and the lower 12 bits 110 * controller ID and the lower 12 bits
@@ -125,7 +125,7 @@ static u16 generate_cookie(struct b43_pioqueue *queue,
125 default: 125 default:
126 B43_WARN_ON(1); 126 B43_WARN_ON(1);
127 } 127 }
128 packetindex = pio_txpacket_getindex(packet); 128 packetindex = packet->index;
129 B43_WARN_ON(packetindex & ~0x0FFF); 129 B43_WARN_ON(packetindex & ~0x0FFF);
130 cookie |= (u16) packetindex; 130 cookie |= (u16) packetindex;
131 131
@@ -286,6 +286,7 @@ static void setup_txqueues(struct b43_pioqueue *queue)
286 286
287 packet->queue = queue; 287 packet->queue = queue;
288 INIT_LIST_HEAD(&packet->list); 288 INIT_LIST_HEAD(&packet->list);
289 packet->index = i;
289 290
290 list_add(&packet->list, &queue->txfree); 291 list_add(&packet->list, &queue->txfree);
291 } 292 }
@@ -518,9 +519,10 @@ static void pio_rx_error(struct b43_pioqueue *queue,
518 519
519void b43_pio_rx(struct b43_pioqueue *queue) 520void b43_pio_rx(struct b43_pioqueue *queue)
520{ 521{
521 u16 preamble[21] = { 0 }; 522 __le16 preamble[21] = { 0 };
522 struct b43_rxhdr_fw4 *rxhdr; 523 struct b43_rxhdr_fw4 *rxhdr;
523 u16 tmp, len, macstat; 524 u16 tmp, len;
525 u32 macstat;
524 int i, preamble_readwords; 526 int i, preamble_readwords;
525 struct sk_buff *skb; 527 struct sk_buff *skb;
526 528
@@ -537,7 +539,7 @@ void b43_pio_rx(struct b43_pioqueue *queue)
537 } 539 }
538 b43dbg(queue->dev->wl, "PIO RX timed out\n"); 540 b43dbg(queue->dev->wl, "PIO RX timed out\n");
539 return; 541 return;
540 data_ready: 542data_ready:
541 543
542 len = b43_pio_read(queue, B43_PIO_RXDATA); 544 len = b43_pio_read(queue, B43_PIO_RXDATA);
543 if (unlikely(len > 0x700)) { 545 if (unlikely(len > 0x700)) {
@@ -558,7 +560,7 @@ void b43_pio_rx(struct b43_pioqueue *queue)
558 preamble[i + 1] = cpu_to_le16(tmp); 560 preamble[i + 1] = cpu_to_le16(tmp);
559 } 561 }
560 rxhdr = (struct b43_rxhdr_fw4 *)preamble; 562 rxhdr = (struct b43_rxhdr_fw4 *)preamble;
561 macstat = le16_to_cpu(rxhdr->mac_status); 563 macstat = le32_to_cpu(rxhdr->mac_status);
562 if (macstat & B43_RX_MAC_FCSERR) { 564 if (macstat & B43_RX_MAC_FCSERR) {
563 pio_rx_error(queue, 565 pio_rx_error(queue,
564 (queue->mmio_base == B43_MMIO_PIO1_BASE), 566 (queue->mmio_base == B43_MMIO_PIO1_BASE),
@@ -583,7 +585,7 @@ void b43_pio_rx(struct b43_pioqueue *queue)
583 skb_put(skb, len); 585 skb_put(skb, len);
584 for (i = 0; i < len - 1; i += 2) { 586 for (i = 0; i < len - 1; i += 2) {
585 tmp = b43_pio_read(queue, B43_PIO_RXDATA); 587 tmp = b43_pio_read(queue, B43_PIO_RXDATA);
586 *((u16 *) (skb->data + i)) = cpu_to_le16(tmp); 588 *((__le16 *)(skb->data + i)) = cpu_to_le16(tmp);
587 } 589 }
588 if (len % 2) { 590 if (len % 2) {
589 tmp = b43_pio_read(queue, B43_PIO_RXDATA); 591 tmp = b43_pio_read(queue, B43_PIO_RXDATA);