1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-14 10:09:48 +00:00

add mcastrate support

MFC after:	1 week
This commit is contained in:
Sam Leffler 2005-12-12 19:23:55 +00:00
parent d16441fde1
commit 439b4702f3
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=153354
2 changed files with 25 additions and 1 deletions

View File

@ -28,7 +28,7 @@
.\" From: @(#)ifconfig.8 8.3 (Berkeley) 1/5/94 .\" From: @(#)ifconfig.8 8.3 (Berkeley) 1/5/94
.\" $FreeBSD$ .\" $FreeBSD$
.\" .\"
.Dd October 1, 2005 .Dd December 12, 2005
.Dt IFCONFIG 8 .Dt IFCONFIG 8
.Os .Os
.Sh NAME .Sh NAME
@ -674,6 +674,12 @@ for examining parameters when WME mode is disabled.
See the description of the See the description of the
.Cm wme .Cm wme
directive for information on the various parameters. 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 .It Cm powersave
Enable powersave operation. Enable powersave operation.
When operating as a client, the station will conserve power by 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); 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 static
DECL_CMD_FUNC(set80211fragthreshold, val, d) DECL_CMD_FUNC(set80211fragthreshold, val, d)
{ {
@ -1613,6 +1619,17 @@ ieee80211_status(int s)
LINE_CHECK("%crtsthreshold %d", spacer, ireq.i_val); 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; ireq.i_type = IEEE80211_IOC_FRAGTHRESHOLD;
if (ioctl(s, SIOCG80211, &ireq) != -1) { if (ioctl(s, SIOCG80211, &ireq) != -1) {
if (ireq.i_val != IEEE80211_FRAG_MAX || verbose) 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_ARG("mac:kick", set80211kickmac),
DEF_CMD("pureg", 1, set80211pureg), DEF_CMD("pureg", 1, set80211pureg),
DEF_CMD("-pureg", 0, set80211pureg), DEF_CMD("-pureg", 0, set80211pureg),
DEF_CMD_ARG("mcastrate", set80211mcastrate),
DEF_CMD_ARG("fragthreshold", set80211fragthreshold), DEF_CMD_ARG("fragthreshold", set80211fragthreshold),
}; };
static struct afswtch af_ieee80211 = { static struct afswtch af_ieee80211 = {