svn commit: r224344 - stable/7/sys/net

Marius Strobl marius at FreeBSD.org
Mon Jul 25 17:20:33 UTC 2011


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 },							\
 }
 


More information about the svn-src-stable mailing list