From owner-freebsd-embedded@FreeBSD.ORG Sun Apr 21 03:27:45 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 571B89BE; Sun, 21 Apr 2013 03:27:45 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-we0-x236.google.com (mail-we0-x236.google.com [IPv6:2a00:1450:400c:c03::236]) by mx1.freebsd.org (Postfix) with ESMTP id C2A559B; Sun, 21 Apr 2013 03:27:44 +0000 (UTC) Received: by mail-we0-f182.google.com with SMTP id m1so4998272wea.27 for ; Sat, 20 Apr 2013 20:27:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:sender:date:x-google-sender-auth:message-id :subject:from:to:cc:content-type; bh=HIfongEEHcKnzaNt7J1wg8khonGBwXyIVF8p1T1CboM=; b=QeK+0PWGhPQTdP61Xw9T9JkGefX6QKSufda7Hailimiy0IlNlOW/IvbJzMO3on9SV1 M4GrLkm5QAN/D49jrMDC/ElkbyzFfBHDn8lqk7aMKU/9Ho/DNz08lOQpjKRTnz4R8C9B C+ZWZUJGCSirbZ4ariczSdbUwHRT2c94u5v7ENIJ87AwE9g6rgUnEAB/40kSulCNf/Eb kQeal8YbNsOGaRFQ6lLWggESDNo1VGV3n+XFyLOCPCwlKyeOhV4FCjIHWa1jr45ksSoa O2q9tBEI3v4cTY7GXFPYyVjRC9OVdt+g4Xf51lZ8wNfkVpCsKboXCiiv+XShTfUtafG7 MEpQ== MIME-Version: 1.0 X-Received: by 10.194.222.100 with SMTP id ql4mr39272008wjc.59.1366514863233; Sat, 20 Apr 2013 20:27:43 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.217.88.129 with HTTP; Sat, 20 Apr 2013 20:27:43 -0700 (PDT) Date: Sat, 20 Apr 2013 20:27:43 -0700 X-Google-Sender-Auth: G21_ly6-_wpH5LIZc2MuHc8wIok Message-ID: Subject: Offer: I'm going to automate FreeBSD-wireless AP builds, but what I need is hardware.. From: Adrian Chadd To: freebsd-wireless@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-embedded@freebsd.org X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Apr 2013 03:27:45 -0000 Hiya, Now that the missing piece of support is almost done (hostap mode powersave/pspoll support) I'm going to move onto the next thing - doing automated FreeBSD builds for people to run on AP equipment. What I have that is publicly available: * Ubiquiti Routerstation * Ubiquiti Routerstation Pro * D-Link DIR-825 * TP-Link TL-WR1043nd .. and lots of Atheros reference designs that are almost-but-not-quite what people actually ship. :-) I've had plenty of people ask me if I can supply builds for their various wifi APs so they don't have to build the software themselves. So here's my offer - if you'd like me to add to the above list of hardware that I'll do automatic builds for, I'll need some hardware. If you send me a supported AP, I'll snaffle the relevant bits from linux/openwrt/atheros and stick it into my build list. The 'supported hardware" list: * .. openwrt runs on it. :-) * anything with an Atheros MIPS24k core - AR71xx, AR913x, AR724x, AR933x * Atheros 802.11n wifi * At least 32MB RAM * At least 8MB of flash The last two are annoying - yes, we could fit inside 16MB RAM and 4MB flash, but we need a lot more work done on the FreeBSD side. So I'm setting the minimum bar there. If you don't know what hardware is in the unit - take a look at the openwrt wiki. I'm just wrapping up some automated build scripts now and I expect to start building test images in the next week or so. Thanks! Adrian From owner-freebsd-embedded@FreeBSD.ORG Sun Apr 21 05:07:41 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 10FF9523 for ; Sun, 21 Apr 2013 05:07:41 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-ie0-x229.google.com (mail-ie0-x229.google.com [IPv6:2607:f8b0:4001:c03::229]) by mx1.freebsd.org (Postfix) with ESMTP id D716766A for ; Sun, 21 Apr 2013 05:07:40 +0000 (UTC) Received: by mail-ie0-f169.google.com with SMTP id ar20so6056349iec.14 for ; Sat, 20 Apr 2013 22:07:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:sender:subject:mime-version:content-type:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to:x-mailer:x-gm-message-state; bh=o5Vu+H43xP4Sp5/mhU/M4QvPgrl5fvaoXpqNegOj76k=; b=K5nJlmw0X+KGEyV+eRHXfHUXjFllHwNtAgO8SSYAPA2vMy/GtFRxTIDQpPMc6mbisL xpZOF3Za59t7n2jTBQ9XuakMjRCndMDK7GKCKEeR5LKPOhqzn0Fw07MHNTIg2HpwptnI jL2BWzI8f9TjwTCagyvMi9uPt0C8zx0zRXkBoYGP0D9ifqI/q+vK9ai9HdQSERSJXP01 tNZdPGevSyPfbEaIyP5MFNnQ4z6Xawuyy+CF26lisDwogiMhNeSqjmy9ZBqYUdLNMJMO kBnHmtuFuUmupApFOm2J0lDBpDp9N4SE/HFk2qTGlEd4/KHZK3aDoD2KnTttVss8iQTH lWsw== X-Received: by 10.50.73.198 with SMTP id n6mr5379531igv.34.1366520860461; Sat, 20 Apr 2013 22:07:40 -0700 (PDT) Received: from 53.imp.bsdimp.com (50-78-194-198-static.hfc.comcastbusiness.net. [50.78.194.198]) by mx.google.com with ESMTPS id dy5sm11394510igc.1.2013.04.20.22.07.38 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 20 Apr 2013 22:07:39 -0700 (PDT) Sender: Warner Losh Subject: Re: Offer: I'm going to automate FreeBSD-wireless AP builds, but what I need is hardware.. Mime-Version: 1.0 (Apple Message framework v1085) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: Date: Sat, 20 Apr 2013 23:07:37 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: References: To: Adrian Chadd X-Mailer: Apple Mail (2.1085) X-Gm-Message-State: ALoCoQmRTwoeqZHM2+C04hQgAAMB7pi9G2vYgyAFsZE4EVVgDEhprAn7CoAefKAcBGGXuG+zsm04 Cc: freebsd-wireless@freebsd.org, freebsd-embedded@freebsd.org X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Apr 2013 05:07:41 -0000 On Apr 20, 2013, at 9:27 PM, Adrian Chadd wrote: > Hiya, >=20 > Now that the missing piece of support is almost done (hostap mode > powersave/pspoll support) I'm going to move onto the next thing - > doing automated FreeBSD builds for people to run on AP equipment. >=20 > What I have that is publicly available: >=20 > * Ubiquiti Routerstation > * Ubiquiti Routerstation Pro > * D-Link DIR-825 > * TP-Link TL-WR1043nd >=20 > .. and lots of Atheros reference designs that are almost-but-not-quite > what people actually ship. :-) >=20 > I've had plenty of people ask me if I can supply builds for their > various wifi APs so they don't have to build the software themselves. >=20 > So here's my offer - if you'd like me to add to the above list of > hardware that I'll do automatic builds for, I'll need some hardware. > If you send me a supported AP, I'll snaffle the relevant bits from > linux/openwrt/atheros and stick it into my build list. >=20 > The 'supported hardware" list: >=20 > * .. openwrt runs on it. :-) > * anything with an Atheros MIPS24k core - AR71xx, AR913x, AR724x, = AR933x > * Atheros 802.11n wifi > * At least 32MB RAM > * At least 8MB of flash >=20 > The last two are annoying - yes, we could fit inside 16MB RAM and 4MB > flash, but we need a lot more work done on the FreeBSD side. So I'm > setting the minimum bar there. >=20 > If you don't know what hardware is in the unit - take a look at the > openwrt wiki. >=20 > I'm just wrapping up some automated build scripts now and I expect to > start building test images in the next week or so. That sounds cool, but do we need another st of scripts to build images? = What does yours give that others don't :) Warner= From owner-freebsd-embedded@FreeBSD.ORG Sun Apr 21 05:08:58 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id CEDFB56B; Sun, 21 Apr 2013 05:08:58 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wi0-x229.google.com (mail-wi0-x229.google.com [IPv6:2a00:1450:400c:c05::229]) by mx1.freebsd.org (Postfix) with ESMTP id 4330D678; Sun, 21 Apr 2013 05:08:58 +0000 (UTC) Received: by mail-wi0-f169.google.com with SMTP id h11so2915577wiv.4 for ; Sat, 20 Apr 2013 22:08:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=XxP/mJNbpRJeBbpfQoL5QZ39V03rVi4wrkFmlJjU6sM=; b=q46n+4CtjZNZ1Rdhd3uNgnBBxCKUaEoG42/kIX0wE7LACN80cmX6y3samh3NP5EgKj PsZ3RGwwLFjtJFOeBhuQwCXSJba10NGCF+yNhP7G3zvGg+Vi60RSjPx0EGH+/046z4B3 fpc0e6Zl6xfniNDRpGDOmMgwuTXH2d7ktYSn2zmGCWCE8P0QSFP7oksnT9pH9Yk0JD6N QelQgctM0bWKzuNmX5IXiB1oV3JBTALO3AsVw6HJx897pR/lr/7BekOg1I1w5287zIVw MFXW4I8hhBqzg/MF/su44WDQ2QjvxBvxoh+8y2IruVpkondC+3a6DJbc8mmGHpm5Z+sX Qc5A== MIME-Version: 1.0 X-Received: by 10.194.142.236 with SMTP id rz12mr40066546wjb.12.1366520937365; Sat, 20 Apr 2013 22:08:57 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.217.88.129 with HTTP; Sat, 20 Apr 2013 22:08:57 -0700 (PDT) In-Reply-To: References: Date: Sat, 20 Apr 2013 22:08:57 -0700 X-Google-Sender-Auth: wjX63C9_BEDK1f6UpgVhFw6vD8g Message-ID: Subject: Re: Offer: I'm going to automate FreeBSD-wireless AP builds, but what I need is hardware.. From: Adrian Chadd To: Warner Losh Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-wireless@freebsd.org, freebsd-embedded@freebsd.org X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Apr 2013 05:08:58 -0000 On 20 April 2013 22:07, Warner Losh wrote: >> I'm just wrapping up some automated build scripts now and I expect to >> start building test images in the next week or so. > > That sounds cool, but do we need another st of scripts to build images? What does yours give that others don't :) nothing in the short term; I'm going to talk about it at bsdcan and see if we can sort out some unification between the arm peeps, me and -head. adrian From owner-freebsd-embedded@FreeBSD.ORG Mon Apr 22 05:30:01 2013 Return-Path: Delivered-To: freebsd-embedded@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id ADFC910C for ; Mon, 22 Apr 2013 05:30:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id A174910EB for ; Mon, 22 Apr 2013 05:30:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r3M5U1UH021817 for ; Mon, 22 Apr 2013 05:30:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r3M5U1lw021816; Mon, 22 Apr 2013 05:30:01 GMT (envelope-from gnats) Date: Mon, 22 Apr 2013 05:30:01 GMT Message-Id: <201304220530.r3M5U1lw021816@freefall.freebsd.org> To: freebsd-embedded@FreeBSD.org Cc: From: dfilter@FreeBSD.ORG (dfilter service) Subject: Re: bin/177871: commit references a PR X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: dfilter service List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Apr 2013 05:30:01 -0000 The following reply was made to PR bin/177871; it has been noted by GNATS. From: dfilter@FreeBSD.ORG (dfilter service) To: bug-followup@FreeBSD.org Cc: Subject: Re: bin/177871: commit references a PR Date: Mon, 22 Apr 2013 05:27:21 +0000 (UTC) Author: adrian Date: Mon Apr 22 05:27:13 2013 New Revision: 249747 URL: http://svnweb.freebsd.org/changeset/base/249747 Log: Initialise this to zero before using it to configure the vlangroup information. PR: kern/177871 Submitted by: Luiz Otavio O Souza Modified: head/sbin/etherswitchcfg/etherswitchcfg.c Modified: head/sbin/etherswitchcfg/etherswitchcfg.c ============================================================================== --- head/sbin/etherswitchcfg/etherswitchcfg.c Mon Apr 22 05:02:34 2013 (r249746) +++ head/sbin/etherswitchcfg/etherswitchcfg.c Mon Apr 22 05:27:13 2013 (r249747) @@ -139,6 +139,7 @@ set_port_vlangroup(struct cfg *cfg, char v = strtol(argv[1], NULL, 0); if (v < 0 || v >= cfg->info.es_nvlangroups) errx(EX_USAGE, "vlangroup must be between 0 and %d", cfg->info.es_nvlangroups-1); + bzero(&p, sizeof(p)); p.es_port = cfg->unit; if (ioctl(cfg->fd, IOETHERSWITCHGETPORT, &p) != 0) err(EX_OSERR, "ioctl(IOETHERSWITCHGETPORT)"); _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-freebsd-embedded@FreeBSD.ORG Mon Apr 22 05:40:01 2013 Return-Path: Delivered-To: freebsd-embedded@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 76B5F4CA for ; Mon, 22 Apr 2013 05:40:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 6954E113B for ; Mon, 22 Apr 2013 05:40:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r3M5e1eH023507 for ; Mon, 22 Apr 2013 05:40:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r3M5e172023506; Mon, 22 Apr 2013 05:40:01 GMT (envelope-from gnats) Date: Mon, 22 Apr 2013 05:40:01 GMT Message-Id: <201304220540.r3M5e172023506@freefall.freebsd.org> To: freebsd-embedded@FreeBSD.org Cc: From: dfilter@FreeBSD.ORG (dfilter service) Subject: Re: bin/177872: commit references a PR X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: dfilter service List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Apr 2013 05:40:01 -0000 The following reply was made to PR bin/177872; it has been noted by GNATS. From: dfilter@FreeBSD.ORG (dfilter service) To: bug-followup@FreeBSD.org Cc: Subject: Re: bin/177872: commit references a PR Date: Mon, 22 Apr 2013 05:30:27 +0000 (UTC) Author: adrian Date: Mon Apr 22 05:30:20 2013 New Revision: 249748 URL: http://svnweb.freebsd.org/changeset/base/249748 Log: etherswitchcfg(8) crashes when you don't set vlangroup members. Fix this to require an argument. PR: kern/177872 Submitted by: Luiz Otavio O Souza Modified: head/sbin/etherswitchcfg/etherswitchcfg.c Modified: head/sbin/etherswitchcfg/etherswitchcfg.c ============================================================================== --- head/sbin/etherswitchcfg/etherswitchcfg.c Mon Apr 22 05:27:13 2013 (r249747) +++ head/sbin/etherswitchcfg/etherswitchcfg.c Mon Apr 22 05:30:20 2013 (r249748) @@ -467,8 +467,11 @@ main(int argc, char *argv[]) case MODE_PORT: case MODE_VLANGROUP: for(i=0; cmds[i].name != NULL; i++) { - if (cfg.mode == cmds[i].mode && strcmp(argv[0], cmds[i].name) == 0 - && argc >= cmds[i].args) { + if (cfg.mode == cmds[i].mode && strcmp(argv[0], cmds[i].name) == 0) { + if (argc < (cmds[i].args + 1)) { + printf("%s needs an argument\n", cmds[i].name); + break; + } (cmds[i].f)(&cfg, argv); argc -= cmds[i].args; argv += cmds[i].args; _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-freebsd-embedded@FreeBSD.ORG Mon Apr 22 06:00:01 2013 Return-Path: Delivered-To: freebsd-embedded@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 6B281A25 for ; Mon, 22 Apr 2013 06:00:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 4E3D711CD for ; Mon, 22 Apr 2013 06:00:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r3M601Co027072 for ; Mon, 22 Apr 2013 06:00:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r3M601wL027069; Mon, 22 Apr 2013 06:00:01 GMT (envelope-from gnats) Date: Mon, 22 Apr 2013 06:00:01 GMT Message-Id: <201304220600.r3M601wL027069@freefall.freebsd.org> To: freebsd-embedded@FreeBSD.org Cc: From: dfilter@FreeBSD.ORG (dfilter service) Subject: Re: kern/177878: commit references a PR X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: dfilter service List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Apr 2013 06:00:01 -0000 The following reply was made to PR kern/177878; it has been noted by GNATS. From: dfilter@FreeBSD.ORG (dfilter service) To: bug-followup@FreeBSD.org Cc: Subject: Re: kern/177878: commit references a PR Date: Mon, 22 Apr 2013 05:52:39 +0000 (UTC) Author: adrian Date: Mon Apr 22 05:52:18 2013 New Revision: 249752 URL: http://svnweb.freebsd.org/changeset/base/249752 Log: Convert over the etherswitch framework to use VLAN IDs per port, rather than VLAN groups. Some chips (eg this rtl8366rb) has a VLAN group per port - you first define a set of VLANs in a vlan group, then you assign a VLAN group to a port. Other chips (eg the AR8xxx switch chips) have a VLAN ID array per port - there's no group per se, just a list of vlans that can be configured. So for now, the switch API will use the latter and rely on drivers doing the heavy lifting if one wishes to use the VLAN group method. Maybe later on both can be supported. PR: kern/177878 PR: kern/177873 Submitted by: Luiz Otavio O Souza Reviewed by: ray Modified: head/sbin/etherswitchcfg/etherswitchcfg.8 head/sbin/etherswitchcfg/etherswitchcfg.c head/sys/dev/etherswitch/etherswitch.h head/sys/dev/etherswitch/rtl8366/rtl8366rb.c Modified: head/sbin/etherswitchcfg/etherswitchcfg.8 ============================================================================== --- head/sbin/etherswitchcfg/etherswitchcfg.8 Mon Apr 22 05:52:06 2013 (r249751) +++ head/sbin/etherswitchcfg/etherswitchcfg.8 Mon Apr 22 05:52:18 2013 (r249752) @@ -62,9 +62,9 @@ To set the register value, use the form .Ss port The port command selects one of the ports of the switch. It supports the following commands: -.Bl -tag -width ".Ar vlangroup number" -compact -.It Ar vlangroup number -Sets the VLAN group number that is used to process incoming frames that are not tagged. +.Bl -tag -width ".Ar pvid number" -compact +.It Ar pvid number +Sets the default port VID that is used to process incoming frames that are not tagged. .It Ar media mediaspec Specifies the physical media configuration to be configured for a port. .It Ar mediaopt mediaoption @@ -104,7 +104,7 @@ Configure VLAN group 1 with a VID of 2 a while excluding all other ports. Port 5 will send and receive tagged frames, while port 0 will be untagged. Incoming untagged frames on port 0 are assigned to vlangroup1. -.Dl # etherswitchcfg vlangroup1 vlan 2 members 0,5t port0 vlangroup 1 +.Dl # etherswitchcfg vlangroup1 vlan 2 members 0,5t port0 pvid 2 .Sh SEE ALSO .Xr etherswitch 4 .Sh HISTORY Modified: head/sbin/etherswitchcfg/etherswitchcfg.c ============================================================================== --- head/sbin/etherswitchcfg/etherswitchcfg.c Mon Apr 22 05:52:06 2013 (r249751) +++ head/sbin/etherswitchcfg/etherswitchcfg.c Mon Apr 22 05:52:18 2013 (r249752) @@ -131,19 +131,20 @@ write_phyregister(struct cfg *cfg, int p } static void -set_port_vlangroup(struct cfg *cfg, char *argv[]) +set_port_vid(struct cfg *cfg, char *argv[]) { int v; etherswitch_port_t p; v = strtol(argv[1], NULL, 0); - if (v < 0 || v >= cfg->info.es_nvlangroups) - errx(EX_USAGE, "vlangroup must be between 0 and %d", cfg->info.es_nvlangroups-1); + if (v < 0 || v > IEEE802DOT1Q_VID_MAX) + errx(EX_USAGE, "pvid must be between 0 and %d", + IEEE802DOT1Q_VID_MAX); bzero(&p, sizeof(p)); p.es_port = cfg->unit; if (ioctl(cfg->fd, IOETHERSWITCHGETPORT, &p) != 0) err(EX_OSERR, "ioctl(IOETHERSWITCHGETPORT)"); - p.es_vlangroup = v; + p.es_pvid = v; if (ioctl(cfg->fd, IOETHERSWITCHSETPORT, &p) != 0) err(EX_OSERR, "ioctl(IOETHERSWITCHSETPORT)"); } @@ -302,7 +303,7 @@ print_port(struct cfg *cfg, int port) if (ioctl(cfg->fd, IOETHERSWITCHGETPORT, &p) != 0) err(EX_OSERR, "ioctl(IOETHERSWITCHGETPORT)"); printf("port%d:\n", port); - printf("\tvlangroup: %d\n", p.es_vlangroup); + printf("\tpvid: %d\n", p.es_pvid); printf("\tmedia: "); print_media_word(p.es_ifmr.ifm_current, 1); if (p.es_ifmr.ifm_active != p.es_ifmr.ifm_current) { @@ -506,7 +507,7 @@ main(int argc, char *argv[]) } static struct cmds cmds[] = { - { MODE_PORT, "vlangroup", 1, set_port_vlangroup }, + { MODE_PORT, "pvid", 1, set_port_vid }, { MODE_PORT, "media", 1, set_port_media }, { MODE_PORT, "mediaopt", 1, set_port_mediaopt }, { MODE_VLANGROUP, "vlan", 1, set_vlangroup_vid }, Modified: head/sys/dev/etherswitch/etherswitch.h ============================================================================== --- head/sys/dev/etherswitch/etherswitch.h Mon Apr 22 05:52:06 2013 (r249751) +++ head/sys/dev/etherswitch/etherswitch.h Mon Apr 22 05:52:18 2013 (r249752) @@ -36,7 +36,7 @@ typedef struct etherswitch_info etherswi struct etherswitch_port { int es_port; - int es_vlangroup; + int es_pvid; union { struct ifreq es_uifr; struct ifmediareq es_uifmr; Modified: head/sys/dev/etherswitch/rtl8366/rtl8366rb.c ============================================================================== --- head/sys/dev/etherswitch/rtl8366/rtl8366rb.c Mon Apr 22 05:52:06 2013 (r249751) +++ head/sys/dev/etherswitch/rtl8366/rtl8366rb.c Mon Apr 22 05:52:18 2013 (r249752) @@ -63,6 +63,7 @@ struct rtl8366rb_softc { int smi_acquired; /* serialize access to SMI/I2C bus */ struct mtx callout_mtx; /* serialize callout */ device_t dev; + int vid[RTL8366RB_NUM_VLANS]; char *ifname[RTL8366RB_NUM_PHYS]; device_t miibus[RTL8366RB_NUM_PHYS]; struct ifnet *ifp[RTL8366RB_NUM_PHYS]; @@ -70,8 +71,8 @@ struct rtl8366rb_softc { }; static etherswitch_info_t etherswitch_info = { - .es_nports = 6, - .es_nvlangroups = 16, + .es_nports = RTL8366RB_NUM_PORTS, + .es_nvlangroups = RTL8366RB_NUM_VLANS, .es_name = "Realtek RTL8366RB" }; @@ -550,15 +551,16 @@ rtl_getport(device_t dev, etherswitch_po struct mii_data *mii; struct ifmediareq *ifmr = &p->es_ifmr; uint16_t v; - int err; + int err, vlangroup; if (p->es_port < 0 || p->es_port >= RTL8366RB_NUM_PORTS) return (ENXIO); - p->es_vlangroup = RTL8366RB_PVCR_GET(p->es_port, + sc = device_get_softc(dev); + vlangroup = RTL8366RB_PVCR_GET(p->es_port, rtl_readreg(dev, RTL8366RB_PVCR_REG(p->es_port))); + p->es_pvid = sc->vid[vlangroup]; if (p->es_port < RTL8366RB_NUM_PHYS) { - sc = device_get_softc(dev); mii = device_get_softc(sc->miibus[p->es_port]); ifm = &mii->mii_media; err = ifmedia_ioctl(sc->ifp[p->es_port], &p->es_ifr, ifm, SIOCGIFMEDIA); @@ -580,19 +582,28 @@ rtl_getport(device_t dev, etherswitch_po static int rtl_setport(device_t dev, etherswitch_port_t *p) { - int err; + int i, err, vlangroup; struct rtl8366rb_softc *sc; struct ifmedia *ifm; struct mii_data *mii; if (p->es_port < 0 || p->es_port >= RTL8366RB_NUM_PHYS) return (ENXIO); + sc = device_get_softc(dev); + vlangroup = -1; + for (i = 0; i < RTL8366RB_NUM_VLANS; i++) { + if (sc->vid[i] == p->es_pvid) { + vlangroup = i; + break; + } + } + if (vlangroup == -1) + return (ENXIO); err = smi_rmw(dev, RTL8366RB_PVCR_REG(p->es_port), RTL8366RB_PVCR_VAL(p->es_port, RTL8366RB_PVCR_PORT_MASK), - RTL8366RB_PVCR_VAL(p->es_port, p->es_vlangroup), RTL_WAITOK); + RTL8366RB_PVCR_VAL(p->es_port, vlangroup), RTL_WAITOK); if (err) return (err); - sc = device_get_softc(dev); mii = device_get_softc(sc->miibus[p->es_port]); ifm = &mii->mii_media; err = ifmedia_ioctl(sc->ifp[p->es_port], &p->es_ifr, ifm, SIOCSIFMEDIA); @@ -618,8 +629,11 @@ rtl_getvgroup(device_t dev, etherswitch_ static int rtl_setvgroup(device_t dev, etherswitch_vlangroup_t *vg) { + struct rtl8366rb_softc *sc; int g = vg->es_vlangroup; + sc = device_get_softc(dev); + sc->vid[g] = vg->es_vid; rtl_writereg(dev, RTL8366RB_VMCR(RTL8366RB_VMCR_DOT1Q_REG, g), (vg->es_vid << RTL8366RB_VMCR_DOT1Q_VID_SHIFT) & RTL8366RB_VMCR_DOT1Q_VID_MASK); rtl_writereg(dev, RTL8366RB_VMCR(RTL8366RB_VMCR_MU_REG, g), _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-freebsd-embedded@FreeBSD.ORG Mon Apr 22 06:00:02 2013 Return-Path: Delivered-To: freebsd-embedded@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 794F1A26 for ; Mon, 22 Apr 2013 06:00:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 5BCB911CE for ; Mon, 22 Apr 2013 06:00:02 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r3M602kH027079 for ; Mon, 22 Apr 2013 06:00:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r3M602sp027078; Mon, 22 Apr 2013 06:00:02 GMT (envelope-from gnats) Date: Mon, 22 Apr 2013 06:00:02 GMT Message-Id: <201304220600.r3M602sp027078@freefall.freebsd.org> To: freebsd-embedded@FreeBSD.org Cc: From: dfilter@FreeBSD.ORG (dfilter service) Subject: Re: bin/177873: commit references a PR X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: dfilter service List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Apr 2013 06:00:02 -0000 The following reply was made to PR bin/177873; it has been noted by GNATS. From: dfilter@FreeBSD.ORG (dfilter service) To: bug-followup@FreeBSD.org Cc: Subject: Re: bin/177873: commit references a PR Date: Mon, 22 Apr 2013 05:52:40 +0000 (UTC) Author: adrian Date: Mon Apr 22 05:52:18 2013 New Revision: 249752 URL: http://svnweb.freebsd.org/changeset/base/249752 Log: Convert over the etherswitch framework to use VLAN IDs per port, rather than VLAN groups. Some chips (eg this rtl8366rb) has a VLAN group per port - you first define a set of VLANs in a vlan group, then you assign a VLAN group to a port. Other chips (eg the AR8xxx switch chips) have a VLAN ID array per port - there's no group per se, just a list of vlans that can be configured. So for now, the switch API will use the latter and rely on drivers doing the heavy lifting if one wishes to use the VLAN group method. Maybe later on both can be supported. PR: kern/177878 PR: kern/177873 Submitted by: Luiz Otavio O Souza Reviewed by: ray Modified: head/sbin/etherswitchcfg/etherswitchcfg.8 head/sbin/etherswitchcfg/etherswitchcfg.c head/sys/dev/etherswitch/etherswitch.h head/sys/dev/etherswitch/rtl8366/rtl8366rb.c Modified: head/sbin/etherswitchcfg/etherswitchcfg.8 ============================================================================== --- head/sbin/etherswitchcfg/etherswitchcfg.8 Mon Apr 22 05:52:06 2013 (r249751) +++ head/sbin/etherswitchcfg/etherswitchcfg.8 Mon Apr 22 05:52:18 2013 (r249752) @@ -62,9 +62,9 @@ To set the register value, use the form .Ss port The port command selects one of the ports of the switch. It supports the following commands: -.Bl -tag -width ".Ar vlangroup number" -compact -.It Ar vlangroup number -Sets the VLAN group number that is used to process incoming frames that are not tagged. +.Bl -tag -width ".Ar pvid number" -compact +.It Ar pvid number +Sets the default port VID that is used to process incoming frames that are not tagged. .It Ar media mediaspec Specifies the physical media configuration to be configured for a port. .It Ar mediaopt mediaoption @@ -104,7 +104,7 @@ Configure VLAN group 1 with a VID of 2 a while excluding all other ports. Port 5 will send and receive tagged frames, while port 0 will be untagged. Incoming untagged frames on port 0 are assigned to vlangroup1. -.Dl # etherswitchcfg vlangroup1 vlan 2 members 0,5t port0 vlangroup 1 +.Dl # etherswitchcfg vlangroup1 vlan 2 members 0,5t port0 pvid 2 .Sh SEE ALSO .Xr etherswitch 4 .Sh HISTORY Modified: head/sbin/etherswitchcfg/etherswitchcfg.c ============================================================================== --- head/sbin/etherswitchcfg/etherswitchcfg.c Mon Apr 22 05:52:06 2013 (r249751) +++ head/sbin/etherswitchcfg/etherswitchcfg.c Mon Apr 22 05:52:18 2013 (r249752) @@ -131,19 +131,20 @@ write_phyregister(struct cfg *cfg, int p } static void -set_port_vlangroup(struct cfg *cfg, char *argv[]) +set_port_vid(struct cfg *cfg, char *argv[]) { int v; etherswitch_port_t p; v = strtol(argv[1], NULL, 0); - if (v < 0 || v >= cfg->info.es_nvlangroups) - errx(EX_USAGE, "vlangroup must be between 0 and %d", cfg->info.es_nvlangroups-1); + if (v < 0 || v > IEEE802DOT1Q_VID_MAX) + errx(EX_USAGE, "pvid must be between 0 and %d", + IEEE802DOT1Q_VID_MAX); bzero(&p, sizeof(p)); p.es_port = cfg->unit; if (ioctl(cfg->fd, IOETHERSWITCHGETPORT, &p) != 0) err(EX_OSERR, "ioctl(IOETHERSWITCHGETPORT)"); - p.es_vlangroup = v; + p.es_pvid = v; if (ioctl(cfg->fd, IOETHERSWITCHSETPORT, &p) != 0) err(EX_OSERR, "ioctl(IOETHERSWITCHSETPORT)"); } @@ -302,7 +303,7 @@ print_port(struct cfg *cfg, int port) if (ioctl(cfg->fd, IOETHERSWITCHGETPORT, &p) != 0) err(EX_OSERR, "ioctl(IOETHERSWITCHGETPORT)"); printf("port%d:\n", port); - printf("\tvlangroup: %d\n", p.es_vlangroup); + printf("\tpvid: %d\n", p.es_pvid); printf("\tmedia: "); print_media_word(p.es_ifmr.ifm_current, 1); if (p.es_ifmr.ifm_active != p.es_ifmr.ifm_current) { @@ -506,7 +507,7 @@ main(int argc, char *argv[]) } static struct cmds cmds[] = { - { MODE_PORT, "vlangroup", 1, set_port_vlangroup }, + { MODE_PORT, "pvid", 1, set_port_vid }, { MODE_PORT, "media", 1, set_port_media }, { MODE_PORT, "mediaopt", 1, set_port_mediaopt }, { MODE_VLANGROUP, "vlan", 1, set_vlangroup_vid }, Modified: head/sys/dev/etherswitch/etherswitch.h ============================================================================== --- head/sys/dev/etherswitch/etherswitch.h Mon Apr 22 05:52:06 2013 (r249751) +++ head/sys/dev/etherswitch/etherswitch.h Mon Apr 22 05:52:18 2013 (r249752) @@ -36,7 +36,7 @@ typedef struct etherswitch_info etherswi struct etherswitch_port { int es_port; - int es_vlangroup; + int es_pvid; union { struct ifreq es_uifr; struct ifmediareq es_uifmr; Modified: head/sys/dev/etherswitch/rtl8366/rtl8366rb.c ============================================================================== --- head/sys/dev/etherswitch/rtl8366/rtl8366rb.c Mon Apr 22 05:52:06 2013 (r249751) +++ head/sys/dev/etherswitch/rtl8366/rtl8366rb.c Mon Apr 22 05:52:18 2013 (r249752) @@ -63,6 +63,7 @@ struct rtl8366rb_softc { int smi_acquired; /* serialize access to SMI/I2C bus */ struct mtx callout_mtx; /* serialize callout */ device_t dev; + int vid[RTL8366RB_NUM_VLANS]; char *ifname[RTL8366RB_NUM_PHYS]; device_t miibus[RTL8366RB_NUM_PHYS]; struct ifnet *ifp[RTL8366RB_NUM_PHYS]; @@ -70,8 +71,8 @@ struct rtl8366rb_softc { }; static etherswitch_info_t etherswitch_info = { - .es_nports = 6, - .es_nvlangroups = 16, + .es_nports = RTL8366RB_NUM_PORTS, + .es_nvlangroups = RTL8366RB_NUM_VLANS, .es_name = "Realtek RTL8366RB" }; @@ -550,15 +551,16 @@ rtl_getport(device_t dev, etherswitch_po struct mii_data *mii; struct ifmediareq *ifmr = &p->es_ifmr; uint16_t v; - int err; + int err, vlangroup; if (p->es_port < 0 || p->es_port >= RTL8366RB_NUM_PORTS) return (ENXIO); - p->es_vlangroup = RTL8366RB_PVCR_GET(p->es_port, + sc = device_get_softc(dev); + vlangroup = RTL8366RB_PVCR_GET(p->es_port, rtl_readreg(dev, RTL8366RB_PVCR_REG(p->es_port))); + p->es_pvid = sc->vid[vlangroup]; if (p->es_port < RTL8366RB_NUM_PHYS) { - sc = device_get_softc(dev); mii = device_get_softc(sc->miibus[p->es_port]); ifm = &mii->mii_media; err = ifmedia_ioctl(sc->ifp[p->es_port], &p->es_ifr, ifm, SIOCGIFMEDIA); @@ -580,19 +582,28 @@ rtl_getport(device_t dev, etherswitch_po static int rtl_setport(device_t dev, etherswitch_port_t *p) { - int err; + int i, err, vlangroup; struct rtl8366rb_softc *sc; struct ifmedia *ifm; struct mii_data *mii; if (p->es_port < 0 || p->es_port >= RTL8366RB_NUM_PHYS) return (ENXIO); + sc = device_get_softc(dev); + vlangroup = -1; + for (i = 0; i < RTL8366RB_NUM_VLANS; i++) { + if (sc->vid[i] == p->es_pvid) { + vlangroup = i; + break; + } + } + if (vlangroup == -1) + return (ENXIO); err = smi_rmw(dev, RTL8366RB_PVCR_REG(p->es_port), RTL8366RB_PVCR_VAL(p->es_port, RTL8366RB_PVCR_PORT_MASK), - RTL8366RB_PVCR_VAL(p->es_port, p->es_vlangroup), RTL_WAITOK); + RTL8366RB_PVCR_VAL(p->es_port, vlangroup), RTL_WAITOK); if (err) return (err); - sc = device_get_softc(dev); mii = device_get_softc(sc->miibus[p->es_port]); ifm = &mii->mii_media; err = ifmedia_ioctl(sc->ifp[p->es_port], &p->es_ifr, ifm, SIOCSIFMEDIA); @@ -618,8 +629,11 @@ rtl_getvgroup(device_t dev, etherswitch_ static int rtl_setvgroup(device_t dev, etherswitch_vlangroup_t *vg) { + struct rtl8366rb_softc *sc; int g = vg->es_vlangroup; + sc = device_get_softc(dev); + sc->vid[g] = vg->es_vid; rtl_writereg(dev, RTL8366RB_VMCR(RTL8366RB_VMCR_DOT1Q_REG, g), (vg->es_vid << RTL8366RB_VMCR_DOT1Q_VID_SHIFT) & RTL8366RB_VMCR_DOT1Q_VID_MASK); rtl_writereg(dev, RTL8366RB_VMCR(RTL8366RB_VMCR_MU_REG, g), _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-freebsd-embedded@FreeBSD.ORG Mon Apr 22 11:06:42 2013 Return-Path: Delivered-To: freebsd-embedded@FreeBSD.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 6180C599 for ; Mon, 22 Apr 2013 11:06:42 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 53203106A for ; Mon, 22 Apr 2013 11:06:42 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r3MB6gCG089053 for ; Mon, 22 Apr 2013 11:06:42 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r3MB6fIW089051 for freebsd-embedded@FreeBSD.org; Mon, 22 Apr 2013 11:06:41 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 22 Apr 2013 11:06:41 GMT Message-Id: <201304221106.r3MB6fIW089051@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-embedded@FreeBSD.org Subject: Current problem reports assigned to freebsd-embedded@FreeBSD.org X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Apr 2013 11:06:42 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/177878 embedded [rtl8366rb] [patch] Update rtl8366rb switch driver to o bin/177873 embedded [patch] etherswitchcfg(): Change the per port vlangrou o bin/177872 embedded [patch] etherswitchcfg(8) crashes if called with no ar o bin/177871 embedded [patch] etherswitchcfg(8): uninitialized variable whil o kern/172968 embedded [arge] probe/attach occasionally fails to find a PHY o misc/52256 embedded [picobsd] picobsd build script does not read in user/s o kern/42728 embedded [picobsd] many problems in src/usr.sbin/ppp/* after c 7 problems total.