From patchwork Sat Mar 2 06:02:51 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Pedersen X-Patchwork-Id: 2206031 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 1EFC73FCA4 for ; Sat, 2 Mar 2013 06:04:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752014Ab3CBGET (ORCPT ); Sat, 2 Mar 2013 01:04:19 -0500 Received: from mail-pb0-f44.google.com ([209.85.160.44]:61776 "EHLO mail-pb0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751992Ab3CBGEN (ORCPT ); Sat, 2 Mar 2013 01:04:13 -0500 Received: by mail-pb0-f44.google.com with SMTP id wz12so2143622pbc.31 for ; Fri, 01 Mar 2013 22:04:13 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state; bh=J1ZjZB1WlEwdIjZcDOB8pk1AbmsWtr8DDhOvnnueBeQ=; b=DpAZr7dQ4iCFDNZsBtdTbOHjsqBic6tlCCEuEC0WOXGNto8qXtfLUWcKkznT0oWJSb 1GuIt8eHaA47LhMxU3n1j/ZK7z2WbQCn2M9itQXwHtN7uM7e4ulwZzVx+8Rp7iumtHCG ARHR8QXiX8pwUkRUPKGw3n4+rF1Kq66XkM58s7aUka4azvXwWgw/nszDss1QjGNJN33e WFEUw7obotKt/+ZuCNVddaWPOR+q2buJQcqu33u45zOcq1yaJcTE9aeU53S17XmmN0lw k61JUzYIqZovCiu4NXAqnVSyKSC+Jmp3m6X8mxjKz7CsSvcWpLasK7UMfQUf7zdViTnd pxug== X-Received: by 10.68.198.34 with SMTP id iz2mr15881649pbc.148.1362204253424; Fri, 01 Mar 2013 22:04:13 -0800 (PST) Received: from cable.lan (70-35-43-50.static.wiline.com. [70.35.43.50]) by mx.google.com with ESMTPS id u10sm15650692pax.14.2013.03.01.22.04.12 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 01 Mar 2013 22:04:12 -0800 (PST) From: Thomas Pedersen To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, devel@lists.open80211s.org, Thomas Pedersen Subject: [PATCH 5/6] mac80211: disallow changing auto_open_plinks Date: Fri, 1 Mar 2013 22:02:51 -0800 Message-Id: <1362204172-28307-5-git-send-email-thomas@cozybit.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1362204172-28307-1-git-send-email-thomas@cozybit.com> References: <1362204172-28307-1-git-send-email-thomas@cozybit.com> X-Gm-Message-State: ALoCoQkIO42ncbvXUTBdsgaEEo5vIJdQEeqXZaVjxMHDZMQd3bHQbcolhGT6YgzjsZCBq8f/Bi/g Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org while user MPM is running. Signed-off-by: Thomas Pedersen --- net/mac80211/cfg.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index cd9c222..f27eac5 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -1770,8 +1770,11 @@ static int ieee80211_update_mesh_config(struct wiphy *wiphy, conf->dot11MeshTTL = nconf->dot11MeshTTL; if (_chg_mesh_attr(NL80211_MESHCONF_ELEMENT_TTL, mask)) conf->element_ttl = nconf->element_ttl; - if (_chg_mesh_attr(NL80211_MESHCONF_AUTO_OPEN_PLINKS, mask)) + if (_chg_mesh_attr(NL80211_MESHCONF_AUTO_OPEN_PLINKS, mask)) { + if (ifmsh->user_mpm) + return -EBUSY; conf->auto_open_plinks = nconf->auto_open_plinks; + } if (_chg_mesh_attr(NL80211_MESHCONF_SYNC_OFFSET_MAX_NEIGHBOR, mask)) conf->dot11MeshNbrOffsetMaxNeighbor = nconf->dot11MeshNbrOffsetMaxNeighbor;