Blob Blame History Raw
From 87df8bcccd2cede62dfb97dc3d4ca1fe66cb4f83 Mon Sep 17 00:00:00 2001
From: Ayush Garg <ayush.garg@samsung.com>
Date: Wed, 17 Mar 2021 16:52:14 +0530
Subject: [PATCH] Bluetooth: Fix incorrect status handling in LE PHY UPDATE event
Git-commit: 87df8bcccd2cede62dfb97dc3d4ca1fe66cb4f83
Patch-mainline: v5.13-rc1
References: git-fixes

Skip updation of tx and rx PHYs values, when PHY Update
event's status is not successful.

Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Acked-by: Takashi Iwai <tiwai@suse.de>

---
 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 f4a734f8a9ac..cf2f4a0abdbd 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -5938,7 +5938,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.26.2