Lines Matching refs:list
7 void qtnf_sta_list_init(struct qtnf_sta_list *list) in qtnf_sta_list_init() argument
9 if (unlikely(!list)) in qtnf_sta_list_init()
12 INIT_LIST_HEAD(&list->head); in qtnf_sta_list_init()
13 atomic_set(&list->size, 0); in qtnf_sta_list_init()
16 struct qtnf_sta_node *qtnf_sta_list_lookup(struct qtnf_sta_list *list, in qtnf_sta_list_lookup() argument
24 list_for_each_entry(node, &list->head, list) { in qtnf_sta_list_lookup()
32 struct qtnf_sta_node *qtnf_sta_list_lookup_index(struct qtnf_sta_list *list, in qtnf_sta_list_lookup_index() argument
37 if (qtnf_sta_list_size(list) <= index) in qtnf_sta_list_lookup_index()
40 list_for_each_entry(node, &list->head, list) { in qtnf_sta_list_lookup_index()
51 struct qtnf_sta_list *list = &vif->sta_list; in qtnf_sta_list_add() local
57 node = qtnf_sta_list_lookup(list, mac); in qtnf_sta_list_add()
67 list_add_tail(&node->list, &list->head); in qtnf_sta_list_add()
68 atomic_inc(&list->size); in qtnf_sta_list_add()
77 struct qtnf_sta_list *list = &vif->sta_list; in qtnf_sta_list_del() local
81 node = qtnf_sta_list_lookup(list, mac); in qtnf_sta_list_del()
84 list_del(&node->list); in qtnf_sta_list_del()
85 atomic_dec(&list->size); in qtnf_sta_list_del()
94 void qtnf_sta_list_free(struct qtnf_sta_list *list) in qtnf_sta_list_free() argument
98 atomic_set(&list->size, 0); in qtnf_sta_list_free()
100 list_for_each_entry_safe(node, tmp, &list->head, list) { in qtnf_sta_list_free()
101 list_del(&node->list); in qtnf_sta_list_free()
105 INIT_LIST_HEAD(&list->head); in qtnf_sta_list_free()