ARM: mm: Recreate kernel mappings in early_paging_init()
[linux/fpc-iii.git] / drivers / net / wireless / ath / ath6kl / hif.c
blobfea7709b5dda59aa26fa0fbc5eb70caccea77918
1 /*
2 * Copyright (c) 2007-2011 Atheros Communications Inc.
3 * Copyright (c) 2011-2012 Qualcomm Atheros, Inc.
5 * Permission to use, copy, modify, and/or distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the above
7 * copyright notice and this permission notice appear in all copies.
9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 #include "hif.h"
19 #include <linux/export.h>
21 #include "core.h"
22 #include "target.h"
23 #include "hif-ops.h"
24 #include "debug.h"
25 #include "trace.h"
27 #define MAILBOX_FOR_BLOCK_SIZE 1
29 #define ATH6KL_TIME_QUANTUM 10 /* in ms */
31 static int ath6kl_hif_cp_scat_dma_buf(struct hif_scatter_req *req,
32 bool from_dma)
34 u8 *buf;
35 int i;
37 buf = req->virt_dma_buf;
39 for (i = 0; i < req->scat_entries; i++) {
41 if (from_dma)
42 memcpy(req->scat_list[i].buf, buf,
43 req->scat_list[i].len);
44 else
45 memcpy(buf, req->scat_list[i].buf,
46 req->scat_list[i].len);
48 buf += req->scat_list[i].len;
51 return 0;
54 int ath6kl_hif_rw_comp_handler(void *context, int status)
56 struct htc_packet *packet = context;
58 ath6kl_dbg(ATH6KL_DBG_HIF, "hif rw completion pkt 0x%p status %d\n",
59 packet, status);
61 packet->status = status;
62 packet->completion(packet->context, packet);
64 return 0;
66 EXPORT_SYMBOL(ath6kl_hif_rw_comp_handler);
68 #define REG_DUMP_COUNT_AR6003 60
69 #define REGISTER_DUMP_LEN_MAX 60
71 static void ath6kl_hif_dump_fw_crash(struct ath6kl *ar)
73 __le32 regdump_val[REGISTER_DUMP_LEN_MAX];
74 u32 i, address, regdump_addr = 0;
75 int ret;
77 if (ar->target_type != TARGET_TYPE_AR6003)
78 return;
80 /* the reg dump pointer is copied to the host interest area */
81 address = ath6kl_get_hi_item_addr(ar, HI_ITEM(hi_failure_state));
82 address = TARG_VTOP(ar->target_type, address);
84 /* read RAM location through diagnostic window */
85 ret = ath6kl_diag_read32(ar, address, &regdump_addr);
87 if (ret || !regdump_addr) {
88 ath6kl_warn("failed to get ptr to register dump area: %d\n",
89 ret);
90 return;
93 ath6kl_dbg(ATH6KL_DBG_IRQ, "register dump data address 0x%x\n",
94 regdump_addr);
95 regdump_addr = TARG_VTOP(ar->target_type, regdump_addr);
97 /* fetch register dump data */
98 ret = ath6kl_diag_read(ar, regdump_addr, (u8 *)&regdump_val[0],
99 REG_DUMP_COUNT_AR6003 * (sizeof(u32)));
100 if (ret) {
101 ath6kl_warn("failed to get register dump: %d\n", ret);
102 return;
105 ath6kl_info("crash dump:\n");
106 ath6kl_info("hw 0x%x fw %s\n", ar->wiphy->hw_version,
107 ar->wiphy->fw_version);
109 BUILD_BUG_ON(REG_DUMP_COUNT_AR6003 % 4);
111 for (i = 0; i < REG_DUMP_COUNT_AR6003; i += 4) {
112 ath6kl_info("%d: 0x%8.8x 0x%8.8x 0x%8.8x 0x%8.8x\n",
114 le32_to_cpu(regdump_val[i]),
115 le32_to_cpu(regdump_val[i + 1]),
116 le32_to_cpu(regdump_val[i + 2]),
117 le32_to_cpu(regdump_val[i + 3]));
122 static int ath6kl_hif_proc_dbg_intr(struct ath6kl_device *dev)
124 u32 dummy;
125 int ret;
127 ath6kl_warn("firmware crashed\n");
130 * read counter to clear the interrupt, the debug error interrupt is
131 * counter 0.
133 ret = hif_read_write_sync(dev->ar, COUNT_DEC_ADDRESS,
134 (u8 *)&dummy, 4, HIF_RD_SYNC_BYTE_INC);
135 if (ret)
136 ath6kl_warn("Failed to clear debug interrupt: %d\n", ret);
138 ath6kl_hif_dump_fw_crash(dev->ar);
139 ath6kl_read_fwlogs(dev->ar);
140 ath6kl_recovery_err_notify(dev->ar, ATH6KL_FW_ASSERT);
142 return ret;
145 /* mailbox recv message polling */
146 int ath6kl_hif_poll_mboxmsg_rx(struct ath6kl_device *dev, u32 *lk_ahd,
147 int timeout)
149 struct ath6kl_irq_proc_registers *rg;
150 int status = 0, i;
151 u8 htc_mbox = 1 << HTC_MAILBOX;
153 for (i = timeout / ATH6KL_TIME_QUANTUM; i > 0; i--) {
154 /* this is the standard HIF way, load the reg table */
155 status = hif_read_write_sync(dev->ar, HOST_INT_STATUS_ADDRESS,
156 (u8 *) &dev->irq_proc_reg,
157 sizeof(dev->irq_proc_reg),
158 HIF_RD_SYNC_BYTE_INC);
160 if (status) {
161 ath6kl_err("failed to read reg table\n");
162 return status;
165 /* check for MBOX data and valid lookahead */
166 if (dev->irq_proc_reg.host_int_status & htc_mbox) {
167 if (dev->irq_proc_reg.rx_lkahd_valid &
168 htc_mbox) {
170 * Mailbox has a message and the look ahead
171 * is valid.
173 rg = &dev->irq_proc_reg;
174 *lk_ahd =
175 le32_to_cpu(rg->rx_lkahd[HTC_MAILBOX]);
176 break;
180 /* delay a little */
181 mdelay(ATH6KL_TIME_QUANTUM);
182 ath6kl_dbg(ATH6KL_DBG_HIF, "hif retry mbox poll try %d\n", i);
185 if (i == 0) {
186 ath6kl_err("timeout waiting for recv message\n");
187 status = -ETIME;
188 /* check if the target asserted */
189 if (dev->irq_proc_reg.counter_int_status &
190 ATH6KL_TARGET_DEBUG_INTR_MASK)
192 * Target failure handler will be called in case of
193 * an assert.
195 ath6kl_hif_proc_dbg_intr(dev);
198 return status;
202 * Disable packet reception (used in case the host runs out of buffers)
203 * using the interrupt enable registers through the host I/F
205 int ath6kl_hif_rx_control(struct ath6kl_device *dev, bool enable_rx)
207 struct ath6kl_irq_enable_reg regs;
208 int status = 0;
210 ath6kl_dbg(ATH6KL_DBG_HIF, "hif rx %s\n",
211 enable_rx ? "enable" : "disable");
213 /* take the lock to protect interrupt enable shadows */
214 spin_lock_bh(&dev->lock);
216 if (enable_rx)
217 dev->irq_en_reg.int_status_en |=
218 SM(INT_STATUS_ENABLE_MBOX_DATA, 0x01);
219 else
220 dev->irq_en_reg.int_status_en &=
221 ~SM(INT_STATUS_ENABLE_MBOX_DATA, 0x01);
223 memcpy(&regs, &dev->irq_en_reg, sizeof(regs));
225 spin_unlock_bh(&dev->lock);
227 status = hif_read_write_sync(dev->ar, INT_STATUS_ENABLE_ADDRESS,
228 &regs.int_status_en,
229 sizeof(struct ath6kl_irq_enable_reg),
230 HIF_WR_SYNC_BYTE_INC);
232 return status;
235 int ath6kl_hif_submit_scat_req(struct ath6kl_device *dev,
236 struct hif_scatter_req *scat_req, bool read)
238 int status = 0;
240 if (read) {
241 scat_req->req = HIF_RD_SYNC_BLOCK_FIX;
242 scat_req->addr = dev->ar->mbox_info.htc_addr;
243 } else {
244 scat_req->req = HIF_WR_ASYNC_BLOCK_INC;
246 scat_req->addr =
247 (scat_req->len > HIF_MBOX_WIDTH) ?
248 dev->ar->mbox_info.htc_ext_addr :
249 dev->ar->mbox_info.htc_addr;
252 ath6kl_dbg(ATH6KL_DBG_HIF,
253 "hif submit scatter request entries %d len %d mbox 0x%x %s %s\n",
254 scat_req->scat_entries, scat_req->len,
255 scat_req->addr, !read ? "async" : "sync",
256 (read) ? "rd" : "wr");
258 if (!read && scat_req->virt_scat) {
259 status = ath6kl_hif_cp_scat_dma_buf(scat_req, false);
260 if (status) {
261 scat_req->status = status;
262 scat_req->complete(dev->ar->htc_target, scat_req);
263 return 0;
267 status = ath6kl_hif_scat_req_rw(dev->ar, scat_req);
269 if (read) {
270 /* in sync mode, we can touch the scatter request */
271 scat_req->status = status;
272 if (!status && scat_req->virt_scat)
273 scat_req->status =
274 ath6kl_hif_cp_scat_dma_buf(scat_req, true);
277 return status;
280 static int ath6kl_hif_proc_counter_intr(struct ath6kl_device *dev)
282 u8 counter_int_status;
284 ath6kl_dbg(ATH6KL_DBG_IRQ, "counter interrupt\n");
286 counter_int_status = dev->irq_proc_reg.counter_int_status &
287 dev->irq_en_reg.cntr_int_status_en;
289 ath6kl_dbg(ATH6KL_DBG_IRQ,
290 "valid interrupt source(s) in COUNTER_INT_STATUS: 0x%x\n",
291 counter_int_status);
294 * NOTE: other modules like GMBOX may use the counter interrupt for
295 * credit flow control on other counters, we only need to check for
296 * the debug assertion counter interrupt.
298 if (counter_int_status & ATH6KL_TARGET_DEBUG_INTR_MASK)
299 return ath6kl_hif_proc_dbg_intr(dev);
301 return 0;
304 static int ath6kl_hif_proc_err_intr(struct ath6kl_device *dev)
306 int status;
307 u8 error_int_status;
308 u8 reg_buf[4];
310 ath6kl_dbg(ATH6KL_DBG_IRQ, "error interrupt\n");
312 error_int_status = dev->irq_proc_reg.error_int_status & 0x0F;
313 if (!error_int_status) {
314 WARN_ON(1);
315 return -EIO;
318 ath6kl_dbg(ATH6KL_DBG_IRQ,
319 "valid interrupt source(s) in ERROR_INT_STATUS: 0x%x\n",
320 error_int_status);
322 if (MS(ERROR_INT_STATUS_WAKEUP, error_int_status))
323 ath6kl_dbg(ATH6KL_DBG_IRQ, "error : wakeup\n");
325 if (MS(ERROR_INT_STATUS_RX_UNDERFLOW, error_int_status))
326 ath6kl_err("rx underflow\n");
328 if (MS(ERROR_INT_STATUS_TX_OVERFLOW, error_int_status))
329 ath6kl_err("tx overflow\n");
331 /* Clear the interrupt */
332 dev->irq_proc_reg.error_int_status &= ~error_int_status;
334 /* set W1C value to clear the interrupt, this hits the register first */
335 reg_buf[0] = error_int_status;
336 reg_buf[1] = 0;
337 reg_buf[2] = 0;
338 reg_buf[3] = 0;
340 status = hif_read_write_sync(dev->ar, ERROR_INT_STATUS_ADDRESS,
341 reg_buf, 4, HIF_WR_SYNC_BYTE_FIX);
343 WARN_ON(status);
345 return status;
348 static int ath6kl_hif_proc_cpu_intr(struct ath6kl_device *dev)
350 int status;
351 u8 cpu_int_status;
352 u8 reg_buf[4];
354 ath6kl_dbg(ATH6KL_DBG_IRQ, "cpu interrupt\n");
356 cpu_int_status = dev->irq_proc_reg.cpu_int_status &
357 dev->irq_en_reg.cpu_int_status_en;
358 if (!cpu_int_status) {
359 WARN_ON(1);
360 return -EIO;
363 ath6kl_dbg(ATH6KL_DBG_IRQ,
364 "valid interrupt source(s) in CPU_INT_STATUS: 0x%x\n",
365 cpu_int_status);
367 /* Clear the interrupt */
368 dev->irq_proc_reg.cpu_int_status &= ~cpu_int_status;
371 * Set up the register transfer buffer to hit the register 4 times ,
372 * this is done to make the access 4-byte aligned to mitigate issues
373 * with host bus interconnects that restrict bus transfer lengths to
374 * be a multiple of 4-bytes.
377 /* set W1C value to clear the interrupt, this hits the register first */
378 reg_buf[0] = cpu_int_status;
379 /* the remaining are set to zero which have no-effect */
380 reg_buf[1] = 0;
381 reg_buf[2] = 0;
382 reg_buf[3] = 0;
384 status = hif_read_write_sync(dev->ar, CPU_INT_STATUS_ADDRESS,
385 reg_buf, 4, HIF_WR_SYNC_BYTE_FIX);
387 WARN_ON(status);
389 return status;
392 /* process pending interrupts synchronously */
393 static int proc_pending_irqs(struct ath6kl_device *dev, bool *done)
395 struct ath6kl_irq_proc_registers *rg;
396 int status = 0;
397 u8 host_int_status = 0;
398 u32 lk_ahd = 0;
399 u8 htc_mbox = 1 << HTC_MAILBOX;
401 ath6kl_dbg(ATH6KL_DBG_IRQ, "proc_pending_irqs: (dev: 0x%p)\n", dev);
404 * NOTE: HIF implementation guarantees that the context of this
405 * call allows us to perform SYNCHRONOUS I/O, that is we can block,
406 * sleep or call any API that can block or switch thread/task
407 * contexts. This is a fully schedulable context.
411 * Process pending intr only when int_status_en is clear, it may
412 * result in unnecessary bus transaction otherwise. Target may be
413 * unresponsive at the time.
415 if (dev->irq_en_reg.int_status_en) {
417 * Read the first 28 bytes of the HTC register table. This
418 * will yield us the value of different int status
419 * registers and the lookahead registers.
421 * length = sizeof(int_status) + sizeof(cpu_int_status)
422 * + sizeof(error_int_status) +
423 * sizeof(counter_int_status) +
424 * sizeof(mbox_frame) + sizeof(rx_lkahd_valid)
425 * + sizeof(hole) + sizeof(rx_lkahd) +
426 * sizeof(int_status_en) +
427 * sizeof(cpu_int_status_en) +
428 * sizeof(err_int_status_en) +
429 * sizeof(cntr_int_status_en);
431 status = hif_read_write_sync(dev->ar, HOST_INT_STATUS_ADDRESS,
432 (u8 *) &dev->irq_proc_reg,
433 sizeof(dev->irq_proc_reg),
434 HIF_RD_SYNC_BYTE_INC);
435 if (status)
436 goto out;
438 ath6kl_dump_registers(dev, &dev->irq_proc_reg,
439 &dev->irq_en_reg);
440 trace_ath6kl_sdio_irq(&dev->irq_en_reg,
441 sizeof(dev->irq_en_reg));
443 /* Update only those registers that are enabled */
444 host_int_status = dev->irq_proc_reg.host_int_status &
445 dev->irq_en_reg.int_status_en;
447 /* Look at mbox status */
448 if (host_int_status & htc_mbox) {
450 * Mask out pending mbox value, we use "lookAhead as
451 * the real flag for mbox processing.
453 host_int_status &= ~htc_mbox;
454 if (dev->irq_proc_reg.rx_lkahd_valid &
455 htc_mbox) {
456 rg = &dev->irq_proc_reg;
457 lk_ahd = le32_to_cpu(rg->rx_lkahd[HTC_MAILBOX]);
458 if (!lk_ahd)
459 ath6kl_err("lookAhead is zero!\n");
464 if (!host_int_status && !lk_ahd) {
465 *done = true;
466 goto out;
469 if (lk_ahd) {
470 int fetched = 0;
472 ath6kl_dbg(ATH6KL_DBG_IRQ,
473 "pending mailbox msg, lk_ahd: 0x%X\n", lk_ahd);
475 * Mailbox Interrupt, the HTC layer may issue async
476 * requests to empty the mailbox. When emptying the recv
477 * mailbox we use the async handler above called from the
478 * completion routine of the callers read request. This can
479 * improve performance by reducing context switching when
480 * we rapidly pull packets.
482 status = ath6kl_htc_rxmsg_pending_handler(dev->htc_cnxt,
483 lk_ahd, &fetched);
484 if (status)
485 goto out;
487 if (!fetched)
489 * HTC could not pull any messages out due to lack
490 * of resources.
492 dev->htc_cnxt->chk_irq_status_cnt = 0;
495 /* now handle the rest of them */
496 ath6kl_dbg(ATH6KL_DBG_IRQ,
497 "valid interrupt source(s) for other interrupts: 0x%x\n",
498 host_int_status);
500 if (MS(HOST_INT_STATUS_CPU, host_int_status)) {
501 /* CPU Interrupt */
502 status = ath6kl_hif_proc_cpu_intr(dev);
503 if (status)
504 goto out;
507 if (MS(HOST_INT_STATUS_ERROR, host_int_status)) {
508 /* Error Interrupt */
509 status = ath6kl_hif_proc_err_intr(dev);
510 if (status)
511 goto out;
514 if (MS(HOST_INT_STATUS_COUNTER, host_int_status))
515 /* Counter Interrupt */
516 status = ath6kl_hif_proc_counter_intr(dev);
518 out:
520 * An optimization to bypass reading the IRQ status registers
521 * unecessarily which can re-wake the target, if upper layers
522 * determine that we are in a low-throughput mode, we can rely on
523 * taking another interrupt rather than re-checking the status
524 * registers which can re-wake the target.
526 * NOTE : for host interfaces that makes use of detecting pending
527 * mbox messages at hif can not use this optimization due to
528 * possible side effects, SPI requires the host to drain all
529 * messages from the mailbox before exiting the ISR routine.
532 ath6kl_dbg(ATH6KL_DBG_IRQ,
533 "bypassing irq status re-check, forcing done\n");
535 if (!dev->htc_cnxt->chk_irq_status_cnt)
536 *done = true;
538 ath6kl_dbg(ATH6KL_DBG_IRQ,
539 "proc_pending_irqs: (done:%d, status=%d\n", *done, status);
541 return status;
544 /* interrupt handler, kicks off all interrupt processing */
545 int ath6kl_hif_intr_bh_handler(struct ath6kl *ar)
547 struct ath6kl_device *dev = ar->htc_target->dev;
548 unsigned long timeout;
549 int status = 0;
550 bool done = false;
553 * Reset counter used to flag a re-scan of IRQ status registers on
554 * the target.
556 dev->htc_cnxt->chk_irq_status_cnt = 0;
559 * IRQ processing is synchronous, interrupt status registers can be
560 * re-read.
562 timeout = jiffies + msecs_to_jiffies(ATH6KL_HIF_COMMUNICATION_TIMEOUT);
563 while (time_before(jiffies, timeout) && !done) {
564 status = proc_pending_irqs(dev, &done);
565 if (status)
566 break;
569 return status;
571 EXPORT_SYMBOL(ath6kl_hif_intr_bh_handler);
573 static int ath6kl_hif_enable_intrs(struct ath6kl_device *dev)
575 struct ath6kl_irq_enable_reg regs;
576 int status;
578 spin_lock_bh(&dev->lock);
580 /* Enable all but ATH6KL CPU interrupts */
581 dev->irq_en_reg.int_status_en =
582 SM(INT_STATUS_ENABLE_ERROR, 0x01) |
583 SM(INT_STATUS_ENABLE_CPU, 0x01) |
584 SM(INT_STATUS_ENABLE_COUNTER, 0x01);
587 * NOTE: There are some cases where HIF can do detection of
588 * pending mbox messages which is disabled now.
590 dev->irq_en_reg.int_status_en |= SM(INT_STATUS_ENABLE_MBOX_DATA, 0x01);
592 /* Set up the CPU Interrupt status Register */
593 dev->irq_en_reg.cpu_int_status_en = 0;
595 /* Set up the Error Interrupt status Register */
596 dev->irq_en_reg.err_int_status_en =
597 SM(ERROR_STATUS_ENABLE_RX_UNDERFLOW, 0x01) |
598 SM(ERROR_STATUS_ENABLE_TX_OVERFLOW, 0x1);
601 * Enable Counter interrupt status register to get fatal errors for
602 * debugging.
604 dev->irq_en_reg.cntr_int_status_en = SM(COUNTER_INT_STATUS_ENABLE_BIT,
605 ATH6KL_TARGET_DEBUG_INTR_MASK);
606 memcpy(&regs, &dev->irq_en_reg, sizeof(regs));
608 spin_unlock_bh(&dev->lock);
610 status = hif_read_write_sync(dev->ar, INT_STATUS_ENABLE_ADDRESS,
611 &regs.int_status_en, sizeof(regs),
612 HIF_WR_SYNC_BYTE_INC);
614 if (status)
615 ath6kl_err("failed to update interrupt ctl reg err: %d\n",
616 status);
618 return status;
621 int ath6kl_hif_disable_intrs(struct ath6kl_device *dev)
623 struct ath6kl_irq_enable_reg regs;
625 spin_lock_bh(&dev->lock);
626 /* Disable all interrupts */
627 dev->irq_en_reg.int_status_en = 0;
628 dev->irq_en_reg.cpu_int_status_en = 0;
629 dev->irq_en_reg.err_int_status_en = 0;
630 dev->irq_en_reg.cntr_int_status_en = 0;
631 memcpy(&regs, &dev->irq_en_reg, sizeof(regs));
632 spin_unlock_bh(&dev->lock);
634 return hif_read_write_sync(dev->ar, INT_STATUS_ENABLE_ADDRESS,
635 &regs.int_status_en, sizeof(regs),
636 HIF_WR_SYNC_BYTE_INC);
639 /* enable device interrupts */
640 int ath6kl_hif_unmask_intrs(struct ath6kl_device *dev)
642 int status = 0;
645 * Make sure interrupt are disabled before unmasking at the HIF
646 * layer. The rationale here is that between device insertion
647 * (where we clear the interrupts the first time) and when HTC
648 * is finally ready to handle interrupts, other software can perform
649 * target "soft" resets. The ATH6KL interrupt enables reset back to an
650 * "enabled" state when this happens.
652 ath6kl_hif_disable_intrs(dev);
654 /* unmask the host controller interrupts */
655 ath6kl_hif_irq_enable(dev->ar);
656 status = ath6kl_hif_enable_intrs(dev);
658 return status;
661 /* disable all device interrupts */
662 int ath6kl_hif_mask_intrs(struct ath6kl_device *dev)
665 * Mask the interrupt at the HIF layer to avoid any stray interrupt
666 * taken while we zero out our shadow registers in
667 * ath6kl_hif_disable_intrs().
669 ath6kl_hif_irq_disable(dev->ar);
671 return ath6kl_hif_disable_intrs(dev);
674 int ath6kl_hif_setup(struct ath6kl_device *dev)
676 int status = 0;
678 spin_lock_init(&dev->lock);
681 * NOTE: we actually get the block size of a mailbox other than 0,
682 * for SDIO the block size on mailbox 0 is artificially set to 1.
683 * So we use the block size that is set for the other 3 mailboxes.
685 dev->htc_cnxt->block_sz = dev->ar->mbox_info.block_size;
687 /* must be a power of 2 */
688 if ((dev->htc_cnxt->block_sz & (dev->htc_cnxt->block_sz - 1)) != 0) {
689 WARN_ON(1);
690 status = -EINVAL;
691 goto fail_setup;
694 /* assemble mask, used for padding to a block */
695 dev->htc_cnxt->block_mask = dev->htc_cnxt->block_sz - 1;
697 ath6kl_dbg(ATH6KL_DBG_HIF, "hif block size %d mbox addr 0x%x\n",
698 dev->htc_cnxt->block_sz, dev->ar->mbox_info.htc_addr);
700 status = ath6kl_hif_disable_intrs(dev);
702 fail_setup:
703 return status;