浏览代码

Bluetooth: Fix initializing hci_conn RSSI to invalid value

When we create the hci_conn object we should properly initialize the
RSSI to HCI_RSSI_INVALID.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Johan Hedberg 10 年之前
父节点
当前提交
ebf86aa3ae
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      net/bluetooth/hci_conn.c

+ 1 - 0
net/bluetooth/hci_conn.c

@@ -449,6 +449,7 @@ struct hci_conn *hci_conn_add(struct hci_dev *hdev, int type, bdaddr_t *dst,
 	conn->io_capability = hdev->io_capability;
 	conn->remote_auth = 0xff;
 	conn->key_type = 0xff;
+	conn->rssi = HCI_RSSI_INVALID;
 	conn->tx_power = HCI_TX_POWER_INVALID;
 	conn->max_tx_power = HCI_TX_POWER_INVALID;