• 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()
137 list_add(&peer->list, &ab->peers); in ath11k_peer_map_event()
138 wake_up(&ab->peer_mapping_wq); in ath11k_peer_map_event()
141 ath11k_dbg(ab, ATH11K_DBG_DP_HTT, "htt peer map vdev %d peer %pM id %d\n", in ath11k_peer_map_event()
145 spin_unlock_bh(&ab->base_lock); in ath11k_peer_map_event()
148 static int ath11k_wait_for_peer_common(struct ath11k_base *ab, int vdev_id, in ath11k_wait_for_peer_common() argument
153 ret = wait_event_timeout(ab->peer_mapping_wq, ({ in ath11k_wait_for_peer_common()
156 spin_lock_bh(&ab->base_lock); in ath11k_wait_for_peer_common()
157 mapped = !!ath11k_peer_find(ab, vdev_id, addr); in ath11k_wait_for_peer_common()
158 spin_unlock_bh(&ab->base_lock); in ath11k_wait_for_peer_common()
161 test_bit(ATH11K_FLAG_CRASH_FLUSH, &ab->dev_flags)); in ath11k_wait_for_peer_common()
173 struct ath11k_base *ab = ar->ab; in ath11k_peer_cleanup() local
177 spin_lock_bh(&ab->base_lock); in ath11k_peer_cleanup()
178 list_for_each_entry_safe(peer, tmp, &ab->peers, list) { in ath11k_peer_cleanup()
182 ath11k_warn(ab, "removing stale peer %pM from vdev_id %d\n", in ath11k_peer_cleanup()
190 spin_unlock_bh(&ab->base_lock); in ath11k_peer_cleanup()
195 return ath11k_wait_for_peer_common(ar->ab, vdev_id, addr, false); in ath11k_wait_for_peer_deleted()
206 ath11k_warn(ar->ab, "failed wait for peer deleted"); in ath11k_wait_for_peer_delete_done()
213 ath11k_warn(ar->ab, "Timeout in receiving peer delete response\n"); in ath11k_wait_for_peer_delete_done()
230 ath11k_warn(ar->ab, in ath11k_peer_delete()
247 return ath11k_wait_for_peer_common(ar->ab, vdev_id, addr, true); in ath11k_wait_for_peer_created()
259 ath11k_warn(ar->ab, in ath11k_peer_create()
264 spin_lock_bh(&ar->ab->base_lock); in ath11k_peer_create()
265 peer = ath11k_peer_find_by_pdev_idx(ar->ab, ar->pdev_idx, param->peer_addr); in ath11k_peer_create()
267 spin_unlock_bh(&ar->ab->base_lock); in ath11k_peer_create()
270 spin_unlock_bh(&ar->ab->base_lock); in ath11k_peer_create()
274 ath11k_warn(ar->ab, in ath11k_peer_create()
285 spin_lock_bh(&ar->ab->base_lock); in ath11k_peer_create()
287 peer = ath11k_peer_find(ar->ab, param->vdev_id, param->peer_addr); in ath11k_peer_create()
289 spin_unlock_bh(&ar->ab->base_lock); in ath11k_peer_create()
290 ath11k_warn(ar->ab, "failed to find peer %pM on vdev %i after creation\n", in ath11k_peer_create()
298 ath11k_warn(ar->ab, "failed to delete peer vdev_id %d addr %pM\n", in ath11k_peer_create()
324 spin_unlock_bh(&ar->ab->base_lock); in ath11k_peer_create()