/* Remove a Radio Controller; stop beaconing/scanning, disconnect all children  */
void uwb_rc_rm(struct uwb_rc *rc)
/* Remove a Radio Controller; stop beaconing/scanning, disconnect all children  */
void uwb_rc_rm(struct uwb_rc *rc)
{
	rc->ready = 0;
	uwb_dbg_del_rc(rc);
	uwb_rsv_remove_all(rc);
	uwb_radio_shutdown(rc);
	rc->stop(rc);
	uwbd_stop(rc);
	uwb_rc_neh_destroy(rc);
	uwb_dev_lock(&rc->uwb_dev);
	rc->priv = NULL;
	rc->cmd = NULL;
	uwb_dev_unlock(&rc->uwb_dev);
	mutex_lock(&rc->uwb_beca.mutex);
	uwb_dev_for_each(rc, uwb_dev_offair_helper, NULL);
	__uwb_rc_sys_rm(rc);
	mutex_unlock(&rc->uwb_beca.mutex);
	uwb_rsv_cleanup(rc);
 	uwb_beca_release(rc);
	uwb_dev_rm(&rc->uwb_dev);
}