Lines Matching defs:as

64 	 * NB: ACL_POLICY_RADIUS must be the same value as
101 struct aclstate *as;
103 as = (struct aclstate *) IEEE80211_MALLOC(sizeof(struct aclstate),
105 if (as == NULL)
107 ACL_LOCK_INIT(as, "acl");
108 TAILQ_INIT(&as->as_list);
109 as->as_policy = ACL_POLICY_OPEN;
110 as->as_vap = vap;
111 vap->iv_as = as;
119 struct aclstate *as = vap->iv_as;
126 ACL_LOCK_DESTROY(as);
127 IEEE80211_FREE(as, M_80211_ACL);
131 _find_acl(struct aclstate *as, const uint8_t *macaddr)
137 LIST_FOREACH(acl, &as->as_hash[hash], acl_hash) {
145 _acl_free(struct aclstate *as, struct acl *acl)
147 ACL_LOCK_ASSERT(as);
149 TAILQ_REMOVE(&as->as_list, acl, acl_list);
152 as->as_nacls--;
158 struct aclstate *as = vap->iv_as;
160 switch (as->as_policy) {
165 return _find_acl(as, wh->i_addr2) != NULL;
167 return _find_acl(as, wh->i_addr2) == NULL;
175 struct aclstate *as = vap->iv_as;
188 ACL_LOCK(as);
190 LIST_FOREACH(acl, &as->as_hash[hash], acl_hash) {
192 ACL_UNLOCK(as);
201 TAILQ_INSERT_TAIL(&as->as_list, new, acl_list);
202 LIST_INSERT_HEAD(&as->as_hash[hash], new, acl_hash);
203 as->as_nacls++;
204 ACL_UNLOCK(as);
214 struct aclstate *as = vap->iv_as;
217 ACL_LOCK(as);
218 acl = _find_acl(as, mac);
220 _acl_free(as, acl);
221 ACL_UNLOCK(as);
233 struct aclstate *as = vap->iv_as;
238 ACL_LOCK(as);
239 while ((acl = TAILQ_FIRST(&as->as_list)) != NULL)
240 _acl_free(as, acl);
241 ACL_UNLOCK(as);
249 struct aclstate *as = vap->iv_as;
256 as->as_policy = ACL_POLICY_OPEN;
259 as->as_policy = ACL_POLICY_ALLOW;
262 as->as_policy = ACL_POLICY_DENY;
265 as->as_policy = ACL_POLICY_RADIUS;
276 struct aclstate *as = vap->iv_as;
278 return as->as_policy;
291 struct aclstate *as = vap->iv_as;
299 ireq->i_val = as->as_policy;
302 space = as->as_nacls * IEEE80211_ADDR_LEN;
312 ACL_LOCK(as);
313 TAILQ_FOREACH(acl, &as->as_list, acl_list) {
317 ACL_UNLOCK(as);