From owner-svn-src-projects@FreeBSD.ORG Fri Jul 3 18:33:08 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6DE111065674; Fri, 3 Jul 2009 18:33:08 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5D2138FC08; Fri, 3 Jul 2009 18:33:08 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n63IX8N7085359; Fri, 3 Jul 2009 18:33:08 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n63IX8wa085357; Fri, 3 Jul 2009 18:33:08 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <200907031833.n63IX8wa085357@svn.freebsd.org> From: Rui Paulo Date: Fri, 3 Jul 2009 18:33:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r195321 - projects/mesh11s/sbin/ifconfig X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Jul 2009 18:33:08 -0000 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