PERFORCE change 66518 for review
Sam Leffler
sam at FreeBSD.org
Sun Dec 5 22:18:55 PST 2004
http://perforce.freebsd.org/chv.cgi?CH=66518
Change 66518 by sam at sam_ebb on 2004/12/06 06:18:40
filling+hookup mac acl stuff
Affected files ...
.. //depot/projects/wifi/sys/net80211/ieee80211_ioctl.c#26 edit
.. //depot/projects/wifi/sys/net80211/ieee80211_ioctl.h#16 edit
Differences ...
==== //depot/projects/wifi/sys/net80211/ieee80211_ioctl.c#26 (text+ko) ====
@@ -1682,6 +1682,31 @@
}
static int
+ieee80211_ioctl_macmac(struct ieee80211com *ic, struct ieee80211req *ireq)
+{
+ u_int8_t mac[IEEE80211_ADDR_LEN];
+ const struct ieee80211_aclator *acl = ic->ic_acl;
+ int error;
+
+ if (ireq->i_len != sizeof(mac))
+ return EINVAL;
+ error = copyin(ireq->i_data, mac, ireq->i_len);
+ if (error)
+ return error;
+ if (acl == NULL) {
+ acl = ieee80211_aclator_get("mac");
+ if (acl == NULL || !acl->iac_attach(ic))
+ return EINVAL;
+ ic->ic_acl = acl;
+ }
+ if (ireq->i_type == IEEE80211_IOC_ADDMAC)
+ acl->iac_add(ic, mac);
+ else
+ acl->iac_remove(ic, mac);
+ return 0;
+}
+
+static int
ieee80211_ioctl_maccmd(struct ieee80211com *ic, struct ieee80211req *ireq)
{
const struct ieee80211_aclator *acl = ic->ic_acl;
@@ -2241,6 +2266,10 @@
if (error == 0) /* XXX background scan */
error = ieee80211_new_state(ic, IEEE80211_S_SCAN, -1);
break;
+ case IEEE80211_IOC_ADDMAC:
+ case IEEE80211_IOC_DELMAC:
+ error = ieee80211_ioctl_macmac(ic, ireq);
+ break;
case IEEE80211_IOC_MACCMD:
error = ieee80211_ioctl_maccmd(ic, ireq);
break;
==== //depot/projects/wifi/sys/net80211/ieee80211_ioctl.h#16 (text+ko) ====
@@ -421,6 +421,8 @@
#define IEEE80211_IOC_WME_ACKPOLICY 51 /* WME: ACK policy (!bss only)*/
#define IEEE80211_IOC_DTIM_PERIOD 52 /* DTIM period (beacons) */
#define IEEE80211_IOC_BEACON_INTERVAL 53 /* beacon interval (ms) */
+#define IEEE80211_IOC_ADDMAC 54 /* add sta to MAC ACL table */
+#define IEEE80211_IOC_DELMAC 55 /* del sta from MAC ACL table */
/*
* Scan result data returned for IEEE80211_IOC_SCAN_RESULTS.
More information about the p4-projects
mailing list