-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ath11k: fix STA roaming between radios
Signed-off-by: Arif Alam <[email protected]>
- Loading branch information
Showing
1 changed file
with
46 additions
and
0 deletions.
There are no files selected for viewing
46 changes: 46 additions & 0 deletions
46
feeds/ipq807x_v5.4/mac80211/patches/pending/1000-fix-roaming-between-phys.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
--- a/drivers/net/wireless/ath/ath11k/peer.c | ||
+++ b/drivers/net/wireless/ath/ath11k/peer.c | ||
@@ -93,6 +93,25 @@ struct ath11k_peer *ath11k_peer_find_by_ | ||
return NULL; | ||
} | ||
|
||
+struct ath11k_peer *ath11k_peer_find_by_pdev_idx(struct ath11k_base *ab, | ||
+ u8 pdev_idx, const u8 *addr) | ||
+{ | ||
+ struct ath11k_peer *peer; | ||
+ | ||
+ lockdep_assert_held(&ab->base_lock); | ||
+ | ||
+ list_for_each_entry(peer, &ab->peers, list) { | ||
+ if (peer->pdev_idx != pdev_idx) | ||
+ continue; | ||
+ if (!ether_addr_equal(peer->addr, addr)) | ||
+ continue; | ||
+ | ||
+ return peer; | ||
+ } | ||
+ | ||
+ return NULL; | ||
+} | ||
+ | ||
struct ath11k_peer *ath11k_peer_find_by_ast(struct ath11k_base *ab, | ||
int ast_hash) | ||
{ | ||
@@ -868,11 +887,16 @@ 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); | ||
+ peer = ath11k_peer_find_by_pdev_idx(ar->ab, ar->pdev_idx, param->peer_addr); | ||
if (peer) { | ||
spin_unlock_bh(&ar->ab->base_lock); | ||
return -EINVAL; | ||
} | ||
+ | ||
+ peer = ath11k_peer_find_by_addr(ar->ab, param->peer_addr); | ||
+ if (peer) | ||
+ ath11k_peer_rhash_delete(ar->ab, peer); | ||
+ | ||
spin_unlock_bh(&ar->ab->base_lock); | ||
|
||
ret = ath11k_wmi_send_peer_create_cmd(ar, param); |