From owner-svn-src-projects@FreeBSD.ORG Wed Jul 1 22:15:04 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F05741065670; Wed, 1 Jul 2009 22:15:04 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DEEFF8FC18; Wed, 1 Jul 2009 22:15:04 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n61MF40T025436; Wed, 1 Jul 2009 22:15:04 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n61MF4Wj025434; Wed, 1 Jul 2009 22:15:04 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <200907012215.n61MF4Wj025434@svn.freebsd.org> From: Rui Paulo Date: Wed, 1 Jul 2009 22:15:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r195261 - projects/mesh11s/sys/net80211 X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2009 22:15:05 -0000 Author: rpaulo Date: Wed Jul 1 22:15:04 2009 New Revision: 195261 URL: http://svn.freebsd.org/changeset/base/195261 Log: Enable back ageq and automatic reverse path discovery now that they seem to work ok. Sponsored by: The FreeBSD Foundation Modified: projects/mesh11s/sys/net80211/ieee80211_hwmp.c Modified: projects/mesh11s/sys/net80211/ieee80211_hwmp.c ============================================================================== --- projects/mesh11s/sys/net80211/ieee80211_hwmp.c Wed Jul 1 22:06:12 2009 (r195260) +++ projects/mesh11s/sys/net80211/ieee80211_hwmp.c Wed Jul 1 22:15:04 2009 (r195261) @@ -606,7 +606,6 @@ hwmp_recv_preq(struct ieee80211vap *vap, IEEE80211_ADDR_COPY(prep.prep_origaddr, vap->iv_myaddr); prep.prep_origseq = hs->hs_seq++; hwmp_send_prep(ni, vap->iv_myaddr, wh->i_addr2, &prep); -#if 0 /* * Build the reverse path, if we don't have it already. */ @@ -617,7 +616,6 @@ hwmp_recv_preq(struct ieee80211vap *vap, ieee80211_hwmp_discover(vap, dest, NULL); } else if (IEEE80211_ADDR_EQ(rt->rt_nexthop, invalidaddr)) ieee80211_hwmp_discover(vap, rt->rt_dest, NULL); -#endif return; } rt = hwmp_rt_find(vap, PREQ_TADDR(0)); @@ -767,6 +765,9 @@ hwmp_recv_prep(struct ieee80211vap *vap, { struct ieee80211_mesh_state *ms = vap->iv_mesh; struct ieee80211_hwmp_route *rt = NULL; + struct ieee80211com *ic = vap->iv_ic; + struct ifnet *ifp = vap->iv_ifp; + struct mbuf *m, *next; /* * Acceptance criteria: if the PREP was not generated by us and @@ -836,28 +837,22 @@ hwmp_recv_prep(struct ieee80211vap *vap, * XXX: If it's NOT for us and the AE bit is set, * update the proxy information table. */ -#if 0 - if (rt != NULL) { - struct ieee80211com *ic = vap->iv_ic; - struct ifnet *ifp = vap->iv_ifp; - struct mbuf *m, *next; - /* - * Check for frames queued awaiting path discovery. - * XXX probably can tell exactly and avoid remove call - * NB: hash may have false matches, if so they will get - * stuck back on the stageq because there won't be - * a path. - */ - m = ieee80211_ageq_remove(&ic->ic_stageq, - (struct ieee80211_node *)(uintptr_t) - ieee80211_mac_hash(ic, rt->rt_dest)); - for (; m != NULL; m = next) { - next = m->m_nextpkt; - m->m_nextpkt = NULL; - ifp->if_transmit(ifp, m); - } + + /* + * Check for frames queued awaiting path discovery. + * XXX probably can tell exactly and avoid remove call + * NB: hash may have false matches, if so they will get + * stuck back on the stageq because there won't be + * a path. + */ + m = ieee80211_ageq_remove(&ic->ic_stageq, + (struct ieee80211_node *)(uintptr_t) + ieee80211_mac_hash(ic, rt->rt_dest)); + for (; m != NULL; m = next) { + next = m->m_nextpkt; + m->m_nextpkt = NULL; + ifp->if_transmit(ifp, m); } -#endif } static inline int @@ -1139,7 +1134,6 @@ done: if (ni == NULL && m != NULL) { IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_HWMP, dest, NULL, "%s", "no valid path to this node"); -#if 0 if (sendpreq) { struct ieee80211com *ic = vap->iv_ic; /* @@ -1153,7 +1147,6 @@ done: ieee80211_ageq_append(&ic->ic_stageq, m, IEEE80211_INACT_WAIT); } else -#endif m_freem(m); } return ni;