All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Greear <greearb@candelatech.com>
To: Johannes Berg <johannes@sipsolutions.net>,
	Oleksij Rempel <linux@rempel-privat.de>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	ath10k <ath10k@lists.infradead.org>,
	kirtika@google.com
Subject: Re: Setting single rate in ath10k broken by "reject/clear user rate mask if not usable"
Date: Fri, 27 Oct 2017 13:41:36 -0700	[thread overview]
Message-ID: <a1adb2ea-44c4-67ae-1044-08c4dc16bb9a@candelatech.com> (raw)
In-Reply-To: <1509135311.2283.12.camel@sipsolutions.net>

On 10/27/2017 01:15 PM, Johannes Berg wrote:
> On Wed, 2017-10-25 at 09:13 -0700, Ben Greear wrote:
>
>>> Well it resulted in a WARN_ON because if the AP didn't have those
>>> rates, we'd not find any usable rates while trying to transmit a frame,
>>> and then ended up warning and falling down to the lowest possible rate.
>>>
>>> I don't think I agree that configuring this should reject the
>>> association, and I've already implemented the behaviour of dropping the
>>> user's rate set in this case in the patch we're discussing.
>>
>> So, as long as we are associating to a VHT AP, then we could still set the
>> tx-rateset to (only) VHT MCS 8 and allow association, even if there are no additional
>> rates set.  There is at least one common rate, so theoretically, the
>> station and AP can communicate.
>>
>> If we tried to associate this same station to an HT AP, then your work-around
>> code could kick in and throw away the user's rateset configuration, preferably
>> with a fairly noticeable warning message since you are overriding the user's
>> preferred tx rateset?
>
> There's only a debug message now, and I actually compare to the basic
> rates. Like I said, we could fix that to compare to real rates, but
> that gets a little trickier since we don't select from all possible
> rates when we try to send management frames, only from legacy rates, so
> we'd have to modify that code too.

ath10k ignores the tx rateset pretty much entirely when sending management
frames, so even if you set the tx rateset to have only VHT MCS 8,
management frames are still sent with legacy ratesets.

My end goal about this part is to be able to configure a single tx rate
and have that be allowed again, at least with ath10k.

Maybe a new flag for drivers like ath10k that at least somewhat ignore
the tx-rateset for management frames, and this flag would allow us to
bypass the cannot-set-single-rate check?

>>> This kind of problem is why I absolutely dislike out-of-band state that
>>> affects the connection, rather than giving it in the connection
>>> command(s) (connect, auth, associate, whatever). We're stuck with it
>>> now, and needed to redefine that this selection may be dropped if not
>>> usable.
>>
>> You could start allowing the user to configure the full advertised and
>> transmit rateset for each of these actions (and probe too), and user-space can add the fields
>> to their netlink commands.  At least going forward, this might help
>> make the behaviour more as expected.  If you would like to implement at
>> least the basics in cfg/mac80211, I would be happy to work on the supplicant
>> end of things.
>
> I'm not sure we can really remove this, there are users out there (e.g.
> Chrome's shill, IIRC), so we'd be stuck with two ways of doing things
> ... that's not so much better really :)

I am not saying you should remove the existing support, but since it is clunky
at best, you can add support for specifying the rates and those rates, if specified,
can take precedence over whatever was previously set (or auto-configured).

The kernel code will still be somewhat convoluted, but at least user-space
using newer API might have a more deterministic behaviour.

Thanks,
Ben

-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com

WARNING: multiple messages have this Message-ID (diff)
From: Ben Greear <greearb@candelatech.com>
To: Johannes Berg <johannes@sipsolutions.net>,
	Oleksij Rempel <linux@rempel-privat.de>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	ath10k <ath10k@lists.infradead.org>,
	kirtika@google.com
Subject: Re: Setting single rate in ath10k broken by "reject/clear user rate mask if not usable"
Date: Fri, 27 Oct 2017 13:41:36 -0700	[thread overview]
Message-ID: <a1adb2ea-44c4-67ae-1044-08c4dc16bb9a@candelatech.com> (raw)
In-Reply-To: <1509135311.2283.12.camel@sipsolutions.net>

