Adding a peer that already exists on the same pdev, even if it belongs to a different vdev, appears to trigger a firmware crash. Some devices authenticate with multiple BSSs simultaneously to gather more information about their wireless environment. When multiple BSSs are hosted on the same PHY, the same station may be added as a peer multiple times for the same pdev, which causes the ath11k firmware to crash. Prevent the same peer from being added more than once per pdev to avoid this issue. Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.9.0.1-01977-QCAHKSWPL_SILICONZ-1 Signed-off-by: Remi Pommarel --- drivers/net/wireless/ath/ath11k/peer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath11k/peer.c b/drivers/net/wireless/ath/ath11k/peer.c index b30a90698544..b7277e4b188b 100644 --- a/drivers/net/wireless/ath/ath11k/peer.c +++ b/drivers/net/wireless/ath/ath11k/peer.c @@ -386,7 +386,7 @@ int ath11k_peer_create(struct ath11k *ar, struct ath11k_vif *arvif, spin_lock_bh(&ar->ab->base_lock); peer = ath11k_peer_find_by_addr(ar->ab, param->peer_addr); if (peer) { - if (peer->vdev_id == param->vdev_id) { + if (peer->pdev_idx == ar->pdev_idx) { spin_unlock_bh(&ar->ab->base_lock); mutex_unlock(&ar->ab->tbl_mtx_lock); return -EINVAL; -- 2.52.0