Message ID | 20230905105229.10090-1-quic_wgong@quicinc.com (mailing list archive) |
---|---|
State | Accepted |
Commit | ecbb987b0a96b89aef669d3422f1ca09000424dc |
Delegated to: | Kalle Valo |
Headers | show |
Series | wifi: ath12k: fix recovery fail while firmware crash when doing channel switch | expand |
On 9/5/2023 3:52 AM, Wen Gong wrote: > When firmware crashed while channel switch running, recovery starts in > ath12k. Then ieee80211_sta_connection_lost() will be called by function > ieee80211_restart_work() in mac80211. And then many WMI command timeout > because firmware is crashed. Each WMI command cost 3 seconds, then the > total time will be large and leads recovery fail. > > Hence change to set value ATH12K_FLAG_CRASH_FLUSH early and then > ath12k_wmi_cmd_send() will not wait 3 seconds, then recovery will be > started quickly and success. > > Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4 > > Signed-off-by: Wen Gong <quic_wgong@quicinc.com> Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com> > --- > drivers/net/wireless/ath/ath12k/core.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/net/wireless/ath/ath12k/core.c b/drivers/net/wireless/ath/ath12k/core.c > index 3df8059d5512..56be7298ac86 100644 > --- a/drivers/net/wireless/ath/ath12k/core.c > +++ b/drivers/net/wireless/ath/ath12k/core.c > @@ -685,6 +685,9 @@ static void ath12k_core_pre_reconfigure_recovery(struct ath12k_base *ab) > ab->stats.fw_crash_counter++; > spin_unlock_bh(&ab->base_lock); > > + if (ab->is_reset) > + set_bit(ATH12K_FLAG_CRASH_FLUSH, &ab->dev_flags); > + > for (i = 0; i < ab->num_radios; i++) { > pdev = &ab->pdevs[i]; > ar = pdev->ar; > > base-commit: 3f257461ab0ab19806bae2bfde4c3cd88dbf050e
Wen Gong <quic_wgong@quicinc.com> wrote: > When firmware crashed while channel switch running, recovery starts in > ath12k. Then ieee80211_sta_connection_lost() will be called by function > ieee80211_restart_work() in mac80211. And then many WMI command timeout > because firmware is crashed. Each WMI command cost 3 seconds, then the > total time will be large and leads recovery fail. > > Hence change to set value ATH12K_FLAG_CRASH_FLUSH early and then > ath12k_wmi_cmd_send() will not wait 3 seconds, then recovery will be > started quickly and success. > > Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4 > > Signed-off-by: Wen Gong <quic_wgong@quicinc.com> > Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com> > Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Patch applied to ath-next branch of ath.git, thanks. ecbb987b0a96 wifi: ath12k: fix recovery fail while firmware crash when doing channel switch
diff --git a/drivers/net/wireless/ath/ath12k/core.c b/drivers/net/wireless/ath/ath12k/core.c index 3df8059d5512..56be7298ac86 100644 --- a/drivers/net/wireless/ath/ath12k/core.c +++ b/drivers/net/wireless/ath/ath12k/core.c @@ -685,6 +685,9 @@ static void ath12k_core_pre_reconfigure_recovery(struct ath12k_base *ab) ab->stats.fw_crash_counter++; spin_unlock_bh(&ab->base_lock); + if (ab->is_reset) + set_bit(ATH12K_FLAG_CRASH_FLUSH, &ab->dev_flags); + for (i = 0; i < ab->num_radios; i++) { pdev = &ab->pdevs[i]; ar = pdev->ar;
When firmware crashed while channel switch running, recovery starts in ath12k. Then ieee80211_sta_connection_lost() will be called by function ieee80211_restart_work() in mac80211. And then many WMI command timeout because firmware is crashed. Each WMI command cost 3 seconds, then the total time will be large and leads recovery fail. Hence change to set value ATH12K_FLAG_CRASH_FLUSH early and then ath12k_wmi_cmd_send() will not wait 3 seconds, then recovery will be started quickly and success. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4 Signed-off-by: Wen Gong <quic_wgong@quicinc.com> --- drivers/net/wireless/ath/ath12k/core.c | 3 +++ 1 file changed, 3 insertions(+) base-commit: 3f257461ab0ab19806bae2bfde4c3cd88dbf050e