Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/net Fix two bugs: supported rates elements were assemble...
details: https://anonhg.NetBSD.org/src/rev/ae2cbdb56ed1
branches: trunk
changeset: 547090:ae2cbdb56ed1
user: dyoung <dyoung%NetBSD.org@localhost>
date: Tue May 13 05:43:43 2003 +0000
description:
Fix two bugs: supported rates elements were assembled incorrectly,
and the 'no recent beacons from %s' message told the wrong BSSID.
diffstat:
sys/net/if_ieee80211subr.c | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
diffs (56 lines):
diff -r 0c70afe4bbfb -r ae2cbdb56ed1 sys/net/if_ieee80211subr.c
--- a/sys/net/if_ieee80211subr.c Tue May 13 05:31:56 2003 +0000
+++ b/sys/net/if_ieee80211subr.c Tue May 13 05:43:43 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ieee80211subr.c,v 1.25 2003/04/08 04:31:23 kml Exp $ */
+/* $NetBSD: if_ieee80211subr.c,v 1.26 2003/05/13 05:43:43 dyoung Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ieee80211subr.c,v 1.25 2003/04/08 04:31:23 kml Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ieee80211subr.c,v 1.26 2003/05/13 05:43:43 dyoung Exp $");
#include "opt_inet.h"
#include "bpfilter.h"
@@ -1489,8 +1489,9 @@
*frm++ = IEEE80211_ELEMID_RATES;
for (i = 0; i < IEEE80211_RATE_SIZE; i++) {
- if (ic->ic_sup_rates[i] != 0)
- frm[i + 1] = ic->ic_sup_rates[i];
+ if (ic->ic_sup_rates[i] == 0)
+ break;
+ frm[i + 1] = ic->ic_sup_rates[i];
}
*frm++ = i;
frm += i;
@@ -2395,6 +2396,7 @@
{
struct ieee80211com *ic = (void *)ifp;
struct ieee80211_node *ni = &ic->ic_bss;
+ u_int8_t old_bssid[IEEE80211_ADDR_LEN];
int i, error, ostate;
#ifdef IEEE80211_DEBUG
static const char *stname[] =
@@ -2476,6 +2478,7 @@
ni = &ic->ic_bss;
/* initialize bss for probe request */
IEEE80211_ADDR_COPY(ni->ni_macaddr, ifp->if_broadcastaddr);
+ IEEE80211_ADDR_COPY(old_bssid, ic->ic_bss.ni_bssid);
IEEE80211_ADDR_COPY(ni->ni_bssid, ifp->if_broadcastaddr);
ni->ni_nrate = 0;
memset(ni->ni_rates, 0, IEEE80211_RATE_SIZE);
@@ -2515,8 +2518,7 @@
if (ifp->if_flags & IFF_DEBUG)
printf("%s: no recent beacons from %s;"
" rescanning\n",
- ifp->if_xname,
- ether_sprintf(ic->ic_bss.ni_bssid));
+ ifp->if_xname, ether_sprintf(old_bssid));
ieee80211_free_allnodes(ic);
/* FALLTHRU */
case IEEE80211_S_AUTH:
Home |
Main Index |
Thread Index |
Old Index