Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/usb/wlan/if_urtw.c
Show First 20 Lines • Show All 666 Lines • ▼ Show 20 Lines | |||||
static int urtw_tx_start(struct urtw_softc *, | static int urtw_tx_start(struct urtw_softc *, | ||||
struct ieee80211_node *, struct mbuf *, | struct ieee80211_node *, struct mbuf *, | ||||
struct urtw_data *, int); | struct urtw_data *, int); | ||||
static int urtw_newstate(struct ieee80211vap *, | static int urtw_newstate(struct ieee80211vap *, | ||||
enum ieee80211_state, int); | enum ieee80211_state, int); | ||||
static void urtw_led_ch(void *); | static void urtw_led_ch(void *); | ||||
static void urtw_ledtask(void *, int); | static void urtw_ledtask(void *, int); | ||||
static void urtw_watchdog(void *); | static void urtw_watchdog(void *); | ||||
#if 0 | |||||
static void urtw_set_multi(void *); | static void urtw_set_multi(void *); | ||||
#endif | |||||
static int urtw_isbmode(uint16_t); | static int urtw_isbmode(uint16_t); | ||||
static uint16_t urtw_rate2rtl(uint32_t); | static uint16_t urtw_rate2rtl(uint32_t); | ||||
static uint16_t urtw_rtl2rate(uint32_t); | static uint16_t urtw_rtl2rate(uint32_t); | ||||
static usb_error_t urtw_set_rate(struct urtw_softc *); | static usb_error_t urtw_set_rate(struct urtw_softc *); | ||||
static usb_error_t urtw_update_msr(struct urtw_softc *); | static usb_error_t urtw_update_msr(struct urtw_softc *); | ||||
static usb_error_t urtw_read8_c(struct urtw_softc *, int, uint8_t *); | static usb_error_t urtw_read8_c(struct urtw_softc *, int, uint8_t *); | ||||
static usb_error_t urtw_read16_c(struct urtw_softc *, int, uint16_t *); | static usb_error_t urtw_read16_c(struct urtw_softc *, int, uint16_t *); | ||||
static usb_error_t urtw_read32_c(struct urtw_softc *, int, uint32_t *); | static usb_error_t urtw_read32_c(struct urtw_softc *, int, uint32_t *); | ||||
▲ Show 20 Lines • Show All 683 Lines • ▼ Show 20 Lines | urtw_parent(struct ieee80211com *ic) | ||||
URTW_LOCK(sc); | URTW_LOCK(sc); | ||||
if (sc->sc_flags & URTW_DETACHED) { | if (sc->sc_flags & URTW_DETACHED) { | ||||
URTW_UNLOCK(sc); | URTW_UNLOCK(sc); | ||||
return; | return; | ||||
} | } | ||||
if (ic->ic_nrunning > 0) { | if (ic->ic_nrunning > 0) { | ||||
if (sc->sc_flags & URTW_RUNNING) { | if (!(sc->sc_flags & URTW_RUNNING)) { | ||||
if (ic->ic_promisc > 0 || ic->ic_allmulti > 0) | |||||
urtw_set_multi(sc); | |||||
} else { | |||||
urtw_init(sc); | urtw_init(sc); | ||||
startall = 1; | startall = 1; | ||||
} | } | ||||
} else if (sc->sc_flags & URTW_RUNNING) | } else if (sc->sc_flags & URTW_RUNNING) | ||||
urtw_stop(sc); | urtw_stop(sc); | ||||
URTW_UNLOCK(sc); | URTW_UNLOCK(sc); | ||||
if (startall) | if (startall) | ||||
ieee80211_start_all(ic); | ieee80211_start_all(ic); | ||||
▲ Show 20 Lines • Show All 483 Lines • ▼ Show 20 Lines | if (--sc->sc_txtimer == 0) { | ||||
device_printf(sc->sc_dev, "device timeout\n"); | device_printf(sc->sc_dev, "device timeout\n"); | ||||
counter_u64_add(sc->sc_ic.ic_oerrors, 1); | counter_u64_add(sc->sc_ic.ic_oerrors, 1); | ||||
return; | return; | ||||
} | } | ||||
callout_reset(&sc->sc_watchdog_ch, hz, urtw_watchdog, sc); | callout_reset(&sc->sc_watchdog_ch, hz, urtw_watchdog, sc); | ||||
} | } | ||||
} | } | ||||
#if 0 | |||||
static void | static void | ||||
urtw_set_multi(void *arg) | urtw_set_multi(void *arg) | ||||
{ | { | ||||
/* XXX don't know how to set a device. Lack of docs. */ | /* XXX don't know how to set a device. Lack of docs. */ | ||||
} | } | ||||
#endif | |||||
static usb_error_t | static usb_error_t | ||||
urtw_set_rate(struct urtw_softc *sc) | urtw_set_rate(struct urtw_softc *sc) | ||||
{ | { | ||||
int i, basic_rate, min_rr_rate, max_rr_rate; | int i, basic_rate, min_rr_rate, max_rr_rate; | ||||
uint16_t data; | uint16_t data; | ||||
usb_error_t error; | usb_error_t error; | ||||
▲ Show 20 Lines • Show All 2,496 Lines • Show Last 20 Lines |