Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp19971rwb; Thu, 22 Sep 2022 13:46:17 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7S4W0ca++V36HvphKQX8lFHu8BBKwixlRZhbvmEVILqidaY8wBFTtuyFtCn+CyBOs1ouhN X-Received: by 2002:a50:d696:0:b0:453:eecf:d686 with SMTP id r22-20020a50d696000000b00453eecfd686mr5132674edi.349.1663879577064; Thu, 22 Sep 2022 13:46:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663879577; cv=none; d=google.com; s=arc-20160816; b=uYonqFq2JHYHKvE+WnqCIJTqq5t0FKWIPnuNtdTw30YXObhQz4b7kAjO2WfdvNwY8P 4ZjKbebDvMvSr9+eN1xKhJNlTplEyotjPC/lTxfc0fhSoK0epg7kMcH15ODFWjip5WcV gKB+nFW/vtPvRQSW1igRwEvG9+Wf7KumlIDWmeGWjlIbc7VK3wUWDwB3aU1UIBI87F87 HaGSwumzAoU0smAxlEakWNRVPNbxnpGGln7XlhmFCdHOz/cQtZRc1jtOMjgd3zZSr200 Mn0tEcYwrZisWkvdHPlCLqz46nsqVG41pY2anIwIRVVd0hQAeTJIfNSCsGwSbog/ts2t PXdQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=3niVgXMmhGtBQIJwmWZ4ZRXY4Hrj0OPH+68YzfTyFOU=; b=NYOL897xWkJLpm20KMPHCzP6Oj9GZMU2WHhdb0eM1E7SJ8jc1TzSWfSmm1ElJEudIG 9Sto4RQcLI4M6kYgzXWnMJca+tdbMEg8BEK8Z/krpL7Dx4OsO/gpdWGuCksO7sc3HkB8 M7llYjfzzGLdQNorMJHAtPhdBmUIUAT973P7W5xn04esE3BfUKciE1oxVrTHAz7tf/nx pIB2s06V2aO8Os5t7yKtdk23SOgJNFxcdINzRFqfJj97yRBMj/QlLsiaUvg//2I45b+u dcLzBaLyR6pvLMaSWC5GzH9xkDEhiPGrJ/vFCtZH/DqLjuEQPSOlf3JEXY5R7OctZUOz TiiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=PIkVXs5I; 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 qb40-20020a1709077ea800b007822ad0075esi5118477ejc.376.2022.09.22.13.45.33; Thu, 22 Sep 2022 13:46:17 -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=PIkVXs5I; 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 S229720AbiIVUjG (ORCPT + 99 others); Thu, 22 Sep 2022 16:39:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39036 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229449AbiIVUjF (ORCPT ); Thu, 22 Sep 2022 16:39:05 -0400 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 45C0A1103C4 for ; Thu, 22 Sep 2022 13:39:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663879144; x=1695415144; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=AU+rtRD7CTXQDrndJ8oGbf/wB3JSyPQjG8Km/9WFCtE=; b=PIkVXs5I3Ozl4QSFWTeuiyAdaK4MnpI7lGSPg3ryoB2B8iD7hNq/mqpg tPvr/XJ80+9I8nkiKJEyjh1iU0EnFghzMEyTSvAekOxEcwTNK9Vuw3bWR 3LI+jz1W+nQiCw2tRL1k5G/W51I6XBxlyfcqECCHBMsH+YbV287cDy9I1 VWeREzsKsj4ALGIhvfbJeF7dgcd4qtgepv4RSZY6M5Jz7IE4dh3ZxQbCK BWKu/ESVrQ9d9hGK36UYh7h2tee7QafVOjy/DIVgNut3AJV/qpNvyJfs0 fYiJKnGilGYaIYUU6K7lLs9U1rSl1J9Nhf2dLLp2afLR0bOd+6+C6WGzh w==; X-IronPort-AV: E=McAfee;i="6500,9779,10478"; a="301303196" X-IronPort-AV: E=Sophos;i="5.93,337,1654585200"; d="scan'208";a="301303196" 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="865028674" 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:39:00 -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 3/4] mesh: Improve PB-ADV timing for reliability Date: Thu, 22 Sep 2022 13:38:51 -0700 Message-Id: <20220922203852.494315-4-brian.gix@intel.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220922203852.494315-1-brian.gix@intel.com> References: <20220922203852.494315-1-brian.gix@intel.com> 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 Because provisioning is not speed dependant, Timing on outbound PB-ADV packets have been modified to be less likely missed by remote controlers with looser timing capabilities. --- mesh/pb-adv.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/mesh/pb-adv.c b/mesh/pb-adv.c index 83f922aa8..180b16258 100644 --- a/mesh/pb-adv.c +++ b/mesh/pb-adv.c @@ -23,6 +23,8 @@ #include "mesh/provision.h" #include "mesh/pb-adv.h" +#include "mesh/util.h" + struct pb_adv_session { mesh_prov_open_func_t open_cb; @@ -158,7 +160,7 @@ static void send_adv_segs(struct pb_adv_session *session, const uint8_t *data, l_debug("max_seg: %2.2x", max_seg); l_debug("size: %2.2x, CRC: %2.2x", size, buf[9]); - pb_adv_send(session, MESH_IO_TX_COUNT_UNLIMITED, 200, + pb_adv_send(session, MESH_IO_TX_COUNT_UNLIMITED, 500, buf, init_size + 10); consumed = init_size; @@ -174,7 +176,7 @@ static void send_adv_segs(struct pb_adv_session *session, const uint8_t *data, buf[6] = (i << 2) | 0x02; memcpy(buf + 7, data + consumed, seg_size); - pb_adv_send(session, MESH_IO_TX_COUNT_UNLIMITED, 200, + pb_adv_send(session, MESH_IO_TX_COUNT_UNLIMITED, 500, buf, seg_size + 7); consumed += seg_size; @@ -270,7 +272,8 @@ static void send_ack(struct pb_adv_session *session, uint8_t trans_num) ack.trans_num = trans_num; ack.opcode = PB_ADV_ACK; - pb_adv_send(session, 1, 100, &ack, sizeof(ack)); + pb_adv_send(session, MESH_IO_TX_COUNT_UNLIMITED, 500, + &ack, sizeof(ack)); } static void send_close_ind(struct pb_adv_session *session, uint8_t reason) -- 2.37.3