| /* |
| * Minimal debug/trace/assert driver definitions for |
| * Broadcom 802.11 Networking Adapter. |
| * |
| * Copyright 1999-2016, Broadcom Corporation |
| * All rights reserved, |
| * |
| * Redistribution and use in source and binary forms, with or without modification, |
| * are permitted provided that the following conditions are met: |
| * 1. Redistributions of source code must retain the above copyright notice, |
| * this list of conditions and the following disclaimer. |
| * 2. Redistributions in binary form must reproduce the above copyright notice, |
| * this list of conditions and the following disclaimer in the documentation |
| * and/or other materials provided with the distribution. |
| * |
| * This software is provided by the copyright holder "as is" and any express or |
| * implied warranties, including, but not limited to, the implied warranties of |
| * merchantability and fitness for a particular purpose are disclaimed. In no event |
| * shall copyright holder be liable for any direct, indirect, incidental, special, |
| * exemplary, or consequential damages (including, but not limited to, procurement |
| * of substitute goods or services; loss of use, data, or profits; or business |
| * interruption) however caused and on any theory of liability, whether in |
| * contract, strict liability, or tort (including negligence or otherwise) arising |
| * in any way out of the use of this software, even if advised of the possibility |
| * of such damage |
| * |
| * |
| * <<Broadcom-WL-IPTag/Open:>> |
| * |
| * $Id: wl_dbg.h 519338 2014-12-05 21:23:30Z $ |
| */ |
| |
| |
| #ifndef _wl_dbg_h_ |
| #define _wl_dbg_h_ |
| |
| /* wl_msg_level is a bit vector with defs in wlioctl.h */ |
| extern uint32 wl_msg_level; |
| extern uint32 wl_msg_level2; |
| |
| #define WL_TIMESTAMP() |
| |
| #define WL_PRINT(args) do { WL_TIMESTAMP(); printf args; } while (0) |
| |
| #if defined(EVENT_LOG_COMPILE) && defined(WLMSG_SRSCAN) |
| #define _WL_SRSCAN(fmt, ...) EVENT_LOG(EVENT_LOG_TAG_SRSCAN, fmt, ##__VA_ARGS__) |
| #define WL_SRSCAN(args) _WL_SRSCAN args |
| #else |
| #define WL_SRSCAN(args) |
| #endif |
| |
| #if defined(BCMCONDITIONAL_LOGGING) |
| |
| /* Ideally this should be some include file that vendors can include to conditionalize logging */ |
| |
| /* DBGONLY() macro to reduce ifdefs in code for statements that are only needed when |
| * BCMDBG is defined. |
| */ |
| #define DBGONLY(x) |
| |
| /* To disable a message completely ... until you need it again */ |
| #define WL_NONE(args) |
| #define WL_ERROR(args) do {if (wl_msg_level & WL_ERROR_VAL) WL_PRINT(args);} while (0) |
| #define WL_TRACE(args) |
| #define WL_PRHDRS_MSG(args) |
| #define WL_PRHDRS(i, p, f, t, r, l) |
| #define WL_PRPKT(m, b, n) |
| #define WL_INFORM(args) |
| #define WL_TMP(args) |
| #define WL_OID(args) |
| #define WL_RATE(args) do {if (wl_msg_level & WL_RATE_VAL) WL_PRINT(args);} while (0) |
| #define WL_ASSOC(args) do {if (wl_msg_level & WL_ASSOC_VAL) WL_PRINT(args);} while (0) |
| #define WL_PRUSR(m, b, n) |
| #define WL_PS(args) do {if (wl_msg_level & WL_PS_VAL) WL_PRINT(args);} while (0) |
| |
| #define WL_PORT(args) |
| #define WL_DUAL(args) |
| #define WL_REGULATORY(args) do {if (wl_msg_level & WL_REGULATORY_VAL) WL_PRINT(args);} while (0) |
| |
| #define WL_MPC(args) |
| #define WL_APSTA(args) |
| #define WL_APSTA_BCN(args) |
| #define WL_APSTA_TX(args) |
| #define WL_APSTA_TSF(args) |
| #define WL_APSTA_BSSID(args) |
| #define WL_BA(args) |
| #define WL_MBSS(args) |
| #define WL_PROTO(args) |
| |
| #define WL_CAC(args) do {if (wl_msg_level & WL_CAC_VAL) WL_PRINT(args);} while (0) |
| #define WL_AMSDU(args) |
| #define WL_AMPDU(args) |
| #define WL_FFPLD(args) |
| #define WL_MCHAN(args) |
| |
| #define WL_DFS(args) |
| #define WL_WOWL(args) |
| #define WL_DPT(args) |
| #define WL_ASSOC_OR_DPT(args) |
| #define WL_SCAN(args) do {if (wl_msg_level2 & WL_SCAN_VAL) WL_PRINT(args);} while (0) |
| #define WL_COEX(args) |
| #define WL_RTDC(w, s, i, j) |
| #define WL_RTDC2(w, s, i, j) |
| #define WL_CHANINT(args) |
| #define WL_BTA(args) |
| #define WL_P2P(args) |
| #define WL_ITFR(args) |
| #define WL_TDLS(args) |
| #define WL_MCNX(args) |
| #define WL_PROT(args) |
| #define WL_PSTA(args) |
| #define WL_WFDS(m, b, n) |
| #define WL_TRF_MGMT(args) |
| #define WL_L2FILTER(args) |
| #define WL_MQ(args) |
| #define WL_TXBF(args) |
| #define WL_P2PO(args) |
| #define WL_ROAM(args) |
| #define WL_WNM(args) |
| |
| |
| #define WL_AMPDU_UPDN(args) |
| #define WL_AMPDU_RX(args) |
| #define WL_AMPDU_ERR(args) |
| #define WL_AMPDU_TX(args) |
| #define WL_AMPDU_CTL(args) |
| #define WL_AMPDU_HW(args) |
| #define WL_AMPDU_HWTXS(args) |
| #define WL_AMPDU_HWDBG(args) |
| #define WL_AMPDU_STAT(args) |
| #define WL_AMPDU_ERR_ON() 0 |
| #define WL_AMPDU_HW_ON() 0 |
| #define WL_AMPDU_HWTXS_ON() 0 |
| |
| #define WL_APSTA_UPDN(args) |
| #define WL_APSTA_RX(args) |
| #define WL_WSEC(args) |
| #define WL_WSEC_DUMP(args) |
| #define WL_PCIE(args) |
| #define WL_TSLOG(w, s, i, j) |
| #define WL_FBT(args) |
| |
| #define WL_ERROR_ON() (wl_msg_level & WL_ERROR_VAL) |
| #define WL_TRACE_ON() 0 |
| #define WL_PRHDRS_ON() 0 |
| #define WL_PRPKT_ON() 0 |
| #define WL_INFORM_ON() 0 |
| #define WL_TMP_ON() 0 |
| #define WL_OID_ON() 0 |
| #define WL_RATE_ON() (wl_msg_level & WL_RATE_VAL) |
| #define WL_ASSOC_ON() (wl_msg_level & WL_ASSOC_VAL) |
| #define WL_PRUSR_ON() 0 |
| #define WL_PS_ON() (wl_msg_level & WL_PS_VAL) |
| #define WL_PORT_ON() 0 |
| #define WL_WSEC_ON() 0 |
| #define WL_WSEC_DUMP_ON() 0 |
| #define WL_MPC_ON() 0 |
| #define WL_REGULATORY_ON() (wl_msg_level & WL_REGULATORY_VAL) |
| #define WL_APSTA_ON() 0 |
| #define WL_DFS_ON() 0 |
| #define WL_MBSS_ON() 0 |
| #define WL_CAC_ON() (wl_msg_level & WL_CAC_VAL) |
| #define WL_AMPDU_ON() 0 |
| #define WL_DPT_ON() 0 |
| #define WL_WOWL_ON() 0 |
| #define WL_SCAN_ON() (wl_msg_level2 & WL_SCAN_VAL) |
| #define WL_BTA_ON() 0 |
| #define WL_P2P_ON() 0 |
| #define WL_ITFR_ON() 0 |
| #define WL_MCHAN_ON() 0 |
| #define WL_TDLS_ON() 0 |
| #define WL_MCNX_ON() 0 |
| #define WL_PROT_ON() 0 |
| #define WL_PSTA_ON() 0 |
| #define WL_TRF_MGMT_ON() 0 |
| #define WL_LPC_ON() 0 |
| #define WL_L2FILTER_ON() 0 |
| #define WL_TXBF_ON() 0 |
| #define WL_P2PO_ON() 0 |
| #define WL_TSLOG_ON() 0 |
| #define WL_WNM_ON() 0 |
| #define WL_PCIE_ON() 0 |
| |
| #else /* !BCMDBG */ |
| |
| /* DBGONLY() macro to reduce ifdefs in code for statements that are only needed when |
| * BCMDBG is defined. |
| */ |
| #define DBGONLY(x) |
| |
| /* To disable a message completely ... until you need it again */ |
| #define WL_NONE(args) |
| |
| #define WL_ERROR(args) |
| #define WL_TRACE(args) |
| #define WL_APSTA_UPDN(args) |
| #define WL_APSTA_RX(args) |
| #ifdef WLMSG_WSEC |
| #define WL_WSEC(args) WL_PRINT(args) |
| #define WL_WSEC_DUMP(args) WL_PRINT(args) |
| #else |
| #define WL_WSEC(args) |
| #define WL_WSEC_DUMP(args) |
| #endif |
| #define WL_PCIE(args) do {if (wl_msg_level2 & WL_PCIE_VAL) WL_PRINT(args);} while (0) |
| #define WL_PCIE_ON() (wl_msg_level2 & WL_PCIE_VAL) |
| #define WL_PFN(args) do {if (wl_msg_level & WL_PFN_VAL) WL_PRINT(args);} while (0) |
| #define WL_PFN_ON() (wl_msg_level & WL_PFN_VAL) |
| #endif |
| |
| extern uint32 wl_msg_level; |
| extern uint32 wl_msg_level2; |
| #endif /* _wl_dbg_h_ */ |