9
9
10
10
#include <zephyr/bluetooth/bluetooth.h>
11
11
#include <zephyr/bluetooth/hci.h>
12
+ #include <zephyr/bluetooth/hci_types.h>
12
13
#include <zephyr/drivers/bluetooth.h>
13
14
14
15
#include <zephyr/device.h>
@@ -74,7 +75,7 @@ static struct net_buf *bt_ipc_evt_recv(const uint8_t *data, size_t remaining)
74
75
size_t buf_tailroom ;
75
76
76
77
if (remaining < sizeof (hdr )) {
77
- LOG_ERR ("Not enough data for event header" );
78
+ LOG_ERR ("Not enough data (%u) for event header (%zu)" , remaining , sizeof ( hdr ) );
78
79
return NULL ;
79
80
}
80
81
@@ -85,7 +86,7 @@ static struct net_buf *bt_ipc_evt_recv(const uint8_t *data, size_t remaining)
85
86
remaining -= sizeof (hdr );
86
87
87
88
if (remaining != hdr .len ) {
88
- LOG_ERR ("Event payload length is not correct" );
89
+ LOG_ERR ("Event payload length is not correct (%u != %u)" , remaining , hdr . len );
89
90
return NULL ;
90
91
}
91
92
LOG_DBG ("len %u" , hdr .len );
@@ -122,7 +123,7 @@ static struct net_buf *bt_ipc_acl_recv(const uint8_t *data, size_t remaining)
122
123
size_t buf_tailroom ;
123
124
124
125
if (remaining < sizeof (hdr )) {
125
- LOG_ERR ("Not enough data for ACL header" );
126
+ LOG_ERR ("Not enough data (%u) for ACL header (%zu)" , remaining , sizeof ( hdr ) );
126
127
return NULL ;
127
128
}
128
129
@@ -139,7 +140,8 @@ static struct net_buf *bt_ipc_acl_recv(const uint8_t *data, size_t remaining)
139
140
}
140
141
141
142
if (remaining != sys_le16_to_cpu (hdr .len )) {
142
- LOG_ERR ("ACL payload length is not correct" );
143
+ LOG_ERR ("ACL payload length is not correct (%u != %u)" , remaining ,
144
+ sys_le16_to_cpu (hdr .len ));
143
145
net_buf_unref (buf );
144
146
return NULL ;
145
147
}
@@ -165,7 +167,7 @@ static struct net_buf *bt_ipc_iso_recv(const uint8_t *data, size_t remaining)
165
167
size_t buf_tailroom ;
166
168
167
169
if (remaining < sizeof (hdr )) {
168
- LOG_ERR ("Not enough data for ISO header" );
170
+ LOG_ERR ("Not enough data (%u) for ISO header (%zu)" , remaining , sizeof ( hdr ) );
169
171
return NULL ;
170
172
}
171
173
@@ -189,7 +191,8 @@ static struct net_buf *bt_ipc_iso_recv(const uint8_t *data, size_t remaining)
189
191
}
190
192
191
193
if (remaining != bt_iso_hdr_len (sys_le16_to_cpu (hdr .len ))) {
192
- LOG_ERR ("ISO payload length is not correct" );
194
+ LOG_ERR ("ISO payload length is not correct (%u != %lu)" , remaining ,
195
+ bt_iso_hdr_len (sys_le16_to_cpu (hdr .len )));
193
196
net_buf_unref (buf );
194
197
return NULL ;
195
198
}
0 commit comments