提交 f4528696 编写于 作者: J Joe Perches 提交者: Greg Kroah-Hartman

staging: brcm80211: Fix WL_<type> logging macros

These macros use the equivalent of "#define WL_<type>(x) printk x"
which requires an extra level of parentheses.

Convert the macros to use the normal WL_<type>(fmt, args...) style
and remove the extra parentheses from the uses.

Add format argument verification using no_printk as appropriate.
Couple of spelling typo fixes in the formats and argument alignment
at the same time. Also coalesced long formats.
Signed-off-by: NJoe Perches <joe@perches.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 12b9d5bf
......@@ -24,8 +24,8 @@
#include <wlioctl.h>
#include <wl_iw.h>
#define WL_ERROR(x) printf x
#define WL_TRACE(x)
#define WL_ERROR(fmt, args...) printk(fmt, ##args)
#define WL_TRACE(fmt, args...) no_printk(fmt, ##args)
#ifdef CUSTOMER_HW
extern void bcm_wlan_power_off(int);
......@@ -67,13 +67,13 @@ int dhd_customer_oob_irq_map(unsigned long *irq_flags_ptr)
#endif
if (dhd_oob_gpio_num < 0) {
WL_ERROR(("%s: ERROR customer specific Host GPIO is NOT defined\n",
__func__));
WL_ERROR("%s: ERROR customer specific Host GPIO is NOT defined\n",
__func__);
return dhd_oob_gpio_num;
}
WL_ERROR(("%s: customer specific Host GPIO number is (%d)\n",
__func__, dhd_oob_gpio_num));
WL_ERROR("%s: customer specific Host GPIO number is (%d)\n",
__func__, dhd_oob_gpio_num);
#if defined CUSTOMER_HW
host_oob_irq = MSM_GPIO_TO_INT(dhd_oob_gpio_num);
......@@ -93,40 +93,40 @@ void dhd_customer_gpio_wlan_ctrl(int onoff)
{
switch (onoff) {
case WLAN_RESET_OFF:
WL_TRACE(("%s: call customer specific GPIO to insert WLAN RESET\n",
__func__));
WL_TRACE("%s: call customer specific GPIO to insert WLAN RESET\n",
__func__);
#ifdef CUSTOMER_HW
bcm_wlan_power_off(2);
#endif /* CUSTOMER_HW */
#ifdef CUSTOMER_HW2
wifi_set_power(0, 0);
#endif
WL_ERROR(("=========== WLAN placed in RESET ========\n"));
WL_ERROR("=========== WLAN placed in RESET ========\n");
break;
case WLAN_RESET_ON:
WL_TRACE(("%s: callc customer specific GPIO to remove WLAN RESET\n",
__func__));
WL_TRACE("%s: callc customer specific GPIO to remove WLAN RESET\n",
__func__);
#ifdef CUSTOMER_HW
bcm_wlan_power_on(2);
#endif /* CUSTOMER_HW */
#ifdef CUSTOMER_HW2
wifi_set_power(1, 0);
#endif
WL_ERROR(("=========== WLAN going back to live ========\n"));
WL_ERROR("=========== WLAN going back to live ========\n");
break;
case WLAN_POWER_OFF:
WL_TRACE(("%s: call customer specific GPIO to turn off WL_REG_ON\n",
__func__));
WL_TRACE("%s: call customer specific GPIO to turn off WL_REG_ON\n",
__func__);
#ifdef CUSTOMER_HW
bcm_wlan_power_off(1);
#endif /* CUSTOMER_HW */
break;
case WLAN_POWER_ON:
WL_TRACE(("%s: call customer specific GPIO to turn on WL_REG_ON\n",
__func__));
WL_TRACE("%s: call customer specific GPIO to turn on WL_REG_ON\n",
__func__);
#ifdef CUSTOMER_HW
bcm_wlan_power_on(1);
#endif /* CUSTOMER_HW */
......@@ -140,7 +140,7 @@ void dhd_customer_gpio_wlan_ctrl(int onoff)
/* Function to get custom MAC address */
int dhd_custom_get_mac_address(unsigned char *buf)
{
WL_TRACE(("%s Enter\n", __func__));
WL_TRACE("%s Enter\n", __func__);
if (!buf)
return -EINVAL;
......
......@@ -54,34 +54,36 @@ struct wl_ibss;
#define WL_DBG_LEVEL 1 /* 0 invalidates all debug messages.
default is 1 */
#define WL_ERR(args) \
do { \
if (wl_dbg_level & WL_DBG_ERR) { \
if (net_ratelimit()) { \
printk(KERN_ERR "ERROR @%s : ", __func__); \
printk args; \
} \
} \
#define WL_ERR(fmt, args...) \
do { \
if (wl_dbg_level & WL_DBG_ERR) { \
if (net_ratelimit()) { \
printk(KERN_ERR "ERROR @%s : " fmt, \
__func__, ##args); \
} \
} \
} while (0)
#define WL_INFO(args) \
do { \
if (wl_dbg_level & WL_DBG_INFO) { \
if (net_ratelimit()) { \
printk(KERN_ERR "INFO @%s : ", __func__); \
printk args; \
} \
} \
#define WL_INFO(fmt, args...) \
do { \
if (wl_dbg_level & WL_DBG_INFO) { \
if (net_ratelimit()) { \
printk(KERN_ERR "INFO @%s : " fmt, \
__func__, ##args); \
} \
} \
} while (0)
#if (WL_DBG_LEVEL > 0)
#define WL_DBG(args) \
do { \
#define WL_DBG(fmt, args...) \
do { \
if (wl_dbg_level & WL_DBG_DBG) { \
printk(KERN_ERR "DEBUG @%s :", __func__); \
printk args; \
} \
printk(KERN_ERR "DEBUG @%s :" fmt, \
__func__, ##args); \
} \
} while (0)
#else /* !(WL_DBG_LEVEL > 0) */
#define WL_DBG(args)
#define WL_DBG(fmt, args...) noprintk(fmt, ##args)
#endif /* (WL_DBG_LEVEL > 0) */
#define WL_SCAN_RETRY_MAX 3 /* used for ibss scan */
......
......@@ -78,7 +78,7 @@ typedef struct wl_iw_extra_params {
#define CHECK_EXTRA_FOR_NULL(extra) \
if (!extra) { \
WL_ERROR(("%s: error : extra is null pointer\n", __func__)); \
WL_ERROR("%s: error : extra is null pointer\n", __func__); \
return -EINVAL; \
}
......
......@@ -20,15 +20,20 @@
/* wl_msg_level is a bit vector with defs in wlioctl.h */
extern u32 wl_msg_level;
#define WL_PRINT(args) printf args
#define WL_NONE(args)
#define WL_NONE(fmt, args...) no_printk(fmt, ##args)
#define WL_PRINT(level, fmt, args...) \
do { \
if (wl_msg_level & level) \
printk(fmt, ##args); \
} while (0)
#ifdef BCMDBG
#define WL_ERROR(args) do {if ((wl_msg_level & WL_ERROR_VAL)) WL_PRINT(args); } while (0)
#define WL_TRACE(args) do {if (wl_msg_level & WL_TRACE_VAL) WL_PRINT(args); } while (0)
#define WL_AMPDU(args) do {if (wl_msg_level & WL_AMPDU_VAL) WL_PRINT(args); } while (0)
#define WL_FFPLD(args) do {if (wl_msg_level & WL_FFPLD_VAL) WL_PRINT(args); } while (0)
#define WL_ERROR(fmt, args...) WL_PRINT(WL_ERROR_VAL, fmt, ##args)
#define WL_TRACE(fmt, args...) WL_PRINT(WL_TRACE_VAL, fmt, ##args)
#define WL_AMPDU(fmt, args...) WL_PRINT(WL_AMPDU_VAL, fmt, ##args)
#define WL_FFPLD(fmt, args...) WL_PRINT(WL_FFPLD_VAL, fmt, ##args)
#define WL_ERROR_ON() (wl_msg_level & WL_ERROR_VAL)
......@@ -44,35 +49,50 @@ extern u32 wl_msg_level;
extern u32 wl_ampdu_dbg;
#define WL_AMPDU_UPDN(args) do {if (wl_ampdu_dbg & WL_AMPDU_UPDN_VAL) {WL_AMPDU(args); } } while (0)
#define WL_AMPDU_RX(args) do {if (wl_ampdu_dbg & WL_AMPDU_RX_VAL) {WL_AMPDU(args); } } while (0)
#define WL_AMPDU_ERR(args) do {if (wl_ampdu_dbg & WL_AMPDU_ERR_VAL) {WL_AMPDU(args); } } while (0)
#define WL_AMPDU_TX(args) do {if (wl_ampdu_dbg & WL_AMPDU_TX_VAL) {WL_AMPDU(args); } } while (0)
#define WL_AMPDU_CTL(args) do {if (wl_ampdu_dbg & WL_AMPDU_CTL_VAL) {WL_AMPDU(args); } } while (0)
#define WL_AMPDU_HW(args) do {if (wl_ampdu_dbg & WL_AMPDU_HW_VAL) {WL_AMPDU(args); } } while (0)
#define WL_AMPDU_HWTXS(args) do {if (wl_ampdu_dbg & WL_AMPDU_HWTXS_VAL) {WL_AMPDU(args); } } while (0)
#define WL_AMPDU_HWDBG(args) do {if (wl_ampdu_dbg & WL_AMPDU_HWDBG_VAL) {WL_AMPDU(args); } } while (0)
#define WL_AMPDU_PRINT(level, fmt, args...) \
do { \
if (wl_ampdu_dbg & level) { \
WL_AMPDU(fmt, ##args); \
} \
} while (0)
#define WL_AMPDU_UPDN(fmt, args...) \
WL_AMPDU_PRINT(WL_AMPDU_UPDN_VAL, fmt, ##args)
#define WL_AMPDU_RX(fmt, args...) \
WL_AMPDU_PRINT(WL_AMPDU_RX_VAL, fmt, ##args)
#define WL_AMPDU_ERR(fmt, args...) \
WL_AMPDU_PRINT(WL_AMPDU_ERR_VAL, fmt, ##args)
#define WL_AMPDU_TX(fmt, args...) \
WL_AMPDU_PRINT(WL_AMPDU_TX_VAL, fmt, ##args)
#define WL_AMPDU_CTL(fmt, args...) \
WL_AMPDU_PRINT(WL_AMPDU_CTL_VAL, fmt, ##args)
#define WL_AMPDU_HW(fmt, args...) \
WL_AMPDU_PRINT(WL_AMPDU_HW_VAL, fmt, ##args)
#define WL_AMPDU_HWTXS(fmt, args...) \
WL_AMPDU_PRINT(WL_AMPDU_HWTXS_VAL, fmt, ##args)
#define WL_AMPDU_HWDBG(fmt, args...) \
WL_AMPDU_PRINT(WL_AMPDU_HWDBG_VAL, fmt, ##args)
#define WL_AMPDU_ERR_ON() (wl_ampdu_dbg & WL_AMPDU_ERR_VAL)
#define WL_AMPDU_HW_ON() (wl_ampdu_dbg & WL_AMPDU_HW_VAL)
#define WL_AMPDU_HWTXS_ON() (wl_ampdu_dbg & WL_AMPDU_HWTXS_VAL)
#else /* BCMDBG */
#define WL_ERROR(args)
#define WL_TRACE(args)
#define WL_AMPDU(args)
#define WL_FFPLD(args)
#define WL_ERROR(fmt, args...) no_printk(fmt, ##args)
#define WL_TRACE(fmt, args...) no_printk(fmt, ##args)
#define WL_AMPDU(fmt, args...) no_printk(fmt, ##args)
#define WL_FFPLD(fmt, args...) no_printk(fmt, ##args)
#define WL_ERROR_ON() 0
#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_UPDN(fmt, args...) no_printk(fmt, ##args)
#define WL_AMPDU_RX(fmt, args...) no_printk(fmt, ##args)
#define WL_AMPDU_ERR(fmt, args...) no_printk(fmt, ##args)
#define WL_AMPDU_TX(fmt, args...) no_printk(fmt, ##args)
#define WL_AMPDU_CTL(fmt, args...) no_printk(fmt, ##args)
#define WL_AMPDU_HW(fmt, args...) no_printk(fmt, ##args)
#define WL_AMPDU_HWTXS(fmt, args...) no_printk(fmt, ##args)
#define WL_AMPDU_HWDBG(fmt, args...) no_printk(fmt, ##args)
#define WL_AMPDU_ERR_ON() 0
#define WL_AMPDU_HW_ON() 0
#define WL_AMPDU_HWTXS_ON() 0
......
......@@ -43,7 +43,7 @@ void *wlc_calloc(struct osl_info *osh, uint unit, uint size)
item = kzalloc(size, GFP_ATOMIC);
if (item == NULL)
WL_ERROR(("wl%d: %s: out of memory\n", unit, __func__));
WL_ERROR("wl%d: %s: out of memory\n", unit, __func__);
return item;
}
......
......@@ -174,7 +174,8 @@ struct ampdu_info *wlc_ampdu_attach(struct wlc_info *wlc)
ampdu = kzalloc(sizeof(struct ampdu_info), GFP_ATOMIC);
if (!ampdu) {
WL_ERROR(("wl%d: wlc_ampdu_attach: out of mem\n", wlc->pub->unit));
WL_ERROR("wl%d: wlc_ampdu_attach: out of mem\n",
wlc->pub->unit);
return NULL;
}
ampdu->wlc = wlc;
......@@ -244,7 +245,7 @@ void scb_ampdu_cleanup(struct ampdu_info *ampdu, struct scb *scb)
scb_ampdu_t *scb_ampdu = SCB_AMPDU_CUBBY(ampdu, scb);
u8 tid;
WL_AMPDU_UPDN(("scb_ampdu_cleanup: enter\n"));
WL_AMPDU_UPDN("scb_ampdu_cleanup: enter\n");
ASSERT(scb_ampdu);
for (tid = 0; tid < AMPDU_MAX_SCB_TID; tid++) {
......@@ -257,7 +258,7 @@ void scb_ampdu_cleanup(struct ampdu_info *ampdu, struct scb *scb)
*/
void wlc_ampdu_reset(struct ampdu_info *ampdu)
{
WL_NONE(("%s: Entering\n", __func__));
WL_NONE("%s: Entering\n", __func__);
}
static void scb_ampdu_update_config(struct ampdu_info *ampdu, struct scb *scb)
......@@ -338,7 +339,7 @@ static int wlc_ffpld_check_txfunfl(struct wlc_info *wlc, int fid)
M_UCODE_MACSTAT + offsetof(macstat_t, txfunfl[fid]));
new_txunfl = (u16) (cur_txunfl - fifo->prev_txfunfl);
if (new_txunfl == 0) {
WL_FFPLD(("check_txunfl : TX status FRAG set but no tx underflows\n"));
WL_FFPLD("check_txunfl : TX status FRAG set but no tx underflows\n");
return -1;
}
fifo->prev_txfunfl = cur_txunfl;
......@@ -348,7 +349,7 @@ static int wlc_ffpld_check_txfunfl(struct wlc_info *wlc, int fid)
/* check if fifo is big enough */
if (wlc_xmtfifo_sz_get(wlc, fid, &xmtfifo_sz)) {
WL_FFPLD(("check_txunfl : get xmtfifo_sz failed.\n"));
WL_FFPLD("check_txunfl : get xmtfifo_sz failed\n");
return -1;
}
......@@ -362,8 +363,8 @@ static int wlc_ffpld_check_txfunfl(struct wlc_info *wlc, int fid)
if (fifo->accum_txfunfl < 10)
return 0;
WL_FFPLD(("ampdu_count %d tx_underflows %d\n",
current_ampdu_cnt, fifo->accum_txfunfl));
WL_FFPLD("ampdu_count %d tx_underflows %d\n",
current_ampdu_cnt, fifo->accum_txfunfl);
/*
compute the current ratio of tx unfl per ampdu.
......@@ -416,8 +417,8 @@ static int wlc_ffpld_check_txfunfl(struct wlc_info *wlc, int fid)
(max_mpdu * FFPLD_MPDU_SIZE - fifo->ampdu_pld_size))
/ (max_mpdu * FFPLD_MPDU_SIZE)) * 100;
WL_FFPLD(("DMA estimated transfer rate %d; pre-load size %d\n",
fifo->dmaxferrate, fifo->ampdu_pld_size));
WL_FFPLD("DMA estimated transfer rate %d; pre-load size %d\n",
fifo->dmaxferrate, fifo->ampdu_pld_size);
} else {
/* decrease ampdu size */
......@@ -552,7 +553,7 @@ wlc_sendampdu(struct ampdu_info *ampdu, wlc_txq_info_t *qi,
wlc_ampdu_agg(ampdu, scb, p, tid);
if (wlc->block_datafifo) {
WL_ERROR(("%s: Fifo blocked\n", __func__));
WL_ERROR("%s: Fifo blocked\n", __func__);
return BCME_BUSY;
}
rr_retry_limit = ampdu->rr_retry_limit_tid[tid];
......@@ -567,7 +568,7 @@ wlc_sendampdu(struct ampdu_info *ampdu, wlc_txq_info_t *qi,
if (tx_info->flags & IEEE80211_TX_CTL_AMPDU) {
err = wlc_prep_pdu(wlc, p, &fifo);
} else {
WL_ERROR(("%s: AMPDU flag is off!\n", __func__));
WL_ERROR("%s: AMPDU flag is off!\n", __func__);
*pdu = NULL;
err = 0;
break;
......@@ -575,14 +576,16 @@ wlc_sendampdu(struct ampdu_info *ampdu, wlc_txq_info_t *qi,
if (err) {
if (err == BCME_BUSY) {
WL_ERROR(("wl%d: wlc_sendampdu: prep_xdu retry; seq 0x%x\n", wlc->pub->unit, seq));
WL_ERROR("wl%d: wlc_sendampdu: prep_xdu retry; seq 0x%x\n",
wlc->pub->unit, seq);
WLCNTINCR(ampdu->cnt->sduretry);
*pdu = p;
break;
}
/* error in the packet; reject it */
WL_AMPDU_ERR(("wl%d: wlc_sendampdu: prep_xdu rejected; seq 0x%x\n", wlc->pub->unit, seq));
WL_AMPDU_ERR("wl%d: wlc_sendampdu: prep_xdu rejected; seq 0x%x\n",
wlc->pub->unit, seq);
WLCNTINCR(ampdu->cnt->sdurejected);
*pdu = NULL;
......@@ -624,8 +627,8 @@ wlc_sendampdu(struct ampdu_info *ampdu, wlc_txq_info_t *qi,
ndelim = txh->RTSPLCPFallback[AMPDU_FBR_NULL_DELIM];
seg_cnt += 1;
WL_AMPDU_TX(("wl%d: wlc_sendampdu: mpdu %d plcp_len %d\n",
wlc->pub->unit, count, len));
WL_AMPDU_TX("wl%d: wlc_sendampdu: mpdu %d plcp_len %d\n",
wlc->pub->unit, count, len);
/*
* aggregateable mpdu. For ucode/hw agg,
......@@ -656,7 +659,8 @@ wlc_sendampdu(struct ampdu_info *ampdu, wlc_txq_info_t *qi,
dma_len += (u16) pkttotlen(osh, p);
WL_AMPDU_TX(("wl%d: wlc_sendampdu: ampdu_len %d seg_cnt %d null delim %d\n", wlc->pub->unit, ampdu_len, seg_cnt, ndelim));
WL_AMPDU_TX("wl%d: wlc_sendampdu: ampdu_len %d seg_cnt %d null delim %d\n",
wlc->pub->unit, ampdu_len, seg_cnt, ndelim);
txh->MacTxControlLow = htol16(mcl);
......@@ -686,8 +690,8 @@ wlc_sendampdu(struct ampdu_info *ampdu, wlc_txq_info_t *qi,
min(scb_ampdu->max_rxlen,
ampdu->max_txlen[mcs][is40][sgi]);
WL_NONE(("sendampdu: sgi %d, is40 %d, mcs %d\n", sgi,
is40, mcs));
WL_NONE("sendampdu: sgi %d, is40 %d, mcs %d\n",
sgi, is40, mcs);
maxlen = 64 * 1024; /* XXX Fix me to honor real max_rxlen */
......@@ -730,13 +734,14 @@ wlc_sendampdu(struct ampdu_info *ampdu, wlc_txq_info_t *qi,
/* test whether to add more */
if ((MCS_RATE(mcs, true, false) >= f->dmaxferrate) &&
(count == f->mcs2ampdu_table[mcs])) {
WL_AMPDU_ERR(("wl%d: PR 37644: stopping ampdu at %d for mcs %d", wlc->pub->unit, count, mcs));
WL_AMPDU_ERR("wl%d: PR 37644: stopping ampdu at %d for mcs %d\n",
wlc->pub->unit, count, mcs);
break;
}
if (count == scb_ampdu->max_pdu) {
WL_NONE(("Stop taking from q, reached %d deep\n",
scb_ampdu->max_pdu));
WL_NONE("Stop taking from q, reached %d deep\n",
scb_ampdu->max_pdu);
break;
}
......@@ -754,15 +759,16 @@ wlc_sendampdu(struct ampdu_info *ampdu, wlc_txq_info_t *qi,
if ((plen + ampdu_len) > maxlen) {
p = NULL;
WL_ERROR(("%s: Bogus plen #1\n",
__func__));
WL_ERROR("%s: Bogus plen #1\n",
__func__);
ASSERT(3 == 4);
continue;
}
/* check if there are enough descriptors available */
if (TXAVAIL(wlc, fifo) <= (seg_cnt + 1)) {
WL_ERROR(("%s: No fifo space !!!!!!\n", __func__));
WL_ERROR("%s: No fifo space !!!!!!\n",
__func__);
p = NULL;
continue;
}
......@@ -869,13 +875,14 @@ wlc_sendampdu(struct ampdu_info *ampdu, wlc_txq_info_t *qi,
WLC_SET_MIMO_PLCP_AMPDU(txh->FragPLCPFallback);
}
WL_AMPDU_TX(("wl%d: wlc_sendampdu: count %d ampdu_len %d\n",
wlc->pub->unit, count, ampdu_len));
WL_AMPDU_TX("wl%d: wlc_sendampdu: count %d ampdu_len %d\n",
wlc->pub->unit, count, ampdu_len);
/* inform rate_sel if it this is a rate probe pkt */
frameid = ltoh16(txh->TxFrameID);
if (frameid & TXFID_RATE_PROBE_MASK) {
WL_ERROR(("%s: XXX what to do with TXFID_RATE_PROBE_MASK!?\n", __func__));
WL_ERROR("%s: XXX what to do with TXFID_RATE_PROBE_MASK!?\n",
__func__);
}
for (i = 0; i < count; i++)
wlc_txfifo(wlc, fifo, pkt[i], i == (count - 1),
......@@ -1029,13 +1036,16 @@ wlc_ampdu_dotxstatus_complete(struct ampdu_info *ampdu, struct scb *scb,
if (supr_status) {
update_rate = false;
if (supr_status == TX_STATUS_SUPR_BADCH) {
WL_ERROR(("%s: Pkt tx suppressed, illegal channel possibly %d\n", __func__, CHSPEC_CHANNEL(wlc->default_bss->chanspec)));
WL_ERROR("%s: Pkt tx suppressed, illegal channel possibly %d\n",
__func__,
CHSPEC_CHANNEL(wlc->default_bss->chanspec));
} else {
if (supr_status == TX_STATUS_SUPR_FRAG)
WL_NONE(("%s: AMPDU frag err\n",
__func__));
WL_NONE("%s: AMPDU frag err\n",
__func__);
else
WL_ERROR(("%s: wlc_ampdu_dotxstatus: supr_status 0x%x\n", __func__, supr_status));
WL_ERROR("%s: wlc_ampdu_dotxstatus: supr_status 0x%x\n",
__func__, supr_status);
}
/* no need to retry for badch; will fail again */
if (supr_status == TX_STATUS_SUPR_BADCH ||
......@@ -1059,7 +1069,8 @@ wlc_ampdu_dotxstatus_complete(struct ampdu_info *ampdu, struct scb *scb,
} else if (txs->phyerr) {
update_rate = false;
WLCNTINCR(wlc->pub->_cnt->txphyerr);
WL_ERROR(("wl%d: wlc_ampdu_dotxstatus: tx phy error (0x%x)\n", wlc->pub->unit, txs->phyerr));
WL_ERROR("wl%d: wlc_ampdu_dotxstatus: tx phy error (0x%x)\n",
wlc->pub->unit, txs->phyerr);
#ifdef BCMDBG
if (WL_ERROR_ON()) {
......@@ -1091,10 +1102,9 @@ wlc_ampdu_dotxstatus_complete(struct ampdu_info *ampdu, struct scb *scb,
if (ba_recd) {
bindex = MODSUB_POW2(seq, start_seq, SEQNUM_MAX);
WL_AMPDU_TX(("%s: tid %d seq is %d, start_seq is %d, "
"bindex is %d set %d, index %d\n",
__func__, tid, seq, start_seq, bindex,
isset(bitmap, bindex), index));
WL_AMPDU_TX("%s: tid %d seq is %d, start_seq is %d, bindex is %d set %d, index %d\n",
__func__, tid, seq, start_seq, bindex,
isset(bitmap, bindex), index);
/* if acked then clear bit and free packet */
if ((bindex < AMPDU_TX_BA_MAX_WSIZE)
......@@ -1147,7 +1157,8 @@ wlc_ampdu_dotxstatus_complete(struct ampdu_info *ampdu, struct scb *scb,
IEEE80211_TX_STAT_AMPDU_NO_BACK;
skb_pull(p, D11_PHY_HDR_LEN);
skb_pull(p, D11_TXH_LEN);
WL_ERROR(("%s: BA Timeout, seq %d, in_transit %d\n", SHORTNAME, seq, ini->tx_in_transit));
WL_ERROR("%s: BA Timeout, seq %d, in_transit %d\n",
SHORTNAME, seq, ini->tx_in_transit);
ieee80211_tx_status_irqsafe(wlc->pub->ieee_hw,
p);
}
......@@ -1183,8 +1194,8 @@ ampdu_cleanup_tid_ini(struct ampdu_info *ampdu, scb_ampdu_t *scb_ampdu, u8 tid,
if (!ini)
return;
WL_AMPDU_CTL(("wl%d: ampdu_cleanup_tid_ini: tid %d\n",
ampdu->wlc->pub->unit, tid));
WL_AMPDU_CTL("wl%d: ampdu_cleanup_tid_ini: tid %d\n",
ampdu->wlc->pub->unit, tid);
if (ini->tx_in_transit && !force)
return;
......@@ -1210,7 +1221,7 @@ static scb_ampdu_tid_ini_t *wlc_ampdu_init_tid_ini(struct ampdu_info *ampdu,
/* check for per-tid control of ampdu */
if (!ampdu->ini_enable[tid]) {
WL_ERROR(("%s: Rejecting tid %d\n", __func__, tid));
WL_ERROR("%s: Rejecting tid %d\n", __func__, tid);
return NULL;
}
......@@ -1231,13 +1242,13 @@ int wlc_ampdu_set(struct ampdu_info *ampdu, bool on)
if (on) {
if (!N_ENAB(wlc->pub)) {
WL_AMPDU_ERR(("wl%d: driver not nmode enabled\n",
wlc->pub->unit));
WL_AMPDU_ERR("wl%d: driver not nmode enabled\n",
wlc->pub->unit);
return BCME_UNSUPPORTED;
}
if (!wlc_ampdu_cap(ampdu)) {
WL_AMPDU_ERR(("wl%d: device not ampdu capable\n",
wlc->pub->unit));
WL_AMPDU_ERR("wl%d: device not ampdu capable\n",
wlc->pub->unit);
return BCME_UNSUPPORTED;
}
wlc->pub->_ampdu = on;
......
......@@ -102,7 +102,7 @@ struct antsel_info *wlc_antsel_attach(struct wlc_info *wlc,
asi = kzalloc(sizeof(struct antsel_info), GFP_ATOMIC);
if (!asi) {
WL_ERROR(("wl%d: wlc_antsel_attach: out of mem\n", pub->unit));
WL_ERROR("wl%d: wlc_antsel_attach: out of mem\n", pub->unit);
return NULL;
}
......@@ -131,7 +131,7 @@ struct antsel_info *wlc_antsel_attach(struct wlc_info *wlc,
asi->antsel_avail = false;
} else {
asi->antsel_avail = false;
WL_ERROR(("wlc_antsel_attach: 2o3 board cfg invalid\n"));
WL_ERROR("wlc_antsel_attach: 2o3 board cfg invalid\n");
ASSERT(0);
}
break;
......
......@@ -567,8 +567,8 @@ struct chan20_info chan20_info[] = {
const locale_info_t *wlc_get_locale_2g(u8 locale_idx)
{
if (locale_idx >= ARRAY_SIZE(g_locale_2g_table)) {
WL_ERROR(("%s: locale 2g index size out of range %d\n",
__func__, locale_idx));
WL_ERROR("%s: locale 2g index size out of range %d\n",
__func__, locale_idx);
ASSERT(locale_idx < ARRAY_SIZE(g_locale_2g_table));
return NULL;
}
......@@ -578,8 +578,8 @@ const locale_info_t *wlc_get_locale_2g(u8 locale_idx)
const locale_info_t *wlc_get_locale_5g(u8 locale_idx)
{
if (locale_idx >= ARRAY_SIZE(g_locale_5g_table)) {
WL_ERROR(("%s: locale 5g index size out of range %d\n",
__func__, locale_idx));
WL_ERROR("%s: locale 5g index size out of range %d\n",
__func__, locale_idx);
ASSERT(locale_idx < ARRAY_SIZE(g_locale_5g_table));
return NULL;
}
......@@ -589,8 +589,8 @@ const locale_info_t *wlc_get_locale_5g(u8 locale_idx)
const locale_mimo_info_t *wlc_get_mimo_2g(u8 locale_idx)
{
if (locale_idx >= ARRAY_SIZE(g_mimo_2g_table)) {
WL_ERROR(("%s: mimo 2g index size out of range %d\n", __func__,
locale_idx));
WL_ERROR("%s: mimo 2g index size out of range %d\n",
__func__, locale_idx);
return NULL;
}
return g_mimo_2g_table[locale_idx];
......@@ -599,8 +599,8 @@ const locale_mimo_info_t *wlc_get_mimo_2g(u8 locale_idx)
const locale_mimo_info_t *wlc_get_mimo_5g(u8 locale_idx)
{
if (locale_idx >= ARRAY_SIZE(g_mimo_5g_table)) {
WL_ERROR(("%s: mimo 5g index size out of range %d\n", __func__,
locale_idx));
WL_ERROR("%s: mimo 5g index size out of range %d\n",
__func__, locale_idx);
return NULL;
}
return g_mimo_5g_table[locale_idx];
......@@ -614,11 +614,11 @@ wlc_cm_info_t *wlc_channel_mgr_attach(struct wlc_info *wlc)
struct wlc_pub *pub = wlc->pub;
char *ccode;
WL_TRACE(("wl%d: wlc_channel_mgr_attach\n", wlc->pub->unit));
WL_TRACE("wl%d: wlc_channel_mgr_attach\n", wlc->pub->unit);
wlc_cm = kzalloc(sizeof(wlc_cm_info_t), GFP_ATOMIC);
if (wlc_cm == NULL) {
WL_ERROR(("wl%d: %s: out of memory", pub->unit, __func__));
WL_ERROR("wl%d: %s: out of memory", pub->unit, __func__);
return NULL;
}
wlc_cm->pub = pub;
......@@ -629,8 +629,9 @@ wlc_cm_info_t *wlc_channel_mgr_attach(struct wlc_info *wlc)
ccode = getvar(wlc->pub->vars, "ccode");
if (ccode) {
strncpy(wlc->pub->srom_ccode, ccode, WLC_CNTRY_BUF_SZ - 1);
WL_NONE(("%s: SROM country code is %c%c\n", __func__,
wlc->pub->srom_ccode[0], wlc->pub->srom_ccode[1]));
WL_NONE("%s: SROM country code is %c%c\n",
__func__,
wlc->pub->srom_ccode[0], wlc->pub->srom_ccode[1]);
}
/* internal country information which must match regulatory constraints in firmware */
......@@ -716,7 +717,9 @@ wlc_set_countrycode_rev(wlc_cm_info_t *wlc_cm,
char mapped_ccode[WLC_CNTRY_BUF_SZ];
uint mapped_regrev;
WL_NONE(("%s: (country_abbrev \"%s\", ccode \"%s\", regrev %d) SPROM \"%s\"/%u\n", __func__, country_abbrev, ccode, regrev, wlc_cm->srom_ccode, wlc_cm->srom_regrev));
WL_NONE("%s: (country_abbrev \"%s\", ccode \"%s\", regrev %d) SPROM \"%s\"/%u\n",
__func__, country_abbrev, ccode, regrev,
wlc_cm->srom_ccode, wlc_cm->srom_regrev);
/* if regrev is -1, lookup the mapped country code,
* otherwise use the ccode and regrev directly
......@@ -827,8 +830,8 @@ static const country_info_t *wlc_countrycode_map(wlc_cm_info_t *wlc_cm,
/* check for currently supported ccode size */
if (strlen(ccode) > (WLC_CNTRY_BUF_SZ - 1)) {
WL_ERROR(("wl%d: %s: ccode \"%s\" too long for match\n",
wlc->pub->unit, __func__, ccode));
WL_ERROR("wl%d: %s: ccode \"%s\" too long for match\n",
wlc->pub->unit, __func__, ccode);
return NULL;
}
......@@ -843,7 +846,7 @@ static const country_info_t *wlc_countrycode_map(wlc_cm_info_t *wlc_cm,
if (!strcmp(srom_ccode, ccode)) {
*mapped_regrev = srom_regrev;
mapped = 0;
WL_ERROR(("srom_code == ccode %s\n", __func__));
WL_ERROR("srom_code == ccode %s\n", __func__);
ASSERT(0);
} else {
mapped =
......@@ -895,7 +898,7 @@ static const country_info_t *wlc_country_lookup_direct(const char *ccode,
}
}
WL_ERROR(("%s: Returning NULL\n", __func__));
WL_ERROR("%s: Returning NULL\n", __func__);
ASSERT(0);
return NULL;
}
......@@ -974,7 +977,9 @@ static void wlc_channels_commit(wlc_cm_info_t *wlc_cm)
if (chan == INVCHANNEL) {
/* country/locale with no valid channels, set the radio disable bit */
mboolset(wlc->pub->radio_disabled, WL_RADIO_COUNTRY_DISABLE);
WL_ERROR(("wl%d: %s: no valid channel for \"%s\" nbands %d bandlocked %d\n", wlc->pub->unit, __func__, wlc_cm->country_abbrev, NBANDS(wlc), wlc->bandlocked));
WL_ERROR("wl%d: %s: no valid channel for \"%s\" nbands %d bandlocked %d\n",
wlc->pub->unit, __func__,
wlc_cm->country_abbrev, NBANDS(wlc), wlc->bandlocked);
} else
if (mboolisset(wlc->pub->radio_disabled,
WL_RADIO_COUNTRY_DISABLE)) {
......@@ -1538,8 +1543,8 @@ wlc_valid_chanspec_ext(wlc_cm_info_t *wlc_cm, chanspec_t chspec, bool dualband)
/* check the chanspec */
if (wf_chspec_malformed(chspec)) {
WL_ERROR(("wl%d: malformed chanspec 0x%x\n", wlc->pub->unit,
chspec));
WL_ERROR("wl%d: malformed chanspec 0x%x\n",
wlc->pub->unit, chspec);
ASSERT(0);
return false;
}
......
......@@ -75,8 +75,8 @@ wlc_eventq_t *wlc_eventq_attach(struct wlc_pub *pub, struct wlc_info *wlc,
eq->timer = wl_init_timer(eq->wl, wlc_timer_cb, eq, "eventq");
if (!eq->timer) {
WL_ERROR(("wl%d: wlc_eventq_attach: timer failed\n",
pub->unit));
WL_ERROR("wl%d: wlc_eventq_attach: timer failed\n",
pub->unit);
kfree(eq);
return NULL;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册