From owner-svn-src-projects@FreeBSD.ORG Tue Apr 28 11:35:23 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 4D044106564A; Tue, 28 Apr 2009 11:35:23 +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 3B6F88FC1A; Tue, 28 Apr 2009 11:35:23 +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 n3SBZNih048422; Tue, 28 Apr 2009 11:35:23 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n3SBZNj6048420; Tue, 28 Apr 2009 11:35:23 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <200904281135.n3SBZNj6048420@svn.freebsd.org> From: Rui Paulo Date: Tue, 28 Apr 2009 11:35:23 +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: r191623 - 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: Tue, 28 Apr 2009 11:35:23 -0000 Author: rpaulo Date: Tue Apr 28 11:35:22 2009 New Revision: 191623 URL: http://svn.freebsd.org/changeset/base/191623 Log: * Forgot to add Mesh Conf IE to probe responses. * Add TIM to Mesh beacons by reusing hostap code. (Mesh TIM is equal as the non-mesh version. The IE may differ in the future if ANA allocates a new one, but for now use one we already have.) Sponsored by: The FreeBSD Foundation Modified: projects/mesh11s/sys/net80211/ieee80211_mesh.h projects/mesh11s/sys/net80211/ieee80211_output.c Modified: projects/mesh11s/sys/net80211/ieee80211_mesh.h ============================================================================== --- projects/mesh11s/sys/net80211/ieee80211_mesh.h Tue Apr 28 11:30:18 2009 (r191622) +++ projects/mesh11s/sys/net80211/ieee80211_mesh.h Tue Apr 28 11:35:22 2009 (r191623) @@ -128,16 +128,8 @@ struct ieee80211_meshcsa_ie { uint8_t csa_count; } __packed; -/* XXXRP: this is equal to the non mesh version. Should we simplify ? */ /* Mesh TIM */ -struct ieee80211_meshtim_ie { - uint8_t tim_ie; /* IEEE80211_ELEMID_MESHTIM */ - uint8_t tim_len; - uint8_t tim_count; /* DTIM count */ - uint8_t tim_period; /* DTIM period */ - uint8_t tim_bitctl; /* bitmap control */ - uint8_t tim_bitmap[1]; /* variable-length bitmap */ -} __packed; +/* Equal to the non Mesh version */ /* Mesh Awake Window */ struct ieee80211_meshawakew_ie { Modified: projects/mesh11s/sys/net80211/ieee80211_output.c ============================================================================== --- projects/mesh11s/sys/net80211/ieee80211_output.c Tue Apr 28 11:30:18 2009 (r191622) +++ projects/mesh11s/sys/net80211/ieee80211_output.c Tue Apr 28 11:35:22 2009 (r191623) @@ -2150,7 +2150,7 @@ ieee80211_alloc_proberesp(struct ieee802 frm = add_appie(frm, vap->iv_appie_proberesp); if (vap->iv_opmode == IEEE80211_M_MBSS) { frm = ieee80211_add_meshid(frm, vap); - /* frm = ieee80211_add_mesconf(frm, vap); */ + frm = ieee80211_add_mesconf(frm, vap); } m->m_pkthdr.len = m->m_len = frm - mtod(m, uint8_t *); @@ -2382,7 +2382,9 @@ ieee80211_beacon_construct(struct mbuf * *frm++ = 2; *frm++ = 0; *frm++ = 0; /* TODO: ATIM window */ bo->bo_tim_len = 0; - } else if (vap->iv_opmode == IEEE80211_M_HOSTAP) { + } else if (vap->iv_opmode == IEEE80211_M_HOSTAP || + vap->iv_opmode == IEEE80211_M_MBSS) { + /* TIM IE is the same for Mesh and Hostap */ struct ieee80211_tim_ie *tie = (struct ieee80211_tim_ie *) frm; tie->tim_ie = IEEE80211_ELEMID_TIM; @@ -2455,14 +2457,6 @@ ieee80211_beacon_construct(struct mbuf * if (vap->iv_opmode == IEEE80211_M_MBSS) { frm = ieee80211_add_meshid(frm, vap); frm = ieee80211_add_meshconf(frm, vap); - /* struct ieee80211_tim_ie *tie = (struct ieee80211_tim_ie *) frm; - tie->tim_ie = IEEE80211_ELEMID_TIM; - tie->tim_len = 4; * length * - tie->tim_count = 0; * DTIM count * - tie->tim_period = vap->iv_dtim_period; * DTIM period * - tie->tim_bitctl = 0; * bitmap control * - tie->tim_bitmap[0] = 0; * Partial Virtual Bitmap * - frm += sizeof(struct ieee80211_tim_ie); */ } bo->bo_tim_trailer_len = frm - bo->bo_tim_trailer; bo->bo_csa_trailer_len = frm - bo->bo_csa;