Lines Matching refs:msg
175 struct net_buf_simple *msg, in bt_mesh_proxy_msg_send() argument
183 LOG_DBG("conn %p type 0x%02x len %u: %s", (void *)conn, type, msg->len, in bt_mesh_proxy_msg_send()
184 bt_hex(msg->data, msg->len)); in bt_mesh_proxy_msg_send()
193 if (mtu > msg->len) { in bt_mesh_proxy_msg_send()
194 net_buf_simple_push_u8(msg, PDU_HDR(SAR_COMPLETE, type)); in bt_mesh_proxy_msg_send()
195 return role->cb.send(conn, msg->data, msg->len, end, user_data); in bt_mesh_proxy_msg_send()
198 net_buf_simple_push_u8(msg, PDU_HDR(SAR_FIRST, type)); in bt_mesh_proxy_msg_send()
199 err = role->cb.send(conn, msg->data, mtu, NULL, NULL); in bt_mesh_proxy_msg_send()
204 net_buf_simple_pull(msg, mtu); in bt_mesh_proxy_msg_send()
206 while (msg->len) { in bt_mesh_proxy_msg_send()
207 if (msg->len + 1 <= mtu) { in bt_mesh_proxy_msg_send()
208 net_buf_simple_push_u8(msg, PDU_HDR(SAR_LAST, type)); in bt_mesh_proxy_msg_send()
209 err = role->cb.send(conn, msg->data, msg->len, end, user_data); in bt_mesh_proxy_msg_send()
217 net_buf_simple_push_u8(msg, PDU_HDR(SAR_CONT, type)); in bt_mesh_proxy_msg_send()
218 err = role->cb.send(conn, msg->data, mtu, NULL, NULL); in bt_mesh_proxy_msg_send()
223 net_buf_simple_pull(msg, mtu); in bt_mesh_proxy_msg_send()
240 NET_BUF_SIMPLE_DEFINE(msg, 1 + BT_MESH_NET_MAX_PDU_LEN); in proxy_relay_send()
245 net_buf_simple_reserve(&msg, 1); in proxy_relay_send()
246 net_buf_simple_add_mem(&msg, adv->b.data, adv->b.len); in proxy_relay_send()
249 &msg, buf_send_end, bt_mesh_adv_ref(adv)); in proxy_relay_send()