On 10/16/2017 02:24 AM, Johannes Berg wrote:
Right, and I didn't originally see the patch as such, just that the
discussion (and in particular Julian's suggestion) veered off in that
direction.
Nevertheless in certain cases it is handy to dump selected types of
mgmt frames while system is up and running without adding the whole
monitor overhead. The idea was that NL80211_CMD_REGISTER_FRAME and iw
are the right tools for that task. Anyway, iw is something like a
'swiss-army-knife' tool for various tasks related to
mac80211/cfg80211 reporting and troubleshooting.
I'd see this particular feature in iw more as a way to debug the
registrations, but whatever you ultimately want to use it for I neither
can nor want to control :-)
Maybe we could add an additional nl attribute to
NL80211_CMD_REGISTER_FRAME command to allow applications to advertise
what is their intention, something like NL80211_ATTR_MGMT_LISTENER_TYPE.
Only allow to register more then one listener if it explicitly specifies
that it will not try to answer (TYPE_LISTEN_ONLY or smth like that).
This will preserve behavior for existing userspace.