Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp1862063pxp; Mon, 21 Mar 2022 06:37:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz24wzGovB6fKJLEqcrc5qXRVPGLgGWahtKYi0BmF9gWH8Mjoh2JDHuCOxOLR9ZuojA+oJb X-Received: by 2002:a17:90b:3907:b0:1c6:a16b:12e3 with SMTP id ob7-20020a17090b390700b001c6a16b12e3mr21068445pjb.157.1647869877281; Mon, 21 Mar 2022 06:37:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647869877; cv=none; d=google.com; s=arc-20160816; b=FS97/fTUOM7h/v1l8lHgzbZrnsc5ss61OJ26okSyh29SVLEjJAe82rigDlKsy8CfQG aIDaNMHa1SHvKCH16ebgcz1t7aKQDQAkkT15FdRCozawLRgAhxkOB5Jqi/iW9cJyjSP/ L9WHtLpGSeSL3zHDb73IoTdSY5MvzJ2Vl2cErqC9QBtoypHYy54IpC+x5tOwTvsxqDp5 2H4pk2CRwMZ9SJRC+Boiq2wIT8N6F1WhHeBIVqfqEKTCQep555fEVMSPnAyNim5pMwsJ MFaQGnlI693CQiyRJgEA5hqUf4RbqaOGthQr8IhXqVBzn8tQ8U+xpi1UO+qp0NjpYFmA MJsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:mime-version:message-id:date :dkim-signature; bh=HzBVKHokxfG6S7lseDnOBheRWh/dqD/0K8SGlgy6lu8=; b=uIfaiCTjYt3lkglsNJkGrTNWbLTHiEhHouuJcw8rI/K0Hv1A+AYqumINjBehvYiUsi jM62Kh/avPhrCw+2CQByCi+ShRV7mAGiS0zV+tiZl4vetJcT3o7L0d/J52uCicusXqGh RNXghA1KuuoysyzJt+NtJDZhr5h8VP3dycirzZieIi8gzZKVqxPGh/SDPf94MZmpfPVL uAqETMDjM+RTifhx+RdkHfFa9A6SymgENg0yLOgA43FMTJvD5egZURYa+XVCQ+bW8P8B BnSfxsCq+m1Ybdekk8gr7Bckrm8NkyTqXa1tkGRHg0y0vvpHuhULK9HCJqE+LaC/gqMV TdCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=MAlcl39V; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s1-20020a632141000000b003816043ef98si1253180pgm.397.2022.03.21.06.37.28; Mon, 21 Mar 2022 06:37:57 -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=@google.com header.s=20210112 header.b=MAlcl39V; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241644AbiCUBid (ORCPT + 99 others); Sun, 20 Mar 2022 21:38:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33032 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239687AbiCUBic (ORCPT ); Sun, 20 Mar 2022 21:38:32 -0400 Received: from mail-yb1-xb4a.google.com (mail-yb1-xb4a.google.com [IPv6:2607:f8b0:4864:20::b4a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 499E9DD971 for ; Sun, 20 Mar 2022 18:37:08 -0700 (PDT) Received: by mail-yb1-xb4a.google.com with SMTP id x9-20020a5b0809000000b00631d9edfb96so10943178ybp.22 for ; Sun, 20 Mar 2022 18:37:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:message-id:mime-version:subject:from:to:cc; bh=HzBVKHokxfG6S7lseDnOBheRWh/dqD/0K8SGlgy6lu8=; b=MAlcl39Vv4u8uf8wfbbLX0A/Sp4Hn0QNrmFa5ud3t81gVl8UKLSLLMHFHtShD9UmOW /Lp3TxraGWAkCKzrKs9JuUt5pgrFGlRkqLFznTcaYzeJHzDr1MSX55TK8S4CCaImxbO/ rQs8hMyiUieHe2RJeWgkqkGdhJDEqltznzAH7N5Gq2qdjnrW3fwMZoUqpuChDxeKnib+ ZvOFx6cpU5ujl7eo8dmfm0/JlqB+pxtGWjBlV6ZPLdUlNy4Fw0uKoIeo2zB9DNdoYoUR NxJl3d50A+bpisKNxGjHuKktPIFq9pg0SnVJwrIpetYjqFXXAK5y2PHcBJaaHhzoY7vl j9fg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:message-id:mime-version:subject:from:to:cc; bh=HzBVKHokxfG6S7lseDnOBheRWh/dqD/0K8SGlgy6lu8=; b=M3ps0z6vSHAIOsHhPhVQhe8iFhshQzrqIgetPuREHFtEWIwE9TWtbn2UqHPTP2A3yp IgbYSzJlbXvv7T4S2JreLnRXnxWXeA0LeGSWM65IqIEAhzaMVPlTh7d9K66try/5aM16 3odUPBd+DI0cvx030tpoKk4UGs3pY96P0uXpvrmg0NsPgkK2XqzTAw2BCk8a9sxcpZ1/ qWSa80zDRHDxj907FcPByBHfbScs7DrCMI4ibLULs42EIMJsr/HO195x0LbaKsVJavX3 s3yrkz5Dy5g5brmbm6LRTS+QDfZM21Zrz0o4edf7VvvRnyqmeO641jf2nMlyAgPun32d a8ag== X-Gm-Message-State: AOAM533JxppR9ax03Hqa1rJSgRKMTluEYR0wqrjlUyVwCJ6lrrC5R7J3 J1QEsGwRFI5vS1PdGgE/VJxw75IT1gxMDw== X-Received: from mmandlik.mtv.corp.google.com ([2620:15c:202:201:e0cb:81c1:7b8f:ab9f]) (user=mmandlik job=sendgmr) by 2002:a25:cac5:0:b0:629:3595:a4bd with SMTP id a188-20020a25cac5000000b006293595a4bdmr20111758ybg.304.1647826627547; Sun, 20 Mar 2022 18:37:07 -0700 (PDT) Date: Sun, 20 Mar 2022 18:36:55 -0700 Message-Id: <20220320183445.BlueZ.1.I21d5ed25e9a0a2427bddbd6d4ec04d80d735fc53@changeid> Mime-Version: 1.0 X-Mailer: git-send-email 2.35.1.894.gb6a874cedc-goog Subject: [BlueZ PATCH 1/9] adv_monitor: Disable RSSIHighTimeout for SW based filtering From: Manish Mandlik To: marcel@holtmann.org, luiz.dentz@gmail.com Cc: chromeos-bluetooth-upstreaming@chromium.org, linux-bluetooth@vger.kernel.org, Manish Mandlik , Miao-chen Chou Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL 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 Controller offloading does not support High RSSI Timeout. Disable High RSSI Timeout for SW based filtering as well to provide a consistent behavior between SW based and controller based monitoring. Reviewed-by: Miao-chen Chou --- doc/advertisement-monitor-api.txt | 5 +++++ src/adv_monitor.c | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/doc/advertisement-monitor-api.txt b/doc/advertisement-monitor-api.txt index 9189f2cce..942d44b2f 100644 --- a/doc/advertisement-monitor-api.txt +++ b/doc/advertisement-monitor-api.txt @@ -79,6 +79,11 @@ Properties string Type [read-only] in-range (found). Valid range is 1 to 300 (seconds), while 0 indicates unset. + NOTE: Controller offloading does not support High RSSI + Timeout. So, to provide a consistent behavior between + SW based and controller based monitoring, this property + has been disabled and deprecated. + Uint16 RSSISamplingPeriod [read-only, optional] Grouping rules on how to propagate the received diff --git a/src/adv_monitor.c b/src/adv_monitor.c index 33f4d9619..a1778248f 100644 --- a/src/adv_monitor.c +++ b/src/adv_monitor.c @@ -860,6 +860,12 @@ static bool parse_rssi_and_timeout(struct adv_monitor *monitor, monitor->rssi.low_rssi_timeout = l_rssi_timeout; monitor->rssi.sampling_period = sampling_period; + /* Controller offloading does not support High RSSI Timeout. Disable + * High RSSI Timeout for SW based filtering to provide a consistent + * behavior between SW based and controller based monitoring. + */ + monitor->rssi.high_rssi_timeout = ADV_MONITOR_UNSET_TIMEOUT; + done: DBG("Adv Monitor at %s initiated with high RSSI threshold %d, high " "RSSI threshold timeout %d, low RSSI threshold %d, low RSSI " -- 2.35.1.894.gb6a874cedc-goog