add mcastrate support

MFC after:	1 week
This commit is contained in:
sam 2005-12-12 19:23:55 +00:00
parent f051015cb9
commit 7245fda6a0
2 changed files with 25 additions and 1 deletions

View File

@ -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

View File

@ -662,6 +662,12 @@ set80211pureg(const char *val, int d, int s, const struct afswtch *rafp)
set80211(s, IEEE80211_IOC_PUREG, d, 0, NULL);
}
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)
{
@ -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 = {