Browse Source

fw/comm/ble/gatt: simplify gatt_mtu update logic

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Gerard Marull-Paretas 3 months ago
parent
commit
6ec67b9ff5
1 changed files with 2 additions and 5 deletions
  1. 2 5
      src/fw/comm/ble/gatt.c

+ 2 - 5
src/fw/comm/ble/gatt.c

@@ -71,13 +71,10 @@ void bt_driver_cb_gatt_handle_mtu_update(const GattDeviceMtuUpdateEvent *event)
     if (!connection) {
       goto unlock;
     }
-    const bool has_mtu_changed = (connection->gatt_mtu != event->mtu);
+    
     PBL_LOG(LOG_LEVEL_DEBUG, "Handle MTU change from %d to %d bytes",
             connection->gatt_mtu, event->mtu);
-    if (has_mtu_changed) {
-      connection->gatt_mtu = event->mtu;
-    }
-    BLE_LOG_DEBUG("GATT MTU Updated: remote: %u", event->mtu);
+    connection->gatt_mtu = event->mtu;
   }
 unlock:
   bt_unlock();