From: Ben Greear <greearb@candelatech.com>
To: Michal Kazior <michal.kazior@tieto.com>
Cc: linux-wireless <linux-wireless@vger.kernel.org>,
"ath10k@lists.infradead.org" <ath10k@lists.infradead.org>
Subject: Re: [RFC 2/2] ath10k: re-config ht_caps when chainmask is modified.
Date: Wed, 24 Sep 2014 09:30:58 -0700 [thread overview]
Message-ID: <5422F1C2.4090100@candelatech.com> (raw)
In-Reply-To: <CA+BoTQk=X2qVJsY64ZH88h29L6+Y5M9K07nLtzo=0ga1bUsXGw@mail.gmail.com>
On 09/24/2014 08:05 AM, Michal Kazior wrote:
> On 24 September 2014 16:35, Ben Greear <greearb@candelatech.com> wrote:
>> On 09/24/2014 12:51 AM, Michal Kazior wrote:
>>> On 24 September 2014 02:26, <greearb@candelatech.com> wrote:
>>> [...]
>>>>
>>>> +static struct ieee80211_sta_vht_cap ath10k_create_vht_cap(struct ath10k
>>>> *ar,
>>>> + bool
>>>> use_cfg_chains)
>>>> {
>>>> struct ieee80211_sta_vht_cap vht_cap = {0};
>>>> u16 mcs_map;
>>>> int i;
>>>> + int nrf = ar->num_rf_chains;
>>>> +
>>>> + if (use_cfg_chains && ar->cfg_tx_chainmask)
>>>> + nrf = get_nss_from_chainmask(ar->cfg_tx_chainmask);
>>>
>>>
>>> Is use_cfg_chains really necessary here? Is setting tx/rx chainmask to
>>> 0x0 make any sense at all? Shouldn't we deny it or make it fallback to
>>> the supported tx/rx chainmask values?
>>
>> It would cause the logic to flip back to the defaults, so seems mildly
>> useful. I'm not sure
>> upper layers would ever let it be < 1 though.
>
> 0 is a valid argument as far as upper layers are concerned and should
> be treated as "use all available antennas" (see `iw list` output
> before ever setting antenna, after setting to, e.g. 1 and then to 0).
>
> This implies current set_antenna() implementation is actually buggy
> (pdev param should involve using supp_tx/rx_chainmask). Your
> assumption in recent patches is also incorrect as antenna mask = 0
> should imply max nss, not 1.
I tested this using:
iw phy wiphy1 set antenna 0 0
This flips it back to 3x3 (I had previously configured it for 2x2),
so I think the patches are working properly.
Thanks,
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k
WARNING: multiple messages have this Message-ID (diff)
From: Ben Greear <greearb@candelatech.com>
To: Michal Kazior <michal.kazior@tieto.com>
Cc: linux-wireless <linux-wireless@vger.kernel.org>,
"ath10k@lists.infradead.org" <ath10k@lists.infradead.org>
Subject: Re: [RFC 2/2] ath10k: re-config ht_caps when chainmask is modified.
Date: Wed, 24 Sep 2014 09:30:58 -0700 [thread overview]
Message-ID: <5422F1C2.4090100@candelatech.com> (raw)
In-Reply-To: <CA+BoTQk=X2qVJsY64ZH88h29L6+Y5M9K07nLtzo=0ga1bUsXGw@mail.gmail.com>
On 09/24/2014 08:05 AM, Michal Kazior wrote:
> On 24 September 2014 16:35, Ben Greear <greearb@candelatech.com> wrote:
>> On 09/24/2014 12:51 AM, Michal Kazior wrote:
>>> On 24 September 2014 02:26, <greearb@candelatech.com> wrote:
>>> [...]
>>>>
>>>> +static struct ieee80211_sta_vht_cap ath10k_create_vht_cap(struct ath10k
>>>> *ar,
>>>> + bool
>>>> use_cfg_chains)
>>>> {
>>>> struct ieee80211_sta_vht_cap vht_cap = {0};
>>>> u16 mcs_map;
>>>> int i;
>>>> + int nrf = ar->num_rf_chains;
>>>> +
>>>> + if (use_cfg_chains && ar->cfg_tx_chainmask)
>>>> + nrf = get_nss_from_chainmask(ar->cfg_tx_chainmask);
>>>
>>>
>>> Is use_cfg_chains really necessary here? Is setting tx/rx chainmask to
>>> 0x0 make any sense at all? Shouldn't we deny it or make it fallback to
>>> the supported tx/rx chainmask values?
>>
>> It would cause the logic to flip back to the defaults, so seems mildly
>> useful. I'm not sure
>> upper layers would ever let it be < 1 though.
>
> 0 is a valid argument as far as upper layers are concerned and should
> be treated as "use all available antennas" (see `iw list` output
> before ever setting antenna, after setting to, e.g. 1 and then to 0).
>
> This implies current set_antenna() implementation is actually buggy
> (pdev param should involve using supp_tx/rx_chainmask). Your
> assumption in recent patches is also incorrect as antenna mask = 0
> should imply max nss, not 1.
I tested this using:
iw phy wiphy1 set antenna 0 0
This flips it back to 3x3 (I had previously configured it for 2x2),
so I think the patches are working properly.
Thanks,
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
next prev parent reply other threads:[~2014-09-24 16:31 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-24 0:26 [RFC 1/2] ath10k: move create-ht-cap methods above set-antenna greearb
2014-09-24 0:26 ` greearb
2014-09-24 0:26 ` [RFC 2/2] ath10k: re-config ht_caps when chainmask is modified greearb
2014-09-24 0:26 ` greearb
2014-09-24 7:51 ` Michal Kazior
2014-09-24 7:51 ` Michal Kazior
2014-09-24 14:35 ` Ben Greear
2014-09-24 14:35 ` Ben Greear
2014-09-24 15:05 ` Michal Kazior
2014-09-24 15:05 ` Michal Kazior
2014-09-24 15:15 ` Ben Greear
2014-09-24 15:15 ` Ben Greear
2014-09-24 16:30 ` Ben Greear [this message]
2014-09-24 16:30 ` Ben Greear
2014-09-25 6:23 ` Michal Kazior
2014-09-25 6:23 ` Michal Kazior
2014-09-25 13:26 ` Ben Greear
2014-09-25 13:26 ` Ben Greear
2014-09-24 14:43 ` Ben Greear
2014-09-24 14:43 ` Ben Greear
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=5422F1C2.4090100@candelatech.com \
--to=greearb@candelatech.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.