mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
Bluetooth: Disconnect the channel if we don't want the proposed mode
If the device is a STATE 2 then it should disconnect the channel if the remote device propose a mode different from its mandatory mode. Signed-off-by: Gustavo F. Padovan <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
This commit is contained in:
parent
85eb53c6f7
commit
742e519b0d
1 changed files with 2 additions and 1 deletions
|
|
@ -2617,8 +2617,9 @@ static int l2cap_parse_conf_req(struct sock *sk, void *data)
|
|||
break;
|
||||
}
|
||||
|
||||
if (!l2cap_mode_supported(pi->mode, pi->conn->feat_mask))
|
||||
if (pi->mode != rfc.mode)
|
||||
return -ECONNREFUSED;
|
||||
|
||||
break;
|
||||
default:
|
||||
pi->mode = l2cap_select_mode(rfc.mode, pi->conn->feat_mask);
|
||||
|
|
|
|||
Loading…
Reference in a new issue