• Home
  • Raw
  • Download

Lines Matching refs:ab

10 struct ath11k_peer *ath11k_peer_find(struct ath11k_base *ab, int vdev_id,  in ath11k_peer_find()  argument
15 lockdep_assert_held(&ab->base_lock); in ath11k_peer_find()
17 list_for_each_entry(peer, &ab->peers, list) { in ath11k_peer_find()
29 static struct ath11k_peer *ath11k_peer_find_by_pdev_idx(struct ath11k_base *ab, in ath11k_peer_find_by_pdev_idx() argument
34 lockdep_assert_held(&ab->base_lock); in ath11k_peer_find_by_pdev_idx()
36 list_for_each_entry(peer, &ab->peers, list) { in ath11k_peer_find_by_pdev_idx()
48 struct ath11k_peer *ath11k_peer_find_by_addr(struct ath11k_base *ab, in ath11k_peer_find_by_addr() argument
53 lockdep_assert_held(&ab->base_lock); in ath11k_peer_find_by_addr()
55 list_for_each_entry(peer, &ab->peers, list) { in ath11k_peer_find_by_addr()
65 struct ath11k_peer *ath11k_peer_find_by_id(struct ath11k_base *ab, in ath11k_peer_find_by_id() argument
70 lockdep_assert_held(&ab->base_lock); in ath11k_peer_find_by_id()
72 list_for_each_entry(peer, &ab->peers, list) in ath11k_peer_find_by_id()
79 struct ath11k_peer *ath11k_peer_find_by_vdev_id(struct ath11k_base *ab, in ath11k_peer_find_by_vdev_id() argument
84 spin_lock_bh(&ab->base_lock); in ath11k_peer_find_by_vdev_id()
86 list_for_each_entry(peer, &ab->peers, list) { in ath11k_peer_find_by_vdev_id()
88 spin_unlock_bh(&ab->base_lock); in ath11k_peer_find_by_vdev_id()
92 spin_unlock_bh(&ab->base_lock); in ath11k_peer_find_by_vdev_id()
96 void ath11k_peer_unmap_event(struct ath11k_base *ab, u16 peer_id) in ath11k_peer_unmap_event() argument
100 spin_lock_bh(&ab->base_lock); in ath11k_peer_unmap_event()
102 peer = ath11k_peer_find_by_id(ab, peer_id); in ath11k_peer_unmap_event()
104 ath11k_warn(ab, "peer-unmap-event: unknown peer id %d\n", in ath11k_peer_unmap_event()
109 ath11k_dbg(ab, ATH11K_DBG_DP_HTT, "htt peer unmap vdev %d peer %pM id %d\n", in ath11k_peer_unmap_event()
114 wake_up(&ab->peer_mapping_wq); in ath11k_peer_unmap_event()
117 spin_unlock_bh(&ab->base_lock); in ath11k_peer_unmap_event()
120 void ath11k_peer_map_event(struct ath11k_base *ab, u8 vdev_id, u16 peer_id, in ath11k_peer_map_event() argument
125 spin_lock_bh(&ab->base_lock); in ath11k_peer_map_event()
126 peer = ath11k_peer_find(ab, vdev_id, mac_addr); in ath11k_peer_map_event()
136 list_add(&peer->list, &ab->peers); in ath11k_peer_map_event()
137 wake_up(&ab->peer_mapping_wq); in ath11k_peer_map_event()
140 ath11k_dbg(ab, ATH11K_DBG_DP_HTT, "htt peer map vdev %d peer %pM id %d\n", in ath11k_peer_map_event()
144 spin_unlock_bh(&ab->base_lock); in ath11k_peer_map_event()
147 static int ath11k_wait_for_peer_common(struct ath11k_base *ab, int vdev_id, in ath11k_wait_for_peer_common() argument
152 ret = wait_event_timeout(ab->peer_mapping_wq, ({ in ath11k_wait_for_peer_common()
155 spin_lock_bh(&ab->base_lock); in ath11k_wait_for_peer_common()
156 mapped = !!ath11k_peer_find(ab, vdev_id, addr); in ath11k_wait_for_peer_common()
157 spin_unlock_bh(&ab->base_lock); in ath11k_wait_for_peer_common()
160 test_bit(ATH11K_FLAG_CRASH_FLUSH, &ab->dev_flags)); in ath11k_wait_for_peer_common()
172 struct ath11k_base *ab = ar->ab; in ath11k_peer_cleanup() local
176 spin_lock_bh(&ab->base_lock); in ath11k_peer_cleanup()
177 list_for_each_entry_safe(peer, tmp, &ab->peers, list) { in ath11k_peer_cleanup()
181 ath11k_warn(ab, "removing stale peer %pM from vdev_id %d\n", in ath11k_peer_cleanup()
189 spin_unlock_bh(&ab->base_lock); in ath11k_peer_cleanup()
194 return ath11k_wait_for_peer_common(ar->ab, vdev_id, addr, false); in ath11k_wait_for_peer_deleted()
205 ath11k_warn(ar->ab, "failed wait for peer deleted"); in ath11k_wait_for_peer_delete_done()
212 ath11k_warn(ar->ab, "Timeout in receiving peer delete response\n"); in ath11k_wait_for_peer_delete_done()
229 ath11k_warn(ar->ab, in ath11k_peer_delete()
246 return ath11k_wait_for_peer_common(ar->ab, vdev_id, addr, true); in ath11k_wait_for_peer_created()
258 ath11k_warn(ar->ab, in ath11k_peer_create()
263 spin_lock_bh(&ar->ab->base_lock); in ath11k_peer_create()
264 peer = ath11k_peer_find_by_pdev_idx(ar->ab, ar->pdev_idx, param->peer_addr); in ath11k_peer_create()
266 spin_unlock_bh(&ar->ab->base_lock); in ath11k_peer_create()
269 spin_unlock_bh(&ar->ab->base_lock); in ath11k_peer_create()
273 ath11k_warn(ar->ab, in ath11k_peer_create()
284 spin_lock_bh(&ar->ab->base_lock); in ath11k_peer_create()
286 peer = ath11k_peer_find(ar->ab, param->vdev_id, param->peer_addr); in ath11k_peer_create()
288 spin_unlock_bh(&ar->ab->base_lock); in ath11k_peer_create()
289 ath11k_warn(ar->ab, "failed to find peer %pM on vdev %i after creation\n", in ath11k_peer_create()
297 ath11k_warn(ar->ab, "failed to delete peer vdev_id %d addr %pM\n", in ath11k_peer_create()
319 spin_unlock_bh(&ar->ab->base_lock); in ath11k_peer_create()