Lines Matching full:peer

7 #include "peer.h"
13 struct ath11k_peer *peer; in ath11k_peer_find() local
17 list_for_each_entry(peer, &ab->peers, list) { in ath11k_peer_find()
18 if (peer->vdev_id != vdev_id) in ath11k_peer_find()
20 if (!ether_addr_equal(peer->addr, addr)) in ath11k_peer_find()
23 return peer; in ath11k_peer_find()
32 struct ath11k_peer *peer; in ath11k_peer_find_by_pdev_idx() local
36 list_for_each_entry(peer, &ab->peers, list) { in ath11k_peer_find_by_pdev_idx()
37 if (peer->pdev_idx != pdev_idx) in ath11k_peer_find_by_pdev_idx()
39 if (!ether_addr_equal(peer->addr, addr)) in ath11k_peer_find_by_pdev_idx()
42 return peer; in ath11k_peer_find_by_pdev_idx()
51 struct ath11k_peer *peer; in ath11k_peer_find_by_addr() local
55 list_for_each_entry(peer, &ab->peers, list) { in ath11k_peer_find_by_addr()
56 if (!ether_addr_equal(peer->addr, addr)) in ath11k_peer_find_by_addr()
59 return peer; in ath11k_peer_find_by_addr()
68 struct ath11k_peer *peer; in ath11k_peer_find_by_id() local
72 list_for_each_entry(peer, &ab->peers, list) in ath11k_peer_find_by_id()
73 if (peer_id == peer->peer_id) in ath11k_peer_find_by_id()
74 return peer; in ath11k_peer_find_by_id()
81 struct ath11k_peer *peer; in ath11k_peer_unmap_event() local
85 peer = ath11k_peer_find_by_id(ab, peer_id); in ath11k_peer_unmap_event()
86 if (!peer) { in ath11k_peer_unmap_event()
87 ath11k_warn(ab, "peer-unmap-event: unknown peer id %d\n", in ath11k_peer_unmap_event()
92 ath11k_dbg(ab, ATH11K_DBG_DP_HTT, "htt peer unmap vdev %d peer %pM id %d\n", in ath11k_peer_unmap_event()
93 peer->vdev_id, peer->addr, peer_id); in ath11k_peer_unmap_event()
95 list_del(&peer->list); in ath11k_peer_unmap_event()
96 kfree(peer); in ath11k_peer_unmap_event()
106 struct ath11k_peer *peer; in ath11k_peer_map_event() local
109 peer = ath11k_peer_find(ab, vdev_id, mac_addr); in ath11k_peer_map_event()
110 if (!peer) { in ath11k_peer_map_event()
111 peer = kzalloc(sizeof(*peer), GFP_ATOMIC); in ath11k_peer_map_event()
112 if (!peer) in ath11k_peer_map_event()
115 peer->vdev_id = vdev_id; in ath11k_peer_map_event()
116 peer->peer_id = peer_id; in ath11k_peer_map_event()
117 peer->ast_hash = ast_hash; in ath11k_peer_map_event()
118 ether_addr_copy(peer->addr, mac_addr); in ath11k_peer_map_event()
119 list_add(&peer->list, &ab->peers); in ath11k_peer_map_event()
123 ath11k_dbg(ab, ATH11K_DBG_DP_HTT, "htt peer map vdev %d peer %pM id %d\n", in ath11k_peer_map_event()
154 struct ath11k_peer *peer, *tmp; in ath11k_peer_cleanup() local
160 list_for_each_entry_safe(peer, tmp, &ab->peers, list) { in ath11k_peer_cleanup()
161 if (peer->vdev_id != vdev_id) in ath11k_peer_cleanup()
164 ath11k_warn(ab, "removing stale peer %pM from vdev_id %d\n", in ath11k_peer_cleanup()
165 peer->addr, vdev_id); in ath11k_peer_cleanup()
167 list_del(&peer->list); in ath11k_peer_cleanup()
168 kfree(peer); in ath11k_peer_cleanup()
189 "failed to delete peer vdev_id %d addr %pM ret %d\n", in ath11k_peer_delete()
211 struct ath11k_peer *peer; in ath11k_peer_create() local
218 "failed to create peer due to insufficient peer entry resource in firmware\n"); in ath11k_peer_create()
223 peer = ath11k_peer_find_by_pdev_idx(ar->ab, ar->pdev_idx, param->peer_addr); in ath11k_peer_create()
224 if (peer) { in ath11k_peer_create()
233 "failed to send peer create vdev_id %d ret %d\n", in ath11k_peer_create()
245 peer = ath11k_peer_find(ar->ab, param->vdev_id, param->peer_addr); in ath11k_peer_create()
246 if (!peer) { in ath11k_peer_create()
248 ath11k_warn(ar->ab, "failed to find peer %pM on vdev %i after creation\n", in ath11k_peer_create()
255 peer->pdev_idx = ar->pdev_idx; in ath11k_peer_create()
256 peer->sta = sta; in ath11k_peer_create()
257 arvif->ast_hash = peer->ast_hash; in ath11k_peer_create()
259 peer->sec_type = HAL_ENCRYPT_TYPE_OPEN; in ath11k_peer_create()
260 peer->sec_type_grp = HAL_ENCRYPT_TYPE_OPEN; in ath11k_peer_create()