* [PATCH] bcm43xx-mac80211: Remove the stackdump in rfatt/bbatt assertion
@ 2007-08-07 16:15 Michael Buesch
2007-08-07 18:01 ` Larry Finger
0 siblings, 1 reply; 2+ messages in thread
From: Michael Buesch @ 2007-08-07 16:15 UTC (permalink / raw)
To: John Linville; +Cc: linux-wireless, Pavel Roskin, Larry Finger, bcm43xx-dev
This removes the stackdump in the rfatt/bbatt assertion
to reduce verbosity, but it also increases the message log
level from "debug" to "error".
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Index: wireless-dev/drivers/net/wireless/bcm43xx-mac80211/bcm43xx_lo.c
===================================================================
--- wireless-dev.orig/drivers/net/wireless/bcm43xx-mac80211/bcm43xx_lo.c 2007-08-07 17:57:52.000000000 +0200
+++ wireless-dev/drivers/net/wireless/bcm43xx-mac80211/bcm43xx_lo.c 2007-08-07 18:11:04.000000000 +0200
@@ -62,28 +62,23 @@ static void bcm43xx_lo_write(struct bcm4
bcm43xx_phy_write(dev, reg, value);
}
-static inline
-int assert_rfatt_and_bbatt(const struct bcm43xx_rfatt *rfatt,
- const struct bcm43xx_bbatt *bbatt,
- struct bcm43xx_wldev *dev)
+static int assert_rfatt_and_bbatt(const struct bcm43xx_rfatt *rfatt,
+ const struct bcm43xx_bbatt *bbatt,
+ struct bcm43xx_wldev *dev)
{
int err = 0;
/* Check the attenuation values against the LO control array sizes. */
-#if BCM43xx_DEBUG
- if (rfatt->att >= BCM43xx_NR_RF) {
- bcmdbg(dev->wl, "rfatt(%u) >= size of LO array\n",
+ if (unlikely(rfatt->att >= BCM43xx_NR_RF)) {
+ bcmerr(dev->wl, "rfatt(%u) >= size of LO array\n",
rfatt->att);
err = -EINVAL;
}
- if (bbatt->att >= BCM43xx_NR_BB) {
- bcmdbg(dev->wl, "bbatt(%u) >= size of LO array\n",
+ if (unlikely(bbatt->att >= BCM43xx_NR_BB)) {
+ bcmerr(dev->wl, "bbatt(%u) >= size of LO array\n",
bbatt->att);
err = -EINVAL;
}
- if (err)
- dump_stack();
-#endif /* BCM43xx_DEBUG */
return err;
}
--
Greetings Michael.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-08-07 18:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-07 16:15 [PATCH] bcm43xx-mac80211: Remove the stackdump in rfatt/bbatt assertion Michael Buesch
2007-08-07 18:01 ` Larry Finger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).