diff options
author | adrian <adrian@FreeBSD.org> | 2015-10-03 17:18:35 +0000 |
---|---|---|
committer | adrian <adrian@FreeBSD.org> | 2015-10-03 17:18:35 +0000 |
commit | 2ea0873c4aaa18db6c9ac601db037f276d4a377f (patch) | |
tree | 86e3261a687ff079f0bd06217c4c4036ad1f299d | |
parent | 975ee385063b35b7091753ad87bef8909182b2b8 (diff) | |
download | FreeBSD-src-2ea0873c4aaa18db6c9ac601db037f276d4a377f.zip FreeBSD-src-2ea0873c4aaa18db6c9ac601db037f276d4a377f.tar.gz |
rum(4): do not corrupt MAC address
Don't override the NIC MAC address with an overridden MAC address for
a VAP.
Submitted by: <s3erios@gmail.com>
Differential Revision: https://reviews.freebsd.org/D3625
-rw-r--r-- | sys/dev/usb/wlan/if_rum.c | 6 | ||||
-rw-r--r-- | sys/dev/usb/wlan/if_rumvar.h | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/usb/wlan/if_rum.c b/sys/dev/usb/wlan/if_rum.c index 91d5ed7..dec244d 100644 --- a/sys/dev/usb/wlan/if_rum.c +++ b/sys/dev/usb/wlan/if_rum.c @@ -785,8 +785,8 @@ rum_newstate(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) rum_enable_mrr(sc); rum_set_txpreamble(sc); rum_set_basicrates(sc); - IEEE80211_ADDR_COPY(ic->ic_macaddr, ni->ni_bssid); - rum_set_bssid(sc, ic->ic_macaddr); + IEEE80211_ADDR_COPY(sc->sc_bssid, ni->ni_bssid); + rum_set_bssid(sc, sc->sc_bssid); } if (vap->iv_opmode == IEEE80211_M_HOSTAP || @@ -2368,7 +2368,7 @@ rum_scan_end(struct ieee80211com *ic) RUM_LOCK(sc); rum_enable_tsf_sync(sc); - rum_set_bssid(sc, ic->ic_macaddr); + rum_set_bssid(sc, sc->sc_bssid); RUM_UNLOCK(sc); } diff --git a/sys/dev/usb/wlan/if_rumvar.h b/sys/dev/usb/wlan/if_rumvar.h index fd3d8fa..c78a0d8 100644 --- a/sys/dev/usb/wlan/if_rumvar.h +++ b/sys/dev/usb/wlan/if_rumvar.h @@ -137,6 +137,8 @@ struct rum_softc { u_int sc_detached:1, sc_running:1; + uint8_t sc_bssid[IEEE80211_ADDR_LEN]; + struct { uint8_t val; uint8_t reg; |