diff options
Diffstat (limited to 'bsd_eth_drivers/libbsdport/libbsdport_post.h')
-rw-r--r-- | bsd_eth_drivers/libbsdport/libbsdport_post.h | 35 |
1 files changed, 30 insertions, 5 deletions
diff --git a/bsd_eth_drivers/libbsdport/libbsdport_post.h b/bsd_eth_drivers/libbsdport/libbsdport_post.h index fcf7e2d..ca3fe04 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> @@ -22,9 +24,6 @@ #define IFF_DRV_RUNNING IFF_RUNNING #define IFF_DRV_OACTIVE IFF_OACTIVE -/* FIXME: should implement m_defrag() */ -#define m_defrag(m_headp, opt) NULL - static inline struct mbuf * m_getcl(int how, int type, unsigned flags) { @@ -87,9 +86,35 @@ 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); + +/* + * Defragment a mbuf chain, returning the shortest possible + * chain of mbufs and clusters. If allocation fails and + * this cannot be completed, NULL will be returned, but + * the passed in chain will be unchanged. Upon success, + * the original chain will be freed, and the new chain + * will be returned. + * + * If a non-packet header is passed in, the original + * mbuf (chain?) will be returned unharmed. + */ +struct mbuf * +m_defrag(struct mbuf *m0, int how); + |