Re: [PATCH] wifi: do not print dump inconsistency error for get scan command



On Mon, 2014-02-10 at 11:07 +0100, Stanislaw Gruszka wrote:
Avoid printing "nl_recvmsgs() error: (-33) Dump inconsistency detected,
interrupted".  DUMP_INTR error is harmless for scan (see in code
comments).

---
 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 e0d7eee..f6bbc6e 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;

Hi,

applied as
http://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=28dfb2e4a2cc13affc787878a3eab4cde03a8bba

and on nm-0.9.8 branch as
http://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=e0a972461156c12ad1be40f4a4ed84705c4603aa

Thank you
Thomas

Attachment: signature.asc
Description: This is a digitally signed message part



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]