From 28dfb2e4a2cc13affc787878a3eab4cde03a8bba Mon Sep 17 00:00:00 2001 From: Stanislaw Gruszka Date: Mon, 10 Feb 2014 11:07:48 +0100 Subject: [PATCH] wifi: do not print dump inconsistency error for get scan command Avoid printing "nl_recvmsgs() error: (-33) Dump inconsistency detected, interrupted". DUMP_INTR error is harmless for scan (see in code comments). Signed-off-by: Thomas Haller --- src/wifi/wifi-utils-nl80211.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/wifi/wifi-utils-nl80211.c b/src/wifi/wifi-utils-nl80211.c index 610ed93780..b0bb27366e 100644 --- a/src/wifi/wifi-utils-nl80211.c +++ b/src/wifi/wifi-utils-nl80211.c @@ -132,6 +132,15 @@ _nl80211_send_and_recv (struct nl_sock *nl_sock, while (!done) { err = nl_recvmsgs (nl_sock, cb); if (err && err != -NLE_AGAIN) { + /* Kernel scan list can change while we are dumping it, as new scan + * results from H/W can arrive. BSS info is assured to be consistent + * and we don't need consistent view of whole scan list. Hence do + * not warn on DUMP_INTR error for get scan command. + */ + if (err == -NLE_DUMP_INTR && + genlmsg_hdr(nlmsg_hdr(msg))->cmd == NL80211_CMD_GET_SCAN) + break; + nm_log_warn (LOGD_WIFI, "nl_recvmsgs() error: (%d) %s", err, nl_geterror (err)); break;