Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 91200e9f authored by Szymon Janc's avatar Szymon Janc Committed by Marcel Holtmann
Browse files

Bluetooth: Fix reporting invalid RSSI for LE devices



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

Signed-off-by: default avatarSzymon Janc <szymon.janc@tieto.com>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
Cc: stable@vger.kernel.org # 3.19+
parent 9a5abdaa
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -7238,7 +7238,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);