aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/ath
diff options
context:
space:
mode:
authorAdrian Chadd <adrian@FreeBSD.org>2013-01-17 16:26:40 +0000
committerAdrian Chadd <adrian@FreeBSD.org>2013-01-17 16:26:40 +0000
commit61cd9692bb6941961bc881b68d2c590d2872ae62 (patch)
treed20ba43e04cef084224850bf9a2a335194e28ed0 /sys/dev/ath
parent9fd57b44e440ceea9c3cbb75ba7b037de1db67d4 (diff)
downloadsrc-61cd9692bb6941961bc881b68d2c590d2872ae62.tar.gz
src-61cd9692bb6941961bc881b68d2c590d2872ae62.zip
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.
Notes
Notes: svn path=/head/; revision=245554
Diffstat (limited to 'sys/dev/ath')
-rw-r--r--sys/dev/ath/if_ath_beacon.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/dev/ath/if_ath_beacon.c b/sys/dev/ath/if_ath_beacon.c
index bb1e393c05b1..51467cdd6b43 100644
--- a/sys/dev/ath/if_ath_beacon.c
+++ b/sys/dev/ath/if_ath_beacon.c
@@ -705,6 +705,16 @@ ath_beacon_config(struct ath_softc *sc, struct ieee80211vap *vap)
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 */