]> git.ipfire.org Git - thirdparty/iw.git/blobdiff - connect.c
ibss: use correct "MHz" instead of "MHZ"
[thirdparty/iw.git] / connect.c
index 74e457859faaf0fe69edc048070641bb69031c9a..56771249e234bc14bd5234a68b5565f08688eb14 100644 (file)
--- a/connect.c
+++ b/connect.c
@@ -9,7 +9,7 @@
 #include "nl80211.h"
 #include "iw.h"
 
-static int iw_conn(struct nl80211_state *state, struct nl_cb *cb,
+static int iw_conn(struct nl80211_state *state,
                   struct nl_msg *msg, int argc, char **argv,
                   enum id_input id)
 {
@@ -59,7 +59,6 @@ static int iw_conn(struct nl80211_state *state, struct nl_cb *cb,
 }
 
 static int disconnect(struct nl80211_state *state,
-                     struct nl_cb *cb,
                      struct nl_msg *msg,
                      int argc, char **argv,
                      enum id_input id)
@@ -70,7 +69,7 @@ TOPLEVEL(disconnect, NULL,
        NL80211_CMD_DISCONNECT, 0, CIB_NETDEV, disconnect,
        "Disconnect from the current network.");
 
-static int iw_connect(struct nl80211_state *state, struct nl_cb *cb,
+static int iw_connect(struct nl80211_state *state,
                      struct nl_msg *msg, int argc, char **argv,
                      enum id_input id)
 {
@@ -94,15 +93,15 @@ static int iw_connect(struct nl80211_state *state, struct nl_cb *cb,
                argv++;
        }
 
+       err = __prepare_listen_events(state);
+       if (err)
+               return err;
+
        conn_argc = 3 + argc;
        conn_argv = calloc(conn_argc, sizeof(*conn_argv));
        if (!conn_argv)
                return -ENOMEM;
 
-       err = __prepare_listen_events(state);
-       if (err)
-               return err;
-
        conn_argv[0] = dev;
        conn_argv[1] = "connect";
        conn_argv[2] = "establish";
@@ -146,7 +145,7 @@ TOPLEVEL(connect, "[-w] <SSID> [<freq in MHz>] [<bssid>] [key 0:abcde d:1:616263
        "With -w, wait for the connect to finish or fail.");
 HIDDEN(connect, establish, "", NL80211_CMD_CONNECT, 0, CIB_NETDEV, iw_conn);
 
-static int iw_auth(struct nl80211_state *state, struct nl_cb *cb,
+static int iw_auth(struct nl80211_state *state,
                   struct nl_msg *msg, int argc, char **argv,
                   enum id_input id)
 {