summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Eskew <dylan.eskew@candelatech.com>2024-11-13 06:46:08 -0800
committerJohannes Berg <johannes.berg@intel.com>2024-12-04 16:39:06 +0100
commit4f85a3b370e6f1a353cfbbfb5c398590dfeca9d7 (patch)
tree95f75e376f5eea7f0280f0d32eada025fed34b0d
parent24dab555ad5951824e3fb6b665aaca84ac69dd12 (diff)
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>
-rw-r--r--net/mac80211/ethtool.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/mac80211/ethtool.c b/net/mac80211/ethtool.c
index 069aa05139cd..42f7ee142ce3 100644
--- a/net/mac80211/ethtool.c
+++ b/net/mac80211/ethtool.c
@@ -157,6 +157,10 @@ do_survey:
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();