Example #1
0
/*
 * Default scan attach method.
 */
void
ieee80211_swscan_attach(struct ieee80211com *ic)
{
	struct scan_state *ss;

	/*
	 * Setup the default methods
	 */
	ic->ic_scan_methods = &swscan_methods;

	/* Allocate initial scan state */
	ss = (struct scan_state *) IEEE80211_MALLOC(sizeof(struct scan_state),
		M_80211_SCAN, IEEE80211_M_NOWAIT | IEEE80211_M_ZERO);
	if (ss == NULL) {
		ic->ic_scan = NULL;
		return;
	}
	TASK_INIT(&ss->ss_scan_start, 0, scan_start, ss);
	TIMEOUT_TASK_INIT(ic->ic_tq, &ss->ss_scan_curchan, 0,
	    scan_curchan_task, ss);

	ic->ic_scan = &ss->base;
	ss->base.ss_ic = ic;

	ic->ic_scan_curchan = scan_curchan;
	ic->ic_scan_mindwell = scan_mindwell;
}
Example #2
0
static void
r21a_postattach(struct rtwn_softc *sc)
{
	struct ieee80211com *ic = &sc->sc_ic;
	struct r12a_softc *rs = sc->sc_priv;

	if (rs->board_type == R92C_BOARD_TYPE_MINICARD ||
	    rs->board_type == R92C_BOARD_TYPE_SOLO ||
	    rs->board_type == R92C_BOARD_TYPE_COMBO)
		sc->sc_set_led = r88e_set_led;
	else
		sc->sc_set_led = r21a_set_led;

	TIMEOUT_TASK_INIT(taskqueue_thread, &rs->rs_chan_check, 0,
	    r21au_chan_check, sc);

	/* RXCKSUM */
	ic->ic_ioctl = r12a_ioctl_net;
	/* DFS */
	rs->rs_scan_start = ic->ic_scan_start;
	ic->ic_scan_start = r21au_scan_start;
	rs->rs_scan_end = ic->ic_scan_end;
	ic->ic_scan_end = r21au_scan_end;
}
Example #3
0
void
altera_sdcard_attach(struct altera_sdcard_softc *sc)
{

	ALTERA_SDCARD_LOCK_INIT(sc);
	ALTERA_SDCARD_CONDVAR_INIT(sc);
	sc->as_disk = NULL;
	bioq_init(&sc->as_bioq);
	sc->as_currentbio = NULL;
	sc->as_state = ALTERA_SDCARD_STATE_NOCARD;
	sc->as_taskqueue = taskqueue_create("altera_sdcardc taskq", M_WAITOK,
	    taskqueue_thread_enqueue, &sc->as_taskqueue);
	taskqueue_start_threads(&sc->as_taskqueue, 1, PI_DISK,
	    "altera_sdcardc%d taskqueue", sc->as_unit);
	TIMEOUT_TASK_INIT(sc->as_taskqueue, &sc->as_task, 0,
	    altera_sdcard_task, sc);

	/*
	 * Kick off timer-driven processing with a manual poll so that we
	 * synchronously detect an already-inserted SD Card during the boot or
	 * other driver attach point.
	 */
	altera_sdcard_task(sc, 1);
}