From: Wen Gong <wgong@codeaurora.org>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: Arend Van Spriel <arend.vanspriel@broadcom.com>,
linux-wireless@vger.kernel.org, kirtika@google.com,
linux-wireless-owner@vger.kernel.org, ath11k@lists.infradead.org,
ath10k@lists.infradead.org
Subject: Re: [PATCH v2] mac80211: reject/clear user rate mask if not usable
Date: Fri, 13 Nov 2020 16:35:07 +0800 [thread overview]
Message-ID: <30e2e578983e4df447e0c26c5bba0aba@codeaurora.org> (raw)
In-Reply-To: <798cea679ae1df5a2ab9b59dd81c8e2b3ca2d6e3.camel@sipsolutions.net>
On 2020-11-13 16:16, Johannes Berg wrote:
> On Fri, 2020-11-13 at 16:14 +0800, Wen Gong wrote:
>> On 2020-11-13 15:38, Johannes Berg wrote:
>> > On Fri, 2020-11-13 at 10:08 +0800, Wen Gong wrote:
>> > > > Which was the intent of this change, wasn't it?
>> >
>> > Indeed. Permitting this leads to warnings later.
>> >
>> > > We need to set the tx rate to fixed at a single rate, e.g.,
>> > > 54M/48M/36M... for a test case.
>> > > I do not want a clear error message, I want to the 54M rate pass/set
>> > > success to lower wlan driver.
>> > > Then lower wlan driver can handle it.
>> >
>> > No, that will not happen. You should configure your test AP to actually
>> > support 54M.
>> Yes, the AP support 54M, but it is not basic rate, so
>> ieee80211_set_bitrate_mask will reject 54M
>> because fail for check (mask->control[band].legacy & basic_rates).
>
> Ah. So this is what I said in the original commit message even:
>
>> 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 if we really want to redefine the user rate mask to not apply
> to
> control frames, then we can relax this?
>
Yes, for AP mode, it is hard to calculate the usable rates over all
stations.
But for STATION mode, it can set 54M because AP support it, so it should
not reject it.
If add a check for nl80211_iftype of ieee80211_vif in
ieee80211_set_bitrate_mask, it can
solve this like this:
if (sdata->vif.type != NL80211_IFTYPE_STATION &&
!(mask->control[band].legacy & basic_rates))
> johannes
WARNING: multiple messages have this Message-ID (diff)
From: Wen Gong <wgong@codeaurora.org>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: Arend Van Spriel <arend.vanspriel@broadcom.com>,
kirtika@google.com, linux-wireless-owner@vger.kernel.org,
linux-wireless@vger.kernel.org, ath10k@lists.infradead.org,
ath11k@lists.infradead.org
Subject: Re: [PATCH v2] mac80211: reject/clear user rate mask if not usable
Date: Fri, 13 Nov 2020 16:35:07 +0800 [thread overview]
Message-ID: <30e2e578983e4df447e0c26c5bba0aba@codeaurora.org> (raw)
In-Reply-To: <798cea679ae1df5a2ab9b59dd81c8e2b3ca2d6e3.camel@sipsolutions.net>
On 2020-11-13 16:16, Johannes Berg wrote:
> On Fri, 2020-11-13 at 16:14 +0800, Wen Gong wrote:
>> On 2020-11-13 15:38, Johannes Berg wrote:
>> > On Fri, 2020-11-13 at 10:08 +0800, Wen Gong wrote:
>> > > > Which was the intent of this change, wasn't it?
>> >
>> > Indeed. Permitting this leads to warnings later.
>> >
>> > > We need to set the tx rate to fixed at a single rate, e.g.,
>> > > 54M/48M/36M... for a test case.
>> > > I do not want a clear error message, I want to the 54M rate pass/set
>> > > success to lower wlan driver.
>> > > Then lower wlan driver can handle it.
>> >
>> > No, that will not happen. You should configure your test AP to actually
>> > support 54M.
>> Yes, the AP support 54M, but it is not basic rate, so
>> ieee80211_set_bitrate_mask will reject 54M
>> because fail for check (mask->control[band].legacy & basic_rates).
>
> Ah. So this is what I said in the original commit message even:
>
>> 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 if we really want to redefine the user rate mask to not apply
> to
> control frames, then we can relax this?
>
Yes, for AP mode, it is hard to calculate the usable rates over all
stations.
But for STATION mode, it can set 54M because AP support it, so it should
not reject it.
If add a check for nl80211_iftype of ieee80211_vif in
ieee80211_set_bitrate_mask, it can
solve this like this:
if (sdata->vif.type != NL80211_IFTYPE_STATION &&
!(mask->control[band].legacy & basic_rates))
> johannes
--
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k
WARNING: multiple messages have this Message-ID (diff)
From: Wen Gong <wgong@codeaurora.org>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: Arend Van Spriel <arend.vanspriel@broadcom.com>,
kirtika@google.com, linux-wireless-owner@vger.kernel.org,
linux-wireless@vger.kernel.org, ath10k@lists.infradead.org,
ath11k@lists.infradead.org
Subject: Re: [PATCH v2] mac80211: reject/clear user rate mask if not usable
Date: Fri, 13 Nov 2020 16:35:07 +0800 [thread overview]
Message-ID: <30e2e578983e4df447e0c26c5bba0aba@codeaurora.org> (raw)
In-Reply-To: <798cea679ae1df5a2ab9b59dd81c8e2b3ca2d6e3.camel@sipsolutions.net>
On 2020-11-13 16:16, Johannes Berg wrote:
> On Fri, 2020-11-13 at 16:14 +0800, Wen Gong wrote:
>> On 2020-11-13 15:38, Johannes Berg wrote:
>> > On Fri, 2020-11-13 at 10:08 +0800, Wen Gong wrote:
>> > > > Which was the intent of this change, wasn't it?
>> >
>> > Indeed. Permitting this leads to warnings later.
>> >
>> > > We need to set the tx rate to fixed at a single rate, e.g.,
>> > > 54M/48M/36M... for a test case.
>> > > I do not want a clear error message, I want to the 54M rate pass/set
>> > > success to lower wlan driver.
>> > > Then lower wlan driver can handle it.
>> >
>> > No, that will not happen. You should configure your test AP to actually
>> > support 54M.
>> Yes, the AP support 54M, but it is not basic rate, so
>> ieee80211_set_bitrate_mask will reject 54M
>> because fail for check (mask->control[band].legacy & basic_rates).
>
> Ah. So this is what I said in the original commit message even:
>
>> 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 if we really want to redefine the user rate mask to not apply
> to
> control frames, then we can relax this?
>
Yes, for AP mode, it is hard to calculate the usable rates over all
stations.
But for STATION mode, it can set 54M because AP support it, so it should
not reject it.
If add a check for nl80211_iftype of ieee80211_vif in
ieee80211_set_bitrate_mask, it can
solve this like this:
if (sdata->vif.type != NL80211_IFTYPE_STATION &&
!(mask->control[band].legacy & basic_rates))
> johannes
_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k
next prev parent reply other threads:[~2020-11-13 8:35 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-08 13:20 [PATCH v2] mac80211: reject/clear user rate mask if not usable Johannes Berg
2020-11-12 10:55 ` Wen Gong
2020-11-12 10:55 ` Wen Gong
2020-11-12 10:55 ` Wen Gong
2020-11-12 12:49 ` Arend Van Spriel
2020-11-12 12:49 ` Arend Van Spriel
2020-11-12 12:49 ` Arend Van Spriel
2020-11-13 2:08 ` Wen Gong
2020-11-13 2:08 ` Wen Gong
2020-11-13 2:08 ` Wen Gong
2020-11-13 7:38 ` Johannes Berg
2020-11-13 7:38 ` Johannes Berg
2020-11-13 7:38 ` Johannes Berg
2020-11-13 8:14 ` Wen Gong
2020-11-13 8:14 ` Wen Gong
2020-11-13 8:14 ` Wen Gong
2020-11-13 8:16 ` Johannes Berg
2020-11-13 8:16 ` Johannes Berg
2020-11-13 8:16 ` Johannes Berg
2020-11-13 8:35 ` Wen Gong [this message]
2020-11-13 8:35 ` Wen Gong
2020-11-13 8:35 ` Wen Gong
2020-11-13 8:35 ` Johannes Berg
2020-11-13 8:35 ` Johannes Berg
2020-11-13 8:35 ` Johannes Berg
2020-11-13 8:51 ` Wen Gong
2020-11-13 8:51 ` Wen Gong
2020-11-13 8:51 ` Wen Gong
2020-11-13 8:51 ` Johannes Berg
2020-11-13 8:51 ` Johannes Berg
2020-11-13 8:51 ` Johannes Berg
2020-11-13 9:09 ` Wen Gong
2020-11-13 9:09 ` Wen Gong
2020-11-13 9:09 ` Wen Gong
2020-11-13 9:10 ` Johannes Berg
2020-11-13 9:10 ` Johannes Berg
2020-11-13 9:10 ` Johannes Berg
2020-11-13 9:21 ` Wen Gong
2020-11-13 9:21 ` Wen Gong
2020-11-13 9:21 ` Wen Gong
2020-11-13 9:23 ` Johannes Berg
2020-11-13 9:23 ` Johannes Berg
2020-11-13 9:23 ` Johannes Berg
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=30e2e578983e4df447e0c26c5bba0aba@codeaurora.org \
--to=wgong@codeaurora.org \
--cc=arend.vanspriel@broadcom.com \
--cc=ath10k@lists.infradead.org \
--cc=ath11k@lists.infradead.org \
--cc=johannes@sipsolutions.net \
--cc=kirtika@google.com \
--cc=linux-wireless-owner@vger.kernel.org \
--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 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.