aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2011-04-28 14:28:58 -0400
committerGustavo F. Padovan <padovan@profusion.mobi>2011-04-28 15:14:39 -0400
commit582fbe9ef9d6fc089ff20956595f046d4899e74e (patch)
tree97a9975227a9b4f1520c3e87912257a28bdf2803
parentbe77159c3f37e73a18ecc5c1eab3c67e07c6ce22 (diff)
Bluetooth: Fix logic in hci_pin_code_request_evt
The mgmt_ev_pin_code_request event should not be sent to user space if the request gets rejected by the kernel due to the pairable flag not being set. Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
-rw-r--r--net/bluetooth/hci_event.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index d535ea4ccbed..ebbaa6c8d015 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -2035,8 +2035,7 @@ static inline void hci_pin_code_request_evt(struct hci_dev *hdev, struct sk_buff
2035 if (!test_bit(HCI_PAIRABLE, &hdev->flags)) 2035 if (!test_bit(HCI_PAIRABLE, &hdev->flags))
2036 hci_send_cmd(hdev, HCI_OP_PIN_CODE_NEG_REPLY, 2036 hci_send_cmd(hdev, HCI_OP_PIN_CODE_NEG_REPLY,
2037 sizeof(ev->bdaddr), &ev->bdaddr); 2037 sizeof(ev->bdaddr), &ev->bdaddr);
2038 2038 else if (test_bit(HCI_MGMT, &hdev->flags)) {
2039 if (test_bit(HCI_MGMT, &hdev->flags)) {
2040 u8 secure; 2039 u8 secure;
2041 2040
2042 if (conn->pending_sec_level == BT_SECURITY_HIGH) 2041 if (conn->pending_sec_level == BT_SECURITY_HIGH)