extern const struct iw_handler_def rt28xx_iw_handler_def;
-#if WIRELESS_EXT >= 12
// This function will be called when query /proc
struct iw_statistics *rt28xx_get_wireless_stats(
IN struct net_device *net_dev);
-#endif
struct net_device_stats *RT28xx_get_ether_stats(
IN struct net_device *net_dev);
CHAR slot_name[IFNAMSIZ];
struct net_device *device;
-#if WIRELESS_EXT >= 12
if (pAd->OpMode == OPMODE_STA)
{
dev->wireless_handlers = &rt28xx_iw_handler_def;
}
-#endif //WIRELESS_EXT >= 12
-#if WIRELESS_EXT < 21
- dev->get_wireless_stats = rt28xx_get_wireless_stats;
-#endif
dev->priv_flags = INT_MAIN;
dev->netdev_ops = &rt2860_netdev_ops;
// find available device name
} /* End of CfgInitHook */
-#if WIRELESS_EXT >= 12
// This function will be called when query /proc
struct iw_statistics *rt28xx_get_wireless_stats(
IN struct net_device *net_dev)
DBGPRINT(RT_DEBUG_TRACE, ("<--- rt28xx_get_wireless_stats\n"));
return &pAd->iw_stats;
} /* End of rt28xx_get_wireless_stats */
-#endif // WIRELESS_EXT //
range->min_frag = 256;
range->max_frag = 2346;
-#if WIRELESS_EXT > 17
/* IW_ENC_CAPA_* bit field */
range->enc_capa = IW_ENC_CAPA_WPA | IW_ENC_CAPA_WPA2 |
IW_ENC_CAPA_CIPHER_TKIP | IW_ENC_CAPA_CIPHER_CCMP;
-#endif
return 0;
}
return 0;
}
-#if WIRELESS_EXT >= 17
if (data->length > 0)
end_buf = extra + data->length;
else
end_buf = extra + IW_SCAN_MAX_DATA;
-#else
- end_buf = extra + IW_SCAN_MAX_DATA;
-#endif
for (i = 0; i < pAdapter->ScanTab.BssNr; i++)
{
if (current_ev >= end_buf)
- {
-#if WIRELESS_EXT >= 17
- return -E2BIG;
-#else
- break;
-#endif
- }
+ return -E2BIG;
//MAC address
//================================
current_ev = iwe_stream_add_event(info, current_ev,end_buf, &iwe, IW_EV_ADDR_LEN);
#ifdef RT30xx
if (current_ev == previous_ev)
-#if WIRELESS_EXT >= 17
- return -E2BIG;
-#else
- break;
-#endif
+ return -E2BIG;
/*
Protocol:
current_ev = iwe_stream_add_event(info, current_ev, end_buf, &iwe, IW_EV_ADDR_LEN);
#endif /* RT30xx */
if (current_ev == previous_ev)
-#if WIRELESS_EXT >= 17
- return -E2BIG;
-#else
- break;
-#endif
+ return -E2BIG;
//ESSID
//================================
previous_ev = current_ev;
current_ev = iwe_stream_add_point(info, current_ev,end_buf, &iwe, pAdapter->ScanTab.BssEntry[i].Ssid);
if (current_ev == previous_ev)
-#if WIRELESS_EXT >= 17
- return -E2BIG;
-#else
- break;
-#endif
+ return -E2BIG;
//Network Type
//================================
previous_ev = current_ev;
current_ev = iwe_stream_add_event(info, current_ev, end_buf, &iwe, IW_EV_UINT_LEN);
if (current_ev == previous_ev)
-#if WIRELESS_EXT >= 17
- return -E2BIG;
-#else
- break;
-#endif
+ return -E2BIG;
//Channel and Frequency
//================================
previous_ev = current_ev;
current_ev = iwe_stream_add_event(info, current_ev, end_buf, &iwe, IW_EV_FREQ_LEN);
if (current_ev == previous_ev)
-#if WIRELESS_EXT >= 17
- return -E2BIG;
-#else
- break;
-#endif
+ return -E2BIG;
//Add quality statistics
//================================
set_quality(pAdapter, &iwe.u.qual, pAdapter->ScanTab.BssEntry[i].Rssi);
current_ev = iwe_stream_add_event(info, current_ev, end_buf, &iwe, IW_EV_QUAL_LEN);
if (current_ev == previous_ev)
-#if WIRELESS_EXT >= 17
- return -E2BIG;
-#else
- break;
-#endif
+ return -E2BIG;
//Encyption key
//================================
previous_ev = current_ev;
current_ev = iwe_stream_add_point(info, current_ev, end_buf,&iwe, (char *)pAdapter->SharedKey[BSS0][(iwe.u.data.flags & IW_ENCODE_INDEX)-1].Key);
if (current_ev == previous_ev)
-#if WIRELESS_EXT >= 17
- return -E2BIG;
-#else
- break;
-#endif
+ return -E2BIG;
//Bit Rate
//================================
if((current_val-current_ev)>IW_EV_LCP_LEN)
current_ev = current_val;
else
-#if WIRELESS_EXT >= 17
- return -E2BIG;
-#else
- break;
-#endif
+ return -E2BIG;
}
#ifdef IWEVGENIE
iwe.u.data.length = pAdapter->ScanTab.BssEntry[i].WpaIE.IELen;
current_ev = iwe_stream_add_point(info, current_ev, end_buf, &iwe, custom);
if (current_ev == previous_ev)
-#if WIRELESS_EXT >= 17
- return -E2BIG;
-#else
- break;
-#endif
+ return -E2BIG;
}
//WPA2 IE
iwe.u.data.length = pAdapter->ScanTab.BssEntry[i].RsnIE.IELen;
current_ev = iwe_stream_add_point(info, current_ev, end_buf, &iwe, custom);
if (current_ev == previous_ev)
-#if WIRELESS_EXT >= 17
- return -E2BIG;
-#else
- break;
-#endif
+ return -E2BIG;
}
#else
//WPA IE
previous_ev = current_ev;
current_ev = iwe_stream_add_point(current_ev, end_buf, &iwe, custom);
if (current_ev == previous_ev)
-#if WIRELESS_EXT >= 17
- return -E2BIG;
-#else
- break;
-#endif
+ return -E2BIG;
}
//WPA2 IE
previous_ev = current_ev;
current_ev = iwe_stream_add_point(current_ev, end_buf, &iwe, custom);
if (current_ev == previous_ev)
-#if WIRELESS_EXT >= 17
- return -E2BIG;
-#else
- break;
-#endif
+ return -E2BIG;
}
#endif // IWEVGENIE //
}
}
#endif // SIOCSIWMLME //
-#if WIRELESS_EXT > 17
int rt_ioctl_siwauth(struct net_device *dev,
struct iw_request_info *info,
union iwreq_data *wrqu, char *extra)
return 0;
}
-#endif // #if WIRELESS_EXT > 17
#ifdef DBG
static int
(iw_handler) NULL, /* SIOCGIWPOWER */
(iw_handler) NULL, /* -- hole -- */
(iw_handler) NULL, /* -- hole -- */
-#if WIRELESS_EXT > 17
(iw_handler) rt_ioctl_siwgenie, /* SIOCSIWGENIE */
(iw_handler) rt_ioctl_giwgenie, /* SIOCGIWGENIE */
(iw_handler) rt_ioctl_siwauth, /* SIOCSIWAUTH */
(iw_handler) rt_ioctl_siwencodeext, /* SIOCSIWENCODEEXT */
(iw_handler) rt_ioctl_giwencodeext, /* SIOCGIWENCODEEXT */
(iw_handler) rt_ioctl_siwpmksa, /* SIOCSIWPMKSA */
-#endif
};
static const iw_handler rt_priv_handlers[] = {
}
pBss->Length = (ULONG)(sizeof(NDIS_WLAN_BSSID_EX) - 1 + sizeof(NDIS_802_11_FIXED_IEs) + pAdapter->ScanTab.BssEntry[i].VarIELen + Padding);
-#if WIRELESS_EXT < 17
- if ((BssLen + pBss->Length) < wrq->u.data.length)
- BssLen += pBss->Length;
- else
- {
- pBssidList->NumberOfItems = i;
- break;
- }
-#else
BssLen += pBss->Length;
-#endif
}
-#if WIRELESS_EXT < 17
- wrq->u.data.length = BssLen;
-#else
if (BssLen > wrq->u.data.length)
{
kfree(pBssidList);
}
else
wrq->u.data.length = BssLen;
-#endif
Status = copy_to_user(wrq->u.data.pointer, pBssidList, BssLen);
kfree(pBssidList);
break;