diff --git a/net/ip/net_driver_bt.c b/net/ip/net_driver_bt.c index ed943f4872f..8b6bbf0d318 100644 --- a/net/ip/net_driver_bt.c +++ b/net/ip/net_driver_bt.c @@ -173,7 +173,9 @@ static int net_driver_bt_open(void) static int net_driver_bt_send(struct net_buf *buf) { +#ifdef CONFIG_NETWORKING_WITH_LOGGING int orig_len = ip_buf_len(buf); +#endif if (!NETSTACK_COMPRESS.compress(buf)) { NET_DBG("compression failed\n");