From: Kalle Valo <kvalo@qca.qualcomm.com>
To: "Li, Yanbo" <yanbol@qca.qualcomm.com>
Cc: "dreamfly281@gmail.com" <dreamfly281@gmail.com>,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
"michal.kazior@tieto.com" <michal.kazior@tieto.com>,
"ath10k@lists.infradead.org" <ath10k@lists.infradead.org>
Subject: Re: [PATCH] ath10k: Debugfs entry to enable/disable BTC feature
Date: Mon, 8 Jun 2015 16:44:08 +0300 [thread overview]
Message-ID: <87wpzeiac7.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <f33b4183a8054a21ad04075e8fb5eb94@nasanexm02e.na.qualcomm.com> (Yanbo Li's message of "Thu, 28 May 2015 04:07:46 +0300")
"Li, Yanbo" <yanbol@qca.qualcomm.com> writes:
>> -----Original Message-----
>> From: Valo, Kalle
>> Sent: Wednesday, May 27, 2015 5:57 AM
>> To: Li, Yanbo
>> Cc: dreamfly281@gmail.com; linux-wireless@vger.kernel.org;
>> michal.kazior@tieto.com; ath10k@lists.infradead.org
>> Subject: Re: [PATCH] ath10k: Debugfs entry to enable/disable BTC feature
>>
>> Yanbo Li <yanbol@qca.qualcomm.com> writes:
>>
>> > As some radio have no connection with BT modules, enable the BTC
>> > feature will has some side effect if the radio's GPIO connect with any
>> > other HW modules. Add the control switcher "btc_feature" at debugfs
>> > and set the feature as disable by default to avoid such case.
>> >
>> > To enable this feature, execute:
>> > echo 1 > /sys/kernel/debug/ieee80211/phyX/ath10k/btc_feature
>> > To disable:
>> > echo 0 > /sys/kernel/debug/ieee80211/phyX/ath10k/btc_feature
>>
>> I suspect "BTC" does not really tell much for most of the people and
>> acronyms should be always spelled out at least once.
>>
>> > Signed-off-by: Yanbo Li <yanbol@qca.qualcomm.com>
>> >
>> > diff --git a/drivers/net/wireless/ath/ath10k/core.h
>> > b/drivers/net/wireless/ath/ath10k/core.h
>> > index 8444adf42195..6852e7fc5d5f 100644
>> > --- a/drivers/net/wireless/ath/ath10k/core.h
>> > +++ b/drivers/net/wireless/ath/ath10k/core.h
>> > @@ -720,6 +720,8 @@ struct ath10k {
>> > u32 fw_cold_reset_counter;
>> > } stats;
>> >
>> > + bool btc_feature;
>>
>> Could we use ar->dev_flags instead?
>
> This dev_flags currently used to mark some status, like the cradh, CAC running,
> The BTcoex feature is more likely a HW feature, there are seems different set.
>
> Maybe a separately hw_feature_flag is needed as there are some other HW feature
> That we want to enable/disable from user space.
I think we don't need a separate bitmap, we can use dev_flags just fine
for this.
>> > +static ssize_t ath10k_write_btc_feature(struct file *file,
>> > + const char __user *ubuf,
>> > + size_t count, loff_t *ppos)
>> > +{
>> > + struct ath10k *ar = file->private_data;
>> > + char buf[32];
>> > + size_t buf_size;
>> > + bool val;
>> > +
>> > + buf_size = min(count, (sizeof(buf) - 1));
>> > + if (copy_from_user(buf, ubuf, buf_size))
>> > + return -EFAULT;
>> > +
>> > + buf[buf_size] = '\0';
>> > + if (strtobool(buf, &val) != 0) {
>> > + ath10k_warn(ar, "Wrong BTC feature setting\n");
>> > + return -EINVAL;
>> > + }
>> > +
>> > + mutex_lock(&ar->conf_mutex);
>> > + ar->btc_feature = val;
>> > + queue_work(ar->workqueue, &ar->restart_work);
>> > + mutex_unlock(&ar->conf_mutex);
>>
>> Shouldn't we test ATH10K_STATE_ON first?
>
> The restart process will judge by itself whether the device is on or not, and print below warning in that case:
>
> [797424.496190] ath10k_pci 0000:05:00.0: cannot restart a device that
> hasn't been started
That's just buggy, ath10k should not print anything if a setting is
changed while interface is down. It's much better we have the check for
ATH10K_STATE_ON here.
--
Kalle Valo
next prev parent reply other threads:[~2015-06-08 13:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-01 21:10 [PATCH] ath10k: Debugfs entry to enable/disable BTC feature Yanbo Li
2015-05-27 12:56 ` Kalle Valo
2015-05-28 1:07 ` Li, Yanbo
2015-06-08 13:44 ` Kalle Valo [this message]
2015-06-09 18:58 ` YanBo
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=87wpzeiac7.fsf@kamboji.qca.qualcomm.com \
--to=kvalo@qca.qualcomm.com \
--cc=ath10k@lists.infradead.org \
--cc=dreamfly281@gmail.com \
--cc=linux-wireless@vger.kernel.org \
--cc=michal.kazior@tieto.com \
--cc=yanbol@qca.qualcomm.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).