diff options
author | Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> | 2013-01-18 09:48:45 +0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-01-25 21:36:44 +0400 |
commit | 77765eaf5cfb6b8dd98ec8b54b411d74ff6095f1 (patch) | |
tree | 2b32fca883ee0c5a149290b3df3d97b21cb85549 /net/wireless/core.c | |
parent | 6d45a74b1f2e42e41c9931bfb35cdb789d0bb3ea (diff) | |
download | linux-77765eaf5cfb6b8dd98ec8b54b411d74ff6095f1.tar.xz |
cfg80211/nl80211: add API for MAC address ACLs
Add API to enable drivers to implement MAC address based
access control in AP/P2P GO mode. Capable drivers advertise
this capability by setting the maximum number of MAC
addresses in such a list in wiphy->max_acl_mac_addrs.
An initial ACL may be given to the NL80211_CMD_START_AP
command and/or changed later with NL80211_CMD_SET_MAC_ACL.
Black- and whitelists are supported, but not simultaneously.
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
[rewrite commit log, many cleanups]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/core.c')
-rw-r--r-- | net/wireless/core.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/wireless/core.c b/net/wireless/core.c index 0e702cdc6043..ce827242f390 100644 --- a/net/wireless/core.c +++ b/net/wireless/core.c @@ -478,6 +478,11 @@ int wiphy_register(struct wiphy *wiphy) ETH_ALEN))) return -EINVAL; + if (WARN_ON(wiphy->max_acl_mac_addrs && + (!(wiphy->flags & WIPHY_FLAG_HAVE_AP_SME) || + !rdev->ops->set_mac_acl))) + return -EINVAL; + if (wiphy->addresses) memcpy(wiphy->perm_addr, wiphy->addresses[0].addr, ETH_ALEN); |