X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/8103e50607015a0bc0a927b723c96a36a0c60f39..62f204e188672e6a63b19b6994d230da5c019953:/package/openwrt/wlcompat.c diff --git a/package/openwrt/wlcompat.c b/package/openwrt/wlcompat.c index eb85a9e68..b6a9c20b7 100644 --- a/package/openwrt/wlcompat.c +++ b/package/openwrt/wlcompat.c @@ -1,5 +1,26 @@ -// insert header here -// mbm. gpl. +/* + * wlcompat.c + * + * Copyright (C) 2005 Mike Baker, + * Felix Fietkau + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * $Id$ + */ + #include #include @@ -137,7 +158,7 @@ static int wlcompat_get_scan(struct net_device *dev, char *current_val; char *end_buf = extra + IW_SCAN_MAX_DATA; struct iw_event iwe; - int i; + int i, j; if (wl_ioctl(dev, WLC_SCAN_RESULTS, buf, WLC_IOCTL_MAXLEN) < 0) return -EAGAIN; @@ -178,8 +199,8 @@ static int wlcompat_get_scan(struct net_device *dev, current_val = current_ev + IW_EV_LCP_LEN; iwe.u.bitrate.fixed = iwe.u.bitrate.disabled = 0; - for(i = 0 ; i < bss_info->rateset.count ; i++) { - iwe.u.bitrate.value = ((bss_info->rateset.rates[i] & 0x7f) * 500000); + for(j = 0 ; j < bss_info->rateset.count ; j++) { + iwe.u.bitrate.value = ((bss_info->rateset.rates[j] & 0x7f) * 500000); current_val = iwe_stream_add_value(current_ev, current_val, end_buf, &iwe, IW_EV_PARAM_LEN); } if((current_val - current_ev) > IW_EV_LCP_LEN)