Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cccdd568 authored by Łukasz Rymanowski's avatar Łukasz Rymanowski
Browse files

leaudio: Require MTU highier or equal 64 as per BAP spec

Bug: 268151797
Test: atest BluetoothInstrumentationTests
Tag: #feature
Change-Id: Ia7e7c3bd65a6a45337b5d65b55413f985e03aef8
parent 9edd5bf2
Loading
Loading
Loading
Loading
+15 −0
Original line number Original line Diff line number Diff line
@@ -2041,6 +2041,21 @@ class LeAudioClientImpl : public LeAudioClient {
      return;
      return;
    }
    }


    /**
     * BAP 1.01. 3.6.1
     * ATT and EATT transport requirements
     * The Unicast Client shall support a minimum ATT_MTU of 64 octets for one
     * Unenhanced ATT bearer, or for at least one Enhanced ATT bearer if the
     * Unicast Client supports Enhanced ATT bearers.
     *
     */
    if (mtu < 64) {
      LOG_ERROR("Device %s MTU is too low (%d). Disconnecting from LE Audio",
                ADDRESS_TO_LOGGABLE_CSTR(leAudioDevice->address_), mtu);
      Disconnect(leAudioDevice->address_);
      return;
    }

    leAudioDevice->mtu_ = mtu;
    leAudioDevice->mtu_ = mtu;
  }
  }