1 /* 2 * Minimal debug/trace/assert driver definitions for 3 * Broadcom 802.11 Networking Adapter. 4 * 5 * Copyright (C) 2020, Broadcom. 6 * 7 * Unless you and Broadcom execute a separate written software license 8 * agreement governing use of this software, this software is licensed to you 9 * under the terms of the GNU General Public License version 2 (the "GPL"), 10 * available at http://www.broadcom.com/licenses/GPLv2.php, with the 11 * following added to such license: 12 * 13 * As a special exception, the copyright holders of this software give you 14 * permission to link this software with independent modules, and to copy and 15 * distribute the resulting executable under terms of your choice, provided that 16 * you also meet, for each linked independent module, the terms and conditions of 17 * the license of that module. An independent module is a module which is not 18 * derived from this software. The special exception does not apply to any 19 * modifications of the software. 20 * 21 * 22 * <<Broadcom-WL-IPTag/Open:>> 23 * 24 * $Id$ 25 */ 26 27 /* XXX, some old "wl msglevel" for PHY module has been moved to phy on 6/10/2009 "wl phymsglevel" 28 * They are spare in TOT and can be reused if needed. see src/wl/phy/wlc_phy_int.h 29 */ 30 31 #ifndef _wl_dbg_h_ 32 #define _wl_dbg_h_ 33 34 #include <event_log.h> 35 36 /* wl_msg_level is a bit vector with defs in wlioctl.h */ 37 extern uint32 wl_msg_level; 38 extern uint32 wl_msg_level2; 39 extern uint32 wl_msg_level3; 40 41 #if defined (BCMDBG) && \ 42 !defined(BCMDONGLEHOST) && !defined(BCMDBG_EXCLUDE_HW_TIMESTAMP) 43 extern char* wlc_dbg_get_hw_timestamp(void); 44 45 #define WL_TIMESTAMP() do { if (wl_msg_level2 & WL_TIMESTAMP_VAL) {\ 46 printf(wlc_dbg_get_hw_timestamp()); }\ 47 } while (0) 48 #else 49 #define WL_TIMESTAMP() 50 #endif /* BCMDBG && !BCMDONGLEHOST && !BCMDBG_EXCLUDE_HW_TIMESTAMP */ 51 52 #ifdef ENABLE_CORECAPTURE 53 #define MAX_BACKTRACE_DEPTH 32 54 extern int wl_print_backtrace(const char * prefix, void * i_backtrace, int i_backtrace_depth); 55 #else 56 #define wl_print_backtrace(a, b, c) 57 #endif /* ENABLE_CORECAPTURE */ 58 59 #define WIFICC_CAPTURE(_reason) 60 #define WIFICC_LOGDEBUGIF(_flags, _args) 61 #define WIFICC_LOGDEBUG(_args) 62 63 #define WL_PRINT(args) do { WL_TIMESTAMP(); printf args; } while (0) 64 65 #ifdef BCM_UPTIME_PROFILE 66 #define WL_PROF(args) WL_PRINT(args) 67 #else 68 #define WL_PROF(args) 69 #endif /* BCM_UPTIME_PROFILE */ 70 71 #if defined(ERR_USE_EVENT_LOG) && defined(EVENT_LOG_COMPILE) 72 #define EVENT_LOG_PRSRV_DUMP() EVENT_LOG_PRSRV_FLUSH() 73 #else 74 #define EVENT_LOG_PRSRV_DUMP() 75 #endif /* ERR_USE_EVENT_LOG && EVENT_LOG_COMPILE */ 76 77 #if defined(BCMDBG) 78 79 /* DBGONLY() macro to reduce ifdefs in code for statements that are only needed when 80 * BCMDBG is defined. 81 * Ex. 82 * myfn() { 83 * int i; 84 * DBGONLY(int dbg; ) 85 */ 86 #define DBGONLY(x) x 87 88 #define WL_WARN(x) WL_ERROR(x) 89 90 /* To disable a message completely ... until you need it again */ 91 #define WL_NONE(args) do {if (wl_msg_level & 0) WL_PRINT(args);} while (0) 92 93 #define WL_ERROR(args) do {if (wl_msg_level & WL_ERROR_VAL) WL_PRINT(args); \ 94 else WIFICC_LOGDEBUG(args);} while (0) 95 96 #define WL_IE_ERROR(args) do {if (wl_msg_level & WL_ERROR_VAL) WL_PRINT(args); \ 97 else WIFICC_LOGDEBUG(args); } while (0) 98 99 #define WL_AMSDU_ERROR(args) do {if (wl_msg_level & WL_ERROR_VAL) WL_PRINT(args); \ 100 else WIFICC_LOGDEBUG(args); } while (0) 101 102 #define WL_ASSOC_ERROR(args) do {if (wl_msg_level & WL_ERROR_VAL) WL_PRINT(args); \ 103 else WIFICC_LOGDEBUG(args); } while (0) 104 105 #define WL_SCAN_ERROR(args) do {if (wl_msg_level & WL_ERROR_VAL) WL_PRINT(args); \ 106 else WIFICC_LOGDEBUG(args); } while (0) 107 #define KM_ERR(args) do {if (wl_msg_level & WL_ERROR_VAL) WL_PRINT(args); \ 108 else WIFICC_LOGDEBUG(args); } while (0) 109 110 #define WL_WBTEXT_ERROR(args) do {if (wl_msg_level & WL_ERROR_VAL) WL_PRINT(args); \ 111 else WIFICC_LOGDEBUG(args); } while (0) 112 113 #define WL_MBO_ERR(args) do {if (wl_msg_level & WL_ERROR_VAL) WL_PRINT(args); \ 114 else WIFICC_LOGDEBUG(args); } while (0) 115 116 #define WL_RANDMAC_ERR(args) do {if (wl_msg_level & WL_ERROR_VAL) WL_PRINT(args); \ 117 else WIFICC_LOGDEBUG(args); } while (0) 118 119 #define WL_TRACE(args) do {if (wl_msg_level & WL_TRACE_VAL) WL_PRINT(args);} while (0) 120 121 #define WL_PFN_ERROR(args) do {if (wl_msg_level & WL_ERROR_VAL) WL_PRINT(args); \ 122 else WIFICC_LOGDEBUG(args); } while (0) 123 124 #define WL_PRHDRS_MSG(args) do {if (wl_msg_level & WL_PRHDRS_VAL) WL_PRINT(args);} while (0) 125 #define WL_PRHDRS(i, p, f, t, r, l) do { \ 126 if (wl_msg_level & WL_PRHDRS_VAL) \ 127 wlc_print_hdrs(i, p, f, t, r, l); \ 128 } while (0) 129 #define WL_PRPKT(m, b, n) do {if (wl_msg_level & WL_PRPKT_VAL) prhex(m, b, n);} while (0) 130 #define WL_INFORM(args) do {if (wl_msg_level & WL_INFORM_VAL) WL_PRINT(args);} while (0) 131 #define WL_TMP(args) do {if (wl_msg_level & WL_TMP_VAL) WL_PRINT(args);} while (0) 132 #define WL_OID(args) do {if (wl_msg_level & WL_OID_VAL) WL_PRINT(args);} while (0) 133 #define WL_RATE(args) do {if (wl_msg_level & WL_RATE_VAL) WL_PRINT(args);} while (0) 134 #define WL_ASSOC(args) do {if (wl_msg_level & WL_ASSOC_VAL) WL_PRINT(args); \ 135 else WIFICC_LOGDEBUG(args);} while (0) 136 #define WL_PRUSR(m, b, n) do {if (wl_msg_level & WL_PRUSR_VAL) prhex(m, b, n);} while (0) 137 #define WL_PS(args) do {if (wl_msg_level & WL_PS_VAL) WL_PRINT(args);} while (0) 138 #define WL_SPARE1(args) do {if (wl_msg_level & WL_TXPWR_VAL) WL_PRINT(args);} while (0) 139 #define WL_PORT(args) do {if (wl_msg_level & WL_PORT_VAL) WL_PRINT(args);} while (0) 140 #define WL_DUAL(args) do {if (wl_msg_level & WL_DUAL_VAL) WL_PRINT(args);} while (0) 141 #define WL_WSEC(args) do {if (wl_msg_level & WL_WSEC_VAL) WL_PRINT(args);} while (0) 142 #define WL_WSEC_DUMP(args) do {if (wl_msg_level & WL_WSEC_DUMP_VAL) WL_PRINT(args);} while (0) 143 #define WL_SPARE2(args) do {if (wl_msg_level & WL_NRSSI_VAL) WL_PRINT(args);} while (0) 144 #define WL_SPARE3(args) do {if (wl_msg_level & WL_LOFT_VAL) WL_PRINT(args);} while (0) 145 #define WL_REGULATORY(args) do {if (wl_msg_level & WL_REGULATORY_VAL) WL_PRINT(args);} while (0) 146 #define WL_SPARE4(args) do {if (wl_msg_level & WL_PHYCAL_VAL) WL_PRINT(args);} while (0) 147 #define WL_WDI(args) do {if (wl_msg_level & WL_WDI_VAL) WL_PRINT(args);} while (0) 148 #define WL_MPC(args) do {if (wl_msg_level & WL_MPC_VAL) WL_PRINT(args);} while (0) 149 #define WL_APSTA(args) do {if (wl_msg_level & WL_APSTA_VAL) WL_PRINT(args);} while (0) 150 #define WL_DFS(args) do {if (wl_msg_level & WL_DFS_VAL) WL_PRINT(args);} while (0) 151 #define WL_MUMIMO(args) do {if (wl_msg_level & WL_MUMIMO_VAL) WL_PRINT(args);} while (0) 152 #define WL_MODE_SWITCH(args) do {if (wl_msg_level & WL_MODE_SWITCH_VAL) WL_PRINT(args);} while (0) 153 #define WL_BCNTRIM_DBG(args) do {if (wl_msg_level & WL_BCNTRIM_VAL) WL_PRINT(args);} while (0) 154 #define WL_MBSS(args) do {if (wl_msg_level & WL_MBSS_VAL) WL_PRINT(args);} while (0) 155 #define WL_CAC(args) do {if (wl_msg_level & WL_CAC_VAL) WL_PRINT(args);} while (0) 156 #define WL_AMSDU(args) do {if (wl_msg_level & WL_AMSDU_VAL) WL_PRINT(args);} while (0) 157 #define WL_AMPDU(args) do {if (wl_msg_level & WL_AMPDU_VAL) WL_PRINT(args);} while (0) 158 #define WL_FFPLD(args) do {if (wl_msg_level & WL_FFPLD_VAL) WL_PRINT(args);} while (0) 159 #define WL_PFN(args) do {if (wl_msg_level & WL_PFN_VAL) WL_PRINT(args);} while (0) 160 /* wl_msg_level is full. Use wl_msg_level_2 now */ 161 #define WL_WOWL(args) do {if (wl_msg_level2 & WL_WOWL_VAL) WL_PRINT(args);} while (0) 162 #define WL_SCAN(args) do {if (wl_msg_level2 & WL_SCAN_VAL) WL_PRINT(args);} while (0) 163 #define WL_SCAN_WARN(args) do {if (wl_msg_level2 & WL_SCAN_VAL) WL_PRINT(args);} while (0) 164 #define WL_COEX(args) do {if (wl_msg_level2 & WL_COEX_VAL) WL_PRINT(args);} while (0) 165 #define WL_RTDC(w,s,i,j) do {if (wl_msg_level2 & WL_RTDC_VAL) wlc_log(w,s,i,j);} while (0) 166 #define WL_PROTO(args) do {if (wl_msg_level2 & WL_PROTO_VAL) WL_PRINT(args);} while (0) 167 #define WL_RTDC2(w,s,i,j) do {if (wl_msg_level2 & 0) wlc_log(w,s,i,j);} while (0) 168 #define WL_CHANINT(args) do {if (wl_msg_level2 & WL_CHANINT_VAL) WL_PRINT(args);} while (0) 169 #define WL_WMF(args) do {if (wl_msg_level2 & WL_WMF_VAL) WL_PRINT(args);} while (0) 170 #define WL_P2P(args) do {if (wl_msg_level2 & WL_P2P_VAL) WL_PRINT(args);} while (0) 171 #define WL_ITFR(args) do {if (wl_msg_level2 & WL_ITFR_VAL) WL_PRINT(args);} while (0) 172 #define WL_MCHAN(args) do {if (wl_msg_level2 & WL_MCHAN_VAL) WL_PRINT(args);} while (0) 173 #define WL_TDLS(args) do {if (wl_msg_level2 & WL_TDLS_VAL) WL_PRINT(args);} while (0) 174 #define WL_MCNX(args) do {if (wl_msg_level2 & WL_MCNX_VAL) WL_PRINT(args);} while (0) 175 #define WL_PROT(args) do {if (wl_msg_level2 & WL_PROT_VAL) WL_PRINT(args);} while (0) 176 #define WL_PSTA(args) do {if (wl_msg_level2 & WL_PSTA_VAL) WL_PRINT(args);} while (0) 177 #define WL_TBTT(args) do {if (wl_msg_level2 & WL_TBTT_VAL) WL_PRINT(args);} while (0) 178 #define WL_TRF_MGMT(args) do {if (wl_msg_level2 & WL_TRF_MGMT_VAL) WL_PRINT(args);} while (0) 179 #define WL_L2FILTER(args) do {if (wl_msg_level2 & WL_L2FILTER_VAL) WL_PRINT(args);} while (0) 180 #define WL_TSO(args) do {if (wl_msg_level2 & WL_TSO_VAL) WL_PRINT(args);} while (0) 181 #define WL_MQ(args) do {if (wl_msg_level2 & WL_MQ_VAL) WL_PRINT(args);} while (0) 182 #define WL_P2PO(args) do {if (wl_msg_level2 & WL_P2PO_VAL) WL_PRINT(args);} while (0) 183 #ifdef WLAWDL 184 #define WL_AWDL(args) do {if (wl_msg_level2 & WL_AWDL_VAL) WL_PRINT(args);} while (0) 185 #endif /* WLAWDL */ 186 #define WL_WNM(args) do {if (wl_msg_level2 & WL_WNM_VAL) WL_PRINT(args);} while (0) 187 #define WL_TXBF(args) do {if (wl_msg_level2 & WL_TXBF_VAL) WL_PRINT(args);} while (0) 188 #define WL_PCIE(args) do {if (wl_msg_level2 & WL_PCIE_VAL) WL_PRINT(args);} while (0) 189 #define WL_PMDUR(args) do {if (wl_msg_level2 & WL_PMDUR_VAL) WL_PRINT(args);} while (0) 190 #ifdef BCMTSTAMPEDLOGS 191 void wlc_bmac_tslog(struct wlc_hw_info *hw, const char *str, uint32 p1, uint32 p2); 192 #else 193 #define wlc_bmac_tslog(hw, str, p1, p2) do {} while (0) 194 #endif 195 #define WL_TSLOG(w, s, i, j) \ 196 do { \ 197 if (wl_msg_level2 & WL_TIMESTAMP_VAL) { \ 198 wlc_bmac_tslog(w, s, i, j); \ 199 } \ 200 } while (0) 201 /* not using WL_ROAM for BCMDBG at the moment */ 202 #define WL_ROAM(args) 203 #define WL_PRMAC(args) do {if (wl_msg_level & WL_PRMAC_VAL) WL_PRINT(args);} while (0) 204 #define WL_FBT(args) do {if (wl_msg_level2 & WL_FBT_VAL) WL_PRINT(args);} while (0) 205 #define WL_MESH(args) do {if (wl_msg_level2 & WL_MESH_VAL) WL_PRINT(args);} while (0) 206 #define WL_SWDIV(args) do {if (wl_msg_level2 & WL_SWDIV_VAL) WL_PRINT(args);} while (0) 207 #define WL_MBO_DBG(args) do {if (wl_msg_level2 & WL_MBO_VAL) WL_PRINT(args);} while (0) 208 #define WL_RANDMAC_INFO(args) do {if (wl_msg_level2 & WL_RANDMAC_VAL) WL_PRINT(args);} while (0) 209 #define WL_BAM_ERR(args) do {if (wl_msg_level2 & WL_ERROR_VAL) WL_PRINT(args);} while (0) 210 #define WL_ADPS(args) do {if (wl_msg_level2 & WL_ADPS_VAL) WL_PRINT(args);} while (0) 211 #define WL_OCE_DBG(args) do {if (wl_msg_level2 & WL_OCE_VAL) WL_PRINT(args);} while (0) 212 #define WL_WBTEXT_INFO(args) do {if (wl_msg_level2 & WL_WNM_VAL) WL_PRINT(args);} while (0) 213 #define WL_ASSOC_AP(args) \ 214 do { \ 215 if (wl_msg_level3 & WL_ASSOC_AP_VAL) { \ 216 WL_PRINT(args); \ 217 } else { \ 218 WIFICC_LOGDEBUG(args); \ 219 } \ 220 } while (0) 221 #define WL_TPA_ERR(args) do {if (wl_msg_level2 & WL_ERROR_VAL) WL_PRINT(args);} while (0) 222 #define WL_TPA_INFO(args) do {if (wl_msg_level2 & WL_INFORM_VAL) WL_PRINT(args);} while (0) 223 #define WL_LATENCY_INFO(args) do {if (wl_msg_level3 & WL_LATENCY_VAL) WL_PRINT(args);} while (0) 224 225 #define WL_ERROR_ON() (wl_msg_level & WL_ERROR_VAL) 226 #define WL_TRACE_ON() (wl_msg_level & WL_TRACE_VAL) 227 #define WL_PRHDRS_ON() (wl_msg_level & WL_PRHDRS_VAL) 228 #define WL_PRPKT_ON() (wl_msg_level & WL_PRPKT_VAL) 229 #define WL_INFORM_ON() (wl_msg_level & WL_INFORM_VAL) 230 #define WL_TMP_ON() (wl_msg_level & WL_TMP_VAL) 231 #define WL_OID_ON() (wl_msg_level & WL_OID_VAL) 232 #define WL_RATE_ON() (wl_msg_level & WL_RATE_VAL) 233 #define WL_ASSOC_ON() (wl_msg_level & WL_ASSOC_VAL) 234 #define WL_PORT_ON() (wl_msg_level & WL_PORT_VAL) 235 #define WL_WSEC_ON() (wl_msg_level & WL_WSEC_VAL) 236 #define WL_WSEC_DUMP_ON() (wl_msg_level & WL_WSEC_DUMP_VAL) 237 #define WL_MPC_ON() (wl_msg_level & WL_MPC_VAL) 238 #define WL_REGULATORY_ON() (wl_msg_level & WL_REGULATORY_VAL) 239 #define WL_APSTA_ON() (wl_msg_level & WL_APSTA_VAL) 240 #define WL_DFS_ON() (wl_msg_level & WL_DFS_VAL) 241 #define WL_MUMIMO_ON() (wl_msg_level & WL_MUMIMO_VAL) 242 #define WL_MODE_SWITCH_ON() (wl_msg_level & WL_MODE_SWITCH_VAL) 243 #define WL_MBSS_ON() (wl_msg_level & WL_MBSS_VAL) 244 #define WL_AMPDU_ON() (wl_msg_level & WL_AMPDU_VAL) 245 #define WL_PFN_ON() (wl_msg_level & WL_PFN_VAL) 246 #define WL_WOWL_ON() (wl_msg_level2 & WL_WOWL_VAL) 247 #define WL_SCAN_ON() (wl_msg_level2 & WL_SCAN_VAL) 248 #define WL_WMF_ON() (wl_msg_level2 & WL_WMF_VAL) 249 #define WL_P2P_ON() (wl_msg_level2 & WL_P2P_VAL) 250 #define WL_ITFR_ON() (wl_msg_level2 & WL_ITFR_VAL) 251 #define WL_MCHAN_ON() (wl_msg_level2 & WL_MCHAN_VAL) 252 #define WL_TDLS_ON() (wl_msg_level2 & WL_TDLS_VAL) 253 #define WL_MCNX_ON() (wl_msg_level2 & WL_MCNX_VAL) 254 #define WL_PROT_ON() (wl_msg_level2 & WL_PROT_VAL) 255 #define WL_PSTA_ON() (wl_msg_level2 & WL_PSTA_VAL) 256 #define WL_TBTT_ON() (wl_msg_level2 & WL_TBTT_VAL) 257 #define WL_TRF_MGMT_ON() (wl_msg_level2 & WL_TRF_MGMT) 258 #define WL_LPC_ON() (wl_msg_level2 & WL_LPC_VAL) 259 #define WL_L2FILTER_ON() (wl_msg_level2 & WL_L2FILTER_VAL) 260 #define WL_MQ_ON() (wl_msg_level2 & WL_MQ_VAL) 261 #define WL_P2PO_ON() (wl_msg_level2 & WL_P2PO_VAL) 262 #ifdef WLAWDL 263 #define WL_AWDL_ON() (wl_msg_level2 & WL_AWDL_VAL) 264 #endif /* WLAWDL */ 265 #define WL_WNM_ON() (wl_msg_level2 & WL_WNM_VAL) 266 #define WL_TXBF_ON() (wl_msg_level2 & WL_TXBF_VAL) 267 #define WL_PCIE_ON() (wl_msg_level2 & WL_PCIE_VAL) 268 #define WL_TSLOG_ON() (wl_msg_level2 & WL_TIMESTAMP_VAL) 269 #define WL_MESH_ON() (wl_msg_level2 & WL_MESH_VAL) 270 #define WL_SWDIV_ON() (wl_msg_level2 & WL_SWDIV_VAL) 271 #define WL_MBO_DBG_ON() (wl_msg_level2 & WL_MBO_VAL) 272 #define WL_RANDMAC_DBG_ON() (wl_msg_level2 & WL_RANDMAC_VAL) 273 #define WL_ADPS_ON() (wl_msg_level2 & WL_ADPS_VAL) 274 #define WL_OCE_DBG_ON() (wl_msg_level2 & WL_OCE_VAL) 275 #define WL_ASSOC_AP_ON() (wl_msg_level3 & WL_ASSOC_AP_VAL) 276 #define WL_FILS_DBG_ON() (wl_msg_level3 & WL_FILS_DBG_VAL) 277 278 /* Extra message control for APSTA debugging */ 279 #define WL_APSTA_UPDN_VAL 0x00000001 /* Config up/down related */ 280 #define WL_APSTA_BCN_VAL 0x00000002 /* Calls to beacon update */ 281 #define WL_APSTA_TX_VAL 0x00000004 /* Transmit data path */ 282 #define WL_APSTA_RX_VAL 0x00000008 /* Receive data path */ 283 #define WL_APSTA_TSF_VAL 0x00000010 /* TSF-related items */ 284 #define WL_APSTA_BSSID_VAL 0x00000020 /* Calls to set bssid */ 285 286 extern uint32 wl_apsta_dbg; 287 288 #define WL_APSTA_UPDN(args) do {if (wl_apsta_dbg & WL_APSTA_UPDN_VAL) {WL_APSTA(args);}} while (0) 289 #define WL_APSTA_BCN(args) do {if (wl_apsta_dbg & WL_APSTA_BCN_VAL) {WL_APSTA(args);}} while (0) 290 #define WL_APSTA_TX(args) do {if (wl_apsta_dbg & WL_APSTA_TX_VAL) {WL_APSTA(args);}} while (0) 291 #define WL_APSTA_RX(args) do {if (wl_apsta_dbg & WL_APSTA_RX_VAL) {WL_APSTA(args);}} while (0) 292 #define WL_APSTA_TSF(args) do {if (wl_apsta_dbg & WL_APSTA_TSF_VAL) {WL_APSTA(args);}} while (0) 293 #define WL_APSTA_BSSID(args) do {if (wl_apsta_dbg & WL_APSTA_BSSID_VAL) {WL_APSTA(args);}} while (0) 294 295 /* Extra message control for AMPDU debugging */ 296 #define WL_AMPDU_UPDN_VAL 0x00000001 /* Config up/down related */ 297 #define WL_AMPDU_ERR_VAL 0x00000002 /* Calls to beaocn update */ 298 #define WL_AMPDU_TX_VAL 0x00000004 /* Transmit data path */ 299 #define WL_AMPDU_RX_VAL 0x00000008 /* Receive data path */ 300 #define WL_AMPDU_CTL_VAL 0x00000010 /* TSF-related items */ 301 #define WL_AMPDU_HW_VAL 0x00000020 /* AMPDU_HW */ 302 #define WL_AMPDU_HWTXS_VAL 0x00000040 /* AMPDU_HWTXS */ 303 #define WL_AMPDU_HWDBG_VAL 0x00000080 /* AMPDU_DBG */ 304 #define WL_AMPDU_STAT_VAL 0x00000100 /* statistics */ 305 306 extern uint32 wl_ampdu_dbg; 307 308 #define WL_AMPDU_UPDN(args) do {if (wl_ampdu_dbg & WL_AMPDU_UPDN_VAL) {WL_AMPDU(args);}} while (0) 309 #define WL_AMPDU_RX(args) do {if (wl_ampdu_dbg & WL_AMPDU_RX_VAL) {WL_AMPDU(args);}} while (0) 310 #define WL_AMPDU_ERR(args) do {if (wl_ampdu_dbg & WL_AMPDU_ERR_VAL) {WL_AMPDU(args);}} while (0) 311 #define WL_AMPDU_TX(args) do {if (wl_ampdu_dbg & WL_AMPDU_TX_VAL) {WL_AMPDU(args);}} while (0) 312 #define WL_AMPDU_CTL(args) do {if (wl_ampdu_dbg & WL_AMPDU_CTL_VAL) {WL_AMPDU(args);}} while (0) 313 #define WL_AMPDU_HW(args) do {if (wl_ampdu_dbg & WL_AMPDU_HW_VAL) {WL_AMPDU(args);}} while (0) 314 #define WL_AMPDU_HWTXS(args) do {if (wl_ampdu_dbg & WL_AMPDU_HWTXS_VAL) {WL_AMPDU(args);}} while (0) 315 #define WL_AMPDU_HWDBG(args) do {if (wl_ampdu_dbg & WL_AMPDU_HWDBG_VAL) {WL_AMPDU(args);}} while (0) 316 #define WL_AMPDU_STAT(args) do {if (wl_ampdu_dbg & WL_AMPDU_STAT_VAL) {WL_AMPDU(args);}} while (0) 317 #define WL_AMPDU_ERR_ON() (wl_ampdu_dbg & WL_AMPDU_ERR_VAL) 318 #define WL_AMPDU_HW_ON() (wl_ampdu_dbg & WL_AMPDU_HW_VAL) 319 #define WL_AMPDU_HWTXS_ON() (wl_ampdu_dbg & WL_AMPDU_HWTXS_VAL) 320 321 /* Extra Message control for Mesh debugging */ 322 extern uint32 wl_mesh_dbg; 323 #define WL_MESH_AMPE_VAL 0x00000001 324 #define WL_MESH_ROUTE_VAL 0x00000002 325 #define WL_MESH_BCN_VAL 0x00000004 326 327 #define WL_MESH_AMPE(args) do {if (wl_mesh_dbg & WL_MESH_AMPE_VAL) {WL_MESH(args);}} while (0) 328 #define WL_MESH_ROUTE(args) do {if (wl_mesh_dbg & WL_MESH_ROUTE_VAL) {WL_MESH(args);}} while (0) 329 #define WL_MESH_BCN(args) do {if (wl_mesh_dbg & WL_MESH_BCN_VAL) {WL_MESH(args);}} while (0) 330 331 /* BCMDBG */ 332 #elif defined(BCMCONDITIONAL_LOGGING) 333 334 /* Ideally this should be some include file that vendors can include to conditionalize logging */ 335 336 /* DBGONLY() macro to reduce ifdefs in code for statements that are only needed when 337 * BCMDBG is defined. 338 */ 339 #define DBGONLY(x) x 340 341 /* To disable a message completely ... until you need it again */ 342 #define WL_NONE(args) 343 #define WL_WARN(x) WL_ERROR(x) 344 #define WL_ERROR(args) do {if (wl_msg_level & WL_ERROR_VAL) WL_PRINT(args); \ 345 else WIFICC_LOGDEBUG(args); } while (0) 346 #define WL_SCAN_ERROR(args) 347 #define WL_IE_ERROR(args) 348 #define WL_AMSDU_ERROR(args) 349 #define WL_ASSOC_ERROR(args) 350 #define WL_WNM_PDT_ERROR(args) 351 #define KM_ERR(args) 352 #define WL_WBTEXT_ERROR(args) 353 #define WL_WBTEXT_INFO(args) 354 #define WL_LATENCY_INFO(args) 355 356 #define WL_TRACE(args) 357 #define WL_PRHDRS_MSG(args) 358 #define WL_PRHDRS(i, p, f, t, r, l) 359 #define WL_PRPKT(m, b, n) 360 #define WL_INFORM(args) 361 #define WL_TMP(args) 362 #define WL_OID(args) 363 #define WL_RATE(args) do {if (wl_msg_level & WL_RATE_VAL) WL_PRINT(args);} while (0) 364 #define WL_ASSOC(args) do {if (wl_msg_level & WL_ASSOC_VAL) WL_PRINT(args); \ 365 else WIFICC_LOGDEBUG(args);} while (0) 366 #define WL_PRUSR(m, b, n) 367 #define WL_PS(args) do {if (wl_msg_level & WL_PS_VAL) WL_PRINT(args);} while (0) 368 369 #define WL_PORT(args) 370 #define WL_DUAL(args) 371 #define WL_REGULATORY(args) do {if (wl_msg_level & WL_REGULATORY_VAL) WL_PRINT(args); \ 372 else WIFICC_LOGDEBUG(args);} while (0) 373 374 #define WL_MPC(args) 375 #define WL_APSTA(args) 376 #define WL_APSTA_BCN(args) 377 #define WL_APSTA_TX(args) 378 #define WL_APSTA_TSF(args) 379 #define WL_APSTA_BSSID(args) 380 #define WL_BA(args) 381 #define WL_MBSS(args) 382 #define WL_MODE_SWITCH(args) 383 #define WL_PROTO(args) 384 385 #define WL_CAC(args) do {if (wl_msg_level & WL_CAC_VAL) WL_PRINT(args);} while (0) 386 #define WL_AMSDU(args) 387 #define WL_AMPDU(args) 388 #define WL_FFPLD(args) 389 #define WL_MCHAN(args) 390 391 #define WL_DFS(args) 392 #define WL_WOWL(args) 393 #define WL_DPT(args) 394 #define WL_ASSOC_OR_DPT(args) 395 #define WL_SCAN(args) do {if (wl_msg_level2 & WL_SCAN_VAL) WL_PRINT(args);} while (0) 396 #define WL_SCAN_WARN(args) do {if (wl_msg_level2 & WL_SCAN_VAL) WL_PRINT(args);} while (0) 397 #define WL_COEX(args) 398 #define WL_RTDC(w, s, i, j) 399 #define WL_RTDC2(w, s, i, j) 400 #define WL_CHANINT(args) 401 #define WL_BTA(args) 402 #define WL_P2P(args) 403 #define WL_ITFR(args) 404 #define WL_TDLS(args) 405 #define WL_MCNX(args) 406 #define WL_PROT(args) 407 #define WL_PSTA(args) 408 #define WL_WFDS(m, b, n) 409 #define WL_TRF_MGMT(args) 410 #define WL_L2FILTER(args) 411 #define WL_MQ(args) 412 #define WL_TXBF(args) 413 #define WL_MUMIMO(args) 414 #define WL_P2PO(args) 415 #ifdef WLAWDL 416 #define WL_AWDL(args) 417 #endif /* WLAWDL */ 418 #define WL_ROAM(args) 419 #define WL_WNM(args) 420 421 #ifdef WLMSG_MESH 422 #define WL_MESH(args) WL_PRINT(args) 423 #define WL_MESH_AMPE(args) WL_PRINT(args) 424 #define WL_MESH_ROUTE(args) WL_PRINT(args) 425 #define WL_MESH_BCN(args) 426 #else 427 #define WL_MESH(args) 428 #define WL_MESH_AMPE(args) 429 #define WL_MESH_ROUTE(args) 430 #define WL_MESH_BCN(args) 431 #endif 432 #define WL_ASSOC_AP(args) \ 433 do { \ 434 if (wl_msg_level3 & WL_ASSOC_AP_VAL) { \ 435 WL_PRINT(args); \ 436 } else { \ 437 WIFICC_LOGDEBUG(args); \ 438 } \ 439 } while (0) 440 #ifdef BCMDBG_ERR 441 #if defined(EVENT_LOG_COMPILE) && defined(ERR_USE_EVENT_LOG) 442 #if defined(ERR_USE_EVENT_LOG_RA) 443 #define WL_PFN_ERROR(args) EVENT_LOG_RA(EVENT_LOG_TAG_SCAN_ERR, args) 444 #else 445 #define WL_PFN_ERROR(args) EVENT_LOG_COMPACT_CAST_PAREN_ARGS(EVENT_LOG_TAG_SCAN_ERR, args) 446 #endif /* ERR_USE_EVENT_LOG_RA */ 447 #else 448 #define WL_PFN_ERROR(args) WL_PRINT(args) 449 #endif /* ERR_USE_EVENT_LOG */ 450 #else 451 #define WL_PFN_ERROR(args) 452 #endif /* BCMDBG_ERR */ 453 454 #define WL_AMPDU_UPDN(args) 455 #define WL_AMPDU_RX(args) 456 #define WL_AMPDU_ERR(args) 457 #define WL_AMPDU_TX(args) 458 #define WL_AMPDU_CTL(args) 459 #define WL_AMPDU_HW(args) 460 #define WL_AMPDU_HWTXS(args) 461 #define WL_AMPDU_HWDBG(args) 462 #define WL_AMPDU_STAT(args) 463 #define WL_AMPDU_ERR_ON() 0 464 #define WL_AMPDU_HW_ON() 0 465 #define WL_AMPDU_HWTXS_ON() 0 466 467 #define WL_APSTA_UPDN(args) 468 #define WL_APSTA_RX(args) 469 #define WL_WSEC(args) 470 #define WL_WSEC_DUMP(args) 471 #define WL_PCIE(args) 472 #define WL_PMDUR(args) 473 #define WL_TSLOG(w, s, i, j) 474 #define WL_FBT(args) 475 #define WL_MBO_DBG(args) 476 #define WL_RANDMAC_DBG(args) 477 #define WL_BAM_ERR(args) 478 #define WL_ADPS(args) 479 #define WL_OCE_DBG(args) 480 #define WL_TPA_ERR(args) 481 #define WL_TPA_INFO(args) 482 483 #define WL_ERROR_ON() (wl_msg_level & WL_ERROR_VAL) 484 #define WL_TRACE_ON() 0 485 #define WL_PRHDRS_ON() 0 486 #define WL_PRPKT_ON() 0 487 #define WL_INFORM_ON() 0 488 #define WL_TMP_ON() 0 489 #define WL_OID_ON() 0 490 #define WL_RATE_ON() (wl_msg_level & WL_RATE_VAL) 491 #define WL_ASSOC_ON() (wl_msg_level & WL_ASSOC_VAL) 492 #define WL_PRUSR_ON() 0 493 #define WL_PS_ON() (wl_msg_level & WL_PS_VAL) 494 #define WL_PORT_ON() 0 495 #define WL_WSEC_ON() 0 496 #define WL_WSEC_DUMP_ON() 0 497 #define WL_MPC_ON() 0 498 #define WL_REGULATORY_ON() (wl_msg_level & WL_REGULATORY_VAL) 499 #define WL_APSTA_ON() 0 500 #define WL_DFS_ON() 0 501 #define WL_MBSS_ON() 0 502 #define WL_CAC_ON() (wl_msg_level & WL_CAC_VAL) 503 #define WL_AMPDU_ON() 0 504 #define WL_DPT_ON() 0 505 #define WL_WOWL_ON() 0 506 #define WL_SCAN_ON() (wl_msg_level2 & WL_SCAN_VAL) 507 #define WL_BTA_ON() 0 508 #define WL_P2P_ON() 0 509 #define WL_ITFR_ON() 0 510 #define WL_MCHAN_ON() 0 511 #define WL_TDLS_ON() 0 512 #define WL_MCNX_ON() 0 513 #define WL_PROT_ON() 0 514 #define WL_PSTA_ON() 0 515 #define WL_TRF_MGMT_ON() 0 516 #define WL_LPC_ON() 0 517 #define WL_L2FILTER_ON() 0 518 #define WL_TXBF_ON() 0 519 #define WL_P2PO_ON() 0 520 #ifdef WLAWDL 521 #define WL_AWDL_ON() 0 522 #endif /* WLAWDL */ 523 #define WL_TSLOG_ON() 0 524 #define WL_WNM_ON() 0 525 #define WL_PCIE_ON() 0 526 #define WL_MUMIMO_ON() 0 527 #define WL_MESH_ON() 0 528 #define WL_MBO_DBG_ON() 0 529 #define WL_RANDMAC_DBG_ON() 0 530 #define WL_ADPS_ON() 0 531 #define WL_OCE_DBG_ON() 0 532 #define WL_FILS_DBG_ON() 0 533 #define WL_ASSOC_AP_ON() (wl_msg_level3 & WL_ASSOC_AP_VAL) 534 535 #else /* !BCMDBG */ 536 537 /* DBGONLY() macro to reduce ifdefs in code for statements that are only needed when 538 * BCMDBG is defined. 539 */ 540 #define DBGONLY(x) 541 542 /* To disable a message completely ... until you need it again */ 543 #define WL_NONE(args) 544 545 #ifdef BCMDBG_ERR 546 /* ROM and ROML optimized builds */ 547 #if defined(EVENT_LOG_COMPILE) && defined(ERR_USE_EVENT_LOG) 548 #if defined(ERR_USE_EVENT_LOG_RA) 549 #define WL_ERROR(args) EVENT_LOG_RA(EVENT_LOG_TAG_WL_ERROR, args) 550 #define WL_WARN(args) EVENT_LOG_RA(EVENT_LOG_TAG_WL_WARN, args) 551 #else 552 #define WL_ERROR(args) EVENT_LOG_COMPACT_CAST_PAREN_ARGS(EVENT_LOG_TAG_WL_ERROR, args) 553 #define WL_WARN(args) EVENT_LOG_COMPACT_CAST_PAREN_ARGS(EVENT_LOG_TAG_WL_WARN, args) 554 #endif /* ERR_USE_EVENT_LOG_RA */ 555 556 #else 557 #define WL_ERROR(args) WL_PRINT(args) 558 #define WL_WARN(args) WL_PRINT(args) 559 #endif /* ERR_USE_EVENT_LOG */ 560 #else 561 #define WL_ERROR(args) 562 #define WL_WARN(args) 563 #endif /* BCMDBG_ERR */ 564 565 #ifdef TS_PLOT 566 #define TS_LOG_DBG(x) x 567 #define TS_LOG(args) EVENT_LOG_COMPACT_CAST_PAREN_ARGS(EVENT_LOG_TAG_TSLOG, args) 568 #else 569 #define TS_LOG_DBG(x) 570 #define TS_LOG(args) 571 #endif 572 573 #ifdef BCMDBG_ERR 574 /* ROM and ROML optimized builds */ 575 #if defined(EVENT_LOG_COMPILE)&& defined(ERR_USE_EVENT_LOG) 576 #if defined(ERR_USE_EVENT_LOG_RA) 577 #define KM_ERR(args) EVENT_LOG_RA(EVENT_LOG_TAG_KM_ERROR, args) 578 #else 579 #define KM_ERR(args) EVENT_LOG_COMPACT_CAST_PAREN_ARGS(EVENT_LOG_TAG_KM_ERROR, args) 580 #endif /* ERR_USE_EVENT_LOG_RA */ 581 #else 582 #define KM_ERR(args) WL_PRINT(args) 583 #endif /* ERR_USE_EVENT_LOG */ 584 #else 585 #define KM_ERR(args) 586 #endif /* BCMDBG_ERR */ 587 588 #ifdef BCMDBG_ERR 589 /* ROM and ROML optimized builds */ 590 #if defined(EVENT_LOG_COMPILE) && defined(ERR_USE_EVENT_LOG) 591 #if defined(ERR_USE_EVENT_LOG_RA) 592 #define WL_AMPDU_ERR(args) EVENT_LOG_RA(EVENT_LOG_TAG_AMPDU_ERROR, args) 593 #else 594 #define WL_AMPDU_ERR(args) EVENT_LOG_COMPACT_CAST_PAREN_ARGS(EVENT_LOG_TAG_AMPDU_ERROR, args) 595 #endif /* ERR_USE_EVENT_LOG_RA */ 596 #else 597 #define WL_AMPDU_ERR(args) WL_PRINT(args) 598 #endif /* ERR_USE_EVENT_LOG */ 599 #else 600 #define WL_AMPDU_ERR(args) 601 #endif /* BCMDBG_ERR */ 602 603 #define WL_TRACE(args) 604 #ifdef WLMSG_PRHDRS 605 #define WL_PRHDRS_MSG(args) WL_PRINT(args) 606 #define WL_PRHDRS(i, p, f, t, r, l) wlc_print_hdrs(i, p, f, t, r, l) 607 #else 608 #define WL_PRHDRS_MSG(args) 609 #define WL_PRHDRS(i, p, f, t, r, l) 610 #endif 611 #ifdef WLMSG_PRPKT 612 #define WL_PRPKT(m, b, n) prhex(m, b, n) 613 #else 614 #define WL_PRPKT(m, b, n) 615 #endif 616 #ifdef WLMSG_INFORM 617 #define WL_INFORM(args) WL_PRINT(args) 618 #else 619 #define WL_INFORM(args) 620 #endif 621 #define WL_TMP(args) 622 #ifdef WLMSG_OID 623 #define WL_OID(args) WL_PRINT(args) 624 #else 625 #define WL_OID(args) 626 #endif 627 #define WL_RATE(args) 628 629 #ifdef BCMDBG_ERR 630 #if defined(EVENT_LOG_COMPILE) && defined(ERR_USE_EVENT_LOG) 631 #if defined(ERR_USE_EVENT_LOG_RA) 632 #define WL_IE_ERROR(args) EVENT_LOG_RA(EVENT_LOG_TAG_IE_ERROR, args) 633 #else 634 #define WL_IE_ERROR(args) EVENT_LOG_COMPACT_CAST_PAREN_ARGS(EVENT_LOG_TAG_IE_ERROR, args) 635 #endif /* ERR_USE_EVENT_LOG_RA */ 636 #else 637 #define WL_IE_ERROR(args) WL_PRINT(args) 638 #endif /* ERR_USE_EVENT_LOG */ 639 #else 640 #define WL_IE_ERROR(args) 641 #endif /* BCMDBG_ERR */ 642 643 #ifdef WLMSG_WNM_BSSTRANS 644 #if defined(EVENT_LOG_COMPILE) 645 #if defined(USE_EVENT_LOG_RA) 646 #define WL_WBTEXT_INFO(args) EVENT_LOG_RA(EVENT_LOG_TAG_WNM_BSSTRANS_INFO, args) 647 #else 648 #define WL_WBTEXT_INFO(args) \ 649 EVENT_LOG_FAST_CAST_PAREN_ARGS(EVENT_LOG_TAG_WNM_BSSTRANS_INFO, args) 650 #endif /* USE_EVENT_LOG_RA */ 651 #else 652 #define WL_WBTEXT_INFO(args) WL_PRINT(args) 653 #endif /* EVENT_LOG_COMPILE */ 654 #else 655 #define WL_WBTEXT_INFO(args) 656 #endif /* WLMSG_WNM_BSSTRANS */ 657 658 #if defined(BCMPCIE_LATENCY) && defined(BCMPCIE_LATENCY_DEBUG) 659 #if defined(EVENT_LOG_COMPILE) 660 #if defined(USE_EVENT_LOG_RA) 661 #define WL_LATENCY_INFO(args) EVENT_LOG_RA(EVENT_LOG_TAG_LATENCY_INFO, args) 662 #else 663 #define WL_LATENCY_INFO(args) \ 664 EVENT_LOG_FAST_CAST_PAREN_ARGS(EVENT_LOG_TAG_LATENCY_INFO, args) 665 #endif /* USE_EVENT_LOG_RA */ 666 #else 667 #define WL_LATENCY_INFO(args) WL_PRINT(args) 668 #endif /* EVENT_LOG_COMPILE */ 669 #else 670 #define WL_LATENCY_INFO(args) 671 #endif /* BCMPCIE_LATENCY && BCMPCIE_LATENCY_DEBUG */ 672 673 #ifdef BCMDBG_ERR 674 #if defined(ERR_USE_EVENT_LOG) && defined(EVENT_LOG_COMPILE) 675 #if defined(ERR_USE_EVENT_LOG_RA) 676 #define WL_WBTEXT_ERROR(args) EVENT_LOG_RA(EVENT_LOG_TAG_WNM_BSSTRANS_ERR, args) 677 #else 678 #define WL_WBTEXT_ERROR(args) \ 679 EVENT_LOG_FAST_CAST_PAREN_ARGS(EVENT_LOG_TAG_WNM_BSSTRANS_ERR, args) 680 #endif /* ERR_USE_EVENT_LOG_RA */ 681 #else 682 #define WL_WBTEXT_ERROR(args) WL_PRINT(args) 683 #endif /* ERR_USE_EVENT_LOG && EVENT_LOG_COMPILE */ 684 #else 685 #define WL_WBTEXT_ERROR(args) 686 #endif /* BCMDBG_ERR */ 687 688 #ifdef WLMSG_WNM_BSSTRANS 689 #if defined(EVENT_LOG_COMPILE) 690 #if defined(USE_EVENT_LOG_RA) 691 #define WL_WNM_PDT_INFO(args) EVENT_LOG_RA(EVENT_LOG_TAG_WNM_BSSTRANS_INFO, args) 692 #else 693 #define WL_WNM_PDT_INFO(args) \ 694 EVENT_LOG_COMPACT_CAST_PAREN_ARGS(EVENT_LOG_TAG_WNM_BSSTRANS_INFO, args) 695 #endif /* USE_EVENT_LOG_RA */ 696 #else 697 #define WL_WNM_PDT_INFO(args) WL_PRINT(args) 698 #endif /* EVENT_LOG_COMPILE */ 699 #else 700 #define WL_WNM_PDT_INFO(args) 701 #endif /* WLMSG_WNM_BSSTRANS */ 702 703 #ifdef BCMDBG_ERR 704 #if defined(ERR_USE_EVENT_LOG) && defined(EVENT_LOG_COMPILE) 705 #if defined(ERR_USE_EVENT_LOG_RA) 706 #define WL_WNM_PDT_ERROR(args) EVENT_LOG_RA(EVENT_LOG_TAG_WNM_BSSTRANS_ERR, args) 707 #else 708 #define WL_WNM_PDT_ERROR(args) \ 709 EVENT_LOG_FAST_CAST_PAREN_ARGS(EVENT_LOG_TAG_WNM_BSSTRANS_ERR, args) 710 #endif /* ERR_USE_EVENT_LOG_RA */ 711 #else 712 #define WL_WNM_PDT_ERROR(args) WL_PRINT(args) 713 #endif /* ERR_USE_EVENT_LOG && EVENT_LOG_COMPILE */ 714 #else 715 #define WL_WNM_PDT_ERROR(args) 716 #endif /* BCMDBG_ERR */ 717 718 #ifdef WLMSG_ASSOC 719 #if defined(EVENT_LOG_COMPILE) 720 #if defined(USE_EVENT_LOG_RA) 721 #define WL_ASSOC(args) EVENT_LOG_RA(EVENT_LOG_TAG_WL_ASSOC_LOG, args) 722 #else 723 #define WL_ASSOC(args) EVENT_LOG_COMPACT_CAST_PAREN_ARGS(EVENT_LOG_TAG_WL_ASSOC_LOG, args) 724 #define WL_ASSOC_DP(args) EVENT_LOG_FAST_CAST_PAREN_ARGS(EVENT_LOG_TAG_WL_ASSOC_LOG, args) 725 #endif /* USE_EVENT_LOG_RA */ 726 #else 727 #define WL_ASSOC(args) WL_PRINT(args) 728 #endif /* EVENT_LOG_COMPILE */ 729 #define WL_ASSOC_AP(args) WL_PRINT(args) 730 #else 731 #define WL_ASSOC(args) 732 #define WL_ASSOC_AP(args) 733 #endif /* WLMSG_ASSOC */ 734 735 #ifdef BCMDBG_ERR 736 /* ROM and ROML optimized builds */ 737 #if defined(EVENT_LOG_COMPILE) && defined(ERR_USE_EVENT_LOG) 738 #if defined(ERR_USE_EVENT_LOG_RA) 739 #define WL_ASSOC_ERROR(args) EVENT_LOG_RA(EVENT_LOG_TAG_ASSOC_ERROR, args) 740 #else 741 #define WL_ASSOC_ERROR(args) EVENT_LOG_COMPACT_CAST_PAREN_ARGS(EVENT_LOG_TAG_ASSOC_ERROR, args) 742 #endif /* ERR_USE_EVENT_LOG_RA */ 743 #else 744 #define WL_ASSOC_ERROR(args) WL_PRINT(args) 745 #endif /* ERR_USE_EVENT_LOG */ 746 #else 747 #define WL_ASSOC_ERROR(args) 748 #endif /* BCMDBG_ERR */ 749 750 #ifdef BCMDBG_ERR 751 /* ROM and ROML optimized builds */ 752 #if defined(EVENT_LOG_COMPILE) && defined(ERR_USE_EVENT_LOG) 753 #if defined(ERR_USE_EVENT_LOG_RA) 754 #define WL_SCAN_ERROR(args) EVENT_LOG_RA(EVENT_LOG_TAG_SCAN_ERR, args) 755 #else 756 #define WL_SCAN_ERROR(args) EVENT_LOG_COMPACT_CAST_PAREN_ARGS(EVENT_LOG_TAG_SCAN_ERR, args) 757 #endif /* ERR_USE_EVENT_LOG_RA */ 758 #else 759 #define WL_SCAN_ERROR(args) WL_PRINT(args) 760 #endif /* ERR_USE_EVENT_LOG */ 761 #else 762 #define WL_SCAN_ERROR(args) 763 #endif /* BCMDBG_ERR */ 764 765 #define WL_PRUSR(m, b, n) 766 767 #ifdef WLMSG_PS 768 #if defined(EVENT_LOG_COMPILE) && defined(EVENT_LOG_COMPILE) 769 #if defined(USE_EVENT_LOG_RA) 770 #define WL_PS(args) EVENT_LOG_RA(EVENT_LOG_TAG_WL_PS_LOG, args) 771 #else 772 #define WL_PS(args) EVENT_LOG_COMPACT_CAST_PAREN_ARGS(EVENT_LOG_TAG_WL_PS_LOG, args) 773 #define WL_PS_DP(args) EVENT_LOG_FAST_CAST_PAREN_ARGS(EVENT_LOG_TAG_WL_PS_LOG, args) 774 #endif /* USE_EVENT_LOG_RA */ 775 #else 776 #define WL_PS(args) WL_PRINT(args) 777 #endif /* EVENT_LOG_COMPILE */ 778 #else 779 #define WL_PS(args) 780 #endif /* WLMSG_PS */ 781 782 #ifdef BCMDBG_ERR 783 /* ROM and ROML optimized builds */ 784 #if defined(EVENT_LOG_COMPILE) && defined(ERR_USE_EVENT_LOG) 785 #if defined(ERR_USE_EVENT_LOG_RA) 786 #define WL_AMSDU_ERROR(args) EVENT_LOG_RA(EVENT_LOG_TAG_AMSDU_ERROR, args) 787 #else 788 #define WL_AMSDU_ERROR(args) EVENT_LOG_COMPACT_CAST_PAREN_ARGS(EVENT_LOG_TAG_AMSDU_ERROR, args) 789 #endif /* ERR_USE_EVENT_LOG_RA */ 790 #else 791 #define WL_AMSDU_ERROR(args) WL_PRINT(args) 792 #endif /* ERR_USE_EVENT_LOG */ 793 #else 794 #define WL_AMSDU_ERROR(args) 795 #endif /* BCMDBG_ERR */ 796 797 #ifdef BCMDBG_PRINT_EAP_PKT_INFO 798 #if defined(EVENT_LOG_COMPILE) && defined(EVENT_LOG_COMPILE) 799 #if defined(USE_EVENT_LOG_RA) 800 #define WL_8021X_ERR(args) do {printf args; \ 801 EVENT_LOG_RA(EVENT_LOG_TAG_4WAYHANDSHAKE, args);} while (0) 802 #else 803 #define WL_8021X_ERR(args) do {printf args; \ 804 EVENT_LOG_FAST_CAST_PAREN_ARGS(EVENT_LOG_TAG_4WAYHANDSHAKE, args);} while (0) 805 #endif /* USE_EVENT_LOG_RA */ 806 #else 807 #define WL_8021X_ERR(args) WL_PRINT(args) 808 #endif /* EVENT_LOG_COMPILE */ 809 #else 810 #define WL_8021X_ERR(args) 811 #endif /* BCMDBG_PRINT_EAP_PKT_INFO */ 812 813 #ifdef WLMSG_ROAM 814 #if defined(EVENT_LOG_COMPILE) && defined(EVENT_LOG_COMPILE) 815 #if defined(USE_EVENT_LOG_RA) 816 #define WL_ROAM(args) EVENT_LOG_RA(EVENT_LOG_TAG_WL_ROAM_LOG, args) 817 #else 818 #define WL_ROAM(args) EVENT_LOG_COMPACT_CAST_PAREN_ARGS(EVENT_LOG_TAG_WL_ROAM_LOG, args) 819 #define WL_ROAM_DP(args) EVENT_LOG_FAST_CAST_PAREN_ARGS(EVENT_LOG_TAG_WL_ROAM_LOG, args) 820 #endif /* USE_EVENT_LOG_RA */ 821 #else 822 #define WL_ROAM(args) WL_PRINT(args) 823 #endif /* EVENT_LOG_COMPILE */ 824 #else 825 #define WL_ROAM(args) 826 #endif /* WLMSG_ROAM */ 827 828 #define WL_PORT(args) 829 #define WL_DUAL(args) 830 #define WL_REGULATORY(args) 831 832 #ifdef WLMSG_MPC 833 #if defined(EVENT_LOG_COMPILE) && defined(EVENT_LOG_COMPILE) 834 #if defined(USE_EVENT_LOG_RA) 835 #define WL_MPC(args) EVENT_LOG_RA(EVENT_LOG_TAG_WL_MPC_LOG, args) 836 #else 837 #define WL_MPC(args) EVENT_LOG_COMPACT_CAST_PAREN_ARGS(EVENT_LOG_TAG_WL_MPC_LOG, args) 838 #define WL_MPC_DP(args) EVENT_LOG_FAST_CAST_PAREN_ARGS(EVENT_LOG_TAG_WL_MPC_LOG, args) 839 #endif /* USE_EVENT_LOG_RA */ 840 #else 841 #define WL_MPC(args) WL_PRINT(args) 842 #endif /* EVENT_LOG_COMPILE */ 843 #else 844 #define WL_MPC(args) 845 #endif /* WLMSG_MPC */ 846 847 #define WL_APSTA(args) 848 #define WL_APSTA_BCN(args) 849 #define WL_APSTA_TX(args) 850 #define WL_APSTA_TSF(args) 851 #define WL_APSTA_BSSID(args) 852 #define WL_BA(args) 853 #define WL_MBSS(args) 854 #define WL_MODE_SWITCH(args) 855 #define WL_PROTO(args) 856 857 #define WL_CAC(args) 858 #define WL_AMSDU(args) 859 #define WL_AMPDU(args) 860 #define WL_FFPLD(args) 861 #define WL_MCHAN(args) 862 #define WL_BCNTRIM_DBG(args) 863 864 /* Define WLMSG_DFS automatically for WLTEST builds */ 865 #if defined(WLTEST) && !defined(WLTEST_DISABLED) 866 #ifndef WLMSG_DFS 867 #define WLMSG_DFS 868 #endif 869 #endif /* WLTEST */ 870 871 #ifdef WLMSG_DFS 872 #define WL_DFS(args) do {if (wl_msg_level & WL_DFS_VAL) WL_PRINT(args);} while (0) 873 #else /* WLMSG_DFS */ 874 #define WL_DFS(args) 875 #endif /* WLMSG_DFS */ 876 #define WL_WOWL(args) 877 878 #ifdef WLMSG_SCAN 879 #if defined(EVENT_LOG_COMPILE) && defined(EVENT_LOG_COMPILE) 880 #if defined(USE_EVENT_LOG_RA) 881 #define WL_SCAN(args) EVENT_LOG_RA(EVENT_LOG_TAG_SCAN_TRACE_LOW, args) 882 #define WL_SCAN_WARN(args) EVENT_LOG_RA(EVENT_LOG_TAG_SCAN_WARN, args) 883 #else 884 #define WL_SCAN(args) \ 885 EVENT_LOG_COMPACT_CAST_PAREN_ARGS(EVENT_LOG_TAG_SCAN_TRACE_LOW, args) 886 #define WL_SCAN_DP(args) \ 887 EVENT_LOG_FAST_CAST_PAREN_ARGS(EVENT_LOG_TAG_SCAN_TRACE_LOW, args) 888 #define WL_SCAN_WARN(args) EVENT_LOG_FAST_CAST_PAREN_ARGS(EVENT_LOG_TAG_SCAN_WARN, args) 889 #endif /* USE_EVENT_LOG_RA */ 890 #else 891 #define WL_SCAN(args) WL_PRINT(args) 892 #define WL_SCAN_WARN(args) WL_PRINT(args) 893 #endif /* EVENT_LOG_COMPILE */ 894 #else 895 #define WL_SCAN(args) 896 #define WL_SCAN_WARN(args) 897 #endif /* WLMSG_SCAN */ 898 899 #define WL_COEX(args) 900 #define WL_RTDC(w, s, i, j) 901 #define WL_RTDC2(w, s, i, j) 902 #define WL_CHANINT(args) 903 #ifdef WLMSG_BTA 904 #define WL_BTA(args) WL_PRINT(args) 905 #else 906 #define WL_BTA(args) 907 #endif 908 #define WL_WMF(args) 909 #define WL_P2P(args) 910 #define WL_ITFR(args) 911 #define WL_TDLS(args) 912 913 #ifdef WLMSG_MCNX 914 #if defined(EVENT_LOG_COMPILE) && defined(EVENT_LOG_COMPILE) 915 #if defined(USE_EVENT_LOG_RA) 916 #define WL_MCNX(args) EVENT_LOG_RA(EVENT_LOG_TAG_WL_MCNX_LOG, args) 917 #else 918 #define WL_MCNX(args) EVENT_LOG_COMPACT_CAST_PAREN_ARGS(EVENT_LOG_TAG_WL_MCNX_LOG, args) 919 #define WL_MCNX_DP(args) EVENT_LOG_FAST_CAST_PAREN_ARGS(EVENT_LOG_TAG_WL_MCNX_LOG, args) 920 #endif /* USE_EVENT_LOG_RA */ 921 #else 922 #define WL_MCNX(args) WL_PRINT(args) 923 #endif /* EVENT_LOG_COMPILE */ 924 #else 925 #define WL_MCNX(args) 926 #endif /* WLMSG_MCNX */ 927 928 #define WL_PROT(args) 929 #define WL_PSTA(args) 930 #define WL_TBTT(args) 931 #define WL_TRF_MGMT(args) 932 #define WL_L2FILTER(args) 933 #define WL_MQ(args) 934 #define WL_P2PO(args) 935 #ifdef WLAWDL 936 #define WL_AWDL(args) 937 #endif /* WLAWDL */ 938 #define WL_WNM(args) 939 #define WL_TXBF(args) 940 #define WL_TSLOG(w, s, i, j) 941 #define WL_FBT(args) 942 #define WL_MUMIMO(args) 943 #ifdef WLMSG_MESH 944 #define WL_MESH(args) WL_PRINT(args) 945 #define WL_MESH_AMPE(args) WL_PRINT(args) 946 #define WL_MESH_ROUTE(args) WL_PRINT(args) 947 #define WL_MESH_BCN(args) 948 #else 949 #define WL_MESH(args) 950 #define WL_MESH_AMPE(args) 951 #define WL_MESH_ROUTE(args) 952 #define WL_MESH_BCN(args) 953 #endif 954 #define WL_SWDIV(args) 955 #define WL_ADPS(args) 956 957 #ifdef BCMDBG_ERR 958 #define WL_ERROR_ON() 1 959 #else 960 #define WL_ERROR_ON() 0 961 #endif 962 #define WL_TRACE_ON() 0 963 #ifdef WLMSG_PRHDRS 964 #define WL_PRHDRS_ON() 1 965 #else 966 #define WL_PRHDRS_ON() 0 967 #endif 968 #ifdef WLMSG_PRPKT 969 #define WL_PRPKT_ON() 1 970 #else 971 #define WL_PRPKT_ON() 0 972 #endif 973 #ifdef WLMSG_INFORM 974 #define WL_INFORM_ON() 1 975 #else 976 #define WL_INFORM_ON() 0 977 #endif 978 #ifdef WLMSG_OID 979 #define WL_OID_ON() 1 980 #else 981 #define WL_OID_ON() 0 982 #endif 983 #define WL_TMP_ON() 0 984 #define WL_RATE_ON() 0 985 #ifdef WLMSG_ASSOC 986 #define WL_ASSOC_ON() 1 987 #define WL_ASSOC_AP_ON() 1 988 #else 989 #define WL_ASSOC_ON() 0 990 #define WL_ASSOC_AP_ON() 0 991 #endif 992 #define WL_PORT_ON() 0 993 #ifdef WLMSG_WSEC 994 #define WL_WSEC_ON() 1 995 #define WL_WSEC_DUMP_ON() 1 996 #else 997 #define WL_WSEC_ON() 0 998 #define WL_WSEC_DUMP_ON() 0 999 #endif 1000 #ifdef WLMSG_MPC 1001 #define WL_MPC_ON() 1 1002 #else 1003 #define WL_MPC_ON() 0 1004 #endif 1005 #define WL_REGULATORY_ON() 0 1006 1007 #define WL_APSTA_ON() 0 1008 #define WL_BA_ON() 0 1009 #define WL_MBSS_ON() 0 1010 #define WL_MODE_SWITCH_ON() 0 1011 #ifdef WLMSG_DFS 1012 #define WL_DFS_ON() 1 1013 #else /* WLMSG_DFS */ 1014 #define WL_DFS_ON() 0 1015 #endif /* WLMSG_DFS */ 1016 #ifdef WLMSG_SCAN 1017 #define WL_SCAN_ON() 1 1018 #else 1019 #define WL_SCAN_ON() 0 1020 #endif 1021 #ifdef WLMSG_BTA 1022 #define WL_BTA_ON() 1 1023 #else 1024 #define WL_BTA_ON() 0 1025 #endif 1026 #define WL_WMF_ON() 0 1027 #define WL_P2P_ON() 0 1028 #define WL_MCHAN_ON() 0 1029 #define WL_TDLS_ON() 0 1030 #define WL_MCNX_ON() 0 1031 #define WL_PROT_ON() 0 1032 #define WL_TBTT_ON() 0 1033 #define WL_LPC_ON() 0 1034 #define WL_L2FILTER_ON() 0 1035 #define WL_MQ_ON() 0 1036 #define WL_P2PO_ON() 0 1037 #ifdef WLAWDL 1038 #define WL_AWDL_ON() 0 1039 #endif /* WLAWDL */ 1040 #define WL_TXBF_ON() 0 1041 #define WL_TSLOG_ON() 0 1042 #define WL_MUMIMO_ON() 0 1043 #define WL_SWDIV_ON() 0 1044 1045 #define WL_AMPDU_UPDN(args) 1046 #define WL_AMPDU_RX(args) 1047 #define WL_AMPDU_TX(args) 1048 #define WL_AMPDU_CTL(args) 1049 #define WL_AMPDU_HW(args) 1050 #define WL_AMPDU_HWTXS(args) 1051 #define WL_AMPDU_HWDBG(args) 1052 #define WL_AMPDU_STAT(args) 1053 #define WL_AMPDU_ERR_ON() 0 1054 #define WL_AMPDU_HW_ON() 0 1055 #define WL_AMPDU_HWTXS_ON() 0 1056 1057 #define WL_WNM_ON() 0 1058 #ifdef WLMSG_MBO 1059 #define WL_MBO_DBG_ON() 1 1060 #else 1061 #define WL_MBO_DBG_ON() 0 1062 #endif /* WLMSG_MBO */ 1063 #ifdef WLMSG_RANDMAC 1064 #define WL_RANDMAC_DBG_ON() 1 1065 #else 1066 #define WL_RANDMAC_DBG_ON() 0 1067 #endif /* WLMSG_RANDMAC */ 1068 #define WL_ADPS_ON() 0 1069 #ifdef WLMSG_OCE 1070 #define WL_OCE_DBG_ON() 1 1071 #else 1072 #define WL_OCE_DBG_ON() 0 1073 #endif /* WLMSG_OCE */ 1074 #ifdef WLMSG_FILS 1075 #define WL_FILS_DBG_ON() 1 1076 #else 1077 #define WL_FILS_DBG_ON() 0 1078 #endif /* WLMSG_FILS */ 1079 1080 #define WL_APSTA_UPDN(args) 1081 #define WL_APSTA_RX(args) 1082 1083 #ifdef WLMSG_WSEC 1084 #if defined(EVENT_LOG_COMPILE) && defined(EVENT_LOG_COMPILE) 1085 #if defined(USE_EVENT_LOG_RA) 1086 #define WL_WSEC(args) EVENT_LOG_RA(EVENT_LOG_TAG_WL_WSEC_LOG, args) 1087 #define WL_WSEC_DUMP(args) EVENT_LOG_RA(EVENT_LOG_TAG_WL_WSEC_DUMP, args) 1088 #else 1089 #define WL_WSEC(args) EVENT_LOG_COMPACT_CAST_PAREN_ARGS(EVENT_LOG_TAG_WL_WSEC_LOG, args) 1090 #define WL_WSEC_DUMP(args) EVENT_LOG_COMPACT_CAST_PAREN_ARGS(EVENT_LOG_TAG_WL_WSEC_DUMP, args) 1091 #define WL_WSEC_DP(args) EVENT_LOG_FAST_CAST_PAREN_ARGS(EVENT_LOG_TAG_WL_WSEC_LOG, args) 1092 #define WL_WSEC_DUMP_DP(args) EVENT_LOG_FAST_CAST_PAREN_ARGS(EVENT_LOG_TAG_WL_WSEC_DUMP, args) 1093 #endif /* USE_EVENT_LOG_RA */ 1094 #else 1095 #define WL_WSEC(args) WL_PRINT(args) 1096 #define WL_WSEC_DUMP(args) WL_PRINT(args) 1097 #endif /* EVENT_LOG_COMPILE */ 1098 #else 1099 #define WL_WSEC(args) 1100 #define WL_WSEC_DUMP(args) 1101 #endif /* WLMSG_WSEC */ 1102 1103 #ifdef WLMSG_MBO 1104 #if defined(EVENT_LOG_COMPILE) && defined(EVENT_LOG_COMPILE) 1105 #if defined(USE_EVENT_LOG_RA) 1106 #define WL_MBO_DBG(args) EVENT_LOG_RA(EVENT_LOG_TAG_MBO_DBG, args) 1107 #define WL_MBO_INFO(args) EVENT_LOG_RA(EVENT_LOG_TAG_MBO_INFO, args) 1108 #else 1109 #define WL_MBO_DBG(args) \ 1110 EVENT_LOG_COMPACT_CAST_PAREN_ARGS(EVENT_LOG_TAG_MBO_DBG, args) 1111 #define WL_MBO_INFO(args) \ 1112 EVENT_LOG_COMPACT_CAST_PAREN_ARGS(EVENT_LOG_TAG_MBO_INFO, args) 1113 #endif /* USE_EVENT_LOG_RA */ 1114 #else 1115 #define WL_MBO_DBG(args) WL_PRINT(args) 1116 #define WL_MBO_INFO(args) WL_PRINT(args) 1117 #endif /* EVENT_LOG_COMPILE */ 1118 #else 1119 #define WL_MBO_DBG(args) 1120 #define WL_MBO_INFO(args) 1121 #endif /* WLMSG_MBO */ 1122 1123 #ifdef BCMDBG_ERR 1124 #if defined(EVENT_LOG_COMPILE) && defined(ERR_USE_EVENT_LOG) 1125 #if defined(ERR_USE_EVENT_LOG_RA) 1126 #define WL_MBO_ERR(args) EVENT_LOG_RA(EVENT_LOG_TAG_MBO_ERR, args) 1127 #else 1128 #define WL_MBO_ERR(args) EVENT_LOG_COMPACT_CAST_PAREN_ARGS(EVENT_LOG_TAG_MBO_ERR, args) 1129 #endif /* ERR_USE_EVENT_LOG_RA */ 1130 #else 1131 #define WL_MBO_ERR(args) WL_PRINT(args) 1132 #endif /* ERR_USE_EVENT_LOG */ 1133 #else 1134 #define WL_MBO_ERR(args) WL_PRINT(args) 1135 #endif /* ERR_USE_EVENT_LOG */ 1136 1137 #ifdef WLMSG_RANDMAC 1138 #if defined(EVENT_LOG_COMPILE) && defined(EVENT_LOG_COMPILE) 1139 #if defined(USE_EVENT_LOG_RA) 1140 #define WL_RANDMAC_DBG(args) EVENT_LOG_RA(EVENT_LOG_TAG_RANDMAC_DBG, args) 1141 #define WL_RANDMAC_INFO(args) EVENT_LOG_RA(EVENT_LOG_TAG_RANDMAC_INFO, args) 1142 #else 1143 #define WL_RANDMAC_DBG(args) \ 1144 EVENT_LOG_COMPACT_CAST_PAREN_ARGS(EVENT_LOG_TAG_RANDMAC_DBG, args) 1145 #define WL_RANDMAC_INFO(args) \ 1146 EVENT_LOG_COMPACT_CAST_PAREN_ARGS(EVENT_LOG_TAG_RANDMAC_INFO, args) 1147 #endif /* USE_EVENT_LOG_RA */ 1148 #else 1149 #define WL_RANDMAC_DBG(args) WL_PRINT(args) 1150 #define WL_RANDMAC_INFO(args) WL_PRINT(args) 1151 #endif /* EVENT_LOG_COMPILE */ 1152 #else 1153 #define WL_RANDMAC_DBG(args) 1154 #define WL_RANDMAC_INFO(args) 1155 #endif /* WLMSG_RANDMAC */ 1156 1157 #ifdef BCMDBG_ERR 1158 #if defined(EVENT_LOG_COMPILE) && defined(ERR_USE_EVENT_LOG) 1159 #if defined(ERR_USE_EVENT_LOG_RA) 1160 #define WL_RANDMAC_ERR(args) EVENT_LOG_RA(EVENT_LOG_TAG_RANDMAC_ERR, args) 1161 #else 1162 #define WL_RANDMAC_ERR(args) \ 1163 EVENT_LOG_COMPACT_CAST_PAREN_ARGS(EVENT_LOG_TAG_RANDMAC_ERR, args) 1164 #endif /* ERR_USE_EVENT_LOG_RA */ 1165 #else 1166 #define WL_RANDMAC_ERR(args) WL_PRINT(args) 1167 #endif /* ERR_USE_EVENT_LOG */ 1168 #else 1169 #define WL_RANDMAC_ERR(args) WL_PRINT(args) 1170 #endif /* ERR_USE_EVENT_LOG */ 1171 1172 #ifdef WLMSG_OCE 1173 #if defined(EVENT_LOG_COMPILE) 1174 #if defined(USE_EVENT_LOG_RA) 1175 #define WL_OCE_DBG(args) EVENT_LOG_RA(EVENT_LOG_TAG_OCE_DBG, args) 1176 #define WL_OCE_INFO(args) EVENT_LOG_RA(EVENT_LOG_TAG_OCE_INFO, args) 1177 #else 1178 #define WL_OCE_DBG(args) \ 1179 EVENT_LOG_COMPACT_CAST_PAREN_ARGS(EVENT_LOG_TAG_OCE_DBG, args) 1180 #define WL_OCE_INFO(args) \ 1181 EVENT_LOG_COMPACT_CAST_PAREN_ARGS(EVENT_LOG_TAG_OCE_INFO, args) 1182 #endif /* USE_EVENT_LOG_RA */ 1183 #else 1184 #define WL_OCE_DBG(args) WL_PRINT(args) 1185 #define WL_OCE_INFO(args) WL_PRINT(args) 1186 #endif /* EVENT_LOG_COMPILE */ 1187 #else 1188 #define WL_OCE_DBG(args) 1189 #define WL_OCE_INFO(args) 1190 #endif /* WLMSG_OCE */ 1191 1192 #ifdef WLMSG_FILS 1193 #if defined(EVENT_LOG_COMPILE) 1194 #if defined(USE_EVENT_LOG_RA) 1195 #define WL_FILS_DBG(args) EVENT_LOG_RA(EVENT_LOG_TAG_FILS_DBG, args) 1196 #define WL_FILS_INFO(args) EVENT_LOG_RA(EVENT_LOG_TAG_FILS_INFO, args) 1197 #else 1198 #define WL_FILS_DBG(args) \ 1199 EVENT_LOG_COMPACT_CAST_PAREN_ARGS(EVENT_LOG_TAG_FILS_DBG, args) 1200 #define WL_FILS_INFO(args) \ 1201 EVENT_LOG_COMPACT_CAST_PAREN_ARGS(EVENT_LOG_TAG_FILS_INFO, args) 1202 #endif /* USE_EVENT_LOG_RA */ 1203 #else 1204 #define WL_FILS_DBG(args) WL_PRINT(args) 1205 #define WL_FILS_INFO(args) WL_PRINT(args) 1206 #endif /* EVENT_LOG_COMPILE */ 1207 #else 1208 #define WL_FILS_DBG(args) 1209 #define WL_FILS_INFO(args) 1210 #endif /* WLMSG_FILS */ 1211 #ifdef BCMDBG_ERR 1212 #if defined(ERR_USE_EVENT_LOG) && defined(EVENT_LOG_COMPILE) 1213 #if defined(ERR_USE_EVENT_LOG_RA) 1214 #define WL_OCE_ERR(args) EVENT_LOG_RA(EVENT_LOG_TAG_OCE_ERR, args) 1215 #define WL_FILS_ERR(args) EVENT_LOG_RA(EVENT_LOG_TAG_FILS_ERROR, args) 1216 1217 #else 1218 #define WL_OCE_ERR(args) \ 1219 EVENT_LOG_COMPACT_CAST_PAREN_ARGS(EVENT_LOG_TAG_OCE_ERR, args) 1220 #define WL_FILS_ERR(args) \ 1221 EVENT_LOG_COMPACT_CAST_PAREN_ARGS(EVENT_LOG_TAG_FILS_ERROR, args) 1222 #endif /* ERR_USE_EVENT_LOG_RA */ 1223 #else 1224 #define WL_OCE_ERR(args) WL_PRINT(args) 1225 #define WL_FILS_ERR(args) WL_PRINT(args) 1226 #endif /* ERR_USE_EVENT_LOG && EVENT_LOG_COMPILE */ 1227 #else 1228 #define WL_OCE_ERR(args) WL_PRINT(args) 1229 #define WL_FILS_ERR(args) WL_PRINT(args) 1230 #endif /* BCMDBG_ERR */ 1231 1232 #define WL_PCIE(args) do {if (wl_msg_level2 & WL_PCIE_VAL) WL_PRINT(args);} while (0) 1233 #define WL_PCIE_ON() (wl_msg_level2 & WL_PCIE_VAL) 1234 #define WL_PFN(args) do {if (wl_msg_level & WL_PFN_VAL) WL_PRINT(args);} while (0) 1235 #define WL_PFN_ON() (wl_msg_level & WL_PFN_VAL) 1236 #define WL_PMDUR(args) 1237 1238 #ifdef WLMSG_BAM 1239 #if defined(EVENT_LOG_COMPILE) 1240 #ifdef USE_EVENT_LOG_RA 1241 #define WL_BAM_ERR(args) EVENT_LOG_RA(EVENT_LOG_TAG_BAM, args) 1242 #else 1243 #define WL_BAM_ERR(args) EVENT_LOG_COMPACT_CAST_PAREN_ARGS(EVENT_LOG_TAG_BAM, args) 1244 #endif /* USE_EVENT_LOG_RA */ 1245 #else 1246 #define WL_BAM_ERR(args) WL_PRINT(args) 1247 #endif /* EVENT_LOG_COMPILE */ 1248 #else 1249 #define WL_BAM_ERR(args) 1250 #endif /* WLMSG_BAM */ 1251 #endif /* BCMDBG */ 1252 1253 #ifdef BCMDBG_ERR 1254 /* ROM and ROML optimized builds */ 1255 #if defined(EVENT_LOG_COMPILE) && defined(ERR_USE_EVENT_LOG) 1256 #if defined(ERR_USE_EVENT_LOG_RA) 1257 #define WL_HE_INFO(args) EVENT_LOG_RA(EVENT_LOG_TAG_WL_HE_INFO, args) 1258 #define WL_HE_TRACE(args) EVENT_LOG_RA(EVENT_LOG_TAG_WL_HE_TRACE, args) 1259 #define WL_HE_WARN(args) EVENT_LOG_RA(EVENT_LOG_TAG_WL_HE_WARN, args) 1260 #define WL_HE_ERR(args) EVENT_LOG_RA(EVENT_LOG_TAG_WL_HE_ERROR, args) 1261 #define WL_TWT_INFO(args) EVENT_LOG_RA(EVENT_LOG_TAG_WL_TWT_INFO, args) 1262 #define WL_TWT_TRACE(args) EVENT_LOG_RA(EVENT_LOG_TAG_WL_TWT_TRACE, args) 1263 #define WL_TWT_WARN(args) EVENT_LOG_RA(EVENT_LOG_TAG_WL_TWT_WARN, args) 1264 #define WL_TWT_ERR(args) EVENT_LOG_RA(EVENT_LOG_TAG_WL_TWT_ERROR, args) 1265 #define WL_HEB_ERR(args) EVENT_LOG_RA(EVENT_LOG_TAG_WL_HEB_ERROR, args) 1266 #define WL_HEB_TRACE(args) EVENT_LOG_RA(EVENT_LOG_TAG_WL_HEB_TRACE, args) 1267 #else 1268 #define WL_HE_INFO(args) EVENT_LOG_COMPACT_CAST_PAREN_ARGS(EVENT_LOG_TAG_WL_HE_INFO, args) 1269 #define WL_HE_TRACE(args) EVENT_LOG_COMPACT_CAST_PAREN_ARGS(EVENT_LOG_TAG_WL_HE_TRACE, args) 1270 #define WL_HE_WARN(args) EVENT_LOG_COMPACT_CAST_PAREN_ARGS(EVENT_LOG_TAG_WL_HE_WARN, args) 1271 #define WL_HE_ERR(args) EVENT_LOG_COMPACT_CAST_PAREN_ARGS(EVENT_LOG_TAG_WL_HE_ERROR, args) 1272 #define WL_TWT_INFO(args) EVENT_LOG_COMPACT_CAST_PAREN_ARGS(EVENT_LOG_TAG_WL_TWT_INFO, args) 1273 #define WL_TWT_TRACE(args) EVENT_LOG_COMPACT_CAST_PAREN_ARGS(EVENT_LOG_TAG_WL_TWT_TRACE, args) 1274 #define WL_TWT_WARN(args) EVENT_LOG_COMPACT_CAST_PAREN_ARGS(EVENT_LOG_TAG_WL_TWT_WARN, args) 1275 #define WL_TWT_ERR(args) EVENT_LOG_COMPACT_CAST_PAREN_ARGS(EVENT_LOG_TAG_WL_TWT_ERROR, args) 1276 #define WL_HEB_ERR(args) EVENT_LOG_COMPACT_CAST_PAREN_ARGS(EVENT_LOG_TAG_WL_HEB_ERROR, args) 1277 #define WL_HEB_TRACE(args) EVENT_LOG_COMPACT_CAST_PAREN_ARGS(EVENT_LOG_TAG_WL_HEB_TRACE, args) 1278 #endif /* ERR_USE_EVENT_LOG_RA */ 1279 #else 1280 #define WL_HE_INFO(args) WL_PRINT(args) 1281 #define WL_HE_TRACE(args) WL_PRINT(args) 1282 #define WL_HE_WARN(args) WL_PRINT(args) 1283 #define WL_HE_ERR(args) WL_PRINT(args) 1284 #define WL_TWT_INFO(args) WL_PRINT(args) 1285 #define WL_TWT_TRACE(args) WL_PRINT(args) 1286 #define WL_TWT_WARN(args) WL_PRINT(args) 1287 #define WL_TWT_ERR(args) WL_PRINT(args) 1288 #define WL_HEB_ERR(args) WL_PRINT(args) 1289 #define WL_HEB_TRACE(args) WL_PRINT(args) 1290 #endif /* ERR_USE_EVENT_LOG */ 1291 #else 1292 #define WL_HE_INFO(args) 1293 #define WL_HE_TRACE(args) 1294 #define WL_HE_WARN(args) 1295 #define WL_HE_ERR(args) 1296 #define WL_TWT_INFO(args) 1297 #define WL_TWT_TRACE(args) 1298 #define WL_TWT_WARN(args) 1299 #define WL_TWT_ERR(args) 1300 #define WL_HEB_ERR(args) 1301 #define WL_HEB_TRACE(args) 1302 #endif /* BCMDBG_ERR */ 1303 1304 #ifdef WLMSG_TPA 1305 #ifdef EVENT_LOG_COMPILE 1306 #ifdef USE_EVENT_LOG_RA 1307 #define WL_TPA_ERR(args) EVENT_LOG_RA(EVENT_LOG_TAG_TPA_ERR, args) 1308 #define WL_TPA_INFO(args) EVENT_LOG_RA(EVENT_LOG_TAG_TPA_INFO, args) 1309 #else 1310 #define WL_TPA_ERR(args) EVENT_LOG_COMPACT_CAST_PAREN_ARGS(EVENT_LOG_TAG_TPA_ERR, args) 1311 #define WL_TPA_INFO(args) EVENT_LOG_COMPACT_CAST_PAREN_ARGS(EVENT_LOG_TAG_TPA_INFO, args) 1312 #endif /* USE_EVENT_LOG_RA */ 1313 #else 1314 #define WL_TPA_ERR(args) WL_PRINT(args) 1315 #define WL_TPA_INFO(args) WL_INFORM(args) 1316 #endif /* EVENT_LOG_COMPILE */ 1317 #else 1318 #ifndef WL_TPA_ERR 1319 #define WL_TPA_ERR(args) 1320 #endif /* WL_TPA_ERR */ 1321 #ifndef WL_TPA_INFO 1322 #define WL_TPA_INFO(args) 1323 #endif /* WL_TPA_INFO */ 1324 #endif /* WLMSG_TPA */ 1325 1326 #ifdef WLMSG_WNM_BSSTRANS 1327 #if defined(EVENT_LOG_COMPILE) 1328 #if defined(USE_EVENT_LOG_RA) 1329 #define WL_BSSTRANS_INFO(args) EVENT_LOG_RA(EVENT_LOG_TAG_WNM_BSSTRANS_INFO, args) 1330 #else 1331 #define WL_BSSTRANS_INFO(args) \ 1332 EVENT_LOG_COMPACT_CAST_PAREN_ARGS(EVENT_LOG_TAG_WNM_BSSTRANS_INFO, args) 1333 #endif /* USE_EVENT_LOG_RA */ 1334 #else 1335 #define WL_BSSTRANS_INFO(args) WL_PRINT(args) 1336 #endif /* EVENT_LOG_COMPILE */ 1337 #else 1338 #define WL_BSSTRANS_INFO(args) 1339 #endif /* WLMSG_WNM_BSSTRANS */ 1340 1341 #ifdef BCMDBG_ERR 1342 #if defined(EVENT_LOG_COMPILE) && defined(ERR_USE_EVENT_LOG) 1343 #if defined(ERR_USE_EVENT_LOG_RA) 1344 #define WL_BSSTRANS_ERR(args) EVENT_LOG_RA(EVENT_LOG_TAG_WNM_BSSTRANS_ERR, args) 1345 #else 1346 #define WL_BSSTRANS_ERR(args) \ 1347 EVENT_LOG_COMPACT_CAST_PAREN_ARGS(EVENT_LOG_TAG_WNM_BSSTRANS_ERR, args) 1348 #endif /* ERR_USE_EVENT_LOG_RA */ 1349 #else 1350 #define WL_BSSTRANS_ERR(args) WL_PRINT(args) 1351 #endif /* ERR_USE_EVENT_LOG */ 1352 #else 1353 #define WL_BSSTRANS_ERR(args) WL_PRINT(args) 1354 #endif /* ERR_USE_EVENT_LOG */ 1355 1356 #if defined(BCMDBG) || defined(BCMDBG_ERR) 1357 #define DBGERRONLY(x) x 1358 #else 1359 #define DBGERRONLY(x) 1360 #endif 1361 1362 #ifdef EVENT_LOG_COMPILE 1363 #ifdef USE_EVENT_LOG_RA 1364 #define WL_ADPS_ELOG(args) EVENT_LOG_RA(EVENT_LOG_TAG_ADPS, args) 1365 #define WL_ADPS_ELOG_INFO(args) EVENT_LOG_RA(EVENT_LOG_TAG_ADPS_INFO, args) 1366 #else 1367 #define WL_ADPS_ELOG(args) \ 1368 EVENT_LOG_COMPACT_CAST_PAREN_ARGS(EVENT_LOG_TAG_ADPS, args) 1369 #define WL_ADPS_ELOG_INFO(args) \ 1370 EVENT_LOG_COMPACT_CAST_PAREN_ARGS(EVENT_LOG_TAG_ADPS_INFO, args) 1371 #endif /* USE_EVENT_LOG_RA */ 1372 #else 1373 #define WL_ADPS_ELOG(args) WL_ADPS(args) 1374 #define WL_ADPS_ELOG_INFO(args) WL_ADPS(args) 1375 #endif /* EVENT_LOG_COMPILE */ 1376 1377 #ifdef WLMSG_RRM 1378 #if defined(EVENT_LOG_COMPILE) && defined(EVENT_LOG_COMPILE) 1379 #if defined(USE_EVENT_LOG_RA) 1380 #define WL_RRM_DBG(args) EVENT_LOG_RA(EVENT_LOG_TAG_RRM_DBG, args) 1381 #define WL_RRM_INFO(args) EVENT_LOG_RA(EVENT_LOG_TAG_RRM_INFO, args) 1382 #else 1383 #define WL_RRM_DBG(args) \ 1384 EVENT_LOG_COMPACT_CAST_PAREN_ARGS(EVENT_LOG_TAG_RRM_DBG, args) 1385 #define WL_RRM_INFO(args) \ 1386 EVENT_LOG_COMPACT_CAST_PAREN_ARGS(EVENT_LOG_TAG_RRM_INFO, args) 1387 #endif /* USE_EVENT_LOG_RA */ 1388 #else 1389 #define WL_RRM_DBG(args) WL_PRINT(args) 1390 #define WL_RRM_INFO(args) WL_PRINT(args) 1391 #endif /* EVENT_LOG_COMPILE */ 1392 #else 1393 #define WL_RRM_DBG(args) 1394 #define WL_RRM_INFO(args) 1395 #endif /* WLMSG_RRM */ 1396 1397 #ifdef BCMDBG_ERR 1398 #if defined(EVENT_LOG_COMPILE) && defined(ERR_USE_EVENT_LOG) 1399 #if defined(ERR_USE_EVENT_LOG_RA) 1400 #define WL_RRM_ERR(args) EVENT_LOG_RA(EVENT_LOG_TAG_RRM_ERR, args) 1401 #else 1402 #define WL_RRM_ERR(args) EVENT_LOG_COMPACT_CAST_PAREN_ARGS(EVENT_LOG_TAG_RRM_ERR, args) 1403 #endif /* ERR_USE_EVENT_LOG_RA */ 1404 #else 1405 #define WL_RRM_ERR(args) WL_PRINT(args) 1406 #endif /* ERR_USE_EVENT_LOG */ 1407 #else 1408 #define WL_RRM_ERR(args) WL_PRINT(args) 1409 #endif /* ERR_USE_EVENT_LOG */ 1410 1411 #ifdef WLMSG_ESP 1412 #if defined(EVENT_LOG_COMPILE) && defined(EVENT_LOG_COMPILE) 1413 #if defined(USE_EVENT_LOG_RA) 1414 #define WL_ESP_DBG(args) EVENT_LOG_RA(EVENT_LOG_TAG_ESP_DBG, args) 1415 #define WL_ESP_INFO(args) EVENT_LOG_RA(EVENT_LOG_TAG_ESP_INFO, args) 1416 #else 1417 #define WL_ESP_DBG(args) \ 1418 EVENT_LOG_COMPACT_CAST_PAREN_ARGS(EVENT_LOG_TAG_ESP_DBG, args) 1419 #define WL_ESP_INFO(args) \ 1420 EVENT_LOG_COMPACT_CAST_PAREN_ARGS(EVENT_LOG_TAG_ESP_INFO, args) 1421 #endif /* USE_EVENT_LOG_RA */ 1422 #else 1423 #define WL_ESP_DBG(args) WL_PRINT(args) 1424 #define WL_ESP_INFO(args) WL_PRINT(args) 1425 #endif /* EVENT_LOG_COMPILE */ 1426 #else 1427 #define WL_ESP_DBG(args) 1428 #define WL_ESP_INFO(args) 1429 #endif /* WLMSG_ESP */ 1430 1431 #ifdef BCMDBG_ERR 1432 #if defined(EVENT_LOG_COMPILE) && defined(ERR_USE_EVENT_LOG) 1433 #if defined(ERR_USE_EVENT_LOG_RA) 1434 #define WL_ESP_ERR(args) EVENT_LOG_RA(EVENT_LOG_TAG_ESP_ERR, args) 1435 #else 1436 #define WL_ESP_ERR(args) EVENT_LOG_COMPACT_CAST_PAREN_ARGS(EVENT_LOG_TAG_ESP_ERR, args) 1437 #endif /* ERR_USE_EVENT_LOG_RA */ 1438 #else 1439 #define WL_ESP_ERR(args) WL_PRINT(args) 1440 #endif /* ERR_USE_EVENT_LOG */ 1441 #else 1442 #define WL_ESP_ERR(args) WL_PRINT(args) 1443 #endif /* ERR_USE_EVENT_LOG */ 1444 1445 #ifndef WL_ASSOC_DP 1446 #define WL_ASSOC_DP(args) WL_ASSOC(args) 1447 #endif 1448 1449 #ifndef WL_ROAM_DP 1450 #define WL_ROAM_DP(args) WL_ROAM(args) 1451 #endif 1452 1453 #ifndef WL_PS_DP 1454 #define WL_PS_DP(args) WL_PS(args) 1455 #endif 1456 1457 #ifndef WL_WSEC_DP 1458 #define WL_WSEC_DP(args) WL_WSEC(args) 1459 #endif 1460 1461 #ifdef EVENT_LOG_COMPILE 1462 #ifdef USE_EVENT_LOG_RA 1463 #define WL_EVT_NOTIF_INFO(args) EVENT_LOG_RA(EVENT_LOG_TAG_EVT_NOTIF_INFO, args) 1464 #else 1465 #define WL_EVT_NOTIF_INFO(args) \ 1466 EVENT_LOG_COMPACT_CAST_PAREN_ARGS(EVENT_LOG_TAG_EVT_NOTIF_INFO, args) 1467 #endif /* USE_EVENT_LOG_RA */ 1468 #else 1469 #define WL_EVT_NOTIF_INFO(args) WL_PRINT(args) 1470 #endif /* EVENT_LOG_COMPILE */ 1471 1472 #ifdef BCMDBG_ERR 1473 #if defined(EVENT_LOG_COMPILE) 1474 #if defined(USE_EVENT_LOG_RA) 1475 #define WL_PKTFLTR_CNT(args) EVENT_LOG_RA(EVENT_LOG_TAG_WL_PS_LOG, args) 1476 #else 1477 #define WL_PKTFLTR_CNT(args) EVENT_LOG_FAST_CAST_PAREN_ARGS(EVENT_LOG_TAG_WL_PS_LOG, args) 1478 #endif /* USE_EVENT_LOG_RA */ 1479 #else 1480 #define WL_PKTFLTR_CNT(args) WL_PRINT(args) 1481 #endif /* EVENT_LOG_COMPILE */ 1482 #else 1483 #define WL_PKTFLTR_CNT(args) 1484 #endif /* BCMDBG_ERR */ 1485 #ifdef EVENT_LOG_COMPILE 1486 1487 #ifdef USE_EVENT_LOG_RA 1488 #define WL_TDLS_INFO(args) EVENT_LOG_RA(EVENT_LOG_TAG_WL_TDLS_INFO, args) 1489 #else 1490 #define WL_TDLS_INFO(args) EVENT_LOG_COMPACT_CAST_PAREN_ARGS(EVENT_LOG_TAG_WL_TDLS_INFO, args) 1491 #endif /* USE_EVENT_LOG_RA */ 1492 #else 1493 #define WL_TDLS_INFO(args) WL_PRINT(args) 1494 #endif /* EVENT_LOG_COMPILE */ 1495 1496 #ifndef WL_OCE_INFO 1497 #define WL_OCE_INFO(args) 1498 #endif 1499 1500 #ifndef WL_OCE_ERR 1501 #define WL_OCE_ERR(args) 1502 #endif 1503 1504 #ifndef WL_MBO_INFO 1505 #define WL_MBO_INFO(args) 1506 #endif 1507 1508 #ifndef WL_FILS_ERR 1509 #define WL_FILS_ERR(args) 1510 #endif 1511 1512 #ifndef WL_FILS_DBG 1513 #define WL_FILS_DBG(args) 1514 #endif 1515 1516 #ifndef WL_FILS_INFO 1517 #define WL_FILS_INFO(args) 1518 #endif 1519 1520 /* =============================================================== 1521 * ====define BCMDBG_RATESET/WL_RATESET_ON()/WL_RATESET_PRT(x)==== 1522 * =============================================================== 1523 */ 1524 /* 1. #define BCMDBG_RATESET explicitly turns on WL_RATESET_ON() */ 1525 #ifdef BCMDBG_RATESET 1526 #define WL_RATESET_ON() 1 1527 #define WL_RATESET_PRT(x) WL_PRINT(x) 1528 #endif 1529 /* 2. #define BCMDBG implicitly turns on BCMDBG_RATESET but not WL_RATESET_ON() */ 1530 #ifdef BCMDBG 1531 #ifndef BCMDBG_RATESET 1532 #define BCMDBG_RATESET 1533 #endif 1534 #endif /* BCMDBG */ 1535 /* 3. default WL_RATESET_ON() is 0 */ 1536 #ifndef WL_RATESET_ON 1537 #define WL_RATESET_ON() 0 1538 #endif 1539 /* 4. default WL_RATESET_PRT(x) is WL_RATE(x) */ 1540 #ifndef WL_RATESET_PRT 1541 #define WL_RATESET_PRT(x) WL_RATE(x) 1542 #endif 1543 1544 #endif /* _wl_dbg_h_ */ 1545