Commit f4528696 authored by Joe Perches's avatar Joe Perches Committed by 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: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 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 */
......
This diff is collapsed.
...@@ -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
......
This diff is collapsed.
...@@ -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;
} }
......
This diff is collapsed.
...@@ -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;
......
This diff is collapsed.
...@@ -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;
} }
......
This diff is collapsed.
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