]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
Bluetooth: Fix reporting invalid RSSI for LE devices
authorSzymon Janc <szymon.janc@tieto.com>
Thu, 22 Jan 2015 15:57:05 +0000 (16:57 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Mar 2015 22:57:15 +0000 (14:57 -0800)
commit 91200e9f3e76af2652952e73ce5d9913f1c987c6 upstream.

Start Discovery was reporting 0 RSSI for invalid RSSI only for
BR/EDR devices. LE devices were reported with RSSI 127.

Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/bluetooth/mgmt.c

index 693ce8bcd06e6eaeee9fbbdffa375c67a93487f4..1775dbfc84a8212ae276f7b97f7c0da5620e132c 100644 (file)
@@ -7066,7 +7066,8 @@ void mgmt_device_found(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type,
         * However when using service discovery, the value 127 will be
         * returned when the RSSI is not available.
         */
-       if (rssi == HCI_RSSI_INVALID && !hdev->discovery.report_invalid_rssi)
+       if (rssi == HCI_RSSI_INVALID && !hdev->discovery.report_invalid_rssi &&
+           link_type == ACL_LINK)
                rssi = 0;
 
        bacpy(&ev->addr.bdaddr, bdaddr);