From: Marcel Holtmann Date: Wed, 9 Jul 2014 09:53:35 +0000 (+0200) Subject: Bluetooth: Don't send ERTM configuration option when disabled X-Git-Tag: firefly_0821_release~176^2~3474^2~12^2~41^2~76 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=6fea7ad1d338dba592d65423427a997f1b7ff485;p=firefly-linux-kernel-4.4.55.git Bluetooth: Don't send ERTM configuration option when disabled When ERTM support is disabled, then do not even send ERTM configuration option even if the remote side supports it. Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg --- diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c index d006e6c0e3b4..8680aae678ce 100644 --- a/net/bluetooth/l2cap_core.c +++ b/net/bluetooth/l2cap_core.c @@ -3234,6 +3234,9 @@ done: switch (chan->mode) { case L2CAP_MODE_BASIC: + if (disable_ertm) + break; + if (!(chan->conn->feat_mask & L2CAP_FEAT_ERTM) && !(chan->conn->feat_mask & L2CAP_FEAT_STREAMING)) break;