Lines Matching refs:error

158 static void ot_joiner_start_handler(otError error, void *context)  in ot_joiner_start_handler()  argument
162 if (error != OT_ERROR_NONE) { in ot_joiner_start_handler()
163 LOG_ERR("Join failed [%d]", error); in ot_joiner_start_handler()
166 error = otThreadSetEnabled(openthread_instance, true); in ot_joiner_start_handler()
167 if (error != OT_ERROR_NONE) { in ot_joiner_start_handler()
168 LOG_ERR("Failed to start the OpenThread network [%d]", error); in ot_joiner_start_handler()
193 otError error = OT_ERROR_NONE; in ot_setup_default_configuration() local
195 error = otThreadSetNetworkName(openthread_instance, OT_NETWORK_NAME); in ot_setup_default_configuration()
196 if (error != OT_ERROR_NONE) { in ot_setup_default_configuration()
197 LOG_ERR("Failed to set %s [%d]", "network name", error); in ot_setup_default_configuration()
201 error = otLinkSetChannel(openthread_instance, OT_CHANNEL); in ot_setup_default_configuration()
202 if (error != OT_ERROR_NONE) { in ot_setup_default_configuration()
203 LOG_ERR("Failed to set %s [%d]", "channel", error); in ot_setup_default_configuration()
207 error = otLinkSetPanId(openthread_instance, OT_PANID); in ot_setup_default_configuration()
208 if (error != OT_ERROR_NONE) { in ot_setup_default_configuration()
209 LOG_ERR("Failed to set %s [%d]", "PAN ID", error); in ot_setup_default_configuration()
217 error = otThreadSetExtendedPanId(openthread_instance, &xpanid); in ot_setup_default_configuration()
218 if (error != OT_ERROR_NONE) { in ot_setup_default_configuration()
219 LOG_ERR("Failed to set %s [%d]", "ext PAN ID", error); in ot_setup_default_configuration()
229 error = otThreadSetNetworkKey(openthread_instance, &networkKey); in ot_setup_default_configuration()
230 if (error != OT_ERROR_NONE) { in ot_setup_default_configuration()
231 LOG_ERR("Failed to set %s [%d]", "network key", error); in ot_setup_default_configuration()
262 int error = k_work_submit_to_queue(&openthread_work_q, &openthread_work); in otTaskletsSignalPending() local
264 if (error < 0) { in otTaskletsSignalPending()
265 LOG_ERR("Failed to submit work to queue, error: %d", error); in otTaskletsSignalPending()
318 otError error = OT_ERROR_NONE; in openthread_init() local
345 error = otPlatUartEnable(); in openthread_init()
346 if (error != OT_ERROR_NONE) { in openthread_init()
347 LOG_ERR("Failed to enable UART: [%d]", error); in openthread_init()
370 error = otSetStateChangedCallback(openthread_instance, &ot_state_changed_handler, in openthread_init()
372 if (error != OT_ERROR_NONE) { in openthread_init()
373 LOG_ERR("Could not set state changed callback: %d", error); in openthread_init()
383 return error == OT_ERROR_NONE ? 0 : -EIO; in openthread_init()
389 otError error = OT_ERROR_NONE; in openthread_run() local
398 error = otIp6SetEnabled(openthread_instance, true); in openthread_run()
399 if (error != OT_ERROR_NONE) { in openthread_run()
400 LOG_ERR("Failed to set %s [%d]", "IPv6 support", error); in openthread_run()
413 error = otThreadSetLinkMode(openthread_instance, ot_mode); in openthread_run()
414 if (error != OT_ERROR_NONE) { in openthread_run()
415 LOG_ERR("Failed to set %s [%d]", "link mode", error); in openthread_run()
419 error = otLinkSetPollPeriod(openthread_instance, OT_POLL_PERIOD); in openthread_run()
420 if (error != OT_ERROR_NONE) { in openthread_run()
421 LOG_ERR("Failed to set %s [%d]", "poll period", error); in openthread_run()
435 error = otJoinerStart(openthread_instance, OT_JOINER_PSKD, NULL, in openthread_run()
439 if (error != OT_ERROR_NONE) { in openthread_run()
440 LOG_ERR("Failed to start joiner [%d]", error); in openthread_run()
456 error = otThreadSetEnabled(openthread_instance, true); in openthread_run()
457 if (error != OT_ERROR_NONE) { in openthread_run()
458 LOG_ERR("Failed to start the OpenThread network [%d]", error); in openthread_run()
465 return error == OT_ERROR_NONE ? 0 : -EIO; in openthread_run()
470 otError error = OT_ERROR_NONE; in openthread_stop() local
478 error = otThreadSetEnabled(openthread_instance, false); in openthread_stop()
479 if (error == OT_ERROR_INVALID_STATE) { in openthread_stop()
480 LOG_DBG("Openthread interface was not up [%d]", error); in openthread_stop()
535 int error = k_work_submit_to_queue(&openthread_work_q, &openthread_border_router_work); in openthread_notify_border_router_work() local
537 if (error < 0) { in openthread_notify_border_router_work()
538 LOG_ERR("Failed to submit work to queue, error: %d", error); in openthread_notify_border_router_work()
546 int error = openthread_init(); in openthread_sys_init() local
548 if (error == 0) { in openthread_sys_init()
550 error = openthread_run(); in openthread_sys_init()
554 return error; in openthread_sys_init()