提交 bf16a887 编写于 作者: P Phil Elwell 提交者: Zheng Zengkai

Revert "Bluetooth: Always request for user confirmation for Just Works (LE SC)"

raspberrypi inclusion
category: feature
bugzilla: 50432

--------------------------------

This reverts commit ffee202a.

The commit "Bluetooth: Always request for user confirmation for Just
Works" prevents BLE devices pairing in (at least) the Raspberry Pi OS
GUI. After reverting it, pairing works again. Although this companion
commit ("... (LE SC)") has not been demonstrated to be problematic,
it follows the same logic and therefore could affect some use cases.

If another solution to the problem is found then this reversion will
be removed.

See: https://github.com/raspberrypi/linux/issues/4139Signed-off-by: NPhil Elwell <phil@raspberrypi.com>
Signed-off-by: NFang Yafen <yafen@iscas.ac.cn>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 e335510d
...@@ -2201,7 +2201,7 @@ static u8 smp_cmd_pairing_random(struct l2cap_conn *conn, struct sk_buff *skb) ...@@ -2201,7 +2201,7 @@ static u8 smp_cmd_pairing_random(struct l2cap_conn *conn, struct sk_buff *skb)
if (err) if (err)
return SMP_UNSPECIFIED; return SMP_UNSPECIFIED;
if (smp->method == REQ_OOB) { if (smp->method == JUST_WORKS || smp->method == REQ_OOB) {
if (hcon->out) { if (hcon->out) {
sc_dhkey_check(smp); sc_dhkey_check(smp);
SMP_ALLOW_CMD(smp, SMP_CMD_DHKEY_CHECK); SMP_ALLOW_CMD(smp, SMP_CMD_DHKEY_CHECK);
...@@ -2216,9 +2216,6 @@ static u8 smp_cmd_pairing_random(struct l2cap_conn *conn, struct sk_buff *skb) ...@@ -2216,9 +2216,6 @@ static u8 smp_cmd_pairing_random(struct l2cap_conn *conn, struct sk_buff *skb)
confirm_hint = 0; confirm_hint = 0;
confirm: confirm:
if (smp->method == JUST_WORKS)
confirm_hint = 1;
err = mgmt_user_confirm_request(hcon->hdev, &hcon->dst, hcon->type, err = mgmt_user_confirm_request(hcon->hdev, &hcon->dst, hcon->type,
hcon->dst_type, passkey, confirm_hint); hcon->dst_type, passkey, confirm_hint);
if (err) if (err)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册