Date: Sun, 21 Jun 2009 16:26:22 +0000 (UTC) From: Rui Paulo <rpaulo@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r194593 - projects/mesh11s/sys/net80211 Message-ID: <200906211626.n5LGQMAP012198@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: rpaulo Date: Sun Jun 21 16:26:22 2009 New Revision: 194593 URL: http://svn.freebsd.org/changeset/base/194593 Log: * Enable HWMP on output. * Add assertions Sponsored by: The FreeBSD Foundation Modified: projects/mesh11s/sys/net80211/ieee80211_hwmp.c projects/mesh11s/sys/net80211/ieee80211_output.c Modified: projects/mesh11s/sys/net80211/ieee80211_hwmp.c ============================================================================== --- projects/mesh11s/sys/net80211/ieee80211_hwmp.c Sun Jun 21 16:23:43 2009 (r194592) +++ projects/mesh11s/sys/net80211/ieee80211_hwmp.c Sun Jun 21 16:26:22 2009 (r194593) @@ -963,10 +963,12 @@ ieee80211_hwmp_discover(struct ieee80211 KASSERT(vap->iv_opmode == IEEE80211_M_MBSS, ("not a mesh vap, opmode %d", vap->iv_opmode)); + KASSERT(!IEEE80211_ADDR_EQ(vap->iv_myaddr, dest), + ("discovering self!")); + if (IEEE80211_IS_MULTICAST(dest)) return ieee80211_find_txnode(vap, dest); - mtx_lock(&hs->hs_lock); TAILQ_FOREACH(fi, &hs->hs_head, fi_next) { if (IEEE80211_ADDR_EQ(fi->fi_dest, dest)) { @@ -994,8 +996,6 @@ ieee80211_hwmp_discover(struct ieee80211 sendpreq = 1; unknowndst = 1; } - - if (sendpreq) { IEEE80211_NOTE_MAC(vap, IEEE80211_MSG_MESH, dest, "%s", "initiating path discovery"); @@ -1023,10 +1023,15 @@ ieee80211_hwmp_discover(struct ieee80211 PREQ_TSEQ(0) = fi->fi_seq; hwmp_send_preq(vap->iv_bss, vap->iv_myaddr, broadcastaddr, &preq); - } else - return vap->iv_bss; //ieee80211_find_txnode(vap, fi->fi_nexthop); + } + + if (!IEEE80211_ADDR_EQ(fi->fi_nexthop, invalidaddr)) + return ieee80211_find_txnode(vap, fi->fi_nexthop); + + IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_MESH, + dest, NULL, "%s", "no valid path to this node"); - return vap->iv_bss; + return NULL; } #undef PREQ_TFLAGS #undef PREQ_TADDR Modified: projects/mesh11s/sys/net80211/ieee80211_output.c ============================================================================== --- projects/mesh11s/sys/net80211/ieee80211_output.c Sun Jun 21 16:23:43 2009 (r194592) +++ projects/mesh11s/sys/net80211/ieee80211_output.c Sun Jun 21 16:26:22 2009 (r194593) @@ -214,12 +214,9 @@ ieee80211_start(struct ifnet *ifp) ieee80211_dwds_mcast(vap, m); } } - ieee80211_hwmp_discover(vap, eh->ether_dhost); -#if 0 if (vap->iv_opmode == IEEE80211_M_MBSS) ni = ieee80211_hwmp_discover(vap, eh->ether_dhost); else -#endif ni = ieee80211_find_txnode(vap, eh->ether_dhost); if (ni == NULL) { /* NB: ieee80211_find_txnode does stat+msg */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906211626.n5LGQMAP012198>