summaryrefslogtreecommitdiffstats
path: root/sbin/ifconfig
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2005-12-12 19:23:55 +0000
committersam <sam@FreeBSD.org>2005-12-12 19:23:55 +0000
commit7245fda6a0da943b16115109fc02e54f53fc90cc (patch)
tree42a4fcec2f6c0df4b3c1124c2d8fd6227dd8a375 /sbin/ifconfig
parentf051015cb92da82137e08a0aeefe9a9a2b6e5dc2 (diff)
downloadFreeBSD-src-7245fda6a0da943b16115109fc02e54f53fc90cc.zip
FreeBSD-src-7245fda6a0da943b16115109fc02e54f53fc90cc.tar.gz
add mcastrate support
MFC after: 1 week
Diffstat (limited to 'sbin/ifconfig')
-rw-r--r--sbin/ifconfig/ifconfig.88
-rw-r--r--sbin/ifconfig/ifieee80211.c18
2 files changed, 25 insertions, 1 deletions
diff --git a/sbin/ifconfig/ifconfig.8 b/sbin/ifconfig/ifconfig.8
index 70413de..5f0853b 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 October 1, 2005
+.Dd December 12, 2005
.Dt IFCONFIG 8
.Os
.Sh NAME
@@ -674,6 +674,12 @@ for examining parameters when WME mode is disabled.
See the description of the
.Cm wme
directive for information on the various parameters.
+.It Cm mcastrate Ar rate
+Set the rate for transmitting multicast/broadcast frames.
+Rates are specified as megabits/second in decimal; e.g. 5.5 for 5.5 Mb/s.
+This rate should be valid for the current operating conditions;
+if an invalid rate is specified drivers are free to chose an
+appropriate rate.
.It Cm powersave
Enable powersave operation.
When operating as a client, the station will conserve power by
diff --git a/sbin/ifconfig/ifieee80211.c b/sbin/ifconfig/ifieee80211.c
index b7c6a82..eece245 100644
--- a/sbin/ifconfig/ifieee80211.c
+++ b/sbin/ifconfig/ifieee80211.c
@@ -663,6 +663,12 @@ set80211pureg(const char *val, int d, int s, const struct afswtch *rafp)
}
static
+DECL_CMD_FUNC(set80211mcastrate, val, d)
+{
+ set80211(s, IEEE80211_IOC_MCAST_RATE, (int) 2*atof(val), 0, NULL);
+}
+
+static
DECL_CMD_FUNC(set80211fragthreshold, val, d)
{
set80211(s, IEEE80211_IOC_FRAGTHRESHOLD,
@@ -1613,6 +1619,17 @@ ieee80211_status(int s)
LINE_CHECK("%crtsthreshold %d", spacer, ireq.i_val);
}
+ ireq.i_type = IEEE80211_IOC_MCAST_RATE;
+ if (ioctl(s, SIOCG80211, &ireq) != -1) {
+ if (ireq.i_val != 2*1 || verbose) {
+ if (ireq.i_val == 11)
+ LINE_CHECK("%cmcastrate 5.5", spacer);
+ else
+ LINE_CHECK("%cmcastrate %d", spacer,
+ ireq.i_val/2);
+ }
+ }
+
ireq.i_type = IEEE80211_IOC_FRAGTHRESHOLD;
if (ioctl(s, SIOCG80211, &ireq) != -1) {
if (ireq.i_val != IEEE80211_FRAG_MAX || verbose)
@@ -1913,6 +1930,7 @@ static struct cmd ieee80211_cmds[] = {
DEF_CMD_ARG("mac:kick", set80211kickmac),
DEF_CMD("pureg", 1, set80211pureg),
DEF_CMD("-pureg", 0, set80211pureg),
+ DEF_CMD_ARG("mcastrate", set80211mcastrate),
DEF_CMD_ARG("fragthreshold", set80211fragthreshold),
};
static struct afswtch af_ieee80211 = {
OpenPOWER on IntegriCloud