2 * Copyright (c) 2007-2008 Atheros Communications Inc.
4 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 /* Module Name : wrap_dbg.c */
19 /* This module contains wrapper functions for debug functions */
22 /* Platform dependent. */
24 /************************************************************************/
29 #include <linux/netlink.h>
30 #include <net/iw_handler.h>
32 void zfwDumpBuf(zdev_t
*dev
, zbuf_t
*buf
)
36 for (i
= 0; i
< buf
->len
; i
++) {
37 printk(KERN_DEBUG
"%02x ", *(((u8_t
*)buf
->data
)+i
));
39 printk(KERN_DEBUG
"\n");
41 printk(KERN_DEBUG
"\n");
45 void zfwDbgReadRegDone(zdev_t
*dev
, u32_t addr
, u32_t val
)
47 printk(KERN_DEBUG
"Read addr:%x = %x\n", addr
, val
);
50 void zfwDbgWriteRegDone(zdev_t
*dev
, u32_t addr
, u32_t val
)
52 printk(KERN_DEBUG
"Write addr:%x = %x\n", addr
, val
);
55 void zfwDbgReadTallyDone(zdev_t
*dev
)
57 /* printk(KERN_DEBUG "Read Tall Done\n"); */
60 void zfwDbgWriteEepromDone(zdev_t
*dev
, u32_t addr
, u32_t val
)
64 void zfwDbgQueryHwTxBusyDone(zdev_t
*dev
, u32_t val
)
69 void zfwDbgReadFlashDone(zdev_t
*dev
, u32_t addr
, u32_t
*rspdata
, u32_t datalen
)
71 printk(KERN_DEBUG
"Read Flash addr:%x length:%x\n", addr
, datalen
);
74 void zfwDbgProgrameFlashDone(zdev_t
*dev
)
76 printk(KERN_DEBUG
"Program Flash Done\n");
79 void zfwDbgProgrameFlashChkDone(zdev_t
*dev
)
81 printk(KERN_DEBUG
"Program Flash Done\n");
84 void zfwDbgGetFlashChkSumDone(zdev_t
*dev
, u32_t
*rspdata
)
86 printk(KERN_DEBUG
"Get Flash ChkSum Done\n");
89 void zfwDbgDownloadFwInitDone(zdev_t
*dev
)
91 printk(KERN_DEBUG
"Download FW Init Done\n");
95 /* Leave an empty line below to remove warning message on some compiler */