Home | History | Annotate | Download | only in net80211

Lines Matching defs:as

17  * GNU General Public License ("GPL") version 2 as published by the Free
20 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
99 struct aclstate *as;
101 as = malloc(sizeof(struct aclstate),
103 ACL_LOCK_INIT(as, "acl");
104 TAILQ_INIT(&as->as_list);
105 as->as_policy = ACL_POLICY_OPEN;
106 as->as_ic = ic;
107 ic->ic_as = as;
114 struct aclstate *as = ic->ic_as;
118 ACL_LOCK_DESTROY(as);
119 free(as, M_DEVBUF);
123 _find_acl(struct aclstate *as, const u_int8_t *macaddr)
129 LIST_FOREACH(acl, &as->as_hash[hash], acl_hash) {
137 _acl_free(struct aclstate *as, struct acl *acl)
139 ACL_LOCK_ASSERT(as);
141 TAILQ_REMOVE(&as->as_list, acl, acl_list);
144 as->as_nacls--;
150 struct aclstate *as = ic->ic_as;
152 switch (as->as_policy) {
156 return _find_acl(as, mac) != NULL;
158 return _find_acl(as, mac) == NULL;
166 struct aclstate *as = ic->ic_as;
172 ACL_LOCK(as);
174 LIST_FOREACH(acl, &as->as_hash[hash], acl_hash) {
176 ACL_UNLOCK(as);
185 TAILQ_INSERT_TAIL(&as->as_list, new, acl_list);
186 LIST_INSERT_HEAD(&as->as_hash[hash], new, acl_hash);
187 as->as_nacls++;
188 ACL_UNLOCK(as);
198 struct aclstate *as = ic->ic_as;
201 ACL_LOCK(as);
202 acl = _find_acl(as, mac);
204 _acl_free(as, acl);
205 ACL_UNLOCK(as);
217 struct aclstate *as = ic->ic_as;
222 ACL_LOCK(as);
223 while ((acl = TAILQ_FIRST(&as->as_list)) != NULL)
224 _acl_free(as, acl);
225 ACL_UNLOCK(as);
233 struct aclstate *as = ic->ic_as;
240 as->as_policy = ACL_POLICY_OPEN;
243 as->as_policy = ACL_POLICY_ALLOW;
246 as->as_policy = ACL_POLICY_DENY;
257 struct aclstate *as = ic->ic_as;
259 return as->as_policy;
273 struct aclstate *as = ic->ic_as;
281 ireq->i_val = as->as_policy;
284 space = as->as_nacls * IEEE80211_ADDR_LEN;
291 ACL_LOCK(as);
292 TAILQ_FOREACH(acl, &as->as_list, acl_list) {
296 ACL_UNLOCK(as);