lkml.org 
[lkml]   [2022]   [Apr]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH] ath10k: skip ath10k_halt during suspend for driver state RESTARTING
On Mon, Apr 25, 2022 at 02:15:20AM +0000, Abhishek Kumar wrote:
> --- a/drivers/net/wireless/ath/ath10k/mac.c
> +++ b/drivers/net/wireless/ath/ath10k/mac.c
> @@ -5345,8 +5345,22 @@ static void ath10k_stop(struct ieee80211_hw *hw)
>
> mutex_lock(&ar->conf_mutex);
> if (ar->state != ATH10K_STATE_OFF) {
> - if (!ar->hw_rfkill_on)
> - ath10k_halt(ar);
> + if (!ar->hw_rfkill_on) {
> + /* If the current driver state is RESTARTING but not yet
> + * fully RESTARTED because of incoming suspend event,
> + * then ath11k_halt is already called via

s/ath11k/ath10k/

I know ath11k is the hot new thing, but this is ath10k ;)

> + * ath10k_core_restart and should not be called here.

s/ath10k/ath11k/

> + */
> + if (ar->state != ATH10K_STATE_RESTARTING)
> + ath10k_halt(ar);
> + else
> + /* Suspending here, because when in RESTARTING
> + * state, ath11k_core_stop skips

s/ath10k/ath11k/

> + * ath10k_wait_for_suspend.
> + */
> + ath10k_wait_for_suspend(ar,
> + WMI_PDEV_SUSPEND_AND_DISABLE_INTR);
> + }
> ar->state = ATH10K_STATE_OFF;
> }
> mutex_unlock(&ar->conf_mutex);

Otherwise, I believe this is the right solution to the problem pointed
out in the commit message:
Reviewed-by: Brian Norris <briannorris@chromium.org>

\
 
 \ /
  Last update: 2022-04-26 01:13    [W:0.068 / U:0.492 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site