Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp19967rwb; Thu, 22 Sep 2022 13:46:17 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6S5WWt9NYvLaEAfVD+Ewqp1VQkTYg+Apwm7cDDseCE94VqgHGPJ4BLxnS5LjOM68eJqPEn X-Received: by 2002:a63:1e03:0:b0:43a:a64d:f3a4 with SMTP id e3-20020a631e03000000b0043aa64df3a4mr4485031pge.121.1663879576876; Thu, 22 Sep 2022 13:46:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663879576; cv=none; d=google.com; s=arc-20160816; b=KtKvJyg9nNXCvMsdwOafFoVzCK3LxEeriUNXFGVGdmLWma71jgp4qJSjNuxywpr3i3 dQ6zxmjMoBpEp4a/1CHkCHQU+BOtyVJTu+TmmBLOXUFcxe1YNmYuiB2pHz6yvXoAbBQZ M6CVlae8kkAD/ygh9Yv8Td5a/65miFcBkMN09VIvXzbv2xzsLcREWQJtAhSkKLOGDJHX xEFGCub/NJt2jtyj7USoLkOgr6PmUBFOozQK1D0NRfQ/LpkAZngh6C6OPDkVnEyUjqRb Lz5scMJAvPzmAGSUdb9D0qfYC9yr9iGGyO3VLwJ/mIvIs6BlD/uZX371Glse6bR8bvm7 xiKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=jELxnTXVyfab64qzF+OpXh1SAQpYYYjmOLlPyob3Vl4=; b=tZ/nDkWLLmpZlizihad0FX4xQ6lkI2xuBjqc8iZNVh2ld3DT/HtnJpljq7OVwXIHdj UaCS5+xY/RB2zRfBqeiM1tnag+dqFGPvQHLUQ5NBCH/OS9L5TNQX3k9wxNsQEZm0+Do+ P/xcExAo7rZHxeN8cPdKSZ0owiLSnoILkO91uZo/2x0HU8tZHnceyUiuAGohU9CLhvtF KTJCucySZ7EUQEzF+Fw8+vDDKyWuh/nKzpdDFNzvvk5CN/wbtfIYEWYJJ8KAptU2FE6M BHIw939VF0sZb9w01ZQo5m4i8BIdAoH56v+41Z/a/WkVSWvZeWldA7Ykc3UNM5ECm0Vd R4xw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=H0YGHQ2o; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h13-20020a170902f70d00b00178221dc5casi844315plo.531.2022.09.22.13.45.34; Thu, 22 Sep 2022 13:46:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=H0YGHQ2o; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229738AbiIVUjE (ORCPT + 99 others); Thu, 22 Sep 2022 16:39:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229647AbiIVUjD (ORCPT ); Thu, 22 Sep 2022 16:39:03 -0400 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D53B51103C4 for ; Thu, 22 Sep 2022 13:39:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663879140; x=1695415140; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=Gs0syu6PDpgGuORWwYL0BuaPKpN/TRV3+bKxC7imBEA=; b=H0YGHQ2oZzXY1zjI4GSdYCrPDIRanFk/ldzRe2Ak6btHqDxCiTAM0s2r MHo9pUMi3awxDl0EvANusbQAv6crhipdrtaq7muC1PVJax16NLJJVgDT3 D5hQVH5Ca47stCaHMFxb/XDkvO/qcBtraIXGcD8dSeNtjrP+yA3U0lBFz 5JG1sDr5OvJaeKcwAG6xw6EnljfZm5aiHmc8Hyih/d2Vd6qWA22hC9kKf Aq75YidelBzJ97fz35TaEaX2L1iTdV6qDUk5wPUueQEI4uY6EuOKB2aha exEQhS95Wg+okPgJiG953ArYj5hGmiQ7g2HReugdBaWxWX/qcEd6pb1iZ g==; X-IronPort-AV: E=McAfee;i="6500,9779,10478"; a="301303192" X-IronPort-AV: E=Sophos;i="5.93,337,1654585200"; d="scan'208";a="301303192" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Sep 2022 13:39:00 -0700 X-IronPort-AV: E=Sophos;i="5.93,337,1654585200"; d="scan'208";a="865028660" Received: from mobl2.amr.corp.intel.com (HELO bgi1-mobl2.amr.corp.intel.com) ([10.212.23.53]) by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Sep 2022 13:38:59 -0700 From: Brian Gix To: linux-bluetooth@vger.kernel.org Cc: luiz.dentz@gmail.com, brian.gix@intel.com, inga.stotland@intel.com Subject: [PATCH BlueZ 0/4] Mesh demon switched to using kernel Mesh MGMT Date: Thu, 22 Sep 2022 13:38:48 -0700 Message-Id: <20220922203852.494315-1-brian.gix@intel.com> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org This patchset enables the mesh daemon (bluetooth-meshd) to use the new MGMT mesh opcodes and events to send and receive Mesh packets. By default, the daemon attempts to enable the experimental mesh functionality, and query the kernel for active mesh support before then enumerating the available controllers and selecting ojne that works. If no kernel support is found, it will continue to use a raw HCI socket for mesh support. Brian Gix (4): mgmt: Add support for Mesh in the kernel lib: Add defines of new MGMT opcodes and events mesh: Improve PB-ADV timing for reliability mesh: Add new kernel MGMT based IO transport Makefile.mesh | 9 +- doc/mgmt-api.txt | 192 +++++++++++++++++++++++++++++++++-------- lib/mgmt.h | 6 ++ mesh/main.c | 39 ++++++++- mesh/mesh-io-api.h | 11 ++- mesh/mesh-io-generic.c | 47 +++------- mesh/mesh-io-unit.c | 13 ++- mesh/mesh-io.c | 188 ++++++++++++++++++++++++++++++---------- mesh/mesh-io.h | 4 +- mesh/mesh-mgmt.c | 164 +++++++++++++++++++++++++++-------- mesh/mesh-mgmt.h | 12 ++- mesh/mesh.c | 6 +- mesh/mesh.h | 2 +- mesh/pb-adv.c | 9 +- 14 files changed, 523 insertions(+), 179 deletions(-) -- 2.37.3