diff options
Diffstat (limited to 'drivers/net/wireless/wl12xx/wl1271_main.c')
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1271_main.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271_main.c b/drivers/net/wireless/wl12xx/wl1271_main.c index ee7ffafaa274..86132bb00787 100644 --- a/drivers/net/wireless/wl12xx/wl1271_main.c +++ b/drivers/net/wireless/wl12xx/wl1271_main.c | |||
@@ -397,8 +397,11 @@ static void wl1271_fw_status(struct wl1271 *wl, | |||
397 | 397 | ||
398 | /* update number of available TX blocks */ | 398 | /* update number of available TX blocks */ |
399 | for (i = 0; i < NUM_TX_QUEUES; i++) { | 399 | for (i = 0; i < NUM_TX_QUEUES; i++) { |
400 | u32 cnt = status->tx_released_blks[i] - wl->tx_blocks_freed[i]; | 400 | u32 cnt = le32_to_cpu(status->tx_released_blks[i]) - |
401 | wl->tx_blocks_freed[i] = status->tx_released_blks[i]; | 401 | wl->tx_blocks_freed[i]; |
402 | |||
403 | wl->tx_blocks_freed[i] = | ||
404 | le32_to_cpu(status->tx_released_blks[i]); | ||
402 | wl->tx_blocks_available += cnt; | 405 | wl->tx_blocks_available += cnt; |
403 | total += cnt; | 406 | total += cnt; |
404 | } | 407 | } |
@@ -408,7 +411,8 @@ static void wl1271_fw_status(struct wl1271 *wl, | |||
408 | ieee80211_queue_work(wl->hw, &wl->tx_work); | 411 | ieee80211_queue_work(wl->hw, &wl->tx_work); |
409 | 412 | ||
410 | /* update the host-chipset time offset */ | 413 | /* update the host-chipset time offset */ |
411 | wl->time_offset = jiffies_to_usecs(jiffies) - status->fw_localtime; | 414 | wl->time_offset = jiffies_to_usecs(jiffies) - |
415 | le32_to_cpu(status->fw_localtime); | ||
412 | } | 416 | } |
413 | 417 | ||
414 | static void wl1271_irq_work(struct work_struct *work) | 418 | static void wl1271_irq_work(struct work_struct *work) |
@@ -432,7 +436,7 @@ static void wl1271_irq_work(struct work_struct *work) | |||
432 | wl1271_spi_write32(wl, ACX_REG_INTERRUPT_MASK, WL1271_ACX_INTR_ALL); | 436 | wl1271_spi_write32(wl, ACX_REG_INTERRUPT_MASK, WL1271_ACX_INTR_ALL); |
433 | 437 | ||
434 | wl1271_fw_status(wl, wl->fw_status); | 438 | wl1271_fw_status(wl, wl->fw_status); |
435 | intr = wl->fw_status->intr; | 439 | intr = le32_to_cpu(wl->fw_status->intr); |
436 | if (!intr) { | 440 | if (!intr) { |
437 | wl1271_debug(DEBUG_IRQ, "Zero interrupt received."); | 441 | wl1271_debug(DEBUG_IRQ, "Zero interrupt received."); |
438 | goto out_sleep; | 442 | goto out_sleep; |