From patchwork Mon Aug 10 19:15:51 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Cardona X-Patchwork-Id: 40478 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n7AJRmF9025434 for ; Mon, 10 Aug 2009 19:27:49 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752347AbZHJT1p (ORCPT ); Mon, 10 Aug 2009 15:27:45 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752317AbZHJT1p (ORCPT ); Mon, 10 Aug 2009 15:27:45 -0400 Received: from mail-pz0-f196.google.com ([209.85.222.196]:43325 "EHLO mail-pz0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752123AbZHJT1o (ORCPT ); Mon, 10 Aug 2009 15:27:44 -0400 Received: by mail-pz0-f196.google.com with SMTP id 34so3033885pzk.4 for ; Mon, 10 Aug 2009 12:27:46 -0700 (PDT) Received: by 10.114.135.2 with SMTP id i2mr6736213wad.78.1249932465855; Mon, 10 Aug 2009 12:27:45 -0700 (PDT) Received: from localhost (adsl-71-156-104-53.dsl.pltn13.sbcglobal.net [71.156.104.53]) by mx.google.com with ESMTPS id k37sm7797286waf.7.2009.08.10.12.27.44 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 10 Aug 2009 12:27:45 -0700 (PDT) From: Javier Cardona To: linux-wireless@vger.kernel.org Cc: Javier Cardona , andrey@cozybit.com, johannes@sipsolutions.net, linville@tuxdriver.com, devel@lists.open80211s.org Subject: [PATCH 6/7] mac80211: Assign a default mesh beaconing interval. Date: Mon, 10 Aug 2009 12:15:51 -0700 Message-Id: <1249931752-18127-7-git-send-email-javier@cozybit.com> X-Mailer: git-send-email 1.5.4.3 In-Reply-To: <1249931752-18127-6-git-send-email-javier@cozybit.com> References: <20090810175225.GF2733@tuxdriver.com> <1249931752-18127-1-git-send-email-javier@cozybit.com> <1249931752-18127-2-git-send-email-javier@cozybit.com> <1249931752-18127-3-git-send-email-javier@cozybit.com> <1249931752-18127-4-git-send-email-javier@cozybit.com> <1249931752-18127-5-git-send-email-javier@cozybit.com> <1249931752-18127-6-git-send-email-javier@cozybit.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org The mesh stack was enabling beaconing without specifying an interval. This patch defines a default beaconing interval of 1s. Incidentally, this fixes mesh beaconing in mac80211_hwsim devices. Signed-off-by: Javier Cardona --- net/mac80211/mesh.c | 6 ++++-- net/mac80211/mesh.h | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c index 10d9338..25d0065 100644 --- a/net/mac80211/mesh.c +++ b/net/mac80211/mesh.c @@ -525,9 +525,11 @@ void ieee80211_start_mesh(struct ieee80211_sub_if_data *sdata) struct ieee80211_local *local = sdata->local; ifmsh->housekeeping = true; - ieee80211_queue_work(&local->hw, &ifmsh->work); + queue_work(local->hw, &ifmsh->work); + sdata->vif.bss_conf.beacon_int = MESH_DEFAULT_BEACON_INTERVAL; ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BEACON | - BSS_CHANGED_BEACON_ENABLED); + BSS_CHANGED_BEACON_ENABLED | + BSS_CHANGED_BEACON_INT); } void ieee80211_stop_mesh(struct ieee80211_sub_if_data *sdata) diff --git a/net/mac80211/mesh.h b/net/mac80211/mesh.h index 2ebd74c..4241925 100644 --- a/net/mac80211/mesh.h +++ b/net/mac80211/mesh.h @@ -174,6 +174,7 @@ struct mesh_rmc { */ #define MESH_PATH_REFRESH_TIME 1000 #define MESH_MIN_DISCOVERY_TIMEOUT (2 * MESH_DIAM_TRAVERSAL_TIME) +#define MESH_DEFAULT_BEACON_INTERVAL 1000 /* in 1024 us units */ #define MESH_MAX_PREQ_RETRIES 4 #define MESH_PATH_EXPIRE (600 * HZ)