alistair23-linux/drivers/staging/wilc1000/wilc_log.h
Johnny Kim c5c77ba18e staging: wilc1000: Add SDIO/SPI 802.11 driver
This driver is for the wilc1000 which is a single chip IEEE 802.11
b/g/n device.
The driver works together with cfg80211, which is the kernel side of
configuration management for wireless devices because the wilc1000
chipset is fullmac where the MLME is managed in hardware.

The driver worked from kernel version 2.6.38 and being now ported
to several others since then.
A TODO file is included as well in this commit.

Signed-off-by: Johnny Kim <johnny.kim@atmel.com>
Signed-off-by: Rachel Kim <rachel.kim@atmel.com>
Signed-off-by: Dean Lee <dean.lee@atmel.com>
Signed-off-by: Chris Park <chris.park@atmel.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-24 13:36:53 -07:00

47 lines
1.3 KiB
C

#ifndef __WILC_LOG_H__
#define __WILC_LOG_H__
/* Errors will always get printed */
#define WILC_ERROR(...) do { WILC_PRINTF("(ERR)(%s:%d) ", __WILC_FUNCTION__, __WILC_LINE__); \
WILC_PRINTF(__VA_ARGS__); \
} while (0)
/* Wraning only printed if verbosity is 1 or more */
#if (WILC_LOG_VERBOSITY_LEVEL > 0)
#define WILC_WARN(...) do { WILC_PRINTF("(WRN)"); \
WILC_PRINTF(__VA_ARGS__); \
} while (0)
#else
#define WILC_WARN(...) (0)
#endif
/* Info only printed if verbosity is 2 or more */
#if (WILC_LOG_VERBOSITY_LEVEL > 1)
#define WILC_INFO(...) do { WILC_PRINTF("(INF)"); \
WILC_PRINTF(__VA_ARGS__); \
} while (0)
#else
#define WILC_INFO(...) (0)
#endif
/* Debug is only printed if verbosity is 3 or more */
#if (WILC_LOG_VERBOSITY_LEVEL > 2)
#define WILC_DBG(...) do { WILC_PRINTF("(DBG)(%s:%d) ", __WILC_FUNCTION__, __WILC_LINE__); \
WILC_PRINTF(__VA_ARGS__); \
} while (0)
#else
#define WILC_DBG(...) (0)
#endif
/* Function In/Out is only printed if verbosity is 4 or more */
#if (WILC_LOG_VERBOSITY_LEVEL > 3)
#define WILC_FN_IN do { WILC_PRINTF("(FIN) (%s:%d) \n", __WILC_FUNCTION__, __WILC_LINE__); } while (0)
#define WILC_FN_OUT(ret) do { WILC_PRINTF("(FOUT) (%s:%d) %d.\n", __WILC_FUNCTION__, __WILC_LINE__, (ret)); } while (0)
#else
#define WILC_FN_IN (0)
#define WILC_FN_OUT(ret) (0)
#endif
#endif