Commit b353dda4 authored by Seth Forshee's avatar Seth Forshee Committed by John W. Linville

brcmsmac: Use debug macros for general error and debug statements

Convert most uses of wiphy_* and pr_* for general error and debug
messages to use the internal debug macros instead. Most code used only
for initialization still use wiphy_err(), as well as some locations
which are executed too early to use the debug macros. Some debug
messages which are redundant or not useful are removed.
Acked-by: default avatarArend van Spriel <arend@broadcom.com>
Signed-off-by: default avatarSeth Forshee <seth.forshee@canonical.com>
Tested-by: default avatarDaniel Wagner <wagi@monom.org>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 269de12b
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include "antsel.h" #include "antsel.h"
#include "main.h" #include "main.h"
#include "ampdu.h" #include "ampdu.h"
#include "debug.h"
/* max number of mpdus in an ampdu */ /* max number of mpdus in an ampdu */
#define AMPDU_MAX_MPDU 32 #define AMPDU_MAX_MPDU 32
...@@ -179,18 +180,19 @@ static bool brcms_c_ampdu_cap(struct ampdu_info *ampdu) ...@@ -179,18 +180,19 @@ static bool brcms_c_ampdu_cap(struct ampdu_info *ampdu)
static int brcms_c_ampdu_set(struct ampdu_info *ampdu, bool on) static int brcms_c_ampdu_set(struct ampdu_info *ampdu, bool on)
{ {
struct brcms_c_info *wlc = ampdu->wlc; struct brcms_c_info *wlc = ampdu->wlc;
struct bcma_device *core = wlc->hw->d11core;
wlc->pub->_ampdu = false; wlc->pub->_ampdu = false;
if (on) { if (on) {
if (!(wlc->pub->_n_enab & SUPPORT_11N)) { if (!(wlc->pub->_n_enab & SUPPORT_11N)) {
wiphy_err(ampdu->wlc->wiphy, "wl%d: driver not " brcms_err(core, "wl%d: driver not nmode enabled\n",
"nmode enabled\n", wlc->pub->unit); wlc->pub->unit);
return -ENOTSUPP; return -ENOTSUPP;
} }
if (!brcms_c_ampdu_cap(ampdu)) { if (!brcms_c_ampdu_cap(ampdu)) {
wiphy_err(ampdu->wlc->wiphy, "wl%d: device not " brcms_err(core, "wl%d: device not ampdu capable\n",
"ampdu capable\n", wlc->pub->unit); wlc->pub->unit);
return -ENOTSUPP; return -ENOTSUPP;
} }
wlc->pub->_ampdu = on; wlc->pub->_ampdu = on;
...@@ -481,7 +483,7 @@ brcms_c_ampdu_tx_operational(struct brcms_c_info *wlc, u8 tid, ...@@ -481,7 +483,7 @@ brcms_c_ampdu_tx_operational(struct brcms_c_info *wlc, u8 tid,
scb_ampdu = &scb->scb_ampdu; scb_ampdu = &scb->scb_ampdu;
if (!ampdu->ini_enable[tid]) { if (!ampdu->ini_enable[tid]) {
wiphy_err(ampdu->wlc->wiphy, "%s: Rejecting tid %d\n", brcms_err(wlc->hw->d11core, "%s: Rejecting tid %d\n",
__func__, tid); __func__, tid);
return; return;
} }
...@@ -896,13 +898,14 @@ brcms_c_ampdu_dotxstatus_complete(struct ampdu_info *ampdu, struct scb *scb, ...@@ -896,13 +898,14 @@ brcms_c_ampdu_dotxstatus_complete(struct ampdu_info *ampdu, struct scb *scb,
if (supr_status) { if (supr_status) {
update_rate = false; update_rate = false;
if (supr_status == TX_STATUS_SUPR_BADCH) { if (supr_status == TX_STATUS_SUPR_BADCH) {
wiphy_err(wiphy, brcms_err(wlc->hw->d11core,
"%s: Pkt tx suppressed, illegal channel possibly %d\n", "%s: Pkt tx suppressed, illegal channel possibly %d\n",
__func__, CHSPEC_CHANNEL( __func__, CHSPEC_CHANNEL(
wlc->default_bss->chanspec)); wlc->default_bss->chanspec));
} else { } else {
if (supr_status != TX_STATUS_SUPR_FRAG) if (supr_status != TX_STATUS_SUPR_FRAG)
wiphy_err(wiphy, "%s: supr_status 0x%x\n", brcms_err(wlc->hw->d11core,
"%s: supr_status 0x%x\n",
__func__, supr_status); __func__, supr_status);
} }
/* no need to retry for badch; will fail again */ /* no need to retry for badch; will fail again */
...@@ -923,7 +926,8 @@ brcms_c_ampdu_dotxstatus_complete(struct ampdu_info *ampdu, struct scb *scb, ...@@ -923,7 +926,8 @@ brcms_c_ampdu_dotxstatus_complete(struct ampdu_info *ampdu, struct scb *scb,
} }
} else if (txs->phyerr) { } else if (txs->phyerr) {
update_rate = false; update_rate = false;
wiphy_err(wiphy, "%s: ampdu tx phy error (0x%x)\n", brcms_err(wlc->hw->d11core,
"%s: ampdu tx phy error (0x%x)\n",
__func__, txs->phyerr); __func__, txs->phyerr);
if (brcm_msg_level & BRCM_DL_INFO) { if (brcm_msg_level & BRCM_DL_INFO) {
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include "main.h" #include "main.h"
#include "phy_shim.h" #include "phy_shim.h"
#include "antsel.h" #include "antsel.h"
#include "debug.h"
#define ANT_SELCFG_AUTO 0x80 /* bit indicates antenna sel AUTO */ #define ANT_SELCFG_AUTO 0x80 /* bit indicates antenna sel AUTO */
#define ANT_SELCFG_MASK 0x33 /* antenna configuration mask */ #define ANT_SELCFG_MASK 0x33 /* antenna configuration mask */
...@@ -137,7 +138,8 @@ struct antsel_info *brcms_c_antsel_attach(struct brcms_c_info *wlc) ...@@ -137,7 +138,8 @@ struct antsel_info *brcms_c_antsel_attach(struct brcms_c_info *wlc)
asi->antsel_avail = false; asi->antsel_avail = false;
} else { } else {
asi->antsel_avail = false; asi->antsel_avail = false;
wiphy_err(wlc->wiphy, "antsel_attach: 2o3 " brcms_err(wlc->hw->d11core,
"antsel_attach: 2o3 "
"board cfg invalid\n"); "board cfg invalid\n");
} }
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include "stf.h" #include "stf.h"
#include "channel.h" #include "channel.h"
#include "mac80211_if.h" #include "mac80211_if.h"
#include "debug.h"
/* QDB() macro takes a dB value and converts to a quarter dB value */ /* QDB() macro takes a dB value and converts to a quarter dB value */
#define QDB(n) ((n) * BRCMS_TXPWR_DB_FACTOR) #define QDB(n) ((n) * BRCMS_TXPWR_DB_FACTOR)
...@@ -336,8 +337,6 @@ struct brcms_cm_info *brcms_c_channel_mgr_attach(struct brcms_c_info *wlc) ...@@ -336,8 +337,6 @@ struct brcms_cm_info *brcms_c_channel_mgr_attach(struct brcms_c_info *wlc)
const char *ccode = sprom->alpha2; const char *ccode = sprom->alpha2;
int ccode_len = sizeof(sprom->alpha2); int ccode_len = sizeof(sprom->alpha2);
BCMMSG(wlc->wiphy, "wl%d\n", wlc->pub->unit);
wlc_cm = kzalloc(sizeof(struct brcms_cm_info), GFP_ATOMIC); wlc_cm = kzalloc(sizeof(struct brcms_cm_info), GFP_ATOMIC);
if (wlc_cm == NULL) if (wlc_cm == NULL)
return NULL; return NULL;
...@@ -615,7 +614,7 @@ brcms_c_valid_chanspec_ext(struct brcms_cm_info *wlc_cm, u16 chspec) ...@@ -615,7 +614,7 @@ brcms_c_valid_chanspec_ext(struct brcms_cm_info *wlc_cm, u16 chspec)
/* check the chanspec */ /* check the chanspec */
if (brcms_c_chspec_malformed(chspec)) { if (brcms_c_chspec_malformed(chspec)) {
wiphy_err(wlc->wiphy, "wl%d: malformed chanspec 0x%x\n", brcms_err(wlc->hw->d11core, "wl%d: malformed chanspec 0x%x\n",
wlc->pub->unit, chspec); wlc->pub->unit, chspec);
return false; return false;
} }
...@@ -738,7 +737,8 @@ static int brcms_reg_notifier(struct wiphy *wiphy, ...@@ -738,7 +737,8 @@ static int brcms_reg_notifier(struct wiphy *wiphy,
mboolclr(wlc->pub->radio_disabled, WL_RADIO_COUNTRY_DISABLE); mboolclr(wlc->pub->radio_disabled, WL_RADIO_COUNTRY_DISABLE);
} else { } else {
mboolset(wlc->pub->radio_disabled, WL_RADIO_COUNTRY_DISABLE); mboolset(wlc->pub->radio_disabled, WL_RADIO_COUNTRY_DISABLE);
wiphy_err(wlc->wiphy, "wl%d: %s: no valid channel for \"%s\"\n", brcms_err(wlc->hw->d11core,
"wl%d: %s: no valid channel for \"%s\"\n",
wlc->pub->unit, __func__, request->alpha2); wlc->pub->unit, __func__, request->alpha2);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment