mirror of
https://github.com/opnsense/src.git
synced 2026-05-20 08:56:47 -04:00
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.
This commit is contained in:
parent
912a62418a
commit
9cecaef7d6
1 changed files with 5 additions and 1 deletions
|
|
@ -1204,8 +1204,12 @@ ath_attach(u_int16_t devid, struct ath_softc *sc)
|
|||
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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue