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