wifi: ath11k: Fix hardware restart failure due to twt debugfs failure
authorManikanta Pubbisetty <quic_mpubbise@quicinc.com>
Thu, 1 Sep 2022 16:21:25 +0000 (19:21 +0300)
committerKalle Valo <quic_kvalo@quicinc.com>
Fri, 2 Sep 2022 12:27:11 +0000 (15:27 +0300)
commit607c467eac7d6da6be8127b9cc1893eae3ffb7f4
treef2a1248207eefb527e95362484e9285eff171ade
parent9e2747c31e5a65e92173bc98a1b72f6a7c86d8e1
wifi: ath11k: Fix hardware restart failure due to twt debugfs failure

Currently, creation of debugfs entries for TWT is failing during
hardware restart because of the residual TWT files which were
created during add_interface(). Since, struct arvif{} is memset
to zero upon add_interface() invocation, when the hardware restart
is triggered, arvif is memset to 0 and TWT files are attempted to
create again which will fail because of the residual TWT files
already in place, this leads to hardware restart failure.

Also, it is not a good idea to return error from add_interface()
because of debugfs file creation failures. Moreover, debugfs
framework can very well handle the errors in it's create file &
remove file APIs and the errors returned by these APIs are not
checked in most usecases.

Fix the HW restart failure by ignoring the errors returned from
the debugfs APIs.

Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.1.0.1-00887-QCAMSLSWPLZ-1

Fixes: fe98a6137d03 ("ath11k: add debugfs for TWT debug calls")
Signed-off-by: Manikanta Pubbisetty <quic_mpubbise@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20220720135150.22193-3-quic_mpubbise@quicinc.com
drivers/net/wireless/ath/ath11k/debugfs.c
drivers/net/wireless/ath/ath11k/debugfs.h
drivers/net/wireless/ath/ath11k/mac.c