Skip to content

Commit

Permalink
ath11k: delete before add peer
Browse files Browse the repository at this point in the history
Signed-off-by: Arif Alam <[email protected]>
  • Loading branch information
ArifAlam committed Feb 3, 2025
1 parent 09a41b8 commit 3dfa3ae
Showing 1 changed file with 29 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
--- a/drivers/net/wireless/ath/ath11k/peer.c
+++ b/drivers/net/wireless/ath/ath11k/peer.c
@@ -877,6 +877,7 @@ int ath11k_peer_create(struct ath11k *ar
struct ieee80211_vif *vif = arvif->vif;
struct ath11k_sta *arsta;
int ret, fbret;
+ bool wmi_delete_peer = false;

lockdep_assert_held(&ar->conf_mutex);

@@ -896,12 +897,17 @@ int ath11k_peer_create(struct ath11k *ar
}

peer = ath11k_peer_find_by_addr(ar->ab, param->peer_addr);
- if (peer)
+ if (peer) {
ath11k_peer_rhash_delete(ar->ab, peer);
+ wmi_delete_peer = true;
+ }

spin_unlock_bh(&ar->ab->base_lock);
mutex_unlock(&ar->ab->tbl_mtx_lock);

+ if (wmi_delete_peer)
+ ath11k_wmi_send_peer_delete_cmd(ar, param->peer_addr, param->vdev_id);
+
ret = ath11k_wmi_send_peer_create_cmd(ar, param);
if (ret) {
ath11k_warn(ar->ab,

0 comments on commit 3dfa3ae

Please sign in to comment.