Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Feb 2009 23:45:58 +0000 (UTC)
From:      Sam Leffler <sam@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r188543 - 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...
Message-ID:  <200902122345.n1CNjwfY070218@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: sam
Date: Thu Feb 12 23:45:58 2009
New Revision: 188543
URL: http://svn.freebsd.org/changeset/base/188543

Log:
  merge r188541: replace ieee80211_node_reclaim by individual operations

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_node.c

Modified: projects/vap7/sys/net80211/ieee80211_node.c
==============================================================================
--- projects/vap7/sys/net80211/ieee80211_node.c	Thu Feb 12 23:44:59 2009	(r188542)
+++ projects/vap7/sys/net80211/ieee80211_node.c	Thu Feb 12 23:45:58 2009	(r188543)
@@ -87,7 +87,6 @@ static void ieee80211_node_table_init(st
 	int inact, int keymaxix);
 static void ieee80211_node_table_reset(struct ieee80211_node_table *,
 	struct ieee80211vap *);
-static void ieee80211_node_reclaim(struct ieee80211_node *);
 static void ieee80211_node_table_cleanup(struct ieee80211_node_table *nt);
 static void ieee80211_erp_timeout(struct ieee80211com *);
 
@@ -674,7 +673,8 @@ ieee80211_sta_join1(struct ieee80211_nod
 	vap->iv_bss = selbs;		/* NB: caller assumed to bump refcnt */
 	if (obss != NULL) {
 		copy_bss(selbs, obss);
-		ieee80211_node_reclaim(obss);
+		ieee80211_node_decref(obss);	/* iv_bss reference */
+		ieee80211_free_node(obss);	/* station table reference */
 		obss = NULL;		/* NB: guard against later use */
 	}
 
@@ -1739,64 +1739,6 @@ node_reclaim(struct ieee80211_node_table
 }
 
 /*
- * Reclaim a (bss) node.  Decrement the refcnt and reclaim
- * the node if the only other reference to it is in the sta
- * table.  This is effectively ieee80211_free_node followed
- * by node_reclaim when the refcnt is 1 (after the free).
- */
-static void
-ieee80211_node_reclaim(struct ieee80211_node *ni)
-{
-	struct ieee80211_node_table *nt = ni->ni_table;
-
-	KASSERT(nt != NULL, ("reclaim node not in table"));
-
-#ifdef IEEE80211_DEBUG_REFCNT
-	IEEE80211_DPRINTF(ni->ni_vap, IEEE80211_MSG_NODE,
-		"%s %p<%s> refcnt %d\n", __func__, ni,
-		 ether_sprintf(ni->ni_macaddr), ieee80211_node_refcnt(ni)-1);
-#endif
-	IEEE80211_NODE_LOCK(nt);
-	if (ieee80211_node_dectestref(ni)) {
-		/*
-		 * Last reference, reclaim state.
-		 */
-		_ieee80211_free_node(ni);
-		nt = NULL;
-	} else if (ieee80211_node_refcnt(ni) == 1 && nt->nt_keyixmap != NULL) {
-		ieee80211_keyix keyix;
-		/*
-		 * Check for a last reference in the key mapping table.
-		 */
-		keyix = ni->ni_ucastkey.wk_rxkeyix;
-		if (keyix < nt->nt_keyixmax &&
-		    nt->nt_keyixmap[keyix] == ni) {
-			IEEE80211_DPRINTF(ni->ni_vap,
-			    IEEE80211_MSG_NODE,
-			    "%s: %p<%s> clear key map entry %u", __func__,
-			    ni, ether_sprintf(ni->ni_macaddr), keyix);
-			nt->nt_keyixmap[keyix] = NULL;
-			ieee80211_node_decref(ni); /* XXX needed? */
-			_ieee80211_free_node(ni);
-			nt = NULL;
-		}
-	}
-	if (nt != NULL && ieee80211_node_refcnt(ni) == 1) {
-		/*
-		 * Last reference is in the sta table; complete
-		 * the reclaim.  This handles bss nodes being
-		 * recycled: the node has two references, one for
-		 * iv_bss and one for the table.  After dropping
-		 * the iv_bss ref above we need to reclaim the sta
-		 * table reference.
-		 */
-		ieee80211_node_decref(ni);	/* NB: be pendantic */
-		_ieee80211_free_node(ni);
-	}
-	IEEE80211_NODE_UNLOCK(nt);
-}
-
-/*
  * Node table support.
  */
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200902122345.n1CNjwfY070218>