Changeset 176


Ignore:
Timestamp:
Sep 3, 2010, 3:17:55 PM (14 years ago)
Author:
Rick van der Zwet
Message:

Read CHIP mac addr on load

Location:
freebsd-mos-driver
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • freebsd-mos-driver/if_mos.c

    r175 r176  
    171171int mos_reg_write_1(struct mos_softc *, int, int);
    172172int mos_reg_write_2(struct mos_softc *, int, int);
    173 int mos_readmac(struct mos_softc *, u_char *);
     173int mos_readmac(struct mos_softc *, uint8_t *);
    174174int mos_writemac(struct mos_softc *, u_char *);
    175175int mos_write_mcast(struct mos_softc *, u_char *);
     
    749749         * Read MAC address, inform the world.
    750750         */
    751         // int err = mos_readmac(sc, (void*)&eaddr);
    752         // if (err) {
    753         //      printf("%s: couldn't get MAC address\n",
    754         //          "mos");
    755         //      return;
    756         // }
    757         // bcopy(eaddr, (char *)&sc->arpcom.ac_enaddr, ETHER_ADDR_LEN);
    758         // printf(", address %s\n", ether_sprintf(eaddr));
     751        int err = mos_readmac(sc, ue->ue_eaddr);
     752        if (err) {
     753                printf("couldn't get MAC address\n");
     754        }
     755        DPRINTF("address: %s\n", ether_sprintf(ue->ue_eaddr));
     756
    759757        mos_chip_init(sc);
    760 
    761758
    762759        sc->mos_attached = 1;
  • freebsd-mos-driver/if_mosreg.h

    r173 r176  
    180180struct mos_softc {
    181181        struct usb_ether        sc_ue;
     182        struct ifnet            ifp;
     183
    182184//      struct device           mos_dev;
    183185//#define GET_MII(sc) (&(sc)->mos_mii)
    184 //      struct arpcom           arpcom;
    185186//#define GET_IFP(sc) (&(sc)->arpcom.ac_if)
    186187//      struct mii_data         mos_mii;
Note: See TracChangeset for help on using the changeset viewer.