svn commit: r332895 - in head: lib/libifconfig sbin/etherswitchcfg sbin/ifconfig sys/net
Brooks Davis
brooks at FreeBSD.org
Mon Apr 23 21:10:34 UTC 2018
Author: brooks
Date: Mon Apr 23 21:10:33 2018
New Revision: 332895
URL: https://svnweb.freebsd.org/changeset/base/332895
Log:
Finish removing FDDI and tokenring media support.
This fixes media display for 802.11 wireless devices.
Software outside the base system that uses these media types and
defines should use #ifdef IFM_FDDI or IFM_TOKEN to include or remove
support.
Reported by: zeising
Reviewed by: emaste, kib, zeising
Tested by: zeising
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D15170
Modified:
head/lib/libifconfig/libifconfig_media.c
head/sbin/etherswitchcfg/ifmedia.c
head/sbin/ifconfig/ifmedia.c
head/sys/net/if_media.c
head/sys/net/if_media.h
Modified: head/lib/libifconfig/libifconfig_media.c
==============================================================================
--- head/lib/libifconfig/libifconfig_media.c Mon Apr 23 19:51:00 2018 (r332894)
+++ head/lib/libifconfig/libifconfig_media.c Mon Apr 23 21:10:33 2018 (r332895)
@@ -77,15 +77,6 @@ static struct ifmedia_description ifm_subtype_ethernet
static struct ifmedia_description ifm_subtype_ethernet_option_descriptions[] =
IFM_SUBTYPE_ETHERNET_OPTION_DESCRIPTIONS;
-static struct ifmedia_description ifm_subtype_tokenring_descriptions[] =
- IFM_SUBTYPE_TOKENRING_DESCRIPTIONS;
-
-static struct ifmedia_description ifm_subtype_tokenring_aliases[] =
- IFM_SUBTYPE_TOKENRING_ALIASES;
-
-static struct ifmedia_description ifm_subtype_tokenring_option_descriptions[] =
- IFM_SUBTYPE_TOKENRING_OPTION_DESCRIPTIONS;
-
static struct ifmedia_description ifm_subtype_ieee80211_descriptions[] =
IFM_SUBTYPE_IEEE80211_DESCRIPTIONS;
@@ -155,24 +146,6 @@ static struct ifmedia_type_to_subtype ifmedia_types_to
{ &ifm_shared_option_descriptions[0], 0 },
{ &ifm_shared_option_aliases[0], 1 },
{ &ifm_subtype_ethernet_option_descriptions[0], 0 },
- { NULL, 0 },
- },
- {
- { NULL, 0 },
- },
- },
- {
- {
- { &ifm_subtype_shared_descriptions[0], 0 },
- { &ifm_subtype_shared_aliases[0], 1 },
- { &ifm_subtype_tokenring_descriptions[0], 0 },
- { &ifm_subtype_tokenring_aliases[0], 1 },
- { NULL, 0 },
- },
- {
- { &ifm_shared_option_descriptions[0], 0 },
- { &ifm_shared_option_aliases[0], 1 },
- { &ifm_subtype_tokenring_option_descriptions[0], 0 },
{ NULL, 0 },
},
{
Modified: head/sbin/etherswitchcfg/ifmedia.c
==============================================================================
--- head/sbin/etherswitchcfg/ifmedia.c Mon Apr 23 19:51:00 2018 (r332894)
+++ head/sbin/etherswitchcfg/ifmedia.c Mon Apr 23 21:10:33 2018 (r332895)
@@ -363,15 +363,6 @@ static struct ifmedia_description ifm_subtype_ethernet
static struct ifmedia_description ifm_subtype_ethernet_option_descriptions[] =
IFM_SUBTYPE_ETHERNET_OPTION_DESCRIPTIONS;
-static struct ifmedia_description ifm_subtype_tokenring_descriptions[] =
- IFM_SUBTYPE_TOKENRING_DESCRIPTIONS;
-
-static struct ifmedia_description ifm_subtype_tokenring_aliases[] =
- IFM_SUBTYPE_TOKENRING_ALIASES;
-
-static struct ifmedia_description ifm_subtype_tokenring_option_descriptions[] =
- IFM_SUBTYPE_TOKENRING_OPTION_DESCRIPTIONS;
-
static struct ifmedia_description ifm_subtype_ieee80211_descriptions[] =
IFM_SUBTYPE_IEEE80211_DESCRIPTIONS;
@@ -437,24 +428,6 @@ static struct ifmedia_type_to_subtype ifmedia_types_to
{ &ifm_shared_option_descriptions[0], 0 },
{ &ifm_shared_option_aliases[0], 1 },
{ &ifm_subtype_ethernet_option_descriptions[0], 0 },
- { NULL, 0 },
- },
- {
- { NULL, 0 },
- },
- },
- {
- {
- { &ifm_subtype_shared_descriptions[0], 0 },
- { &ifm_subtype_shared_aliases[0], 1 },
- { &ifm_subtype_tokenring_descriptions[0], 0 },
- { &ifm_subtype_tokenring_aliases[0], 1 },
- { NULL, 0 },
- },
- {
- { &ifm_shared_option_descriptions[0], 0 },
- { &ifm_shared_option_aliases[0], 1 },
- { &ifm_subtype_tokenring_option_descriptions[0], 0 },
{ NULL, 0 },
},
{
Modified: head/sbin/ifconfig/ifmedia.c
==============================================================================
--- head/sbin/ifconfig/ifmedia.c Mon Apr 23 19:51:00 2018 (r332894)
+++ head/sbin/ifconfig/ifmedia.c Mon Apr 23 21:10:33 2018 (r332895)
@@ -380,15 +380,6 @@ static struct ifmedia_description ifm_subtype_ethernet
static struct ifmedia_description ifm_subtype_ethernet_option_descriptions[] =
IFM_SUBTYPE_ETHERNET_OPTION_DESCRIPTIONS;
-static struct ifmedia_description ifm_subtype_tokenring_descriptions[] =
- IFM_SUBTYPE_TOKENRING_DESCRIPTIONS;
-
-static struct ifmedia_description ifm_subtype_tokenring_aliases[] =
- IFM_SUBTYPE_TOKENRING_ALIASES;
-
-static struct ifmedia_description ifm_subtype_tokenring_option_descriptions[] =
- IFM_SUBTYPE_TOKENRING_OPTION_DESCRIPTIONS;
-
static struct ifmedia_description ifm_subtype_ieee80211_descriptions[] =
IFM_SUBTYPE_IEEE80211_DESCRIPTIONS;
@@ -454,24 +445,6 @@ static struct ifmedia_type_to_subtype ifmedia_types_to
{ &ifm_shared_option_descriptions[0], 0 },
{ &ifm_shared_option_aliases[0], 1 },
{ &ifm_subtype_ethernet_option_descriptions[0], 0 },
- { NULL, 0 },
- },
- {
- { NULL, 0 },
- },
- },
- {
- {
- { &ifm_subtype_shared_descriptions[0], 0 },
- { &ifm_subtype_shared_aliases[0], 1 },
- { &ifm_subtype_tokenring_descriptions[0], 0 },
- { &ifm_subtype_tokenring_aliases[0], 1 },
- { NULL, 0 },
- },
- {
- { &ifm_shared_option_descriptions[0], 0 },
- { &ifm_shared_option_aliases[0], 1 },
- { &ifm_subtype_tokenring_option_descriptions[0], 0 },
{ NULL, 0 },
},
{
Modified: head/sys/net/if_media.c
==============================================================================
--- head/sys/net/if_media.c Mon Apr 23 19:51:00 2018 (r332894)
+++ head/sys/net/if_media.c Mon Apr 23 21:10:33 2018 (r332895)
@@ -399,12 +399,6 @@ struct ifmedia_description ifm_subtype_ethernet_descri
struct ifmedia_description ifm_subtype_ethernet_option_descriptions[] =
IFM_SUBTYPE_ETHERNET_OPTION_DESCRIPTIONS;
-struct ifmedia_description ifm_subtype_tokenring_descriptions[] =
- IFM_SUBTYPE_TOKENRING_DESCRIPTIONS;
-
-struct ifmedia_description ifm_subtype_tokenring_option_descriptions[] =
- IFM_SUBTYPE_TOKENRING_OPTION_DESCRIPTIONS;
-
struct ifmedia_description ifm_subtype_ieee80211_descriptions[] =
IFM_SUBTYPE_IEEE80211_DESCRIPTIONS;
@@ -437,11 +431,6 @@ struct ifmedia_type_to_subtype ifmedia_types_to_subtyp
{
&ifm_subtype_ethernet_descriptions[0],
&ifm_subtype_ethernet_option_descriptions[0],
- NULL,
- },
- {
- &ifm_subtype_tokenring_descriptions[0],
- &ifm_subtype_tokenring_option_descriptions[0],
NULL,
},
{
Modified: head/sys/net/if_media.h
==============================================================================
--- head/sys/net/if_media.h Mon Apr 23 19:51:00 2018 (r332894)
+++ head/sys/net/if_media.h Mon Apr 23 21:10:33 2018 (r332895)
@@ -217,32 +217,6 @@ uint64_t ifmedia_baudrate(int);
#define IFM_ETH_XSHIFT 6 /* shift XTYPE next to TMASK */
/*
- * Token ring
- */
-#define IFM_TOKEN 0x00000040
-#define IFM_TOK_STP4 3 /* Shielded twisted pair 4m - DB9 */
-#define IFM_TOK_STP16 4 /* Shielded twisted pair 16m - DB9 */
-#define IFM_TOK_UTP4 5 /* Unshielded twisted pair 4m - RJ45 */
-#define IFM_TOK_UTP16 6 /* Unshielded twisted pair 16m - RJ45 */
-#define IFM_TOK_STP100 7 /* Shielded twisted pair 100m - DB9 */
-#define IFM_TOK_UTP100 8 /* Unshielded twisted pair 100m - RJ45 */
-#define IFM_TOK_ETR 0x00000200 /* Early token release */
-#define IFM_TOK_SRCRT 0x00000400 /* Enable source routing features */
-#define IFM_TOK_ALLR 0x00000800 /* All routes / Single route bcast */
-#define IFM_TOK_DTR 0x00002000 /* Dedicated token ring */
-#define IFM_TOK_CLASSIC 0x00004000 /* Classic token ring */
-#define IFM_TOK_AUTO 0x00008000 /* Automatic Dedicate/Classic token ring */
-
-/*
- * FDDI
- */
-#define IFM_FDDI 0x00000060
-#define IFM_FDDI_SMF 3 /* Single-mode fiber */
-#define IFM_FDDI_MMF 4 /* Multi-mode fiber */
-#define IFM_FDDI_UTP 5 /* CDDI / UTP */
-#define IFM_FDDI_DA 0x00000100 /* Dual attach / single attach */
-
-/*
* IEEE 802.11 Wireless
*/
#define IFM_IEEE80211 0x00000080
@@ -393,8 +367,6 @@ struct ifmedia_description {
#define IFM_TYPE_DESCRIPTIONS { \
{ IFM_ETHER, "Ethernet" }, \
- { IFM_TOKEN, "Token ring" }, \
- { IFM_FDDI, "FDDI" }, \
{ IFM_IEEE80211, "IEEE 802.11 Wireless Ethernet" }, \
{ IFM_ATM, "ATM" }, \
{ 0, NULL }, \
@@ -511,55 +483,6 @@ struct ifmedia_description {
{ 0, NULL }, \
}
-#define IFM_SUBTYPE_TOKENRING_DESCRIPTIONS { \
- { IFM_TOK_STP4, "DB9/4Mbit" }, \
- { IFM_TOK_STP16, "DB9/16Mbit" }, \
- { IFM_TOK_UTP4, "UTP/4Mbit" }, \
- { IFM_TOK_UTP16, "UTP/16Mbit" }, \
- { IFM_TOK_STP100, "STP/100Mbit" }, \
- { IFM_TOK_UTP100, "UTP/100Mbit" }, \
- { 0, NULL }, \
-}
-
-#define IFM_SUBTYPE_TOKENRING_ALIASES { \
- { IFM_TOK_STP4, "4STP" }, \
- { IFM_TOK_STP16, "16STP" }, \
- { IFM_TOK_UTP4, "4UTP" }, \
- { IFM_TOK_UTP16, "16UTP" }, \
- { IFM_TOK_STP100, "100STP" }, \
- { IFM_TOK_UTP100, "100UTP" }, \
- { 0, NULL }, \
-}
-
-#define IFM_SUBTYPE_TOKENRING_OPTION_DESCRIPTIONS { \
- { IFM_TOK_ETR, "EarlyTokenRelease" }, \
- { IFM_TOK_SRCRT, "SourceRouting" }, \
- { IFM_TOK_ALLR, "AllRoutes" }, \
- { IFM_TOK_DTR, "Dedicated" }, \
- { IFM_TOK_CLASSIC,"Classic" }, \
- { IFM_TOK_AUTO, " " }, \
- { 0, NULL }, \
-}
-
-#define IFM_SUBTYPE_FDDI_DESCRIPTIONS { \
- { IFM_FDDI_SMF, "Single-mode" }, \
- { IFM_FDDI_MMF, "Multi-mode" }, \
- { IFM_FDDI_UTP, "UTP" }, \
- { 0, NULL }, \
-}
-
-#define IFM_SUBTYPE_FDDI_ALIASES { \
- { IFM_FDDI_SMF, "SMF" }, \
- { IFM_FDDI_MMF, "MMF" }, \
- { IFM_FDDI_UTP, "CDDI" }, \
- { 0, NULL }, \
-}
-
-#define IFM_SUBTYPE_FDDI_OPTION_DESCRIPTIONS { \
- { IFM_FDDI_DA, "Dual-attach" }, \
- { 0, NULL }, \
-}
-
#define IFM_SUBTYPE_IEEE80211_DESCRIPTIONS { \
{ IFM_IEEE80211_FH1, "FH/1Mbps" }, \
{ IFM_IEEE80211_FH2, "FH/2Mbps" }, \
@@ -797,15 +720,6 @@ struct ifmedia_baudrate {
{ IFM_ETHER | IFM_25G_ACC, IF_Gbps(25ULL) }, \
{ IFM_ETHER | IFM_25G_AOC, IF_Gbps(25ULL) }, \
\
- { IFM_TOKEN | IFM_TOK_STP4, IF_Mbps(4) }, \
- { IFM_TOKEN | IFM_TOK_STP16, IF_Mbps(16) }, \
- { IFM_TOKEN | IFM_TOK_UTP4, IF_Mbps(4) }, \
- { IFM_TOKEN | IFM_TOK_UTP16, IF_Mbps(16) }, \
- \
- { IFM_FDDI | IFM_FDDI_SMF, IF_Mbps(100) }, \
- { IFM_FDDI | IFM_FDDI_MMF, IF_Mbps(100) }, \
- { IFM_FDDI | IFM_FDDI_UTP, IF_Mbps(100) }, \
- \
{ IFM_IEEE80211 | IFM_IEEE80211_FH1, IF_Mbps(1) }, \
{ IFM_IEEE80211 | IFM_IEEE80211_FH2, IF_Mbps(2) }, \
{ IFM_IEEE80211 | IFM_IEEE80211_DS2, IF_Mbps(2) }, \
@@ -842,10 +756,6 @@ struct ifmedia_status_description {
#define IFM_STATUS_DESCRIPTIONS { \
{ IFM_ETHER, IFM_AVALID, IFM_ACTIVE, \
{ "no carrier", "active" } }, \
- { IFM_FDDI, IFM_AVALID, IFM_ACTIVE, \
- { "no ring", "inserted" } }, \
- { IFM_TOKEN, IFM_AVALID, IFM_ACTIVE, \
- { "no ring", "inserted" } }, \
{ IFM_IEEE80211, IFM_AVALID, IFM_ACTIVE, \
{ "no network", "active" } }, \
{ IFM_ATM, IFM_AVALID, IFM_ACTIVE, \
More information about the svn-src-head
mailing list