Changeset 6a73f64 in rtems-libbsd


Ignore:
Timestamp:
Nov 25, 2014, 11:54:56 AM (5 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, afaeccc05a556f6aa25ba044a7e49d6aa634a59e, freebsd-9.3, master
Children:
946611a
Parents:
dec6b67
git-author:
Sebastian Huber <sebastian.huber@…> (11/25/14 11:54:56)
git-committer:
Sebastian Huber <sebastian.huber@…> (01/21/15 14:00:20)
Message:

if_cgem: Use rtems_bsd_get_mac_address()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • freebsd/sys/dev/cadence/if_cgem.c

    rdec6b67 r6a73f64  
    8686#ifdef __rtems__
    8787#pragma GCC diagnostic ignored "-Wpointer-sign"
     88#include <rtems/bsd/bsd.h>
    8889#endif /* __rtems__ */
    8990
     
    234235{
    235236        int i;
     237#ifndef __rtems__
    236238        uint32_t rnd;
     239#endif /* __rtems__ */
    237240
    238241        /* See if boot loader gave us a MAC address already. */
     
    253256        /* No MAC from boot loader?  Assign a random one. */
    254257        if (i == 4) {
     258#ifndef __rtems__
    255259                rnd = arc4random();
    256260
     
    261265                eaddr[4] = (rnd >> 8) & 0xff;
    262266                eaddr[5] = rnd & 0xff;
     267#else /* __rtems__ */
     268                rtems_bsd_get_mac_address(device_get_name(sc->dev),
     269                    device_get_unit(sc->dev), eaddr);
     270#endif /* __rtems__ */
    263271
    264272                device_printf(sc->dev, "no mac address found, assigning "
Note: See TracChangeset for help on using the changeset viewer.