svn commit: r280802 - head/sys/dev/ath
Adrian Chadd
adrian at FreeBSD.org
Sun Mar 29 06:05:01 UTC 2015
Author: adrian
Date: Sun Mar 29 06:05:00 2015
New Revision: 280802
URL: https://svnweb.freebsd.org/changeset/base/280802
Log:
Fix a long-standing bug with the early MAC address initialisation path,
which showed up after I started changing addresses this early.
It turns out that there's some other malarky going on behind the scenes
in the HAL and merely setting the net80211/ifp mac address this early
isn't enough. If the MAC is set from kenv at attach time, the HAL
also needs to be programmed early.
Without this, the VAP wouldn't work enough for finishing association -
probe requests would be fine as they're broadcast, but association
request would fail.
Modified:
head/sys/dev/ath/if_ath.c
Modified: head/sys/dev/ath/if_ath.c
==============================================================================
--- head/sys/dev/ath/if_ath.c Sun Mar 29 03:16:52 2015 (r280801)
+++ head/sys/dev/ath/if_ath.c Sun Mar 29 06:05:00 2015 (r280802)
@@ -1204,8 +1204,12 @@ ath_attach(u_int16_t devid, struct ath_s
sc->sc_hasveol = ath_hal_hasveol(ah);
/* get mac address from kenv first, then hardware */
- if (ath_fetch_mac_kenv(sc, macaddr) < 0)
+ if (ath_fetch_mac_kenv(sc, macaddr) == 0) {
+ /* Tell the HAL now about the new MAC */
+ ath_hal_setmac(ah, macaddr);
+ } else {
ath_hal_getmac(ah, macaddr);
+ }
if (sc->sc_hasbmask)
ath_hal_getbssidmask(ah, sc->sc_hwbssidmask);
More information about the svn-src-head
mailing list