aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl12xx/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/wl12xx/main.c')
-rw-r--r--drivers/net/wireless/wl12xx/main.c22
1 files changed, 17 insertions, 5 deletions
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c
index 522bb09c953..91d68122128 100644
--- a/drivers/net/wireless/wl12xx/main.c
+++ b/drivers/net/wireless/wl12xx/main.c
@@ -298,6 +298,12 @@ static struct conf_drv_settings default_conf = {
298 .tx_ba_win_size = 64, 298 .tx_ba_win_size = 64,
299 .inactivity_timeout = 10000, 299 .inactivity_timeout = 10000,
300 }, 300 },
301 .mem = {
302 .dynamic_memory = 0,
303 .min_req_tx_blocks = 104,
304 .min_req_rx_blocks = 22,
305 .tx_min = 27,
306 }
301}; 307};
302 308
303static void __wl1271_op_remove_interface(struct wl1271 *wl); 309static void __wl1271_op_remove_interface(struct wl1271 *wl);
@@ -524,13 +530,19 @@ static int wl1271_plt_init(struct wl1271 *wl)
524} 530}
525 531
526static void wl1271_fw_status(struct wl1271 *wl, 532static void wl1271_fw_status(struct wl1271 *wl,
527 struct wl1271_fw_status *status) 533 struct wl1271_fw_full_status *full_status)
528{ 534{
535 struct wl1271_fw_common_status *status = &full_status->common;
529 struct timespec ts; 536 struct timespec ts;
530 u32 total = 0; 537 u32 total = 0;
531 int i; 538 int i;
532 539
533 wl1271_raw_read(wl, FW_STATUS_ADDR, status, sizeof(*status), false); 540 if (wl->bss_type == BSS_TYPE_AP_BSS)
541 wl1271_raw_read(wl, FW_STATUS_ADDR, status,
542 sizeof(struct wl1271_fw_ap_status), false);
543 else
544 wl1271_raw_read(wl, FW_STATUS_ADDR, status,
545 sizeof(struct wl1271_fw_sta_status), false);
534 546
535 wl1271_debug(DEBUG_IRQ, "intr: 0x%x (fw_rx_counter = %d, " 547 wl1271_debug(DEBUG_IRQ, "intr: 0x%x (fw_rx_counter = %d, "
536 "drv_rx_counter = %d, tx_results_counter = %d)", 548 "drv_rx_counter = %d, tx_results_counter = %d)",
@@ -589,7 +601,7 @@ static void wl1271_irq_work(struct work_struct *work)
589 loopcount--; 601 loopcount--;
590 602
591 wl1271_fw_status(wl, wl->fw_status); 603 wl1271_fw_status(wl, wl->fw_status);
592 intr = le32_to_cpu(wl->fw_status->intr); 604 intr = le32_to_cpu(wl->fw_status->common.intr);
593 if (!intr) { 605 if (!intr) {
594 wl1271_debug(DEBUG_IRQ, "Zero interrupt received."); 606 wl1271_debug(DEBUG_IRQ, "Zero interrupt received.");
595 spin_lock_irqsave(&wl->wl_lock, flags); 607 spin_lock_irqsave(&wl->wl_lock, flags);
@@ -611,7 +623,7 @@ static void wl1271_irq_work(struct work_struct *work)
611 wl1271_debug(DEBUG_IRQ, "WL1271_ACX_INTR_DATA"); 623 wl1271_debug(DEBUG_IRQ, "WL1271_ACX_INTR_DATA");
612 624
613 /* check for tx results */ 625 /* check for tx results */
614 if (wl->fw_status->tx_results_counter != 626 if (wl->fw_status->common.tx_results_counter !=
615 (wl->tx_results_count & 0xff)) 627 (wl->tx_results_count & 0xff))
616 wl1271_tx_complete(wl); 628 wl1271_tx_complete(wl);
617 629
@@ -625,7 +637,7 @@ static void wl1271_irq_work(struct work_struct *work)
625 wl1271_tx_work_locked(wl); 637 wl1271_tx_work_locked(wl);
626 } 638 }
627 639
628 wl1271_rx(wl, wl->fw_status); 640 wl1271_rx(wl, &wl->fw_status->common);
629 } 641 }
630 642
631 if (intr & WL1271_ACX_INTR_EVENT_A) { 643 if (intr & WL1271_ACX_INTR_EVENT_A) {