staging: rtl8192e: Remove ifdefs for CONFIG_RTLLIB_DEBUG
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>
This commit is contained in:
@@ -670,8 +670,6 @@ typedef enum _NETWORK_TYPE{
|
|||||||
#define OUI_SUBTYPE_QOS_CAPABI 5
|
#define OUI_SUBTYPE_QOS_CAPABI 5
|
||||||
|
|
||||||
/* debug macros */
|
/* debug macros */
|
||||||
#define CONFIG_RTLLIB_DEBUG
|
|
||||||
#ifdef CONFIG_RTLLIB_DEBUG
|
|
||||||
extern u32 rtllib_debug_level;
|
extern u32 rtllib_debug_level;
|
||||||
#define RTLLIB_DEBUG(level, fmt, args...) \
|
#define RTLLIB_DEBUG(level, fmt, args...) \
|
||||||
do { if (rtllib_debug_level & (level)) \
|
do { if (rtllib_debug_level & (level)) \
|
||||||
@@ -690,12 +688,6 @@ do { if (rtllib_debug_level & (level)) \
|
|||||||
printk("\n"); \
|
printk("\n"); \
|
||||||
} \
|
} \
|
||||||
} while (0)
|
} 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_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]
|
#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.
|
* 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_RX(f, a...) RTLLIB_DEBUG(RTLLIB_DL_RX, f, ## a)
|
||||||
#define RTLLIB_DEBUG_QOS(f, a...) RTLLIB_DEBUG(RTLLIB_DL_QOS, 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. */
|
/* Added by Annie, 2005-11-22. */
|
||||||
#define MAX_STR_LEN 64
|
#define MAX_STR_LEN 64
|
||||||
/* I want to see ASCII 33 to 126 only. Otherwise, I print '?'. Annie, 2005-11-22.*/
|
/* 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(_TitleString); \
|
||||||
printk(": %d, <%s>\n", _Len, buffer); \
|
printk(": %d, <%s>\n", _Len, buffer); \
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
#define RTLLIB_PRINT_STR(_Comp, _TitleString, _Ptr, _Len) do {} while (0)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef ETH_P_PAE
|
#ifndef ETH_P_PAE
|
||||||
#define ETH_P_PAE 0x888E /* Port Access Entity (IEEE 802.1X) */
|
#define ETH_P_PAE 0x888E /* Port Access Entity (IEEE 802.1X) */
|
||||||
#define ETH_P_IP 0x0800 /* Internet Protocol packet */
|
#define ETH_P_IP 0x0800 /* Internet Protocol packet */
|
||||||
|
@@ -219,8 +219,6 @@ void free_rtllib(struct net_device *dev)
|
|||||||
free_netdev(dev);
|
free_netdev(dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_RTLLIB_DEBUG
|
|
||||||
|
|
||||||
u32 rtllib_debug_level = 0;
|
u32 rtllib_debug_level = 0;
|
||||||
static int debug = \
|
static int debug = \
|
||||||
RTLLIB_DL_ERR
|
RTLLIB_DL_ERR
|
||||||
@@ -262,7 +260,6 @@ static int store_debug_level(struct file *file, const char *buffer,
|
|||||||
|
|
||||||
int __init rtllib_init(void)
|
int __init rtllib_init(void)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_RTLLIB_DEBUG
|
|
||||||
struct proc_dir_entry *e;
|
struct proc_dir_entry *e;
|
||||||
|
|
||||||
rtllib_debug_level = debug;
|
rtllib_debug_level = debug;
|
||||||
@@ -282,20 +279,15 @@ int __init rtllib_init(void)
|
|||||||
e->read_proc = show_debug_level;
|
e->read_proc = show_debug_level;
|
||||||
e->write_proc = store_debug_level;
|
e->write_proc = store_debug_level;
|
||||||
e->data = NULL;
|
e->data = NULL;
|
||||||
#endif
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void __exit rtllib_exit(void)
|
void __exit rtllib_exit(void)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_RTLLIB_DEBUG
|
|
||||||
if (rtllib_proc) {
|
if (rtllib_proc) {
|
||||||
remove_proc_entry("debug_level", rtllib_proc);
|
remove_proc_entry("debug_level", rtllib_proc);
|
||||||
remove_proc_entry(DRV_NAME, init_net.proc_net);
|
remove_proc_entry(DRV_NAME, init_net.proc_net);
|
||||||
rtllib_proc = NULL;
|
rtllib_proc = NULL;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
@@ -1131,14 +1131,12 @@ int rtllib_rx_decrypt(
|
|||||||
if (/*ieee->ieee802_1x &&*/
|
if (/*ieee->ieee802_1x &&*/
|
||||||
rtllib_is_eapol_frame(ieee, skb, hdrlen)) {
|
rtllib_is_eapol_frame(ieee, skb, hdrlen)) {
|
||||||
|
|
||||||
#ifdef CONFIG_RTLLIB_DEBUG
|
|
||||||
/* pass unencrypted EAPOL frames even if encryption is
|
/* pass unencrypted EAPOL frames even if encryption is
|
||||||
* configured */
|
* configured */
|
||||||
struct eapol *eap = (struct eapol *)(skb->data +
|
struct eapol *eap = (struct eapol *)(skb->data +
|
||||||
24);
|
24);
|
||||||
RTLLIB_DEBUG_EAP("RX: IEEE 802.1X EAPOL frame: %s\n",
|
RTLLIB_DEBUG_EAP("RX: IEEE 802.1X EAPOL frame: %s\n",
|
||||||
eap_get_type(eap->type));
|
eap_get_type(eap->type));
|
||||||
#endif
|
|
||||||
} else {
|
} else {
|
||||||
RTLLIB_DEBUG_DROP(
|
RTLLIB_DEBUG_DROP(
|
||||||
"encryption configured, but RX "
|
"encryption configured, but RX "
|
||||||
@@ -1148,7 +1146,6 @@ int rtllib_rx_decrypt(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_RTLLIB_DEBUG
|
|
||||||
if (crypt && !(fc & RTLLIB_FCTL_WEP) &&
|
if (crypt && !(fc & RTLLIB_FCTL_WEP) &&
|
||||||
rtllib_is_eapol_frame(ieee, skb, hdrlen)) {
|
rtllib_is_eapol_frame(ieee, skb, hdrlen)) {
|
||||||
struct eapol *eap = (struct eapol *)(skb->data +
|
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",
|
RTLLIB_DEBUG_EAP("RX: IEEE 802.1X EAPOL frame: %s\n",
|
||||||
eap_get_type(eap->type));
|
eap_get_type(eap->type));
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
if (crypt && !(fc & RTLLIB_FCTL_WEP) && !ieee->open_wep &&
|
if (crypt && !(fc & RTLLIB_FCTL_WEP) && !ieee->open_wep &&
|
||||||
!rtllib_is_eapol_frame(ieee, skb, hdrlen)) {
|
!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;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_RTLLIB_DEBUG
|
|
||||||
#define MFIE_STRING(x) case MFIE_TYPE_ ##x: return #x
|
#define MFIE_STRING(x) case MFIE_TYPE_ ##x: return #x
|
||||||
|
|
||||||
static const char *get_info_element_string(u16 id)
|
static const char *get_info_element_string(u16 id)
|
||||||
@@ -1722,7 +1717,6 @@ static const char *get_info_element_string(u16 id)
|
|||||||
return "UNKNOWN";
|
return "UNKNOWN";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
static inline void rtllib_extract_country_ie(
|
static inline void rtllib_extract_country_ie(
|
||||||
struct rtllib_device *ieee,
|
struct rtllib_device *ieee,
|
||||||
@@ -1762,10 +1756,9 @@ int rtllib_parse_info_param(struct rtllib_device *ieee,
|
|||||||
u16 tmp_htinfo_len=0;
|
u16 tmp_htinfo_len=0;
|
||||||
u16 ht_realtek_agg_len=0;
|
u16 ht_realtek_agg_len=0;
|
||||||
u8 ht_realtek_agg_buf[MAX_IE_LEN];
|
u8 ht_realtek_agg_buf[MAX_IE_LEN];
|
||||||
#ifdef CONFIG_RTLLIB_DEBUG
|
|
||||||
char rates_str[64];
|
char rates_str[64];
|
||||||
char *p;
|
char *p;
|
||||||
#endif
|
|
||||||
while (length >= sizeof(*info_element)) {
|
while (length >= sizeof(*info_element)) {
|
||||||
if (sizeof(*info_element) + info_element->len > length) {
|
if (sizeof(*info_element) + info_element->len > length) {
|
||||||
RTLLIB_DEBUG_MGMT("Info elem: parse failed: "
|
RTLLIB_DEBUG_MGMT("Info elem: parse failed: "
|
||||||
@@ -1800,18 +1793,14 @@ int rtllib_parse_info_param(struct rtllib_device *ieee,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case MFIE_TYPE_RATES:
|
case MFIE_TYPE_RATES:
|
||||||
#ifdef CONFIG_RTLLIB_DEBUG
|
|
||||||
p = rates_str;
|
p = rates_str;
|
||||||
#endif
|
|
||||||
network->rates_len = min(info_element->len,
|
network->rates_len = min(info_element->len,
|
||||||
MAX_RATES_LENGTH);
|
MAX_RATES_LENGTH);
|
||||||
for (i = 0; i < network->rates_len; i++) {
|
for (i = 0; i < network->rates_len; i++) {
|
||||||
network->rates[i] = info_element->data[i];
|
network->rates[i] = info_element->data[i];
|
||||||
#ifdef CONFIG_RTLLIB_DEBUG
|
|
||||||
p += snprintf(p, sizeof(rates_str) -
|
p += snprintf(p, sizeof(rates_str) -
|
||||||
(p - rates_str), "%02X ",
|
(p - rates_str), "%02X ",
|
||||||
network->rates[i]);
|
network->rates[i]);
|
||||||
#endif
|
|
||||||
if (rtllib_is_ofdm_rate
|
if (rtllib_is_ofdm_rate
|
||||||
(info_element->data[i])) {
|
(info_element->data[i])) {
|
||||||
network->flags |= NETWORK_HAS_OFDM;
|
network->flags |= NETWORK_HAS_OFDM;
|
||||||
@@ -1832,18 +1821,14 @@ int rtllib_parse_info_param(struct rtllib_device *ieee,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case MFIE_TYPE_RATES_EX:
|
case MFIE_TYPE_RATES_EX:
|
||||||
#ifdef CONFIG_RTLLIB_DEBUG
|
|
||||||
p = rates_str;
|
p = rates_str;
|
||||||
#endif
|
|
||||||
network->rates_ex_len = min(info_element->len,
|
network->rates_ex_len = min(info_element->len,
|
||||||
MAX_RATES_EX_LENGTH);
|
MAX_RATES_EX_LENGTH);
|
||||||
for (i = 0; i < network->rates_ex_len; i++) {
|
for (i = 0; i < network->rates_ex_len; i++) {
|
||||||
network->rates_ex[i] = info_element->data[i];
|
network->rates_ex[i] = info_element->data[i];
|
||||||
#ifdef CONFIG_RTLLIB_DEBUG
|
|
||||||
p += snprintf(p, sizeof(rates_str) -
|
p += snprintf(p, sizeof(rates_str) -
|
||||||
(p - rates_str), "%02X ",
|
(p - rates_str), "%02X ",
|
||||||
network->rates[i]);
|
network->rates[i]);
|
||||||
#endif
|
|
||||||
if (rtllib_is_ofdm_rate
|
if (rtllib_is_ofdm_rate
|
||||||
(info_element->data[i])) {
|
(info_element->data[i])) {
|
||||||
network->flags |= NETWORK_HAS_OFDM;
|
network->flags |= NETWORK_HAS_OFDM;
|
||||||
@@ -2322,8 +2307,6 @@ static inline int rtllib_network_init(
|
|||||||
struct rtllib_network *network,
|
struct rtllib_network *network,
|
||||||
struct rtllib_rx_stats *stats)
|
struct rtllib_rx_stats *stats)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_RTLLIB_DEBUG
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
network->qos_data.active = 0;
|
network->qos_data.active = 0;
|
||||||
@@ -2594,9 +2577,7 @@ static inline void rtllib_process_probe_response(
|
|||||||
{
|
{
|
||||||
struct rtllib_network *target;
|
struct rtllib_network *target;
|
||||||
struct rtllib_network *oldest = NULL;
|
struct rtllib_network *oldest = NULL;
|
||||||
#ifdef CONFIG_RTLLIB_DEBUG
|
|
||||||
struct rtllib_info_element *info_element = &beacon->info_element[0];
|
struct rtllib_info_element *info_element = &beacon->info_element[0];
|
||||||
#endif
|
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
short renew;
|
short renew;
|
||||||
struct rtllib_network *network = kzalloc(sizeof(struct rtllib_network), GFP_ATOMIC);
|
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",
|
RTLLIB_DEBUG_SCAN("Adding '%s' (" MAC_FMT ") via %s.\n",
|
||||||
escape_essid(network->ssid,
|
escape_essid(network->ssid,
|
||||||
network->ssid_len),
|
network->ssid_len),
|
||||||
@@ -2712,7 +2692,6 @@ static inline void rtllib_process_probe_response(
|
|||||||
WLAN_FC_GET_STYPE(beacon->header.frame_ctl) ==
|
WLAN_FC_GET_STYPE(beacon->header.frame_ctl) ==
|
||||||
RTLLIB_STYPE_PROBE_RESP ?
|
RTLLIB_STYPE_PROBE_RESP ?
|
||||||
"PROBE RESPONSE" : "BEACON");
|
"PROBE RESPONSE" : "BEACON");
|
||||||
#endif
|
|
||||||
memcpy(target, network, sizeof(*target));
|
memcpy(target, network, sizeof(*target));
|
||||||
list_add_tail(&target->list, &ieee->network_list);
|
list_add_tail(&target->list, &ieee->network_list);
|
||||||
if (ieee->softmac_features & IEEE_SOFTMAC_ASSOCIATE)
|
if (ieee->softmac_features & IEEE_SOFTMAC_ASSOCIATE)
|
||||||
|
@@ -663,14 +663,12 @@ int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev)
|
|||||||
stats->tx_dropped++;
|
stats->tx_dropped++;
|
||||||
goto success;
|
goto success;
|
||||||
}
|
}
|
||||||
#ifdef CONFIG_RTLLIB_DEBUG
|
|
||||||
if (crypt && !encrypt && ether_type == ETH_P_PAE) {
|
if (crypt && !encrypt && ether_type == ETH_P_PAE) {
|
||||||
struct eapol *eap = (struct eapol *)(skb->data +
|
struct eapol *eap = (struct eapol *)(skb->data +
|
||||||
sizeof(struct ethhdr) - SNAP_SIZE - sizeof(u16));
|
sizeof(struct ethhdr) - SNAP_SIZE - sizeof(u16));
|
||||||
RTLLIB_DEBUG_EAP("TX: IEEE 802.11 EAPOL frame: %s\n",
|
RTLLIB_DEBUG_EAP("TX: IEEE 802.11 EAPOL frame: %s\n",
|
||||||
eap_get_type(eap->type));
|
eap_get_type(eap->type));
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Advance the SKB to the start of the payload */
|
/* Advance the SKB to the start of the payload */
|
||||||
skb_pull(skb, sizeof(struct ethhdr));
|
skb_pull(skb, sizeof(struct ethhdr));
|
||||||
|
Reference in New Issue
Block a user