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");