diff mbox series

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

Message ID 20240823161848.485685-2-denkenz@gmail.com (mailing list archive)
State New
Headers show
Series [1/5] defs: Add defs.h to hold certain global definitions | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
prestwoj/iwd-ci-gitlint success GitLint

Commit Message

Denis Kenzior Aug. 23, 2024, 4:18 p.m. UTC
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 mbox series

Patch

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) {