From patchwork Sat Oct 22 07:22:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 7338 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp1094980wrr; Sat, 22 Oct 2022 01:01:24 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5YFw/NjWMdLg/3NNc6qoMFTQh3eqepIUbLkYN+IRkP09v3SzXfKOMKei5Pi92VLlO5tyER X-Received: by 2002:a65:4084:0:b0:463:aa4:49cf with SMTP id t4-20020a654084000000b004630aa449cfmr19355209pgp.164.1666425684063; Sat, 22 Oct 2022 01:01:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666425684; cv=none; d=google.com; s=arc-20160816; b=X3CXkNgAnwM7MfbMevq39Q0GN84aMwfHfLuwlFh5putkv0q+PHVSmXwSr6mQvCrE3x lBhWkoNZLbA8dNWN6sPqfr7metsiASbS/zKu6pVX5jH4XLAk8dynwY7eLmXv3m9I0UPI fvDkbDZvHTDMNvSGNtwKdva0Kxp8fqkgvpDSu3JNBSfY0X5pIy9MoZjn6egDwCzSgX/f mz2ZkO66zJdXUaZoqCbhXgTcp9Cu/KtOxEfX1+WVMcKIqRja6OiUBaEVXQnfGacNTUca hIsDcRVKtJ/CUkyEedOWG3e8H2xjxFGTzjSoNyzkTwYIxhn9CYAmzGoSvjl07tQESvVH BcFw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=QhwF28PKyH+cRS9JLvlEQN/qC87RoYCVF0Y8Rhbrq3s=; b=acNyc1GrQHUTHnH97FJEm2AZrtQPfbE06vyRQpBXROyKO3o0E5erovKJawEhBw2oT5 YIFn5oF57r351ne/jDJTN1zpLxfNPWwiO5rglQqG7erni2eQCOW2Ok5DIyv5fKui0oeq Js7p4o41W3yMBRCQSbDwoy4Afm5SK4KpSn3EBtmGhNpoB2/0gxwsi3NV4M/a/wpqDAjM hSkcoplZioyUi7RtoWT5HKp6Xoj95NDrKtVwhIQZ7WmH2dY2Yn1uVvacHJn4zhzEX9AP NaIh5jirBduVzoj20utCYyrmznOybFdHLUDgL0cxToWl8SVOH8aUp4iOJ7YPebFrnjDu g4ag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=XAvZbU9N; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t20-20020a634614000000b00438806c7b2bsi25729477pga.154.2022.10.22.01.00.54; Sat, 22 Oct 2022 01:01:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@linuxfoundation.org header.s=korg header.b=XAvZbU9N; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232579AbiJVH7N (ORCPT + 99 others); Sat, 22 Oct 2022 03:59:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58264 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232157AbiJVHyN (ORCPT ); Sat, 22 Oct 2022 03:54:13 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5EC3D2C6EA8; Sat, 22 Oct 2022 00:47:18 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id D4FAA60AFD; Sat, 22 Oct 2022 07:46:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E7D5DC433C1; Sat, 22 Oct 2022 07:46:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666424806; bh=W0IX97rDbejV5O6XzcEziQT2bEP4ZyIT4QwCqP1mfbo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XAvZbU9Nuog+vRWdKm1VUh3LC9rXk5f/Ivq6EdYkkJ2k9BMEEGpReDkb5KiA3L+oC gtV1ZPK52gvd7KGE0yDkJbTyVUa8h9DkDUXwA35RxfNjkw6wAjsNBQSQ9hklRigZJf R8B7y67XvgbiIhc6xbHP24Md97pmlwsHdrqdEbZ0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Luiz Augusto von Dentz , Tedd Ho-Jeong An , Sasha Levin Subject: [PATCH 5.19 283/717] Bluetooth: hci_sync: Fix not indicating power state Date: Sat, 22 Oct 2022 09:22:42 +0200 Message-Id: <20221022072503.834302003@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221022072415.034382448@linuxfoundation.org> References: <20221022072415.034382448@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747373978302197148?= X-GMAIL-MSGID: =?utf-8?q?1747373978302197148?= From: Luiz Augusto von Dentz [ Upstream commit 6abf0dae8c3c927f54e62c46faf8aba580ba0d04 ] 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 Tested-by: Tedd Ho-Jeong An Signed-off-by: Sasha Levin --- 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 3b4cee67bbd6..a7c0cd2fabfb 100644 --- a/net/bluetooth/hci_sync.c +++ b/net/bluetooth/hci_sync.c @@ -4033,6 +4033,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 */