Lines Matching refs:peer
14 struct ath12k_peer *peer; in ath12k_peer_find() local
18 list_for_each_entry(peer, &ab->peers, list) { in ath12k_peer_find()
19 if (peer->vdev_id != vdev_id) in ath12k_peer_find()
21 if (!ether_addr_equal(peer->addr, addr)) in ath12k_peer_find()
24 return peer; in ath12k_peer_find()
33 struct ath12k_peer *peer; in ath12k_peer_find_by_pdev_idx() local
37 list_for_each_entry(peer, &ab->peers, list) { in ath12k_peer_find_by_pdev_idx()
38 if (peer->pdev_idx != pdev_idx) in ath12k_peer_find_by_pdev_idx()
40 if (!ether_addr_equal(peer->addr, addr)) in ath12k_peer_find_by_pdev_idx()
43 return peer; in ath12k_peer_find_by_pdev_idx()
52 struct ath12k_peer *peer; in ath12k_peer_find_by_addr() local
56 list_for_each_entry(peer, &ab->peers, list) { in ath12k_peer_find_by_addr()
57 if (!ether_addr_equal(peer->addr, addr)) in ath12k_peer_find_by_addr()
60 return peer; in ath12k_peer_find_by_addr()
69 struct ath12k_peer *peer; in ath12k_peer_find_by_id() local
73 list_for_each_entry(peer, &ab->peers, list) in ath12k_peer_find_by_id()
74 if (peer_id == peer->peer_id) in ath12k_peer_find_by_id()
75 return peer; in ath12k_peer_find_by_id()
82 struct ath12k_peer *peer; in ath12k_peer_exist_by_vdev_id() local
86 list_for_each_entry(peer, &ab->peers, list) { in ath12k_peer_exist_by_vdev_id()
87 if (vdev_id == peer->vdev_id) { in ath12k_peer_exist_by_vdev_id()
99 struct ath12k_peer *peer; in ath12k_peer_find_by_ast() local
103 list_for_each_entry(peer, &ab->peers, list) in ath12k_peer_find_by_ast()
104 if (ast_hash == peer->ast_hash) in ath12k_peer_find_by_ast()
105 return peer; in ath12k_peer_find_by_ast()
112 struct ath12k_peer *peer; in ath12k_peer_unmap_event() local
116 peer = ath12k_peer_find_by_id(ab, peer_id); in ath12k_peer_unmap_event()
117 if (!peer) { in ath12k_peer_unmap_event()
124 peer->vdev_id, peer->addr, peer_id); in ath12k_peer_unmap_event()
126 list_del(&peer->list); in ath12k_peer_unmap_event()
127 kfree(peer); in ath12k_peer_unmap_event()
137 struct ath12k_peer *peer; in ath12k_peer_map_event() local
140 peer = ath12k_peer_find(ab, vdev_id, mac_addr); in ath12k_peer_map_event()
141 if (!peer) { in ath12k_peer_map_event()
142 peer = kzalloc(sizeof(*peer), GFP_ATOMIC); in ath12k_peer_map_event()
143 if (!peer) in ath12k_peer_map_event()
146 peer->vdev_id = vdev_id; in ath12k_peer_map_event()
147 peer->peer_id = peer_id; in ath12k_peer_map_event()
148 peer->ast_hash = ast_hash; in ath12k_peer_map_event()
149 peer->hw_peer_id = hw_peer_id; in ath12k_peer_map_event()
150 ether_addr_copy(peer->addr, mac_addr); in ath12k_peer_map_event()
151 list_add(&peer->list, &ab->peers); in ath12k_peer_map_event()
186 struct ath12k_peer *peer, *tmp; in ath12k_peer_cleanup() local
192 list_for_each_entry_safe(peer, tmp, &ab->peers, list) { in ath12k_peer_cleanup()
193 if (peer->vdev_id != vdev_id) in ath12k_peer_cleanup()
197 peer->addr, vdev_id); in ath12k_peer_cleanup()
199 list_del(&peer->list); in ath12k_peer_cleanup()
200 kfree(peer); in ath12k_peer_cleanup()
268 struct ath12k_peer *peer; in ath12k_peer_create() local
280 peer = ath12k_peer_find_by_pdev_idx(ar->ab, ar->pdev_idx, arg->peer_addr); in ath12k_peer_create()
281 if (peer) { in ath12k_peer_create()
302 peer = ath12k_peer_find(ar->ab, arg->vdev_id, arg->peer_addr); in ath12k_peer_create()
303 if (!peer) { in ath12k_peer_create()
326 peer->pdev_idx = ar->pdev_idx; in ath12k_peer_create()
327 peer->sta = sta; in ath12k_peer_create()
330 arvif->ast_hash = peer->ast_hash; in ath12k_peer_create()
331 arvif->ast_idx = peer->hw_peer_id; in ath12k_peer_create()
334 peer->sec_type = HAL_ENCRYPT_TYPE_OPEN; in ath12k_peer_create()
335 peer->sec_type_grp = HAL_ENCRYPT_TYPE_OPEN; in ath12k_peer_create()