linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Ben Greear <greearb@candelatech.com>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	ath10k <ath10k@lists.infradead.org>,
	kirtika@google.com, Johannes Berg <johannes.berg@intel.com>
Subject: Re: Setting single rate in ath10k broken by "reject/clear user rate mask if not usable"
Date: Wed, 11 Oct 2017 10:02:28 +0200	[thread overview]
Message-ID: <1507708948.1998.15.camel@sipsolutions.net> (raw)
In-Reply-To: <13895fa0-3685-dd2b-583d-2d6469d23cfe@candelatech.com> (sfid-20171010_225427_620459_2849A16B)

Hi,

> #iw dev vap206 set bitrates legacy-5 ht-mcs-5 0 vht-mcs-5
> command failed: Invalid argument (-22)
> 
> But, it actually *does* successfully set the rate in the driver
> first, which is confusing at best.

Huh?

> So, I think we should relax this check, at least for ath10k.

Well, yes and no. I don't think we should make ath10k special here, and
this fixes a real problem - namely that you can set up the system so
that you have no usable rates at all, and then you just get a WARN_ON
and start using the lowest possible rate...

> commit e8e4f5280ddd0a7b43a795f90a0758e3c99df6a6
> Author: Johannes Berg <johannes.berg@intel.com>
> Date:   Wed Mar 8 11:12:10 2017 +0100
> 
>      mac80211: reject/clear user rate mask if not usable
> 
>      If the user rate mask results in no (basic) rates being usable,
>      clear it. Also, if we're already operating when it's set, reject
>      it instead.
> 
>      Technically, selecting basic rates as the criterion is a bit too
>      restrictive, but calculating the usable rates over all stations
>      (e.g. in AP mode) is harder, and all stations must support the
>      basic rates. Similarly, in client mode, the basic rates will be
>      used anyway for control frames.

I guess you could implement this part? I.e. iterating the clients and
checking that they all support the rate that is set. However, then you
also need to implement that this gets reset when a new client that
doesn't support this rate connects.

Overall, this isn't very well defined for AP mode...

Perhaps it'd be better - as you pointed out in the other thread - to
have API to force a rate per station? We already have that for iwlwifi
in debugfs, so perhaps that'd be something to consider for this too,
I'm not sure there would be a real need to have it in nl80211?

johannes

  reply	other threads:[~2017-10-11  8:02 UTC|newest]

Thread overview: 17+ 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-11  8:02 ` Johannes Berg [this message]
2017-10-11  8:07   ` Johannes Berg
2017-10-11 14:51   ` Ben Greear
2017-10-18  7:33     ` Johannes Berg
2017-10-18 14:50       ` Ben Greear
2017-10-18 17:56         ` Oleksij Rempel
2017-10-18 20:34           ` Johannes Berg
2017-10-18 20:51             ` Ben Greear
2017-10-18 21:02               ` Johannes Berg
2017-10-18 21:30                 ` Ben Greear
2017-10-25 15:17                   ` Johannes Berg
2017-10-25 16:13                     ` Ben Greear
2017-10-27 20:15                       ` Johannes Berg
2017-10-27 20:41                         ` Ben Greear
2017-11-13 10:09                           ` Johannes Berg
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=1507708948.1998.15.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=ath10k@lists.infradead.org \
    --cc=greearb@candelatech.com \
    --cc=johannes.berg@intel.com \
    --cc=kirtika@google.com \
    --cc=linux-wireless@vger.kernel.org \
    /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).