@@ -926,7 +926,7 @@ brcms_c_ampdu_dotxstatus_complete(struct ampdu_info *ampdu, struct scb *scb,
wiphy_err(wiphy, "%s: ampdu tx phy error (0x%x)\n",
__func__, txs->phyerr);
- if (brcm_msg_level & LOG_ERROR_VAL) {
+ if (brcm_have_debug_level(LOG_ERROR_VAL)) {
brcmu_prpkt("txpkt (AMPDU)", p);
brcms_c_print_txdesc((struct d11txh *) p->data);
}
@@ -908,7 +908,7 @@ brcms_c_dotxstatus(struct brcms_c_info *wlc, struct tx_status *txs)
mcl = le16_to_cpu(txh->MacTxControlLow);
if (txs->phyerr) {
- if (brcm_msg_level & LOG_ERROR_VAL) {
+ if (brcm_have_debug_level(LOG_ERROR_VAL)) {
wiphy_err(wlc->wiphy, "phyerr 0x%x, rate 0x%x\n",
txs->phyerr, txh->MainRates);
brcms_c_print_txdesc(txh);
@@ -244,9 +244,11 @@
* ********************************************************************
*/
+#define brcm_have_debug_level(l) (brcm_msg_level & (l))
+
#define BCMMSG(dev, fmt, args...) \
do { \
- if (brcm_msg_level & LOG_TRACE_VAL) \
+ if (brcm_have_debug_level(LOG_TRACE_VAL)) \
wiphy_err(dev, "%s: " fmt, __func__, ##args); \
} while (0)
@@ -79,8 +79,8 @@
#define PM_MAX 1
/* Message levels */
-#define LOG_ERROR_VAL 0x00000001
-#define LOG_TRACE_VAL 0x00000002
+#define LOG_ERROR_VAL 0x00000001
+#define LOG_TRACE_VAL 0x00000002
#define PM_OFF 0
#define PM_MAX 1
Signed-off-by: Seth Forshee <seth.forshee@canonical.com> --- drivers/net/wireless/brcm80211/brcmsmac/ampdu.c | 2 +- drivers/net/wireless/brcm80211/brcmsmac/main.c | 2 +- drivers/net/wireless/brcm80211/brcmsmac/types.h | 4 +++- drivers/net/wireless/brcm80211/include/defs.h | 4 ++-- 4 files changed, 7 insertions(+), 5 deletions(-)