mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
To: gregkh@linuxfoundation.org
Cc: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>,
	dan.carpenter@oracle.com, joe@perches.com,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: [PATCH v5 17/34] staging: rtl8192e: Remove RTLLIB_DEBUG_DATA()
Date: Sun, 31 May 2015 20:19:36 +0200	[thread overview]
Message-ID: <1433096393-9862-18-git-send-email-mateusz.kulikowski@gmail.com> (raw)
In-Reply-To: <1433096393-9862-1-git-send-email-mateusz.kulikowski@gmail.com>

Use print_hex_dump_bytes() if VERBOSE_DEBUG is enabled.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
---
 drivers/staging/rtl8192e/rtl819x_BAProc.c | 20 ++++++++++++++++----
 drivers/staging/rtl8192e/rtl819x_HTProc.c |  7 +++++--
 drivers/staging/rtl8192e/rtllib.h         | 11 -----------
 drivers/staging/rtl8192e/rtllib_tx.c      |  5 ++++-
 4 files changed, 25 insertions(+), 18 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl819x_BAProc.c b/drivers/staging/rtl8192e/rtl819x_BAProc.c
index 39d28e3..25765b8 100644
--- a/drivers/staging/rtl8192e/rtl819x_BAProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_BAProc.c
@@ -133,7 +133,10 @@ static struct sk_buff *rtllib_ADDBA(struct rtllib_device *ieee, u8 *Dst,
 		tag += 2;
 	}
 
-	RTLLIB_DEBUG_DATA(RTLLIB_DL_DATA|RTLLIB_DL_BA, skb->data, skb->len);
+#ifdef VERBOSE_DEBUG
+	print_hex_dump_bytes("rtllib_ADDBA(): ", DUMP_PREFIX_NONE, skb->data,
+			     skb->len);
+#endif
 	return skb;
 }
 
@@ -184,7 +187,10 @@ static struct sk_buff *rtllib_DELBA(struct rtllib_device *ieee, u8 *dst,
 	put_unaligned_le16(ReasonCode, tag);
 	tag += 2;
 
-	RTLLIB_DEBUG_DATA(RTLLIB_DL_DATA|RTLLIB_DL_BA, skb->data, skb->len);
+#ifdef VERBOSE_DEBUG
+	print_hex_dump_bytes("rtllib_DELBA(): ", DUMP_PREFIX_NONE, skb->data,
+			     skb->len);
+#endif
 	return skb;
 }
 
@@ -246,7 +252,10 @@ int rtllib_rx_ADDBAReq(struct rtllib_device *ieee, struct sk_buff *skb)
 		return -1;
 	}
 
-	RTLLIB_DEBUG_DATA(RTLLIB_DL_DATA|RTLLIB_DL_BA, skb->data, skb->len);
+#ifdef VERBOSE_DEBUG
+	print_hex_dump_bytes("rtllib_rx_ADDBAReq(): ", DUMP_PREFIX_NONE,
+			     skb->data, skb->len);
+#endif
 
 	req = (struct rtllib_hdr_3addr *) skb->data;
 	tag = (u8 *)req;
@@ -442,7 +451,10 @@ int rtllib_rx_DELBA(struct rtllib_device *ieee, struct sk_buff *skb)
 		return -1;
 	}
 
-	RTLLIB_DEBUG_DATA(RTLLIB_DL_DATA|RTLLIB_DL_BA, skb->data, skb->len);
+#ifdef VERBOSE_DEBUG
+	print_hex_dump_bytes("rtllib_rx_DELBA(): ", DUMP_PREFIX_NONE, skb->data,
+			     skb->len);
+#endif
 	delba = (struct rtllib_hdr_3addr *)skb->data;
 	dst = (u8 *)(&delba->addr2[0]);
 	delba += sizeof(struct rtllib_hdr_3addr);
diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c b/drivers/staging/rtl8192e/rtl819x_HTProc.c
index 584f7a9..3edd5d1 100644
--- a/drivers/staging/rtl8192e/rtl819x_HTProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c
@@ -553,8 +553,11 @@ void HTOnAssocRsp(struct rtllib_device *ieee)
 	else
 		pPeerHTInfo = (struct ht_info_ele *)(pHTInfo->PeerHTInfoBuf);
 
