From: Kalle Valo <kvalo@qca.qualcomm.com>
To: Michal Kazior <michal.kazior@tieto.com>
Cc: <ath10k@lists.infradead.org>, <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH v3 3/3] ath10k: create debugfs interface to trigger fw crash
Date: Sat, 20 Jul 2013 09:01:46 +0300 [thread overview]
Message-ID: <878v1122id.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <87zjti4zc5.fsf@kamboji.qca.qualcomm.com> (Kalle Valo's message of "Fri, 19 Jul 2013 13:29:46 +0300")
Kalle Valo <kvalo@qca.qualcomm.com> writes:
>> +static ssize_t ath10k_write_simulate_fw_crash(struct file *file,
>> + const char __user *user_buf,
>> + size_t count, loff_t *ppos)
>> +{
>> + struct ath10k *ar = file->private_data;
>> + char buf[32] = {};
>> + int ret;
>> +
>> + mutex_lock(&ar->conf_mutex);
>> +
>> + simple_write_to_buffer(buf, sizeof(buf) - 1, ppos, user_buf, count);
>> + if (strcmp(buf, "crash") && strcmp(buf, "crash\n")) {
>> + ath10k_warn("write keyword `crash` to simulate firmware crash\n");
>> + goto exit;
>> + }
>
> Better to just return an error here.
>
>> + if (ar->state != ATH10K_STATE_ON &&
>> + ar->state != ATH10K_STATE_RESTARTED) {
>> + ath10k_warn("firmware isn't loaded yet, nothing to crash\n");
>> + goto exit;
>> + }
>
> Ditto.
Sorry, I was unclear here. I also meant that the two ath10k_warn() calls
should be removed.
--
Kalle Valo
next prev parent reply other threads:[~2013-07-20 6:01 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1372148011-28234-1-git-send-email-michal.kazior@tieto.com>
2013-07-16 7:54 ` [PATCH v3 0/3] ath10k: hardware recovery Michal Kazior
2013-07-16 7:54 ` [PATCH v3 1/3] ath10k: implement device recovery Michal Kazior
2013-07-16 7:54 ` [PATCH v3 2/3] ath10k: implement fw crash simulation command Michal Kazior
2013-07-16 7:54 ` [PATCH v3 3/3] ath10k: create debugfs interface to trigger fw crash Michal Kazior
2013-07-19 10:29 ` Kalle Valo
2013-07-20 6:01 ` Kalle Valo [this message]
2013-07-22 12:08 ` [PATCH v4] " Michal Kazior
2013-07-23 8:02 ` Kalle Valo
2013-07-19 10:32 ` [PATCH v3 0/3] ath10k: hardware recovery Kalle Valo
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=878v1122id.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