Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp549237ybh; Wed, 18 Mar 2020 04:56:03 -0700 (PDT) X-Google-Smtp-Source: ADFU+vv1tDxRUHstA2v1H9p1DaHXivXUemjlAo17q3oyv57GRLcVDA1c2lExIH+sT5HQKfU7g+eR X-Received: by 2002:a9d:4d85:: with SMTP id u5mr3637674otk.128.1584532563680; Wed, 18 Mar 2020 04:56:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584532563; cv=none; d=google.com; s=arc-20160816; b=U6o2S6E3idP60B2kskpwRXYIWSHUu6vSPGHNo6ReQtlKOTy7uN7UGE6IUAPN/1C0Em GSiLmm1e2xMsF8lkhtBSwVdY29UHhuckKiJK7UJkXQOCKaJQlAK6YR6p+wTnGU3myZjY uKHZwY09Vra8fsNpytRKA3C4ReqeWVQsd0qZQ7bZkoD0IYol7Yg6Zz5l5JOuqwlDE+ow DsH61c4fgQoYDebHWF4zydB5D+T5SgJ8n4P0RpBgABNv/HojWjEISA4uAq6IJunr5g/O UlOhVmg2UoBJlogcEOZt7qoJ9Z9bXhnE7+AhvOZwMuMhMCh7w1uqwCxKqf5EmAg+uA3T Eljw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version; bh=I1JzSUFXtB3VIl7V95EemdpkPzl3VjDHGaUHY2RYF+0=; b=QCP8jdkqXPDyNhh+a7wxFyCmxPmAS8kiNVrpKTKt/Y8wWGcBpqQHDFv518aac4P2bo KvYWiatYAXUsCkDLp3lO+N427AjC4J0Q4IhvNL+339d02V0PDwSTUrbVYVCBQmMyTFsY AYugcKkzkvob3sP+6OjswPWAukewvn9XINxCDztVD5Ptdt8YHNTwckAh2gACd2CYPeyO zVQ0ZzwsFRzRNSTB/ZvOnEo476EvpA3RI+mCrZnqTl2GcJBs53cNoeQGKKcO6hr78ONi 2Ha9YiQwhec4pDgSm/te+mrramd2EffVHeVmEqm2zs9WSgxnJ1a6P9yaSXFS2c8Zed7D zPwQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x136si3020966oif.122.2020.03.18.04.55.35; Wed, 18 Mar 2020 04:56:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726975AbgCRLz0 convert rfc822-to-8bit (ORCPT + 99 others); Wed, 18 Mar 2020 07:55:26 -0400 Received: from coyote.holtmann.net ([212.227.132.17]:57313 "EHLO mail.holtmann.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726638AbgCRLz0 (ORCPT ); Wed, 18 Mar 2020 07:55:26 -0400 Received: from [192.168.1.91] (p4FEFC5A7.dip0.t-ipconnect.de [79.239.197.167]) by mail.holtmann.org (Postfix) with ESMTPSA id B5C2FCECF3; Wed, 18 Mar 2020 13:04:54 +0100 (CET) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.60.0.2.5\)) Subject: Re: [PATCH] Bluetooth: Do not cancel advertising when starting a scan From: Marcel Holtmann In-Reply-To: Date: Wed, 18 Mar 2020 12:54:54 +0100 Cc: Manish Mandlik , Yoni Shavit , Alain Michaud , Miao-chen Chou , Bluez mailing list , Dmitry Grinberg , "David S. Miller" , Johan Hedberg , Network Development , LKML , Jakub Kicinski Content-Transfer-Encoding: 8BIT Message-Id: References: <20200316224023.1.I002569822232363cfbb5af1f33a293ea390c24c7@changeid> <4DF7C709-1AD3-42FF-A0C2-EF488D82F083@holtmann.org> To: Emil Lenngren X-Mailer: Apple Mail (2.3608.60.0.2.5) Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Emil, >>> BlueZ cancels adv when starting a scan, but does not cancel a scan when >>> starting to adv. Neither is required, so this brings both to a >>> consistent state (of not affecting each other). Some very rare (I've >>> never seen one) BT 4.0 chips will fail to do both at once. Even this is >>> ok since the command that will fail will be the second one, and thus the >>> common sense logic of first-come-first-served is preserved for BLE >>> requests. >>> >>> Signed-off-by: Dmitry Grinberg >>> Signed-off-by: Manish Mandlik >>> --- >>> >>> net/bluetooth/hci_request.c | 17 ----------------- >>> 1 file changed, 17 deletions(-) >> >> patch has been applied to bluetooth-next tree. >> >> If you know the controller that doesn’t support this, can we blacklist that one and just disable advertising (peripheral mode) for that controller. > > Can't the "LE Supported States" be inspected instead to figure out > what simultaneous capabilities are supported? It seems a bit rough to > always assume the worst. if there are not false-positives, then yes, by all means. However my statement still applies. If a controller can do scanning and advertising at the same time, we should just not indicate support for peripheral mode. Regards Marcel