diff options
-rw-r--r-- | drivers/net/wireless/ipw2100.c | 24 | ||||
-rw-r--r-- | drivers/net/wireless/ipw2200.c | 42 |
2 files changed, 33 insertions, 33 deletions
diff --git a/drivers/net/wireless/ipw2100.c b/drivers/net/wireless/ipw2100.c index d296d464946f..9360763735f0 100644 --- a/drivers/net/wireless/ipw2100.c +++ b/drivers/net/wireless/ipw2100.c | |||
@@ -493,7 +493,7 @@ int ipw2100_get_ordinal(struct ipw2100_priv *priv, u32 ord, | |||
493 | *len = IPW_ORD_TAB_1_ENTRY_SIZE; | 493 | *len = IPW_ORD_TAB_1_ENTRY_SIZE; |
494 | 494 | ||
495 | IPW_DEBUG_WARNING(DRV_NAME | 495 | IPW_DEBUG_WARNING(DRV_NAME |
496 | ": ordinal buffer length too small, need %d\n", | 496 | ": ordinal buffer length too small, need %zd\n", |
497 | IPW_ORD_TAB_1_ENTRY_SIZE); | 497 | IPW_ORD_TAB_1_ENTRY_SIZE); |
498 | 498 | ||
499 | return -EINVAL; | 499 | return -EINVAL; |
@@ -2302,7 +2302,7 @@ static inline void ipw2100_corruption_detected(struct ipw2100_priv *priv, | |||
2302 | #endif | 2302 | #endif |
2303 | 2303 | ||
2304 | IPW_DEBUG_INFO(DRV_NAME ": PCI latency error detected at " | 2304 | IPW_DEBUG_INFO(DRV_NAME ": PCI latency error detected at " |
2305 | "0x%04X.\n", i * sizeof(struct ipw2100_status)); | 2305 | "0x%04zX.\n", i * sizeof(struct ipw2100_status)); |
2306 | 2306 | ||
2307 | #ifdef ACPI_CSTATE_LIMIT_DEFINED | 2307 | #ifdef ACPI_CSTATE_LIMIT_DEFINED |
2308 | IPW_DEBUG_INFO(DRV_NAME ": Disabling C3 transitions.\n"); | 2308 | IPW_DEBUG_INFO(DRV_NAME ": Disabling C3 transitions.\n"); |
@@ -2398,7 +2398,7 @@ static inline void isr_rx(struct ipw2100_priv *priv, int i, | |||
2398 | /* Make a copy of the frame so we can dump it to the logs if | 2398 | /* Make a copy of the frame so we can dump it to the logs if |
2399 | * ieee80211_rx fails */ | 2399 | * ieee80211_rx fails */ |
2400 | memcpy(packet_data, packet->skb->data, | 2400 | memcpy(packet_data, packet->skb->data, |
2401 | min(status->frame_size, IPW_RX_NIC_BUFFER_LENGTH)); | 2401 | min_t(u32, status->frame_size, IPW_RX_NIC_BUFFER_LENGTH)); |
2402 | #endif | 2402 | #endif |
2403 | 2403 | ||
2404 | if (!ieee80211_rx(priv->ieee, packet->skb, stats)) { | 2404 | if (!ieee80211_rx(priv->ieee, packet->skb, stats)) { |
@@ -2730,21 +2730,21 @@ static inline int __ipw2100_tx_process(struct ipw2100_priv *priv) | |||
2730 | { | 2730 | { |
2731 | int i = txq->oldest; | 2731 | int i = txq->oldest; |
2732 | IPW_DEBUG_TX( | 2732 | IPW_DEBUG_TX( |
2733 | "TX%d V=%p P=%p T=%p L=%d\n", i, | 2733 | "TX%d V=%p P=%04X T=%04X L=%d\n", i, |
2734 | &txq->drv[i], | 2734 | &txq->drv[i], |
2735 | (void*)txq->nic + i * sizeof(struct ipw2100_bd), | 2735 | (u32)(txq->nic + i * sizeof(struct ipw2100_bd)), |
2736 | (void*)txq->drv[i].host_addr, | 2736 | txq->drv[i].host_addr, |
2737 | txq->drv[i].buf_length); | 2737 | txq->drv[i].buf_length); |
2738 | 2738 | ||
2739 | if (packet->type == DATA) { | 2739 | if (packet->type == DATA) { |
2740 | i = (i + 1) % txq->entries; | 2740 | i = (i + 1) % txq->entries; |
2741 | 2741 | ||
2742 | IPW_DEBUG_TX( | 2742 | IPW_DEBUG_TX( |
2743 | "TX%d V=%p P=%p T=%p L=%d\n", i, | 2743 | "TX%d V=%p P=%04X T=%04X L=%d\n", i, |
2744 | &txq->drv[i], | 2744 | &txq->drv[i], |
2745 | (void*)txq->nic + i * | 2745 | (u32)(txq->nic + i * |
2746 | sizeof(struct ipw2100_bd), | 2746 | sizeof(struct ipw2100_bd)), |
2747 | (void*)txq->drv[i].host_addr, | 2747 | (u32)txq->drv[i].host_addr, |
2748 | txq->drv[i].buf_length); | 2748 | txq->drv[i].buf_length); |
2749 | } | 2749 | } |
2750 | } | 2750 | } |
@@ -4212,7 +4212,7 @@ static void bd_queue_initialize( | |||
4212 | { | 4212 | { |
4213 | IPW_DEBUG_INFO("enter\n"); | 4213 | IPW_DEBUG_INFO("enter\n"); |
4214 | 4214 | ||
4215 | IPW_DEBUG_INFO("initializing bd queue at virt=%p, phys=%08x\n", q->drv, q->nic); | 4215 | IPW_DEBUG_INFO("initializing bd queue at virt=%p, phys=%08x\n", q->drv, (u32)q->nic); |
4216 | 4216 | ||
4217 | write_register(priv->net_dev, base, q->nic); | 4217 | write_register(priv->net_dev, base, q->nic); |
4218 | write_register(priv->net_dev, size, q->entries); | 4218 | write_register(priv->net_dev, size, q->entries); |
@@ -8431,7 +8431,7 @@ int ipw2100_get_firmware(struct ipw2100_priv *priv, struct ipw2100_fw *fw) | |||
8431 | priv->net_dev->name, fw_name); | 8431 | priv->net_dev->name, fw_name); |
8432 | return rc; | 8432 | return rc; |
8433 | } | 8433 | } |
8434 | IPW_DEBUG_INFO("firmware data %p size %d\n", fw->fw_entry->data, | 8434 | IPW_DEBUG_INFO("firmware data %p size %zd\n", fw->fw_entry->data, |
8435 | fw->fw_entry->size); | 8435 | fw->fw_entry->size); |
8436 | 8436 | ||
8437 | ipw2100_mod_firmware_load(fw); | 8437 | ipw2100_mod_firmware_load(fw); |
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 = ¬if->u.beacon_state; | 3552 | struct notif_beacon_state *x = ¬if->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); |