Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp4138113rwb; Fri, 30 Sep 2022 13:29:19 -0700 (PDT) X-Google-Smtp-Source: AMsMyM74CI4j9KTiMruXzqXw7rgPKJH+jB7kab/LMuKIiVFC2jTXoBt9dOn2hxpjDjxa/V9hPl1J X-Received: by 2002:a05:6a00:15c9:b0:541:1767:4ce2 with SMTP id o9-20020a056a0015c900b0054117674ce2mr10390525pfu.30.1664569758958; Fri, 30 Sep 2022 13:29:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664569758; cv=none; d=google.com; s=arc-20160816; b=nOva5baesTfm0w85kw07S2WFX4upaDyXU9y46YTKtlL6/54tzv8S3BwUygj6lvxBcc oZBI2MgiK4FPr5DI1LQA98SoRlraOls/hWhWjtjEejlwRk/1e6fHnqBu2viJbttHjQxD rSdb3qADHRonPR2GQ5AdFfsEQuLwZxORnL01jr1qxMCdILaW5hzlj/tTu+nKBzmwf2cl PmX7mPZE/2g5EUgc3WlQ0h/Y6ZD9k6YpH1EYnB4Fm8MWE/K2kO2fKtYE3e54wy4Z7Y+j Une3Om9dpht5k162DKt24YB2576a6RhDdH9kwL8JaeGbsI63lfGYL7cXGoCxu8DfcGW6 /k2Q== 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 :message-id:date:subject:to:from:dkim-signature; bh=s/Inp1HS5kBZtYtJsXUoSMoW91GyoWZDDpJFvBFXxQM=; b=tocMu/YcUsb5/RIuaCDIeQgiUxmHLpQUnx256cqvulF/I4+5A/WVz/xDSBT7kg6IGM Bxc3HFU/MNrDzXcW1fkc1xcF7srupVekS64JZikpaY5I6lggD9/z5MOjXlIfWzmSK0fS DwjRJQ9ddkzN2xsi+HPFhhuKRkCFhLWNSrb461oVLSBRwhaSjnAnxQNgYM8P+luWPo0f 7JWsLj7CXY8Ry3mJM96ClDKijRk7eYzb3zIyRWP6wqkR4JbWYUj4RX8MARS8niwLm2BY K1Q6r5YGemG7cb3lMnOYrdOfDoMMiIyCtqZJJGluRN7uW9sfUCKmzIGSzlL2DgGhgPGe fekw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=CQBowV+Y; 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 k12-20020a170902c40c00b00177f7fe8ea9si3988371plk.188.2022.09.30.13.28.22; Fri, 30 Sep 2022 13:29:18 -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=CQBowV+Y; 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 S231644AbiI3UTZ (ORCPT + 99 others); Fri, 30 Sep 2022 16:19:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44680 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232448AbiI3UTX (ORCPT ); Fri, 30 Sep 2022 16:19:23 -0400 Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0BB78D111 for ; Fri, 30 Sep 2022 13:19:23 -0700 (PDT) Received: by mail-pj1-x102d.google.com with SMTP id v10-20020a17090a634a00b00205e48cf845so10083153pjs.4 for ; Fri, 30 Sep 2022 13:19:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date; bh=s/Inp1HS5kBZtYtJsXUoSMoW91GyoWZDDpJFvBFXxQM=; b=CQBowV+YDEEIlIB1lSUp/wbzLU5Z/1yeaTzuA0iNpHEZ+GXLRsd4edoEW1DmwIUmTk EXOk8mIkCoUyrLXgVkQhTxZxHyYAVeWMOFzs+pnziGBSwCuKb01prV9lH7/ys/0tXZ6u zg1Z6/giFvyiKWwbWF4NsGjDcjb830qLPo0n3nDSwLQqkJJhQwjhX6gUPEOHVaNP6OtV w0tRjl8XQ3eKjYe8b/2q2Bt40hWnJWxATOiBQ4k8ONu4iZof2AQb7I2lxZ1v+ogRY9N3 ahtv+HQTiol2kgqXR0kGXVHK8EB0+baT6jvtVgRRuwB8z3WgUo6vmHP6Ohuipl2NEA5/ 3Hpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date; bh=s/Inp1HS5kBZtYtJsXUoSMoW91GyoWZDDpJFvBFXxQM=; b=KYThItPgHeGanENEKwLYyhhGkf7I7X6Az+r9xUZ+ttcw8dtWU0cpOvxZqKo6GNe8X5 yt6TjaOiAXYy0d9s0ukivo4i31di84UQw4/rcxwVnVHt39yvxQtlOKM+NBDDOhZrA4up Y14KHGvYk/06mtl74CedD9QE2wkRfskdS8o2K/bPIWCbFP1ES4OqQnpP1FTvzmybeJUd F2TYHQol0mvp1X5m6fM6WBGISiRoVjwau5cx7E9GwshvNy5UNHLZ/fTVa0msJHUEJ7/K DPgPZKtXn6lV+XDZrzQIGvkF/oilIQH8ZqLeaEzj9sB/irfeCCFQbiyiiv1vQ0YKb3az jhDw== X-Gm-Message-State: ACrzQf2a3IqqsPoJAFWB/FGJFFBVn6mhSt7H91U4X0+AFZT+XU+82NiW XBrJ+9IW27eId1jcjIjy8Rh1xmElYss= X-Received: by 2002:a17:902:ef83:b0:17c:a2f:1e3 with SMTP id iz3-20020a170902ef8300b0017c0a2f01e3mr6333933plb.35.1664569161984; Fri, 30 Sep 2022 13:19:21 -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 q12-20020a65624c000000b0043a1c0a0ab1sm2081832pgv.83.2022.09.30.13.19.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Sep 2022 13:19:21 -0700 (PDT) From: Luiz Augusto von Dentz To: linux-bluetooth@vger.kernel.org Subject: [PATCH] Bluetooth: hci_sync: Fix not indicating power state Date: Fri, 30 Sep 2022 13:19:20 -0700 Message-Id: <20220930201920.225767-1-luiz.dentz@gmail.com> X-Mailer: git-send-email 2.37.3 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 When setting power state using legacy/non-mgmt API (e.g hcitool hci0 up) the likes of mgmt_set_powered_complete won't be called causing clients of the MGMT API to not be notified of the change of the state. Fixes: cf75ad8b41d2 ("Bluetooth: hci_sync: Convert MGMT_SET_POWERED") Signed-off-by: Luiz Augusto von Dentz --- net/bluetooth/hci_sync.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c index 15c75ef4c271..76c3107c9f91 100644 --- a/net/bluetooth/hci_sync.c +++ b/net/bluetooth/hci_sync.c @@ -4676,6 +4676,7 @@ int hci_dev_open_sync(struct hci_dev *hdev) hci_dev_test_flag(hdev, HCI_MGMT) && hdev->dev_type == HCI_PRIMARY) { ret = hci_powered_update_sync(hdev); + mgmt_power_on(hdev, ret); } } else { /* Init failed, cleanup */ -- 2.37.3