#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)) \
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]
*
* 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
*
*/
#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.*/
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 */
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 "
}
}
-#ifdef CONFIG_RTLLIB_DEBUG
if (crypt && !(fc & RTLLIB_FCTL_WEP) &&
rtllib_is_eapol_frame(ieee, skb, hdrlen)) {
struct eapol *eap = (struct eapol *)(skb->data +
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)) {
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)
return "UNKNOWN";
}
}
-#endif
static inline void rtllib_extract_country_ie(
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: "
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;
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;
struct rtllib_network *network,
struct rtllib_rx_stats *stats)
{
-#ifdef CONFIG_RTLLIB_DEBUG
-#endif
/*
network->qos_data.active = 0;
{
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);
}
-#ifdef CONFIG_RTLLIB_DEBUG
RTLLIB_DEBUG_SCAN("Adding '%s' (" MAC_FMT ") via %s.\n",
escape_essid(network->ssid,
network->ssid_len),
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)