Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp1328409rwb; Fri, 23 Sep 2022 11:02:06 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7OTYvpApAtnCe1NRWPo/1HPVSOSRBudWeaNLBbfE/ykKEEvw3g51mZWgeYItkwGe/Wj625 X-Received: by 2002:a17:90b:1b4c:b0:202:c1a3:25ce with SMTP id nv12-20020a17090b1b4c00b00202c1a325cemr23071719pjb.232.1663956125983; Fri, 23 Sep 2022 11:02:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663956125; cv=none; d=google.com; s=arc-20160816; b=BQXRgqs9h1+2JxqZUmwMr8mIJo2SfdM63duq1z/ccswHsUP38gXGmKxvfsRP7p+2oR cF/Nm8BEP7O+o35Mqb3bOq9Jjp5WNC9EpFRSzsjF0QjSWAWB1LWVaY3n20LOmlHdpQmz lyHMoVUPncn19Lr0UI4iiUfIA/Wego6ATh4nuRUITrExJzYj7x+Q6FvVmRdVlwiAYz+9 UVmRmpAl9tLc9BCrBEcIX+AEWgmQY6Io7yTzOJDXQXk79Pkjv4ul70RZUjDiUWoySEjF LMCi/jgr6+jCnqEpUJr2b5GqgQeht68fM0Sbf5qMZeveiaIVs8t3v9eQgNNPSVifkbrF LNKg== 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=tsUoG55y/VZiquT4snEKSC9QEg9fMvqgvVDnmoaZAQE=; b=fjmiWUM2LpJEx8L7hhlrxcBiu3CA+s+GcPNd52XUXW3ebQpwFegcRLPpbsKpgUzy9P aNCexrk2AF4b8BqgrEVK3UUlIq0qS6dJQMdEvIPR3gYS6suxSUi5qh19WXzwu9icjqjN np/8y/fF46nTe+F/hp/S7no2tG7JXyiP/hvn6XOScNGAYGFompjUk02FBzqjtzsIXbJS ma3DDnteC+9iVJSS7PDRfAYyaVowEHUxeTlTi411iwjnlsdS+CQ+b5bo29dxS2Br8w/t ykv6P/khkuk/aETzI+B70mDBqNoieQR/ij1CqHp/oBQ/mFRnGUFJ4v4cCGAzwVYvKz2X YAdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=bsS12wGN; 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 m5-20020a17090b068500b00200957d2265si3129846pjz.134.2022.09.23.11.01.51; Fri, 23 Sep 2022 11:02:05 -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=bsS12wGN; 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 S232646AbiIWSAu (ORCPT + 99 others); Fri, 23 Sep 2022 14:00:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34974 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232626AbiIWSAt (ORCPT ); Fri, 23 Sep 2022 14:00:49 -0400 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 15D1F8C028 for ; Fri, 23 Sep 2022 11:00:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663956048; x=1695492048; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=3Qe3EEGwjOJAFfWuVOfdQJ4FuFXvzFxoL9HU49eQLaA=; b=bsS12wGN+VNvdqsmjUWuiaj8skK9KZ0XRVwaJpIFXmK1v/I8x+rniSzt KkvVDMz90BaCGae8vFNCec/MdHesMkGge/62o2ZxlrCwGDwHTwWjnIkDq GJ74ZhlQEst+bQ+OoW+zHxVfkLAD2/GMR7rubCYZmz7U5/bkjNrPXMnYN IYEMgqd/OEwYEmgZBN4RUpBGzht1IeFsUWksAtfQJfB4AdXBdI+1FpwZt Ydz5/Ijgt/2hRs2bX8ffEbXeQfKjzp0gwjjBgi3iQzkPu3WsizBUhimki tM+tGe7Iw8V4kPx+CxTUReUcgsbvqye8q43n82n0ye4mlqW0fRabBhd4V Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10479"; a="300633802" X-IronPort-AV: E=Sophos;i="5.93,339,1654585200"; d="scan'208";a="300633802" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Sep 2022 11:00:30 -0700 X-IronPort-AV: E=Sophos;i="5.93,339,1654585200"; d="scan'208";a="745878190" Received: from cramirez-mobl.amr.corp.intel.com (HELO bgi1-mobl2.amr.corp.intel.com) ([10.212.82.81]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Sep 2022 11:00:30 -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 v5 0/2] Mesh demon switched to using kernel Mesh MGMT Date: Fri, 23 Sep 2022 11:00:16 -0700 Message-Id: <20220923180018.815614-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=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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. v2-v3: Fix whitespace and spelling v4: Rework missed 2 new files... readded. v5: Fix null-point dereference found by CI Brian Gix (2): mesh: Improve PB-ADV timing for reliability mesh: Add new kernel MGMT based IO transport Makefile.mesh | 9 +- mesh/main.c | 39 +- mesh/mesh-io-api.h | 11 +- mesh/mesh-io-generic.c | 47 +-- mesh/mesh-io-mgmt.c | 788 +++++++++++++++++++++++++++++++++++++++++ mesh/mesh-io-mgmt.h | 11 + mesh/mesh-io-unit.c | 13 +- mesh/mesh-io.c | 189 +++++++--- 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, 1160 insertions(+), 144 deletions(-) create mode 100644 mesh/mesh-io-mgmt.c create mode 100644 mesh/mesh-io-mgmt.h -- 2.37.3