From: stsp Date: Tue, 6 Oct 2015 09:12:00 +0000 (+0000) Subject: Make iwm(4) set the MAC address the same way other wireless drivers do. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=ca831f51202741e30a9491b31846380fe8ab142b;p=openbsd Make iwm(4) set the MAC address the same way other wireless drivers do. ok mpi@ --- diff --git a/sys/dev/pci/if_iwm.c b/sys/dev/pci/if_iwm.c index 6e80b574b9d..98fafd7f14a 100644 --- a/sys/dev/pci/if_iwm.c +++ b/sys/dev/pci/if_iwm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_iwm.c,v 1.52 2015/10/05 13:05:08 stsp Exp $ */ +/* $OpenBSD: if_iwm.c,v 1.53 2015/10/06 09:12:00 stsp Exp $ */ /* * Copyright (c) 2014 genua mbh @@ -5729,11 +5729,6 @@ iwm_ioctl(struct ifnet *ifp, u_long cmd, iwm_caddr_t data) error = 0; break; - case SIOCSIFLLADDR: - IEEE80211_ADDR_COPY(sc->sc_ic.ic_myaddr, - ((struct arpcom *)ifp)->ac_enaddr); - break; - default: error = ieee80211_ioctl(ifp, cmd, data); } @@ -6323,8 +6318,12 @@ iwm_preinit(struct iwm_softc *sc) return error; } - if (attached) + if (attached) { + /* Update MAC in case the upper layers changed it. */ + IEEE80211_ADDR_COPY(sc->sc_ic.ic_myaddr, + ((struct arpcom *)ifp)->ac_enaddr); return 0; + } if ((error = iwm_start_hw(sc)) != 0) { printf("%s: could not initialize hardware\n", DEVNAME(sc));