From: Szymon Janc Date: Thu, 22 Jan 2015 15:57:05 +0000 (+0100) Subject: Bluetooth: Fix reporting invalid RSSI for LE devices X-Git-Tag: v3.19.1~175 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=98f6b0026b59a590d2a79bec221a05b9016e1985;p=thirdparty%2Fkernel%2Fstable.git Bluetooth: Fix reporting invalid RSSI for LE devices 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 Signed-off-by: Marcel Holtmann Signed-off-by: Greg Kroah-Hartman --- diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 693ce8bcd06e6..1775dbfc84a82 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -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);