On 10/27/2017 01:15 PM, Johannes Berg wrote:
> On Wed, 2017-10-25 at 09:13 -0700, Ben Greear wrote:
>
>>> Well it resulted in a WARN_ON because if the AP didn't have those
>>> rates, we'd not find any usable rates while trying to transmit a frame,
>>> and then ended up warning and falling down to the lowest possible rate.
>>>
>>> I don't think I agree that configuring this should reject the
>>> association, and I've already implemented the behaviour of dropping the
>>> user's rate set in this case in the patch we're discussing.
>>
>> So, as long as we are associating to a VHT AP, then we could still set the
>> tx-rateset to (only) VHT MCS 8 and allow association, even if there are no additional
>> rates set.  There is at least one common rate, so theoretically, the
>> station and AP can communicate.
>>
>> If we tried to associate this same station to an HT AP, then your work-around
>> code could kick in and throw away the user's rateset configuration, preferably
>> with a fairly noticeable warning message since you are overriding the user's
>> preferred tx rateset?
>
> There's only a debug message now, and I actually compare to the basic
> rates. Like I said, we could fix that to compare to real rates, but
> that gets a little trickier since we don't select from all possible
> rates when we try to send management frames, only from legacy rates, so
> we'd have to modify that code too.

ath10k ignores the tx rateset pretty much entirely when sending management
frames, so even if you set the tx rateset to have only VHT MCS 8,
management frames are still sent with legacy ratesets.

My end goal about this part is to be able to configure a single tx rate
and have that be allowed again, at least with ath10k.

Maybe a new flag for drivers like ath10k that at least somewhat ignore
the tx-rateset for management frames, and this flag would allow us to
bypass the cannot-set-single-rate check?

>>> This kind of problem is why I absolutely dislike out-of-band state that
>>> affects the connection, rather than giving it in the connection
>>> command(s) (connect, auth, associate, whatever). We're stuck with it
>>> now, and needed to redefine that this selection may be dropped if not
>>> usable.
>>
>> You could start allowing the user to configure the full advertised and
>> transmit rateset for each of these actions (and probe too), and user-space can add the fields
>> to their netlink commands.  At least going forward, this might help
>> make the behaviour more as expected.  If you would like to implement at
>> least the basics in cfg/mac80211, I would be happy to work on the supplicant
>> end of things.
>
> I'm not sure we can really remove this, there are users out there (e.g.
> Chrome's shill, IIRC), so we'd be stuck with two ways of doing things
> ... that's not so much better really :)

I am not saying you should remove the existing support, but since it is clunky
at best, you can add support for specifying the rates and those rates, if specified,
can take precedence over whatever was previously set (or auto-configured).

The kernel code will still be somewhat convoluted, but at least user-space
using newer API might have a more deterministic behaviour.

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

  reply	other threads:[~2017-10-27 20:41 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-10 20:54 Setting single rate in ath10k broken by "reject/clear user rate mask if not usable" Ben Greear
2017-10-10 20:54 ` Ben Greear
2017-10-11  4:37 ` Not able to set single rate in ath10k (backports-4.14-rc2-1) KAVITA MATHUR
2017-10-11  8:02 ` Setting single rate in ath10k broken by "reject/clear user rate mask if not usable" Johannes Berg
2017-10-11  8:02   ` Johannes Berg
2017-10-11  8:07   ` Johannes Berg
2017-10-11  8:07     ` Johannes Berg
2017-10-11 14:51   ` Ben Greear
2017-10-11 14:51     ` Ben Greear
2017-10-18  7:33     ` Johannes Berg
2017-10-18  7:33       ` Johannes Berg
2017-10-18 14:50       ` Ben Greear
2017-10-18 14:50         ` Ben Greear
2017-10-18 17:56         ` Oleksij Rempel
2017-10-18 17:56           ` Oleksij Rempel
2017-10-18 20:34           ` Johannes Berg
2017-10-18 20:34             ` Johannes Berg
2017-10-18 20:51             ` Ben Greear
2017-10-18 20:51               ` Ben Greear
2017-10-18 21:02               ` Johannes Berg
2017-10-18 21:02                 ` Johannes Berg
2017-10-18 21:30                 ` Ben Greear
2017-10-18 21:30                   ` Ben Greear
2017-10-25 15:17                   ` Johannes Berg
2017-10-25 15:17                     ` Johannes Berg
2017-10-25 16:13                     ` Ben Greear
2017-10-25 16:13                       ` Ben Greear
2017-10-27 20:15                       ` Johannes Berg
2017-10-27 20:15                         ` Johannes Berg
2017-10-27 20:41                         ` Ben Greear [this message]
2017-10-27 20:41                           ` Ben Greear
2017-11-13 10:09                           ` Johannes Berg
2017-11-13 10:09                             ` Johannes Berg
2017-11-13 17:05                             ` Ben Greear
2017-11-13 17:05                               ` 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=a1adb2ea-44c4-67ae-1044-08c4dc16bb9a@candelatech.com \
    --to=greearb@candelatech.com \
    --cc=ath10k@lists.infradead.org \
    --cc=johannes@sipsolutions.net \
    --cc=kirtika@google.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linux@rempel-privat.de \
    /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.