mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-10-29 17:42:41 +00:00
when roaming between 2 radios the following error messages would show up in the logs [681066.503943] ath11k c000000.wifi: Failed to add peer: 38:f9:d3:bf:b2:d4 for VDEV: 1 [681066.503979] ath11k c000000.wifi: Failed to add station: 38:f9:d3:bf:b2:d4 for VDEV: 1 Signed-off-by: John Crispin <john@phrozen.org>
39 lines
1.1 KiB
Diff
39 lines
1.1 KiB
Diff
--- a/drivers/net/wireless/ath/ath11k/peer.c
|
|
+++ b/drivers/net/wireless/ath/ath11k/peer.c
|
|
@@ -819,8 +819,13 @@ int ath11k_peer_delete(struct ath11k *ar
|
|
}
|
|
}
|
|
#endif
|
|
- ath11k_peer_rhash_delete(ar->ab, peer);
|
|
+ if (peer->vdev_id == vdev_id)
|
|
+ ath11k_peer_rhash_delete(ar->ab, peer);
|
|
}
|
|
+
|
|
+ if (!peer)
|
|
+ peer = ath11k_peer_find(ar->ab, vdev_id, addr);
|
|
+
|
|
spin_unlock_bh(&ar->ab->base_lock);
|
|
mutex_unlock(&ar->ab->tbl_mtx_lock);
|
|
#ifdef CPTCFG_ATH11K_NSS_SUPPORT
|
|
@@ -870,8 +875,18 @@ int ath11k_peer_create(struct ath11k *ar
|
|
spin_lock_bh(&ar->ab->base_lock);
|
|
peer = ath11k_peer_find_by_addr(ar->ab, param->peer_addr);
|
|
if (peer) {
|
|
- spin_unlock_bh(&ar->ab->base_lock);
|
|
- return -EINVAL;
|
|
+ if (peer->vdev_id == param->vdev_id) {
|
|
+ spin_unlock_bh(&ar->ab->base_lock);
|
|
+ return -EINVAL;
|
|
+ }
|
|
+
|
|
+ /* Assume sta is transitioning to another band.
|
|
+ * Remove here the peer from rhash.
|
|
+ */
|
|
+ mutex_lock(&ar->ab->tbl_mtx_lock);
|
|
+ ath11k_peer_rhash_delete(ar->ab, peer);
|
|
+ mutex_unlock(&ar->ab->tbl_mtx_lock);
|
|
+
|
|
}
|
|
spin_unlock_bh(&ar->ab->base_lock);
|
|
|