Historical ath9k-devel archives
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@qca.qualcomm.com>
To: ath9k-devel@lists.ath9k.org
Subject: [ath9k-devel] [PATCH 09/10] ath10k: handle hw reconfiguration properly
Date: Mon, 10 Jun 2013 20:08:35 +0300	[thread overview]
Message-ID: <874nd5uc4s.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <1370514361-15858-10-git-send-email-michal.kazior@tieto.com> (Michal Kazior's message of "Thu, 6 Jun 2013 12:26:00 +0200")

Michal Kazior <michal.kazior@tieto.com> writes:

> If resume fails mac80211 calls start() hook
> without any other notification to the driver.
>
> If that happens we must make sure we free up and
> clean up our stuff.
>
> Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
> ---
>  drivers/net/wireless/ath/ath10k/mac.c |    9 +++++++++
>  1 file changed, 9 insertions(+)
>
> diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
> index 06601f5..fee4082 100644
> --- a/drivers/net/wireless/ath/ath10k/mac.c
> +++ b/drivers/net/wireless/ath/ath10k/mac.c
> @@ -1694,11 +1694,20 @@ static void ath10k_tx(struct ieee80211_hw *hw,
>  /*
>   * Initialize various parameters with default vaules.
>   */
> +static void ath10k_stop(struct ieee80211_hw *hw);
> +
>  static int ath10k_start(struct ieee80211_hw *hw)
>  {
>  	struct ath10k *ar = hw->priv;
>  	int ret;
>  
> +	if (ar->started) {
> +		/* This can be called in case if resume fails or
> +		 * ieee80211_hw_restart() was issued */
> +		ath10k_info("hw reconfiguration started\n");
> +		ath10k_stop(hw);
> +	}

This look suspicious to me. Can you describe in detail the failing
resume case, please?

If the idea is to initialise the hardware to a pristine state that we
can boot the firmware, please refactor the code into it's own function.
This just looks wrong.

-- 
Kalle Valo

  reply	other threads:[~2013-06-10 17:08 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-06 10:25 [ath9k-devel] [PATCH 00/10] ath10k: device setup refactor Michal Kazior
2013-06-06 10:25 ` [ath9k-devel] [PATCH 01/10] ath10k: decouple pci init/deinit logic Michal Kazior
2013-06-06 10:25 ` [ath9k-devel] [PATCH 02/10] ath10k: decouple core " Michal Kazior
2013-06-10 16:53   ` Kalle Valo
2013-06-11  5:37     ` Michal Kazior
2013-06-06 10:25 ` [ath9k-devel] [PATCH 03/10] ath10k: allow deferred regd update Michal Kazior
2013-06-06 11:44   ` Sujith Manoharan
2013-06-10 16:56   ` Kalle Valo
2013-06-11  5:38     ` Michal Kazior
2013-06-06 10:25 ` [ath9k-devel] [PATCH 04/10] ath10k: reset BMI state upon init Michal Kazior
2013-06-10 16:57   ` Kalle Valo
2013-06-06 10:25 ` [ath9k-devel] [PATCH 05/10] ath10k: decouple suspend code Michal Kazior
2013-06-06 11:48   ` Sujith Manoharan
2013-06-06 13:18     ` Michal Kazior
2013-06-06 10:25 ` [ath9k-devel] [PATCH 06/10] ath10k: defer hw setup to start/stop mac80211 hooks Michal Kazior
2013-06-06 10:38   ` Sujith Manoharan
2013-06-06 12:13     ` Sujith Manoharan
2013-06-06 10:25 ` [ath9k-devel] [PATCH 07/10] ath10k: store firmware files in memory Michal Kazior
2013-06-06 10:25 ` [ath9k-devel] [PATCH 08/10] ath10k: make sure all resources are freed upon ath10k_stop() Michal Kazior
2013-06-06 10:26 ` [ath9k-devel] [PATCH 09/10] ath10k: handle hw reconfiguration properly Michal Kazior
2013-06-10 17:08   ` Kalle Valo [this message]
2013-06-11  5:43     ` Michal Kazior
2013-06-06 10:26 ` [ath9k-devel] [PATCH 10/10] ath10k: move free_vdev_map initialization Michal Kazior

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874nd5uc4s.fsf@kamboji.qca.qualcomm.com \
    --to=kvalo@qca.qualcomm.com \
    --cc=ath9k-devel@lists.ath9k.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox