]> git.ipfire.org Git - thirdparty/iw.git/blobdiff - iw.c
iw: support setting frame subtype and reason code when deleting station
[thirdparty/iw.git] / iw.c
diff --git a/iw.c b/iw.c
index 2aabddb3c12005e67cb739a2c45a58b72630124e..64f9f0f84a1b87bf2a16850362d3ddfe33ad9e94 100644 (file)
--- a/iw.c
+++ b/iw.c
@@ -54,14 +54,14 @@ static int nl80211_init(struct nl80211_state *state)
                return -ENOMEM;
        }
 
-       nl_socket_set_buffer_size(state->nl_sock, 8192, 8192);
-
        if (genl_connect(state->nl_sock)) {
                fprintf(stderr, "Failed to connect to generic netlink.\n");
                err = -ENOLINK;
                goto out_handle_destroy;
        }
 
+       nl_socket_set_buffer_size(state->nl_sock, 8192, 8192);
+
        state->nl80211_id = genl_ctrl_resolve(state->nl_sock, "nl80211");
        if (state->nl80211_id < 0) {
                fprintf(stderr, "nl80211 not found.\n");