From owner-svn-src-projects@FreeBSD.ORG Tue Jun 9 19:47:37 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 8F34B10656A5; Tue, 9 Jun 2009 19:47:37 +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 63C3E8FC26; Tue, 9 Jun 2009 19:47:37 +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 n59JlbhC081699; Tue, 9 Jun 2009 19:47:37 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n59Jlb8A081698; Tue, 9 Jun 2009 19:47:37 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <200906091947.n59Jlb8A081698@svn.freebsd.org> From: Rui Paulo Date: Tue, 9 Jun 2009 19:47:37 +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: r193849 - 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: Tue, 09 Jun 2009 19:47:37 -0000 Author: rpaulo Date: Tue Jun 9 19:47:37 2009 New Revision: 193849 URL: http://svn.freebsd.org/changeset/base/193849 Log: Add meshpeering and meshforward commands to enable disable respective mesh bits. Rename list routes to list hwmp. 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 Tue Jun 9 19:19:16 2009 (r193848) +++ projects/mesh11s/sbin/ifconfig/ifieee80211.c Tue Jun 9 19:47:37 2009 (r193849) @@ -1783,6 +1783,18 @@ DECL_CMD_FUNC(set80211tdmabintval, val, set80211(s, IEEE80211_IOC_TDMA_BINTERVAL, atoi(val), 0, NULL); } +static +DECL_CMD_FUNC(set80211meshforward, val, d) +{ + set80211(s, IEEE80211_IOC_MESH_FWRD, atoi(val), 0, NULL); +} + +static +DECL_CMD_FUNC(set80211meshpeering, val, d) +{ + set80211(s, IEEE80211_IOC_MESH_AP, atoi(val), 0, NULL); +} + static int regdomain_sort(const void *a, const void *b) { @@ -3880,7 +3892,7 @@ list_regdomain(int s, int channelsalso) } static void -list_routes(int s) +list_hwmp(int s) { int i; struct ieee80211req ireq; @@ -3950,8 +3962,8 @@ DECL_CMD_FUNC(set80211list, arg, d) list_countries(); else if (iseq(arg, "mesh")) list_mesh(s); - else if (iseq(arg, "routes")) - list_routes(s); + else if (iseq(arg, "hwmp")) + list_hwmp(s); else errx(1, "Don't know how to list %s for %s", arg, name); LINE_BREAK(); @@ -4717,6 +4729,22 @@ end: LINE_BREAK(); list_wme(s); } + + if (opmode == IEEE80211_M_MBSS) { + if (get80211val(s, IEEE80211_IOC_MESH_AP, &val) != -1) { + if (val) + LINE_CHECK("meshpeering"); + else + LINE_CHECK("-meshpeering"); + } + if (get80211val(s, IEEE80211_IOC_MESH_FWRD, &val) != -1) { + if (val) + LINE_CHECK("meshforward"); + else + LINE_CHECK("-meshforward"); + } + } + LINE_BREAK(); } @@ -5113,6 +5141,9 @@ static struct cmd ieee80211_cmds[] = { DEF_CMD_ARG("tdmaslotlen", set80211tdmaslotlen), DEF_CMD_ARG("tdmabintval", set80211tdmabintval), + DEF_CMD_ARG("meshforward", set80211meshforward), + DEF_CMD_ARG("meshpeering", set80211meshpeering), + /* vap cloning support */ DEF_CLONE_CMD_ARG("wlanaddr", set80211clone_wlanaddr), DEF_CLONE_CMD_ARG("wlanbssid", set80211clone_wlanbssid),