svn commit: r288619 - head/sys/dev/usb/wlan

Adrian Chadd adrian at FreeBSD.org
Sat Oct 3 17:18:36 UTC 2015


Author: adrian
Date: Sat Oct  3 17:18:35 2015
New Revision: 288619
URL: https://svnweb.freebsd.org/changeset/base/288619

Log:
  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 at gmail.com>
  Differential Revision:	https://reviews.freebsd.org/D3625

Modified:
  head/sys/dev/usb/wlan/if_rum.c
  head/sys/dev/usb/wlan/if_rumvar.h

Modified: head/sys/dev/usb/wlan/if_rum.c
==============================================================================
--- head/sys/dev/usb/wlan/if_rum.c	Sat Oct  3 17:11:21 2015	(r288618)
+++ head/sys/dev/usb/wlan/if_rum.c	Sat Oct  3 17:18:35 2015	(r288619)
@@ -785,8 +785,8 @@ rum_newstate(struct ieee80211vap *vap, e
 			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);
 
 }

Modified: head/sys/dev/usb/wlan/if_rumvar.h
==============================================================================
--- head/sys/dev/usb/wlan/if_rumvar.h	Sat Oct  3 17:11:21 2015	(r288618)
+++ head/sys/dev/usb/wlan/if_rumvar.h	Sat Oct  3 17:18:35 2015	(r288619)
@@ -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;


More information about the svn-src-head mailing list