/* Run handler function in the netif thread context and return immediately.  */
uint8_t os_hook_dispatch_no_wait(wifi_task_cb handler, void *p)
/* Run handler function in the netif thread context and return immediately.  */
uint8_t os_hook_dispatch_no_wait(wifi_task_cb handler, void *p)
{
	hif_msg_t msg;
	if (hif_thread == xTaskGetCurrentTaskHandle()) {
		handler(p);
	} 
	else {
		msg.id = MSG_CMD;
		msg.handler = handler;
		msg.priv = p;
		return xQueueSend(hif_queue, (void *)&msg, portMAX_DELAY);
	}
	return 0;
}