void bt_l2cap_init(void) { static struct bt_l2cap_fixed_chan chan = { .cid = BT_L2CAP_CID_LE_SIG, .accept = l2cap_accept, }; bt_l2cap_le_fixed_chan_register(&chan); if (IS_ENABLED(CONFIG_BLUETOOTH_BREDR)) { bt_l2cap_br_init(); } #if defined(CONFIG_BLUETOOTH_L2CAP_DYNAMIC_CHANNEL) NET_BUF_POOL_INIT(le_data_pool); #endif }
void bt_l2cap_init(void) { static struct bt_l2cap_fixed_chan chan = { .cid = BT_L2CAP_CID_LE_SIG, .accept = l2cap_accept, }; net_buf_pool_init(le_sig_pool); #if defined(CONFIG_BLUETOOTH_L2CAP_DYNAMIC_CHANNEL) net_buf_pool_init(le_data_pool); #endif /* CONFIG_BLUETOOTH_L2CAP_DYNAMIC_CHANNEL */ bt_l2cap_le_fixed_chan_register(&chan); #if defined(CONFIG_BLUETOOTH_BREDR) bt_l2cap_br_init(); #endif /* CONFIG_BLUETOOTH_BREDR */ }