-	RTLLIB_DEBUG_DATA(RTLLIB_DL_DATA | RTLLIB_DL_HT, pPeerHTCap,
-			  sizeof(struct ht_capab_ele));
+
+#ifdef VERBOSE_DEBUG
+	print_hex_dump_bytes("HTOnAssocRsp(): ", DUMP_PREFIX_NONE,
+			     pPeerHTCap, sizeof(struct ht_capab_ele));
+#endif
 	HTSetConnectBwMode(ieee, (enum ht_channel_width)(pPeerHTCap->ChlWidth),
 			  (enum ht_extchnl_offset)(pPeerHTInfo->ExtChlOffset));
 	pHTInfo->bCurTxBW40MHz = ((pPeerHTInfo->RecommemdedTxWidth == 1) ?
diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index da179a5..e26a236 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -642,17 +642,6 @@ enum wireless_network_type {
 #define OUI_SUBTYPE_QOS_CAPABI	5
 
 /* debug macros */
-extern u32 rtllib_debug_level;
-
-#define RTLLIB_DEBUG_DATA(level, data, datalen)	\
-	do {							\
-		if ((rtllib_debug_level & (level)) == (level)) {	\
-			printk(KERN_DEBUG "rtllib: %s()\n", __func__);	\
-			print_hex_dump_bytes(KERN_DEBUG, DUMP_PREFIX_NONE, \
-					     data, datalen); \
-		}					\
-	} while (0)
-
 /* To use the debug system;
  *
  * If you are defining a new debug classification, simply add it to the #define
diff --git a/drivers/staging/rtl8192e/rtllib_tx.c b/drivers/staging/rtl8192e/rtllib_tx.c
index 8ef820d..7047d2c 100644
--- a/drivers/staging/rtl8192e/rtllib_tx.c
+++ b/drivers/staging/rtl8192e/rtllib_tx.c
@@ -260,7 +260,10 @@ static int rtllib_classify(struct sk_buff *skb, u8 bIsAmsdu)
 	if (eth->h_proto != htons(ETH_P_IP))
 		return 0;
 
-	RTLLIB_DEBUG_DATA(RTLLIB_DL_DATA, skb->data, skb->len);
+#ifdef VERBOSE_DEBUG
+	print_hex_dump_bytes("rtllib_classify(): ", DUMP_PREFIX_NONE, skb->data,
+			     skb->len);
+#endif
 	ip = ip_hdr(skb);
 	switch (ip->tos & 0xfc) {
 	case 0x20:
-- 
1.8.4.1


  parent reply	other threads:[~2015-05-31 18:26 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-31 18:19 [PATCH v5 00/34] staging: rtl8192e: Fix more checkpatch.pl warnings Mateusz Kulikowski
2015-05-31 18:19 ` [PATCH v5 01/34] staging: rtl8192e: accept const MAC address Mateusz Kulikowski
2015-05-31 18:19 ` [PATCH v5 02/34] staging: rtl8192e: Make ethernet addresses properly aligned Mateusz Kulikowski
2015-05-31 18:19 ` [PATCH v5 03/34] staging: rtl8192e: Fix PREFER_ETHER_ADDR_COPY warnings Mateusz Kulikowski
2015-05-31 18:19 ` [PATCH v5 04/34] staging: rtl8192e: Fix DEEP_INDENTATION warning in rtllib_parse_info_param() Mateusz Kulikowski
2015-05-31 18:19 ` [PATCH v5 05/34] staging: rtl8192e: Replace memcmp() with ether_addr_equal() Mateusz Kulikowski
2015-05-31 18:19 ` [PATCH v5 06/34] staging: rtl8192e: Remove rtllib_crypt.[ch] Mateusz Kulikowski
2015-05-31 18:19 ` [PATCH v5 07/34] staging: rtl8192e: Replace RTLLIB_DEBUG(DL_ERR) with netdev_*() Mateusz Kulikowski
2015-05-31 18:19 ` [PATCH v5 08/34] staging: rtl8192e: Remove RTLLIB_ERROR() and RTLLIB_WARNING() Mateusz Kulikowski
2015-05-31 18:19 ` [PATCH v5 09/34] staging: rtl8192e: Remove RTLLIB_DEBUG_WX() Mateusz Kulikowski
2015-05-31 21:31   ` Greg KH
2015-05-31 18:19 ` [PATCH v5 10/34] staging: rtl8192e: Simplify rtllib_process_probe_response() Mateusz Kulikowski
2015-05-31 18:19 ` [PATCH v5 11/34] staging: rtl8192e: Remove RTLLIB_DEBUG_SCAN() Mateusz Kulikowski
2015-05-31 18:19 ` [PATCH v5 12/34] staging: rtl8192e: Remove RTLLIB_DEBUG_(FRAG|EAP|DROP|STATE|TX|RX)() Mateusz Kulikowski
2015-05-31 18:19 ` [PATCH v5 13/34] staging: rtl8192e: Remove RTLLIB_DEBUG_QOS() Mateusz Kulikowski
2015-05-31 18:19 ` [PATCH v5 14/34] staging: rtl8192e: Remove RTLLIB_DEBUG_MGMT() Mateusz Kulikowski
2015-05-31 18:19 ` [PATCH v5 15/34] staging: rtl8192e: Remove RTLLIB_DEBUG_INFO() Mateusz Kulikowski
2015-05-31 18:19 ` [PATCH v5 16/34] staging: rtl8192e: Remove RTLLIB_DEBUG() Mateusz Kulikowski
2015-05-31 18:19 ` Mateusz Kulikowski [this message]
2015-05-31 18:19 ` [PATCH v5 18/34] staging: rtl8192e: Remove remains of RTLLIB_*_DEBUG() (including proc entry) Mateusz Kulikowski
2015-05-31 18:19 ` [PATCH v5 19/34] staging: rtl8192e: Remove assert() macro Mateusz Kulikowski
2015-05-31 18:19 ` [PATCH v5 20/34] staging: rtl8192e: Fix PREFER_PR_LEVEL warnings Mateusz Kulikowski
2015-05-31 18:19 ` [PATCH v5 21/34] staging: rtl8192e: Fix LONG_LINE warnings Mateusz Kulikowski
2015-05-31 18:19 ` [PATCH v5 22/34] staging: rtl8192e: Fix LONG_LING in rtllib_parse_info_param() Mateusz Kulikowski
2015-05-31 18:19 ` [PATCH v5 23/34] staging: rtl8192e: Remove unimplemented iwpriv handlers Mateusz Kulikowski
2015-05-31 18:19 ` [PATCH v5 24/34] staging: rtl8192e: Fix OOM_MESSAGE warnings Mateusz Kulikowski
2015-05-31 18:19 ` [PATCH v5 25/34] staging: rtl8192e: Remove unused rtl_crypto.h Mateusz Kulikowski
2015-05-31 18:19 ` [PATCH v5 26/34] staging: rtl8192e: Replace ?: with max_t Mateusz Kulikowski
2015-05-31 18:19 ` [PATCH v5 27/34] staging: rtl8192e: Replace ?: with min_t Mateusz Kulikowski
2015-05-31 18:19 ` [PATCH v5 28/34] staging: rtl8192e: Replace ?: with max Mateusz Kulikowski
2015-05-31 18:19 ` [PATCH v5 29/34] staging: rtl8192e: Remove unneeded RT_TRACE(COMP_ERR,...) Mateusz Kulikowski
2015-05-31 18:19 ` [PATCH v5 30/34] staging: rtl8192e: rtl8192_phy_checkBBAndRF(): Don't check MAC Mateusz Kulikowski
2015-05-31 18:19 ` [PATCH v5 31/34] staging: rtl8192e: Replace RT_TRACE(COMP_ERR, ...) with netdev_* Mateusz Kulikowski
2015-05-31 18:19 ` [PATCH v5 32/34] staging: rtl8192e: Fix trivial LONG_LINE errors Mateusz Kulikowski
2015-05-31 18:19 ` [PATCH v5 33/34] staging: rtl8192e: rtl8192E_suspend(): Fix WOL reporting Mateusz Kulikowski
2015-05-31 18:19 ` [PATCH v5 34/34] staging: rtl8192e: Fix SPACING error Mateusz Kulikowski
2015-05-31 18:39 ` [PATCH v5 00/34] staging: rtl8192e: Fix more checkpatch.pl warnings Joe Perches
2015-05-31 21:35 ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1433096393-9862-18-git-send-email-mateusz.kulikowski@gmail.com \
    --to=mateusz.kulikowski@gmail.com \
    --cc=dan.carpenter@oracle.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®