aboutsummaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorSam Leffler <sam@FreeBSD.org>2005-07-06 15:39:11 +0000
committerSam Leffler <sam@FreeBSD.org>2005-07-06 15:39:11 +0000
commitfa56f7457031460e716c2d99e2a63bd111ac1b22 (patch)
tree0b61d0ecbf5b30e1951c307b3f6b10e3255dafa9 /sbin
parentc4f040c3f35ba6946ba3c71367af4144536354a7 (diff)
downloadsrc-fa56f7457031460e716c2d99e2a63bd111ac1b22.tar.gz
src-fa56f7457031460e716c2d99e2a63bd111ac1b22.zip
add pureg/-pureg parameter for controlling pureg ap mode support
Reviewed by: avatar Approved by: re (scottl)
Notes
Notes: svn path=/head/; revision=147795
Diffstat (limited to 'sbin')
-rw-r--r--sbin/ifconfig/ifconfig.88
-rw-r--r--sbin/ifconfig/ifieee80211.c15
2 files changed, 22 insertions, 1 deletions
diff --git a/sbin/ifconfig/ifconfig.8 b/sbin/ifconfig/ifconfig.8
index 9630f63a0aa2..e001cc88bc4c 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 5, 2005
+.Dd July 5, 2005
.Dt IFCONFIG 8
.Os
.Sh NAME
@@ -706,6 +706,12 @@ and
.Dq Li rtscts
(RTS/CTS).
Technique names are case insensitive.
+.It Cm pureg
+When operating as an access point in 802.11g mode allow only
+11g-capable stations to associate (11b-only stations are not
+permitted to associate).
+To allow both 11g and 11b-only stations to associate, use
+.Fl pureg .
.It Cm roaming Ar mode
When operating as a station, control how the system will
behave when communication with the current access point
diff --git a/sbin/ifconfig/ifieee80211.c b/sbin/ifconfig/ifieee80211.c
index b85753f4ab13..d8c4db44827f 100644
--- a/sbin/ifconfig/ifieee80211.c
+++ b/sbin/ifconfig/ifieee80211.c
@@ -618,6 +618,12 @@ DECL_CMD_FUNC(set80211maccmd, val, d)
set80211(s, IEEE80211_IOC_MACCMD, d, 0, NULL);
}
+static void
+set80211pureg(const char *val, int d, int s, const struct afswtch *rafp)
+{
+ set80211(s, IEEE80211_IOC_PUREG, d, 0, NULL);
+}
+
static int
getmaxrate(uint8_t rates[15], uint8_t nrates)
{
@@ -1504,6 +1510,13 @@ ieee80211_status(int s)
}
if (IEEE80211_IS_CHAN_G(c) || IEEE80211_IS_CHAN_PUREG(c) || verbose) {
+ ireq.i_type = IEEE80211_IOC_PUREG;
+ if (ioctl(s, SIOCG80211, &ireq) != -1) {
+ if (ireq.i_val)
+ LINE_CHECK("%cpureg", spacer);
+ else if (verbose)
+ LINE_CHECK("%c-pureg", spacer);
+ }
ireq.i_type = IEEE80211_IOC_PROTMODE;
if (ioctl(s, SIOCG80211, &ireq) != -1) {
switch (ireq.i_val) {
@@ -1790,6 +1803,8 @@ static struct cmd ieee80211_cmds[] = {
#if 0
DEF_CMD_ARG("mac:kick", set80211kickmac),
#endif
+ DEF_CMD("pureg", 1, set80211pureg),
+ DEF_CMD("-pureg", 0, set80211pureg),
};
static struct afswtch af_ieee80211 = {
.af_name = "af_ieee80211",