From owner-svn-src-projects@FreeBSD.ORG Mon Apr 27 11:49:21 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 2AF3B1065670; Mon, 27 Apr 2009 11:49:21 +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 F379D8FC16; Mon, 27 Apr 2009 11:49:20 +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 n3RBnKaI014339; Mon, 27 Apr 2009 11:49:20 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n3RBnKNE014338; Mon, 27 Apr 2009 11:49:20 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <200904271149.n3RBnKNE014338@svn.freebsd.org> From: Rui Paulo Date: Mon, 27 Apr 2009 11:49:20 +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: r191560 - 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: Mon, 27 Apr 2009 11:49:21 -0000 Author: rpaulo Date: Mon Apr 27 11:49:20 2009 New Revision: 191560 URL: http://svn.freebsd.org/changeset/base/191560 Log: Add mesh IEs to probe response construction routines. While there, sync the way we construct beacons with probe responses. Sponsored by: The FreeBSD Foundation Modified: projects/mesh11s/sys/net80211/ieee80211_output.c Modified: projects/mesh11s/sys/net80211/ieee80211_output.c ============================================================================== --- projects/mesh11s/sys/net80211/ieee80211_output.c Mon Apr 27 11:14:55 2009 (r191559) +++ projects/mesh11s/sys/net80211/ieee80211_output.c Mon Apr 27 11:49:20 2009 (r191560) @@ -2031,6 +2031,8 @@ ieee80211_alloc_proberesp(struct ieee802 * [tlv] Vendor OUI HT information (optional) * [tlv] Atheros capabilities * [tlv] AppIE's (optional) + * [tlv] Mesh ID (MBSS) + * [tlv] Mesh Conf (MBSS) */ m = ieee80211_getmgtframe(&frm, ic->ic_headroom + sizeof(struct ieee80211_frame), @@ -2055,6 +2057,8 @@ ieee80211_alloc_proberesp(struct ieee802 #ifdef IEEE80211_SUPPORT_SUPERG + sizeof(struct ieee80211_ath_ie) #endif + + 2 + IEEE80211_MESHID_LEN + /* + sizeof(struct ieee80211_meshconf_ie) */ + (vap->iv_appie_proberesp != NULL ? vap->iv_appie_proberesp->ie_len : 0) ); @@ -2144,6 +2148,10 @@ ieee80211_alloc_proberesp(struct ieee802 #endif if (vap->iv_appie_proberesp != NULL) 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); */ + } m->m_pkthdr.len = m->m_len = frm - mtod(m, uint8_t *); return m; @@ -2332,12 +2340,12 @@ ieee80211_beacon_construct(struct mbuf * * XXX Vendor-specific OIDs (e.g. Atheros) * [tlv] WPA parameters * [tlv] WME parameters - * [tlv] MESH ID - * [tlv] MESH configuration * [tlv] Vendor OUI HT capabilities (optional) * [tlv] Vendor OUI HT information (optional) * [tlv] Atheros capabilities (optional) * [tlv] TDMA parameters (optional) + * [tlv] Mesh ID (MBSS) + * [tlv] Mesh Conf (MBSS) * [tlv] application data (optional) */ @@ -2500,6 +2508,8 @@ ieee80211_beacon_alloc(struct ieee80211_ * [tlv] WPA parameters * [tlv] WME parameters * [tlv] TDMA parameters (optional) + * [tlv] Mesh ID (MBSS) + * [tlv] Mesh Conf (MBSS) * [tlv] application data (optional) * NB: we allocate the max space required for the TIM bitmap. * XXX how big is this? @@ -2531,6 +2541,10 @@ ieee80211_beacon_alloc(struct ieee80211_ + (vap->iv_caps & IEEE80211_C_TDMA ? /* TDMA */ sizeof(struct ieee80211_tdma_param) : 0) #endif + + (vap->iv_opmode == IEEE80211_M_MBSS ? + 2 + ni->ni_meshidlen) : 0 + /* + (vap->iv_opmode == IEEE80211_M_MBSS ? + sizeof(struct ieee80211_meshconf_ie) : 0 */ + IEEE80211_MAX_APPIE ; m = ieee80211_getmgtframe(&frm,