#ifndef _wl_dbg_h_
#define _wl_dbg_h_
+#include <linux/device.h> /* dev_err() */
+
/* wl_msg_level is a bit vector with defs in wlioctl.h */
extern u32 wl_msg_level;
printk(fmt, ##args); \
} while (0)
+#define BCMMSG(dev, fmt, args...) \
+do { \
+ if (wl_msg_level & WL_TRACE_VAL) \
+ wiphy_err(dev, "%s: " fmt, __func__, ##args); \
+} while (0)
+
#ifdef BCMDBG
-#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)
-
/* Extra message control for AMPDU debugging */
#define WL_AMPDU_UPDN_VAL 0x00000001 /* Config up/down related */
#define WL_AMPDU_ERR_VAL 0x00000002 /* Calls to beaocn update */
#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(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)
#endif /* BCMDBG */
+#define WL_ERROR_ON() (wl_msg_level & WL_ERROR_VAL)
+
#endif /* _wl_dbg_h_ */
/* Do nothing */
} else {
bustype = PCI_BUS;
- WL_TRACE("force to PCI\n");
+ BCMMSG(wl->wiphy, "force to PCI\n");
}
wl->bcm_bustype = bustype;
struct ieee80211_hw *hw;
u32 val;
- 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);
+ dev_info(&pdev->dev, "bus %d slot %d func %d irq %d\n",
+ pdev->bus->number, PCI_SLOT(pdev->devfn),
+ PCI_FUNC(pdev->devfn), pdev->irq);
if ((pdev->vendor != PCI_VENDOR_ID_BROADCOM) ||
(((pdev->device & 0xff00) != 0x4300) &&
struct wl_info *wl;
struct ieee80211_hw *hw;
- WL_TRACE("wl: wl_suspend\n");
-
hw = pci_get_drvdata(pdev);
wl = HW_TO_WL(hw);
if (!wl) {
int err = 0;
u32 val;
- WL_TRACE("wl: wl_resume\n");
hw = pci_get_drvdata(pdev);
wl = HW_TO_WL(hw);
if (!wl) {
*/
void wl_init(struct wl_info *wl)
{
- WL_TRACE("wl%d: wl_init\n", wl->pub->unit);
-
+ BCMMSG(WL_TO_HW(wl)->wiphy, "wl%d\n", wl->pub->unit);
wl_reset(wl);
wlc_init(wl->wlc);
*/
uint wl_reset(struct wl_info *wl)
{
- WL_TRACE("wl%d: wl_reset\n", wl->pub->unit);
-
+ BCMMSG(WL_TO_HW(wl)->wiphy, "wl%d\n", wl->pub->unit);
wlc_reset(wl->wlc);
/* dpc will not be rescheduled */
struct wlc_hw_info *wlc_hw = wlc->hw;
u32 macintmask;
- WL_TRACE("wl%d: wlc_setband_inact\n", wlc_hw->unit);
+ BCMMSG(wlc->wiphy, "wl%d\n", wlc_hw->unit);
WARN_ON((R_REG(&wlc_hw->regs->maccontrol) & MCTL_EN_MAC) != 0);
uint bound_limit = bound ? wlc_hw->wlc->pub->tunables->rxbnd : -1;
wlc_d11rxhdr_t *wlc_rxhdr = NULL;
- WL_TRACE("wl%d: %s\n", wlc_hw->unit, __func__);
+ BCMMSG(wlc_hw->wlc->wiphy, "wl%d\n", wlc_hw->unit);
/* gather received frames */
while ((p = dma_rx(wlc_hw->di[fifo]))) {
macintstatus = wlc->macintstatus;
wlc->macintstatus = 0;
- WL_TRACE("wl%d: wlc_dpc: macintstatus 0x%x\n",
- wlc_hw->unit, macintstatus);
+ BCMMSG(wlc->wiphy, "wl%d: macintstatus 0x%x\n",
+ wlc_hw->unit, macintstatus);
WARN_ON(macintstatus & MI_PRQ); /* PRQ Interrupt in non-MBSS */
/* ATIM window end */
if (macintstatus & MI_ATIMWINEND) {
- WL_TRACE("wlc_isr: end of ATIM window\n");
-
+ BCMMSG(wlc->wiphy, "end of ATIM window\n");
OR_REG(®s->maccommand, wlc->qvalid);
wlc->qvalid = 0;
}
}
if (macintstatus & MI_RFDISABLE) {
- WL_TRACE("wl%d: BMAC Detected a change on the RF Disable Input\n", wlc_hw->unit);
-
+ BCMMSG(wlc->wiphy, "wl%d: BMAC Detected a change on the"
+ " RF Disable Input\n", wlc_hw->unit);
wlc->pub->_cnt->rfdisable++;
wl_rfkill_set_hw_state(wlc->wl);
}
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);
+ BCMMSG(wlc->wiphy, "wl%d\n", wlc_hw->unit);
if (!wlc_hw->up)
return;
{
uint bandunit;
- WL_TRACE("wl%d: wlc_bmac_set_chanspec 0x%x\n",
- wlc_hw->unit, chanspec);
+ BCMMSG(wlc_hw->wlc->wiphy, "wl%d: 0x%x\n", wlc_hw->unit, chanspec);
wlc_hw->chanspec = chanspec;
shared_phy_params_t sha_params;
struct wiphy *wiphy = wlc->wiphy;
- WL_TRACE("wl%d: wlc_bmac_attach: vendor 0x%x device 0x%x\n",
- unit, vendor, device);
-
+ BCMMSG(wlc->wiphy, "wl%d: vendor 0x%x device 0x%x\n", unit, vendor,
+ device);
wme = true;
goto fail;
}
- WL_TRACE("%s:: deviceid 0x%x nbands %d board 0x%x macaddr: %s\n",
- __func__, wlc_hw->deviceid, wlc_hw->_nbands,
+ BCMMSG(wlc->wiphy,
+ "deviceid 0x%x nbands %d board 0x%x macaddr: %s\n",
+ wlc_hw->deviceid, wlc_hw->_nbands,
wlc_hw->sih->boardtype, macaddr);
return err;
void wlc_bmac_reset(struct wlc_hw_info *wlc_hw)
{
- WL_TRACE("wl%d: wlc_bmac_reset\n", wlc_hw->unit);
+ BCMMSG(wlc_hw->wlc->wiphy, "wl%d\n", wlc_hw->unit);
wlc_hw->wlc->pub->_cnt->reset++;
bool fastclk;
struct wlc_info *wlc = wlc_hw->wlc;
- WL_TRACE("wl%d: wlc_bmac_init\n", wlc_hw->unit);
+ BCMMSG(wlc_hw->wlc->wiphy, "wl%d\n", wlc_hw->unit);
/* request FAST clock if not on */
fastclk = wlc_hw->forcefastclk;
{
uint coremask;
- WL_TRACE("wl%d: %s:\n", wlc_hw->unit, __func__);
+ BCMMSG(wlc_hw->wlc->wiphy, "wl%d\n", wlc_hw->unit);
/*
* Enable pll and xtal, initialize the power control registers,
int wlc_bmac_up_finish(struct wlc_hw_info *wlc_hw)
{
- WL_TRACE("wl%d: %s:\n", wlc_hw->unit, __func__);
+ BCMMSG(wlc_hw->wlc->wiphy, "wl%d\n", wlc_hw->unit);
wlc_hw->up = true;
wlc_phy_hw_state_upd(wlc_hw->band->pi, true);
bool dev_gone;
uint callbacks = 0;
- WL_TRACE("wl%d: %s:\n", wlc_hw->unit, __func__);
+ BCMMSG(wlc_hw->wlc->wiphy, "wl%d\n", wlc_hw->unit);
if (!wlc_hw->up)
return callbacks;
uint callbacks = 0;
bool dev_gone;
- WL_TRACE("wl%d: %s:\n", wlc_hw->unit, __func__);
+ BCMMSG(wlc_hw->wlc->wiphy, "wl%d\n", wlc_hw->unit);
if (!wlc_hw->up)
return callbacks;
u32 mac_hm;
u16 mac_l;
- WL_TRACE("wl%d: %s\n", wlc_hw->unit, __func__);
+ BCMMSG(wlc_hw->wlc->wiphy, "wl%d\n", wlc_hw->unit);
mac_hm =
(addr[3] << 24) | (addr[2] << 16) |
u16 mac_m;
u16 mac_h;
- WL_TRACE("wl%d: wlc_bmac_set_addrmatch\n", wlc_hw->unit);
+ BCMMSG(wlc_hw->wlc->wiphy, "wl%d: wlc_bmac_set_addrmatch\n",
+ wlc_hw->unit);
regs = wlc_hw->regs;
mac_l = addr[0] | (addr[1] << 8);
#ifdef IL_BIGENDIAN
volatile u16 *dptr = NULL;
#endif /* IL_BIGENDIAN */
- WL_TRACE("wl%d: wlc_bmac_write_template_ram\n", wlc_hw->unit);
+ BCMMSG(wlc_hw->wlc->wiphy, "wl%d\n", wlc_hw->unit);
regs = wlc_hw->regs;
W_REG(®s->tplatewrptr, offset);
{
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);
+ BCMMSG(wlc->wiphy, "wl%d: bandunit %d\n", wlc_hw->unit,
+ wlc_hw->band->bandunit);
wlc_ucode_bsinit(wlc_hw);
static 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);
+ BCMMSG(wlc_hw->wlc->wiphy, "wl%d: clk %d\n", wlc_hw->unit, clk);
wlc_hw->phyclk = 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);
+ BCMMSG(wlc_hw->wlc->wiphy, "wl%d\n", wlc_hw->unit);
ai_corereg(wlc_hw->sih, SI_CC_IDX,
offsetof(chipcregs_t, chipcontrol_addr), ~0, 0);
u32 phy_bw_clkbits;
bool phy_in_reset = false;
- WL_TRACE("wl%d: wlc_bmac_phy_reset\n", wlc_hw->unit);
+ BCMMSG(wlc_hw->wlc->wiphy, "wl%d\n", wlc_hw->unit);
if (pih == NULL)
return;
/* 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);
+ BCMMSG(wlc_hw->wlc->wiphy, "wl%d: bandunit %d\n", wlc_hw->unit,
+ bandunit);
wlc_hw->band = wlc_hw->bandstate[bandunit];
if (wlc_hw->wlc->pub->hw_up)
return;
- WL_TRACE("wl%d: %s:\n", wlc_hw->unit, __func__);
+ BCMMSG(wlc_hw->wlc->wiphy, "wl%d\n", wlc_hw->unit);
/*
* Enable pll and xtal, initialize the power control registers,
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__);
+ BCMMSG(wlc_hw->wlc->wiphy, "wl%d\n", wlc_hw->unit);
regs = wlc_hw->regs;
regs = wlc_hw->regs;
- WL_TRACE("wl%d: wlc_coreinit\n", wlc_hw->unit);
+ BCMMSG(wlc->wiphy, "wl%d\n", wlc_hw->unit);
/* reset PSM */
wlc_bmac_mctrl(wlc_hw, ~0, (MCTL_IHR_EN | MCTL_PSM_JMP_0 | MCTL_WAKE));
uint i;
uint count;
- WL_TRACE("wl%d: wlc_ucode_write\n", wlc_hw->unit);
+ BCMMSG(wlc_hw->wlc->wiphy, "wl%d\n", wlc_hw->unit);
count = (nbytes / sizeof(u32));
int i;
volatile u8 *base;
- WL_TRACE("wl%d: wlc_write_inits\n", wlc_hw->unit);
+ BCMMSG(wlc_hw->wlc->wiphy, "wl%d\n", wlc_hw->unit);
base = (volatile u8 *)wlc_hw->regs;
if (!intstatus)
continue;
- WL_TRACE("wl%d: wlc_bmac_fifoerrors: intstatus%d 0x%x\n",
- unit, idx, intstatus);
+ BCMMSG(wlc_hw->wlc->wiphy, "wl%d: intstatus%d 0x%x\n",
+ unit, idx, intstatus);
if (intstatus & I_RO) {
wiphy_err(wiphy, "wl%d: fifo %d: receive fifo "
/* macintstatus includes a DMA interrupt summary bit */
macintstatus = R_REG(®s->macintstatus);
- WL_TRACE("wl%d: macintstatus: 0x%x\n", wlc_hw->unit, macintstatus);
+ BCMMSG(wlc->wiphy, "wl%d: macintstatus: 0x%x\n", wlc_hw->unit,
+ macintstatus);
/* detect cardbus removed, in power down(suspend) and in reset */
if (DEVICEREMOVED(wlc))
*/
uint max_tx_num = bound ? wlc->pub->tunables->txsbnd : -1;
- WL_TRACE("wl%d: wlc_bmac_txstatus\n", wlc_hw->unit);
+ BCMMSG(wlc->wiphy, "wl%d\n", wlc_hw->unit);
txs = &txstatus;
regs = wlc_hw->regs;
u32 mc, mi;
struct wiphy *wiphy = wlc->wiphy;
- WL_TRACE("wl%d: wlc_suspend_mac_and_wait: bandunit %d\n",
- wlc_hw->unit, wlc_hw->band->bandunit);
+ BCMMSG(wlc->wiphy, "wl%d: bandunit %d\n", wlc_hw->unit,
+ wlc_hw->band->bandunit);
/*
* Track overlapping suspend requests
d11regs_t *regs = wlc_hw->regs;
u32 mc, mi;
- WL_TRACE("wl%d: wlc_enable_mac: bandunit %d\n",
- wlc_hw->unit, wlc->band->bandunit);
+ BCMMSG(wlc->wiphy, "wl%d: bandunit %d\n", wlc_hw->unit,
+ wlc->band->bandunit);
/*
* Track overlapping suspend requests
u32 w, val;
struct wiphy *wiphy = wlc_hw->wlc->wiphy;
- WL_TRACE("wl%d: validate_chip_access\n", wlc_hw->unit);
+ BCMMSG(wiphy, "wl%d\n", wlc_hw->unit);
regs = wlc_hw->regs;
d11regs_t *regs;
u32 tmp;
- WL_TRACE("wl%d: wlc_bmac_core_phypll_ctl\n", wlc_hw->unit);
+ BCMMSG(wlc_hw->wlc->wiphy, "wl%d\n", wlc_hw->unit);
tmp = 0;
regs = wlc_hw->regs;
{
bool dev_gone;
- WL_TRACE("wl%d: %s\n", wlc_hw->unit, __func__);
+ BCMMSG(wlc_hw->wlc->wiphy, "wl%d\n", wlc_hw->unit);
dev_gone = DEVICEREMOVED(wlc_hw->wlc);
/* power both the pll and external oscillator on/off */
static 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);
+ BCMMSG(wlc_hw->wlc->wiphy, "wl%d: 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)
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);
+ BCMMSG(wlc->wiphy, "pktpend fifo %d clrd\n", i);
}
/* free any posted rx packets */
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);
+ BCMMSG(wlc_hw->wlc->wiphy, "nvram vars totlen=%d\n",
+ wlc_hw->vars_size);
*buf = wlc_hw->vars;
*len = wlc_hw->vars_size;
struct wlc_pub *pub = wlc->pub;
char *ccode;
- WL_TRACE("wl%d: wlc_channel_mgr_attach\n", wlc->pub->unit);
+ BCMMSG(wlc->wiphy, "wl%d\n", wlc->pub->unit);
wlc_cm = kzalloc(sizeof(wlc_cm_info_t), GFP_ATOMIC);
if (wlc_cm == NULL) {
d11regs_t *regs = wlc->regs;
u32 v32;
- WL_TRACE("wl%d: %s\n", WLCWLUNIT(wlc), __func__);
+ BCMMSG(wlc->wiphy, "wl%d\n", WLCWLUNIT(wlc));
W_REG(®s->objaddr, (OBJADDR_RCMTA_SEL | (idx * 2)));
(void)R_REG(®s->objaddr);
void wlc_reset(struct wlc_info *wlc)
{
- WL_TRACE("wl%d: wlc_reset\n", wlc->pub->unit);
+ BCMMSG(wlc->wiphy, "wl%d\n", wlc->pub->unit);
wlc->check_for_unaligned_tbtt = false;
struct wlc_bsscfg *bsscfg;
bool mute = false;
- WL_TRACE("wl%d: wlc_init\n", wlc->pub->unit);
+ BCMMSG(wlc->wiphy, "wl%d\n", wlc->pub->unit);
regs = wlc->regs;
hps = PS_ALLOWED(wlc);
wake = hps ? (STAY_AWAKE(wlc)) : true;
- WL_TRACE("wl%d: wlc_set_ps_ctrl: hps %d wake %d\n",
+ BCMMSG(wlc->wiphy, "wl%d: hps %d wake %d\n",
wlc->pub->unit, hps, wake);
v1 = R_REG(&wlc->regs->maccontrol);
*/
void wlc_protection_upd(struct wlc_info *wlc, uint idx, int val)
{
- WL_TRACE("wlc_protection_upd: idx %d, val %d\n", idx, val);
+ BCMMSG(wlc->wiphy, "idx %d, val %d\n", idx, val);
switch (idx) {
case WLC_PROT_G_SPEC:
uint parkband;
uint i, band_order[2];
- WL_TRACE("wl%d: wlc_bandinit_ordered\n", wlc->pub->unit);
+ BCMMSG(wlc->wiphy, "wl%d\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
/* band-specific init */
static void WLBANDINITFN(wlc_bsinit) (struct wlc_info *wlc)
{
- WL_TRACE("wl%d: wlc_bsinit: bandunit %d\n",
+ BCMMSG(wlc->wiphy, "wl%d: bandunit %d\n",
wlc->pub->unit, wlc->band->bandunit);
/* write ucode ACK/CTS rate table */
if (wlc == NULL)
return 0;
- WL_TRACE("wl%d: %s\n", wlc->pub->unit, __func__);
+ BCMMSG(wlc->wiphy, "wl%d\n", wlc->pub->unit);
callbacks += wlc_bmac_detach(wlc);
int i;
struct wlc_bsscfg *cfg;
- WL_TRACE("wl%d: wlc_watchdog\n", wlc->pub->unit);
+ BCMMSG(wlc->wiphy, "wl%d\n", wlc->pub->unit);
if (!wlc->pub->up)
return;
/* make interface operational */
int wlc_up(struct wlc_info *wlc)
{
- WL_TRACE("wl%d: %s:\n", wlc->pub->unit, __func__);
+ BCMMSG(wlc->wiphy, "wl%d\n", wlc->pub->unit);
/* HW is turned off so don't try to access it */
if (wlc->pub->hw_off || DEVICEREMOVED(wlc))
bool dev_gone = false;
struct wlc_txq_info *qi;
- WL_TRACE("wl%d: %s:\n", wlc->pub->unit, __func__);
+ BCMMSG(wlc->wiphy, "wl%d\n", wlc->pub->unit);
/* check if we are already in the going down path */
if (wlc->going_down) {
bool bool_val2;
wlc_bss_info_t *current_bss;
- WL_TRACE("wl%d: %s\n", wlc->pub->unit, __func__);
+ BCMMSG(wlc->wiphy, "wl%d\n", wlc->pub->unit);
bsscfg = NULL;
current_bss = NULL;
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));
+ BCMMSG(wlc->wiphy, "wl%d: id %d\n", wlc->pub->unit, IOV_ID(actionid));
/* Do the actual parameter implementation */
switch (actionid) {
case IOV_SVAL(IOV_RTSTHRESH):
*/
if (commit) {
TXPKTPENDINC(wlc, fifo, txpktpend);
- WL_TRACE("wlc_txfifo, pktpend inc %d to %d\n",
+ BCMMSG(wlc->wiphy, "pktpend inc %d to %d\n",
txpktpend, TXPKTPENDGET(wlc, fifo));
}
if (macintstatus & ~(MI_TBTT | MI_TXSTOP)) {
bcm_format_flags(int_flags, macintstatus, flagstr,
sizeof(flagstr));
- WL_TRACE("wl%d: macintstatus 0x%x %s\n",
+ BCMMSG(wlc->wiphy, "wl%d: macintstatus 0x%x %s\n",
wlc->pub->unit, macintstatus, flagstr);
}
#endif /* BCMDBG */
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));
+ BCMMSG(wlc->wiphy, "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);
uint len;
bool is_amsdu;
- WL_TRACE("wl%d: wlc_recv\n", wlc->pub->unit);
+ BCMMSG(wlc->wiphy, "wl%d\n", wlc->pub->unit);
/* frame starts with rxhdr */
rxh = (d11rxhdr_t *) (p->data);
{
uint nsyms, len = 0, kNdps;
- WL_TRACE("wl%d: wlc_calc_lsig_len: rate %d, len%d\n",
+ BCMMSG(wlc->wiphy, "wl%d: rate %d, len%d\n",
wlc->pub->unit, RSPEC2RATE(ratespec), mac_len);
if (IS_MCS(ratespec)) {
rate = WLC_RATE_1M;
}
- WL_TRACE("wl%d: wlc_calc_frame_time: rspec 0x%x, preamble_type %d, len%d\n",
+ BCMMSG(wlc->wiphy, "wl%d: rspec 0x%x, preamble_type %d, len%d\n",
wlc->pub->unit, ratespec, preamble_type, mac_len);
if (IS_MCS(ratespec)) {
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",
+ BCMMSG(wlc->wiphy, "wl%d: rspec 0x%x, preamble_type %d, dur %d\n",
wlc->pub->unit, ratespec, preamble_type, dur);
if (IS_MCS(ratespec)) {
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);
+ BCMMSG(wlc->wiphy, "wl%d: 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
*/
{
uint dur = 0;
- WL_TRACE("wl%d: wlc_calc_ack_time: rspec 0x%x, preamble_type %d\n",
- wlc->pub->unit, rspec, preamble_type);
+ BCMMSG(wlc->wiphy, "wl%d: 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
*/
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);
+ BCMMSG(wlc->wiphy, "wl%d: ratespec 0x%x, preamble_type %d\n",
+ wlc->pub->unit, rspec, preamble_type);
return wlc_calc_ack_time(wlc, rspec, preamble_type);
}
} 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);
+ BCMMSG(wlc->wiphy, "wl%d: enabling "
+ "SDM mode for mcs %d\n",
+ WLCWLUNIT(wlc), rate);
stf = PHY_TXC1_MODE_SDM;
}
} else {
uint prio_bits;
uint cur_bits;
- WL_TRACE("%s: flow control kicks in\n", __func__);
+ BCMMSG(wlc->wiphy, "flow control kicks in\n");
if (prio == ALLPRIO) {
prio_bits = TXQ_STOP_FOR_PRIOFC_MASK;
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);
+ BCMMSG(wlc->wiphy, "wl%d: Nsts %d core_mask %x\n",
+ wlc->pub->unit, Nsts, core_mask);
if (WLC_BITSCNT(core_mask) > wlc->stf->txstreams) {
core_mask = 0;
int i;
u8 core_mask = 0;
- WL_TRACE("wl%d: %s: val %x\n", wlc->pub->unit, __func__, val);
+ BCMMSG(wlc->wiphy, "wl%d: val %x\n", wlc->pub->unit, val);
wlc->stf->spatial_policy = (s8) val;
for (i = 1; i <= MAX_STREAMS_SUPPORTED; i++) {