[PATCH 2/5] monitor: Don't dump survey results with noscan

Denis Kenzior
2024-08-23T16:18:52Z

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 214246ea72c2..f0ffff90b1d7 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) {
--
2.45.2