|
@@ -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)
|