Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ic Fix capability information in association request...
details: https://anonhg.NetBSD.org/src/rev/53c71028bc40
branches: trunk
changeset: 511711:53c71028bc40
user: onoe <onoe%NetBSD.org@localhost>
date: Mon Jun 25 12:06:14 2001 +0000
description:
Fix capability information in association request to reflect ESS/IBSS mode.
This fix is required to interoperate with Cisco's access point.
diffstat:
sys/dev/ic/awi.c | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
diffs (39 lines):
diff -r 398d550bc1db -r 53c71028bc40 sys/dev/ic/awi.c
--- a/sys/dev/ic/awi.c Mon Jun 25 12:02:53 2001 +0000
+++ b/sys/dev/ic/awi.c Mon Jun 25 12:06:14 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: awi.c,v 1.31 2001/06/25 04:29:19 onoe Exp $ */
+/* $NetBSD: awi.c,v 1.32 2001/06/25 12:06:14 onoe Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -2192,7 +2192,7 @@
struct ifnet *ifp = sc->sc_ifp;
struct mbuf *m;
struct ieee80211_frame *wh;
- u_int16_t lintval;
+ u_int16_t capinfo, lintval;
u_int8_t *asreq;
MGETHDR(m, M_DONTWAIT, MT_DATA);
@@ -2220,12 +2220,16 @@
asreq = (u_int8_t *)&wh[1];
/* capability info */
- if (sc->sc_wep_algo == NULL)
- LE_WRITE_2(asreq, IEEE80211_CAPINFO_CF_POLLABLE);
+ capinfo = IEEE80211_CAPINFO_CF_POLLABLE; /*XXX*/
+ if (sc->sc_mib_local.Network_Mode)
+ capinfo |= IEEE80211_CAPINFO_ESS;
else
- LE_WRITE_2(asreq,
- IEEE80211_CAPINFO_CF_POLLABLE | IEEE80211_CAPINFO_PRIVACY);
+ capinfo |= IEEE80211_CAPINFO_IBSS;
+ if (sc->sc_wep_algo != NULL)
+ capinfo |= IEEE80211_CAPINFO_PRIVACY;
+ LE_WRITE_2(asreq, capinfo);
asreq += 2;
+
/* listen interval */
lintval = LE_READ_2(&sc->sc_mib_mgt.aListen_Interval);
LE_WRITE_2(asreq, lintval);
Home |
Main Index |
Thread Index |
Old Index