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: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Joe Perches 2010-12-14 12:51:52 -08:00 коммит произвёл Greg Kroah-Hartman
Родитель 12b9d5bf76
Коммит f4528696d8
16 изменённых файлов: 1136 добавлений и 1057 удалений

Просмотреть файл

@ -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

Просмотреть файл

@ -179,7 +179,7 @@ static int wl_ops_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
struct wl_info *wl = hw->priv;
WL_LOCK(wl);
if (!wl->pub->up) {
WL_ERROR(("ops->tx called while down\n"));
WL_ERROR("ops->tx called while down\n");
status = -ENETDOWN;
goto done;
}
@ -192,8 +192,10 @@ static int wl_ops_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
static int wl_ops_start(struct ieee80211_hw *hw)
{
struct wl_info *wl = hw->priv;
/* struct ieee80211_channel *curchan = hw->conf.channel; */
WL_NONE(("%s : Initial channel: %d\n", __func__, curchan->hw_value));
/*
struct ieee80211_channel *curchan = hw->conf.channel;
WL_NONE("%s : Initial channel: %d\n", __func__, curchan->hw_value);
*/
WL_LOCK(wl);
ieee80211_wake_queues(hw);
@ -226,8 +228,8 @@ wl_ops_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
vif->type != NL80211_IFTYPE_STATION &&
vif->type != NL80211_IFTYPE_WDS &&
vif->type != NL80211_IFTYPE_ADHOC) {
WL_ERROR(("%s: Attempt to add type %d, only STA for now\n",
__func__, vif->type));
WL_ERROR("%s: Attempt to add type %d, only STA for now\n",
__func__, vif->type);
return -EOPNOTSUPP;
}
@ -237,7 +239,7 @@ wl_ops_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
WL_UNLOCK(wl);
if (err != 0)
WL_ERROR(("%s: wl_up() returned %d\n", __func__, err));
WL_ERROR("%s: wl_up() returned %d\n", __func__, err);
return err;
}
@ -263,8 +265,7 @@ ieee_set_channel(struct ieee80211_hw *hw, struct ieee80211_channel *chan,
break;
case NL80211_CHAN_HT40MINUS:
case NL80211_CHAN_HT40PLUS:
WL_ERROR(("%s: Need to implement 40 Mhz Channels!\n",
__func__));
WL_ERROR("%s: Need to implement 40 Mhz Channels!\n", __func__);
break;
}
@ -281,12 +282,12 @@ static int wl_ops_config(struct ieee80211_hw *hw, u32 changed)
int new_int;
if (changed & IEEE80211_CONF_CHANGE_LISTEN_INTERVAL) {
WL_NONE(("%s: Setting listen interval to %d\n",
__func__, conf->listen_interval));
WL_NONE("%s: Setting listen interval to %d\n",
__func__, conf->listen_interval);
if (wlc_iovar_setint
(wl->wlc, "bcn_li_bcn", conf->listen_interval)) {
WL_ERROR(("%s: Error setting listen_interval\n",
__func__));
WL_ERROR("%s: Error setting listen_interval\n",
__func__);
err = -EIO;
goto config_out;
}
@ -294,41 +295,42 @@ static int wl_ops_config(struct ieee80211_hw *hw, u32 changed)
ASSERT(new_int == conf->listen_interval);
}
if (changed & IEEE80211_CONF_CHANGE_MONITOR)
WL_NONE(("Need to set monitor mode\n"));
WL_NONE("Need to set monitor mode\n");
if (changed & IEEE80211_CONF_CHANGE_PS)
WL_NONE(("Need to set Power-save mode\n"));
WL_NONE("Need to set Power-save mode\n");
if (changed & IEEE80211_CONF_CHANGE_POWER) {
WL_NONE(("%s: Setting tx power to %d dbm\n", __func__,
conf->power_level));
WL_NONE("%s: Setting tx power to %d dbm\n",
__func__, conf->power_level);
if (wlc_iovar_setint
(wl->wlc, "qtxpower", conf->power_level * 4)) {
WL_ERROR(("%s: Error setting power_level\n", __func__));
WL_ERROR("%s: Error setting power_level\n", __func__);
err = -EIO;
goto config_out;
}
wlc_iovar_getint(wl->wlc, "qtxpower", &new_int);
if (new_int != (conf->power_level * 4))
WL_ERROR(("%s: Power level req != actual, %d %d\n",
__func__, conf->power_level * 4, new_int));
WL_ERROR("%s: Power level req != actual, %d %d\n",
__func__, conf->power_level * 4, new_int);
}
if (changed & IEEE80211_CONF_CHANGE_CHANNEL) {
err = ieee_set_channel(hw, conf->channel, conf->channel_type);
}
if (changed & IEEE80211_CONF_CHANGE_RETRY_LIMITS) {
WL_NONE(("%s: srl %d, lrl %d\n", __func__,
conf->short_frame_max_tx_count,
conf->long_frame_max_tx_count));
WL_NONE("%s: srl %d, lrl %d\n",
__func__,
conf->short_frame_max_tx_count,
conf->long_frame_max_tx_count);
if (wlc_set
(wl->wlc, WLC_SET_SRL,
conf->short_frame_max_tx_count) < 0) {
WL_ERROR(("%s: Error setting srl\n", __func__));
WL_ERROR("%s: Error setting srl\n", __func__);
err = -EIO;
goto config_out;
}
if (wlc_set(wl->wlc, WLC_SET_LRL, conf->long_frame_max_tx_count)
< 0) {
WL_ERROR(("%s: Error setting lrl\n", __func__));
WL_ERROR("%s: Error setting lrl\n", __func__);
err = -EIO;
goto config_out;
}
@ -348,24 +350,24 @@ wl_ops_bss_info_changed(struct ieee80211_hw *hw,
if (changed & BSS_CHANGED_ASSOC) {
WL_ERROR(("Associated:\t%s\n", info->assoc ? "True" : "False"));
WL_ERROR("Associated:\t%s\n", info->assoc ? "True" : "False");
/* association status changed (associated/disassociated)
* also implies a change in the AID.
*/
}
if (changed & BSS_CHANGED_ERP_CTS_PROT) {
WL_NONE(("Use_cts_prot:\t%s Implement me\n",
info->use_cts_prot ? "True" : "False"));
WL_NONE("Use_cts_prot:\t%s Implement me\n",
info->use_cts_prot ? "True" : "False");
/* CTS protection changed */
}
if (changed & BSS_CHANGED_ERP_PREAMBLE) {
WL_NONE(("Short preamble:\t%s Implement me\n",
info->use_short_preamble ? "True" : "False"));
WL_NONE("Short preamble:\t%s Implement me\n",
info->use_short_preamble ? "True" : "False");
/* preamble changed */
}
if (changed & BSS_CHANGED_ERP_SLOT) {
WL_NONE(("Changing short slot:\t%s\n",
info->use_short_slot ? "True" : "False"));
WL_NONE("Changing short slot:\t%s\n",
info->use_short_slot ? "True" : "False");
if (info->use_short_slot)
val = 1;
else
@ -375,34 +377,34 @@ wl_ops_bss_info_changed(struct ieee80211_hw *hw,
}
if (changed & BSS_CHANGED_HT) {
WL_NONE(("%s: HT mode - Implement me\n", __func__));
WL_NONE("%s: HT mode - Implement me\n", __func__);
/* 802.11n parameters changed */
}
if (changed & BSS_CHANGED_BASIC_RATES) {
WL_NONE(("Need to change Basic Rates:\t0x%x! Implement me\n",
(u32) info->basic_rates));
WL_NONE("Need to change Basic Rates:\t0x%x! Implement me\n",
(u32) info->basic_rates);
/* Basic rateset changed */
}
if (changed & BSS_CHANGED_BEACON_INT) {
WL_NONE(("Beacon Interval:\t%d Implement me\n",
info->beacon_int));
WL_NONE("Beacon Interval:\t%d Implement me\n",
info->beacon_int);
/* Beacon interval changed */
}
if (changed & BSS_CHANGED_BSSID) {
WL_NONE(("new BSSID:\taid %d bss:%pM\n", info->aid,
info->bssid));
WL_NONE("new BSSID:\taid %d bss:%pM\n",
info->aid, info->bssid);
/* BSSID changed, for whatever reason (IBSS and managed mode) */
/* FIXME: need to store bssid in bsscfg */
wlc_set_addrmatch(wl->wlc, RCM_BSSID_OFFSET,
(struct ether_addr *)info->bssid);
}
if (changed & BSS_CHANGED_BEACON) {
WL_ERROR(("BSS_CHANGED_BEACON\n"));
WL_ERROR("BSS_CHANGED_BEACON\n");
/* Beacon data changed, retrieve new beacon (beaconing modes) */
}
if (changed & BSS_CHANGED_BEACON_ENABLED) {
WL_ERROR(("Beacon enabled:\t%s\n",
info->enable_beacon ? "True" : "False"));
WL_ERROR("Beacon enabled:\t%s\n",
info->enable_beacon ? "True" : "False");
/* Beaconing should be enabled/disabled (beaconing modes) */
}
return;
@ -418,19 +420,19 @@ wl_ops_configure_filter(struct ieee80211_hw *hw,
changed_flags &= MAC_FILTERS;
*total_flags &= MAC_FILTERS;
if (changed_flags & FIF_PROMISC_IN_BSS)
WL_ERROR(("FIF_PROMISC_IN_BSS\n"));
WL_ERROR("FIF_PROMISC_IN_BSS\n");
if (changed_flags & FIF_ALLMULTI)
WL_ERROR(("FIF_ALLMULTI\n"));
WL_ERROR("FIF_ALLMULTI\n");
if (changed_flags & FIF_FCSFAIL)
WL_ERROR(("FIF_FCSFAIL\n"));
WL_ERROR("FIF_FCSFAIL\n");
if (changed_flags & FIF_PLCPFAIL)
WL_ERROR(("FIF_PLCPFAIL\n"));
WL_ERROR("FIF_PLCPFAIL\n");
if (changed_flags & FIF_CONTROL)
WL_ERROR(("FIF_CONTROL\n"));
WL_ERROR("FIF_CONTROL\n");
if (changed_flags & FIF_OTHER_BSS)
WL_ERROR(("FIF_OTHER_BSS\n"));
WL_ERROR("FIF_OTHER_BSS\n");
if (changed_flags & FIF_BCN_PRBRESP_PROMISC) {
WL_NONE(("FIF_BCN_PRBRESP_PROMISC\n"));
WL_NONE("FIF_BCN_PRBRESP_PROMISC\n");
WL_LOCK(wl);
if (*total_flags & FIF_BCN_PRBRESP_PROMISC) {
wl->pub->mac80211_state |= MAC80211_PROMISC_BCNS;
@ -447,25 +449,25 @@ wl_ops_configure_filter(struct ieee80211_hw *hw,
static int
wl_ops_set_tim(struct ieee80211_hw *hw, struct ieee80211_sta *sta, bool set)
{
WL_ERROR(("%s: Enter\n", __func__));
WL_ERROR("%s: Enter\n", __func__);
return 0;
}
static void wl_ops_sw_scan_start(struct ieee80211_hw *hw)
{
WL_NONE(("Scan Start\n"));
WL_NONE("Scan Start\n");
return;
}
static void wl_ops_sw_scan_complete(struct ieee80211_hw *hw)
{
WL_NONE(("Scan Complete\n"));
WL_NONE("Scan Complete\n");
return;
}
static void wl_ops_set_tsf(struct ieee80211_hw *hw, u64 tsf)
{
WL_ERROR(("%s: Enter\n", __func__));
WL_ERROR("%s: Enter\n", __func__);
return;
}
@ -473,13 +475,13 @@ static int
wl_ops_get_stats(struct ieee80211_hw *hw,
struct ieee80211_low_level_stats *stats)
{
WL_ERROR(("%s: Enter\n", __func__));
WL_ERROR("%s: Enter\n", __func__);
return 0;
}
static int wl_ops_set_rts_threshold(struct ieee80211_hw *hw, u32 value)
{
WL_ERROR(("%s: Enter\n", __func__));
WL_ERROR("%s: Enter\n", __func__);
return 0;
}
@ -487,10 +489,10 @@ static void
wl_ops_sta_notify(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
enum sta_notify_cmd cmd, struct ieee80211_sta *sta)
{
WL_NONE(("%s: Enter\n", __func__));
WL_NONE("%s: Enter\n", __func__);
switch (cmd) {
default:
WL_ERROR(("%s: Uknown cmd = %d\n", __func__, cmd));
WL_ERROR("%s: Unknown cmd = %d\n", __func__, cmd);
break;
}
return;
@ -502,9 +504,9 @@ wl_ops_conf_tx(struct ieee80211_hw *hw, u16 queue,
{
struct wl_info *wl = hw->priv;
WL_NONE(("%s: Enter (WME config)\n", __func__));
WL_NONE(("queue %d, txop %d, cwmin %d, cwmax %d, aifs %d\n", queue,
params->txop, params->cw_min, params->cw_max, params->aifs));
WL_NONE("%s: Enter (WME config)\n", __func__);
WL_NONE("queue %d, txop %d, cwmin %d, cwmax %d, aifs %d\n", queue,
params->txop, params->cw_min, params->cw_max, params->aifs);
WL_LOCK(wl);
wlc_wme_setparams(wl->wlc, queue, (void *)params, true);
@ -515,7 +517,7 @@ wl_ops_conf_tx(struct ieee80211_hw *hw, u16 queue,
static u64 wl_ops_get_tsf(struct ieee80211_hw *hw)
{
WL_ERROR(("%s: Enter\n", __func__));
WL_ERROR("%s: Enter\n", __func__);
return 0;
}
@ -558,7 +560,7 @@ static int
wl_sta_remove(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
struct ieee80211_sta *sta)
{
WL_NONE(("%s: Enter\n", __func__));
WL_NONE("%s: Enter\n", __func__);
return 0;
}
@ -576,14 +578,14 @@ wl_ampdu_action(struct ieee80211_hw *hw,
ASSERT(scb->magic == SCB_MAGIC);
switch (action) {
case IEEE80211_AMPDU_RX_START:
WL_NONE(("%s: action = IEEE80211_AMPDU_RX_START\n", __func__));
WL_NONE("%s: action = IEEE80211_AMPDU_RX_START\n", __func__);
break;
case IEEE80211_AMPDU_RX_STOP:
WL_NONE(("%s: action = IEEE80211_AMPDU_RX_STOP\n", __func__));
WL_NONE("%s: action = IEEE80211_AMPDU_RX_STOP\n", __func__);
break;
case IEEE80211_AMPDU_TX_START:
if (!wlc_aggregatable(wl->wlc, tid)) {
/* WL_ERROR(("START: tid %d is not agg' able, return FAILURE to stack\n", tid)); */
/* WL_ERROR("START: tid %d is not agg' able, return FAILURE to stack\n", tid); */
return -1;
}
/* XXX: Use the starting sequence number provided ... */
@ -597,11 +599,11 @@ wl_ampdu_action(struct ieee80211_hw *hw,
case IEEE80211_AMPDU_TX_OPERATIONAL:
/* Not sure what to do here */
/* Power save wakeup */
WL_NONE(("%s: action = IEEE80211_AMPDU_TX_OPERATIONAL\n",
__func__));
WL_NONE("%s: action = IEEE80211_AMPDU_TX_OPERATIONAL\n",
__func__);
break;
default:
WL_ERROR(("%s: Invalid command, ignoring\n", __func__));
WL_ERROR("%s: Invalid command, ignoring\n", __func__);
}
return 0;
@ -632,8 +634,8 @@ static const struct ieee80211_ops wl_ops = {
static int wl_set_hint(struct wl_info *wl, char *abbrev)
{
WL_ERROR(("%s: Sending country code %c%c to MAC80211\n", __func__,
abbrev[0], abbrev[1]));
WL_ERROR("%s: Sending country code %c%c to MAC80211\n",
__func__, abbrev[0], abbrev[1]);
return regulatory_hint(wl->pub->ieee_hw->wiphy, abbrev);
}
@ -663,7 +665,7 @@ static struct wl_info *wl_attach(u16 vendor, u16 device, unsigned long regs,
err = 0;
if (unit < 0) {
WL_ERROR(("wl%d: unit number overflow, exiting\n", unit));
WL_ERROR("wl%d: unit number overflow, exiting\n", unit);
return NULL;
}
@ -691,13 +693,13 @@ static struct wl_info *wl_attach(u16 vendor, u16 device, unsigned long regs,
/* Do nothing */
} else {
bustype = PCI_BUS;
WL_TRACE(("force to PCI\n"));
WL_TRACE("force to PCI\n");
}
wl->bcm_bustype = bustype;
wl->regsva = ioremap_nocache(base_addr, PCI_BAR0_WINSZ);
if (wl->regsva == NULL) {
WL_ERROR(("wl%d: ioremap() failed\n", unit));
WL_ERROR("wl%d: ioremap() failed\n", unit);
goto fail;
}
spin_lock_init(&wl->lock);
@ -729,13 +731,12 @@ static struct wl_info *wl_attach(u16 vendor, u16 device, unsigned long regs,
if (wlc_iovar_setint(wl->wlc, "mpc", 0)) {
WL_ERROR(("wl%d: Error setting MPC variable to 0\n",
unit));
WL_ERROR("wl%d: Error setting MPC variable to 0\n", unit);
}
/* register our interrupt handler */
if (request_irq(irq, wl_isr, IRQF_SHARED, KBUILD_MODNAME, wl)) {
WL_ERROR(("wl%d: request_irq() failed\n", unit));
WL_ERROR("wl%d: request_irq() failed\n", unit);
goto fail;
}
wl->irq = irq;
@ -745,7 +746,7 @@ static struct wl_info *wl_attach(u16 vendor, u16 device, unsigned long regs,
NULL);
if (ieee_hw_init(hw)) {
WL_ERROR(("wl%d: %s: ieee_hw_init failed!\n", unit, __func__));
WL_ERROR("wl%d: %s: ieee_hw_init failed!\n", unit, __func__);
goto fail;
}
@ -755,8 +756,8 @@ static struct wl_info *wl_attach(u16 vendor, u16 device, unsigned long regs,
err = ieee80211_register_hw(hw);
if (err) {
WL_ERROR(("%s: ieee80211_register_hw failed, status %d\n",
__func__, err));
WL_ERROR("%s: ieee80211_register_hw failed, status %d\n",
__func__, err);
}
if (wl->pub->srom_ccode[0])
@ -764,11 +765,11 @@ static struct wl_info *wl_attach(u16 vendor, u16 device, unsigned long regs,
else
err = wl_set_hint(wl, "US");
if (err) {
WL_ERROR(("%s: regulatory_hint failed, status %d\n", __func__,
err));
WL_ERROR("%s: regulatory_hint failed, status %d\n",
__func__, err);
}
WL_ERROR(("wl%d: Broadcom BCM43xx 802.11 MAC80211 Driver "
" (" PHY_VERSION_STR ")", unit));
WL_ERROR("wl%d: Broadcom BCM43xx 802.11 MAC80211 Driver (" PHY_VERSION_STR ")",
unit);
#ifdef BCMDBG
printf(" (Compiled at " __TIME__ " on " __DATE__ ")");
@ -964,9 +965,9 @@ static int ieee_hw_rate_init(struct ieee80211_hw *hw)
hw->wiphy->bands[IEEE80211_BAND_5GHZ] = NULL;
if (wlc_get(wl->wlc, WLC_GET_PHYLIST, (int *)&phy_list) < 0) {
WL_ERROR(("Phy list failed\n"));
WL_ERROR("Phy list failed\n");
}
WL_NONE(("%s: phylist = %c\n", __func__, phy_list[0]));
WL_NONE("%s: phylist = %c\n", __func__, phy_list[0]);
if (phy_list[0] == 'n' || phy_list[0] == 'c') {
if (phy_list[0] == 'c') {
@ -991,7 +992,7 @@ static int ieee_hw_rate_init(struct ieee80211_hw *hw)
}
}
WL_NONE(("%s: 2ghz = %d, 5ghz = %d\n", __func__, 1, has_5g));
WL_NONE("%s: 2ghz = %d, 5ghz = %d\n", __func__, 1, has_5g);
return 0;
}
@ -1039,9 +1040,9 @@ wl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
ASSERT(pdev);
WL_TRACE(("%s: bus %d slot %d func %d irq %d\n", __func__,
pdev->bus->number, PCI_SLOT(pdev->devfn),
PCI_FUNC(pdev->devfn), pdev->irq));
WL_TRACE("%s: bus %d slot %d func %d irq %d\n",
__func__, pdev->bus->number, PCI_SLOT(pdev->devfn),
PCI_FUNC(pdev->devfn), pdev->irq);
if ((pdev->vendor != PCI_VENDOR_ID_BROADCOM) ||
(((pdev->device & 0xff00) != 0x4300) &&
@ -1051,9 +1052,9 @@ wl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
rc = pci_enable_device(pdev);
if (rc) {
WL_ERROR(("%s: Cannot enable device %d-%d_%d\n", __func__,
pdev->bus->number, PCI_SLOT(pdev->devfn),
PCI_FUNC(pdev->devfn)));
WL_ERROR("%s: Cannot enable device %d-%d_%d\n",
__func__, pdev->bus->number, PCI_SLOT(pdev->devfn),
PCI_FUNC(pdev->devfn));
return -ENODEV;
}
pci_set_master(pdev);
@ -1064,7 +1065,7 @@ wl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
hw = ieee80211_alloc_hw(sizeof(struct wl_info), &wl_ops);
if (!hw) {
WL_ERROR(("%s: ieee80211_alloc_hw failed\n", __func__));
WL_ERROR("%s: ieee80211_alloc_hw failed\n", __func__);
rc = -ENOMEM;
goto err_1;
}
@ -1079,13 +1080,13 @@ wl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
PCI_BUS, pdev, pdev->irq);
if (!wl) {
WL_ERROR(("%s: %s: wl_attach failed!\n",
KBUILD_MODNAME, __func__));
WL_ERROR("%s: %s: wl_attach failed!\n",
KBUILD_MODNAME, __func__);
return -ENODEV;
}
return 0;
err_1:
WL_ERROR(("%s: err_1: Major hoarkage\n", __func__));
WL_ERROR("%s: err_1: Major hoarkage\n", __func__);
return 0;
}
@ -1095,12 +1096,12 @@ static int wl_suspend(struct pci_dev *pdev, pm_message_t state)
struct wl_info *wl;
struct ieee80211_hw *hw;
WL_TRACE(("wl: wl_suspend\n"));
WL_TRACE("wl: wl_suspend\n");
hw = pci_get_drvdata(pdev);
wl = HW_TO_WL(hw);
if (!wl) {
WL_ERROR(("wl: wl_suspend: pci_get_drvdata failed\n"));
WL_ERROR("wl: wl_suspend: pci_get_drvdata failed\n");
return -ENODEV;
}
@ -1120,11 +1121,11 @@ static int wl_resume(struct pci_dev *pdev)
int err = 0;
u32 val;
WL_TRACE(("wl: wl_resume\n"));
WL_TRACE("wl: wl_resume\n");
hw = pci_get_drvdata(pdev);
wl = HW_TO_WL(hw);
if (!wl) {
WL_ERROR(("wl: wl_resume: pci_get_drvdata failed\n"));
WL_ERROR("wl: wl_resume: pci_get_drvdata failed\n");
return -ENODEV;
}
@ -1160,11 +1161,11 @@ static void wl_remove(struct pci_dev *pdev)
hw = pci_get_drvdata(pdev);
wl = HW_TO_WL(hw);
if (!wl) {
WL_ERROR(("wl: wl_remove: pci_get_drvdata failed\n"));
WL_ERROR("wl: wl_remove: pci_get_drvdata failed\n");
return;
}
if (!wlc_chipmatch(pdev->vendor, pdev->device)) {
WL_ERROR(("wl: wl_remove: wlc_chipmatch failed\n"));
WL_ERROR("wl: wl_remove: wlc_chipmatch failed\n");
return;
}
if (wl->wlc) {
@ -1172,7 +1173,7 @@ static void wl_remove(struct pci_dev *pdev)
WL_LOCK(wl);
wl_down(wl);
WL_UNLOCK(wl);
WL_NONE(("%s: Down\n", __func__));
WL_NONE("%s: Down\n", __func__);
}
pci_disable_device(pdev);
@ -1334,12 +1335,12 @@ wl_start_int(struct wl_info *wl, struct ieee80211_hw *hw, struct sk_buff *skb)
void wl_txflowcontrol(struct wl_info *wl, struct wl_if *wlif, bool state,
int prio)
{
WL_ERROR(("Shouldn't be here %s\n", __func__));
WL_ERROR("Shouldn't be here %s\n", __func__);
}
void wl_init(struct wl_info *wl)
{
WL_TRACE(("wl%d: wl_init\n", wl->pub->unit));
WL_TRACE("wl%d: wl_init\n", wl->pub->unit);
wl_reset(wl);
@ -1348,7 +1349,7 @@ void wl_init(struct wl_info *wl)
uint wl_reset(struct wl_info *wl)
{
WL_TRACE(("wl%d: wl_reset\n", wl->pub->unit));
WL_TRACE("wl%d: wl_reset\n", wl->pub->unit);
wlc_reset(wl->wlc);
@ -1494,12 +1495,12 @@ static void BCMFASTPATH wl_dpc(unsigned long data)
static void wl_link_up(struct wl_info *wl, char *ifname)
{
WL_ERROR(("wl%d: link up (%s)\n", wl->pub->unit, ifname));
WL_ERROR("wl%d: link up (%s)\n", wl->pub->unit, ifname);
}
static void wl_link_down(struct wl_info *wl, char *ifname)
{
WL_ERROR(("wl%d: link down (%s)\n", wl->pub->unit, ifname));
WL_ERROR("wl%d: link down (%s)\n", wl->pub->unit, ifname);
}
void wl_event(struct wl_info *wl, char *ifname, wlc_event_t *e)
@ -1551,7 +1552,7 @@ wl_timer_t *wl_init_timer(struct wl_info *wl, void (*fn) (void *arg), void *arg,
t = kmalloc(sizeof(wl_timer_t), GFP_ATOMIC);
if (!t) {
WL_ERROR(("wl%d: wl_init_timer: out of memory\n", wl->pub->unit));
WL_ERROR("wl%d: wl_init_timer: out of memory\n", wl->pub->unit);
return 0;
}
@ -1582,8 +1583,8 @@ void wl_add_timer(struct wl_info *wl, wl_timer_t *t, uint ms, int periodic)
{
#ifdef BCMDBG
if (t->set) {
WL_ERROR(("%s: Already set. Name: %s, per %d\n",
__func__, t->name, periodic));
WL_ERROR("%s: Already set. Name: %s, per %d\n",
__func__, t->name, periodic);
}
#endif
ASSERT(!t->set);
@ -1752,7 +1753,7 @@ static int wl_request_fw(struct wl_info *wl, struct pci_dev *pdev)
break;
sprintf(fw_name, "%s-%d.fw", wl_firmwares[i],
UCODE_LOADER_API_VER);
WL_NONE(("request fw %s\n", fw_name));
WL_NONE("request fw %s\n", fw_name);
status = request_firmware(&wl->fw.fw_bin[i], fw_name, device);
if (status) {
printf("%s: fail to load firmware %s\n",
@ -1760,7 +1761,7 @@ static int wl_request_fw(struct wl_info *wl, struct pci_dev *pdev)
wl_release_fw(wl);
return status;
}
WL_NONE(("request fw %s\n", fw_name));
WL_NONE("request fw %s\n", fw_name);
sprintf(fw_name, "%s_hdr-%d.fw", wl_firmwares[i],
UCODE_LOADER_API_VER);
status = request_firmware(&wl->fw.fw_hdr[i], fw_name, device);
@ -1772,8 +1773,8 @@ static int wl_request_fw(struct wl_info *wl, struct pci_dev *pdev)
}
wl->fw.hdr_num_entries[i] =
wl->fw.fw_hdr[i]->size / (sizeof(struct wl_fw_hdr));
WL_NONE(("request fw %s find: %d entries\n", fw_name,
wl->fw.hdr_num_entries[i]));
WL_NONE("request fw %s find: %d entries\n",
fw_name, wl->fw.hdr_num_entries[i]);
}
wl->fw.fw_cnt = i;
return wl_ucode_data_init(wl);
@ -1811,16 +1812,16 @@ int wl_check_firmwares(struct wl_info *wl)
if (fw == NULL && fw_hdr == NULL) {
break;
} else if (fw == NULL || fw_hdr == NULL) {
WL_ERROR(("%s: invalid bin/hdr fw\n", __func__));
WL_ERROR("%s: invalid bin/hdr fw\n", __func__);
rc = -EBADF;
} else if (fw_hdr->size % sizeof(struct wl_fw_hdr)) {
WL_ERROR(("%s: non integral fw hdr file size %d/%d\n",
__func__, fw_hdr->size,
sizeof(struct wl_fw_hdr)));
WL_ERROR("%s: non integral fw hdr file size %d/%zu\n",
__func__, fw_hdr->size,
sizeof(struct wl_fw_hdr));
rc = -EBADF;
} else if (fw->size < MIN_FW_SIZE || fw->size > MAX_FW_SIZE) {
WL_ERROR(("%s: out of bounds fw file size %d\n",
__func__, fw->size));
WL_ERROR("%s: out of bounds fw file size %d\n",
__func__, fw->size);
rc = -EBADF;
} else {
/* check if ucode section overruns firmware image */
@ -1829,15 +1830,15 @@ int wl_check_firmwares(struct wl_info *wl)
entry++, ucode_hdr++) {
if (ucode_hdr->offset + ucode_hdr->len >
fw->size) {
WL_ERROR(("%s: conflicting bin/hdr\n",
__func__));
WL_ERROR("%s: conflicting bin/hdr\n",
__func__);
rc = -EBADF;
}
}
}
}
if (rc == 0 && wl->fw.fw_cnt != i) {
WL_ERROR(("%s: invalid fw_cnt=%d\n", __func__, wl->fw.fw_cnt));
WL_ERROR("%s: invalid fw_cnt=%d\n", __func__, wl->fw.fw_cnt);
rc = -EBADF;
}
return rc;

Просмотреть файл

@ -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;

Просмотреть файл

@ -217,18 +217,20 @@ static void WLBANDINITFN(wlc_ucode_bsinit) (struct wlc_hw_info *wlc_hw)
if (WLCISNPHY(wlc_hw->band)) {
wlc_write_inits(wlc_hw, d11n0bsinitvals16);
} else {
WL_ERROR(("%s: wl%d: unsupported phy in corerev %d\n",
__func__, wlc_hw->unit, wlc_hw->corerev));
WL_ERROR("%s: wl%d: unsupported phy in corerev %d\n",
__func__, wlc_hw->unit, wlc_hw->corerev);
}
} else {
if (D11REV_IS(wlc_hw->corerev, 24)) {
if (WLCISLCNPHY(wlc_hw->band)) {
wlc_write_inits(wlc_hw, d11lcn0bsinitvals24);
} else
WL_ERROR(("%s: wl%d: unsupported phy in corerev %d\n", __func__, wlc_hw->unit, wlc_hw->corerev));
WL_ERROR("%s: wl%d: unsupported phy in corerev %d\n",
__func__, wlc_hw->unit,
wlc_hw->corerev);
} else {
WL_ERROR(("%s: wl%d: unsupported corerev %d\n",
__func__, wlc_hw->unit, wlc_hw->corerev));
WL_ERROR("%s: wl%d: unsupported corerev %d\n",
__func__, wlc_hw->unit, wlc_hw->corerev);
}
}
}
@ -240,7 +242,7 @@ static u32 WLBANDINITFN(wlc_setband_inact) (struct wlc_info *wlc, uint bandunit)
u32 macintmask;
u32 tmp;
WL_TRACE(("wl%d: wlc_setband_inact\n", wlc_hw->unit));
WL_TRACE("wl%d: wlc_setband_inact\n", wlc_hw->unit);
ASSERT(bandunit != wlc_hw->band->bandunit);
ASSERT(si_iscoreup(wlc_hw->sih));
@ -281,7 +283,7 @@ wlc_bmac_recv(struct wlc_hw_info *wlc_hw, uint fifo, bool bound)
u32 tsf_h, tsf_l;
wlc_d11rxhdr_t *wlc_rxhdr = NULL;
WL_TRACE(("wl%d: %s\n", wlc_hw->unit, __func__));
WL_TRACE("wl%d: %s\n", wlc_hw->unit, __func__);
/* gather received frames */
while ((p = dma_rx(wlc_hw->di[fifo]))) {
@ -333,7 +335,7 @@ bool BCMFASTPATH wlc_dpc(struct wlc_info *wlc, bool bounded)
bool fatal = false;
if (DEVICEREMOVED(wlc)) {
WL_ERROR(("wl%d: %s: dead chip\n", wlc_hw->unit, __func__));
WL_ERROR("wl%d: %s: dead chip\n", wlc_hw->unit, __func__);
wl_down(wlc->wl);
return false;
}
@ -342,8 +344,8 @@ bool BCMFASTPATH wlc_dpc(struct wlc_info *wlc, bool bounded)
macintstatus = wlc->macintstatus;
wlc->macintstatus = 0;
WL_TRACE(("wl%d: wlc_dpc: macintstatus 0x%x\n", wlc_hw->unit,
macintstatus));
WL_TRACE("wl%d: wlc_dpc: macintstatus 0x%x\n",
wlc_hw->unit, macintstatus);
if (macintstatus & MI_PRQ) {
/* Process probe request FIFO */
@ -366,7 +368,7 @@ bool BCMFASTPATH wlc_dpc(struct wlc_info *wlc, bool bounded)
if (wlc_bmac_txstatus(wlc->hw, bounded, &fatal))
wlc->macintstatus |= MI_TFS;
if (fatal) {
WL_ERROR(("MI_TFS: fatal\n"));
WL_ERROR("MI_TFS: fatal\n");
goto fatal;
}
}
@ -376,7 +378,7 @@ bool BCMFASTPATH wlc_dpc(struct wlc_info *wlc, bool bounded)
/* ATIM window end */
if (macintstatus & MI_ATIMWINEND) {
WL_TRACE(("wlc_isr: end of ATIM window\n"));
WL_TRACE("wlc_isr: end of ATIM window\n");
OR_REG(wlc_hw->osh, &regs->maccommand, wlc->qvalid);
wlc->qvalid = 0;
@ -397,7 +399,7 @@ bool BCMFASTPATH wlc_dpc(struct wlc_info *wlc, bool bounded)
/* TX FIFO suspend/flush completion */
if (macintstatus & MI_TXSTOP) {
if (wlc_bmac_tx_fifo_suspended(wlc_hw, TX_DATA_FIFO)) {
/* WL_ERROR(("dpc: fifo_suspend_comlete\n")); */
/* WL_ERROR("dpc: fifo_suspend_comlete\n"); */
}
}
@ -407,7 +409,8 @@ bool BCMFASTPATH wlc_dpc(struct wlc_info *wlc, bool bounded)
}
if (macintstatus & MI_GP0) {
WL_ERROR(("wl%d: PSM microcode watchdog fired at %d (seconds). Resetting.\n", wlc_hw->unit, wlc_hw->now));
WL_ERROR("wl%d: PSM microcode watchdog fired at %d (seconds). Resetting.\n",
wlc_hw->unit, wlc_hw->now);
printk_once("%s : PSM Watchdog, chipid 0x%x, chiprev 0x%x\n",
__func__, wlc_hw->sih->chip,
@ -429,7 +432,8 @@ bool BCMFASTPATH wlc_dpc(struct wlc_info *wlc, bool bounded)
u32 rfd = R_REG(wlc_hw->osh, &regs->phydebug) & PDBG_RFD;
#endif
WL_ERROR(("wl%d: MAC Detected a change on the RF Disable Input 0x%x\n", wlc_hw->unit, rfd));
WL_ERROR("wl%d: MAC Detected a change on the RF Disable Input 0x%x\n",
wlc_hw->unit, rfd);
WLCNTINCR(wlc->pub->_cnt->rfdisable);
}
@ -457,7 +461,7 @@ void wlc_bmac_watchdog(void *arg)
struct wlc_info *wlc = (struct wlc_info *) arg;
struct wlc_hw_info *wlc_hw = wlc->hw;
WL_TRACE(("wl%d: wlc_bmac_watchdog\n", wlc_hw->unit));
WL_TRACE("wl%d: wlc_bmac_watchdog\n", wlc_hw->unit);
if (!wlc_hw->up)
return;
@ -483,8 +487,8 @@ wlc_bmac_set_chanspec(struct wlc_hw_info *wlc_hw, chanspec_t chanspec,
{
uint bandunit;
WL_TRACE(("wl%d: wlc_bmac_set_chanspec 0x%x\n", wlc_hw->unit,
chanspec));
WL_TRACE("wl%d: wlc_bmac_set_chanspec 0x%x\n",
wlc_hw->unit, chanspec);
wlc_hw->chanspec = chanspec;
@ -594,7 +598,8 @@ static bool wlc_bmac_attach_dmapio(struct wlc_info *wlc, uint j, bool wme)
dma_addrwidth(wlc_hw->sih, DMAREG(wlc_hw, DMA_TX, 0));
if (!wl_alloc_dma_resources(wlc_hw->wlc->wl, addrwidth)) {
WL_ERROR(("wl%d: wlc_attach: alloc_dma_resources failed\n", unit));
WL_ERROR("wl%d: wlc_attach: alloc_dma_resources failed\n",
unit);
return false;
}
@ -667,8 +672,7 @@ static bool wlc_bmac_attach_dmapio(struct wlc_info *wlc, uint j, bool wme)
/* Cleaner to leave this as if with AP defined */
if (dma_attach_err) {
WL_ERROR(("wl%d: wlc_attach: dma_attach failed\n",
unit));
WL_ERROR("wl%d: wlc_attach: dma_attach failed\n", unit);
return false;
}
@ -717,8 +721,8 @@ int wlc_bmac_attach(struct wlc_info *wlc, u16 vendor, u16 device, uint unit,
bool wme = false;
shared_phy_params_t sha_params;
WL_TRACE(("wl%d: wlc_bmac_attach: vendor 0x%x device 0x%x\n", unit,
vendor, device));
WL_TRACE("wl%d: wlc_bmac_attach: vendor 0x%x device 0x%x\n",
unit, vendor, device);
ASSERT(sizeof(wlc_d11rxhdr_t) <= WL_HWRXOFF);
@ -742,7 +746,7 @@ int wlc_bmac_attach(struct wlc_info *wlc, u16 vendor, u16 device, uint unit,
wlc_hw->sih = si_attach((uint) device, osh, regsva, bustype, btparam,
&wlc_hw->vars, &wlc_hw->vars_size);
if (wlc_hw->sih == NULL) {
WL_ERROR(("wl%d: wlc_bmac_attach: si_attach failed\n", unit));
WL_ERROR("wl%d: wlc_bmac_attach: si_attach failed\n", unit);
err = 11;
goto fail;
}
@ -762,21 +766,22 @@ int wlc_bmac_attach(struct wlc_info *wlc, u16 vendor, u16 device, uint unit,
var = getvar(vars, "vendid");
if (var) {
vendor = (u16) simple_strtoul(var, NULL, 0);
WL_ERROR(("Overriding vendor id = 0x%x\n", vendor));
WL_ERROR("Overriding vendor id = 0x%x\n", vendor);
}
var = getvar(vars, "devid");
if (var) {
u16 devid = (u16) simple_strtoul(var, NULL, 0);
if (devid != 0xffff) {
device = devid;
WL_ERROR(("Overriding device id = 0x%x\n",
device));
WL_ERROR("Overriding device id = 0x%x\n",
device);
}
}
/* verify again the device is supported */
if (!wlc_chipmatch(vendor, device)) {
WL_ERROR(("wl%d: wlc_bmac_attach: Unsupported vendor/device (0x%x/0x%x)\n", unit, vendor, device));
WL_ERROR("wl%d: wlc_bmac_attach: Unsupported vendor/device (0x%x/0x%x)\n",
unit, vendor, device);
err = 12;
goto fail;
}
@ -811,7 +816,8 @@ int wlc_bmac_attach(struct wlc_info *wlc, u16 vendor, u16 device, uint unit,
wlc_bmac_corereset(wlc_hw, WLC_USE_COREFLAGS);
if (!wlc_bmac_validate_chip_access(wlc_hw)) {
WL_ERROR(("wl%d: wlc_bmac_attach: validate_chip_access failed\n", unit));
WL_ERROR("wl%d: wlc_bmac_attach: validate_chip_access failed\n",
unit);
err = 14;
goto fail;
}
@ -823,7 +829,8 @@ int wlc_bmac_attach(struct wlc_info *wlc, u16 vendor, u16 device, uint unit,
j = BOARDREV_PROMOTED;
wlc_hw->boardrev = (u16) j;
if (!wlc_validboardtype(wlc_hw)) {
WL_ERROR(("wl%d: wlc_bmac_attach: Unsupported Broadcom board type (0x%x)" " or revision level (0x%x)\n", unit, wlc_hw->sih->boardtype, wlc_hw->boardrev));
WL_ERROR("wl%d: wlc_bmac_attach: Unsupported Broadcom board type (0x%x)" " or revision level (0x%x)\n",
unit, wlc_hw->sih->boardtype, wlc_hw->boardrev);
err = 15;
goto fail;
}
@ -865,8 +872,8 @@ int wlc_bmac_attach(struct wlc_info *wlc, u16 vendor, u16 device, uint unit,
wlc_hw->physhim = wlc_phy_shim_attach(wlc_hw, wlc->wl, wlc);
if (wlc_hw->physhim == NULL) {
WL_ERROR(("wl%d: wlc_bmac_attach: wlc_phy_shim_attach failed\n",
unit));
WL_ERROR("wl%d: wlc_bmac_attach: wlc_phy_shim_attach failed\n",
unit);
err = 25;
goto fail;
}
@ -933,7 +940,8 @@ int wlc_bmac_attach(struct wlc_info *wlc, u16 vendor, u16 device, uint unit,
wlc_hw->band->pi = wlc_phy_attach(wlc_hw->phy_sh,
(void *)regs, wlc_hw->band->bandtype, vars);
if (wlc_hw->band->pi == NULL) {
WL_ERROR(("wl%d: wlc_bmac_attach: wlc_phy_attach failed\n", unit));
WL_ERROR("wl%d: wlc_bmac_attach: wlc_phy_attach failed\n",
unit);
err = 17;
goto fail;
}
@ -963,7 +971,9 @@ int wlc_bmac_attach(struct wlc_info *wlc, u16 vendor, u16 device, uint unit,
goto bad_phy;
} else {
bad_phy:
WL_ERROR(("wl%d: wlc_bmac_attach: unsupported phy type/rev (%d/%d)\n", unit, wlc_hw->band->phytype, wlc_hw->band->phyrev));
WL_ERROR("wl%d: wlc_bmac_attach: unsupported phy type/rev (%d/%d)\n",
unit,
wlc_hw->band->phytype, wlc_hw->band->phyrev);
err = 18;
goto fail;
}
@ -1018,27 +1028,27 @@ int wlc_bmac_attach(struct wlc_info *wlc, u16 vendor, u16 device, uint unit,
/* init etheraddr state variables */
macaddr = wlc_get_macaddr(wlc_hw);
if (macaddr == NULL) {
WL_ERROR(("wl%d: wlc_bmac_attach: macaddr not found\n", unit));
WL_ERROR("wl%d: wlc_bmac_attach: macaddr not found\n", unit);
err = 21;
goto fail;
}
bcm_ether_atoe(macaddr, &wlc_hw->etheraddr);
if (is_broadcast_ether_addr(wlc_hw->etheraddr.octet) ||
is_zero_ether_addr(wlc_hw->etheraddr.octet)) {
WL_ERROR(("wl%d: wlc_bmac_attach: bad macaddr %s\n", unit,
macaddr));
WL_ERROR("wl%d: wlc_bmac_attach: bad macaddr %s\n",
unit, macaddr);
err = 22;
goto fail;
}
WL_ERROR(("%s:: deviceid 0x%x nbands %d board 0x%x macaddr: %s\n",
__func__, wlc_hw->deviceid, wlc_hw->_nbands,
wlc_hw->sih->boardtype, macaddr));
WL_ERROR("%s:: deviceid 0x%x nbands %d board 0x%x macaddr: %s\n",
__func__, wlc_hw->deviceid, wlc_hw->_nbands,
wlc_hw->sih->boardtype, macaddr);
return err;
fail:
WL_ERROR(("wl%d: wlc_bmac_attach: failed with err %d\n", unit, err));
WL_ERROR("wl%d: wlc_bmac_attach: failed with err %d\n", unit, err);
return err;
}
@ -1122,7 +1132,7 @@ int wlc_bmac_detach(struct wlc_info *wlc)
void wlc_bmac_reset(struct wlc_hw_info *wlc_hw)
{
WL_TRACE(("wl%d: wlc_bmac_reset\n", wlc_hw->unit));
WL_TRACE("wl%d: wlc_bmac_reset\n", wlc_hw->unit);
WLCNTINCR(wlc_hw->wlc->pub->_cnt->reset);
@ -1143,7 +1153,7 @@ wlc_bmac_init(struct wlc_hw_info *wlc_hw, chanspec_t chanspec,
bool fastclk;
struct wlc_info *wlc = wlc_hw->wlc;
WL_TRACE(("wl%d: wlc_bmac_init\n", wlc_hw->unit));
WL_TRACE("wl%d: wlc_bmac_init\n", wlc_hw->unit);
/* request FAST clock if not on */
fastclk = wlc_hw->forcefastclk;
@ -1192,7 +1202,7 @@ int wlc_bmac_up_prep(struct wlc_hw_info *wlc_hw)
{
uint coremask;
WL_TRACE(("wl%d: %s:\n", wlc_hw->unit, __func__));
WL_TRACE("wl%d: %s:\n", wlc_hw->unit, __func__);
ASSERT(wlc_hw->wlc->pub->hw_up && wlc_hw->wlc->macintmask == 0);
@ -1238,7 +1248,7 @@ int wlc_bmac_up_prep(struct wlc_hw_info *wlc_hw)
int wlc_bmac_up_finish(struct wlc_hw_info *wlc_hw)
{
WL_TRACE(("wl%d: %s:\n", wlc_hw->unit, __func__));
WL_TRACE("wl%d: %s:\n", wlc_hw->unit, __func__);
wlc_hw->up = true;
wlc_phy_hw_state_upd(wlc_hw->band->pi, true);
@ -1255,7 +1265,7 @@ int wlc_bmac_down_prep(struct wlc_hw_info *wlc_hw)
bool dev_gone;
uint callbacks = 0;
WL_TRACE(("wl%d: %s:\n", wlc_hw->unit, __func__));
WL_TRACE("wl%d: %s:\n", wlc_hw->unit, __func__);
if (!wlc_hw->up)
return callbacks;
@ -1283,7 +1293,7 @@ int wlc_bmac_down_finish(struct wlc_hw_info *wlc_hw)
uint callbacks = 0;
bool dev_gone;
WL_TRACE(("wl%d: %s:\n", wlc_hw->unit, __func__));
WL_TRACE("wl%d: %s:\n", wlc_hw->unit, __func__);
if (!wlc_hw->up)
return callbacks;
@ -1719,7 +1729,7 @@ wlc_bmac_set_rcmta(struct wlc_hw_info *wlc_hw, int idx,
u16 mac_l;
struct osl_info *osh;
WL_TRACE(("wl%d: %s\n", wlc_hw->unit, __func__));
WL_TRACE("wl%d: %s\n", wlc_hw->unit, __func__);
ASSERT(wlc_hw->corerev > 4);
@ -1752,7 +1762,7 @@ wlc_bmac_set_addrmatch(struct wlc_hw_info *wlc_hw, int match_reg_offset,
u16 mac_h;
struct osl_info *osh;
WL_TRACE(("wl%d: wlc_bmac_set_addrmatch\n", wlc_hw->unit));
WL_TRACE("wl%d: wlc_bmac_set_addrmatch\n", wlc_hw->unit);
ASSERT((match_reg_offset < RCM_SIZE) || (wlc_hw->corerev == 4));
@ -1783,7 +1793,7 @@ wlc_bmac_write_template_ram(struct wlc_hw_info *wlc_hw, int offset, int len,
#endif /* IL_BIGENDIAN */
struct osl_info *osh;
WL_TRACE(("wl%d: wlc_bmac_write_template_ram\n", wlc_hw->unit));
WL_TRACE("wl%d: wlc_bmac_write_template_ram\n", wlc_hw->unit);
regs = wlc_hw->regs;
osh = wlc_hw->osh;
@ -1937,8 +1947,8 @@ WLBANDINITFN(wlc_bmac_bsinit) (struct wlc_info *wlc, chanspec_t chanspec)
{
struct wlc_hw_info *wlc_hw = wlc->hw;
WL_TRACE(("wl%d: wlc_bmac_bsinit: bandunit %d\n", wlc_hw->unit,
wlc_hw->band->bandunit));
WL_TRACE("wl%d: wlc_bmac_bsinit: bandunit %d\n",
wlc_hw->unit, wlc_hw->band->bandunit);
/* sanity check */
if (PHY_TYPE(R_REG(wlc_hw->osh, &wlc_hw->regs->phyversion)) !=
@ -1974,7 +1984,7 @@ WLBANDINITFN(wlc_bmac_bsinit) (struct wlc_info *wlc, chanspec_t chanspec)
void wlc_bmac_core_phy_clk(struct wlc_hw_info *wlc_hw, bool clk)
{
WL_TRACE(("wl%d: wlc_bmac_core_phy_clk: clk %d\n", wlc_hw->unit, clk));
WL_TRACE("wl%d: wlc_bmac_core_phy_clk: clk %d\n", wlc_hw->unit, clk);
wlc_hw->phyclk = clk;
@ -1999,7 +2009,7 @@ void wlc_bmac_core_phy_clk(struct wlc_hw_info *wlc_hw, bool clk)
/* Perform a soft reset of the PHY PLL */
void wlc_bmac_core_phypll_reset(struct wlc_hw_info *wlc_hw)
{
WL_TRACE(("wl%d: wlc_bmac_core_phypll_reset\n", wlc_hw->unit));
WL_TRACE("wl%d: wlc_bmac_core_phypll_reset\n", wlc_hw->unit);
si_corereg(wlc_hw->sih, SI_CC_IDX,
offsetof(chipcregs_t, chipcontrol_addr), ~0, 0);
@ -2045,7 +2055,7 @@ void wlc_bmac_phy_reset(struct wlc_hw_info *wlc_hw)
u32 phy_bw_clkbits;
bool phy_in_reset = false;
WL_TRACE(("wl%d: wlc_bmac_phy_reset\n", wlc_hw->unit));
WL_TRACE("wl%d: wlc_bmac_phy_reset\n", wlc_hw->unit);
if (pih == NULL)
return;
@ -2127,7 +2137,7 @@ WLBANDINITFN(wlc_bmac_setband) (struct wlc_hw_info *wlc_hw, uint bandunit,
/* low-level band switch utility routine */
void WLBANDINITFN(wlc_setxband) (struct wlc_hw_info *wlc_hw, uint bandunit)
{
WL_TRACE(("wl%d: wlc_setxband: bandunit %d\n", wlc_hw->unit, bandunit));
WL_TRACE("wl%d: wlc_setxband: bandunit %d\n", wlc_hw->unit, bandunit);
wlc_hw->band = wlc_hw->bandstate[bandunit];
@ -2146,7 +2156,7 @@ static bool wlc_isgoodchip(struct wlc_hw_info *wlc_hw)
/* reject unsupported corerev */
if (!VALID_COREREV(wlc_hw->corerev)) {
WL_ERROR(("unsupported core rev %d\n", wlc_hw->corerev));
WL_ERROR("unsupported core rev %d\n", wlc_hw->corerev);
return false;
}
@ -2194,7 +2204,8 @@ static char *wlc_get_macaddr(struct wlc_hw_info *wlc_hw)
macaddr = getvar(wlc_hw->vars, varname);
if (macaddr == NULL) {
WL_ERROR(("wl%d: wlc_get_macaddr: macaddr getvar(%s) not found\n", wlc_hw->unit, varname));
WL_ERROR("wl%d: wlc_get_macaddr: macaddr getvar(%s) not found\n",
wlc_hw->unit, varname);
}
return macaddr;
@ -2257,7 +2268,7 @@ void wlc_bmac_hw_up(struct wlc_hw_info *wlc_hw)
if (wlc_hw->wlc->pub->hw_up)
return;
WL_TRACE(("wl%d: %s:\n", wlc_hw->unit, __func__));
WL_TRACE("wl%d: %s:\n", wlc_hw->unit, __func__);
/*
* Enable pll and xtal, initialize the power control registers,
@ -2312,7 +2323,8 @@ static bool wlc_dma_rxreset(struct wlc_hw_info *wlc_hw, uint fifo)
50000);
if (!rxidle && (rcv_frm_cnt != 0))
WL_ERROR(("wl%d: %s: rxdma[%d] not idle && rcv_frm_cnt(%d) not zero\n", wlc_hw->unit, __func__, fifo, rcv_frm_cnt));
WL_ERROR("wl%d: %s: rxdma[%d] not idle && rcv_frm_cnt(%d) not zero\n",
wlc_hw->unit, __func__, fifo, rcv_frm_cnt);
mdelay(2);
}
@ -2337,7 +2349,7 @@ void wlc_bmac_corereset(struct wlc_hw_info *wlc_hw, u32 flags)
if (flags == WLC_USE_COREFLAGS)
flags = (wlc_hw->band->pi ? wlc_hw->band->core_flags : 0);
WL_TRACE(("wl%d: %s\n", wlc_hw->unit, __func__));
WL_TRACE("wl%d: %s\n", wlc_hw->unit, __func__);
regs = wlc_hw->regs;
@ -2350,17 +2362,20 @@ void wlc_bmac_corereset(struct wlc_hw_info *wlc_hw, u32 flags)
if (si_iscoreup(wlc_hw->sih)) {
for (i = 0; i < NFIFO; i++)
if ((wlc_hw->di[i]) && (!dma_txreset(wlc_hw->di[i]))) {
WL_ERROR(("wl%d: %s: dma_txreset[%d]: cannot stop dma\n", wlc_hw->unit, __func__, i));
WL_ERROR("wl%d: %s: dma_txreset[%d]: cannot stop dma\n",
wlc_hw->unit, __func__, i);
}
if ((wlc_hw->di[RX_FIFO])
&& (!wlc_dma_rxreset(wlc_hw, RX_FIFO))) {
WL_ERROR(("wl%d: %s: dma_rxreset[%d]: cannot stop dma\n", wlc_hw->unit, __func__, RX_FIFO));
WL_ERROR("wl%d: %s: dma_rxreset[%d]: cannot stop dma\n",
wlc_hw->unit, __func__, RX_FIFO);
}
if (D11REV_IS(wlc_hw->corerev, 4)
&& wlc_hw->di[RX_TXSTATUS_FIFO]
&& (!wlc_dma_rxreset(wlc_hw, RX_TXSTATUS_FIFO))) {
WL_ERROR(("wl%d: %s: dma_rxreset[%d]: cannot stop dma\n", wlc_hw->unit, __func__, RX_TXSTATUS_FIFO));
WL_ERROR("wl%d: %s: dma_rxreset[%d]: cannot stop dma\n",
wlc_hw->unit, __func__, RX_TXSTATUS_FIFO);
}
}
/* if noreset, just stop the psm and return */
@ -2491,7 +2506,7 @@ static void wlc_coreinit(struct wlc_info *wlc)
regs = wlc_hw->regs;
osh = wlc_hw->osh;
WL_TRACE(("wl%d: wlc_coreinit\n", wlc_hw->unit));
WL_TRACE("wl%d: wlc_coreinit\n", wlc_hw->unit);
/* reset PSM */
wlc_bmac_mctrl(wlc_hw, ~0, (MCTL_IHR_EN | MCTL_PSM_JMP_0 | MCTL_WAKE));
@ -2514,8 +2529,8 @@ static void wlc_coreinit(struct wlc_info *wlc)
SPINWAIT(((R_REG(osh, &regs->macintstatus) & MI_MACSSPNDD) == 0),
1000 * 1000);
if ((R_REG(osh, &regs->macintstatus) & MI_MACSSPNDD) == 0)
WL_ERROR(("wl%d: wlc_coreinit: ucode did not self-suspend!\n",
wlc_hw->unit));
WL_ERROR("wl%d: wlc_coreinit: ucode did not self-suspend!\n",
wlc_hw->unit);
wlc_gpio_init(wlc);
@ -2525,18 +2540,18 @@ static void wlc_coreinit(struct wlc_info *wlc)
if (WLCISNPHY(wlc_hw->band))
wlc_write_inits(wlc_hw, d11n0initvals16);
else
WL_ERROR(("%s: wl%d: unsupported phy in corerev %d\n",
__func__, wlc_hw->unit, wlc_hw->corerev));
WL_ERROR("%s: wl%d: unsupported phy in corerev %d\n",
__func__, wlc_hw->unit, wlc_hw->corerev);
} else if (D11REV_IS(wlc_hw->corerev, 24)) {
if (WLCISLCNPHY(wlc_hw->band)) {
wlc_write_inits(wlc_hw, d11lcn0initvals24);
} else {
WL_ERROR(("%s: wl%d: unsupported phy in corerev %d\n",
__func__, wlc_hw->unit, wlc_hw->corerev));
WL_ERROR("%s: wl%d: unsupported phy in corerev %d\n",
__func__, wlc_hw->unit, wlc_hw->corerev);
}
} else {
WL_ERROR(("%s: wl%d: unsupported corerev %d\n",
__func__, wlc_hw->unit, wlc_hw->corerev));
WL_ERROR("%s: wl%d: unsupported corerev %d\n",
__func__, wlc_hw->unit, wlc_hw->corerev);
}
/* For old ucode, txfifo sizes needs to be modified(increased) for Corerev >= 9 */
@ -2578,7 +2593,8 @@ static void wlc_coreinit(struct wlc_info *wlc)
err = -1;
}
if (err != 0) {
WL_ERROR(("wlc_coreinit: txfifo mismatch: ucode size %d driver size %d index %d\n", buf[i], wlc_hw->xmtfifo_sz[i], i));
WL_ERROR("wlc_coreinit: txfifo mismatch: ucode size %d driver size %d index %d\n",
buf[i], wlc_hw->xmtfifo_sz[i], i);
/* DO NOT ASSERT corerev < 4 even there is a mismatch
* shmem, since driver don't overwrite those chip and
* ucode initialize data will be used.
@ -2797,16 +2813,16 @@ static void wlc_ucode_download(struct wlc_hw_info *wlc_hw)
bcm43xx_16_mimosz);
wlc_hw->ucode_loaded = true;
} else
WL_ERROR(("%s: wl%d: unsupported phy in corerev %d\n",
__func__, wlc_hw->unit, wlc_hw->corerev));
WL_ERROR("%s: wl%d: unsupported phy in corerev %d\n",
__func__, wlc_hw->unit, wlc_hw->corerev);
} else if (D11REV_IS(wlc_hw->corerev, 24)) {
if (WLCISLCNPHY(wlc_hw->band)) {
wlc_ucode_write(wlc_hw, bcm43xx_24_lcn,
bcm43xx_24_lcnsz);
wlc_hw->ucode_loaded = true;
} else {
WL_ERROR(("%s: wl%d: unsupported phy in corerev %d\n",
__func__, wlc_hw->unit, wlc_hw->corerev));
WL_ERROR("%s: wl%d: unsupported phy in corerev %d\n",
__func__, wlc_hw->unit, wlc_hw->corerev);
}
}
}
@ -2820,7 +2836,7 @@ static void wlc_ucode_write(struct wlc_hw_info *wlc_hw, const u32 ucode[],
osh = wlc_hw->osh;
WL_TRACE(("wl%d: wlc_ucode_write\n", wlc_hw->unit));
WL_TRACE("wl%d: wlc_ucode_write\n", wlc_hw->unit);
ASSERT(IS_ALIGNED(nbytes, sizeof(u32)));
@ -2838,7 +2854,7 @@ static void wlc_write_inits(struct wlc_hw_info *wlc_hw, const d11init_t *inits)
struct osl_info *osh;
volatile u8 *base;
WL_TRACE(("wl%d: wlc_write_inits\n", wlc_hw->unit));
WL_TRACE("wl%d: wlc_write_inits\n", wlc_hw->unit);
osh = wlc_hw->osh;
base = (volatile u8 *)wlc_hw->regs;
@ -2914,44 +2930,45 @@ void wlc_bmac_fifoerrors(struct wlc_hw_info *wlc_hw)
if (!intstatus)
continue;
WL_TRACE(("wl%d: wlc_bmac_fifoerrors: intstatus%d 0x%x\n", unit,
idx, intstatus));
WL_TRACE("wl%d: wlc_bmac_fifoerrors: intstatus%d 0x%x\n",
unit, idx, intstatus);
if (intstatus & I_RO) {
WL_ERROR(("wl%d: fifo %d: receive fifo overflow\n",
unit, idx));
WL_ERROR("wl%d: fifo %d: receive fifo overflow\n",
unit, idx);
WLCNTINCR(wlc_hw->wlc->pub->_cnt->rxoflo);
fatal = true;
}
if (intstatus & I_PC) {
WL_ERROR(("wl%d: fifo %d: descriptor error\n", unit,
idx));
WL_ERROR("wl%d: fifo %d: descriptor error\n",
unit, idx);
WLCNTINCR(wlc_hw->wlc->pub->_cnt->dmade);
fatal = true;
}
if (intstatus & I_PD) {
WL_ERROR(("wl%d: fifo %d: data error\n", unit, idx));
WL_ERROR("wl%d: fifo %d: data error\n", unit, idx);
WLCNTINCR(wlc_hw->wlc->pub->_cnt->dmada);
fatal = true;
}
if (intstatus & I_DE) {
WL_ERROR(("wl%d: fifo %d: descriptor protocol error\n",
unit, idx));
WL_ERROR("wl%d: fifo %d: descriptor protocol error\n",
unit, idx);
WLCNTINCR(wlc_hw->wlc->pub->_cnt->dmape);
fatal = true;
}
if (intstatus & I_RU) {
WL_ERROR(("wl%d: fifo %d: receive descriptor underflow\n", unit, idx));
WL_ERROR("wl%d: fifo %d: receive descriptor underflow\n",
idx, unit);
WLCNTINCR(wlc_hw->wlc->pub->_cnt->rxuflo[idx]);
}
if (intstatus & I_XU) {
WL_ERROR(("wl%d: fifo %d: transmit fifo underflow\n",
idx, unit));
WL_ERROR("wl%d: fifo %d: transmit fifo underflow\n",
idx, unit);
WLCNTINCR(wlc_hw->wlc->pub->_cnt->txuflo);
fatal = true;
}
@ -3185,7 +3202,7 @@ static inline u32 wlc_intstatus(struct wlc_info *wlc, bool in_isr)
/* macintstatus includes a DMA interrupt summary bit */
macintstatus = R_REG(osh, &regs->macintstatus);
WL_TRACE(("wl%d: macintstatus: 0x%x\n", wlc_hw->unit, macintstatus));
WL_TRACE("wl%d: macintstatus: 0x%x\n", wlc_hw->unit, macintstatus);
/* detect cardbus removed, in power down(suspend) and in reset */
if (DEVICEREMOVED(wlc))
@ -3225,7 +3242,9 @@ static inline u32 wlc_intstatus(struct wlc_info *wlc, bool in_isr)
R_REG(osh,
&regs->intctrlregs[RX_TXSTATUS_FIFO].
intstatus);
WL_TRACE(("wl%d: intstatus_rxfifo 0x%x, intstatus_txsfifo 0x%x\n", wlc_hw->unit, intstatus_rxfifo, intstatus_txsfifo));
WL_TRACE("wl%d: intstatus_rxfifo 0x%x, intstatus_txsfifo 0x%x\n",
wlc_hw->unit,
intstatus_rxfifo, intstatus_txsfifo);
/* defer unsolicited interrupt hints */
intstatus_rxfifo &= DEF_RXINTMASK;
@ -3301,7 +3320,7 @@ bool BCMFASTPATH wlc_isr(struct wlc_info *wlc, bool *wantdpc)
macintstatus = wlc_intstatus(wlc, true);
if (macintstatus == 0xffffffff)
WL_ERROR(("DEVICEREMOVED detected in the ISR code path.\n"));
WL_ERROR("DEVICEREMOVED detected in the ISR code path\n");
/* it is not for us */
if (macintstatus == 0)
@ -3325,7 +3344,7 @@ static bool wlc_bmac_txstatus_corerev4(struct wlc_hw_info *wlc_hw)
struct osl_info *osh;
bool fatal = false;
WL_TRACE(("wl%d: wlc_txstatusrecv\n", wlc_hw->unit));
WL_TRACE("wl%d: wlc_txstatusrecv\n", wlc_hw->unit);
osh = wlc_hw->osh;
@ -3378,7 +3397,7 @@ wlc_bmac_txstatus(struct wlc_hw_info *wlc_hw, bool bound, bool *fatal)
bool morepending = false;
struct wlc_info *wlc = wlc_hw->wlc;
WL_TRACE(("wl%d: wlc_bmac_txstatus\n", wlc_hw->unit));
WL_TRACE("wl%d: wlc_bmac_txstatus\n", wlc_hw->unit);
if (D11REV_IS(wlc_hw->corerev, 4)) {
/* to retire soon */
@ -3403,8 +3422,8 @@ wlc_bmac_txstatus(struct wlc_hw_info *wlc_hw, bool bound, bool *fatal)
&& (s1 = R_REG(osh, &regs->frmtxstatus)) & TXS_V) {
if (s1 == 0xffffffff) {
WL_ERROR(("wl%d: %s: dead chip\n",
wlc_hw->unit, __func__));
WL_ERROR("wl%d: %s: dead chip\n",
wlc_hw->unit, __func__);
ASSERT(s1 != 0xffffffff);
return morepending;
}
@ -3444,8 +3463,8 @@ void wlc_suspend_mac_and_wait(struct wlc_info *wlc)
u32 mc, mi;
struct osl_info *osh;
WL_TRACE(("wl%d: wlc_suspend_mac_and_wait: bandunit %d\n", wlc_hw->unit,
wlc_hw->band->bandunit));
WL_TRACE("wl%d: wlc_suspend_mac_and_wait: bandunit %d\n",
wlc_hw->unit, wlc_hw->band->bandunit);
/*
* Track overlapping suspend requests
@ -3462,7 +3481,7 @@ void wlc_suspend_mac_and_wait(struct wlc_info *wlc)
mc = R_REG(osh, &regs->maccontrol);
if (mc == 0xffffffff) {
WL_ERROR(("wl%d: %s: dead chip\n", wlc_hw->unit, __func__));
WL_ERROR("wl%d: %s: dead chip\n", wlc_hw->unit, __func__);
wl_down(wlc->wl);
return;
}
@ -3472,7 +3491,7 @@ void wlc_suspend_mac_and_wait(struct wlc_info *wlc)
mi = R_REG(osh, &regs->macintstatus);
if (mi == 0xffffffff) {
WL_ERROR(("wl%d: %s: dead chip\n", wlc_hw->unit, __func__));
WL_ERROR("wl%d: %s: dead chip\n", wlc_hw->unit, __func__);
wl_down(wlc->wl);
return;
}
@ -3484,15 +3503,18 @@ void wlc_suspend_mac_and_wait(struct wlc_info *wlc)
WLC_MAX_MAC_SUSPEND);
if (!(R_REG(osh, &regs->macintstatus) & MI_MACSSPNDD)) {
WL_ERROR(("wl%d: wlc_suspend_mac_and_wait: waited %d uS and "
"MI_MACSSPNDD is still not on.\n",
wlc_hw->unit, WLC_MAX_MAC_SUSPEND));
WL_ERROR(("wl%d: psmdebug 0x%08x, phydebug 0x%08x, psm_brc 0x%04x\n", wlc_hw->unit, R_REG(osh, &regs->psmdebug), R_REG(osh, &regs->phydebug), R_REG(osh, &regs->psm_brc)));
WL_ERROR("wl%d: wlc_suspend_mac_and_wait: waited %d uS and MI_MACSSPNDD is still not on.\n",
wlc_hw->unit, WLC_MAX_MAC_SUSPEND);
WL_ERROR("wl%d: psmdebug 0x%08x, phydebug 0x%08x, psm_brc 0x%04x\n",
wlc_hw->unit,
R_REG(osh, &regs->psmdebug),
R_REG(osh, &regs->phydebug),
R_REG(osh, &regs->psm_brc));
}
mc = R_REG(osh, &regs->maccontrol);
if (mc == 0xffffffff) {
WL_ERROR(("wl%d: %s: dead chip\n", wlc_hw->unit, __func__));
WL_ERROR("wl%d: %s: dead chip\n", wlc_hw->unit, __func__);
wl_down(wlc->wl);
return;
}
@ -3508,8 +3530,8 @@ void wlc_enable_mac(struct wlc_info *wlc)
u32 mc, mi;
struct osl_info *osh;
WL_TRACE(("wl%d: wlc_enable_mac: bandunit %d\n", wlc_hw->unit,
wlc->band->bandunit));
WL_TRACE("wl%d: wlc_enable_mac: bandunit %d\n",
wlc_hw->unit, wlc->band->bandunit);
/*
* Track overlapping suspend requests
@ -3671,7 +3693,7 @@ bool wlc_bmac_validate_chip_access(struct wlc_hw_info *wlc_hw)
volatile u16 *reg16;
struct osl_info *osh;
WL_TRACE(("wl%d: validate_chip_access\n", wlc_hw->unit));
WL_TRACE("wl%d: validate_chip_access\n", wlc_hw->unit);
regs = wlc_hw->regs;
osh = wlc_hw->osh;
@ -3691,7 +3713,8 @@ bool wlc_bmac_validate_chip_access(struct wlc_hw_info *wlc_hw)
(void)R_REG(osh, &regs->objaddr);
val = R_REG(osh, &regs->objdata);
if (val != (u32) 0xaa5555aa) {
WL_ERROR(("wl%d: validate_chip_access: SHM = 0x%x, expected 0xaa5555aa\n", wlc_hw->unit, val));
WL_ERROR("wl%d: validate_chip_access: SHM = 0x%x, expected 0xaa5555aa\n",
wlc_hw->unit, val);
return false;
}
@ -3703,7 +3726,8 @@ bool wlc_bmac_validate_chip_access(struct wlc_hw_info *wlc_hw)
(void)R_REG(osh, &regs->objaddr);
val = R_REG(osh, &regs->objdata);
if (val != (u32) 0x55aaaa55) {
WL_ERROR(("wl%d: validate_chip_access: SHM = 0x%x, expected 0x55aaaa55\n", wlc_hw->unit, val));
WL_ERROR("wl%d: validate_chip_access: SHM = 0x%x, expected 0x55aaaa55\n",
wlc_hw->unit, val);
return false;
}
@ -3733,12 +3757,14 @@ bool wlc_bmac_validate_chip_access(struct wlc_hw_info *wlc_hw)
/* verify with the 16 bit registers that have no side effects */
val = R_REG(osh, &regs->tsf_cfpstrt_l);
if (val != (uint) 0xBBBB) {
WL_ERROR(("wl%d: validate_chip_access: tsf_cfpstrt_l = 0x%x, expected" " 0x%x\n", wlc_hw->unit, val, 0xBBBB));
WL_ERROR("wl%d: validate_chip_access: tsf_cfpstrt_l = 0x%x, expected 0x%x\n",
wlc_hw->unit, val, 0xBBBB);
return false;
}
val = R_REG(osh, &regs->tsf_cfpstrt_h);
if (val != (uint) 0xCCCC) {
WL_ERROR(("wl%d: validate_chip_access: tsf_cfpstrt_h = 0x%x, expected" " 0x%x\n", wlc_hw->unit, val, 0xCCCC));
WL_ERROR("wl%d: validate_chip_access: tsf_cfpstrt_h = 0x%x, expected 0x%x\n",
wlc_hw->unit, val, 0xCCCC);
return false;
}
@ -3750,7 +3776,10 @@ bool wlc_bmac_validate_chip_access(struct wlc_hw_info *wlc_hw)
w = R_REG(osh, &regs->maccontrol);
if ((w != (MCTL_IHR_EN | MCTL_WAKE)) &&
(w != (MCTL_IHR_EN | MCTL_GMODE | MCTL_WAKE))) {
WL_ERROR(("wl%d: validate_chip_access: maccontrol = 0x%x, expected 0x%x or 0x%x\n", wlc_hw->unit, w, (MCTL_IHR_EN | MCTL_WAKE), (MCTL_IHR_EN | MCTL_GMODE | MCTL_WAKE)));
WL_ERROR("wl%d: validate_chip_access: maccontrol = 0x%x, expected 0x%x or 0x%x\n",
wlc_hw->unit, w,
(MCTL_IHR_EN | MCTL_WAKE),
(MCTL_IHR_EN | MCTL_GMODE | MCTL_WAKE));
return false;
}
@ -3765,7 +3794,7 @@ void wlc_bmac_core_phypll_ctl(struct wlc_hw_info *wlc_hw, bool on)
struct osl_info *osh;
u32 tmp;
WL_TRACE(("wl%d: wlc_bmac_core_phypll_ctl\n", wlc_hw->unit));
WL_TRACE("wl%d: wlc_bmac_core_phypll_ctl\n", wlc_hw->unit);
tmp = 0;
regs = wlc_hw->regs;
@ -3786,8 +3815,8 @@ void wlc_bmac_core_phypll_ctl(struct wlc_hw_info *wlc_hw, bool on)
tmp = R_REG(osh, &regs->clk_ctl_st);
if ((tmp & (CCS_ERSRC_AVAIL_HT)) !=
(CCS_ERSRC_AVAIL_HT)) {
WL_ERROR(("%s: turn on PHY PLL failed\n",
__func__));
WL_ERROR("%s: turn on PHY PLL failed\n",
__func__);
ASSERT(0);
}
} else {
@ -3804,8 +3833,8 @@ void wlc_bmac_core_phypll_ctl(struct wlc_hw_info *wlc_hw, bool on)
(CCS_ERSRC_AVAIL_D11PLL | CCS_ERSRC_AVAIL_PHYPLL))
!=
(CCS_ERSRC_AVAIL_D11PLL | CCS_ERSRC_AVAIL_PHYPLL)) {
WL_ERROR(("%s: turn on PHY PLL failed\n",
__func__));
WL_ERROR("%s: turn on PHY PLL failed\n",
__func__);
ASSERT(0);
}
}
@ -3822,7 +3851,7 @@ void wlc_coredisable(struct wlc_hw_info *wlc_hw)
{
bool dev_gone;
WL_TRACE(("wl%d: %s\n", wlc_hw->unit, __func__));
WL_TRACE("wl%d: %s\n", wlc_hw->unit, __func__);
ASSERT(!wlc_hw->up);
@ -3860,7 +3889,7 @@ void wlc_coredisable(struct wlc_hw_info *wlc_hw)
/* power both the pll and external oscillator on/off */
void wlc_bmac_xtal(struct wlc_hw_info *wlc_hw, bool want)
{
WL_TRACE(("wl%d: wlc_bmac_xtal: want %d\n", wlc_hw->unit, want));
WL_TRACE("wl%d: wlc_bmac_xtal: want %d\n", wlc_hw->unit, want);
/* dont power down if plldown is false or we must poll hw radio disable */
if (!want && wlc_hw->pllreq)
@ -3889,8 +3918,8 @@ static void wlc_flushqueues(struct wlc_info *wlc)
if (wlc_hw->di[i]) {
dma_txreclaim(wlc_hw->di[i], HNDDMA_RANGE_ALL);
TXPKTPENDCLR(wlc, i);
WL_TRACE(("wlc_flushqueues: pktpend fifo %d cleared\n",
i));
WL_TRACE("wlc_flushqueues: pktpend fifo %d cleared\n",
i);
}
/* free any posted rx packets */
@ -4023,8 +4052,8 @@ wlc_bmac_copyfrom_objmem(struct wlc_hw_info *wlc_hw, uint offset, void *buf,
void wlc_bmac_copyfrom_vars(struct wlc_hw_info *wlc_hw, char **buf, uint *len)
{
WL_TRACE(("wlc_bmac_copyfrom_vars, nvram vars totlen=%d\n",
wlc_hw->vars_size));
WL_TRACE("wlc_bmac_copyfrom_vars, nvram vars totlen=%d\n",
wlc_hw->vars_size);
*buf = wlc_hw->vars;
*len = wlc_hw->vars_size;
@ -4133,7 +4162,7 @@ void wlc_gpio_fast_deinit(struct wlc_hw_info *wlc_hw)
(wlc_hw->sih->buscorerev >= 13)))))
return;
WL_TRACE(("wl%d: %s\n", wlc_hw->unit, __func__));
WL_TRACE("wl%d: %s\n", wlc_hw->unit, __func__);
return;
}

Просмотреть файл

@ -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;
}

Просмотреть файл

@ -306,7 +306,7 @@ void wlc_get_rcmta(struct wlc_info *wlc, int idx, struct ether_addr *addr)
u32 v32;
struct osl_info *osh;
WL_TRACE(("wl%d: %s\n", WLCWLUNIT(wlc), __func__));
WL_TRACE("wl%d: %s\n", WLCWLUNIT(wlc), __func__);
ASSERT(wlc->pub->corerev > 4);
@ -364,7 +364,7 @@ bool wlc_ps_allowed(struct wlc_info *wlc)
void wlc_reset(struct wlc_info *wlc)
{
WL_TRACE(("wl%d: wlc_reset\n", wlc->pub->unit));
WL_TRACE("wl%d: wlc_reset\n", wlc->pub->unit);
wlc->check_for_unaligned_tbtt = false;
@ -385,7 +385,7 @@ void wlc_reset(struct wlc_info *wlc)
void wlc_fatal_error(struct wlc_info *wlc)
{
WL_ERROR(("wl%d: fatal error, reinitializing\n", wlc->pub->unit));
WL_ERROR("wl%d: fatal error, reinitializing\n", wlc->pub->unit);
wl_init(wlc->wl);
}
@ -426,7 +426,7 @@ void wlc_init(struct wlc_info *wlc)
wlc_bsscfg_t *bsscfg;
bool mute = false;
WL_TRACE(("wl%d: wlc_init\n", wlc->pub->unit));
WL_TRACE("wl%d: wlc_init\n", wlc->pub->unit);
regs = wlc->regs;
@ -605,8 +605,8 @@ bool wlc_ps_check(struct wlc_info *wlc)
* to avoid assert
*/
if (tmp == 0xffffffff) {
WL_ERROR(("wl%d: %s: dead chip\n", wlc->pub->unit,
__func__));
WL_ERROR("wl%d: %s: dead chip\n",
wlc->pub->unit, __func__);
return DEVICEREMOVED(wlc);
}
@ -615,7 +615,8 @@ bool wlc_ps_check(struct wlc_info *wlc)
if (hps != ((tmp & MCTL_HPS) != 0)) {
int idx;
wlc_bsscfg_t *cfg;
WL_ERROR(("wl%d: hps not sync, sw %d, maccontrol 0x%x\n", wlc->pub->unit, hps, tmp));
WL_ERROR("wl%d: hps not sync, sw %d, maccontrol 0x%x\n",
wlc->pub->unit, hps, tmp);
FOREACH_BSS(wlc, idx, cfg) {
if (!BSSCFG_STA(cfg))
continue;
@ -629,7 +630,8 @@ bool wlc_ps_check(struct wlc_info *wlc)
wake = STAY_AWAKE(wlc) || wlc->hw->wake_override;
wake_ok = (wake == ((tmp & MCTL_WAKE) != 0));
if (hps && !wake_ok) {
WL_ERROR(("wl%d: wake not sync, sw %d maccontrol 0x%x\n", wlc->pub->unit, wake, tmp));
WL_ERROR("wl%d: wake not sync, sw %d maccontrol 0x%x\n",
wlc->pub->unit, wake, tmp);
res = false;
}
}
@ -647,8 +649,8 @@ void wlc_set_ps_ctrl(struct wlc_info *wlc)
hps = PS_ALLOWED(wlc);
wake = hps ? (STAY_AWAKE(wlc)) : true;
WL_TRACE(("wl%d: wlc_set_ps_ctrl: hps %d wake %d\n", wlc->pub->unit,
hps, wake));
WL_TRACE("wl%d: wlc_set_ps_ctrl: hps %d wake %d\n",
wlc->pub->unit, hps, wake);
v1 = R_REG(wlc->osh, &wlc->regs->maccontrol);
v2 = 0;
@ -806,8 +808,8 @@ void wlc_set_chanspec(struct wlc_info *wlc, chanspec_t chanspec)
chanspec_t old_chanspec = wlc->chanspec;
if (!wlc_valid_chanspec_db(wlc->cmi, chanspec)) {
WL_ERROR(("wl%d: %s: Bad channel %d\n",
wlc->pub->unit, __func__, CHSPEC_CHANNEL(chanspec)));
WL_ERROR("wl%d: %s: Bad channel %d\n",
wlc->pub->unit, __func__, CHSPEC_CHANNEL(chanspec));
ASSERT(wlc_valid_chanspec_db(wlc->cmi, chanspec));
return;
}
@ -818,7 +820,9 @@ void wlc_set_chanspec(struct wlc_info *wlc, chanspec_t chanspec)
if (wlc->band->bandunit != bandunit || wlc->bandinit_pending) {
switchband = true;
if (wlc->bandlocked) {
WL_ERROR(("wl%d: %s: chspec %d band is locked!\n", wlc->pub->unit, __func__, CHSPEC_CHANNEL(chanspec)));
WL_ERROR("wl%d: %s: chspec %d band is locked!\n",
wlc->pub->unit, __func__,
CHSPEC_CHANNEL(chanspec));
return;
}
/* BMAC_NOTE: should the setband call come after the wlc_bmac_chanspec() ?
@ -1120,7 +1124,7 @@ void wlc_beacon_phytxctl_txant_upd(struct wlc_info *wlc, ratespec_t bcn_rspec)
*/
void wlc_protection_upd(struct wlc_info *wlc, uint idx, int val)
{
WL_TRACE(("wlc_protection_upd: idx %d, val %d\n", idx, val));
WL_TRACE("wlc_protection_upd: idx %d, val %d\n", idx, val);
switch (idx) {
case WLC_PROT_G_SPEC:
@ -1228,7 +1232,7 @@ static void wlc_bandinit_ordered(struct wlc_info *wlc, chanspec_t chanspec)
uint parkband;
uint i, band_order[2];
WL_TRACE(("wl%d: wlc_bandinit_ordered\n", wlc->pub->unit));
WL_TRACE("wl%d: wlc_bandinit_ordered\n", wlc->pub->unit);
/*
* We might have been bandlocked during down and the chip power-cycled (hibernate).
* figure out the right band to park on
@ -1271,8 +1275,8 @@ static void wlc_bandinit_ordered(struct wlc_info *wlc, chanspec_t chanspec)
/* band-specific init */
static void WLBANDINITFN(wlc_bsinit) (struct wlc_info *wlc)
{
WL_TRACE(("wl%d: wlc_bsinit: bandunit %d\n", wlc->pub->unit,
wlc->band->bandunit));
WL_TRACE("wl%d: wlc_bsinit: bandunit %d\n",
wlc->pub->unit, wlc->band->bandunit);
/* write ucode ACK/CTS rate table */
wlc_set_ratetable(wlc);
@ -1348,7 +1352,7 @@ void wlc_wme_setparams(struct wlc_info *wlc, u16 aci, void *arg, bool suspend)
/* Only apply params if the core is out of reset and has clocks */
if (!wlc->clk) {
WL_ERROR(("wl%d: %s : no-clock\n", wlc->pub->unit, __func__));
WL_ERROR("wl%d: %s : no-clock\n", wlc->pub->unit, __func__);
return;
}
@ -1380,8 +1384,8 @@ void wlc_wme_setparams(struct wlc_info *wlc, u16 aci, void *arg, bool suspend)
if (acp_shm.aifs < EDCF_AIFSN_MIN
|| acp_shm.aifs > EDCF_AIFSN_MAX) {
WL_ERROR(("wl%d: wlc_edcf_setparams: bad aifs %d\n",
wlc->pub->unit, acp_shm.aifs));
WL_ERROR("wl%d: wlc_edcf_setparams: bad aifs %d\n",
wlc->pub->unit, acp_shm.aifs);
continue;
}
@ -1464,8 +1468,8 @@ void wlc_edcf_setparams(wlc_bsscfg_t *cfg, bool suspend)
if (acp_shm.aifs < EDCF_AIFSN_MIN
|| acp_shm.aifs > EDCF_AIFSN_MAX) {
WL_ERROR(("wl%d: wlc_edcf_setparams: bad aifs %d\n",
wlc->pub->unit, acp_shm.aifs));
WL_ERROR("wl%d: wlc_edcf_setparams: bad aifs %d\n",
wlc->pub->unit, acp_shm.aifs);
continue;
}
@ -1512,15 +1516,14 @@ bool wlc_timers_init(struct wlc_info *wlc, int unit)
wlc->wdtimer = wl_init_timer(wlc->wl, wlc_watchdog_by_timer,
wlc, "watchdog");
if (!wlc->wdtimer) {
WL_ERROR(("wl%d: wl_init_timer for wdtimer failed\n", unit));
WL_ERROR("wl%d: wl_init_timer for wdtimer failed\n", unit);
goto fail;
}
wlc->radio_timer = wl_init_timer(wlc->wl, wlc_radio_timer,
wlc, "radio");
if (!wlc->radio_timer) {
WL_ERROR(("wl%d: wl_init_timer for radio_timer failed\n",
unit));
WL_ERROR("wl%d: wl_init_timer for radio_timer failed\n", unit);
goto fail;
}
@ -1667,15 +1670,14 @@ static uint wlc_attach_module(struct wlc_info *wlc)
wlc->asi = wlc_antsel_attach(wlc, wlc->osh, wlc->pub, wlc->hw);
if (wlc->asi == NULL) {
WL_ERROR(("wl%d: wlc_attach: wlc_antsel_attach failed\n",
unit));
WL_ERROR("wl%d: wlc_attach: wlc_antsel_attach failed\n", unit);
err = 44;
goto fail;
}
wlc->ampdu = wlc_ampdu_attach(wlc);
if (wlc->ampdu == NULL) {
WL_ERROR(("wl%d: wlc_attach: wlc_ampdu_attach failed\n", unit));
WL_ERROR("wl%d: wlc_attach: wlc_ampdu_attach failed\n", unit);
err = 50;
goto fail;
}
@ -1684,13 +1686,13 @@ static uint wlc_attach_module(struct wlc_info *wlc)
wlc->eventq =
wlc_eventq_attach(wlc->pub, wlc, wlc->wl, wlc_process_eventq);
if (wlc->eventq == NULL) {
WL_ERROR(("wl%d: wlc_attach: wlc_eventq_attachfailed\n", unit));
WL_ERROR("wl%d: wlc_attach: wlc_eventq_attachfailed\n", unit);
err = 57;
goto fail;
}
if ((wlc_stf_attach(wlc) != 0)) {
WL_ERROR(("wl%d: wlc_attach: wlc_stf_attach failed\n", unit));
WL_ERROR("wl%d: wlc_attach: wlc_stf_attach failed\n", unit);
err = 68;
goto fail;
}
@ -1719,8 +1721,8 @@ void *wlc_attach(void *wl, u16 vendor, u16 device, uint unit, bool piomode,
wlc_txq_info_t *qi;
uint n_disabled;
WL_NONE(("wl%d: %s: vendor 0x%x device 0x%x\n", unit, __func__, vendor,
device));
WL_NONE("wl%d: %s: vendor 0x%x device 0x%x\n",
unit, __func__, vendor, device);
ASSERT(WSEC_MAX_RCMTA_KEYS <= WSEC_MAX_KEYS);
ASSERT(WSEC_MAX_DEFAULT_KEYS == WLC_DEFAULT_KEYS);
@ -1897,7 +1899,7 @@ void *wlc_attach(void *wl, u16 vendor, u16 device, uint unit, bool piomode,
goto fail;
if (!wlc_timers_init(wlc, unit)) {
WL_ERROR(("wl%d: %s: wlc_init_timer failed\n", unit, __func__));
WL_ERROR("wl%d: %s: wlc_init_timer failed\n", unit, __func__);
err = 32;
goto fail;
}
@ -1905,8 +1907,8 @@ void *wlc_attach(void *wl, u16 vendor, u16 device, uint unit, bool piomode,
/* depend on rateset, gmode */
wlc->cmi = wlc_channel_mgr_attach(wlc);
if (!wlc->cmi) {
WL_ERROR(("wl%d: %s: wlc_channel_mgr_attach failed\n", unit,
__func__));
WL_ERROR("wl%d: %s: wlc_channel_mgr_attach failed\n",
unit, __func__);
err = 33;
goto fail;
}
@ -1921,8 +1923,8 @@ void *wlc_attach(void *wl, u16 vendor, u16 device, uint unit, bool piomode,
/* allocate our initial queue */
qi = wlc_txq_alloc(wlc, osh);
if (qi == NULL) {
WL_ERROR(("wl%d: %s: failed to malloc tx queue\n", unit,
__func__));
WL_ERROR("wl%d: %s: failed to malloc tx queue\n",
unit, __func__);
err = 100;
goto fail;
}
@ -2008,7 +2010,7 @@ void *wlc_attach(void *wl, u16 vendor, u16 device, uint unit, bool piomode,
return (void *)wlc;
fail:
WL_ERROR(("wl%d: %s: failed with err %d\n", unit, __func__, err));
WL_ERROR("wl%d: %s: failed with err %d\n", unit, __func__, err);
if (wlc)
wlc_detach(wlc);
@ -2026,7 +2028,8 @@ static void wlc_attach_antgain_init(struct wlc_info *wlc)
/* default antenna gain for srom rev 1 is 2 dBm (8 qdbm) */
wlc->band->antgain = 8;
} else if (wlc->band->antgain == -1) {
WL_ERROR(("wl%d: %s: Invalid antennas available in srom, using 2dB\n", unit, __func__));
WL_ERROR("wl%d: %s: Invalid antennas available in srom, using 2dB\n",
unit, __func__);
wlc->band->antgain = 8;
} else {
s8 gain, fract;
@ -2065,7 +2068,8 @@ static bool wlc_attach_stf_ant_init(struct wlc_info *wlc)
aa = (s8) getintvar(vars,
(BAND_5G(bandtype) ? "aa1" : "aa0"));
if ((aa < 1) || (aa > 15)) {
WL_ERROR(("wl%d: %s: Invalid antennas available in srom (0x%x), using 3.\n", unit, __func__, aa));
WL_ERROR("wl%d: %s: Invalid antennas available in srom (0x%x), using 3\n",
unit, __func__, aa);
aa = 3;
}
@ -2132,7 +2136,7 @@ uint wlc_detach(struct wlc_info *wlc)
if (wlc == NULL)
return 0;
WL_TRACE(("wl%d: %s\n", wlc->pub->unit, __func__));
WL_TRACE("wl%d: %s\n", wlc->pub->unit, __func__);
ASSERT(!wlc->pub->up);
@ -2340,7 +2344,7 @@ static void wlc_radio_timer(void *arg)
struct wlc_info *wlc = (struct wlc_info *) arg;
if (DEVICEREMOVED(wlc)) {
WL_ERROR(("wl%d: %s: dead chip\n", wlc->pub->unit, __func__));
WL_ERROR("wl%d: %s: dead chip\n", wlc->pub->unit, __func__);
wl_down(wlc->wl);
return;
}
@ -2441,13 +2445,13 @@ static void wlc_watchdog(void *arg)
int i;
wlc_bsscfg_t *cfg;
WL_TRACE(("wl%d: wlc_watchdog\n", wlc->pub->unit));
WL_TRACE("wl%d: wlc_watchdog\n", wlc->pub->unit);
if (!wlc->pub->up)
return;
if (DEVICEREMOVED(wlc)) {
WL_ERROR(("wl%d: %s: dead chip\n", wlc->pub->unit, __func__));
WL_ERROR("wl%d: %s: dead chip\n", wlc->pub->unit, __func__);
wl_down(wlc->wl);
return;
}
@ -2519,7 +2523,7 @@ static void wlc_watchdog(void *arg)
/* make interface operational */
int wlc_up(struct wlc_info *wlc)
{
WL_TRACE(("wl%d: %s:\n", wlc->pub->unit, __func__));
WL_TRACE("wl%d: %s:\n", wlc->pub->unit, __func__);
/* HW is turned off so don't try to access it */
if (wlc->pub->hw_off || DEVICEREMOVED(wlc))
@ -2564,7 +2568,8 @@ int wlc_up(struct wlc_info *wlc)
if (!BSSCFG_STA(bsscfg)
|| !bsscfg->enable || !bsscfg->BSS)
continue;
WL_ERROR(("wl%d.%d: wlc_up: rfdisable -> " "wlc_bsscfg_disable()\n", wlc->pub->unit, idx));
WL_ERROR("wl%d.%d: wlc_up: rfdisable -> " "wlc_bsscfg_disable()\n",
wlc->pub->unit, idx);
}
}
} else
@ -2664,12 +2669,12 @@ uint wlc_down(struct wlc_info *wlc)
bool dev_gone = false;
wlc_txq_info_t *qi;
WL_TRACE(("wl%d: %s:\n", wlc->pub->unit, __func__));
WL_TRACE("wl%d: %s:\n", wlc->pub->unit, __func__);
/* check if we are already in the going down path */
if (wlc->going_down) {
WL_ERROR(("wl%d: %s: Driver going down so return\n",
wlc->pub->unit, __func__));
WL_ERROR("wl%d: %s: Driver going down so return\n",
wlc->pub->unit, __func__);
return 0;
}
if (!wlc->pub->up)
@ -2728,8 +2733,8 @@ uint wlc_down(struct wlc_info *wlc)
/* Verify all packets are flushed from the driver */
if (wlc->osh->pktalloced != 0) {
WL_ERROR(("%d packets not freed at wlc_down!!!!!!\n",
wlc->osh->pktalloced));
WL_ERROR("%d packets not freed at wlc_down!!!!!!\n",
wlc->osh->pktalloced);
}
#ifdef BCMDBG
/* Since all the packets should have been freed,
@ -2826,8 +2831,8 @@ int wlc_set_gmode(struct wlc_info *wlc, u8 gmode, bool config)
default:
/* Error */
WL_ERROR(("wl%d: %s: invalid gmode %d\n", wlc->pub->unit,
__func__, gmode));
WL_ERROR("wl%d: %s: invalid gmode %d\n",
wlc->pub->unit, __func__, gmode);
return BCME_UNSUPPORTED;
}
@ -3082,7 +3087,7 @@ _wlc_ioctl(struct wlc_info *wlc, int cmd, void *arg, int len,
/* If the device is turned off, then it's not "removed" */
if (!wlc->pub->hw_off && DEVICEREMOVED(wlc)) {
WL_ERROR(("wl%d: %s: dead chip\n", wlc->pub->unit, __func__));
WL_ERROR("wl%d: %s: dead chip\n", wlc->pub->unit, __func__);
wl_down(wlc->wl);
return BCME_ERROR;
}
@ -3102,8 +3107,8 @@ _wlc_ioctl(struct wlc_info *wlc, int cmd, void *arg, int len,
bool_val = val != 0;
if (cmd != WLC_SET_CHANNEL)
WL_NONE(("WLC_IOCTL: cmd %d val 0x%x (%d) len %d\n", cmd,
(uint) val, val, len));
WL_NONE("WLC_IOCTL: cmd %d val 0x%x (%d) len %d\n",
cmd, (uint)val, val, len);
bcmerror = 0;
regs = wlc->regs;
@ -3123,8 +3128,8 @@ _wlc_ioctl(struct wlc_info *wlc, int cmd, void *arg, int len,
default:
if ((arg == NULL) || (len <= 0)) {
WL_ERROR(("wl%d: %s: Command %d needs arguments\n",
wlc->pub->unit, __func__, cmd));
WL_ERROR("wl%d: %s: Command %d needs arguments\n",
wlc->pub->unit, __func__, cmd);
bcmerror = BCME_BADARG;
goto done;
}
@ -3457,8 +3462,8 @@ _wlc_ioctl(struct wlc_info *wlc, int cmd, void *arg, int len,
/* 4322 supports antdiv in phy, no need to set it to ucode */
if (WLCISNPHY(wlc->band)
&& D11REV_IS(wlc->pub->corerev, 16)) {
WL_ERROR(("wl%d: can't set ucantdiv for 4322\n",
wlc->pub->unit));
WL_ERROR("wl%d: can't set ucantdiv for 4322\n",
wlc->pub->unit);
bcmerror = BCME_UNSUPPORTED;
} else
wlc_mhf(wlc, MHF1, MHF1_ANTDIV,
@ -3555,8 +3560,8 @@ _wlc_ioctl(struct wlc_info *wlc, int cmd, void *arg, int len,
if ((radiomask == 0) || (radiomask & ~validbits)
|| (radioval & ~validbits)
|| ((radioval & ~radiomask) != 0)) {
WL_ERROR(("SET_RADIO with wrong bits 0x%x\n",
val));
WL_ERROR("SET_RADIO with wrong bits 0x%x\n",
val);
bcmerror = BCME_RANGE;
break;
}
@ -4192,7 +4197,7 @@ _wlc_ioctl(struct wlc_info *wlc, int cmd, void *arg, int len,
#endif
case WLC_LAST:
WL_ERROR(("%s: WLC_LAST\n", __func__));
WL_ERROR("%s: WLC_LAST\n", __func__);
}
done:
@ -4402,8 +4407,8 @@ wlc_iovar_op(struct wlc_info *wlc, const char *name,
if (!set && (len == sizeof(int)) &&
!(IS_ALIGNED((unsigned long)(arg), (uint) sizeof(int)))) {
WL_ERROR(("wl%d: %s unaligned get ptr for %s\n",
wlc->pub->unit, __func__, name));
WL_ERROR("wl%d: %s unaligned get ptr for %s\n",
wlc->pub->unit, __func__, name);
ASSERT(0);
}
@ -4530,7 +4535,7 @@ wlc_doiovar(void *hdl, const bcm_iovar_t *vi, u32 actionid,
bool bool_val2;
wlc_bss_info_t *current_bss;
WL_TRACE(("wl%d: %s\n", wlc->pub->unit, __func__));
WL_TRACE("wl%d: %s\n", wlc->pub->unit, __func__);
bsscfg = NULL;
current_bss = NULL;
@ -4553,8 +4558,8 @@ wlc_doiovar(void *hdl, const bcm_iovar_t *vi, u32 actionid,
bool_val = (int_val != 0) ? true : false;
bool_val2 = (int_val2 != 0) ? true : false;
WL_TRACE(("wl%d: %s: id %d\n", wlc->pub->unit, __func__,
IOV_ID(actionid)));
WL_TRACE("wl%d: %s: id %d\n",
wlc->pub->unit, __func__, IOV_ID(actionid));
/* Do the actual parameter implementation */
switch (actionid) {
@ -4612,7 +4617,7 @@ wlc_doiovar(void *hdl, const bcm_iovar_t *vi, u32 actionid,
break;
default:
WL_ERROR(("wl%d: %s: unsupported\n", wlc->pub->unit, __func__));
WL_ERROR("wl%d: %s: unsupported\n", wlc->pub->unit, __func__);
err = BCME_UNSUPPORTED;
break;
}
@ -4747,8 +4752,8 @@ void wlc_statsupd(struct wlc_info *wlc)
/* check for rx fifo 0 overflow */
delta = (u16) (wlc->core->macstat_snapshot->rxf0ovfl - rxf0ovfl);
if (delta)
WL_ERROR(("wl%d: %u rx fifo 0 overflows!\n", wlc->pub->unit,
delta));
WL_ERROR("wl%d: %u rx fifo 0 overflows!\n",
wlc->pub->unit, delta);
/* check for tx fifo underflows */
for (i = 0; i < NFIFO; i++) {
@ -4756,8 +4761,8 @@ void wlc_statsupd(struct wlc_info *wlc)
(u16) (wlc->core->macstat_snapshot->txfunfl[i] -
txfunfl[i]);
if (delta)
WL_ERROR(("wl%d: %u tx fifo %d underflows!\n",
wlc->pub->unit, delta, i));
WL_ERROR("wl%d: %u tx fifo %d underflows!\n",
wlc->pub->unit, delta, i);
}
#endif /* BCMDBG */
@ -4806,7 +4811,7 @@ void wlc_statsupd(struct wlc_info *wlc)
bool wlc_chipmatch(u16 vendor, u16 device)
{
if (vendor != VENDOR_BROADCOM) {
WL_ERROR(("wlc_chipmatch: unknown vendor id %04x\n", vendor));
WL_ERROR("wlc_chipmatch: unknown vendor id %04x\n", vendor);
return false;
}
@ -4818,7 +4823,7 @@ bool wlc_chipmatch(u16 vendor, u16 device)
if ((device == BCM43236_D11N_ID) || (device == BCM43236_D11N2G_ID))
return true;
WL_ERROR(("wlc_chipmatch: unknown device id %04x\n", device));
WL_ERROR("wlc_chipmatch: unknown device id %04x\n", device);
return false;
}
@ -5009,8 +5014,8 @@ wlc_prec_enq_head(struct wlc_info *wlc, struct pktq *q, struct sk_buff *pkt,
p = pktq_peek_tail(q, &eprec);
ASSERT(p != NULL);
if (eprec > prec) {
WL_ERROR(("%s: Failing: eprec %d > prec %d\n", __func__,
eprec, prec));
WL_ERROR("%s: Failing: eprec %d > prec %d\n",
__func__, eprec, prec);
return false;
}
}
@ -5026,8 +5031,8 @@ wlc_prec_enq_head(struct wlc_info *wlc, struct pktq *q, struct sk_buff *pkt,
/* Refuse newer packet unless configured to discard oldest */
if (eprec == prec && !discard_oldest) {
WL_ERROR(("%s: No where to go, prec == %d\n", __func__,
prec));
WL_ERROR("%s: No where to go, prec == %d\n",
__func__, prec);
return false;
}
@ -5075,8 +5080,8 @@ void BCMFASTPATH wlc_txq_enq(void *ctx, struct scb *scb, struct sk_buff *sdu,
if (!wlc_prec_enq(wlc, q, sdu, prec)) {
if (!EDCF_ENAB(wlc->pub)
|| (wlc->pub->wlfeatureflag & WL_SWFL_FLOWCONTROL))
WL_ERROR(("wl%d: wlc_txq_enq: txq overflow\n",
wlc->pub->unit));
WL_ERROR("wl%d: wlc_txq_enq: txq overflow\n",
wlc->pub->unit);
/* ASSERT(9 == 8); *//* XXX we might hit this condtion in case packet flooding from mac80211 stack */
pkt_buf_free_skb(wlc->osh, sdu, true);
@ -5252,8 +5257,8 @@ wlc_txfifo(struct wlc_info *wlc, uint fifo, struct sk_buff *p, bool commit,
*/
if (commit) {
TXPKTPENDINC(wlc, fifo, txpktpend);
WL_TRACE(("wlc_txfifo, pktpend inc %d to %d\n", txpktpend,
TXPKTPENDGET(wlc, fifo)));
WL_TRACE("wlc_txfifo, pktpend inc %d to %d\n",
txpktpend, TXPKTPENDGET(wlc, fifo));
}
/* Commit BCMC sequence number in the SHM frame ID location */
@ -5261,7 +5266,7 @@ wlc_txfifo(struct wlc_info *wlc, uint fifo, struct sk_buff *p, bool commit,
BCMCFID(wlc, frameid);
if (dma_txfast(wlc->hw->di[fifo], p, commit) < 0) {
WL_ERROR(("wlc_txfifo: fatal, toss frames !!!\n"));
WL_ERROR("wlc_txfifo: fatal, toss frames !!!\n");
}
}
@ -5301,7 +5306,8 @@ wlc_compute_airtime(struct wlc_info *wlc, ratespec_t rspec, uint length)
usec = (length << 3) / 11;
break;
default:
WL_ERROR(("wl%d: wlc_compute_airtime: unsupported rspec 0x%x\n", wlc->pub->unit, rspec));
WL_ERROR("wl%d: wlc_compute_airtime: unsupported rspec 0x%x\n",
wlc->pub->unit, rspec);
ASSERT((const char *)"Bad phy_rate" == NULL);
break;
}
@ -5397,7 +5403,7 @@ static void wlc_cck_plcp_set(int rate_500, uint length, u8 *plcp)
break;
default:
WL_ERROR(("wlc_cck_plcp_set: unsupported rate %d\n", rate_500));
WL_ERROR("wlc_cck_plcp_set: unsupported rate %d\n", rate_500);
rate_500 = WLC_RATE_1M;
usec = length << 3;
break;
@ -5537,7 +5543,8 @@ u16 BCMFASTPATH wlc_phytxctl1_calc(struct wlc_info *wlc, ratespec_t rspec)
bw = RSPEC_GET_BW(rspec);
/* 10Mhz is not supported yet */
if (bw < PHY_TXC1_BW_20MHZ) {
WL_ERROR(("wlc_phytxctl1_calc: bw %d is not supported yet, set to 20L\n", bw));
WL_ERROR("wlc_phytxctl1_calc: bw %d is not supported yet, set to 20L\n",
bw);
bw = PHY_TXC1_BW_20MHZ;
}
@ -5562,7 +5569,7 @@ u16 BCMFASTPATH wlc_phytxctl1_calc(struct wlc_info *wlc, ratespec_t rspec)
/* get the phyctl byte from rate phycfg table */
phycfg = wlc_rate_legacy_phyctl(RSPEC2RATE(rspec));
if (phycfg == -1) {
WL_ERROR(("wlc_phytxctl1_calc: wrong legacy OFDM/CCK rate\n"));
WL_ERROR("wlc_phytxctl1_calc: wrong legacy OFDM/CCK rate\n");
ASSERT(0);
phycfg = 0;
}
@ -5722,8 +5729,8 @@ wlc_d11hdrs_mac80211(struct wlc_info *wlc, struct ieee80211_hw *hw,
/* non-AP STA should never use BCMC queue */
ASSERT(queue != TX_BCMC_FIFO);
if (queue == TX_BCMC_FIFO) {
WL_ERROR(("wl%d: %s: ASSERT queue == TX_BCMC!\n",
WLCWLUNIT(wlc), __func__));
WL_ERROR("wl%d: %s: ASSERT queue == TX_BCMC!\n",
WLCWLUNIT(wlc), __func__);
frameid = bcmc_fid_generate(wlc, NULL, txh);
} else {
/* Increment the counter for first fragment */
@ -5901,7 +5908,8 @@ wlc_d11hdrs_mac80211(struct wlc_info *wlc, struct ieee80211_hw *hw,
if ((txrate[k]->flags & IEEE80211_TX_RC_MCS)
&& (!IS_MCS(rspec[k]))) {
WL_ERROR(("wl%d: %s: IEEE80211_TX_RC_MCS != IS_MCS(rspec)\n", WLCWLUNIT(wlc), __func__));
WL_ERROR("wl%d: %s: IEEE80211_TX_RC_MCS != IS_MCS(rspec)\n",
WLCWLUNIT(wlc), __func__);
ASSERT(0 && "Rate mismatch");
}
@ -6295,12 +6303,16 @@ wlc_d11hdrs_mac80211(struct wlc_info *wlc, struct ieee80211_hw *hw,
}
}
} else
WL_ERROR(("wl%d: %s txop invalid for rate %d\n",
wlc->pub->unit, fifo_names[queue],
RSPEC2RATE(rspec[0])));
WL_ERROR("wl%d: %s txop invalid for rate %d\n",
wlc->pub->unit, fifo_names[queue],
RSPEC2RATE(rspec[0]));
if (dur > wlc->edcf_txop[ac])
WL_ERROR(("wl%d: %s: %s txop exceeded phylen %d/%d dur %d/%d\n", wlc->pub->unit, __func__, fifo_names[queue], phylen, wlc->fragthresh[queue], dur, wlc->edcf_txop[ac]));
WL_ERROR("wl%d: %s: %s txop exceeded phylen %d/%d dur %d/%d\n",
wlc->pub->unit, __func__,
fifo_names[queue],
phylen, wlc->fragthresh[queue],
dur, wlc->edcf_txop[ac]);
}
}
@ -6406,8 +6418,8 @@ void wlc_high_dpc(struct wlc_info *wlc, u32 macintstatus)
if (macintstatus & ~(MI_TBTT | MI_TXSTOP)) {
bcm_format_flags(int_flags, macintstatus, flagstr,
sizeof(flagstr));
WL_TRACE(("wl%d: macintstatus 0x%x %s\n", wlc->pub->unit,
macintstatus, flagstr));
WL_TRACE("wl%d: macintstatus 0x%x %s\n",
wlc->pub->unit, macintstatus, flagstr);
}
#endif /* BCMDBG */
@ -6422,7 +6434,8 @@ void wlc_high_dpc(struct wlc_info *wlc, u32 macintstatus)
wlc_tbtt(wlc, regs);
if (macintstatus & MI_GP0) {
WL_ERROR(("wl%d: PSM microcode watchdog fired at %d (seconds). Resetting.\n", wlc->pub->unit, wlc->pub->now));
WL_ERROR("wl%d: PSM microcode watchdog fired at %d (seconds). Resetting.\n",
wlc->pub->unit, wlc->pub->now);
printk_once("%s : PSM Watchdog, chipid 0x%x, chiprev 0x%x\n",
__func__, wlc->pub->sih->chip,
@ -6440,7 +6453,9 @@ void wlc_high_dpc(struct wlc_info *wlc, u32 macintstatus)
}
if (macintstatus & MI_RFDISABLE) {
WL_ERROR(("wl%d: MAC Detected a change on the RF Disable Input 0x%x\n", wlc->pub->unit, R_REG(wlc->osh, &regs->phydebug) & PDBG_RFD));
WL_ERROR("wl%d: MAC Detected a change on the RF Disable Input 0x%x\n",
wlc->pub->unit,
R_REG(wlc->osh, &regs->phydebug) & PDBG_RFD);
/* delay the cleanup to wl_down in IBSS case */
if ((R_REG(wlc->osh, &regs->phydebug) & PDBG_RFD)) {
int idx;
@ -6449,7 +6464,8 @@ void wlc_high_dpc(struct wlc_info *wlc, u32 macintstatus)
if (!BSSCFG_STA(bsscfg) || !bsscfg->enable
|| !bsscfg->BSS)
continue;
WL_ERROR(("wl%d: wlc_dpc: rfdisable -> wlc_bsscfg_disable()\n", wlc->pub->unit));
WL_ERROR("wl%d: wlc_dpc: rfdisable -> wlc_bsscfg_disable()\n",
wlc->pub->unit);
}
}
}
@ -6485,7 +6501,8 @@ static void *wlc_15420war(struct wlc_info *wlc, uint queue)
if (dma_txactive(wlc->hw->di[queue]) == 0) {
WLCNTINCR(wlc->pub->_cnt->txdmawar);
if (!dma_txreset(di))
WL_ERROR(("wl%d: %s: dma_txreset[%d]: cannot stop dma\n", wlc->pub->unit, __func__, queue));
WL_ERROR("wl%d: %s: dma_txreset[%d]: cannot stop dma\n",
wlc->pub->unit, __func__, queue);
dma_txinit(di);
}
return p;
@ -6538,7 +6555,7 @@ wlc_dotxstatus(struct wlc_info *wlc, tx_status_t *txs, u32 frm_tx2)
((txs->
status & TX_STATUS_FRM_RTX_MASK) >>
TX_STATUS_FRM_RTX_SHIFT));
WL_ERROR(("%s: INTERMEDIATE but not AMPDU\n", __func__));
WL_ERROR("%s: INTERMEDIATE but not AMPDU\n", __func__);
return false;
}
@ -6563,8 +6580,8 @@ wlc_dotxstatus(struct wlc_info *wlc, tx_status_t *txs, u32 frm_tx2)
mcl = ltoh16(txh->MacTxControlLow);
if (txs->phyerr) {
WL_ERROR(("phyerr 0x%x, rate 0x%x\n", txs->phyerr,
txh->MainRates));
WL_ERROR("phyerr 0x%x, rate 0x%x\n",
txs->phyerr, txh->MainRates);
wlc_print_txdesc(txh);
wlc_print_txstatus(txs);
}
@ -6595,8 +6612,8 @@ wlc_dotxstatus(struct wlc_info *wlc, tx_status_t *txs, u32 frm_tx2)
supr_status = txs->status & TX_STATUS_SUPR_MASK;
if (supr_status == TX_STATUS_SUPR_BADCH)
WL_NONE(("%s: Pkt tx suppressed, possibly channel %d\n",
__func__, CHSPEC_CHANNEL(wlc->default_bss->chanspec)));
WL_NONE("%s: Pkt tx suppressed, possibly channel %d\n",
__func__, CHSPEC_CHANNEL(wlc->default_bss->chanspec));
tx_rts = htol16(txh->MacTxControlLow) & TXC_SENDRTS;
tx_frame_count =
@ -6607,7 +6624,7 @@ wlc_dotxstatus(struct wlc_info *wlc, tx_status_t *txs, u32 frm_tx2)
lastframe = (fc & FC_MOREFRAG) == 0;
if (!lastframe) {
WL_ERROR(("Not last frame!\n"));
WL_ERROR("Not last frame!\n");
} else {
u16 sfbl, lfbl;
ieee80211_tx_info_clear_status(tx_info);
@ -6658,8 +6675,8 @@ wlc_dotxstatus(struct wlc_info *wlc, tx_status_t *txs, u32 frm_tx2)
ieee80211_tx_status_irqsafe(wlc->pub->ieee_hw, p);
WLCNTINCR(wlc->pub->_cnt->ieee_tx_status);
} else {
WL_ERROR(("%s: Not last frame => not calling tx_status\n",
__func__));
WL_ERROR("%s: Not last frame => not calling tx_status\n",
__func__);
}
return false;
@ -6677,8 +6694,8 @@ void BCMFASTPATH
wlc_txfifo_complete(struct wlc_info *wlc, uint fifo, s8 txpktpend)
{
TXPKTPENDDEC(wlc, fifo, txpktpend);
WL_TRACE(("wlc_txfifo_complete, pktpend dec %d to %d\n", txpktpend,
TXPKTPENDGET(wlc, fifo)));
WL_TRACE("wlc_txfifo_complete, pktpend dec %d to %d\n",
txpktpend, TXPKTPENDGET(wlc, fifo));
/* There is more room; mark precedences related to this FIFO sendable */
WLC_TX_FIFO_ENAB(wlc, fifo);
@ -6872,19 +6889,19 @@ prep_mac80211_status(struct wlc_info *wlc, d11rxhdr_t *rxh, struct sk_buff *p,
rx_status->rate_idx = 11;
break;
default:
WL_ERROR(("%s: Unknown rate\n", __func__));
WL_ERROR("%s: Unknown rate\n", __func__);
}
/* Determine short preamble and rate_idx */
preamble = 0;
if (IS_CCK(rspec)) {
if (rxh->PhyRxStatus_0 & PRXS0_SHORTH)
WL_ERROR(("Short CCK\n"));
WL_ERROR("Short CCK\n");
rx_status->flag |= RX_FLAG_SHORTPRE;
} else if (IS_OFDM(rspec)) {
rx_status->flag |= RX_FLAG_SHORTPRE;
} else {
WL_ERROR(("%s: Unknown modulation\n", __func__));
WL_ERROR("%s: Unknown modulation\n", __func__);
}
}
@ -6893,11 +6910,11 @@ prep_mac80211_status(struct wlc_info *wlc, d11rxhdr_t *rxh, struct sk_buff *p,
if (rxh->RxStatus1 & RXS_DECERR) {
rx_status->flag |= RX_FLAG_FAILED_PLCP_CRC;
WL_ERROR(("%s: RX_FLAG_FAILED_PLCP_CRC\n", __func__));
WL_ERROR("%s: RX_FLAG_FAILED_PLCP_CRC\n", __func__);
}
if (rxh->RxStatus1 & RXS_FCSERR) {
rx_status->flag |= RX_FLAG_FAILED_FCS_CRC;
WL_ERROR(("%s: RX_FLAG_FAILED_FCS_CRC\n", __func__));
WL_ERROR("%s: RX_FLAG_FAILED_FCS_CRC\n", __func__);
}
}
@ -6943,7 +6960,7 @@ void wlc_bss_list_free(struct wlc_info *wlc, wlc_bss_list_t *bss_list)
wlc_bss_info_t *bi;
if (!bss_list) {
WL_ERROR(("%s: Attempting to free NULL list\n", __func__));
WL_ERROR("%s: Attempting to free NULL list\n", __func__);
return;
}
/* inspect all BSS descriptor */
@ -6975,7 +6992,7 @@ void BCMFASTPATH wlc_recv(struct wlc_info *wlc, struct sk_buff *p)
uint len;
bool is_amsdu;
WL_TRACE(("wl%d: wlc_recv\n", wlc->pub->unit));
WL_TRACE("wl%d: wlc_recv\n", wlc->pub->unit);
osh = wlc->osh;
@ -6992,8 +7009,8 @@ void BCMFASTPATH wlc_recv(struct wlc_info *wlc, struct sk_buff *p)
if (rxh->RxStatus1 & RXS_PBPRES) {
if (p->len < 2) {
WLCNTINCR(wlc->pub->_cnt->rxrunt);
WL_ERROR(("wl%d: wlc_recv: rcvd runt of len %d\n",
wlc->pub->unit, p->len));
WL_ERROR("wl%d: wlc_recv: rcvd runt of len %d\n",
wlc->pub->unit, p->len);
goto toss;
}
skb_pull(p, 2);
@ -7004,10 +7021,10 @@ void BCMFASTPATH wlc_recv(struct wlc_info *wlc, struct sk_buff *p)
if (rxh->RxStatus1 & RXS_FCSERR) {
if (wlc->pub->mac80211_state & MAC80211_PROMISC_BCNS) {
WL_ERROR(("FCSERR while scanning******* - tossing\n"));
WL_ERROR("FCSERR while scanning******* - tossing\n");
goto toss;
} else {
WL_ERROR(("RCSERR!!!\n"));
WL_ERROR("RCSERR!!!\n");
goto toss;
}
}
@ -7028,9 +7045,8 @@ void BCMFASTPATH wlc_recv(struct wlc_info *wlc, struct sk_buff *p)
if (FC_TYPE(fc) == FC_TYPE_DATA || FC_TYPE(fc) == FC_TYPE_MNG) {
if ((is_zero_ether_addr(h->a2.octet) ||
is_multicast_ether_addr(h->a2.octet))) {
WL_ERROR(("wl%d: %s: dropping a frame with "
"invalid src mac address, a2: %pM\n",
wlc->pub->unit, __func__, &h->a2));
WL_ERROR("wl%d: %s: dropping a frame with invalid src mac address, a2: %pM\n",
wlc->pub->unit, __func__, &h->a2);
WLCNTINCR(wlc->pub->_cnt->rxbadsrcmac);
goto toss;
}
@ -7045,7 +7061,7 @@ void BCMFASTPATH wlc_recv(struct wlc_info *wlc, struct sk_buff *p)
}
if (is_amsdu) {
WL_ERROR(("%s: is_amsdu causing toss\n", __func__));
WL_ERROR("%s: is_amsdu causing toss\n", __func__);
goto toss;
}
@ -7067,8 +7083,8 @@ wlc_calc_lsig_len(struct wlc_info *wlc, ratespec_t ratespec, uint mac_len)
{
uint nsyms, len = 0, kNdps;
WL_TRACE(("wl%d: wlc_calc_lsig_len: rate %d, len%d\n", wlc->pub->unit,
RSPEC2RATE(ratespec), mac_len));
WL_TRACE("wl%d: wlc_calc_lsig_len: rate %d, len%d\n",
wlc->pub->unit, RSPEC2RATE(ratespec), mac_len);
if (IS_MCS(ratespec)) {
uint mcs = ratespec & RSPEC_RATE_MASK;
@ -7112,11 +7128,12 @@ wlc_calc_frame_time(struct wlc_info *wlc, ratespec_t ratespec, u8 preamble_type,
if (rate == 0) {
ASSERT(0);
WL_ERROR(("wl%d: WAR: using rate of 1 mbps\n", wlc->pub->unit));
WL_ERROR("wl%d: WAR: using rate of 1 mbps\n", wlc->pub->unit);
rate = WLC_RATE_1M;
}
WL_TRACE(("wl%d: wlc_calc_frame_time: rspec 0x%x, preamble_type %d, len%d\n", wlc->pub->unit, ratespec, preamble_type, mac_len));
WL_TRACE("wl%d: wlc_calc_frame_time: rspec 0x%x, preamble_type %d, len%d\n",
wlc->pub->unit, ratespec, preamble_type, mac_len);
if (IS_MCS(ratespec)) {
uint mcs = ratespec & RSPEC_RATE_MASK;
@ -7180,7 +7197,8 @@ wlc_calc_frame_len(struct wlc_info *wlc, ratespec_t ratespec, u8 preamble_type,
uint nsyms, mac_len, Ndps, kNdps;
uint rate = RSPEC2RATE(ratespec);
WL_TRACE(("wl%d: wlc_calc_frame_len: rspec 0x%x, preamble_type %d, dur %d\n", wlc->pub->unit, ratespec, preamble_type, dur));
WL_TRACE("wl%d: wlc_calc_frame_len: rspec 0x%x, preamble_type %d, dur %d\n",
wlc->pub->unit, ratespec, preamble_type, dur);
if (IS_MCS(ratespec)) {
uint mcs = ratespec & RSPEC_RATE_MASK;
@ -7222,8 +7240,8 @@ wlc_calc_frame_len(struct wlc_info *wlc, ratespec_t ratespec, u8 preamble_type,
static uint
wlc_calc_ba_time(struct wlc_info *wlc, ratespec_t rspec, u8 preamble_type)
{
WL_TRACE(("wl%d: wlc_calc_ba_time: rspec 0x%x, preamble_type %d\n",
wlc->pub->unit, rspec, preamble_type));
WL_TRACE("wl%d: wlc_calc_ba_time: rspec 0x%x, preamble_type %d\n",
wlc->pub->unit, rspec, preamble_type);
/* Spec 9.6: ack rate is the highest rate in BSSBasicRateSet that is less than
* or equal to the rate of the immediately previous frame in the FES
*/
@ -7241,8 +7259,8 @@ wlc_calc_ack_time(struct wlc_info *wlc, ratespec_t rspec, u8 preamble_type)
{
uint dur = 0;
WL_TRACE(("wl%d: wlc_calc_ack_time: rspec 0x%x, preamble_type %d\n",
wlc->pub->unit, rspec, preamble_type));
WL_TRACE("wl%d: wlc_calc_ack_time: rspec 0x%x, preamble_type %d\n",
wlc->pub->unit, rspec, preamble_type);
/* Spec 9.6: ack rate is the highest rate in BSSBasicRateSet that is less than
* or equal to the rate of the immediately previous frame in the FES
*/
@ -7259,8 +7277,8 @@ wlc_calc_ack_time(struct wlc_info *wlc, ratespec_t rspec, u8 preamble_type)
static uint
wlc_calc_cts_time(struct wlc_info *wlc, ratespec_t rspec, u8 preamble_type)
{
WL_TRACE(("wl%d: wlc_calc_cts_time: ratespec 0x%x, preamble_type %d\n",
wlc->pub->unit, rspec, preamble_type));
WL_TRACE("wl%d: wlc_calc_cts_time: ratespec 0x%x, preamble_type %d\n",
wlc->pub->unit, rspec, preamble_type);
return wlc_calc_ack_time(wlc, rspec, preamble_type);
}
@ -7289,7 +7307,8 @@ void wlc_rate_lookup_init(struct wlc_info *wlc, wlc_rateset_t *rateset)
rate = (rateset->rates[i] & RATE_MASK);
if (rate > WLC_MAXRATE) {
WL_ERROR(("wlc_rate_lookup_init: invalid rate 0x%X in rate set\n", rateset->rates[i]));
WL_ERROR("wlc_rate_lookup_init: invalid rate 0x%X in rate set\n",
rateset->rates[i]);
continue;
}
@ -7468,7 +7487,8 @@ bool wlc_valid_rate(struct wlc_info *wlc, ratespec_t rspec, int band,
return true;
error:
if (verbose) {
WL_ERROR(("wl%d: wlc_valid_rate: rate spec 0x%x not in hw_rateset\n", wlc->pub->unit, rspec));
WL_ERROR("wl%d: wlc_valid_rate: rate spec 0x%x not in hw_rateset\n",
wlc->pub->unit, rspec);
}
return false;
@ -7550,8 +7570,8 @@ wlc_compute_bcntsfoff(struct wlc_info *wlc, ratespec_t rspec,
uint bcntsfoff = 0;
if (IS_MCS(rspec)) {
WL_ERROR(("wl%d: recd beacon with mcs rate; rspec 0x%x\n",
wlc->pub->unit, rspec));
WL_ERROR("wl%d: recd beacon with mcs rate; rspec 0x%x\n",
wlc->pub->unit, rspec);
} else if (IS_OFDM(rspec)) {
/* tx delay from MAC through phy to air (2.1 usec) +
* phy header time (preamble + PLCP SIGNAL == 20 usec) +
@ -7979,8 +7999,8 @@ mac80211_wlc_set_nrate(struct wlc_info *wlc, struct wlcband *cur_band,
if (N_ENAB(wlc->pub) && ismcs) {
/* mcs only allowed when nmode */
if (stf > PHY_TXC1_MODE_SDM) {
WL_ERROR(("wl%d: %s: Invalid stf\n", WLCWLUNIT(wlc),
__func__));
WL_ERROR("wl%d: %s: Invalid stf\n",
WLCWLUNIT(wlc), __func__);
bcmerror = BCME_RANGE;
goto done;
}
@ -7990,8 +8010,8 @@ mac80211_wlc_set_nrate(struct wlc_info *wlc, struct wlcband *cur_band,
if (!CHSPEC_IS40(wlc->home_chanspec) ||
((stf != PHY_TXC1_MODE_SISO)
&& (stf != PHY_TXC1_MODE_CDD))) {
WL_ERROR(("wl%d: %s: Invalid mcs 32\n",
WLCWLUNIT(wlc), __func__));
WL_ERROR("wl%d: %s: Invalid mcs 32\n",
WLCWLUNIT(wlc), __func__);
bcmerror = BCME_RANGE;
goto done;
}
@ -7999,7 +8019,8 @@ mac80211_wlc_set_nrate(struct wlc_info *wlc, struct wlcband *cur_band,
} else if (rate > HIGHEST_SINGLE_STREAM_MCS) {
/* mcs > 7 must use stf SDM */
if (stf != PHY_TXC1_MODE_SDM) {
WL_TRACE(("wl%d: %s: enabling SDM mode for mcs %d\n", WLCWLUNIT(wlc), __func__, rate));
WL_TRACE("wl%d: %s: enabling SDM mode for mcs %d\n",
WLCWLUNIT(wlc), __func__, rate);
stf = PHY_TXC1_MODE_SDM;
}
} else {
@ -8007,37 +8028,37 @@ mac80211_wlc_set_nrate(struct wlc_info *wlc, struct wlcband *cur_band,
if ((stf > PHY_TXC1_MODE_STBC) ||
(!WLC_STBC_CAP_PHY(wlc)
&& (stf == PHY_TXC1_MODE_STBC))) {
WL_ERROR(("wl%d: %s: Invalid STBC\n",
WLCWLUNIT(wlc), __func__));
WL_ERROR("wl%d: %s: Invalid STBC\n",
WLCWLUNIT(wlc), __func__);
bcmerror = BCME_RANGE;
goto done;
}
}
} else if (IS_OFDM(rate)) {
if ((stf != PHY_TXC1_MODE_CDD) && (stf != PHY_TXC1_MODE_SISO)) {
WL_ERROR(("wl%d: %s: Invalid OFDM\n", WLCWLUNIT(wlc),
__func__));
WL_ERROR("wl%d: %s: Invalid OFDM\n",
WLCWLUNIT(wlc), __func__);
bcmerror = BCME_RANGE;
goto done;
}
} else if (IS_CCK(rate)) {
if ((cur_band->bandtype != WLC_BAND_2G)
|| (stf != PHY_TXC1_MODE_SISO)) {
WL_ERROR(("wl%d: %s: Invalid CCK\n", WLCWLUNIT(wlc),
__func__));
WL_ERROR("wl%d: %s: Invalid CCK\n",
WLCWLUNIT(wlc), __func__);
bcmerror = BCME_RANGE;
goto done;
}
} else {
WL_ERROR(("wl%d: %s: Unknown rate type\n", WLCWLUNIT(wlc),
__func__));
WL_ERROR("wl%d: %s: Unknown rate type\n",
WLCWLUNIT(wlc), __func__);
bcmerror = BCME_RANGE;
goto done;
}
/* make sure multiple antennae are available for non-siso rates */
if ((stf != PHY_TXC1_MODE_SISO) && (wlc->stf->txstreams == 1)) {
WL_ERROR(("wl%d: %s: SISO antenna but !SISO request\n",
WLCWLUNIT(wlc), __func__));
WL_ERROR("wl%d: %s: SISO antenna but !SISO request\n",
WLCWLUNIT(wlc), __func__);
bcmerror = BCME_RANGE;
goto done;
}
@ -8068,7 +8089,7 @@ mac80211_wlc_set_nrate(struct wlc_info *wlc, struct wlcband *cur_band,
return rspec;
done:
WL_ERROR(("Hoark\n"));
WL_ERROR("Hoark\n");
return rate;
}
@ -8082,8 +8103,7 @@ wlc_duty_cycle_set(struct wlc_info *wlc, int duty_cycle, bool isOFDM,
isOFDM ? M_TX_IDLE_BUSY_RATIO_X_16_OFDM :
M_TX_IDLE_BUSY_RATIO_X_16_CCK;
if (duty_cycle > 100 || duty_cycle < 0) {
WL_ERROR(("wl%d: duty cycle value off limit\n",
wlc->pub->unit));
WL_ERROR("wl%d: duty cycle value off limit\n", wlc->pub->unit);
return BCME_RANGE;
}
if (duty_cycle)
@ -8282,7 +8302,7 @@ void wlc_txflowcontrol(struct wlc_info *wlc, wlc_txq_info_t *qi,
uint prio_bits;
uint cur_bits;
WL_ERROR(("%s: flow contro kicks in\n", __func__));
WL_ERROR("%s: flow control kicks in\n", __func__);
if (prio == ALLPRIO) {
prio_bits = TXQ_STOP_FOR_PRIOFC_MASK;

Просмотреть файл

@ -70,7 +70,8 @@ wlc_phy_shim_info_t *wlc_phy_shim_attach(struct wlc_hw_info *wlc_hw,
physhim = kzalloc(sizeof(wlc_phy_shim_info_t), GFP_ATOMIC);
if (!physhim) {
WL_ERROR(("wl%d: wlc_phy_shim_attach: out of mem\n", wlc_hw->unit));
WL_ERROR("wl%d: wlc_phy_shim_attach: out of mem\n",
wlc_hw->unit);
return NULL;
}
physhim->wlc_hw = wlc_hw;

Просмотреть файл

@ -196,8 +196,8 @@ bool wlc_stf_stbc_rx_set(struct wlc_info *wlc, s32 int_val)
static int wlc_stf_txcore_set(struct wlc_info *wlc, u8 Nsts, u8 core_mask)
{
WL_TRACE(("wl%d: %s: Nsts %d core_mask %x\n",
wlc->pub->unit, __func__, Nsts, core_mask));
WL_TRACE("wl%d: %s: Nsts %d core_mask %x\n",
wlc->pub->unit, __func__, Nsts, core_mask);
ASSERT((Nsts > 0) && (Nsts <= MAX_STREAMS_SUPPORTED));
@ -236,7 +236,7 @@ static int wlc_stf_spatial_policy_set(struct wlc_info *wlc, int val)
int i;
u8 core_mask = 0;
WL_TRACE(("wl%d: %s: val %x\n", wlc->pub->unit, __func__, val));
WL_TRACE("wl%d: %s: val %x\n", wlc->pub->unit, __func__, val);
wlc->stf->spatial_policy = (s8) val;
for (i = 1; i <= MAX_STREAMS_SUPPORTED; i++) {
@ -278,13 +278,15 @@ int wlc_stf_txchain_set(struct wlc_info *wlc, s32 int_val, bool force)
if (RSPEC_STF(wlc->bandstate[i]->rspec_override)
!= PHY_TXC1_MODE_SISO) {
wlc->bandstate[i]->rspec_override = 0;
WL_ERROR(("%s(): temp sense override non-SISO" " rspec_override.\n", __func__));
WL_ERROR("%s(): temp sense override non-SISO rspec_override\n",
__func__);
}
if (RSPEC_STF
(wlc->bandstate[i]->mrspec_override) !=
PHY_TXC1_MODE_SISO) {
wlc->bandstate[i]->mrspec_override = 0;
WL_ERROR(("%s(): temp sense override non-SISO" " mrspec_override.\n", __func__));
WL_ERROR("%s(): temp sense override non-SISO mrspec_override\n",
__func__);
}
}
}