summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTill Straumann <strauman@slac.stanford.edu>2009-04-23 04:24:04 +0000
committerTill Straumann <strauman@slac.stanford.edu>2009-04-23 04:24:04 +0000
commitcd524ab9d594bf3676fff880a1275020e41f1227 (patch)
tree1cabc0ef2837fc53f0d1e361c80159f095a09565
parent534996e2a8a8daecd92f8970bad0042b87452b45 (diff)
downloadlibbsdport-cd524ab9d594bf3676fff880a1275020e41f1227.tar.bz2
- fixed ETHER_SIOCMULTIFRAG() macro. Need to reset 'e' (error) to zero if
ether_addmulti()/ether_delmulti() return ENETRESET (which is acually an OK status). - moved mii_mediachg() dummy from libbsdport.h to libbsdport_post.h
-rw-r--r--bsd_eth_drivers/libbsdport/libbsdport_post.h17
1 files changed, 15 insertions, 2 deletions
diff --git a/bsd_eth_drivers/libbsdport/libbsdport_post.h b/bsd_eth_drivers/libbsdport/libbsdport_post.h
index fcf7e2d..ce893c1 100644
--- a/bsd_eth_drivers/libbsdport/libbsdport_post.h
+++ b/bsd_eth_drivers/libbsdport/libbsdport_post.h
@@ -10,6 +10,8 @@
#undef SYSCTL_ADD_INT
#define SYSCTL_ADD_INT(unused...) do { } while (0)
+
+#define RTEMS_SYSCTL_NOTYETSUP
#endif
#include <netinet/in.h>
@@ -87,9 +89,20 @@ ether_setaddr(struct ifnet *ifp, u_int8_t *eaddr);
} while (0)
#define ETHER_SIOCMULTIFRAG(e, c, ifr, ifp) \
- ( ENETRESET != (e = (SIOCADDMULTI == (c) ? \
+ ( ((e) = (SIOCADDMULTI == (c) ? \
ether_addmulti((ifr), (struct arpcom*)(ifp)) : \
- ether_delmulti((ifr), (struct arpcom*)(ifp)) ))) \
+ ether_delmulti((ifr), (struct arpcom*)(ifp)) )), \
+ ((e) = ENETRESET == (e) ? 0 : (e)) )
#define arp_ifinit(ifp, ifa) arp_ifinit((struct arpcom *)ifp, ifa)
+
+#define mii_mediachg(mii) do {} while (0)
+
+/* find the currently active PHY; assume bootloader or firmware
+ * has set it up already.
+ *
+ * RETURNS: phy idx 0..31 or -1 on error
+ */
+int
+rtems_mii_phy_probe(struct rtems_mdio_info *mdio, void *if_softc);