Search Linux Wireless

[PATCH] bcm43xx-mac80211: Remove the stackdump in rfatt/bbatt assertion

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


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.
-
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux