Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp2723842ybl; Mon, 20 Jan 2020 08:11:57 -0800 (PST) X-Google-Smtp-Source: APXvYqyh2VsI7pbuV1cKtowDjlGQy0fHpt5GDqala0Z/AeB5VqemxUE74RjDiA4sZwFmgrNBgqFR X-Received: by 2002:aca:e084:: with SMTP id x126mr3092oig.97.1579536717095; Mon, 20 Jan 2020 08:11:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579536717; cv=none; d=google.com; s=arc-20160816; b=IKmXqVj0my1AjwZDCfiJtLFDrodRX9rlsMeaCsXCSjZpYRpKVVZeboD8rDLtKI8cpO fzKtaPidH6mpYn68Rdm2AhktoKXoidBADy8Zpkz/gWp4o9Iew6TMeziWpqSNTG1Zyx2R 9SNzohtHcjNQ9xFG4hS7v7jRwTILLPSZoq2w0XKDqTGiWTCnmmF2HYEHwMvYRtXbAvAH Jocl1B/KzyM7Y9LIaQLaBGFzuv/ZUEn8k6YaJlJ1RAFRprjlJhhXmAvlnX9eO2drujf0 ZFCkCYWNybeaF3N7LaT0CTWbjYUMM6wn4el1ffj/1sjDwp5o3EM5XXA182wOskYwefJm 4l7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:to:from:dkim-signature; bh=ecA0xiDygGi3YJpCX3Q+rtTc6zSQ/mOLVNTXguwjeVA=; b=n4L8xaicCKDfvGgweVIMDS+ak19amSpkKTtQ4TorE+BXWPCkTgLNSPKM2fXxjRo3GS lm7+xGKXu36jnMDwdsPm6Ei6UWmKa3VTRVLu7LPM8E/yZ3nNiCBgkQj52RgrG9hmxohG df///XE6m0+C0pLC+JHdvSDY+xaXs4eh7YTQsUA8ryq6+uY3MPzjeIHB6RcfeGfLDpun cETCZET1JaemXvnoQMDHwWXOqUdeLrLV7lx+Sm2czZaDKb683zqau0960FBEg7Y4KCMJ legVGqXlQ77kC1LQign/dWQQodDrWTXiSz1f7D7cBznEXTQc+RrSFUmawiisK6Rd/98y VrVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@silvair-com.20150623.gappssmtp.com header.s=20150623 header.b=Fhqx908M; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v6si8981933ote.41.2020.01.20.08.11.28; Mon, 20 Jan 2020 08:11:57 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@silvair-com.20150623.gappssmtp.com header.s=20150623 header.b=Fhqx908M; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726942AbgATQLY (ORCPT + 99 others); Mon, 20 Jan 2020 11:11:24 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:39412 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726642AbgATQLY (ORCPT ); Mon, 20 Jan 2020 11:11:24 -0500 Received: by mail-wm1-f66.google.com with SMTP id 20so137444wmj.4 for ; Mon, 20 Jan 2020 08:11:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=silvair-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=ecA0xiDygGi3YJpCX3Q+rtTc6zSQ/mOLVNTXguwjeVA=; b=Fhqx908MiLR2xYa/3eFRLFglhZJKBpezrVz0NQLjBQ2t2hvDZoYJQruwuMEC4yMB4c pCf7iPqkt1E2e+yMKtlcc7xReyInmnzz/Zd2At4fB/oDjIYFO1qF6ZV8ciMShWJPhKZy lT9Tu0mkIXAynEHWYBiSQDQ5lQSWo8JFJ1ofntQ6axOdeAF6IxaZ7MQkLCJhruS9NEzY PaeyXwvqQdjI6H8j5Ood1RuxtK4hJoYNUpUDC3WHFazRNYzXzdd6RQd1Uii3qXPWb9ar Kf1jtIg86ST9R3blAbEdesfogOn2txB2grXAjPKXVA4BcgT3vtYZWnmB2vgNwKgVQTX/ 9VAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=ecA0xiDygGi3YJpCX3Q+rtTc6zSQ/mOLVNTXguwjeVA=; b=X649VYvErlunouNhxo1uPcb8IVmGfazGC6Tro9mOo+0g5PTjMk9ciqioOvUV1W3u7g UO0j8q+aSP31kuEtrWKlPkRY/CnHE/2Ruvxn8EVSaDoa5ZV4qW99Vd87e6iX7YLFfnln EtF62mhBkH4MYyheeIPThjHjtjeBT2mUn4u49uTAMQhkw7dDRmvuuC+EpSFykXXwkphC JL4oasGwr86bw2AA/wN3y0nQlh1KUNcfNiTXIoQuVR8d9fr9RXi4yYCxyXa7+jdSYqXl 6loJa7c2iXcd9Qk1UOmPMxSMOjSBj6HCLSyTwFz8958RokgmJRdef26IfS7dzU9sA4Y0 LCiA== X-Gm-Message-State: APjAAAWCa0If2a8bIOl3q8Ts49wE9ynxzVCo9cD/Rw6ZiAsl7kIN5jot FZvFNnmWVylWo21Ig+KoM1F+Ud9heCX7+Q== X-Received: by 2002:a7b:c765:: with SMTP id x5mr74638wmk.129.1579536681795; Mon, 20 Jan 2020 08:11:21 -0800 (PST) Received: from localhost.localdomain ([217.153.94.18]) by smtp.gmail.com with ESMTPSA id 16sm22564602wmi.0.2020.01.20.08.11.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jan 2020 08:11:20 -0800 (PST) From: Jakub Witowski To: linux-bluetooth@vger.kernel.org Subject: [PATCH 0/3] Allow to reattach with new composition data Date: Mon, 20 Jan 2020 17:11:11 +0100 Message-Id: <20200120161114.6757-1-jakub.witowski@silvair.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org This patch allows the application to modify the CID, PID, VID and CRPL in the composition data. According the Mesh Profile (2.3.4 Elements) the modification of fields other than "Elements" is not prohibited. Also in my opinion (as you can see in the 1st patch), there is no need to use pointer to the node_composition struct. The static is more clear and less problematic. Jakub Witowski (3): mesh: use static node_comp instead of the pointer mesh: add composition data setter mesh: allow to reattach with new composition data mesh/mesh-config-json.c | 46 +++++++++++++++----- mesh/mesh-config.h | 2 + mesh/node.c | 96 +++++++++++++++++++++++++---------------- 3 files changed, 96 insertions(+), 48 deletions(-) -- 2.20.1