Lines Matching refs:sub
57 static int srpl_entry_save(struct bt_mesh_subnet *sub, uint32_t sseq, uint16_t ssrc) in srpl_entry_save() argument
138 static bool sol_pdu_decrypt(struct bt_mesh_subnet *sub, void *data) in sol_pdu_decrypt() argument
146 for (i = 0; i < ARRAY_SIZE(sub->keys); i++) { in sol_pdu_decrypt()
147 if (!sub->keys[i].valid) { in sol_pdu_decrypt()
155 err = bt_mesh_net_obfuscate(out->data, 0, &sub->keys[i].msg.privacy); in sol_pdu_decrypt()
160 err = bt_mesh_net_decrypt(&sub->keys[i].msg.enc, out, in sol_pdu_decrypt()
166 err = srpl_entry_save(sub, in sol_pdu_decrypt()
182 struct bt_mesh_subnet *sub; in bt_mesh_sol_recv() local
252 sub = bt_mesh_subnet_find(sol_pdu_decrypt, (void *)buf); in bt_mesh_sol_recv()
253 if (!sub) { in bt_mesh_sol_recv()
260 sub->solicited = true; in bt_mesh_sol_recv()
269 struct bt_mesh_subnet *sub; in bt_mesh_proxy_solicit() local
271 sub = bt_mesh_subnet_get(net_idx); in bt_mesh_proxy_solicit()
272 if (!sub) { in bt_mesh_proxy_solicit()
277 if (sub->sol_tx == true) { in bt_mesh_proxy_solicit()
288 sub->sol_tx = true; in bt_mesh_proxy_solicit()
298 static int sol_pdu_create(struct bt_mesh_subnet *sub, struct net_buf_simple *pdu) in sol_pdu_create() argument
302 net_buf_simple_add_u8(pdu, sub->keys[SUBNET_KEY_TX_IDX(sub)].msg.nid); in sol_pdu_create()
310 err = bt_mesh_net_encrypt(&sub->keys[SUBNET_KEY_TX_IDX(sub)].msg.enc, in sol_pdu_create()
319 &sub->keys[SUBNET_KEY_TX_IDX(sub)].msg.privacy); in sol_pdu_create()
484 static bool sol_subnet_find(struct bt_mesh_subnet *sub, void *cb_data) in sol_subnet_find() argument
486 return sub->sol_tx; in sol_subnet_find()
494 struct bt_mesh_subnet *sub; in bt_mesh_sol_send() local
499 sub = bt_mesh_subnet_find(sol_subnet_find, NULL); in bt_mesh_sol_send()
500 if (!sub) { in bt_mesh_sol_send()
507 sub->sol_tx = false; in bt_mesh_sol_send()
515 err = sol_pdu_create(sub, &pdu); in bt_mesh_sol_send()
535 sub->sol_tx = false; in bt_mesh_sol_send()
539 sub->sol_tx = false; in bt_mesh_sol_send()