From 7232141526e8c3702984bc5239e283b50c5f3d09 Mon Sep 17 00:00:00 2001 From: Mateusz Kulikowski Date: Sun, 31 May 2015 20:19:36 +0200 Subject: [PATCH] staging: rtl8192e: Remove RTLLIB_DEBUG_DATA() Use print_hex_dump_bytes() if VERBOSE_DEBUG is enabled. Signed-off-by: Mateusz Kulikowski Signed-off-by: Greg Kroah-Hartman --- 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 39d28e30aeb5..25765b8b8bc4 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 584f7a9af89a..3edd5d1a05fb 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 da179a566b17..e26a23611315 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 8ef820d52c72..7047d2c61c23 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: -- 2.30.2