]> git.ipfire.org Git - thirdparty/iw.git/blobdiff - phy.c
iw: bump version to 4.7
[thirdparty/iw.git] / phy.c
diff --git a/phy.c b/phy.c
index 271c9d9429eb96411e0b63b27d4f072a4c6ec4f8..13e8260ed78a9f4519dbd9833ef970735c0e896a 100644 (file)
--- a/phy.c
+++ b/phy.c
@@ -1,6 +1,5 @@
 #include <stdbool.h>
 #include <errno.h>
-#include <net/if.h>
 #include <strings.h>
 #include <sys/param.h>
 #include <sys/stat.h>
@@ -16,7 +15,6 @@
 #include "iw.h"
 
 static int handle_name(struct nl80211_state *state,
-                      struct nl_cb *cb,
                       struct nl_msg *msg,
                       int argc, char **argv,
                       enum id_input id)
@@ -46,7 +44,7 @@ static int handle_freqs(struct nl_msg *msg, int argc, char **argv)
                { .name = "160", .val = NL80211_CHAN_WIDTH_160, },
        };
        uint32_t freq;
-       int i, bwval = NL80211_CHAN_WIDTH_20_NOHT;
+       unsigned int i, bwval = NL80211_CHAN_WIDTH_20_NOHT;
        char *end;
 
        if (argc < 1)
@@ -105,7 +103,7 @@ static int handle_freqchan(struct nl_msg *msg, bool chan,
        };
        unsigned int htval = NL80211_CHAN_NO_HT;
        unsigned int freq;
-       int i;
+       unsigned int i;
 
        if (!argc || argc > 4)
                return 1;
@@ -144,8 +142,7 @@ static int handle_freqchan(struct nl_msg *msg, bool chan,
        return -ENOBUFS;
 }
 
-static int handle_freq(struct nl80211_state *state,
-                      struct nl_cb *cb, struct nl_msg *msg,
+static int handle_freq(struct nl80211_state *state, struct nl_msg *msg,
                       int argc, char **argv,
                       enum id_input id)
 {
@@ -159,8 +156,7 @@ COMMAND(set, freq, "<freq> [HT20|HT40+|HT40-]\n"
                   "<control freq> [20|40|80|80+80|160] [<center freq 1>] [<center freq 2>]",
        NL80211_CMD_SET_WIPHY, 0, CIB_NETDEV, handle_freq, NULL);
 
-static int handle_chan(struct nl80211_state *state,
-                      struct nl_cb *cb, struct nl_msg *msg,
+static int handle_chan(struct nl80211_state *state, struct nl_msg *msg,
                       int argc, char **argv,
                       enum id_input id)
 {
@@ -172,7 +168,7 @@ COMMAND(set, channel, "<channel> [HT20|HT40+|HT40-]",
        NL80211_CMD_SET_WIPHY, 0, CIB_NETDEV, handle_chan, NULL);
 
 static int handle_fragmentation(struct nl80211_state *state,
-                               struct nl_cb *cb, struct nl_msg *msg,
+                               struct nl_msg *msg,
                                int argc, char **argv,
                                enum id_input id)
 {
@@ -204,7 +200,7 @@ COMMAND(set, frag, "<fragmentation threshold|off>",
        "Set fragmentation threshold.");
 
 static int handle_rts(struct nl80211_state *state,
-                     struct nl_cb *cb, struct nl_msg *msg,
+                     struct nl_msg *msg,
                      int argc, char **argv,
                      enum id_input id)
 {
@@ -236,7 +232,7 @@ COMMAND(set, rts, "<rts threshold|off>",
        "Set rts threshold.");
 
 static int handle_retry(struct nl80211_state *state,
-                       struct nl_cb *cb, struct nl_msg *msg,
+                       struct nl_msg *msg,
                        int argc, char **argv, enum id_input id)
 {
        unsigned int retry_short = 0, retry_long = 0;
@@ -302,7 +298,7 @@ COMMAND(set, retry, "[short <limit>] [long <limit>]",
 #ifndef NETNS_RUN_DIR
 #define NETNS_RUN_DIR "/var/run/netns"
 #endif
-int netns_get_fd(const char *name)
+static int netns_get_fd(const char *name)
 {
        char pathbuf[MAXPATHLEN];
        const char *path, *ptr;
@@ -318,7 +314,6 @@ int netns_get_fd(const char *name)
 }
 
 static int handle_netns(struct nl80211_state *state,
-                       struct nl_cb *cb,
                        struct nl_msg *msg,
                        int argc, char **argv,
                        enum id_input id)
@@ -362,7 +357,6 @@ COMMAND(set, netns, "{ <pid> | name <nsname> }",
        "               or by absolute path (man ip-netns)\n");
 
 static int handle_coverage(struct nl80211_state *state,
-                       struct nl_cb *cb,
                        struct nl_msg *msg,
                        int argc, char **argv,
                        enum id_input id)
@@ -394,7 +388,6 @@ COMMAND(set, coverage, "<coverage class>",
        "Valid values: 0 - 255.");
 
 static int handle_distance(struct nl80211_state *state,
-                       struct nl_cb *cb,
                        struct nl_msg *msg,
                        int argc, char **argv,
                        enum id_input id)
@@ -442,7 +435,6 @@ COMMAND(set, distance, "<auto|distance>",
        "Valid values: 0 - 114750");
 
 static int handle_txpower(struct nl80211_state *state,
-                         struct nl_cb *cb,
                          struct nl_msg *msg,
                          int argc, char **argv,
                          enum id_input id)
@@ -494,7 +486,6 @@ COMMAND(set, txpower, "<auto|fixed|limit> [<tx power in mBm>]",
        "Specify transmit power level and setting type.");
 
 static int handle_antenna(struct nl80211_state *state,
-                         struct nl_cb *cb,
                          struct nl_msg *msg,
                          int argc, char **argv,
                          enum id_input id)