Lines Matching refs:mac_restrictions

328 		switch (ap->mac_restrictions.policy) {  in ap_control_proc_show()
343 seq_printf(m, "MAC entries: %u\n", ap->mac_restrictions.entries); in ap_control_proc_show()
356 spin_lock_bh(&ap->mac_restrictions.lock); in ap_control_proc_start()
357 return seq_list_start_head(&ap->mac_restrictions.mac_list, *_pos); in ap_control_proc_start()
363 return seq_list_next(v, &ap->mac_restrictions.mac_list, _pos); in ap_control_proc_next()
369 spin_unlock_bh(&ap->mac_restrictions.lock); in ap_control_proc_stop()
379 int ap_control_add_mac(struct mac_restrictions *mac_restrictions, u8 *mac) in ap_control_add_mac() argument
389 spin_lock_bh(&mac_restrictions->lock); in ap_control_add_mac()
390 list_add_tail(&entry->list, &mac_restrictions->mac_list); in ap_control_add_mac()
391 mac_restrictions->entries++; in ap_control_add_mac()
392 spin_unlock_bh(&mac_restrictions->lock); in ap_control_add_mac()
398 int ap_control_del_mac(struct mac_restrictions *mac_restrictions, u8 *mac) in ap_control_del_mac() argument
403 spin_lock_bh(&mac_restrictions->lock); in ap_control_del_mac()
404 for (ptr = mac_restrictions->mac_list.next; in ap_control_del_mac()
405 ptr != &mac_restrictions->mac_list; ptr = ptr->next) { in ap_control_del_mac()
411 mac_restrictions->entries--; in ap_control_del_mac()
412 spin_unlock_bh(&mac_restrictions->lock); in ap_control_del_mac()
416 spin_unlock_bh(&mac_restrictions->lock); in ap_control_del_mac()
421 static int ap_control_mac_deny(struct mac_restrictions *mac_restrictions, in ap_control_mac_deny() argument
427 if (mac_restrictions->policy == MAC_POLICY_OPEN) in ap_control_mac_deny()
430 spin_lock_bh(&mac_restrictions->lock); in ap_control_mac_deny()
431 list_for_each_entry(entry, &mac_restrictions->mac_list, list) { in ap_control_mac_deny()
437 spin_unlock_bh(&mac_restrictions->lock); in ap_control_mac_deny()
439 if (mac_restrictions->policy == MAC_POLICY_ALLOW) in ap_control_mac_deny()
446 void ap_control_flush_macs(struct mac_restrictions *mac_restrictions) in ap_control_flush_macs() argument
451 if (mac_restrictions->entries == 0) in ap_control_flush_macs()
454 spin_lock_bh(&mac_restrictions->lock); in ap_control_flush_macs()
455 for (ptr = mac_restrictions->mac_list.next, n = ptr->next; in ap_control_flush_macs()
456 ptr != &mac_restrictions->mac_list; in ap_control_flush_macs()
462 mac_restrictions->entries = 0; in ap_control_flush_macs()
463 spin_unlock_bh(&mac_restrictions->lock); in ap_control_flush_macs()
834 spin_lock_init(&ap->mac_restrictions.lock); in hostap_init_data()
835 INIT_LIST_HEAD(&ap->mac_restrictions.mac_list); in hostap_init_data()
901 ap_control_flush_macs(&ap->mac_restrictions); in hostap_free_data()
1333 ap_control_mac_deny(&ap->mac_restrictions, hdr->addr2)) { in handle_authen()