Lines Matching refs:peer
153 struct ath10k_peer *peer; in ath10k_peer_find() local
157 list_for_each_entry(peer, &ar->peers, list) { in ath10k_peer_find()
158 if (peer->vdev_id != vdev_id) in ath10k_peer_find()
160 if (!ether_addr_equal(peer->addr, addr)) in ath10k_peer_find()
163 return peer; in ath10k_peer_find()
171 struct ath10k_peer *peer; in ath10k_peer_find_by_id() local
173 if (peer_id >= BITS_PER_TYPE(peer->peer_ids)) in ath10k_peer_find_by_id()
178 list_for_each_entry(peer, &ar->peers, list) in ath10k_peer_find_by_id()
179 if (test_bit(peer_id, peer->peer_ids)) in ath10k_peer_find_by_id()
180 return peer; in ath10k_peer_find_by_id()
221 struct ath10k_peer *peer; in ath10k_peer_map_event() local
231 peer = ath10k_peer_find(ar, ev->vdev_id, ev->addr); in ath10k_peer_map_event()
232 if (!peer) { in ath10k_peer_map_event()
233 peer = kzalloc(sizeof(*peer), GFP_ATOMIC); in ath10k_peer_map_event()
234 if (!peer) in ath10k_peer_map_event()
237 peer->vdev_id = ev->vdev_id; in ath10k_peer_map_event()
238 ether_addr_copy(peer->addr, ev->addr); in ath10k_peer_map_event()
239 list_add(&peer->list, &ar->peers); in ath10k_peer_map_event()
246 WARN_ON(ar->peer_map[ev->peer_id] && (ar->peer_map[ev->peer_id] != peer)); in ath10k_peer_map_event()
247 ar->peer_map[ev->peer_id] = peer; in ath10k_peer_map_event()
248 set_bit(ev->peer_id, peer->peer_ids); in ath10k_peer_map_event()
257 struct ath10k_peer *peer; in ath10k_peer_unmap_event() local
267 peer = ath10k_peer_find_by_id(ar, ev->peer_id); in ath10k_peer_unmap_event()
268 if (!peer) { in ath10k_peer_unmap_event()
275 peer->vdev_id, peer->addr, ev->peer_id); in ath10k_peer_unmap_event()
278 clear_bit(ev->peer_id, peer->peer_ids); in ath10k_peer_unmap_event()
280 if (bitmap_empty(peer->peer_ids, ATH10K_MAX_NUM_PEER_IDS)) { in ath10k_peer_unmap_event()
281 list_del(&peer->list); in ath10k_peer_unmap_event()
282 kfree(peer); in ath10k_peer_unmap_event()