Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp1747984rwb; Fri, 7 Oct 2022 18:21:07 -0700 (PDT) X-Google-Smtp-Source: AMsMyM67Qlaamp/Zi3Ic9GzjEbclmduaE+17nJCT1K3E44igJn0jEueT6bwHKxbttOwqtfuvgGGI X-Received: by 2002:a17:903:2306:b0:177:eafd:36e9 with SMTP id d6-20020a170903230600b00177eafd36e9mr7398178plh.135.1665192066944; Fri, 07 Oct 2022 18:21:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665192066; cv=none; d=google.com; s=arc-20160816; b=i3SMskQYPhlNC2RwBQhSiej8hb3WM9wum5kOeun4SvML/d291xhZtIxYN5XBdiqgR8 ssrjQ49H2jwFL8pMb36nDPyCiqysaekFR+vKyGgR87Az7wlsZJ4hZJO13VgTzmm/e6xI cEckETyDdW9UGBie5hBy245WO8nFUoMsEoihXONpas/ezmiCqW+j7/wTvAt9DT2R+NTy 8l76ZK88Oa5wGscBUHhPdTHIdqEnR/yzpMSkfqSlyNakeB/XG9c5LgsFJ4YzEsJAp/Fj lmGqMsToILoZ+5Anoyj8jTz6DVaV5jBXJDoZUCrJy5rLVkViSHKc1UbuJdr4jCQyZyRv 2jvw== 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:to:from :dkim-signature; bh=/dDCoGNmc7mSsDOR4zzwwci8uBmu2b0a+9pHPilQw+E=; b=yzojEUIrx8Z3Xqf4FrSqmalKDk40u3v0bGlkFEoymixyUVrQRrxqvyQiNv/f9wZ2iW 3fQB+oLTGm4/IyeKH3kXZuMC1JoOAU5wBGAsvFjxh2Y+GuJZ3hvIPo17AW5pa4yAfFqI QaVRMEDEx3hOvcI8lfm1msTIGbw4Sp9qZDA3d3kx2NsUUIz/DXgqu7rHpVET+rt06WpU v8RphgtEdw0W0347JSo8VVYH/A0JioLYa3nHsiIA/BFri8NBfKm/qvaKvCyHxTsbBP/x ckoNLcKizRncTEy/5A9PFlcwN+lGIHfd0JBgQIS8EzFk6ETyTIyL1P9ZZuXRNDGwjwJZ yccg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="EzS9r/IG"; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mh9-20020a17090b4ac900b0020ac8a8f40dsi5057995pjb.81.2022.10.07.18.20.39; Fri, 07 Oct 2022 18:21:06 -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=@gmail.com header.s=20210112 header.b="EzS9r/IG"; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229379AbiJHBLj (ORCPT + 99 others); Fri, 7 Oct 2022 21:11:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33002 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229509AbiJHBLg (ORCPT ); Fri, 7 Oct 2022 21:11:36 -0400 Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4871DB48A9 for ; Fri, 7 Oct 2022 18:11:34 -0700 (PDT) Received: by mail-pl1-x62e.google.com with SMTP id b2so5934440plc.7 for ; Fri, 07 Oct 2022 18:11:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=/dDCoGNmc7mSsDOR4zzwwci8uBmu2b0a+9pHPilQw+E=; b=EzS9r/IGyM97zKDltAkAr33qOF0JlWrk1ALG3bqu+8o3kI6TOUvfWmtsfXGW5447wu LPaJHyTq/na9z6mCwNGTfrrt7ZdUisZviaTMkiiHVJ8YhidKBeDwIPV341nd32E9f06F tednfhdIyr5jFROVQF6FVLuib4yT4clNkCxnYCrQIH8KScuDJ0JDXSevjYhSPflhMSp0 KzjdYgsT9v2zHRUeG34dTxPyn0eRhV0QbYPgSgntov/k50W/0wBcwiLOqbsLFvsnD/oi 32kstApR1yMlRzoFC5I+CKlMDMJCeICL8Jn/sXbdEZgHFgc1nQHDwBX40fFF2dlLwZdh XTAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/dDCoGNmc7mSsDOR4zzwwci8uBmu2b0a+9pHPilQw+E=; b=M9nfwQsFxb6gqfqocBtPpNfafDAkzewghfU4X+WbZbTgFBWsihtT9aVqFzW/KTEXVA knANXmzztI1vqXMrJ1DF/PcZ+HG196Qufmi2/lVfWz8SnHaHnrLbudsjrM+jLesThDcB vBT1kKx4VOr5kEoBeOnfe2Y3dFjjPqvCpkI5PTnWMQD/Fr61FzhRC3llBay6k9nV66Rw xeqMxF2i6B38ujEM53i7JFGwev7vvt9J8vTX7m++ECMUfrX/QpBt3Tz4/tL5CO8+0NDV tfQMvt/dSwqu4zvgrY3EH/o7389GzdkWLRNtvqAOYrJAlc/DjB/ongSq2BkL4Dx8D0uq nB1w== X-Gm-Message-State: ACrzQf10t7tgrRge31ezeqhvlerP26DjtYDHTecSXxj1LE9E2M0DIGth L3DhdApP25rFlUAX/VlnSotHnPjHekLYTw== X-Received: by 2002:a17:90b:400f:b0:20a:9965:ef08 with SMTP id ie15-20020a17090b400f00b0020a9965ef08mr8442608pjb.155.1665191493244; Fri, 07 Oct 2022 18:11:33 -0700 (PDT) Received: from lvondent-mobl4.. (c-71-56-157-77.hsd1.or.comcast.net. [71.56.157.77]) by smtp.gmail.com with ESMTPSA id h187-20020a62dec4000000b0056158a41d74sm2234123pfg.58.2022.10.07.18.11.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Oct 2022 18:11:32 -0700 (PDT) From: Luiz Augusto von Dentz To: linux-bluetooth@vger.kernel.org Subject: [PATCH 2/2] Bluetooth: hci_sync: Fix not able to set force_static_address Date: Fri, 7 Oct 2022 18:11:29 -0700 Message-Id: <20221008011129.1906898-2-luiz.dentz@gmail.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221008011129.1906898-1-luiz.dentz@gmail.com> References: <20221008011129.1906898-1-luiz.dentz@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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 From: Luiz Augusto von Dentz force_static_address shall be writable while hdev is initing but is not considered powered yet since the static address is written only when powered. Signed-off-by: Luiz Augusto von Dentz --- net/bluetooth/hci_debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/bluetooth/hci_debugfs.c b/net/bluetooth/hci_debugfs.c index 3f401ec5bb0c..b7f682922a16 100644 --- a/net/bluetooth/hci_debugfs.c +++ b/net/bluetooth/hci_debugfs.c @@ -757,7 +757,7 @@ static ssize_t force_static_address_write(struct file *file, bool enable; int err; - if (test_bit(HCI_UP, &hdev->flags)) + if (hdev_is_powered(hdev)) return -EBUSY; err = kstrtobool_from_user(user_buf, count, &enable); -- 2.37.3