From patchwork Sat Mar 2 06:02:50 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Pedersen X-Patchwork-Id: 2206021 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id D5E8FDF230 for ; Sat, 2 Mar 2013 06:04:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751998Ab3CBGER (ORCPT ); Sat, 2 Mar 2013 01:04:17 -0500 Received: from mail-pb0-f45.google.com ([209.85.160.45]:65314 "EHLO mail-pb0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751725Ab3CBGEM (ORCPT ); Sat, 2 Mar 2013 01:04:12 -0500 Received: by mail-pb0-f45.google.com with SMTP id ro8so2158468pbb.4 for ; Fri, 01 Mar 2013 22:04:12 -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=6NhH9wtf6BmEX5RDlcY+q62cLkI1a6sbQxdGnYLredg=; b=BJQ+35xSADQ+bGfucOMW9bDOB9ozO467we6R4Ws1Uq5TxU2m2AOvn4iSkeBo8RSCFI 8K6z8xmCLIhQKCNg7xBo+K0XZ6bnMVX/SXaV/nJ9Ja/sBexXZPzqKP7zMl3f0w54ISPv U4wL3NZ2OiGFVa7UFV6M+5rzkfzcr78MRxpaFpRKFe7dbaQLXKZExb/IEykHEIQWc66y X0h1gGPmxCZ0KzvkJzuRkqBT5L+Ln+5adAW8e6RZy4dT1O9ROfIxMdRanApHDSSOdwjZ kEiRqg3K4eDc81mDb77mRDQBLsWXJXQ3hbYUkrTX4grBwmrCvsz5BJjnyVBkqMqJp7w6 DTUQ== X-Received: by 10.66.147.98 with SMTP id tj2mr21882055pab.148.1362204252186; Fri, 01 Mar 2013 22:04:12 -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.11 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 01 Mar 2013 22:04:11 -0800 (PST) From: Thomas Pedersen To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, devel@lists.open80211s.org, Thomas Pedersen Subject: [PATCH 4/6] nl80211: user_mpm overrides auto_open_plinks Date: Fri, 1 Mar 2013 22:02:50 -0800 Message-Id: <1362204172-28307-4-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: ALoCoQkigKw/piSeeqXr7rQzc6Rrn19nQnfSTEkYOLByRKzExzyvjPk2d99M57fxbGBgAJcoAgYk Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org If the user requested a userspace MPM, automatically disable auto_open_plinks to fully disable the kernel MPM. Signed-off-by: Thomas Pedersen --- include/uapi/linux/nl80211.h | 6 ++++-- net/wireless/nl80211.c | 3 +++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h index 8134c6a..79da871 100644 --- a/include/uapi/linux/nl80211.h +++ b/include/uapi/linux/nl80211.h @@ -2467,8 +2467,10 @@ enum nl80211_mesh_power_mode { * @NL80211_MESHCONF_TTL: specifies the value of TTL field set at a source mesh * point. * - * @NL80211_MESHCONF_AUTO_OPEN_PLINKS: whether we should automatically - * open peer links when we detect compatible mesh peers. + * @NL80211_MESHCONF_AUTO_OPEN_PLINKS: whether we should automatically open + * peer links when we detect compatible mesh peers. Disabled if + * @NL80211_MESH_SETUP_USERSPACE_MPM or @NL80211_MESH_SETUP_USERSPACE_AMPE are + * set. * * @NL80211_MESHCONF_HWMP_MAX_PREQ_RETRIES: the number of action frames * containing a PREQ that an MP can send to a particular destination (path diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index e3f2489..bd73231 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -7422,6 +7422,9 @@ static int nl80211_join_mesh(struct sk_buff *skb, struct genl_info *info) return err; } + if (setup.user_mpm) + cfg.auto_open_plinks = false; + if (info->attrs[NL80211_ATTR_WIPHY_FREQ]) { err = nl80211_parse_chandef(rdev, info, &setup.chandef); if (err)