Date: Thu, 17 Jan 2013 16:26:40 +0000 (UTC) From: Adrian Chadd <adrian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245554 - head/sys/dev/ath Message-ID: <201301171626.r0HGQe1Q008086@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: adrian Date: Thu Jan 17 16:26:40 2013 New Revision: 245554 URL: http://svnweb.freebsd.org/changeset/base/245554 Log: Add a quick work-around if ath_beacon_config() to not die if it's called when an interface is going down. Right now it's quite possible (but very unlikely!) that ath_reset() or similar is called, leading to a beacon config call, in parallel with the last VAP being destroyed. This likely should be fixed by making sure the bmiss/bstuck/watchdog taskqueues are canceled whenever the last VAP is destroyed. Modified: head/sys/dev/ath/if_ath_beacon.c Modified: head/sys/dev/ath/if_ath_beacon.c ============================================================================== --- head/sys/dev/ath/if_ath_beacon.c Thu Jan 17 16:11:38 2013 (r245553) +++ head/sys/dev/ath/if_ath_beacon.c Thu Jan 17 16:26:40 2013 (r245554) @@ -705,6 +705,16 @@ ath_beacon_config(struct ath_softc *sc, if (vap == NULL) vap = TAILQ_FIRST(&ic->ic_vaps); /* XXX */ + /* + * Just ensure that we aren't being called when the last + * VAP is destroyed. + */ + if (vap == NULL) { + device_printf(sc->sc_dev, "%s: called with no VAPs\n", + __func__); + return; + } + ni = ieee80211_ref_node(vap->iv_bss); /* extract tstamp from last beacon and convert to TU */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201301171626.r0HGQe1Q008086>