Changeset 88dad3b in rtems-libbsd


Ignore:
Timestamp:
Jan 9, 2017, 10:41:24 AM (3 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
c1e05b9ea378b2971e3d7704779112b4bc4296da, 4a77611a223ea883fb548679b516d326a020d447
Children:
0436d64
Parents:
f8ed8cd
git-author:
Sebastian Huber <sebastian.huber@…> (01/09/17 10:41:24)
git-committer:
Sebastian Huber <sebastian.huber@…> (01/10/17 08:53:34)
Message:

if_dwc: Use rtems_bsd_get_mac_address()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • freebsd/sys/dev/dwc/if_dwc.c

    rf8ed8cd r88dad3b  
    7373#include <dev/ofw/ofw_bus.h>
    7474#include <dev/ofw/ofw_bus_subr.h>
     75#else /* __rtems__ */
     76#include <rtems/bsd/bsd.h>
    7577#endif /* __rtems__ */
    7678
     
    10861088dwc_get_hwaddr(struct dwc_softc *sc, uint8_t *hwaddr)
    10871089{
     1090#ifndef __rtems__
    10881091        uint32_t hi, lo, rnd;
     1092#else /* __rtems__ */
     1093        uint32_t hi, lo;
     1094#endif /* __rtems__ */
    10891095
    10901096        /*
     
    11071113                hwaddr[5] = (hi >>  8) & 0xff;
    11081114        } else {
     1115#ifndef __rtems__
    11091116                rnd = arc4random() & 0x00ffffff;
    11101117                hwaddr[0] = 'b';
     
    11141121                hwaddr[4] = rnd >>  8;
    11151122                hwaddr[5] = rnd >>  0;
     1123#else /* __rtems__ */
     1124                rtems_bsd_get_mac_address(device_get_name(sc->dev),
     1125                    device_get_unit(sc->dev), hwaddr);
     1126#endif /* __rtems__ */
    11161127        }
    11171128
Note: See TracChangeset for help on using the changeset viewer.