staging: rtl8192e: Remove ifdefs for CONFIG_RTLLIB_DEBUG
authorLarry Finger <Larry.Finger@lwfinger.net>
Thu, 14 Jul 2011 23:48:38 +0000 (18:48 -0500)
committerLarry Finger <Larry.Finger@lwfinger.net>
Wed, 24 Aug 2011 02:23:39 +0000 (21:23 -0500)
This symbol is unconditionally defined in a header file, thus tests for it can be removed.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
drivers/staging/rtl8192e/rtllib.h
drivers/staging/rtl8192e/rtllib_module.c
drivers/staging/rtl8192e/rtllib_rx.c
drivers/staging/rtl8192e/rtllib_tx.c

index 352ee474bbfa514202409cc6ec5d5d688f1da012..d1c35503879f3df73652c6fbdc10e763140cc9a3 100644 (file)
@@ -670,8 +670,6 @@ typedef enum _NETWORK_TYPE{
 #define OUI_SUBTYPE_QOS_CAPABI 5
 
 /* debug macros */
-#define CONFIG_RTLLIB_DEBUG
-#ifdef CONFIG_RTLLIB_DEBUG
 extern u32 rtllib_debug_level;
 #define RTLLIB_DEBUG(level, fmt, args...) \
 do { if (rtllib_debug_level & (level)) \
@@ -690,12 +688,6 @@ do { if (rtllib_debug_level & (level)) \
                        printk("\n");                   \
                }                                       \
        } while (0)
-#else
-#define RTLLIB_DEBUG(level, fmt, args...) do {} while (0)
-#define RTLLIB_DEBUG_DATA(level, data, datalen) do {} while(0)
-#endif /* CONFIG_RTLLIB_DEBUG */
-
-/* debug macros not dependent on CONFIG_RTLLIB_DEBUG */
 
 #define MAC_FMT "%02x:%02x:%02x:%02x:%02x:%02x"
 #define MAC_ARG(x) ((u8*)(x))[0],((u8*)(x))[1],((u8*)(x))[2],((u8*)(x))[3],((u8*)(x))[4],((u8*)(x))[5]
@@ -721,8 +713,6 @@ do { if (rtllib_debug_level & (level)) \
  *
  * you simply need to add your entry to the ipw_debug_levels array.
  *
- * If you do not see debug_level in /proc/net/ipw then you do not have
- * CONFIG_RTLLIB_DEBUG defined in your kernel configuration
  *
  */
 
@@ -763,7 +753,6 @@ do { if (rtllib_debug_level & (level)) \
 #define RTLLIB_DEBUG_RX(f, a...)  RTLLIB_DEBUG(RTLLIB_DL_RX, f, ## a)
 #define RTLLIB_DEBUG_QOS(f, a...)  RTLLIB_DEBUG(RTLLIB_DL_QOS, f, ## a)
 
-#ifdef CONFIG_RTLLIB_DEBUG
 /* Added by Annie, 2005-11-22. */
 #define MAX_STR_LEN     64
 /* I want to see ASCII 33 to 126 only. Otherwise, I print '?'. Annie, 2005-11-22.*/
@@ -785,10 +774,6 @@ do { if (rtllib_debug_level & (level)) \
                                 printk(_TitleString);                                         \
                                 printk(": %d, <%s>\n", _Len, buffer);                         \
                         }
-#else
-#define RTLLIB_PRINT_STR(_Comp, _TitleString, _Ptr, _Len)  do {} while (0)
-#endif
-
 #ifndef ETH_P_PAE
 #define ETH_P_PAE 0x888E /* Port Access Entity (IEEE 802.1X) */
 #define ETH_P_IP       0x0800          /* Internet Protocol packet     */
index 6a33bff11dc72e3de41e864cfa08711a3bf800b5..3462e44ce230d0904a4b6d21daa43ecb4cff2520 100644 (file)
@@ -219,8 +219,6 @@ void free_rtllib(struct net_device *dev)
        free_netdev(dev);
 }
 
-#ifdef CONFIG_RTLLIB_DEBUG
-
 u32 rtllib_debug_level = 0;
 static int debug = \
                            RTLLIB_DL_ERR
@@ -262,7 +260,6 @@ static int store_debug_level(struct file *file, const char *buffer,
 
 int __init rtllib_init(void)
 {
-#ifdef CONFIG_RTLLIB_DEBUG
        struct proc_dir_entry *e;
 
        rtllib_debug_level = debug;
@@ -282,20 +279,15 @@ int __init rtllib_init(void)
        e->read_proc = show_debug_level;
        e->write_proc = store_debug_level;
        e->data = NULL;
-#endif
 
        return 0;
 }
 
 void __exit rtllib_exit(void)
 {
-#ifdef CONFIG_RTLLIB_DEBUG
        if (rtllib_proc) {
                remove_proc_entry("debug_level", rtllib_proc);
                remove_proc_entry(DRV_NAME, init_net.proc_net);
                rtllib_proc = NULL;
        }
-#endif
 }
-
-#endif
index b6e23a2ab08f02e7e5d88e6a40e379d4ac522a59..2c4e777f3c080f3427c59268e624635056a30dbc 100644 (file)
@@ -1131,14 +1131,12 @@ int rtllib_rx_decrypt(
                if (/*ieee->ieee802_1x &&*/
                    rtllib_is_eapol_frame(ieee, skb, hdrlen)) {
 
-#ifdef CONFIG_RTLLIB_DEBUG
                        /* pass unencrypted EAPOL frames even if encryption is
                         * configured */
                        struct eapol *eap = (struct eapol *)(skb->data +
                                24);
                        RTLLIB_DEBUG_EAP("RX: IEEE 802.1X EAPOL frame: %s\n",
                                                eap_get_type(eap->type));
-#endif
                } else {
                        RTLLIB_DEBUG_DROP(
                                "encryption configured, but RX "
@@ -1148,7 +1146,6 @@ int rtllib_rx_decrypt(
                }
        }
 
-#ifdef CONFIG_RTLLIB_DEBUG
        if (crypt && !(fc & RTLLIB_FCTL_WEP) &&
            rtllib_is_eapol_frame(ieee, skb, hdrlen)) {
                        struct eapol *eap = (struct eapol *)(skb->data +
@@ -1156,7 +1153,6 @@ int rtllib_rx_decrypt(
                        RTLLIB_DEBUG_EAP("RX: IEEE 802.1X EAPOL frame: %s\n",
                                                eap_get_type(eap->type));
        }
-#endif
 
        if (crypt && !(fc & RTLLIB_FCTL_WEP) && !ieee->open_wep &&
            !rtllib_is_eapol_frame(ieee, skb, hdrlen)) {
@@ -1686,7 +1682,6 @@ static int rtllib_parse_qos_info_param_IE(struct rtllib_info_element
         return rc;
 }
 
-#ifdef CONFIG_RTLLIB_DEBUG
 #define MFIE_STRING(x) case MFIE_TYPE_ ##x: return #x
 
 static const char *get_info_element_string(u16 id)
@@ -1722,7 +1717,6 @@ static const char *get_info_element_string(u16 id)
                 return "UNKNOWN";
         }
 }
-#endif
 
 static inline void rtllib_extract_country_ie(
        struct rtllib_device *ieee,
@@ -1762,10 +1756,9 @@ int rtllib_parse_info_param(struct rtllib_device *ieee,
        u16     tmp_htinfo_len=0;
        u16 ht_realtek_agg_len=0;
        u8  ht_realtek_agg_buf[MAX_IE_LEN];
-#ifdef CONFIG_RTLLIB_DEBUG
        char rates_str[64];
        char *p;
-#endif
+
        while (length >= sizeof(*info_element)) {
                if (sizeof(*info_element) + info_element->len > length) {
                        RTLLIB_DEBUG_MGMT("Info elem: parse failed: "
@@ -1800,18 +1793,14 @@ int rtllib_parse_info_param(struct rtllib_device *ieee,
                        break;
 
                case MFIE_TYPE_RATES:
-#ifdef CONFIG_RTLLIB_DEBUG
                        p = rates_str;
-#endif
                        network->rates_len = min(info_element->len,
                                                 MAX_RATES_LENGTH);
                        for (i = 0; i < network->rates_len; i++) {
                                network->rates[i] = info_element->data[i];
-#ifdef CONFIG_RTLLIB_DEBUG
                                p += snprintf(p, sizeof(rates_str) -
                                              (p - rates_str), "%02X ",
                                              network->rates[i]);
-#endif
                                if (rtllib_is_ofdm_rate
                                    (info_element->data[i])) {
                                        network->flags |= NETWORK_HAS_OFDM;
@@ -1832,18 +1821,14 @@ int rtllib_parse_info_param(struct rtllib_device *ieee,
                        break;
 
                case MFIE_TYPE_RATES_EX:
-#ifdef CONFIG_RTLLIB_DEBUG
                        p = rates_str;
-#endif
                        network->rates_ex_len = min(info_element->len,
                                                    MAX_RATES_EX_LENGTH);
                        for (i = 0; i < network->rates_ex_len; i++) {
                                network->rates_ex[i] = info_element->data[i];
-#ifdef CONFIG_RTLLIB_DEBUG
                                p += snprintf(p, sizeof(rates_str) -
                                              (p - rates_str), "%02X ",
                                              network->rates[i]);
-#endif
                                if (rtllib_is_ofdm_rate
                                    (info_element->data[i])) {
                                        network->flags |= NETWORK_HAS_OFDM;
@@ -2322,8 +2307,6 @@ static inline int rtllib_network_init(
        struct rtllib_network *network,
        struct rtllib_rx_stats *stats)
 {
-#ifdef CONFIG_RTLLIB_DEBUG
-#endif
 
        /*
         network->qos_data.active = 0;
@@ -2594,9 +2577,7 @@ static inline void rtllib_process_probe_response(
 {
        struct rtllib_network *target;
        struct rtllib_network *oldest = NULL;
-#ifdef CONFIG_RTLLIB_DEBUG
        struct rtllib_info_element *info_element = &beacon->info_element[0];
-#endif
        unsigned long flags;
        short renew;
        struct rtllib_network *network = kzalloc(sizeof(struct rtllib_network), GFP_ATOMIC);
@@ -2704,7 +2685,6 @@ static inline void rtllib_process_probe_response(
                }
 
 
-#ifdef CONFIG_RTLLIB_DEBUG
                RTLLIB_DEBUG_SCAN("Adding '%s' (" MAC_FMT ") via %s.\n",
                                     escape_essid(network->ssid,
                                                  network->ssid_len),
@@ -2712,7 +2692,6 @@ static inline void rtllib_process_probe_response(
                                     WLAN_FC_GET_STYPE(beacon->header.frame_ctl) ==
                                     RTLLIB_STYPE_PROBE_RESP ?
                                     "PROBE RESPONSE" : "BEACON");
-#endif
                memcpy(target, network, sizeof(*target));
                list_add_tail(&target->list, &ieee->network_list);
                if (ieee->softmac_features & IEEE_SOFTMAC_ASSOCIATE)
index ae9f7727ed3a50c420e6263d33a74501e233f477..0a59720f9cbb4ca2cdaf73d60747eb14bfaf698c 100644 (file)
@@ -663,14 +663,12 @@ int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev)
                        stats->tx_dropped++;
                        goto success;
                }
-       #ifdef CONFIG_RTLLIB_DEBUG
                if (crypt && !encrypt && ether_type == ETH_P_PAE) {
                        struct eapol *eap = (struct eapol *)(skb->data +
                                sizeof(struct ethhdr) - SNAP_SIZE - sizeof(u16));
                        RTLLIB_DEBUG_EAP("TX: IEEE 802.11 EAPOL frame: %s\n",
                                eap_get_type(eap->type));
                }
-       #endif
 
                /* Advance the SKB to the start of the payload */
                skb_pull(skb, sizeof(struct ethhdr));
This page took 0.031126 seconds and 5 git commands to generate.