Search Linux Wireless

Re: [PATCH v3 3/3] ath10k: create debugfs interface to trigger fw crash

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Kalle Valo <kvalo@xxxxxxxxxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux