]> git.ipfire.org Git - thirdparty/iw.git/commitdiff
iw: nan: Add NAN interface type
authorAndrei Otcheretianski <andrei.otcheretianski@intel.com>
Thu, 3 Sep 2015 11:13:17 +0000 (14:13 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 18 Oct 2016 05:44:25 +0000 (07:44 +0200)
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
interface.c
util.c

index dfa1d5eacd7608ace4e4f73825c1da5c53c9d8e7..57dd3c325308dbb30a31cc9ce90a760efd0fd18e 100644 (file)
@@ -203,6 +203,9 @@ static int get_if_type(int *argc, char ***argv, enum nl80211_iftype *type,
        } else if (strcmp(tpstr, "__p2pgo") == 0) {
                *type = NL80211_IFTYPE_P2P_GO;
                return 0;
+       } else if (strcmp(tpstr, "__nan") == 0) {
+               *type = NL80211_IFTYPE_NAN;
+               return 0;
        }
 
        fprintf(stderr, "invalid interface type %s\n", tpstr);
diff --git a/util.c b/util.c
index 9083e452f27ceaa9235495e5d5d8ee08a3159d03..a338464337d1220211874623dc0ec63a4940ec6e 100644 (file)
--- a/util.c
+++ b/util.c
@@ -134,6 +134,7 @@ static const char *ifmodes[NL80211_IFTYPE_MAX + 1] = {
        "P2P-GO",
        "P2P-device",
        "outside context of a BSS",
+       "NAN",
 };
 
 static char modebuf[100];