aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2011-04-28 14:29:04 -0400
committerGustavo F. Padovan <padovan@profusion.mobi>2011-04-28 15:14:44 -0400
commit7cbc9bd99542752ff570abca79d0027669a01fb8 (patch)
tree4d7a4f1ff6081bafcb6be5f2d2a7552c99f8fe3e /net
parent4df378a10e31698df1679f3329301d773a654b61 (diff)
Bluetooth: Fix updating conn->auth_type in hci_io_capa_request_evt
In some circumstances hci_get_auth_req will return a value different from the current conn->auth_type. In these cases update conn->auth_type so that when a user confirm request comes it doesn't falsely trigger auto-accept. Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'net')
-rw-r--r--net/bluetooth/hci_event.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index 8a63d3a463f7..d5aa97ee6ffa 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -2447,7 +2447,8 @@ static inline void hci_io_capa_request_evt(struct hci_dev *hdev, struct sk_buff
2447 2447
2448 bacpy(&cp.bdaddr, &ev->bdaddr); 2448 bacpy(&cp.bdaddr, &ev->bdaddr);
2449 cp.capability = conn->io_capability; 2449 cp.capability = conn->io_capability;
2450 cp.authentication = hci_get_auth_req(conn); 2450 conn->auth_type = hci_get_auth_req(conn);
2451 cp.authentication = conn->auth_type;
2451 2452
2452 if ((conn->out == 0x01 || conn->remote_oob == 0x01) && 2453 if ((conn->out == 0x01 || conn->remote_oob == 0x01) &&
2453 hci_find_remote_oob_data(hdev, &conn->dst)) 2454 hci_find_remote_oob_data(hdev, &conn->dst))