]> git.ipfire.org Git - thirdparty/iw.git/commitdiff
add p2p interface types
authorJohannes Berg <johannes@sipsolutions.net>
Wed, 29 Sep 2010 12:45:28 +0000 (14:45 +0200)
committerJohannes Berg <johannes@sipsolutions.net>
Wed, 29 Sep 2010 12:45:28 +0000 (14:45 +0200)
interface.c
util.c

index 7d9fc8b6cb5cf3c411c0b19e83c385ca77eb75d5..0c4aa78f1a7e9abdde64ebf743535c23c02efd88 100644 (file)
@@ -130,6 +130,12 @@ static int get_if_type(int *argc, char ***argv, enum nl80211_iftype *type,
                   strcmp(tpstr, "mesh") == 0) {
                *type = NL80211_IFTYPE_MESH_POINT;
                return 0;
+       } else if (strcmp(tpstr, "__p2pcl") == 0) {
+               *type = NL80211_IFTYPE_P2P_CLIENT;
+               return 0;
+       } else if (strcmp(tpstr, "__p2pgo") == 0) {
+               *type = NL80211_IFTYPE_P2P_GO;
+               return 0;
        }
 
        fprintf(stderr, "invalid interface type %s\n", tpstr);
diff --git a/util.c b/util.c
index 80d5402e97274ce5e59b77011b9d5cdd31b8dd9c..7e4045713f730b7d0260fe03d43d2e523c597a42 100644 (file)
--- a/util.c
+++ b/util.c
@@ -93,7 +93,9 @@ static const char *ifmodes[NL80211_IFTYPE_MAX + 1] = {
        "AP/VLAN",
        "WDS",
        "monitor",
-       "mesh point"
+       "mesh point",
+       "P2P-client",
+       "P2P-GO",
 };
 
 static char modebuf[100];