From: Johannes Berg <johannes@sipsolutions.net>
To: Sergey Matyukevich <sergey.matyukevich.os@quantenna.com>
Cc: igor.mitsyanko.os@quantenna.com, linux-wireless@vger.kernel.org,
Avinash Patil <avinashp@quantenna.com>,
Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Subject: Re: [PATCH v6] qtnfmac: introduce new FullMAC driver for Quantenna chipsets
Date: Mon, 22 May 2017 08:28:21 +0200 [thread overview]
Message-ID: <1495434501.2653.7.camel@sipsolutions.net> (raw)
In-Reply-To: <20170521170814.d7ljne2pgopymxud@bars>
Hi Sergey,
> Thanks for pointing at mac80211 reject code. In our specific case
> it looks like the issue can be fixed with help of the following
> building blocks:
> - properly set NL80211_RXMGMT_FLAG_ANSWERED flag, since quite a few
> mgmt frame types are completely handled by firmware
This doesn't really seem to be used or checked at all - not sure I
would recommend that, since wpa_s doesn't handle it and we don't seem
to have a way for it to say it can deal with it?
For those frames that are answered, subscriptions should probably be
rejected unless wpa_s sets some flag saying that it can deal with
frames already having been answered, but I'm not sure that makes a lot
of sense?
I honestly don't even remember why this was added - I see the commit
but it doesn't say why. It's very tempting to revert this since we
don't really have the infrastructure set up to deal with it properly,
and nothing is actually using it.
> - reply to action frames rejected by userspace tools
> in the same way as it is done by mac80211
I think you're probably thinking of the right thing, but just to
clarify:
* if userspace decides to send a reject frame (0x80|action) then
that's just a regular mgmt-TX, nothing special about that
* if the cfg80211_rx_mgmt() *function* returns saying it wasn't
handled, that's just cfg80211 doing it due to the filters - then
there's no userspace code involved
I think you were thinking of the latter case, and yes, just adding the
few lines of code to send rejects for action frames would be
sufficient.
> Adding reject code seems to be straightforward. Adding
> NL80211_RXMGMT_FLAG_ANSWERED flag to firmware is a more involved
> task. But it can be done gradually, from simple usecases to the
> complicated ones. Besides, IIUC the support of this flag by userspace
> tools is still a work in progress. E.g., hostapd is not yet using it,
> so we keep using 'send_probe_response = 0' config option.
Yeah, like I said above, this whole thing isn't really fully thought
out it seems. I'm not sure what you mean by "send_probe_response = 0"
though.
Actually, now I seem to remember a little bit about the flag - there
were some cases like WPS/WSC or so that required seeing the probe
response frame, but not necessarily answering it in userspace.
As far as probe requests are concerned though - if you're able to reply
to them then you can just drop the probe requests and not report them
to the host at all. You just need to filter by higher-level protocols
and not do that for WSC or P2P probe requests or so - and you already
set the flags that you can distinguish that, so you should be able to
implement that?
> In the long run the idea of passing mgmt frame filters to drivers
> looks appealing. It will be up to driver whether to use filters (e.g.
> pass them to firmware for early processing) or not to use them
> (essentially leaving it for cfg80211 subsystem). I did a quick search
> through other users of cfg80211_rx_mgmt among wireless drivers. It
> turns out that none of them is checking its return value. So there
> may be other potential users of this feature :)
:)
> Does it make sense if I post an RFC patch modifying current interface
> of mgmt_frame_register in cfg80211_ops to collect feedback ?
Sure. I think there are some complications, like what happens if you
just pass this through to the firmware and then the firmware crashes,
and you need to recover this state? Perhaps cfg80211 should have some
state accessors ("iterate list of subscriptions") for this purpose. Of
course that can be added later as well.
johannes
next prev parent reply other threads:[~2017-05-22 6:28 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-11 21:51 [PATCH v6] qtnfmac: introduce new FullMAC driver for Quantenna chipsets igor.mitsyanko.os
2017-05-12 15:18 ` [v6] " Kalle Valo
2017-05-12 15:20 ` Kalle Valo
2017-05-12 15:43 ` Joe Perches
2017-05-12 16:37 ` Kalle Valo
2017-05-12 17:47 ` Igor Mitsyanko
2017-05-17 13:12 ` [PATCH v6] " Johannes Berg
2017-05-18 20:08 ` Sergey Matyukevich
2017-05-19 10:18 ` Johannes Berg
2017-05-21 17:08 ` Sergey Matyukevich
2017-05-22 6:28 ` Johannes Berg [this message]
2017-05-22 21:04 ` Sergey Matyukevich
2017-05-24 7:11 ` Johannes Berg
2017-05-24 11:08 ` Sergey Matyukevich
2017-05-22 9:09 ` Kalle Valo
2017-05-24 14:06 ` [v6] " Kalle Valo
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=1495434501.2653.7.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=avinashp@quantenna.com \
--cc=igor.mitsyanko.os@quantenna.com \
--cc=linux-wireless@vger.kernel.org \
--cc=qca_vkondrat@qca.qualcomm.com \
--cc=sergey.matyukevich.os@quantenna.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).