staging: rtl8192e: Remove RTLLIB_DEBUG_DATA()
authorMateusz Kulikowski <mateusz.kulikowski@gmail.com>
Sun, 31 May 2015 18:19:36 +0000 (20:19 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 31 May 2015 21:32:02 +0000 (06:32 +0900)
Use print_hex_dump_bytes() if VERBOSE_DEBUG is enabled.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192e/rtl819x_BAProc.c
drivers/staging/rtl8192e/rtl819x_HTProc.c
drivers/staging/rtl8192e/rtllib.h
drivers/staging/rtl8192e/rtllib_tx.c

index 39d28e30aeb54c587f53f720c22da0587a2cffaa..25765b8b8bc4a9fdd8de573adfc14eeb67808ee0 100644 (file)
@@ -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);
index 584f7a9af89a0f8759b1b32aaefd70d3c0fa7a9e..3edd5d1a05fb809958e8d2a4e3294443481a3ada 100644 (file)
@@ -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) ?
index da179a566b17e937a300337f220afcbf828ec6dc..e26a236113150ccc89a52ac875e006c67fc532dd 100644 (file)
@@ -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
index 8ef820d52c725c3aa6762de50a6acf86b2a63c0f..7047d2c61c236e549a8344b000bfb96ffb2eae5d 100644 (file)
@@ -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: