Message ID | 1586538405-16226-1-git-send-email-mkenna@codeaurora.org (mailing list archive) |
---|---|
State | Accepted |
Commit | 6fc3b94ef5964736408cd4f8e85a816dcf1dd510 |
Delegated to: | Kalle Valo |
Headers | show |
Series | ath11k: Cleanup in pdev destroy and mac register during crash on recovery | expand |
Maharaja Kennadyrajan <mkenna@codeaurora.org> wrote: > Debugfs pdev entries should be cleaned up during the crash > on recovery. If not, mac register will fail for the reason > that it is already registered during core reconfigure. > > Signed-off-by: Maharaja Kennadyrajan <mkenna@codeaurora.org> > Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Patch applied to ath-next branch of ath.git, thanks. 6fc3b94ef596 ath11k: Cleanup in pdev destroy and mac register during crash on recovery
diff --git a/drivers/net/wireless/ath/ath11k/debug.c b/drivers/net/wireless/ath/ath11k/debug.c index 8d48517..825e7ba6 100644 --- a/drivers/net/wireless/ath/ath11k/debug.c +++ b/drivers/net/wireless/ath/ath11k/debug.c @@ -803,6 +803,9 @@ static ssize_t ath11k_debug_dump_soc_rx_stats(struct file *file, int ath11k_debug_pdev_create(struct ath11k_base *ab) { + if (test_bit(ATH11K_FLAG_REGISTERED, &ab->dev_flags)) + return 0; + ab->debugfs_soc = debugfs_create_dir(ab->hw_params.name, ab->debugfs_ath11k); if (IS_ERR_OR_NULL(ab->debugfs_soc)) { diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c index 9f8bc19..4783394 100644 --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c @@ -5891,6 +5891,9 @@ int ath11k_mac_register(struct ath11k_base *ab) int i; int ret; + if (test_bit(ATH11K_FLAG_REGISTERED, &ab->dev_flags)) + return 0; + for (i = 0; i < ab->num_radios; i++) { pdev = &ab->pdevs[i]; ar = pdev->ar;
Debugfs pdev entries should be cleaned up during the crash on recovery. If not, mac register will fail for the reason that it is already registered during core reconfigure. Signed-off-by: Maharaja Kennadyrajan <mkenna@codeaurora.org> --- drivers/net/wireless/ath/ath11k/debug.c | 3 +++ drivers/net/wireless/ath/ath11k/mac.c | 3 +++ 2 files changed, 6 insertions(+)