svn commit: r188471 - in projects/vap7/sys: . contrib/pf dev dev/ath dev/ath/ath_hal dev/ath/ath_hal/ar5210 dev/ath/ath_hal/ar5211 dev/ath/ath_hal/ar5212 dev/ath/ath_hal/ar5312 dev/ath/ath_hal/ar54...

Sam Leffler sam at FreeBSD.org
Tue Feb 10 16:01:03 PST 2009


Author: sam
Date: Wed Feb 11 00:01:02 2009
New Revision: 188471
URL: http://svn.freebsd.org/changeset/base/188471

Log:
  merge r188467: clear neighbor entries and the peer bss node on beacon miss

Modified:
  projects/vap7/sys/   (props changed)
  projects/vap7/sys/contrib/pf/   (props changed)
  projects/vap7/sys/dev/   (props changed)
  projects/vap7/sys/dev/ath/   (props changed)
  projects/vap7/sys/dev/ath/ath_hal/   (props changed)
  projects/vap7/sys/dev/ath/ath_hal/ar5210/   (props changed)
  projects/vap7/sys/dev/ath/ath_hal/ar5211/   (props changed)
  projects/vap7/sys/dev/ath/ath_hal/ar5212/   (props changed)
  projects/vap7/sys/dev/ath/ath_hal/ar5312/   (props changed)
  projects/vap7/sys/dev/ath/ath_hal/ar5416/   (props changed)
  projects/vap7/sys/dev/cxgb/   (props changed)
  projects/vap7/sys/dev/usb2/   (props changed)
  projects/vap7/sys/i386/conf/USB2   (props changed)
  projects/vap7/sys/modules/usb2/   (props changed)
  projects/vap7/sys/net80211/   (props changed)
  projects/vap7/sys/net80211/ieee80211_tdma.c

Modified: projects/vap7/sys/net80211/ieee80211_tdma.c
==============================================================================
--- projects/vap7/sys/net80211/ieee80211_tdma.c	Tue Feb 10 23:59:59 2009	(r188470)
+++ projects/vap7/sys/net80211/ieee80211_tdma.c	Wed Feb 11 00:01:02 2009	(r188471)
@@ -173,6 +173,15 @@ tdma_vdetach(struct ieee80211vap *vap)
 	setackpolicy(vap->iv_ic, 0);	/* enable ACK's */
 }
 
+static void
+sta_leave(void *arg, struct ieee80211_node *ni)
+{
+	struct ieee80211vap *vap = arg;
+
+	if (ni->ni_vap == vap && ni != vap->iv_bss)
+		ieee80211_node_leave(ni);
+}
+
 /*
  * TDMA state machine handler.
  */
@@ -180,10 +189,11 @@ static int
 tdma_newstate(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg)
 {
 	struct ieee80211_tdma_state *ts = vap->iv_tdma;
+	struct ieee80211com *ic = vap->iv_ic;
 	enum ieee80211_state ostate;
 	int status;
 
-	IEEE80211_LOCK_ASSERT(vap->iv_ic);
+	IEEE80211_LOCK_ASSERT(ic);
 
 	ostate = vap->iv_state;
 	IEEE80211_DPRINTF(vap, IEEE80211_MSG_STATE, "%s: %s -> %s (%d)\n",
@@ -201,6 +211,11 @@ tdma_newstate(struct ieee80211vap *vap, 
 		 */
 		vap->iv_state = nstate;			/* state transition */
 		ieee80211_cancel_scan(vap);		/* background scan */
+		if (ostate == IEEE80211_S_RUN) {
+			/* purge station table; entries are stale */
+			ieee80211_iterate_nodes(&ic->ic_sta, sta_leave, vap);
+			ieee80211_free_node(vap->iv_bss);	/* XXX */
+		}
 		if (vap->iv_flags_ext & IEEE80211_FEXT_SCANREQ) {
 			ieee80211_check_scan(vap,
 			    vap->iv_scanreq_flags,
@@ -326,7 +341,6 @@ tdma_recv_mgmt(struct ieee80211_node *ni
 			 * Count beacon frame for s/w bmiss handling.
 			 */
 			vap->iv_swbmiss_count++;
-			vap->iv_bmiss_count = 0;
 			/*
 			 * Process tdma ie.  The contents are used to sync
 			 * the slot timing, reconfigure the bss, etc.


More information about the svn-src-projects mailing list