aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ipw2200.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/ipw2200.c')
-rw-r--r--drivers/net/wireless/ipw2200.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/drivers/net/wireless/ipw2200.c b/drivers/net/wireless/ipw2200.c
index 69733465354b..e256d3181cf3 100644
--- a/drivers/net/wireless/ipw2200.c
+++ b/drivers/net/wireless/ipw2200.c
@@ -241,8 +241,8 @@ static void _ipw_write_reg8(struct ipw_priv *priv, u32 reg, u8 value)
241 IPW_DEBUG_IO(" reg = 0x%8X : value = 0x%8X\n", reg, value); 241 IPW_DEBUG_IO(" reg = 0x%8X : value = 0x%8X\n", reg, value);
242 _ipw_write32(priv, CX2_INDIRECT_ADDR, reg & CX2_INDIRECT_ADDR_MASK); 242 _ipw_write32(priv, CX2_INDIRECT_ADDR, reg & CX2_INDIRECT_ADDR_MASK);
243 _ipw_write8(priv, CX2_INDIRECT_DATA, value); 243 _ipw_write8(priv, CX2_INDIRECT_DATA, value);
244 IPW_DEBUG_IO(" reg = 0x%8X : value = 0x%8X\n", 244 IPW_DEBUG_IO(" reg = 0x%8lX : value = 0x%8X\n",
245 (unsigned)(priv->hw_base + CX2_INDIRECT_DATA), 245 (unsigned long)(priv->hw_base + CX2_INDIRECT_DATA),
246 value); 246 value);
247} 247}
248 248
@@ -508,7 +508,7 @@ static int ipw_get_ordinal(struct ipw_priv *priv, u32 ord, void *val,
508 /* verify we have enough room to store the value */ 508 /* verify we have enough room to store the value */
509 if (*len < sizeof(u32)) { 509 if (*len < sizeof(u32)) {
510 IPW_DEBUG_ORD("ordinal buffer length too small, " 510 IPW_DEBUG_ORD("ordinal buffer length too small, "
511 "need %d\n", sizeof(u32)); 511 "need %zd\n", sizeof(u32));
512 return -EINVAL; 512 return -EINVAL;
513 } 513 }
514 514
@@ -541,7 +541,7 @@ static int ipw_get_ordinal(struct ipw_priv *priv, u32 ord, void *val,
541 /* verify we have enough room to store the value */ 541 /* verify we have enough room to store the value */
542 if (*len < sizeof(u32)) { 542 if (*len < sizeof(u32)) {
543 IPW_DEBUG_ORD("ordinal buffer length too small, " 543 IPW_DEBUG_ORD("ordinal buffer length too small, "
544 "need %d\n", sizeof(u32)); 544 "need %zd\n", sizeof(u32));
545 return -EINVAL; 545 return -EINVAL;
546 } 546 }
547 547
@@ -1740,7 +1740,7 @@ static int ipw_fw_dma_write_command_block(struct ipw_priv *priv, int index, stru
1740 u32 address = CX2_SHARED_SRAM_DMA_CONTROL + (sizeof(struct command_block) * index); 1740 u32 address = CX2_SHARED_SRAM_DMA_CONTROL + (sizeof(struct command_block) * index);
1741 IPW_DEBUG_FW(">> :\n"); 1741 IPW_DEBUG_FW(">> :\n");
1742 1742
1743 ipw_write_indirect(priv, address, (u8*)cb, sizeof(struct command_block)); 1743 ipw_write_indirect(priv, address, (u8*)cb, (int)sizeof(struct command_block));
1744 1744
1745 IPW_DEBUG_FW("<< :\n"); 1745 IPW_DEBUG_FW("<< :\n");
1746 return 0; 1746 return 0;
@@ -2342,7 +2342,7 @@ static int ipw_get_fw(struct ipw_priv *priv,
2342 return -EINVAL; 2342 return -EINVAL;
2343 } 2343 }
2344 2344
2345 IPW_DEBUG_INFO("Loading firmware '%s' file v%d.%d (%d bytes)\n", 2345 IPW_DEBUG_INFO("Loading firmware '%s' file v%d.%d (%zd bytes)\n",
2346 name, 2346 name,
2347 IPW_FW_MAJOR(header->version), 2347 IPW_FW_MAJOR(header->version),
2348 IPW_FW_MINOR(header->version), 2348 IPW_FW_MINOR(header->version),
@@ -2697,7 +2697,7 @@ static int ipw_queue_tx_init(struct ipw_priv *priv,
2697 2697
2698 q->bd = pci_alloc_consistent(dev,sizeof(q->bd[0])*count, &q->q.dma_addr); 2698 q->bd = pci_alloc_consistent(dev,sizeof(q->bd[0])*count, &q->q.dma_addr);
2699 if (!q->bd) { 2699 if (!q->bd) {
2700 IPW_ERROR("pci_alloc_consistent(%d) failed\n", 2700 IPW_ERROR("pci_alloc_consistent(%zd) failed\n",
2701 sizeof(q->bd[0]) * count); 2701 sizeof(q->bd[0]) * count);
2702 kfree(q->txb); 2702 kfree(q->txb);
2703 q->txb = NULL; 2703 q->txb = NULL;
@@ -3466,8 +3466,8 @@ static inline void ipw_rx_notification(struct ipw_priv* priv,
3466 x->channel_num); 3466 x->channel_num);
3467 } else { 3467 } else {
3468 IPW_DEBUG_SCAN("Scan result of wrong size %d " 3468 IPW_DEBUG_SCAN("Scan result of wrong size %d "
3469 "(should be %d)\n", 3469 "(should be %zd)\n",
3470 notif->size,sizeof(*x)); 3470 notif->size, sizeof(*x));
3471 } 3471 }
3472 break; 3472 break;
3473 } 3473 }
@@ -3482,8 +3482,8 @@ static inline void ipw_rx_notification(struct ipw_priv* priv,
3482 x->status); 3482 x->status);
3483 } else { 3483 } else {
3484 IPW_ERROR("Scan completed of wrong size %d " 3484 IPW_ERROR("Scan completed of wrong size %d "
3485 "(should be %d)\n", 3485 "(should be %zd)\n",
3486 notif->size,sizeof(*x)); 3486 notif->size, sizeof(*x));
3487 } 3487 }
3488 3488
3489 priv->status &= ~(STATUS_SCANNING | STATUS_SCAN_ABORTING); 3489 priv->status &= ~(STATUS_SCANNING | STATUS_SCAN_ABORTING);
@@ -3515,7 +3515,7 @@ static inline void ipw_rx_notification(struct ipw_priv* priv,
3515 IPW_ERROR("Frag length: %d\n", x->frag_length); 3515 IPW_ERROR("Frag length: %d\n", x->frag_length);
3516 } else { 3516 } else {
3517 IPW_ERROR("Frag length of wrong size %d " 3517 IPW_ERROR("Frag length of wrong size %d "
3518 "(should be %d)\n", 3518 "(should be %zd)\n",
3519 notif->size, sizeof(*x)); 3519 notif->size, sizeof(*x));
3520 } 3520 }
3521 break; 3521 break;
@@ -3532,8 +3532,8 @@ static inline void ipw_rx_notification(struct ipw_priv* priv,
3532 memcpy(&priv->last_link_deterioration, x, sizeof(*x)); 3532 memcpy(&priv->last_link_deterioration, x, sizeof(*x));
3533 } else { 3533 } else {
3534 IPW_ERROR("Link Deterioration of wrong size %d " 3534 IPW_ERROR("Link Deterioration of wrong size %d "
3535 "(should be %d)\n", 3535 "(should be %zd)\n",
3536 notif->size,sizeof(*x)); 3536 notif->size, sizeof(*x));
3537 } 3537 }
3538 break; 3538 break;
3539 } 3539 }
@@ -3552,7 +3552,7 @@ static inline void ipw_rx_notification(struct ipw_priv* priv,
3552 struct notif_beacon_state *x = &notif->u.beacon_state; 3552 struct notif_beacon_state *x = &notif->u.beacon_state;
3553 if (notif->size != sizeof(*x)) { 3553 if (notif->size != sizeof(*x)) {
3554 IPW_ERROR("Beacon state of wrong size %d (should " 3554 IPW_ERROR("Beacon state of wrong size %d (should "
3555 "be %d)\n", notif->size, sizeof(*x)); 3555 "be %zd)\n", notif->size, sizeof(*x));
3556 break; 3556 break;
3557 } 3557 }
3558 3558
@@ -3602,8 +3602,8 @@ static inline void ipw_rx_notification(struct ipw_priv* priv,
3602 break; 3602 break;
3603 } 3603 }
3604 3604
3605 IPW_ERROR("TGi Tx Key of wrong size %d (should be %d)\n", 3605 IPW_ERROR("TGi Tx Key of wrong size %d (should be %zd)\n",
3606 notif->size,sizeof(*x)); 3606 notif->size, sizeof(*x));
3607 break; 3607 break;
3608 } 3608 }
3609 3609
@@ -3616,8 +3616,8 @@ static inline void ipw_rx_notification(struct ipw_priv* priv,
3616 break; 3616 break;
3617 } 3617 }
3618 3618
3619 IPW_ERROR("Calibration of wrong size %d (should be %d)\n", 3619 IPW_ERROR("Calibration of wrong size %d (should be %zd)\n",
3620 notif->size,sizeof(*x)); 3620 notif->size, sizeof(*x));
3621 break; 3621 break;
3622 } 3622 }
3623 3623
@@ -3628,7 +3628,7 @@ static inline void ipw_rx_notification(struct ipw_priv* priv,
3628 break; 3628 break;
3629 } 3629 }
3630 3630
3631 IPW_ERROR("Noise stat is wrong size %d (should be %d)\n", 3631 IPW_ERROR("Noise stat is wrong size %d (should be %zd)\n",
3632 notif->size, sizeof(u32)); 3632 notif->size, sizeof(u32));
3633 break; 3633 break;
3634 } 3634 }
@@ -4823,7 +4823,7 @@ static inline void ipw_handle_data_packet(struct ipw_priv *priv,
4823 } 4823 }
4824 4824
4825 /* Advance skb->data to the start of the actual payload */ 4825 /* Advance skb->data to the start of the actual payload */
4826 skb_reserve(rxb->skb, (u32)&pkt->u.frame.data[0] - (u32)pkt); 4826 skb_reserve(rxb->skb, offsetof(struct ipw_rx_packet, u.frame.data));
4827 4827
4828 /* Set the size of the skb to the size of the frame */ 4828 /* Set the size of the skb to the size of the frame */
4829 skb_put(rxb->skb, pkt->u.frame.length); 4829 skb_put(rxb->skb, pkt->u.frame.length);