Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2965663pxj; Mon, 17 May 2021 14:19:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz1mX8K4PZ341a+CHmaLLkU9oVNccWjmn7qfeKCHKI0qDGbSisHLsFtq8oIwSyCRyAX/kxk X-Received: by 2002:a92:2004:: with SMTP id j4mr1426975ile.53.1621286358596; Mon, 17 May 2021 14:19:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621286358; cv=none; d=google.com; s=arc-20160816; b=OhwwXoOP23xBQuG94jasDch6E8cbeS/jVtzwWQ5lYMW1Wg1MXwjAT99hv/5FYad5mW 9ZFEi+t7rvhY0VUMlu1YjzwsUz5a0opVzYiSexYH3mbSIBWD6/RO1AO9/7ziFid/rAK0 1M3vOokshWD07ianm7/OXA2VUjdSYEB39Y62P2VXs117gLbrDF5ePoIL3f/pFkJofhsC IplhfyaWyGFEBJmUpTmt98ZuIeIp9vmkVD925ARg/4TtrsUwSQoY7lRlCzrfbGq+yQBQ CVCI6TcV9wKBOl6X5rgdAZy2TMY6tjrlBDCWFZKW3/MTaB0XfZYyyZ6EwXdaTuwYSakZ hp5A== 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=sBlTAPb8Zi6U4pnCtciVno6sXcM7m+xCm12g9l5LUwE=; b=MP8knX9LAG9niynGY3pkgnKXeChxlclmzHrgyqtWoZSF2Q0ylLs9LiL69b1dU8hpX0 rS0n6iT/P19ksEH3ZSuZW5Q7cchya6EqFhMC7oGfyHpzwxn1WMnBgBiU7Y9reHpeymEk t370bWON83fjZh7bq2tbEiDzJI+drOXmRtzTVfxAUQafQnXvYqN+ZPLxEjoCIpukRbCH hSs87nveVvrAtgb3ZkvZEaT520Zr2tVBlpyPH5ZiQCJ4jpWxz9GPKLbUDm0GfIIP6rZ/ oUpoEZGm1cC3+7Mwdqlbl7akEYIFhyuJj4QK+G7ra95SjZ2v/lNovzEB2U/W4DgXSbzC 3mWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=xp5XCMb7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g6si20994750jat.77.2021.05.17.14.19.01; Mon, 17 May 2021 14:19:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@linuxfoundation.org header.s=korg header.b=xp5XCMb7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S238309AbhEQOJ5 (ORCPT + 99 others); Mon, 17 May 2021 10:09:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:58174 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238068AbhEQOHb (ORCPT ); Mon, 17 May 2021 10:07:31 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6FDE861361; Mon, 17 May 2021 14:05:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621260356; bh=NZTohq2nlz0Aa+4r/UyrqmJV8O4b9dKL7L7KnbtvNbE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xp5XCMb75hpNflUjQcy0lvQWzzRUKszNhJ6wb+rpAKDSoKxffJ8Cia7qfvXVpdsrq QJQSCLo9wE8OC41jfxV/MyebVSJcHRVhD73Q+p2wK2E4GJoYCoCGRC7sSgE4YRkoCq JRX+IvvKUxy+AlOfx7rneq71xHgENV+4TBDmkPIk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ayush Garg , Marcel Holtmann , Sasha Levin Subject: [PATCH 5.12 027/363] Bluetooth: Fix incorrect status handling in LE PHY UPDATE event Date: Mon, 17 May 2021 15:58:13 +0200 Message-Id: <20210517140303.508899120@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210517140302.508966430@linuxfoundation.org> References: <20210517140302.508966430@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ayush Garg [ Upstream commit 87df8bcccd2cede62dfb97dc3d4ca1fe66cb4f83 ] Skip updation of tx and rx PHYs values, when PHY Update event's status is not successful. Signed-off-by: Ayush Garg Signed-off-by: Marcel Holtmann Signed-off-by: Sasha Levin --- net/bluetooth/hci_event.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index 7a3e42e75235..82f4973a011d 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c @@ -5912,7 +5912,7 @@ static void hci_le_phy_update_evt(struct hci_dev *hdev, struct sk_buff *skb) BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); - if (!ev->status) + if (ev->status) return; hci_dev_lock(hdev); -- 2.30.2