aboutsummaryrefslogtreecommitdiff
path: root/sys/net80211/ieee80211_ioctl.c
diff options
context:
space:
mode:
authorSam Leffler <sam@FreeBSD.org>2005-08-13 17:31:48 +0000
committerSam Leffler <sam@FreeBSD.org>2005-08-13 17:31:48 +0000
commit188757f54c844f7a1c7d8cd03afd8af160fc3ed1 (patch)
treef0d9a9b4254830aeaf4b80f482f49834bcdafc54 /sys/net80211/ieee80211_ioctl.c
parentd958d0d5dc653eb82feb9017e5fa12a1a17b2d0c (diff)
downloadsrc-188757f54c844f7a1c7d8cd03afd8af160fc3ed1.tar.gz
src-188757f54c844f7a1c7d8cd03afd8af160fc3ed1.zip
Extend acl support to pass ioctl requests through and use this to
add support for getting the current policy setting and collecting the list of mac addresses in the acl table. Submitted by: Michal Mertl (original version) MFC after: 2 weeks
Notes
Notes: svn path=/head/; revision=149028
Diffstat (limited to 'sys/net80211/ieee80211_ioctl.c')
-rw-r--r--sys/net80211/ieee80211_ioctl.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/sys/net80211/ieee80211_ioctl.c b/sys/net80211/ieee80211_ioctl.c
index e8cf5c4e4f17..9d5a28579fcf 100644
--- a/sys/net80211/ieee80211_ioctl.c
+++ b/sys/net80211/ieee80211_ioctl.c
@@ -1242,6 +1242,14 @@ ieee80211_ioctl_getwmeparam(struct ieee80211com *ic, struct ieee80211req *ireq)
return 0;
}
+static int
+ieee80211_ioctl_getmaccmd(struct ieee80211com *ic, struct ieee80211req *ireq)
+{
+ const struct ieee80211_aclator *acl = ic->ic_acl;
+
+ return (acl == NULL ? EINVAL : acl->iac_getioctl(ic, ireq));
+}
+
/*
* When building the kernel with -O2 on the i386 architecture, gcc
* seems to want to inline this function into ieee80211_ioctl()
@@ -1475,6 +1483,9 @@ ieee80211_ioctl_get80211(struct ieee80211com *ic, u_long cmd, struct ieee80211re
case IEEE80211_IOC_FRAGTHRESHOLD:
ireq->i_val = ic->ic_fragthreshold;
break;
+ case IEEE80211_IOC_MACCMD:
+ error = ieee80211_ioctl_getmaccmd(ic, ireq);
+ break;
default:
error = EINVAL;
break;
@@ -1740,7 +1751,7 @@ ieee80211_ioctl_macmac(struct ieee80211com *ic, struct ieee80211req *ireq)
}
static int
-ieee80211_ioctl_maccmd(struct ieee80211com *ic, struct ieee80211req *ireq)
+ieee80211_ioctl_setmaccmd(struct ieee80211com *ic, struct ieee80211req *ireq)
{
const struct ieee80211_aclator *acl = ic->ic_acl;
@@ -1768,7 +1779,10 @@ ieee80211_ioctl_maccmd(struct ieee80211com *ic, struct ieee80211req *ireq)
}
break;
default:
- return EINVAL;
+ if (acl == NULL)
+ return EINVAL;
+ else
+ return acl->iac_setioctl(ic, ireq);
}
return 0;
}
@@ -2302,7 +2316,7 @@ ieee80211_ioctl_set80211(struct ieee80211com *ic, u_long cmd, struct ieee80211re
error = ieee80211_ioctl_macmac(ic, ireq);
break;
case IEEE80211_IOC_MACCMD:
- error = ieee80211_ioctl_maccmd(ic, ireq);
+ error = ieee80211_ioctl_setmaccmd(ic, ireq);
break;
case IEEE80211_IOC_STA_TXPOW:
error = ieee80211_ioctl_setstatxpow(ic, ireq);