summaryrefslogtreecommitdiffstats
path: root/sys/dev/malo/if_malo.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/malo/if_malo.c')
-rw-r--r--sys/dev/malo/if_malo.c31
1 files changed, 2 insertions, 29 deletions
diff --git a/sys/dev/malo/if_malo.c b/sys/dev/malo/if_malo.c
index 681c824..851b841 100644
--- a/sys/dev/malo/if_malo.c
+++ b/sys/dev/malo/if_malo.c
@@ -175,16 +175,10 @@ malo_bar0_write4(struct malo_softc *sc, bus_size_t off, uint32_t val)
bus_space_write_4(sc->malo_io0t, sc->malo_io0h, off, val);
}
-static uint8_t
-malo_bar1_read1(struct malo_softc *sc, bus_size_t off)
-{
- return bus_space_read_1(sc->malo_io1t, sc->malo_io1h, off);
-}
-
int
malo_attach(uint16_t devid, struct malo_softc *sc)
{
- int error, i;
+ int error;
struct ieee80211com *ic;
struct ifnet *ifp;
struct malo_hal *mh;
@@ -203,16 +197,6 @@ malo_attach(uint16_t devid, struct malo_softc *sc)
if_initname(ifp, device_get_name(sc->malo_dev),
device_get_unit(sc->malo_dev));
- /*
- * NB: get mac address from hardware directly here before we set DMAs
- * for HAL because we don't want to disturb operations of HAL at BAR 1.
- */
- for (i = 0; i < IEEE80211_ADDR_LEN; i++) {
- /* XXX remove a magic number but we don't have documents. */
- ic->ic_myaddr[i] = malo_bar1_read1(sc, 0xa528 + i);
- DELAY(1000);
- }
-
mh = malo_hal_attach(sc->malo_dev, devid,
sc->malo_io1h, sc->malo_io1t, sc->malo_dmat);
if (mh == NULL) {
@@ -319,11 +303,8 @@ malo_attach(uint16_t devid, struct malo_softc *sc)
ic->ic_headroom = sizeof(struct malo_txrec) -
sizeof(struct ieee80211_frame);
- /* get mac address from hardware */
- IEEE80211_ADDR_COPY(ic->ic_myaddr, sc->malo_hwspecs.macaddr);
-
/* call MI attach routine. */
- ieee80211_ifattach(ic);
+ ieee80211_ifattach(ic, sc->malo_hwspecs.macaddr);
/* override default methods */
ic->ic_vap_create = malo_vap_create;
ic->ic_vap_delete = malo_vap_delete;
@@ -1636,14 +1617,6 @@ malo_mode_init(struct malo_softc *sc)
struct malo_hal *mh = sc->malo_mh;
/*
- * Handle any link-level address change. Note that we only
- * need to force ic_myaddr; any other addresses are handled
- * as a byproduct of the ifnet code marking the interface
- * down then up.
- */
- IEEE80211_ADDR_COPY(ic->ic_myaddr, IF_LLADDR(ifp));
-
- /*
* NB: Ignore promisc in hostap mode; it's set by the
* bridge. This is wrong but we have no way to
* identify internal requests (from the bridge)
OpenPOWER on IntegriCloud