nl80211: fix radio statistics in survey dump
authorJohannes Berg <johannes.berg@intel.com>
Fri, 29 Oct 2021 07:25:39 +0000 (09:25 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 15 Nov 2021 09:51:51 +0000 (10:51 +0100)
commitce6b69749961426c6d822215ded9e67154e1ad4f
tree01170a626ee8dc6f577d07703e4e0ea824f199f4
parent563fbefed46ae4c1f70cffb8eb54c02df480b2c2
nl80211: fix radio statistics in survey dump

Even if userspace specifies the NL80211_ATTR_SURVEY_RADIO_STATS
attribute, we cannot get the statistics because we're not really
parsing the incoming attributes properly any more.

Fix this by passing the attrbuf to nl80211_prepare_wdev_dump()
and filling it there, if given, and using a local version only
if no output is desired.

Since I'm touching it anyway, make nl80211_prepare_wdev_dump()
static.

Fixes: 50508d941c18 ("cfg80211: use parallel_ops for genl")
Reported-by: Jan Fuchs <jf@simonwunderlich.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Tested-by: Sven Eckelmann <sven@narfation.org>
Link: https://lore.kernel.org/r/20211029092539.2851b4799386.If9736d4575ee79420cbec1bd930181e1d53c7317@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/nl80211.c
net/wireless/nl80211.h