From: Johannes Berg Date: Thu, 12 Feb 2009 10:45:00 +0000 (+0100) Subject: don't require scan multicast group X-Git-Tag: v0.9.10~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5406d9e4ee819aec48f384a6f6854513e40e9f26;p=thirdparty%2Fiw.git don't require scan multicast group --- diff --git a/iw.c b/iw.c index f28e87b..623b16f 100644 --- 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);