]> git.ipfire.org Git - thirdparty/iw.git/commitdiff
don't require scan multicast group
authorJohannes Berg <johannes@sipsolutions.net>
Thu, 12 Feb 2009 10:45:00 +0000 (11:45 +0100)
committerJohannes Berg <johannes@sipsolutions.net>
Thu, 12 Feb 2009 10:45:00 +0000 (11:45 +0100)
iw.c

diff --git a/iw.c b/iw.c
index f28e87bc6eda90fca77a5b186e1cfdef4c4f5b27..623b16f6d17e6854b22ce8b725436a231a366a08 100644 (file)
--- a/iw.c
+++ b/iw.c
@@ -351,12 +351,11 @@ static int listen_events(struct nl80211_state *state,
                return ret;
 
        mcid = nl_get_multicast_id(state->nl_sock, "nl80211", "scan");
-       if (mcid < 0)
-               return mcid;
-
-       ret = nl_socket_add_membership(state->nl_sock, mcid);
-       if (ret)
-               return ret;
+       if (mcid >= 0) {
+               ret = nl_socket_add_membership(state->nl_sock, mcid);
+               if (ret)
+                       return ret;
+       }
 
        /* no sequence checking for multicast messages */
        nl_cb_set(cb, NL_CB_SEQ_CHECK, NL_CB_CUSTOM, no_seq_check, NULL);