svn commit: r195321 - projects/mesh11s/sbin/ifconfig
Rui Paulo
rpaulo at FreeBSD.org
Fri Jul 3 18:33:08 UTC 2009
Author: rpaulo
Date: Fri Jul 3 18:33:08 2009
New Revision: 195321
URL: http://svn.freebsd.org/changeset/base/195321
Log:
Specify the rootmode by string, not by number.
Sponsored by: The FreeBSD Foundation
Modified:
projects/mesh11s/sbin/ifconfig/ifieee80211.c
Modified: projects/mesh11s/sbin/ifconfig/ifieee80211.c
==============================================================================
--- projects/mesh11s/sbin/ifconfig/ifieee80211.c Fri Jul 3 18:31:14 2009 (r195320)
+++ projects/mesh11s/sbin/ifconfig/ifieee80211.c Fri Jul 3 18:33:08 2009 (r195321)
@@ -1320,7 +1320,17 @@ DECL_CMD_FUNC(set80211hwmpcmd, val, d)
static
DECL_CMD_FUNC(set80211hwmprootmode, val, d)
{
- set80211(s, IEEE80211_IOC_HWMP_ROOTMODE, atoi(val), 0, NULL);
+ int mode;
+
+ if (strcasecmp(val, "normal") == 0)
+ mode = IEEE80211_HWMP_ROOTMODE_NORMAL;
+ else if (strcasecmp(val, "proactive") == 0)
+ mode = IEEE80211_HWMP_ROOTMODE_PROACTIVE;
+ else if (strcasecmp(val, "rann") == 0)
+ mode = IEEE80211_HWMP_ROOTMODE_RANN;
+ else
+ mode = IEEE80211_HWMP_ROOTMODE_DISABLED;
+ set80211(s, IEEE80211_IOC_HWMP_ROOTMODE, mode, 0, NULL);
}
static
More information about the svn-src-projects
mailing list