Restore backwards source compatibility with 6.x and 5.x.

This commit is contained in:
wpaul 2005-11-13 21:36:48 +00:00
parent 6a5a7b7290
commit c3427572d7

View File

@ -1407,14 +1407,18 @@ NdisReadNetworkAddress(status, addr, addrlen, adapter)
block = (ndis_miniport_block *)adapter;
sc = device_get_softc(block->nmb_physdeviceobj->do_devext);
#ifdef IF_LLADDR
#ifdef IFP2ENADDR
if (bcmp(IFP2ENADDR(sc->ifp), empty, ETHER_ADDR_LEN) == 0)
#elif __FreeBSD_version >= 700000
if (bcmp(IF_LLADDR(sc->ifp), empty, ETHER_ADDR_LEN) == 0)
#else
if (bcmp(sc->arpcom.ac_enaddr, empty, ETHER_ADDR_LEN) == 0)
#endif
*status = NDIS_STATUS_FAILURE;
else {
#ifdef IF_LLADDR
#ifdef IFP2ENADDR
*addr = IFP2ENADDR(sc->ifp);
#elif __FreeBSD_version >= 700000
*addr = IF_LLADDR(sc->ifp);
#else
*addr = sc->arpcom.ac_enaddr;