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 */
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to