wan: cosa: replace current->state by set_current_state()