Date: Tue, 9 Jun 2009 20:16:22 +0000 (UTC) From: Rui Paulo <rpaulo@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r193852 - projects/mesh11s/sys/net80211 Message-ID: <200906092016.n59KGMOd082415@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: rpaulo Date: Tue Jun 9 20:16:22 2009 New Revision: 193852 URL: http://svn.freebsd.org/changeset/base/193852 Log: Move code previously added to vdetach to vattach. Add debugging to verify_meshconf() Sponsored by: The FreeBSD Foundation Modified: projects/mesh11s/sys/net80211/ieee80211_mesh.c Modified: projects/mesh11s/sys/net80211/ieee80211_mesh.c ============================================================================== --- projects/mesh11s/sys/net80211/ieee80211_mesh.c Tue Jun 9 19:51:34 2009 (r193851) +++ projects/mesh11s/sys/net80211/ieee80211_mesh.c Tue Jun 9 20:16:22 2009 (r193852) @@ -117,8 +117,6 @@ static void mesh_vdetach(struct ieee80211vap *vap) { ieee80211_hwmp_vdetach(vap); - vap->iv_meshseq = 0; - vap->iv_meshflags = (IEEE80211_MFLAGS_AP | IEEE80211_MFLAGS_FWRD); } static void @@ -128,6 +126,8 @@ mesh_vattach(struct ieee80211vap *vap) vap->iv_input = mesh_input; vap->iv_opdetach = mesh_vdetach; vap->iv_recv_mgmt = mesh_recv_mgmt; + vap->iv_meshseq = 0; + vap->iv_meshflags = (IEEE80211_MFLAGS_AP | IEEE80211_MFLAGS_FWRD); ieee80211_hwmp_vattach(vap); } @@ -1043,21 +1043,53 @@ mesh_verify_meshconf(struct ieee80211vap if (meshconf == NULL) return 1; - if (meshconf->conf_ver != IEEE80211_MESHCONF_VERSION) + if (meshconf->conf_ver != IEEE80211_MESHCONF_VERSION) { + IEEE80211_DPRINTF(vap, IEEE80211_MSG_MESH, + "wrong mesh conf version: %d\n", meshconf->conf_ver); return 1; - if (memcmp(meshconf->conf_pselid, hwmp, 4) != 0) + } + if (memcmp(meshconf->conf_pselid, hwmp, 4) != 0) { + IEEE80211_DPRINTF(vap, IEEE80211_MSG_MESH, + "unknown path selection algorithm: 0x%x%x%x%x\n", + meshconf->conf_pselid[0], meshconf->conf_pselid[1], + meshconf->conf_pselid[2], meshconf->conf_pselid[3]); return 1; - if (memcmp(meshconf->conf_pmetid, airtime, 4) != 0) + } + if (memcmp(meshconf->conf_pmetid, airtime, 4) != 0) { + IEEE80211_DPRINTF(vap, IEEE80211_MSG_MESH, + "unknown path metric algorithm: 0x%x%x%x%x\n", + meshconf->conf_pmetid[0], meshconf->conf_pmetid[1], + meshconf->conf_pmetid[2], meshconf->conf_pmetid[3]); return 1; - if (memcmp(meshconf->conf_ccid, null, 4) != 0) + } + if (memcmp(meshconf->conf_ccid, null, 4) != 0) { + IEEE80211_DPRINTF(vap, IEEE80211_MSG_MESH, + "unknown congestion sig algorithm: 0x%x%x%x%x\n", + meshconf->conf_ccid[0], meshconf->conf_ccid[1], + meshconf->conf_ccid[2], meshconf->conf_ccid[3]); return 1; - if (memcmp(meshconf->conf_syncid, null, 4) != 0) + } + if (memcmp(meshconf->conf_syncid, null, 4) != 0) { + IEEE80211_DPRINTF(vap, IEEE80211_MSG_MESH, + "unknown sync algorithm: 0x%x%x%x%x\n", + meshconf->conf_syncid[0], meshconf->conf_syncid[1], + meshconf->conf_syncid[2], meshconf->conf_syncid[3]); return 1; - if (memcmp(meshconf->conf_authid, null, 4) != 0) + } + if (memcmp(meshconf->conf_authid, null, 4) != 0) { + IEEE80211_DPRINTF(vap, IEEE80211_MSG_MESH, + "unknown auth auth algorithm: 0x%x%x%x%x\n", + meshconf->conf_pselid[0], meshconf->conf_pselid[1], + meshconf->conf_pselid[2], meshconf->conf_pselid[3]); return 1; + } /* Not accepting peers */ - if (!(meshconf->conf_cap & IEEE80211_MESHCONF_CAP_AP)) + if (!(meshconf->conf_cap & IEEE80211_MESHCONF_CAP_AP)) { + IEEE80211_DPRINTF(vap, IEEE80211_MSG_MESH, + "not accepting peers: 0x%x\n", meshconf->conf_cap); return 1; + } + return 0; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906092016.n59KGMOd082415>