Bluetooth: Fix incorrect status handling in LE PHY UPDATE event
authorAyush Garg <ayush.garg@samsung.com>
Wed, 17 Mar 2021 11:22:14 +0000 (16:52 +0530)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 17 Mar 2021 14:21:29 +0000 (15:21 +0100)
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>
net/bluetooth/hci_event.c

index f4a734f8a9ac8831237ff8b86edc0d24723e7cc0..cf2f4a0abdbd9fad88afd9aafd19bae8a8a4e8ac 100644 (file)
@@ -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);