Message ID | 20220426221859.v2.1.I650b809482e1af8d0156ed88b5dc2677a0711d46@changeid |
---|---|
State | Superseded |
Headers | show |
Series | [v2] ath10k: skip ath10k_halt during suspend for driver state RESTARTING | expand |
On Tue, Apr 26, 2022 at 10:20 PM Abhishek Kumar <kuabhs@chromium.org> wrote: > On Tue, Apr 26, 2022 at 3:34 PM Brian Norris <briannorris@chromium.org> wrote: > > You could have retained my: > > > > Reviewed-by: Brian Norris <briannorris@chromium.org> > > > > but no worries; it's just a few characters ;) > Oh! sorry about that, I was under the impression that if the next > iteration is posted, then I cannot just add the Reviewed-by tag > provided in the previous iteration by myself. You certainly *can* add it, but it's a judgment call on whether you should. In this case, you were only making cosmetic changes (commit message and comments, requested by reviewers) between versions, so IMO that's totally fine. If there are more substantial changes between versions, it may be better to skip it, and let the reviewer re-review. Sometimes a reviewer might even explicitly say, "with changes X and Y, consider this Reviewed-by: foo <foo@bar.tld>", which is a pretty strong indication you can add it. Anyway, it's probably better to omit a review line that should have been included, rather than include one that should not have been (e.g., because undesirable changes were made). So again, no worries from me! Brian
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index d804e19a742a..e9c1f11fef0a 100644 --- 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 ath10k_halt is already called via + * ath10k_core_restart and should not be called here. + */ + if (ar->state != ATH10K_STATE_RESTARTING) + ath10k_halt(ar); + else + /* Suspending here, because when in RESTARTING + * state, ath10k_core_stop skips + * 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);