Bluetooth: Add secure flag for mgmt_pin_code_req
Extend the mgmt_pin_code_request interface to require secure pin code (16 digit) for authentication. This is a kernel part of the secure pin code requirement notification to user space agent. Code styling fix by Johan Hedberg. Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com> Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
This commit is contained in:
committed by
Gustavo F. Padovan
parent
58797bf772
commit
a770bb5aea
@@ -2022,8 +2022,16 @@ static inline void hci_pin_code_request_evt(struct hci_dev *hdev, struct sk_buff
|
||||
hci_send_cmd(hdev, HCI_OP_PIN_CODE_NEG_REPLY,
|
||||
sizeof(ev->bdaddr), &ev->bdaddr);
|
||||
|
||||
if (test_bit(HCI_MGMT, &hdev->flags))
|
||||
mgmt_pin_code_request(hdev->id, &ev->bdaddr);
|
||||
if (test_bit(HCI_MGMT, &hdev->flags)) {
|
||||
u8 secure;
|
||||
|
||||
if (conn->pending_sec_level == BT_SECURITY_HIGH)
|
||||
secure = 1;
|
||||
else
|
||||
secure = 0;
|
||||
|
||||
mgmt_pin_code_request(hdev->id, &ev->bdaddr, secure);
|
||||
}
|
||||
|
||||
hci_dev_unlock(hdev);
|
||||
}
|
||||
|
Reference in New Issue
Block a user