Date: Fri, 3 Jul 2009 18:33:08 +0000 (UTC) From: Rui Paulo <rpaulo@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r195321 - projects/mesh11s/sbin/ifconfig Message-ID: <200907031833.n63IX8wa085357@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200907031833.n63IX8wa085357>