Bluetooth: Don't send ERTM configuration option when disabled
authorMarcel Holtmann <marcel@holtmann.org>
Wed, 9 Jul 2014 09:53:35 +0000 (11:53 +0200)
committerJohan Hedberg <johan.hedberg@intel.com>
Wed, 9 Jul 2014 10:53:36 +0000 (13:53 +0300)
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 <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
net/bluetooth/l2cap_core.c

index d006e6c0e3b4b70efbafca49297c13470413fbbb..8680aae678ce012a0b62a206d14dc96936122a0e 100644 (file)
@@ -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;