mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2024-12-28 16:52:18 +00:00
wifi: mac80211: ethtool: add monitor channel reporting
When running ethtool on a monitor interface, the channel wasn't reporting properly. This adds logic to properly report the channel for monitor interfaces in ethtool. Signed-off-by: Dylan Eskew <dylan.eskew@candelatech.com> Link: https://patch.msgid.link/20241113144608.334060-1-dylan.eskew@candelatech.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
24dab555ad
commit
4f85a3b370
@ -157,6 +157,10 @@ static void ieee80211_get_stats(struct net_device *dev,
|
||||
chanctx_conf = rcu_dereference(sdata->vif.bss_conf.chanctx_conf);
|
||||
if (chanctx_conf)
|
||||
channel = chanctx_conf->def.chan;
|
||||
else if (local->open_count > 0 &&
|
||||
local->open_count == local->monitors &&
|
||||
sdata->vif.type == NL80211_IFTYPE_MONITOR)
|
||||
channel = local->monitor_chanreq.oper.chan;
|
||||
else
|
||||
channel = NULL;
|
||||
rcu_read_unlock();
|
||||
|
Loading…
Reference in New Issue
Block a user