[PATCH] libertas: make debug configurable

The debug output of libertas was either not present or it was overwhelming.
This patch adds the possibility to specify a bitmask for the area of
interest. One should then only get the desired output.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
diff --git a/drivers/net/wireless/libertas/ethtool.c b/drivers/net/wireless/libertas/ethtool.c
index 0064de5..4655953 100644
--- a/drivers/net/wireless/libertas/ethtool.c
+++ b/drivers/net/wireless/libertas/ethtool.c
@@ -69,7 +69,7 @@
 
 	/* +14 is for action, offset, and NOB in
 	 * response */
-	lbs_pr_debug(1, "action:%d offset: %x NOB: %02x\n",
+	lbs_deb_ethtool("action:%d offset: %x NOB: %02x\n",
 	       regctrl.action, regctrl.offset, regctrl.NOB);
 
 	ret = libertas_prepare_and_send_command(priv,
@@ -81,8 +81,7 @@
 	if (ret) {
 		if (adapter->prdeeprom)
 			kfree(adapter->prdeeprom);
-		LEAVE();
-			return ret;
+		goto done;
 	}
 
 	mdelay(10);
@@ -101,7 +100,11 @@
 		kfree(adapter->prdeeprom);
 //	mutex_unlock(&priv->mutex);
 
-        return 0;
+	ret = 0;
+
+done:
+	lbs_deb_enter_args(LBS_DEB_ETHTOOL, "ret %d", ret);
+        return ret;
 }
 
 static void libertas_ethtool_get_stats(struct net_device * dev,
@@ -109,7 +112,7 @@
 {
 	wlan_private *priv = dev->priv;
 
-	ENTER();
+	lbs_deb_enter(LBS_DEB_ETHTOOL);
 
 	stats->cmd = ETHTOOL_GSTATS;
 	BUG_ON(stats->n_stats != MESH_STATS_NUM);
@@ -122,7 +125,7 @@
         data[5] = priv->mstats.fwd_bcast_cnt;
         data[6] = priv->mstats.drop_blind;
 
-	LEAVE();
+	lbs_deb_enter(LBS_DEB_ETHTOOL);
 }
 
 static int libertas_ethtool_get_stats_count(struct net_device * dev)
@@ -131,15 +134,16 @@
 	wlan_private *priv = dev->priv;
 	struct cmd_ds_mesh_access mesh_access;
 
-	ENTER();
+	lbs_deb_enter(LBS_DEB_ETHTOOL);
+
 	/* Get Mesh Statistics */
 	ret = libertas_prepare_and_send_command(priv,
 			cmd_mesh_access, cmd_act_mesh_get_stats,
 			cmd_option_waitforrsp, 0, &mesh_access);
 
 	if (ret) {
-		LEAVE();
-		return 0;
+		ret = 0;
+		goto done;
 	}
 
         priv->mstats.fwd_drop_rbt = mesh_access.data[0];
@@ -150,8 +154,11 @@
         priv->mstats.fwd_bcast_cnt = mesh_access.data[5];
         priv->mstats.drop_blind = mesh_access.data[6];
 
-	LEAVE();
-	return MESH_STATS_NUM;
+	ret = MESH_STATS_NUM;
+
+done:
+	lbs_deb_enter_args(LBS_DEB_ETHTOOL, "ret %d", ret);
+	return ret;
 }
 
 static void libertas_ethtool_get_strings (struct net_device * dev,
@@ -160,7 +167,8 @@
 {
 	int i;
 
-	ENTER();
+	lbs_deb_enter(LBS_DEB_ETHTOOL);
+
 	switch (stringset) {
         case ETH_SS_STATS:
 		for (i=0; i < MESH_STATS_NUM; i++) {
@@ -170,7 +178,7 @@
 		}
 		break;
         }
-	LEAVE();
+	lbs_deb_enter(LBS_DEB_ETHTOOL);
 }
 
 struct ethtool_ops libertas_ethtool_ops = {