summaryrefslogtreecommitdiffstats
path: root/cpukit/libnetworking
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2011-02-25 10:38:17 +0000
committerSebastian Huber <sebastian.huber@embedded-brains.de>2011-02-25 10:38:17 +0000
commitebe6edbcf1cb812a5fa95533dd3debdbbdd1b048 (patch)
treeae06d6092d25aefd93765a9f6f4216e84fc8324d /cpukit/libnetworking
parent2011-02-25 Ralf Corsépius <ralf.corsepius@rtems.org> (diff)
downloadrtems-ebe6edbcf1cb812a5fa95533dd3debdbbdd1b048.tar.bz2
2011-02-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
* libnetworking/rtems/rtems_mii_ioctl_kern.c: Do not use IFM_ACTIVE and IFM_AVALID in the media word. * libnetworking/net/if_media.h: Hack to get libbsdport interface drivers working.
Diffstat (limited to 'cpukit/libnetworking')
-rw-r--r--cpukit/libnetworking/net/if_media.h8
-rw-r--r--cpukit/libnetworking/rtems/rtems_mii_ioctl_kern.c2
2 files changed, 7 insertions, 3 deletions
diff --git a/cpukit/libnetworking/net/if_media.h b/cpukit/libnetworking/net/if_media.h
index 63f2775f29..d55a6e8f60 100644
--- a/cpukit/libnetworking/net/if_media.h
+++ b/cpukit/libnetworking/net/if_media.h
@@ -253,8 +253,12 @@ int ifmedia_ioctl(struct ifnet *ifp, struct ifreq *ifr,
/*
* Status bits
*/
-#define IFM_AVALID 0x00000001 /* Active bit valid */
-#define IFM_ACTIVE 0x00000002 /* Interface attached to working net */
+/*
+ * FIXME: This is a hack to get the libbsdport interface drivers working. See
+ * also rtems_mii_ioctl.h.
+ */
+#define IFM_AVALID IFM_FLAG0 /* Active bit valid */
+#define IFM_ACTIVE IFM_FLAG0 /* Interface attached to working net */
/*
* Macros to extract various bits of information from the media word.
diff --git a/cpukit/libnetworking/rtems/rtems_mii_ioctl_kern.c b/cpukit/libnetworking/rtems/rtems_mii_ioctl_kern.c
index 6d50c8e7fd..c43f0d077b 100644
--- a/cpukit/libnetworking/rtems/rtems_mii_ioctl_kern.c
+++ b/cpukit/libnetworking/rtems/rtems_mii_ioctl_kern.c
@@ -118,7 +118,7 @@ rtems_mii_ioctl (struct rtems_mdio_info *info, void *uarg, uint32_t cmd,
/* link status */
if (BMSR_LINK & bmsr)
- options |= IFM_LINK_OK | IFM_ACTIVE | IFM_AVALID;
+ options |= IFM_LINK_OK;
/* do we have autonegotiation disabled ? */
if (!(BMCR_AUTOEN & bmcr)) {