Lines Matching refs:as

66 	 * NB: ACL_POLICY_RADIUS must be the same value as
103 struct aclstate *as;
105 as = (struct aclstate *) IEEE80211_MALLOC(sizeof(struct aclstate),
107 if (as == NULL)
109 ACL_LOCK_INIT(as, "acl");
110 TAILQ_INIT(&as->as_list);
111 as->as_policy = ACL_POLICY_OPEN;
112 as->as_vap = vap;
113 vap->iv_as = as;
121 struct aclstate *as = vap->iv_as;
128 ACL_LOCK_DESTROY(as);
129 IEEE80211_FREE(as, M_80211_ACL);
133 _find_acl(struct aclstate *as, const uint8_t *macaddr)
139 LIST_FOREACH(acl, &as->as_hash[hash], acl_hash) {
147 _acl_free(struct aclstate *as, struct acl *acl)
149 ACL_LOCK_ASSERT(as);
151 TAILQ_REMOVE(&as->as_list, acl, acl_list);
154 as->as_nacls--;
160 struct aclstate *as = vap->iv_as;
162 switch (as->as_policy) {
167 return _find_acl(as, wh->i_addr2) != NULL;
169 return _find_acl(as, wh->i_addr2) == NULL;
177 struct aclstate *as = vap->iv_as;
190 ACL_LOCK(as);
192 LIST_FOREACH(acl, &as->as_hash[hash], acl_hash) {
194 ACL_UNLOCK(as);
203 TAILQ_INSERT_TAIL(&as->as_list, new, acl_list);
204 LIST_INSERT_HEAD(&as->as_hash[hash], new, acl_hash);
205 as->as_nacls++;
206 ACL_UNLOCK(as);
216 struct aclstate *as = vap->iv_as;
219 ACL_LOCK(as);
220 acl = _find_acl(as, mac);
222 _acl_free(as, acl);
223 ACL_UNLOCK(as);
235 struct aclstate *as = vap->iv_as;
240 ACL_LOCK(as);
241 while ((acl = TAILQ_FIRST(&as->as_list)) != NULL)
242 _acl_free(as, acl);
243 ACL_UNLOCK(as);
251 struct aclstate *as = vap->iv_as;
258 as->as_policy = ACL_POLICY_OPEN;
261 as->as_policy = ACL_POLICY_ALLOW;
264 as->as_policy = ACL_POLICY_DENY;
267 as->as_policy = ACL_POLICY_RADIUS;
278 struct aclstate *as = vap->iv_as;
280 return as->as_policy;
293 struct aclstate *as = vap->iv_as;
301 ireq->i_val = as->as_policy;
304 space = as->as_nacls * IEEE80211_ADDR_LEN;
314 ACL_LOCK(as);
315 TAILQ_FOREACH(acl, &as->as_list, acl_list) {
319 ACL_UNLOCK(as);