From f38d5f440f7f74da5d054daafa6f13201a478425 Mon Sep 17 00:00:00 2001 From: Robert Lubos Date: Fri, 9 Dec 2022 13:20:29 +0100 Subject: [PATCH] net: l2: bluetooth: Remove invalid check After network interfaces state handling rework, it's no longer correct to verify the connection status on `net_if_up()`, as this only changes the administrative state of the interface. The interface won't be put in operational UP state until it's connected. This check prevented the interface from being brought up during system boot. Signed-off-by: Robert Lubos --- subsys/net/l2/bluetooth/bluetooth.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/subsys/net/l2/bluetooth/bluetooth.c b/subsys/net/l2/bluetooth/bluetooth.c index afa1fc9bc2b..740fba518af 100644 --- a/subsys/net/l2/bluetooth/bluetooth.c +++ b/subsys/net/l2/bluetooth/bluetooth.c @@ -136,14 +136,8 @@ static int net_bt_send(struct net_if *iface, struct net_pkt *pkt) static int net_bt_enable(struct net_if *iface, bool state) { - struct bt_if_conn *conn = net_bt_get_conn(iface); - NET_DBG("iface %p %s", iface, state ? "up" : "down"); - if (state && conn->ipsp_chan.state != BT_L2CAP_CONNECTED) { - return -ENETDOWN; - } - return 0; }