From patchwork Mon Jun 3 16:53:40 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colleen Twitty X-Patchwork-Id: 2653891 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 9F1A840077 for ; Mon, 3 Jun 2013 16:53:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759481Ab3FCQxv (ORCPT ); Mon, 3 Jun 2013 12:53:51 -0400 Received: from mail-pb0-f50.google.com ([209.85.160.50]:58527 "EHLO mail-pb0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759104Ab3FCQxu (ORCPT ); Mon, 3 Jun 2013 12:53:50 -0400 Received: by mail-pb0-f50.google.com with SMTP id wy17so5898641pbc.23 for ; Mon, 03 Jun 2013 09:53:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=nCEXObEHyYPlWbXoIeWWIgV4pRCmwaRBy23237PfQJ0=; b=Rc2C9mnYuoSyMWouAcr9isZGVidRS59wZzufv6OlG7G/DZ6xvynd2zzHuagYEO2tJa tsBEsaUENF7dJFkIq3PNkj2llB0c/mdkq8r9wuQoC+AxBvPy0USiu1n7C+7yWU6S7q/N fmpWS58njhuu75TDDNMKp4qnwfbziJd4via8BAQuMp9vCP75NuVWa43o9AXEpTQZhyGQ 0tMqxupRFYuX1LVSJRPRe0nVOJrzKEqEgukMjNb8x/XaoDfhhMmGH5gLq1i/QUTjOjYP LEL3FauEbh8D07A+cF4bdKSTPH5qS4oQB4vNYVJE8powV3gzkZbL/vtH34xQWVaXovEx Al0g== X-Received: by 10.68.111.228 with SMTP id il4mr25029058pbb.134.1370278430120; Mon, 03 Jun 2013 09:53:50 -0700 (PDT) Received: from figaro.lan (70-35-43-50.static.wiline.com. [70.35.43.50]) by mx.google.com with ESMTPSA id pl9sm41457127pbc.5.2013.06.03.09.53.48 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 03 Jun 2013 09:53:49 -0700 (PDT) From: Colleen Twitty To: Johannes Berg Cc: linux-wirelss , open80211s Subject: [PATCH 2/2] mac80211: expire mesh peers based on mesh configuration Date: Mon, 3 Jun 2013 09:53:40 -0700 Message-Id: <1370278420-10135-2-git-send-email-colleen@cozybit.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1370278420-10135-1-git-send-email-colleen@cozybit.com> References: <1370278420-10135-1-git-send-email-colleen@cozybit.com> X-Gm-Message-State: ALoCoQmZTB/I+2Bs+f+CS8P6ik+fA2sk/EPpm4bt0OjW3S3wMk9+Xf5q8xebcX+x8QA5NObuyeHX Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org The time it takes to see the peer link expire may differ by a minute since sta_expire() is run once a minute as a mesh housekeeping task. Signed-off-by: Colleen Twitty --- net/mac80211/cfg.c | 2 ++ net/mac80211/mesh.c | 2 +- net/mac80211/mesh.h | 1 - 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 1a89c80..97bb950 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -1856,6 +1856,8 @@ static int ieee80211_update_mesh_config(struct wiphy *wiphy, if (_chg_mesh_attr(NL80211_MESHCONF_AWAKE_WINDOW, mask)) conf->dot11MeshAwakeWindowDuration = nconf->dot11MeshAwakeWindowDuration; + if (_chg_mesh_attr(NL80211_MESHCONF_PLINK_TIMEOUT, mask)) + conf->plink_timeout = nconf->plink_timeout; ieee80211_mbss_info_change_notify(sdata, BSS_CHANGED_BEACON); return 0; } diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c index 6952760..37a0533 100644 --- a/net/mac80211/mesh.c +++ b/net/mac80211/mesh.c @@ -573,7 +573,7 @@ static void ieee80211_mesh_housekeeping(struct ieee80211_sub_if_data *sdata) struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; u32 changed; - ieee80211_sta_expire(sdata, IEEE80211_MESH_PEER_INACTIVITY_LIMIT); + ieee80211_sta_expire(sdata, ifmsh->mshcfg.plink_timeout * HZ); mesh_path_expire(sdata); changed = mesh_accept_plinks_update(sdata); diff --git a/net/mac80211/mesh.h b/net/mac80211/mesh.h index da15877..faf6ce4 100644 --- a/net/mac80211/mesh.h +++ b/net/mac80211/mesh.h @@ -188,7 +188,6 @@ struct mesh_rmc { u32 idx_mask; }; -#define IEEE80211_MESH_PEER_INACTIVITY_LIMIT (1800 * HZ) #define IEEE80211_MESH_HOUSEKEEPING_INTERVAL (60 * HZ) #define MESH_PATH_EXPIRE (600 * HZ)