From: Kalle Valo <kvalo@qca.qualcomm.com>
To: Michal Kazior <michal.kazior@tieto.com>
Cc: "ath10k@lists.infradead.org" <ath10k@lists.infradead.org>,
linux-wireless <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH v4 2/2] ath10k: add testmode
Date: Thu, 11 Sep 2014 13:39:41 +0300 [thread overview]
Message-ID: <87ppf230gi.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <CA+BoTQkBiKPzHBfTA2xpmgbUbutSj5Z6w6gP7EO6aotacM5_cA@mail.gmail.com> (Michal Kazior's message of "Thu, 11 Sep 2014 11:47:34 +0200")
Michal Kazior <michal.kazior@tieto.com> writes:
> On 10 September 2014 17:23, Kalle Valo <kvalo@qca.qualcomm.com> wrote:
> [...]
>
> Just a small nitpick:
>
>> +static int ath10k_tm_cmd_utf_stop(struct ath10k *ar, struct nlattr *tb[])
>> +{
>> + int ret;
>> +
>> + ath10k_dbg(ar, ATH10K_DBG_TESTMODE, "testmode cmd utf stop\n");
>> +
>> + mutex_lock(&ar->conf_mutex);
>> +
>> + if (ar->state != ATH10K_STATE_UTF) {
>> + ret = -ENETDOWN;
>> + goto out;
>> + }
>> +
>> + __ath10k_tm_cmd_utf_stop(ar);
>> +
>> + ar->state = ATH10K_STATE_OFF; // <-- this
>
> I would move it to __ath10k_tm_cmd_utf_stop() itself so that the state
> is reset in ath10k_testmode_destroy() as well.
Ok. It doesn't make any difference on the functionality, but I'll change
it anyway. I folded this patch to the commit:
diff --git a/drivers/net/wireless/ath/ath10k/testmode.c b/drivers/net/wireless/ath/ath10k/testmode.c
index 9d77d72042ff..483db9cb8c96 100644
--- a/drivers/net/wireless/ath/ath10k/testmode.c
+++ b/drivers/net/wireless/ath/ath10k/testmode.c
@@ -253,6 +253,8 @@ static void __ath10k_tm_cmd_utf_stop(struct ath10k *ar)
release_firmware(ar->testmode.utf);
ar->testmode.utf = NULL;
+
+ ar->state = ATH10K_STATE_OFF;
}
static int ath10k_tm_cmd_utf_stop(struct ath10k *ar, struct nlattr *tb[])
@@ -270,7 +272,6 @@ static int ath10k_tm_cmd_utf_stop(struct ath10k *ar, struct nlattr *tb[])
__ath10k_tm_cmd_utf_stop(ar);
- ar->state = ATH10K_STATE_OFF;
ret = 0;
ath10k_info(ar, "UTF firmware stopped\n");
--
Kalle Valo
next prev parent reply other threads:[~2014-09-11 10:39 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-10 15:23 [PATCH v4 0/2] ath10k: testmode support Kalle Valo
2014-09-10 15:23 ` [PATCH v4 1/2] ath10k: make ath10k_wmi_cmd_send() public Kalle Valo
2014-09-10 15:23 ` [PATCH v4 2/2] ath10k: add testmode Kalle Valo
2014-09-11 9:47 ` Michal Kazior
2014-09-11 10:39 ` Kalle Valo [this message]
2014-09-11 20:43 ` [PATCH v4 0/2] ath10k: testmode support Kalle Valo
2014-11-14 0:08 ` Pushpal Sidhu
2014-11-14 15:09 ` Kalle Valo
2014-11-15 1:00 ` Tim Harvey
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=87ppf230gi.fsf@kamboji.qca.qualcomm.com \
--to=kvalo@qca.qualcomm.com \
--cc=ath10k@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
--cc=michal.kazior@tieto.com \
/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;
as well as URLs for NNTP newsgroup(s).