diff options
author | Carl Huang <cjhuang@codeaurora.org> | 2020-12-11 08:13:58 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2020-12-17 09:47:06 +0300 |
commit | aa44b2f3ecd41f90b7e477158036648a49d21a32 (patch) | |
tree | c21de8cc156a53aceec4204240a60313b32e4a45 /drivers/net/wireless/ath/ath11k/peer.c | |
parent | 3597010630d0aa96f5778901e691c6068bb86318 (diff) | |
download | linux-aa44b2f3ecd41f90b7e477158036648a49d21a32.tar.xz |
ath11k: start vdev if a bss peer is already created
For QCA6390, bss peer must be created before vdev is to start. This
change is to start vdev if a bss peer is created. Otherwise, ath11k
delays to start vdev.
This fixes an issue in a case where HT/VHT/HE settings change between
authentication and association, e.g., due to the user space request
to disable HT.
Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1
Signed-off-by: Carl Huang <cjhuang@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20201211051358.9191-1-cjhuang@codeaurora.org
Diffstat (limited to 'drivers/net/wireless/ath/ath11k/peer.c')
-rw-r--r-- | drivers/net/wireless/ath/ath11k/peer.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath11k/peer.c b/drivers/net/wireless/ath/ath11k/peer.c index 1866d82678fa..b69e7ebfa930 100644 --- a/drivers/net/wireless/ath/ath11k/peer.c +++ b/drivers/net/wireless/ath/ath11k/peer.c @@ -76,6 +76,23 @@ struct ath11k_peer *ath11k_peer_find_by_id(struct ath11k_base *ab, return NULL; } +struct ath11k_peer *ath11k_peer_find_by_vdev_id(struct ath11k_base *ab, + int vdev_id) +{ + struct ath11k_peer *peer; + + spin_lock_bh(&ab->base_lock); + + list_for_each_entry(peer, &ab->peers, list) { + if (vdev_id == peer->vdev_id) { + spin_unlock_bh(&ab->base_lock); + return peer; + } + } + spin_unlock_bh(&ab->base_lock); + return NULL; +} + void ath11k_peer_unmap_event(struct ath11k_base *ab, u16 peer_id) { struct ath11k_peer *peer; |