Bluetooth: Fix inititial value for remote authentication requirements
authorJohan Hedberg <johan.hedberg@nokia.com>
Sat, 19 Feb 2011 15:06:01 +0000 (12:06 -0300)
committerGustavo F. Padovan <padovan@profusion.mobi>
Mon, 21 Feb 2011 20:22:44 +0000 (17:22 -0300)
The remote authentication requirements for conections need to be
initialized to 0xff (unknown) since it is possible that we receive a IO
Capability Request before we have received information about the remote
requirements.

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
net/bluetooth/hci_conn.c

index a050a69849012d9870bdb71cb9b120df11b18f3b..6d8b988d9ef67021192adce947e5917535491f9b 100644 (file)
@@ -286,6 +286,7 @@ struct hci_conn *hci_conn_add(struct hci_dev *hdev, int type, bdaddr_t *dst)
        conn->state = BT_OPEN;
        conn->auth_type = HCI_AT_GENERAL_BONDING;
        conn->io_capability = hdev->io_capability;
+       conn->remote_auth = 0xff;
 
        conn->power_save = 1;
        conn->disc_timeout = HCI_DISCONN_TIMEOUT;