-
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.
mac80211: add bugfix for ath11k fw crash
Fixes: WIFI-14201 Signed-off-by: John Crispin <[email protected]>
- Loading branch information
Showing
1 changed file
with
37 additions
and
0 deletions.
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
feeds/ipq807x_v5.4/mac80211/patches/pending/400-ath11k-crash-fix.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,37 @@ | ||
--- a/drivers/net/wireless/ath/ath11k/peer.c | ||
+++ b/drivers/net/wireless/ath/ath11k/peer.c | ||
@@ -799,6 +799,12 @@ int ath11k_peer_delete(struct ath11k *ar | ||
spin_lock_bh(&ar->ab->base_lock); | ||
|
||
peer = ath11k_peer_find_by_addr(ar->ab, addr); | ||
+ if (peer && peer-> pdev_idx == ar-> pdev_idx) | ||
+ ath11k_peer_rhash_delete(ar->ab, peer); | ||
+ | ||
+ if (!peer) | ||
+ peer = ath11k_peer_find(ar->ab, vdev_id, addr); | ||
+ | ||
if (peer) { | ||
#ifdef CPTCFG_ATH11K_NSS_SUPPORT | ||
peer->delete_in_progress = true; | ||
@@ -867,13 +873,19 @@ int ath11k_peer_create(struct ath11k *ar | ||
return -ENOBUFS; | ||
} | ||
|
||
+ mutex_lock(&ar->ab->tbl_mtx_lock); | ||
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); | ||
+ mutex_unlock(&ar->ab->tbl_mtx_lock); | ||
+ return -EINVAL; | ||
+ } | ||
+ ath11k_peer_rhash_delete(ar->ab, peer); | ||
} | ||
spin_unlock_bh(&ar->ab->base_lock); | ||
+ mutex_unlock(&ar->ab->tbl_mtx_lock); | ||
|
||
ret = ath11k_wmi_send_peer_create_cmd(ar, param); | ||
if (ret) { |