diff options
author | Gustavo F. Padovan <padovan@profusion.mobi> | 2010-06-08 19:09:48 -0300 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2010-07-21 10:39:08 -0700 |
commit | 742e519b0db4a470008118b48f0baea6126e2122 (patch) | |
tree | 3ef3d25004e14a1838d95046e268900f304e7305 | |
parent | 85eb53c6f719523dde9e0658823dffd2664d4d1c (diff) | |
download | kernel_samsung_smdk4412-742e519b0db4a470008118b48f0baea6126e2122.zip kernel_samsung_smdk4412-742e519b0db4a470008118b48f0baea6126e2122.tar.gz kernel_samsung_smdk4412-742e519b0db4a470008118b48f0baea6126e2122.tar.bz2 |
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 <padovan@profusion.mobi>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
-rw-r--r-- | net/bluetooth/l2cap.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c index e78a750..03e9125 100644 --- a/net/bluetooth/l2cap.c +++ b/net/bluetooth/l2cap.c @@ -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); |