From owner-svn-src-stable@FreeBSD.ORG Mon Jul 25 17:20:33 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 963F51065675; Mon, 25 Jul 2011 17:20:33 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6CCDB8FC1C; Mon, 25 Jul 2011 17:20:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p6PHKXid067208; Mon, 25 Jul 2011 17:20:33 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p6PHKX1a067206; Mon, 25 Jul 2011 17:20:33 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201107251720.p6PHKX1a067206@svn.freebsd.org> From: Marius Strobl Date: Mon, 25 Jul 2011 17:20:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r224344 - stable/7/sys/net X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2011 17:20:33 -0000 Author: marius Date: Mon Jul 25 17:20:33 2011 New Revision: 224344 URL: http://svn.freebsd.org/changeset/base/224344 Log: MFC: r221955 - Add 10baseT as an alias for 10baseT/UTP. - Add shorthand aliases for common media+option combinations as announced by miibus(4) so that one can actually supply the media strings found in the dmesg output to ifconfig(8). Obtained from: NetBSD (in principle) Modified: stable/7/sys/net/if_media.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/net/if_media.h ============================================================================== --- stable/7/sys/net/if_media.h Mon Jul 25 17:18:47 2011 (r224343) +++ stable/7/sys/net/if_media.h Mon Jul 25 17:20:33 2011 (r224344) @@ -369,6 +369,7 @@ struct ifmedia_description { } #define IFM_SUBTYPE_ETHERNET_ALIASES { \ + { IFM_10_T, "10baseT" }, \ { IFM_10_T, "UTP" }, \ { IFM_10_T, "10UTP" }, \ { IFM_10_2, "BNC" }, \ @@ -388,6 +389,23 @@ struct ifmedia_description { { IFM_1000_T, "1000TX" }, \ { IFM_1000_T, "1000T" }, \ { IFM_2500_SX, "2500SX" }, \ + \ + /* \ + * Shorthands for common media+option combinations as announced \ + * by miibus(4) \ + */ \ + { IFM_10_T | IFM_FDX, "10baseT-FDX" }, \ + { IFM_10_T | IFM_FDX | IFM_FLOW, "10baseT-FDX-flow" }, \ + { IFM_100_TX | IFM_FDX, "100baseTX-FDX" }, \ + { IFM_100_TX | IFM_FDX | IFM_FLOW, "100baseTX-FDX-flow" }, \ + { IFM_1000_T | IFM_FDX, "1000baseT-FDX" }, \ + { IFM_1000_T | IFM_FDX | IFM_FLOW, "1000baseT-FDX-flow" }, \ + { IFM_1000_T | IFM_FDX | IFM_FLOW | IFM_ETH_MASTER, \ + "1000baseT-FDX-flow-master" }, \ + { IFM_1000_T | IFM_FDX | IFM_ETH_MASTER, \ + "1000baseT-FDX-master" }, \ + { IFM_1000_T | IFM_ETH_MASTER, "1000baseT-master" }, \ + \ { 0, NULL }, \ } @@ -580,6 +598,13 @@ struct ifmedia_description { #define IFM_SUBTYPE_SHARED_ALIASES { \ { IFM_AUTO, "auto" }, \ + \ + /* \ + * Shorthands for common media+option combinations as announced \ + * by miibus(4) \ + */ \ + { IFM_AUTO | IFM_FLOW, "auto-flow" }, \ + \ { 0, NULL }, \ }