Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1018769ybt; Fri, 19 Jun 2020 21:47:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyUu3gyB4KIxHb2COQ8HN/PwujSwclZBp5FPYOCRYP+IOZGhfM3n3qoqgBX2du9KSTXI55M X-Received: by 2002:a17:906:ccd5:: with SMTP id ot21mr6519201ejb.508.1592628479701; Fri, 19 Jun 2020 21:47:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592628479; cv=none; d=google.com; s=arc-20160816; b=R/TZjVAipL16tmXwx0KInL1Ju57Lx/DQbMo21AejzqA04xib1g9EpuVIE2ervmfpmF 2i5cv8CNmggaS/u0vloBBrcXTCSLxJpR1VhtC+9E1l5tOMuCkJYAyig3QplWMuCbJTDE lAaT6fGEpeH8abjghD9OEiwrjdzgsBACFyG0KNz3D1d4fF0e/LuADkv5cNOcewGzBkR4 2wQfwxEqEX98zRuQLCp/sxgbTbi9xGideM0AJyE9u0Itgjb/Cs9u3wemhlI39p1PickP F+pG4HMmzFexhPgusRRn6u9ZlEZcAz2dEYOIVNXv7I/QejPk1sySVaSEIkC8qC6p9vpb Fubg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :ironport-sdr:ironport-sdr; bh=Y7oqGFZudVI6ATs4MbaXGM1RIMdA2EccUOIqYjnj1Hc=; b=cje4PynZN9G8sVWYI1PvHytCrKkJjtHiLoy7NV3BctMbChI7+XExfB1OZX6EHUtDwq j/hc34ORU182Zw0ETTdi0V6N55gM/e7e6vNmjMo6ZgkI+hKuFsXQ90wmFHdwy1w9ekNp k5DCvqNyN7SyPUJFZznKxsw+l0i4Mx4MG0hQ5+lkia4stWlayUgaXLfhoorlqDaFqLIB ftrO7+Fz7nwd842315Lqs/ZlrusLGxT7vzj52VJxNeG0u+bk5x/l8iKvHeCHNHs5KRw5 ybSIbwsl9E+vcJlRsH3kLK31l5Ro5u0H29rVo7zBtfHgOgDi1i9NSGqc9p+c93xqkpU8 wT+A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id re27si5086687ejb.426.2020.06.19.21.47.35; Fri, 19 Jun 2020 21:47:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727038AbgFSV07 (ORCPT + 99 others); Fri, 19 Jun 2020 17:26:59 -0400 Received: from mga03.intel.com ([134.134.136.65]:21821 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727051AbgFSV07 (ORCPT ); Fri, 19 Jun 2020 17:26:59 -0400 IronPort-SDR: u7o09xU3TcawovFfkQQfkbTuCEmRPV4oMlrAhaRP5N4t+d9ClJZgfbBKnHB7Xu+uAMGh3a8owe yOgvMm+STi4g== X-IronPort-AV: E=McAfee;i="6000,8403,9657"; a="143045096" X-IronPort-AV: E=Sophos;i="5.75,256,1589266800"; d="scan'208";a="143045096" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jun 2020 14:26:58 -0700 IronPort-SDR: RB4BRUU2YRmlsRjf2MWDDeJXTM5wSCKphGsNhmShNPs/0zivXU/mEDqR6HSRQAfuAn2DwNxUQk bkR23jsL/bZA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,256,1589266800"; d="scan'208";a="292246231" Received: from pafleisc-mobl.amr.corp.intel.com (HELO ingas-nuc1.sea.intel.com) ([10.254.109.121]) by orsmga002.jf.intel.com with ESMTP; 19 Jun 2020 14:26:57 -0700 From: Inga Stotland To: linux-bluetooth@vger.kernel.org Cc: brian.gix@intel.com, Inga Stotland Subject: [PATCH BlueZ 1/3] mesh: Emit PropertiesChanged when IV Index changes Date: Fri, 19 Jun 2020 14:26:53 -0700 Message-Id: <20200619212655.107839-2-inga.stotland@intel.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200619212655.107839-1-inga.stotland@intel.com> References: <20200619212655.107839-1-inga.stotland@intel.com> 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 adds emitting of PropertiesChanged signal whenever the mesh IV index is updated to indicate that the vlaues of "IvIndex" property has been modified. --- mesh/net.c | 2 ++ mesh/node.c | 9 +++++++++ mesh/node.h | 1 + 3 files changed, 12 insertions(+) diff --git a/mesh/net.c b/mesh/net.c index 3ab948be5..b54c647cb 100644 --- a/mesh/net.c +++ b/mesh/net.c @@ -2566,6 +2566,8 @@ static void update_iv_ivu_state(struct mesh_net *net, uint32_t iv_index, rpl_init(net->node, iv_index); } + node_property_changed(net->node, "IVIndex"); + net->iv_index = iv_index; net->iv_update = ivu; } diff --git a/mesh/node.c b/mesh/node.c index cf4d93aec..ee6d1833f 100644 --- a/mesh/node.c +++ b/mesh/node.c @@ -2280,6 +2280,15 @@ static void setup_node_interface(struct l_dbus_interface *iface) NULL); } +void node_property_changed(struct mesh_node *node, const char *property) +{ + struct l_dbus *bus = dbus_get_bus(); + + if (bus) + l_dbus_property_changed(dbus_get_bus(), node->obj_path, + MESH_NODE_INTERFACE, property); +} + bool node_dbus_init(struct l_dbus *bus) { if (!l_dbus_register_interface(bus, MESH_NODE_INTERFACE, diff --git a/mesh/node.h b/mesh/node.h index b8b2b1b49..6c4542a78 100644 --- a/mesh/node.h +++ b/mesh/node.h @@ -99,3 +99,4 @@ struct mesh_agent *node_get_agent(struct mesh_node *node); const char *node_get_storage_dir(struct mesh_node *node); bool node_load_from_storage(const char *storage_dir); void node_finalize_new_node(struct mesh_node *node, struct mesh_io *io); +void node_property_changed(struct mesh_node *node, const char *property); -- 2.26.2