linux/drivers/net/wireless/marvell/libertas_tf/deb_defs.h

/* SPDX-License-Identifier: GPL-2.0 */
/**
  * This header file contains global constant/enum definitions,
  * global variable declaration.
  */
#ifndef _LBS_DEB_DEFS_H_
#define _LBS_DEB_DEFS_H_

#ifndef DRV_NAME
#define DRV_NAME
#endif

#include <linux/spinlock.h>

#ifdef CONFIG_LIBERTAS_THINFIRM_DEBUG
#define DEBUG
#define PROC_DEBUG
#endif

#define LBTF_DEB_ENTER
#define LBTF_DEB_LEAVE
#define LBTF_DEB_MAIN
#define LBTF_DEB_NET
#define LBTF_DEB_MESH
#define LBTF_DEB_WEXT
#define LBTF_DEB_IOCTL
#define LBTF_DEB_SCAN
#define LBTF_DEB_ASSOC
#define LBTF_DEB_JOIN
#define LBTF_DEB_11D
#define LBTF_DEB_DEBUGFS
#define LBTF_DEB_ETHTOOL
#define LBTF_DEB_HOST
#define LBTF_DEB_CMD
#define LBTF_DEB_RX
#define LBTF_DEB_TX
#define LBTF_DEB_USB
#define LBTF_DEB_CS
#define LBTF_DEB_FW
#define LBTF_DEB_THREAD
#define LBTF_DEB_HEX
#define LBTF_DEB_SDIO
#define LBTF_DEB_MACOPS

extern unsigned int lbtf_debug;


#ifdef DEBUG
#define LBTF_DEB_LL(grp, grpnam, fmt, args...)
#else
#define LBTF_DEB_LL
#endif

#define lbtf_deb_enter(grp)
#define lbtf_deb_enter_args(grp, fmt, args...)
#define lbtf_deb_leave(grp)
#define lbtf_deb_leave_args(grp, fmt, args...)
#define lbtf_deb_main(fmt, args...)
#define lbtf_deb_net(fmt, args...)
#define lbtf_deb_mesh(fmt, args...)
#define lbtf_deb_wext(fmt, args...)
#define lbtf_deb_ioctl(fmt, args...)
#define lbtf_deb_scan(fmt, args...)
#define lbtf_deb_assoc(fmt, args...)
#define lbtf_deb_join(fmt, args...)
#define lbtf_deb_11d(fmt, args...)
#define lbtf_deb_debugfs(fmt, args...)
#define lbtf_deb_ethtool(fmt, args...)
#define lbtf_deb_host(fmt, args...)
#define lbtf_deb_cmd(fmt, args...)
#define lbtf_deb_rx(fmt, args...)
#define lbtf_deb_tx(fmt, args...)
#define lbtf_deb_fw(fmt, args...)
#define lbtf_deb_usb(fmt, args...)
#define lbtf_deb_usbd(dev, fmt, args...)
#define lbtf_deb_cs(fmt, args...)
#define lbtf_deb_thread(fmt, args...)
#define lbtf_deb_sdio(fmt, args...)
#define lbtf_deb_macops(fmt, args...)

#ifdef DEBUG
static inline void lbtf_deb_hex(unsigned int grp, const char *prompt, u8 *buf, int len)
{}
#else
#define lbtf_deb_hex
#endif

#endif