Bluetooth: SMP: Fix NULL backend compilation
This was not building due to bt_l2cap_create_pdu API change. CC net/bluetooth/smp_null.o net/bluetooth/smp_null.c: In function 'bt_smp_recv': net/bluetooth/smp_null.c:59:2: warning: passing argument 1 of 'bt_l2cap_create_pdu' from incompatible pointer type [enabled by default] buf = bt_l2cap_create_pdu(conn); ^ In file included from net/bluetooth/smp_null.c:32:0: net/bluetooth/l2cap_internal.h:136:17: note: expected 'struct nano_fifo *' but argument is of type 'struct bt_conn *' struct net_buf *bt_l2cap_create_pdu(struct nano_fifo *fifo); Change-Id: I5fd8ce63da09af1c123b1092624d48edc009756b Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
This commit is contained in:
parent
a1e0b4de4e
commit
74333b74af
1 changed files with 8 additions and 1 deletions
|
@ -34,6 +34,11 @@
|
|||
|
||||
static struct bt_l2cap_chan bt_smp_pool[CONFIG_BLUETOOTH_MAX_CONN];
|
||||
|
||||
/* Pool for outgoing SMP signaling packets, MTU is 23 */
|
||||
static struct nano_fifo smp_buf;
|
||||
static NET_BUF_POOL(smp_pool, CONFIG_BLUETOOTH_MAX_CONN,
|
||||
BT_L2CAP_BUF_SIZE(23), &smp_buf, NULL, 0);
|
||||
|
||||
int bt_smp_sign_verify(struct bt_conn *conn, struct net_buf *buf)
|
||||
{
|
||||
return -ENOTSUP;
|
||||
|
@ -51,7 +56,7 @@ static void bt_smp_recv(struct bt_l2cap_chan *chan, struct net_buf *buf)
|
|||
* Core Specification Vol. 3, Part H, 3.3
|
||||
*/
|
||||
|
||||
buf = bt_l2cap_create_pdu(conn);
|
||||
buf = bt_l2cap_create_pdu(&smp_buf);
|
||||
if (!buf) {
|
||||
return;
|
||||
}
|
||||
|
@ -100,6 +105,8 @@ int bt_smp_init(void)
|
|||
.accept = bt_smp_accept,
|
||||
};
|
||||
|
||||
net_buf_pool_init(smp_pool);
|
||||
|
||||
bt_l2cap_fixed_chan_register(&chan);
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue