aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/hci_event.c
diff options
context:
space:
mode:
authorHemant Gupta <hemant.gupta@stericsson.com>2012-01-16 03:04:29 -0500
committerJohan Hedberg <johan.hedberg@intel.com>2012-02-13 10:01:31 -0500
commit7a7f1e7c857959f5298020969741e389f21edbae (patch)
tree2735825da06d14d483680423d07d000e6bee21d4 /net/bluetooth/hci_event.c
parentb7d05bad1c10a363b6b99f66ac1fa76b6892e618 (diff)
Bluetooth: Send correct response to IO Capability Request
This patch sends correct IO Capability response to remote device in case Local Device supports KeyBoardDisplay IO Capability as this capability is not valid as per BT spec for IO capability Request Reply Command. This capability is mapped to DisplayYesNo which is in accordance with BT spec. Signed-off-by: Hemant Gupta <hemant.gupta@stericsson.com> Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'net/bluetooth/hci_event.c')
-rw-r--r--net/bluetooth/hci_event.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index 6fb9016652b7..041a35eb25c6 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -2965,7 +2965,10 @@ static inline void hci_io_capa_request_evt(struct hci_dev *hdev, struct sk_buff
2965 struct hci_cp_io_capability_reply cp; 2965 struct hci_cp_io_capability_reply cp;
2966 2966
2967 bacpy(&cp.bdaddr, &ev->bdaddr); 2967 bacpy(&cp.bdaddr, &ev->bdaddr);
2968 cp.capability = conn->io_capability; 2968 /* Change the IO capability from KeyboardDisplay
2969 * to DisplayYesNo as it is not supported by BT spec. */
2970 cp.capability = (conn->io_capability == 0x04) ?
2971 0x01 : conn->io_capability;
2969 conn->auth_type = hci_get_auth_req(conn); 2972 conn->auth_type = hci_get_auth_req(conn);
2970 cp.authentication = conn->auth_type; 2973 cp.authentication = conn->auth_type;
2971 2974