summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2006-07-26 03:08:45 +0000
committersam <sam@FreeBSD.org>2006-07-26 03:08:45 +0000
commit9b29855762753817faf2d71a478be6e41167a10e (patch)
tree05694ec1e966f586c6e81746c9b809e9d89db422 /sbin
parent21beef2f64196b6fd15cd63672e60804a7f9ecf9 (diff)
downloadFreeBSD-src-9b29855762753817faf2d71a478be6e41167a10e.zip
FreeBSD-src-9b29855762753817faf2d71a478be6e41167a10e.tar.gz
add beacon miss threshold control
Submitted by: Henrik Brix Andersen <henrik@brixandersen.dk> MFC after: 2 weeks
Diffstat (limited to 'sbin')
-rw-r--r--sbin/ifconfig/ifconfig.815
-rw-r--r--sbin/ifconfig/ifieee80211.c15
2 files changed, 29 insertions, 1 deletions
diff --git a/sbin/ifconfig/ifconfig.8 b/sbin/ifconfig/ifconfig.8
index cf7d2d2..51dd76f 100644
--- a/sbin/ifconfig/ifconfig.8
+++ b/sbin/ifconfig/ifconfig.8
@@ -28,7 +28,7 @@
.\" From: @(#)ifconfig.8 8.3 (Berkeley) 1/5/94
.\" $FreeBSD$
.\"
-.Dd June 23, 2006
+.Dd July 25, 2006
.Dt IFCONFIG 8
.Os
.Sh NAME
@@ -576,6 +576,19 @@ The
.Ar interval
parameter is specified in TU's (1/1024 msecs).
By default beacon frames are transmitted every 100 TU's.
+.It Cm bmissthreshold Ar count
+Set the number of consecutive missed beacons at which the station
+will attempt to roam (i.e. search for a new access point).
+The
+.Ar count
+parameter is must be in the range 1 to 255; though the
+upper bound may be reduced according to device capabilities..
+The default threshold is 7 consecutive missed beacons; but
+this may be overridden by the device driver.
+Another name for the
+.Cm bmissthreshold
+parameter is
+.Cm bmiss .
.It Cm bssid Ar address
Specify the MAC address of the access point to use when operating
as a station in a BSS network.
diff --git a/sbin/ifconfig/ifieee80211.c b/sbin/ifconfig/ifieee80211.c
index 4b7c5fa..f615b87 100644
--- a/sbin/ifconfig/ifieee80211.c
+++ b/sbin/ifconfig/ifieee80211.c
@@ -682,6 +682,13 @@ DECL_CMD_FUNC(set80211fragthreshold, val, d)
isundefarg(val) ? IEEE80211_FRAG_MAX : atoi(val), 0, NULL);
}
+static
+DECL_CMD_FUNC(set80211bmissthreshold, val, d)
+{
+ set80211(s, IEEE80211_IOC_BMISSTHRESHOLD,
+ isundefarg(val) ? IEEE80211_HWBMISS_MAX : atoi(val), 0, NULL);
+}
+
static int
getmaxrate(uint8_t rates[15], uint8_t nrates)
{
@@ -1671,6 +1678,12 @@ ieee80211_status(int s)
LINE_CHECK("fragthreshold %d", ireq.i_val);
}
+ ireq.i_type = IEEE80211_IOC_BMISSTHRESHOLD;
+ if (ioctl(s, SIOCG80211, &ireq) != -1) {
+ if (ireq.i_val != IEEE80211_HWBMISS_MAX || verbose)
+ LINE_CHECK("bmiss %d", ireq.i_val);
+ }
+
if (IEEE80211_IS_CHAN_G(c) || IEEE80211_IS_CHAN_PUREG(c) || verbose) {
ireq.i_type = IEEE80211_IOC_PUREG;
if (ioctl(s, SIOCG80211, &ireq) != -1) {
@@ -1977,6 +1990,8 @@ static struct cmd ieee80211_cmds[] = {
DEF_CMD_ARG("fragthreshold", set80211fragthreshold),
DEF_CMD("burst", 1, set80211burst),
DEF_CMD("-burst", 0, set80211burst),
+ DEF_CMD_ARG("bmiss", set80211bmissthreshold),
+ DEF_CMD_ARG("bmissthreshold", set80211bmissthreshold),
};
static struct afswtch af_ieee80211 = {
.af_name = "af_ieee80211",
OpenPOWER on IntegriCloud