Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp571216pxj; Fri, 7 May 2021 15:15:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwE6HggCbyT078ABVjKrd2jW6XFf2eT11eNZes3rHtaeD3GmRSUtzM6Kk3B8fRLyN1ECGHO X-Received: by 2002:aa7:98de:0:b029:28d:f7e0:ac3a with SMTP id e30-20020aa798de0000b029028df7e0ac3amr12543305pfm.26.1620425714006; Fri, 07 May 2021 15:15:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620425714; cv=none; d=google.com; s=arc-20160816; b=qQY/zwTsj44GnU0qOgFzdp2oQ/9lr0lhcz56GiFehmbSU26K9sX/BEp4kuOxX7vDxT ZhyGh9xpoATmGzqf4qoB8UHJ/c0YmGKitFBcY8EHn/liX40CPSMcmPKTwCjlrJQB+e0P PzA1pBFOzSWSogpzuoyJOifR9OZuW6WR1tePvdvpk1zxI9X9a7l49c66p1Tk6VisVyjD pvfd8tUiY2S8w0OcrObxVxrL3byNvPBV99hDTNhUNoy/pC9u2p+kSPpItpCGevmaEfth +1BBhppyuXXG1ygUW+60qQXgwRxwfYnUKdQEyvLvtyTf8IZAKqJDLPt9kpylIlxoe5wT 9cZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=5tP4rHvlfZR23oajz8appJQEH+NFAy+ACcrtoRe4S2U=; b=XLqokAEvvFifXUhlo4VQ3cdhEkpamQMS2eudtgnrCgbaQtVW1S8zzcbtCPVil+rxTv zfBYH/otEnIuycDiMnI0HPsEXCs2Fw+6+9NLzY5v2IbkrGdLDqzF7mOb7BBg6/9DXjWd /B2xg2N8Z0gegTwvn8idkr1i31g/p88v8wO4FZmg/NW+ywMiW3lwHpSuO8ltEj/LpDuk YNzrJ7i4S6+f4dR4uj0oq+fs6HJmDFUBvGLdAKmdV9uGsonoYwTuyqi9aGWjlU+pYwiv wzWFOklLFzxR3vjpvJkGOnQ55u2h1YoohX7ILTCPhfo2+CLsm7cP6lJB+edxRKvPA3Vp RRqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=bWS2QVLi; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a7si6271380pgw.388.2021.05.07.15.14.44; Fri, 07 May 2021 15:15:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=bWS2QVLi; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229833AbhEGWOo (ORCPT + 99 others); Fri, 7 May 2021 18:14:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46182 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229898AbhEGWOi (ORCPT ); Fri, 7 May 2021 18:14:38 -0400 Received: from mail-yb1-xb33.google.com (mail-yb1-xb33.google.com [IPv6:2607:f8b0:4864:20::b33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9C66CC061761 for ; Fri, 7 May 2021 15:13:37 -0700 (PDT) Received: by mail-yb1-xb33.google.com with SMTP id 82so13811951yby.7 for ; Fri, 07 May 2021 15:13:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=5tP4rHvlfZR23oajz8appJQEH+NFAy+ACcrtoRe4S2U=; b=bWS2QVLiR0KSr72jnPbdFB8YiuGSLg0Qk9xryx89uPd/Qgt4Yhife/5fWx82SdpayK VE4VpVnns4plj1FnfCFSwmKSAO8p7687i6MqglBdZTKYYYVriLX031djL6U8VQSf+YBc sexRrH8H80eBVWm66nsoiaNn8vFHuuBjmLAgwV8azkHakwwYiR5VFUroD7IV7YMJhIkw r6YlTRt+oBNW42x51SVfcW5lfu3olrw/GT3VSQVN+XWk3ncXJXkzS1SgBXsvWup6CZXL FP+zJmkKDT2+gqtVXgvoVB9QbtoEzq9vIpb9OX2vjB4dHFJi0+u79lEJgCAaLJ9Atl82 HxSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=5tP4rHvlfZR23oajz8appJQEH+NFAy+ACcrtoRe4S2U=; b=GGUpdpRSxy3EI4u2gzTBOVhAnpkodFjM+zMw2Yz0kv8jQqo1RsfKRiXz3iGsEFNIx+ taNbqqRYRT7Xhlq0lnVCC4M6Ck4x4fF+LJejCf1Gl1zSQE/CZY5n6RUoQXy0d0WnmTDZ qat/u1wGXNnzDGz19aRj+L5Wf7GnIAgQdjoD61DIU57mCt5iLV+/mz+FulcN0rS4r2RW RhLyTAiY4TtN5oLg3TRI6BEErXAc9XmX6d0oOTUYncf962dXzgmJrdKUfL1KBBfttUEH daKyMXnjbMFJZoVddwY1vOb2aGAf0t9GkVMxpY7rdQMmRYWdM9g486FPZQaA/xHJtdM6 VKjA== X-Gm-Message-State: AOAM530FIcQ2jJc8CSo6QFsIOkRDfIHi5TDEFsWsW0QQ1YDlXhiWt/nD nLYY2wT9HPK+h+nt/zw4Rm51Kf7mHnymlABqiCY= X-Received: by 2002:a25:9a04:: with SMTP id x4mr580800ybn.440.1620425616752; Fri, 07 May 2021 15:13:36 -0700 (PDT) MIME-Version: 1.0 References: <20210504111454.29697-1-sathish.narasimman@intel.com> In-Reply-To: From: Luiz Augusto von Dentz Date: Fri, 7 May 2021 15:13:25 -0700 Message-ID: Subject: Re: [Bluez PATCH v2] btmgmt: Fix enable adding irk when turining privacy on To: Marcel Holtmann Cc: Sathish Narasimman , "linux-bluetooth@vger.kernel.org" , Chethan T N , "Srivatsa, Ravishankar" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Marcel, On Fri, May 7, 2021 at 1:26 AM Marcel Holtmann wrote: > > Hi Luiz, > > >> Unable to add the IRK in btmgmt when need to be updated. The option is > >> enabled now. > >> > >> Signed-off-by: Sathish Narasimman > >> --- > >> tools/btmgmt.c | 2 +- > >> 1 file changed, 1 insertion(+), 1 deletion(-) > >> > >> diff --git a/tools/btmgmt.c b/tools/btmgmt.c > >> index 02fec1dca184..bf3b460d0f04 100644 > >> --- a/tools/btmgmt.c > >> +++ b/tools/btmgmt.c > >> @@ -5277,7 +5277,7 @@ static const struct bt_shell_menu main_menu = { > >> cmd_advertising, "Toggle LE advertising", }, > >> { "bredr", "", > >> cmd_bredr, "Toggle BR/EDR support", }, > >> - { "privacy", "", > >> + { "privacy", " [irk]", > >> cmd_privacy, "Toggle privacy support" }, > > > > I wonder why you didn't incorporate in the first parameter though > > given that things like privacy off [irk] makes no send, or perhaps > > have a dedicated command for setting the irk so it would persist > > between privacy on/off. > > that is not how the kernel API works. If you want to enable Privacy, you need to also provide the IRK. We just simplified the tool to use /dev/urandom in case it is not provided. Just to be clear I was suggesting to use a dedicated command for setting an irk: > irk That way it is persisted, that way the tool remembers what was the last set irk in case privacy needs to be toggled for some reason. -- Luiz Augusto von Dentz