Staging: rtl8187se: r8180_wx.c: Cleaned up comments

Realigned some comments and removed small bit of
old comments that I missed in my last commit

Signed-off-by: Andrew Miller <amiller@amilx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Andrew Miller 2012-03-15 19:32:08 -04:00 committed by Greg Kroah-Hartman
parent e7e298e86e
commit 40ec6c5421
1 changed files with 59 additions and 62 deletions

View File

@ -29,16 +29,16 @@ u32 rtl8180_rates[] = {1000000, 2000000, 5500000, 11000000,
#define RATE_COUNT ARRAY_SIZE(rtl8180_rates) #define RATE_COUNT ARRAY_SIZE(rtl8180_rates)
static CHANNEL_LIST DefaultChannelPlan[] = { static CHANNEL_LIST DefaultChannelPlan[] = {
{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 36, 40, 44, 48, 52, 56, 60, 64}, 19}, /*FCC */ {{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 36, 40, 44, 48, 52, 56, 60, 64}, 19}, /* FCC */
{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}, 11}, /*IC */ {{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}, 11}, /* IC */
{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 36, 40, 44, 48, 52, 56, 60, 64}, 21}, /*ETSI */ {{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 36, 40, 44, 48, 52, 56, 60, 64}, 21}, /* ETSI */
{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 36, 40, 44, 48, 52, 56, 60, 64}, 21}, /*Spain. Change to ETSI. */ {{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 36, 40, 44, 48, 52, 56, 60, 64}, 21}, /* Spain. Change to ETSI. */
{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 36, 40, 44, 48, 52, 56, 60, 64}, 21}, /*France. Change to ETSI. */ {{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 36, 40, 44, 48, 52, 56, 60, 64}, 21}, /* France. Change to ETSI. */
{{14, 36, 40, 44, 48, 52, 56, 60, 64}, 9}, /*MKK */ {{14, 36, 40, 44, 48, 52, 56, 60, 64}, 9}, /* MKK */
{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 36, 40, 44, 48, 52, 56, 60, 64}, 22},/*MKK1 */ {{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 36, 40, 44, 48, 52, 56, 60, 64}, 22}, /* MKK1 */
{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 36, 40, 44, 48, 52, 56, 60, 64}, 21}, /*Israel. */ {{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 36, 40, 44, 48, 52, 56, 60, 64}, 21}, /* Israel */
{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 34, 38, 42, 46}, 17}, /*For 11a , TELEC */ {{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 34, 38, 42, 46}, 17}, /* For 11a , TELEC */
{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14}, 14} /*For Global Domain. 1-11:active scan, 12-14 passive scan.*/ /* +YJ, 080626 */ {{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14}, 14} /* For Global Domain. 1-11:active scan, 12-14 passive scan.*/ /* +YJ, 080626 */
}; };
static int r8180_wx_get_freq(struct net_device *dev, static int r8180_wx_get_freq(struct net_device *dev,
struct iw_request_info *a, struct iw_request_info *a,
@ -195,18 +195,20 @@ static int r8180_wx_set_mode(struct net_device *dev, struct iw_request_info *a,
/* YJ,add,080819,for hidden ap */ /* YJ,add,080819,for hidden ap */
struct iw_range_with_scan_capa { struct iw_range_with_scan_capa {
/* Informative stuff (to choose between different interface) */ /* Informative stuff (to choose between different interface) */
__u32 throughput; /* To give an idea... */
__u32 throughput; /* To give an idea... */
/* In theory this value should be the maximum benchmarked /* In theory this value should be the maximum benchmarked
* TCP/IP throughput, because with most of these devices the * TCP/IP throughput, because with most of these devices the
* bit rate is meaningless (overhead an co) to estimate how * bit rate is meaningless (overhead an co) to estimate how
* fast the connection will go and pick the fastest one. * fast the connection will go and pick the fastest one.
* I suggest people to play with Netperf or any benchmark... * I suggest people to play with Netperf or any benchmark...
*/ */
/* NWID (or domain id) */ /* NWID (or domain id) */
__u32 min_nwid; /* Minimal NWID we are able to set */ __u32 min_nwid; /* Minimal NWID we are able to set */
__u32 max_nwid; /* Maximal NWID we are able to set */ __u32 max_nwid; /* Maximal NWID we are able to set */
/* Old Frequency (backward compat - moved lower ) */ /* Old Frequency (backward compat - moved lower ) */
__u16 old_num_channels; __u16 old_num_channels;
@ -289,8 +291,8 @@ static int rtl8180_wx_get_range(struct net_device *dev,
range->freq[val].e = 1; range->freq[val].e = 1;
val++; val++;
} else { } else {
/* FIXME: do we need to set anything for channels */ /* FIXME: do we need to set anything for channels */
/* we don't use ? */ /* we don't use ? */
} }
if (val == IW_MAX_FREQUENCIES) if (val == IW_MAX_FREQUENCIES)
@ -1016,7 +1018,6 @@ static int r8180_wx_set_channelplan(struct net_device *dev,
union iwreq_data *wrqu, char *extra) union iwreq_data *wrqu, char *extra)
{ {
struct r8180_priv *priv = ieee80211_priv(dev); struct r8180_priv *priv = ieee80211_priv(dev);
/* struct ieee80211_device *ieee = netdev_priv(dev); */
int *val = (int *)extra; int *val = (int *)extra;
int i; int i;
printk("-----in fun %s\n", __func__); printk("-----in fun %s\n", __func__);
@ -1105,7 +1106,6 @@ static int r8180_wx_set_auth(struct net_device *dev,
struct iw_request_info *info, struct iw_request_info *info,
union iwreq_data *wrqu, char *extra) union iwreq_data *wrqu, char *extra)
{ {
/* printk("====>%s()\n", __func__); */
struct r8180_priv *priv = ieee80211_priv(dev); struct r8180_priv *priv = ieee80211_priv(dev);
int ret = 0; int ret = 0;
@ -1158,62 +1158,62 @@ static int r8180_wx_set_gen_ie(struct net_device *dev,
} }
static iw_handler r8180_wx_handlers[] = { static iw_handler r8180_wx_handlers[] = {
NULL, /* SIOCSIWCOMMIT */ NULL, /* SIOCSIWCOMMIT */
r8180_wx_get_name, /* SIOCGIWNAME */ r8180_wx_get_name, /* SIOCGIWNAME */
dummy, /* SIOCSIWNWID */ dummy, /* SIOCSIWNWID */
dummy, /* SIOCGIWNWID */ dummy, /* SIOCGIWNWID */
r8180_wx_set_freq, /* SIOCSIWFREQ */ r8180_wx_set_freq, /* SIOCSIWFREQ */
r8180_wx_get_freq, /* SIOCGIWFREQ */ r8180_wx_get_freq, /* SIOCGIWFREQ */
r8180_wx_set_mode, /* SIOCSIWMODE */ r8180_wx_set_mode, /* SIOCSIWMODE */
r8180_wx_get_mode, /* SIOCGIWMODE */ r8180_wx_get_mode, /* SIOCGIWMODE */
r8180_wx_set_sens, /* SIOCSIWSENS */ r8180_wx_set_sens, /* SIOCSIWSENS */
r8180_wx_get_sens, /* SIOCGIWSENS */ r8180_wx_get_sens, /* SIOCGIWSENS */
NULL, /* SIOCSIWRANGE */ NULL, /* SIOCSIWRANGE */
rtl8180_wx_get_range, /* SIOCGIWRANGE */ rtl8180_wx_get_range, /* SIOCGIWRANGE */
NULL, /* SIOCSIWPRIV */ NULL, /* SIOCSIWPRIV */
NULL, /* SIOCGIWPRIV */ NULL, /* SIOCGIWPRIV */
NULL, /* SIOCSIWSTATS */ NULL, /* SIOCSIWSTATS */
NULL, /* SIOCGIWSTATS */ NULL, /* SIOCGIWSTATS */
dummy, /* SIOCSIWSPY */ dummy, /* SIOCSIWSPY */
dummy, /* SIOCGIWSPY */ dummy, /* SIOCGIWSPY */
NULL, /* SIOCGIWTHRSPY */ NULL, /* SIOCGIWTHRSPY */
NULL, /* SIOCWIWTHRSPY */ NULL, /* SIOCWIWTHRSPY */
r8180_wx_set_wap, /* SIOCSIWAP */ r8180_wx_set_wap, /* SIOCSIWAP */
r8180_wx_get_wap, /* SIOCGIWAP */ r8180_wx_get_wap, /* SIOCGIWAP */
r8180_wx_set_mlme, /* SIOCSIWMLME*/ r8180_wx_set_mlme, /* SIOCSIWMLME*/
dummy, /* SIOCGIWAPLIST -- depricated */ dummy, /* SIOCGIWAPLIST -- depricated */
r8180_wx_set_scan, /* SIOCSIWSCAN */ r8180_wx_set_scan, /* SIOCSIWSCAN */
r8180_wx_get_scan, /* SIOCGIWSCAN */ r8180_wx_get_scan, /* SIOCGIWSCAN */
r8180_wx_set_essid, /* SIOCSIWESSID */ r8180_wx_set_essid, /* SIOCSIWESSID */
r8180_wx_get_essid, /* SIOCGIWESSID */ r8180_wx_get_essid, /* SIOCGIWESSID */
dummy, /* SIOCSIWNICKN */ dummy, /* SIOCSIWNICKN */
dummy, /* SIOCGIWNICKN */ dummy, /* SIOCGIWNICKN */
NULL, /* -- hole -- */ NULL, /* -- hole -- */
NULL, /* -- hole -- */ NULL, /* -- hole -- */
r8180_wx_set_rate, /* SIOCSIWRATE */ r8180_wx_set_rate, /* SIOCSIWRATE */
r8180_wx_get_rate, /* SIOCGIWRATE */ r8180_wx_get_rate, /* SIOCGIWRATE */
r8180_wx_set_rts, /* SIOCSIWRTS */ r8180_wx_set_rts, /* SIOCSIWRTS */
r8180_wx_get_rts, /* SIOCGIWRTS */ r8180_wx_get_rts, /* SIOCGIWRTS */
r8180_wx_set_frag, /* SIOCSIWFRAG */ r8180_wx_set_frag, /* SIOCSIWFRAG */
r8180_wx_get_frag, /* SIOCGIWFRAG */ r8180_wx_get_frag, /* SIOCGIWFRAG */
dummy, /* SIOCSIWTXPOW */ dummy, /* SIOCSIWTXPOW */
dummy, /* SIOCGIWTXPOW */ dummy, /* SIOCGIWTXPOW */
r8180_wx_set_retry, /* SIOCSIWRETRY */ r8180_wx_set_retry, /* SIOCSIWRETRY */
r8180_wx_get_retry, /* SIOCGIWRETRY */ r8180_wx_get_retry, /* SIOCGIWRETRY */
r8180_wx_set_enc, /* SIOCSIWENCODE */ r8180_wx_set_enc, /* SIOCSIWENCODE */
r8180_wx_get_enc, /* SIOCGIWENCODE */ r8180_wx_get_enc, /* SIOCGIWENCODE */
r8180_wx_set_power, /* SIOCSIWPOWER */ r8180_wx_set_power, /* SIOCSIWPOWER */
r8180_wx_get_power, /* SIOCGIWPOWER */ r8180_wx_get_power, /* SIOCGIWPOWER */
NULL, /*---hole---*/ NULL, /*---hole---*/
NULL, /*---hole---*/ NULL, /*---hole---*/
r8180_wx_set_gen_ie, /* SIOCSIWGENIE */ r8180_wx_set_gen_ie, /* SIOCSIWGENIE */
NULL, /* SIOCSIWGENIE */ NULL, /* SIOCSIWGENIE */
r8180_wx_set_auth, /* SIOCSIWAUTH */ r8180_wx_set_auth, /* SIOCSIWAUTH */
NULL, /* SIOCSIWAUTH */ NULL, /* SIOCSIWAUTH */
r8180_wx_set_enc_ext, /* SIOCSIWENCODEEXT */ r8180_wx_set_enc_ext, /* SIOCSIWENCODEEXT */
NULL, /* SIOCSIWENCODEEXT */ NULL, /* SIOCSIWENCODEEXT */
NULL, /* SIOCSIWPMKSA */ NULL, /* SIOCSIWPMKSA */
NULL, /*---hole---*/ NULL, /*---hole---*/
}; };
@ -1322,7 +1322,7 @@ static const struct iw_priv_args r8180_private_args[] = {
static iw_handler r8180_private_handler[] = { static iw_handler r8180_private_handler[] = {
r8180_wx_set_crcmon, /*SIOCIWSECONDPRIV*/ r8180_wx_set_crcmon, /*SIOCIWSECONDPRIV*/
dummy, dummy,
r8180_wx_set_beaconinterval, r8180_wx_set_beaconinterval,
dummy, dummy,
@ -1354,16 +1354,15 @@ static inline int is_same_network(struct ieee80211_network *src,
struct ieee80211_network *dst, struct ieee80211_network *dst,
struct ieee80211_device *ieee) struct ieee80211_device *ieee)
{ {
/* A network is only a duplicate if the channel, BSSID, ESSID /* A network is only a duplicate if the channel, BSSID, ESSID
* and the capability field (in particular IBSS and BSS) all match. * and the capability field (in particular IBSS and BSS) all match.
* We treat all <hidden> with the same BSSID and channel * We treat all <hidden> with the same BSSID and channel
* as one network */ * as one network
return (((src->ssid_len == dst->ssid_len) || (ieee->iw_mode == IW_MODE_INFRA)) && /* YJ,mod, 080819,for hidden ap */ */
/* ((src->ssid_len == dst->ssid_len) && */ return (((src->ssid_len == dst->ssid_len) || (ieee->iw_mode == IW_MODE_INFRA)) && /* YJ,mod, 080819,for hidden ap */
(src->channel == dst->channel) && (src->channel == dst->channel) &&
!memcmp(src->bssid, dst->bssid, ETH_ALEN) && !memcmp(src->bssid, dst->bssid, ETH_ALEN) &&
(!memcmp(src->ssid, dst->ssid, src->ssid_len) || (ieee->iw_mode == IW_MODE_INFRA)) && /* YJ,mod, 080819,for hidden ap */ (!memcmp(src->ssid, dst->ssid, src->ssid_len) || (ieee->iw_mode == IW_MODE_INFRA)) && /* YJ,mod, 080819,for hidden ap */
/*!memcmp(src->ssid, dst->ssid, src->ssid_len) && */
((src->capability & WLAN_CAPABILITY_IBSS) == ((src->capability & WLAN_CAPABILITY_IBSS) ==
(dst->capability & WLAN_CAPABILITY_IBSS)) && (dst->capability & WLAN_CAPABILITY_IBSS)) &&
((src->capability & WLAN_CAPABILITY_BSS) == ((src->capability & WLAN_CAPABILITY_BSS) ==
@ -1376,11 +1375,9 @@ static struct iw_statistics *r8180_get_wireless_stats(struct net_device *dev)
struct r8180_priv *priv = ieee80211_priv(dev); struct r8180_priv *priv = ieee80211_priv(dev);
struct ieee80211_device* ieee = priv->ieee80211; struct ieee80211_device* ieee = priv->ieee80211;
struct iw_statistics* wstats = &priv->wstats; struct iw_statistics* wstats = &priv->wstats;
/* struct ieee80211_network* target = NULL; */
int tmp_level = 0; int tmp_level = 0;
int tmp_qual = 0; int tmp_qual = 0;
int tmp_noise = 0; int tmp_noise = 0;
/* unsigned long flag; */
if (ieee->state < IEEE80211_LINKED) { if (ieee->state < IEEE80211_LINKED) {
wstats->qual.qual = 0; wstats->qual.qual = 0;