PERFORCE change 81641 for review
Robert Watson
rwatson at FreeBSD.org
Mon Aug 8 08:58:44 GMT 2005
http://perforce.freebsd.org/chv.cgi?CH=81641
Change 81641 by rwatson at rwatson_zoo on 2005/08/08 08:57:48
Integrate netsmp:
- Removal of some number of FreeBSD version ifdefs.
- 802.11 nit fixes.
Affected files ...
.. //depot/projects/netsmp/src/sys/amd64/amd64/pmap.c#2 integrate
.. //depot/projects/netsmp/src/sys/dev/amr/amr_disk.c#2 integrate
.. //depot/projects/netsmp/src/sys/dev/amr/amrvar.h#2 integrate
.. //depot/projects/netsmp/src/sys/dev/awi/awi.c#6 integrate
.. //depot/projects/netsmp/src/sys/dev/ipw/if_ipw.c#4 integrate
.. //depot/projects/netsmp/src/sys/dev/wi/if_wi.c#7 integrate
.. //depot/projects/netsmp/src/sys/dev/xe/if_xe.c#5 integrate
.. //depot/projects/netsmp/src/sys/i386/i386/pmap.c#3 integrate
.. //depot/projects/netsmp/src/sys/net80211/ieee80211.c#3 integrate
.. //depot/projects/netsmp/src/sys/net80211/ieee80211_input.c#5 integrate
.. //depot/projects/netsmp/src/sys/net80211/ieee80211_ioctl.c#4 integrate
.. //depot/projects/netsmp/src/sys/net80211/ieee80211_ioctl.h#3 integrate
.. //depot/projects/netsmp/src/sys/net80211/ieee80211_node.c#6 integrate
.. //depot/projects/netsmp/src/sys/net80211/ieee80211_output.c#4 integrate
.. //depot/projects/netsmp/src/sys/net80211/ieee80211_var.h#3 integrate
.. //depot/projects/netsmp/src/sys/sys/queue.h#2 integrate
Differences ...
==== //depot/projects/netsmp/src/sys/amd64/amd64/pmap.c#2 (text+ko) ====
@@ -75,7 +75,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.516 2005/06/10 03:33:35 alc Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.517 2005/08/07 22:00:46 alc Exp $");
/*
* Manages physical address maps.
@@ -1763,7 +1763,6 @@
*/
if ((ptpaddr & PG_PS) != 0) {
*pde &= ~(PG_M|PG_RW);
- pmap->pm_stats.resident_count -= NBPDR / PAGE_SIZE;
anychanged = 1;
continue;
}
==== //depot/projects/netsmp/src/sys/dev/amr/amr_disk.c#2 (text+ko) ====
@@ -56,7 +56,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/amr/amr_disk.c,v 1.35 2005/01/16 07:34:26 scottl Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/amr/amr_disk.c,v 1.36 2005/08/07 23:51:53 scottl Exp $");
/*
* Disk driver for AMI MegaRaid controllers
@@ -111,9 +111,6 @@
amrd_open(struct disk *dp)
{
struct amrd_softc *sc = (struct amrd_softc *)dp->d_drv1;
-#if __FreeBSD_version < 500000 /* old buf style */
- struct disklabel *label;
-#endif
debug_called(1);
@@ -124,23 +121,6 @@
if (sc->amrd_controller->amr_state & AMR_STATE_SHUTDOWN)
return(ENXIO);
-#if __FreeBSD_version < 500000 /* old buf style */
- label = &sc->amrd_disk.d_label;
- bzero(label, sizeof(*label));
- label->d_type = DTYPE_SCSI;
- label->d_secsize = AMR_BLKSIZE;
- label->d_nsectors = sc->amrd_drive->al_sectors;
- label->d_ntracks = sc->amrd_drive->al_heads;
- label->d_ncylinders = sc->amrd_drive->al_cylinders;
- label->d_secpercyl = sc->amrd_drive->al_sectors * sc->amrd_drive->al_heads;
- label->d_secperunit = sc->amrd_drive->al_size;
-#else
- sc->amrd_disk->d_sectorsize = AMR_BLKSIZE;
- sc->amrd_disk->d_mediasize = (off_t)sc->amrd_drive->al_size * AMR_BLKSIZE;
- sc->amrd_disk->d_fwsectors = sc->amrd_drive->al_sectors;
- sc->amrd_disk->d_fwheads = sc->amrd_drive->al_heads;
-#endif
-
return (0);
}
/********************************************************************************
@@ -257,10 +237,11 @@
sc->amrd_disk->d_dump = (dumper_t *)amrd_dump;
sc->amrd_disk->d_unit = sc->amrd_unit;
sc->amrd_disk->d_flags = 0;
+ sc->amrd_disk->d_sectorsize = AMR_BLKSIZE;
+ sc->amrd_disk->d_mediasize = (off_t)sc->amrd_drive->al_size * AMR_BLKSIZE;
+ sc->amrd_disk->d_fwsectors = sc->amrd_drive->al_sectors;
+ sc->amrd_disk->d_fwheads = sc->amrd_drive->al_heads;
disk_create(sc->amrd_disk, DISK_VERSION);
-#ifdef FREEBSD_4
- disks_registered++;
-#endif
return (0);
}
==== //depot/projects/netsmp/src/sys/dev/amr/amrvar.h#2 (text+ko) ====
@@ -53,14 +53,12 @@
* SUCH DAMAGE.
*
*
- * $FreeBSD: src/sys/dev/amr/amrvar.h,v 1.26 2005/01/23 23:25:41 scottl Exp $
+ * $FreeBSD: src/sys/dev/amr/amrvar.h,v 1.27 2005/08/07 23:53:00 scottl Exp $
*/
-#if __FreeBSD_version >= 500005
-# include <geom/geom_disk.h>
-# include <sys/lock.h>
-# include <sys/mutex.h>
-#endif
+#include <geom/geom_disk.h>
+#include <sys/lock.h>
+#include <sys/mutex.h>
#define LSI_DESC_PCI "LSILogic MegaRAID 1.51"
==== //depot/projects/netsmp/src/sys/dev/awi/awi.c#6 (text+ko) ====
@@ -89,7 +89,7 @@
__KERNEL_RCSID(0, "$NetBSD: awi.c,v 1.62 2004/01/16 14:13:15 onoe Exp $");
#endif
#ifdef __FreeBSD__
-__FBSDID("$FreeBSD: src/sys/dev/awi/awi.c,v 1.39 2005/08/03 00:18:28 rwatson Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/awi/awi.c,v 1.40 2005/08/08 03:30:57 sam Exp $");
#endif
#include "opt_inet.h"
@@ -660,7 +660,7 @@
if (ic->ic_opmode == IEEE80211_M_AHDEMO ||
ic->ic_opmode == IEEE80211_M_HOSTAP) {
ni->ni_chan = ic->ic_ibss_chan;
- ni->ni_intval = ic->ic_lintval;
+ ni->ni_intval = ic->ic_bintval;
ni->ni_rssi = 0;
ni->ni_rstamp = 0;
memset(&ni->ni_tstamp, 0, sizeof(ni->ni_tstamp));
==== //depot/projects/netsmp/src/sys/dev/ipw/if_ipw.c#4 (text+ko) ====
@@ -1,4 +1,4 @@
-/* $FreeBSD: src/sys/dev/ipw/if_ipw.c,v 1.8 2005/07/22 17:36:12 sam Exp $ */
+/* $FreeBSD: src/sys/dev/ipw/if_ipw.c,v 1.9 2005/08/08 03:30:57 sam Exp $ */
/*-
* Copyright (c) 2004, 2005
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ipw/if_ipw.c,v 1.8 2005/07/22 17:36:12 sam Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ipw/if_ipw.c,v 1.9 2005/08/08 03:30:57 sam Exp $");
/*-
* Intel(R) PRO/Wireless 2100 MiniPCI driver
@@ -2001,7 +2001,7 @@
#endif
if (ic->ic_opmode == IEEE80211_M_IBSS) {
- data = htole32(ic->ic_lintval);
+ data = htole32(ic->ic_bintval);
DPRINTF(("Setting beacon interval to %u\n", le32toh(data)));
error = ipw_cmd(sc, IPW_CMD_SET_BEACON_INTERVAL, &data,
sizeof data);
==== //depot/projects/netsmp/src/sys/dev/wi/if_wi.c#7 (text+ko) ====
@@ -62,7 +62,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/wi/if_wi.c,v 1.183 2005/08/05 04:56:14 imp Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/wi/if_wi.c,v 1.184 2005/08/08 03:30:57 sam Exp $");
#define WI_HERMES_AUTOINC_WAR /* Work around data write autoinc bug. */
#define WI_HERMES_STATS_WAR /* Work around stats counter bug. */
@@ -739,7 +739,7 @@
if (ic->ic_opmode == IEEE80211_M_HOSTAP &&
sc->sc_firmware_type == WI_INTERSIL) {
- wi_write_val(sc, WI_RID_OWN_BEACON_INT, ic->ic_lintval);
+ wi_write_val(sc, WI_RID_OWN_BEACON_INT, ic->ic_bintval);
wi_write_val(sc, WI_RID_BASIC_RATE, 0x03); /* 1, 2 */
wi_write_val(sc, WI_RID_SUPPORT_RATE, 0x0f); /* 1, 2, 5.5, 11 */
wi_write_val(sc, WI_RID_DTIM_PERIOD, 1);
==== //depot/projects/netsmp/src/sys/dev/xe/if_xe.c#5 (text+ko) ====
@@ -57,7 +57,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/xe/if_xe.c,v 1.58 2005/08/03 00:18:34 rwatson Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/xe/if_xe.c,v 1.59 2005/08/07 23:16:22 imp Exp $");
/*
* FreeBSD device driver for Xircom CreditCard PCMCIA Ethernet adapters. The
@@ -1275,11 +1275,7 @@
/* Iterate over multicast address list */
count = 0;
IF_ADDR_LOCK(ifp);
-#if __FreeBSD_version < 500000
- LIST_FOREACH(maddr, &ifp->if_multiaddrs, ifma_link) {
-#else
TAILQ_FOREACH(maddr, &ifp->if_multiaddrs, ifma_link) {
-#endif
if (maddr->ifma_addr->sa_family != AF_LINK)
continue;
==== //depot/projects/netsmp/src/sys/i386/i386/pmap.c#3 (text+ko) ====
@@ -73,7 +73,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/i386/i386/pmap.c,v 1.524 2005/07/29 19:03:44 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/i386/i386/pmap.c,v 1.525 2005/08/07 22:00:47 alc Exp $");
/*
* Manages physical address maps.
@@ -1788,7 +1788,6 @@
*/
if ((ptpaddr & PG_PS) != 0) {
pmap->pm_pdir[pdirindex] &= ~(PG_M|PG_RW);
- pmap->pm_stats.resident_count -= NBPDR / PAGE_SIZE;
anychanged = 1;
continue;
}
==== //depot/projects/netsmp/src/sys/net80211/ieee80211.c#3 (text+ko) ====
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/net80211/ieee80211.c,v 1.20 2005/07/22 16:50:16 sam Exp $");
+__FBSDID("$FreeBSD: src/sys/net80211/ieee80211.c,v 1.21 2005/08/08 03:30:56 sam Exp $");
/*
* IEEE 802.11 generic handler
@@ -182,12 +182,14 @@
#endif
(void) ieee80211_setmode(ic, ic->ic_curmode);
- if (ic->ic_lintval == 0)
- ic->ic_lintval = IEEE80211_BINTVAL_DEFAULT;
- ic->ic_bmisstimeout = 7*ic->ic_lintval; /* default 7 beacons */
+ if (ic->ic_bintval == 0)
+ ic->ic_bintval = IEEE80211_BINTVAL_DEFAULT;
+ ic->ic_bmisstimeout = 7*ic->ic_bintval; /* default 7 beacons */
ic->ic_dtim_period = IEEE80211_DTIM_DEFAULT;
IEEE80211_BEACON_LOCK_INIT(ic, "beacon");
+ if (ic->ic_lintval == 0)
+ ic->ic_lintval = ic->ic_bintval;
ic->ic_txpowlimit = IEEE80211_TXPOWER_MAX;
ieee80211_node_attach(ic);
==== //depot/projects/netsmp/src/sys/net80211/ieee80211_input.c#5 (text+ko) ====
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_input.c,v 1.79 2005/08/06 04:57:27 sam Exp $");
+__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_input.c,v 1.80 2005/08/08 03:30:56 sam Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -1901,6 +1901,16 @@
ic->ic_stats.is_rx_chanmismatch++;
return;
}
+ if (!(IEEE80211_BINTVAL_MIN <= bintval &&
+ bintval <= IEEE80211_BINTVAL_MAX)) {
+ IEEE80211_DISCARD(ic,
+ IEEE80211_MSG_ELEMID | IEEE80211_MSG_INPUT,
+ wh, ieee80211_mgt_subtype_name[subtype >>
+ IEEE80211_FC0_SUBTYPE_SHIFT],
+ "bogus beacon interval", bintval);
+ ic->ic_stats.is_rx_badbintval++;
+ return;
+ }
/*
* Count frame now that we know it's to be processed.
@@ -2201,7 +2211,7 @@
case IEEE80211_FC0_SUBTYPE_ASSOC_REQ:
case IEEE80211_FC0_SUBTYPE_REASSOC_REQ: {
- u_int16_t capinfo, bintval;
+ u_int16_t capinfo, lintval;
struct ieee80211_rsnparms rsn;
u_int8_t reason;
@@ -2238,7 +2248,7 @@
return;
}
capinfo = le16toh(*(u_int16_t *)frm); frm += 2;
- bintval = le16toh(*(u_int16_t *)frm); frm += 2;
+ lintval = le16toh(*(u_int16_t *)frm); frm += 2;
if (reassoc)
frm += 6; /* ignore current AP info */
ssid = rates = xrates = wpa = wme = NULL;
@@ -2366,7 +2376,7 @@
}
ni->ni_rssi = rssi;
ni->ni_rstamp = rstamp;
- ni->ni_intval = bintval;
+ ni->ni_intval = lintval;
ni->ni_capinfo = capinfo;
ni->ni_chan = ic->ic_bss->ni_chan;
ni->ni_fhdwell = ic->ic_bss->ni_fhdwell;
==== //depot/projects/netsmp/src/sys/net80211/ieee80211_ioctl.c#4 (text+ko) ====
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_ioctl.c,v 1.28 2005/07/22 17:36:11 sam Exp $");
+__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_ioctl.c,v 1.30 2005/08/08 05:49:29 sam Exp $");
/*
* IEEE 802.11 ioctl support (FreeBSD-specific)
@@ -1075,18 +1075,57 @@
return error;
}
+struct stainforeq {
+ struct ieee80211com *ic;
+ struct ieee80211req_sta_info *si;
+ size_t space;
+};
+
+static size_t
+sta_space(const struct ieee80211_node *ni, size_t *ielen)
+{
+ *ielen = 0;
+ if (ni->ni_wpa_ie != NULL)
+ *ielen += 2+ni->ni_wpa_ie[1];
+ if (ni->ni_wme_ie != NULL)
+ *ielen += 2+ni->ni_wme_ie[1];
+ return roundup(sizeof(struct ieee80211req_sta_info) + *ielen,
+ sizeof(u_int32_t));
+}
+
static void
-get_sta_info(struct ieee80211req_sta_info *si, const struct ieee80211_node *ni)
+get_sta_space(void *arg, struct ieee80211_node *ni)
{
+ struct stainforeq *req = arg;
struct ieee80211com *ic = ni->ni_ic;
+ size_t ielen;
- si->isi_ie_len = 0;
- if (ni->ni_wpa_ie != NULL)
- si->isi_ie_len += 2+ni->ni_wpa_ie[1];
- if (ni->ni_wme_ie != NULL)
- si->isi_ie_len += 2+ni->ni_wme_ie[1];
- si->isi_len = sizeof(*si) + si->isi_ie_len, sizeof(u_int32_t);
- si->isi_len = roundup(si->isi_len, sizeof(u_int32_t));
+ if (ic->ic_opmode == IEEE80211_M_HOSTAP &&
+ ni->ni_associd == 0) /* only associated stations */
+ return;
+ req->space += sta_space(ni, &ielen);
+}
+
+static void
+get_sta_info(void *arg, struct ieee80211_node *ni)
+{
+ struct stainforeq *req = arg;
+ struct ieee80211com *ic = ni->ni_ic;
+ struct ieee80211req_sta_info *si;
+ size_t ielen, len;
+ u_int8_t *cp;
+
+ if (ic->ic_opmode == IEEE80211_M_HOSTAP &&
+ ni->ni_associd == 0) /* only associated stations */
+ return;
+ if (ni->ni_chan == IEEE80211_CHAN_ANYC) /* XXX bogus entry */
+ return;
+ len = sta_space(ni, &ielen);
+ if (len > req->space)
+ return;
+ si = req->si;
+ si->isi_len = len;
+ si->isi_ie_len = ielen;
si->isi_freq = ni->ni_chan->ic_freq;
si->isi_flags = ni->ni_chan->ic_flags;
si->isi_state = ni->ni_flags;
@@ -1110,55 +1149,60 @@
si->isi_txseqs[0] = ni->ni_txseqs[0];
si->isi_rxseqs[0] = ni->ni_rxseqs[0];
}
- if (ic->ic_opmode == IEEE80211_M_IBSS || ni->ni_associd != 0)
+ /* NB: leave all cases in case we relax ni_associd == 0 check */
+ if (ieee80211_node_is_authorized(ni))
si->isi_inact = ic->ic_inact_run;
- else if (ieee80211_node_is_authorized(ni))
+ else if (ni->ni_associd != 0)
si->isi_inact = ic->ic_inact_auth;
else
si->isi_inact = ic->ic_inact_init;
si->isi_inact = (si->isi_inact - ni->ni_inact) * IEEE80211_INACT_WAIT;
+
+ cp = (u_int8_t *)(si+1);
+ if (ni->ni_wpa_ie != NULL) {
+ memcpy(cp, ni->ni_wpa_ie, 2+ni->ni_wpa_ie[1]);
+ cp += 2+ni->ni_wpa_ie[1];
+ }
+ if (ni->ni_wme_ie != NULL) {
+ memcpy(cp, ni->ni_wme_ie, 2+ni->ni_wme_ie[1]);
+ cp += 2+ni->ni_wme_ie[1];
+ }
+
+ req->si = (struct ieee80211req_sta_info *)(((u_int8_t *)si) + len);
+ req->space -= len;
}
static int
ieee80211_ioctl_getstainfo(struct ieee80211com *ic, struct ieee80211req *ireq)
{
- union {
- struct ieee80211req_sta_info info;
- char data[512]; /* XXX shrink? */
- } u;
- struct ieee80211req_sta_info *si = &u.info;
- struct ieee80211_node_table *nt;
- struct ieee80211_node *ni;
- int error, space;
- u_int8_t *p, *cp;
+ struct stainforeq req;
+ int error;
+
+ if (ireq->i_len < sizeof(struct stainforeq))
+ return EFAULT;
- nt = &ic->ic_sta;
- p = ireq->i_data;
- space = ireq->i_len;
error = 0;
- /* XXX locking */
- TAILQ_FOREACH(ni, &nt->nt_node, ni_list) {
- get_sta_info(si, ni);
- if (si->isi_len > sizeof(u))
- continue; /* XXX */
- if (space < si->isi_len)
- break;
- cp = (u_int8_t *)(si+1);
- if (ni->ni_wpa_ie != NULL) {
- memcpy(cp, ni->ni_wpa_ie, 2+ni->ni_wpa_ie[1]);
- cp += 2+ni->ni_wpa_ie[1];
- }
- if (ni->ni_wme_ie != NULL) {
- memcpy(cp, ni->ni_wme_ie, 2+ni->ni_wme_ie[1]);
- cp += 2+ni->ni_wme_ie[1];
- }
- error = copyout(si, p, si->isi_len);
- if (error)
- break;
- p += si->isi_len;
- space -= si->isi_len;
- }
- ireq->i_len -= space;
+ req.space = 0;
+ ieee80211_iterate_nodes(&ic->ic_sta, get_sta_space, &req);
+ if (req.space > ireq->i_len)
+ req.space = ireq->i_len;
+ if (req.space > 0) {
+ size_t space;
+ void *p;
+
+ space = req.space;
+ /* XXX M_WAITOK after driver lock released */
+ MALLOC(p, void *, space, M_TEMP, M_NOWAIT);
+ if (p == NULL)
+ return ENOMEM;
+ req.si = p;
+ ieee80211_iterate_nodes(&ic->ic_sta, get_sta_info, &req);
+ ireq->i_len = space - req.space;
+ error = copyout(p, ireq->i_data, ireq->i_len);
+ FREE(p, M_TEMP);
+ } else
+ ireq->i_len = 0;
+
return error;
}
@@ -2318,7 +2362,7 @@
return EINVAL;
if (IEEE80211_BINTVAL_MIN <= ireq->i_val &&
ireq->i_val <= IEEE80211_BINTVAL_MAX) {
- ic->ic_lintval = ireq->i_val;
+ ic->ic_bintval = ireq->i_val;
error = ENETRESET; /* requires restart */
} else
error = EINVAL;
==== //depot/projects/netsmp/src/sys/net80211/ieee80211_ioctl.h#3 (text+ko) ====
@@ -29,7 +29,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $FreeBSD: src/sys/net80211/ieee80211_ioctl.h,v 1.12 2005/07/22 17:50:13 sam Exp $
+ * $FreeBSD: src/sys/net80211/ieee80211_ioctl.h,v 1.13 2005/08/08 03:30:56 sam Exp $
*/
#ifndef _NET80211_IEEE80211_IOCTL_H_
#define _NET80211_IEEE80211_IOCTL_H_
@@ -180,7 +180,8 @@
u_int32_t is_ff_split; /* fast frame rx split error */
u_int32_t is_ff_decap; /* fast frames decap'd */
u_int32_t is_ff_encap; /* fast frames encap'd for tx */
- u_int32_t is_spare[10];
+ u_int32_t is_rx_badbintval; /* rx frame w/ bogus bintval */
+ u_int32_t is_spare[9];
};
/*
==== //depot/projects/netsmp/src/sys/net80211/ieee80211_node.c#6 (text+ko) ====
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_node.c,v 1.60 2005/08/06 04:56:49 sam Exp $");
+__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_node.c,v 1.61 2005/08/08 03:30:56 sam Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -389,7 +389,7 @@
ni->ni_esslen = ic->ic_des_esslen;
memcpy(ni->ni_essid, ic->ic_des_essid, ni->ni_esslen);
copy_bss(ni, ic->ic_bss);
- ni->ni_intval = ic->ic_lintval;
+ ni->ni_intval = ic->ic_bintval;
if (ic->ic_flags & IEEE80211_F_PRIVACY)
ni->ni_capinfo |= IEEE80211_CAPINFO_PRIVACY;
if (ic->ic_phytype == IEEE80211_T_FH) {
@@ -441,7 +441,7 @@
ic->ic_bss = ieee80211_ref_node(ni);
if (obss != NULL) {
copy_bss(ni, obss);
- ni->ni_intval = ic->ic_lintval;
+ ni->ni_intval = ic->ic_bintval;
ieee80211_free_node(obss);
}
}
==== //depot/projects/netsmp/src/sys/net80211/ieee80211_output.c#4 (text+ko) ====
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_output.c,v 1.32 2005/07/31 06:12:32 sam Exp $");
+__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_output.c,v 1.33 2005/08/08 03:30:56 sam Exp $");
#include "opt_inet.h"
@@ -1686,13 +1686,13 @@
* using this information.
*/
/* XXX handle overflow? */
- age = ((ni->ni_intval * ic->ic_lintval) << 2) / 1024; /* TU -> secs */
+ age = ((ni->ni_intval * ic->ic_bintval) << 2) / 1024; /* TU -> secs */
_IEEE80211_NODE_SAVEQ_ENQUEUE(ni, m, qlen, age);
IEEE80211_NODE_SAVEQ_UNLOCK(ni);
IEEE80211_DPRINTF(ic, IEEE80211_MSG_POWER,
- "[%s] save frame, %u now queued\n",
- ether_sprintf(ni->ni_macaddr), qlen);
+ "[%s] save frame with age %d, %u now queued\n",
+ ether_sprintf(ni->ni_macaddr), age, qlen);
if (qlen == 1)
ic->ic_set_tim(ni, 1);
==== //depot/projects/netsmp/src/sys/net80211/ieee80211_var.h#3 (text+ko) ====
@@ -29,7 +29,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $FreeBSD: src/sys/net80211/ieee80211_var.h,v 1.28 2005/07/22 17:57:16 sam Exp $
+ * $FreeBSD: src/sys/net80211/ieee80211_var.h,v 1.29 2005/08/08 03:30:56 sam Exp $
*/
#ifndef _NET80211_IEEE80211_VAR_H_
#define _NET80211_IEEE80211_VAR_H_
@@ -65,7 +65,8 @@
#define IEEE80211_DTIM_MIN 1 /* min DTIM period */
#define IEEE80211_DTIM_DEFAULT 1 /* default DTIM period */
-#define IEEE80211_BINTVAL_MAX 500 /* max beacon interval (TU's) */
+/* NB: min+max come from WiFi requirements */
+#define IEEE80211_BINTVAL_MAX 1000 /* max beacon interval (TU's) */
#define IEEE80211_BINTVAL_MIN 25 /* min beacon interval (TU's) */
#define IEEE80211_BINTVAL_DEFAULT 100 /* default beacon interval (TU's) */
@@ -143,6 +144,7 @@
void (*ic_node_cleanup)(struct ieee80211_node *);
u_int8_t (*ic_node_getrssi)(const struct ieee80211_node*);
u_int16_t ic_lintval; /* listen interval */
+ u_int16_t ic_bintval; /* beacon interval */
u_int16_t ic_holdover; /* PM hold over duration */
u_int16_t ic_txmin; /* min tx retry count */
u_int16_t ic_txmax; /* max tx retry count */
==== //depot/projects/netsmp/src/sys/sys/queue.h#2 (text+ko) ====
@@ -27,7 +27,7 @@
* SUCH DAMAGE.
*
* @(#)queue.h 8.5 (Berkeley) 8/20/94
- * $FreeBSD: src/sys/sys/queue.h,v 1.60 2005/03/02 21:33:29 joerg Exp $
+ * $FreeBSD: src/sys/sys/queue.h,v 1.61 2005/08/08 05:43:57 phk Exp $
*/
#ifndef _SYS_QUEUE_H_
@@ -403,7 +403,7 @@
(head2)->tqh_first->field.tqe_prev = (head1)->tqh_last; \
(head1)->tqh_last = (head2)->tqh_last; \
TAILQ_INIT((head2)); \
- QMD_TRACE_HEAD(head); \
+ QMD_TRACE_HEAD(head1); \
QMD_TRACE_HEAD(head2); \
} \
} while (0)
More information about the p4-projects
mailing list