From 5118f08d79a39813d591b4507dd89b4e62dd9a41 Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Sun, 11 Aug 2024 22:40:49 -0500 Subject: [PATCH] monitor: Don't dump survey results with noscan Survey is used after each scan, creating quite a bit of spam. Silence survey results if noscan is set. --- monitor/nlmon.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/monitor/nlmon.c b/monitor/nlmon.c index 214246ea..f0ffff90 100644 --- a/monitor/nlmon.c +++ b/monitor/nlmon.c @@ -7254,8 +7254,10 @@ static void print_message(struct nlmon *nlmon, const struct timeval *tv, if (nlmon->nowiphy && (cmd == NL80211_CMD_NEW_WIPHY)) return; - if (nlmon->noscan && ((cmd == NL80211_CMD_NEW_SCAN_RESULTS) || - (cmd == NL80211_CMD_TRIGGER_SCAN))) + if (nlmon->noscan && L_IN_SET(cmd, NL80211_CMD_NEW_SCAN_RESULTS, + NL80211_CMD_NEW_SURVEY_RESULTS, + NL80211_CMD_TRIGGER_SCAN, + NL80211_CMD_GET_SURVEY)) return; switch (type) {