* [PATCH] wifi: ethtool: add monitor channel reporting
@ 2024-11-12 21:14 Dylan Eskew
2024-11-13 14:32 ` Kalle Valo
0 siblings, 1 reply; 3+ messages in thread
From: Dylan Eskew @ 2024-11-12 21:14 UTC (permalink / raw)
To: johannes; +Cc: linux-wireless, Dylan Eskew
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>
---
net/mac80211/ethtool.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/net/mac80211/ethtool.c b/net/mac80211/ethtool.c
index 99f6174a9d69..d36f4e22230b 100644
--- a/net/mac80211/ethtool.c
+++ b/net/mac80211/ethtool.c
@@ -160,6 +160,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();
--
2.47.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] wifi: ethtool: add monitor channel reporting
2024-11-12 21:14 [PATCH] wifi: ethtool: add monitor channel reporting Dylan Eskew
@ 2024-11-13 14:32 ` Kalle Valo
2024-11-13 14:38 ` Dylan E.
0 siblings, 1 reply; 3+ messages in thread
From: Kalle Valo @ 2024-11-13 14:32 UTC (permalink / raw)
To: Dylan Eskew; +Cc: johannes, linux-wireless
Dylan Eskew <dylan.eskew@candelatech.com> writes:
> 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>
I think the subject should have mac80211, something like:
wifi: mac80211: ethtool: ...
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] wifi: ethtool: add monitor channel reporting
2024-11-13 14:32 ` Kalle Valo
@ 2024-11-13 14:38 ` Dylan E.
0 siblings, 0 replies; 3+ messages in thread
From: Dylan E. @ 2024-11-13 14:38 UTC (permalink / raw)
To: Kalle Valo; +Cc: johannes, linux-wireless
> I think the subject should have mac80211, something like:
>
> wifi: mac80211: ethtool: ...
Nod, understood.
-- Dylan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-11-13 14:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-12 21:14 [PATCH] wifi: ethtool: add monitor channel reporting Dylan Eskew
2024-11-13 14:32 ` Kalle Valo
2024-11-13 14:38 ` Dylan E.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox