diff options
| author | maxv <maxv@NetBSD.org> | 2019-11-28 17:09:10 +0000 |
|---|---|---|
| committer | maxv <maxv@NetBSD.org> | 2019-11-28 17:09:10 +0000 |
| commit | 8cd22b985ef700f35854781be4d504e8acd5fa4e (patch) | |
| tree | dea876cd88c93e31af8c66df2b0c47180fa3c40d /sys/dev/usb | |
| parent | 3e54302c0fe24aa1f820e56e558aab968f2ac84c (diff) | |
localify
Diffstat (limited to 'sys/dev/usb')
| -rw-r--r-- | sys/dev/usb/if_atu.c | 156 | ||||
| -rw-r--r-- | sys/dev/usb/if_urtw.c | 382 | ||||
| -rw-r--r-- | sys/dev/usb/if_zyd.c | 20 |
3 files changed, 279 insertions, 279 deletions
diff --git a/sys/dev/usb/if_atu.c b/sys/dev/usb/if_atu.c index a155ca192a8..f52e5d02f01 100644 --- a/sys/dev/usb/if_atu.c +++ b/sys/dev/usb/if_atu.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_atu.c,v 1.65 2019/05/05 03:17:54 mrg Exp $ */ +/* $NetBSD: if_atu.c,v 1.66 2019/11/28 17:09:10 maxv Exp $ */ /* $OpenBSD: if_atu.c,v 1.48 2004/12/30 01:53:21 dlg Exp $ */ /* * Copyright (c) 2003, 2004 @@ -48,7 +48,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_atu.c,v 1.65 2019/05/05 03:17:54 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_atu.c,v 1.66 2019/11/28 17:09:10 maxv Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -228,65 +228,65 @@ static const struct atu_radfirm { atmel_fw_intersil_ext, sizeof(atmel_fw_intersil_ext) } }; -int atu_newbuf(struct atu_softc *, struct atu_chain *, struct mbuf *); -void atu_rxeof(struct usbd_xfer *, void *, usbd_status); -void atu_txeof(struct usbd_xfer *, void *, usbd_status); -void atu_start(struct ifnet *); -int atu_ioctl(struct ifnet *, u_long, void *); -int atu_init(struct ifnet *); -void atu_stop(struct ifnet *, int); -void atu_watchdog(struct ifnet *); -usbd_status atu_usb_request(struct atu_softc *, uint8_t, +static int atu_newbuf(struct atu_softc *, struct atu_chain *, struct mbuf *); +static void atu_rxeof(struct usbd_xfer *, void *, usbd_status); +static void atu_txeof(struct usbd_xfer *, void *, usbd_status); +static void atu_start(struct ifnet *); +static int atu_ioctl(struct ifnet *, u_long, void *); +static int atu_init(struct ifnet *); +static void atu_stop(struct ifnet *, int); +static void atu_watchdog(struct ifnet *); +static usbd_status atu_usb_request(struct atu_softc *, uint8_t, uint8_t, uint16_t, uint16_t, uint16_t, uint8_t *); -int atu_send_command(struct atu_softc *, uint8_t *, int); -int atu_get_cmd_status(struct atu_softc *, uint8_t, +static int atu_send_command(struct atu_softc *, uint8_t *, int); +static int atu_get_cmd_status(struct atu_softc *, uint8_t, uint8_t *); -int atu_wait_completion(struct atu_softc *, uint8_t, +static int atu_wait_completion(struct atu_softc *, uint8_t, uint8_t *); -int atu_send_mib(struct atu_softc *, uint8_t, +static int atu_send_mib(struct atu_softc *, uint8_t, uint8_t, uint8_t, void *); -int atu_get_mib(struct atu_softc *, uint8_t, +static int atu_get_mib(struct atu_softc *, uint8_t, uint8_t, uint8_t, uint8_t *); #if 0 int atu_start_ibss(struct atu_softc *); #endif -int atu_start_scan(struct atu_softc *); -int atu_switch_radio(struct atu_softc *, int); -int atu_initial_config(struct atu_softc *); -int atu_join(struct atu_softc *, struct ieee80211_node *); -int8_t atu_get_dfu_state(struct atu_softc *); -uint8_t atu_get_opmode(struct atu_softc *, uint8_t *); -void atu_internal_firmware(device_t); -void atu_external_firmware(device_t); -int atu_get_card_config(struct atu_softc *); -int atu_media_change(struct ifnet *); -void atu_media_status(struct ifnet *, struct ifmediareq *); -int atu_tx_list_init(struct atu_softc *); -int atu_rx_list_init(struct atu_softc *); -void atu_xfer_list_free(struct atu_softc *, struct atu_chain *, +static int atu_start_scan(struct atu_softc *); +static int atu_switch_radio(struct atu_softc *, int); +static int atu_initial_config(struct atu_softc *); +static int atu_join(struct atu_softc *, struct ieee80211_node *); +static int8_t atu_get_dfu_state(struct atu_softc *); +static uint8_t atu_get_opmode(struct atu_softc *, uint8_t *); +static void atu_internal_firmware(device_t); +static void atu_external_firmware(device_t); +static int atu_get_card_config(struct atu_softc *); +static int atu_media_change(struct ifnet *); +static void atu_media_status(struct ifnet *, struct ifmediareq *); +static int atu_tx_list_init(struct atu_softc *); +static int atu_rx_list_init(struct atu_softc *); +static void atu_xfer_list_free(struct atu_softc *, struct atu_chain *, int); #ifdef ATU_DEBUG -void atu_debug_print(struct atu_softc *); +static void atu_debug_print(struct atu_softc *); #endif -void atu_task(void *); -int atu_newstate(struct ieee80211com *, enum ieee80211_state, int); -int atu_tx_start(struct atu_softc *, struct ieee80211_node *, +static void atu_task(void *); +static int atu_newstate(struct ieee80211com *, enum ieee80211_state, int); +static int atu_tx_start(struct atu_softc *, struct ieee80211_node *, struct atu_chain *, struct mbuf *); -void atu_complete_attach(struct atu_softc *); -uint8_t atu_calculate_padding(int); +static void atu_complete_attach(struct atu_softc *); +static uint8_t atu_calculate_padding(int); -int atu_match(device_t, cfdata_t, void *); -void atu_attach(device_t, device_t, void *); -int atu_detach(device_t, int); -int atu_activate(device_t, enum devact); +static int atu_match(device_t, cfdata_t, void *); +static void atu_attach(device_t, device_t, void *); +static int atu_detach(device_t, int); +static int atu_activate(device_t, enum devact); CFATTACH_DECL_NEW(atu, sizeof(struct atu_softc), atu_match, atu_attach, atu_detach, atu_activate); -usbd_status +static usbd_status atu_usb_request(struct atu_softc *sc, uint8_t type, uint8_t request, uint16_t value, uint16_t index, uint16_t length, uint8_t *data) @@ -345,14 +345,14 @@ atu_usb_request(struct atu_softc *sc, uint8_t type, return err; } -int +static int atu_send_command(struct atu_softc *sc, uint8_t *command, int size) { return atu_usb_request(sc, UT_WRITE_VENDOR_DEVICE, 0x0e, 0x0000, 0x0000, size, command); } -int +static int atu_get_cmd_status(struct atu_softc *sc, uint8_t cmd, uint8_t *status) { /* @@ -368,7 +368,7 @@ atu_get_cmd_status(struct atu_softc *sc, uint8_t cmd, uint8_t *status) 0x0000, 6, status); } -int +static int atu_wait_completion(struct atu_softc *sc, uint8_t cmd, uint8_t *status) { int idle_count = 0, err; @@ -410,7 +410,7 @@ atu_wait_completion(struct atu_softc *sc, uint8_t cmd, uint8_t *status) } } -int +static int atu_send_mib(struct atu_softc *sc, uint8_t type, uint8_t size, uint8_t index, void *data) { @@ -461,7 +461,7 @@ atu_send_mib(struct atu_softc *sc, uint8_t type, uint8_t size, return atu_wait_completion(sc, CMD_SET_MIB, NULL); } -int +static int atu_get_mib(struct atu_softc *sc, uint8_t type, uint8_t size, uint8_t index, uint8_t *buf) { @@ -524,7 +524,7 @@ atu_start_ibss(struct atu_softc *sc) } #endif -int +static int atu_start_scan(struct atu_softc *sc) { struct ieee80211com *ic = &sc->sc_ic; @@ -588,7 +588,7 @@ atu_start_scan(struct atu_softc *sc) return 0; } -int +static int atu_switch_radio(struct atu_softc *sc, int state) { usbd_status err; @@ -625,7 +625,7 @@ atu_switch_radio(struct atu_softc *sc, int state) return 0; } -int +static int atu_initial_config(struct atu_softc *sc) { struct ieee80211com *ic = &sc->sc_ic; @@ -779,7 +779,7 @@ atu_initial_config(struct atu_softc *sc) return 0; } -int +static int atu_join(struct atu_softc *sc, struct ieee80211_node *node) { struct atu_cmd_join join; @@ -836,7 +836,7 @@ atu_join(struct atu_softc *sc, struct ieee80211_node *node) /* * Get the state of the DFU unit */ -int8_t +static int8_t atu_get_dfu_state(struct atu_softc *sc) { uint8_t state; @@ -849,7 +849,7 @@ atu_get_dfu_state(struct atu_softc *sc) /* * Get MAC opmode */ -uint8_t +static uint8_t atu_get_opmode(struct atu_softc *sc, uint8_t *mode) { @@ -860,7 +860,7 @@ atu_get_opmode(struct atu_softc *sc, uint8_t *mode) /* * Upload the internal firmware into the device */ -void +static void atu_internal_firmware(device_t arg) { struct atu_softc *sc = device_private(arg); @@ -981,7 +981,7 @@ atu_internal_firmware(device_t arg) usb_needs_reattach(sc->atu_udev); } -void +static void atu_external_firmware(device_t arg) { struct atu_softc *sc = device_private(arg); @@ -1044,7 +1044,7 @@ atu_external_firmware(device_t arg) atu_complete_attach(sc); } -int +static int atu_get_card_config(struct atu_softc *sc) { struct ieee80211com *ic = &sc->sc_ic; @@ -1090,7 +1090,7 @@ atu_get_card_config(struct atu_softc *sc) /* * Probe for an AT76c503 chip. */ -int +static int atu_match(device_t parent, cfdata_t match, void *aux) { struct usb_attach_arg *uaa = aux; @@ -1107,7 +1107,7 @@ atu_match(device_t parent, cfdata_t match, void *aux) return UMATCH_NONE; } -int +static int atu_media_change(struct ifnet *ifp) { struct atu_softc *sc = ifp->if_softc; @@ -1132,7 +1132,7 @@ atu_media_change(struct ifnet *ifp) return err; } -void +static void atu_media_status(struct ifnet *ifp, struct ifmediareq *req) { #ifdef ATU_DEBUG @@ -1144,7 +1144,7 @@ atu_media_status(struct ifnet *ifp, struct ifmediareq *req) ieee80211_media_status(ifp, req); } -void +static void atu_task(void *arg) { struct atu_softc *sc = (struct atu_softc *)arg; @@ -1190,7 +1190,7 @@ atu_task(void *arg) } } -int +static int atu_newstate(struct ieee80211com *ic, enum ieee80211_state nstate, int arg) { struct ifnet *ifp = ic->ic_ifp; @@ -1234,7 +1234,7 @@ atu_newstate(struct ieee80211com *ic, enum ieee80211_state nstate, int arg) * Attach the interface. Allocate softc structures, do * setup and ethernet/BPF attach. */ -void +static void atu_attach(device_t parent, device_t self, void *aux) { struct atu_softc *sc = device_private(self); @@ -1350,7 +1350,7 @@ atu_attach(device_t parent, device_t self, void *aux) return; } -void +static void atu_complete_attach(struct atu_softc *sc) { struct ieee80211com *ic = &sc->sc_ic; @@ -1467,7 +1467,7 @@ atu_complete_attach(struct atu_softc *sc) sc->sc_state = ATU_S_OK; } -int +static int atu_detach(device_t self, int flags) { struct atu_softc *sc = device_private(self); @@ -1486,7 +1486,7 @@ atu_detach(device_t self, int flags) return 0; } -int +static int atu_activate(device_t self, enum devact act) { struct atu_softc *sc = device_private(self); @@ -1506,7 +1506,7 @@ atu_activate(device_t self, enum devact act) /* * Initialize an RX descriptor and attach an MBUF cluster. */ -int +static int atu_newbuf(struct atu_softc *sc, struct atu_chain *c, struct mbuf *m) { struct mbuf *m_new = NULL; @@ -1536,7 +1536,7 @@ atu_newbuf(struct atu_softc *sc, struct atu_chain *c, struct mbuf *m) return 0; } -int +static int atu_rx_list_init(struct atu_softc *sc) { struct atu_cdata *cd = &sc->atu_cdata; @@ -1563,7 +1563,7 @@ atu_rx_list_init(struct atu_softc *sc) return 0; } -int +static int atu_tx_list_init(struct atu_softc *sc) { struct atu_cdata *cd = &sc->atu_cdata; @@ -1593,7 +1593,7 @@ atu_tx_list_init(struct atu_softc *sc) return 0; } -void +static void atu_xfer_list_free(struct atu_softc *sc, struct atu_chain *ch, int listlen) { int i; @@ -1617,7 +1617,7 @@ atu_xfer_list_free(struct atu_softc *sc, struct atu_chain *ch, int listlen) * A frame has been uploaded: pass the resulting mbuf chain up to * the higher level protocols. */ -void +static void atu_rxeof(struct usbd_xfer *xfer, void *priv, usbd_status status) { struct atu_chain *c = (struct atu_chain *)priv; @@ -1726,7 +1726,7 @@ done: * A frame was downloaded to the chip. It's safe for us to clean up * the list buffers. */ -void +static void atu_txeof(struct usbd_xfer *xfer, void *priv, usbd_status status) { struct atu_chain *c = (struct atu_chain *)priv; @@ -1773,7 +1773,7 @@ atu_txeof(struct usbd_xfer *xfer, void *priv, usbd_status status) atu_start(ifp); } -uint8_t +static uint8_t atu_calculate_padding(int size) { size %= 64; @@ -1785,7 +1785,7 @@ atu_calculate_padding(int size) return 0; } -int +static int atu_tx_start(struct atu_softc *sc, struct ieee80211_node *ni, struct atu_chain *c, struct mbuf *m) { @@ -1840,7 +1840,7 @@ atu_tx_start(struct atu_softc *sc, struct ieee80211_node *ni, return 0; } -void +static void atu_start(struct ifnet *ifp) { struct atu_softc *sc = ifp->if_softc; @@ -1958,7 +1958,7 @@ bad: } } -int +static int atu_init(struct ifnet *ifp) { struct atu_softc *sc = ifp->if_softc; @@ -2054,7 +2054,7 @@ atu_init(struct ifnet *ifp) } #ifdef ATU_DEBUG -void +static void atu_debug_print(struct atu_softc *sc) { usbd_status err; @@ -2137,7 +2137,7 @@ atu_debug_print(struct atu_softc *sc) } #endif /* ATU_DEBUG */ -int +static int atu_ioctl(struct ifnet *ifp, u_long command, void *data) { struct atu_softc *sc = ifp->if_softc; @@ -2175,7 +2175,7 @@ atu_ioctl(struct ifnet *ifp, u_long command, void *data) return err; } -void +static void atu_watchdog(struct ifnet *ifp) { struct atu_softc *sc = ifp->if_softc; @@ -2219,7 +2219,7 @@ atu_watchdog(struct ifnet *ifp) * Stop the adapter and free any mbufs allocated to the * RX and TX lists. */ -void +static void atu_stop(struct ifnet *ifp, int disable) { struct atu_softc *sc = ifp->if_softc; diff --git a/sys/dev/usb/if_urtw.c b/sys/dev/usb/if_urtw.c index c5256e19cbe..dad6bdce557 100644 --- a/sys/dev/usb/if_urtw.c +++ b/sys/dev/usb/if_urtw.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_urtw.c,v 1.19 2019/09/14 12:40:31 maxv Exp $ */ +/* $NetBSD: if_urtw.c,v 1.20 2019/11/28 17:09:10 maxv Exp $ */ /* $OpenBSD: if_urtw.c,v 1.39 2011/07/03 15:47:17 matthew Exp $ */ /*- @@ -19,7 +19,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_urtw.c,v 1.19 2019/09/14 12:40:31 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_urtw.c,v 1.20 2019/11/28 17:09:10 maxv Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -478,110 +478,110 @@ static struct urtw_pair urtw_ratetable[] = { { 96, 10 }, { 108, 11 } }; -int urtw_init(struct ifnet *); -void urtw_stop(struct ifnet *, int); -int urtw_ioctl(struct ifnet *, u_long, void *); -void urtw_start(struct ifnet *); -int urtw_alloc_rx_data_list(struct urtw_softc *); -void urtw_free_rx_data_list(struct urtw_softc *); -int urtw_alloc_tx_data_list(struct urtw_softc *); -void urtw_free_tx_data_list(struct urtw_softc *); -void urtw_rxeof(struct usbd_xfer *, void *, +static int urtw_init(struct ifnet *); +static void urtw_stop(struct ifnet *, int); +static int urtw_ioctl(struct ifnet *, u_long, void *); +static void urtw_start(struct ifnet *); +static int urtw_alloc_rx_data_list(struct urtw_softc *); +static void urtw_free_rx_data_list(struct urtw_softc *); +static int urtw_alloc_tx_data_list(struct urtw_softc *); +static void urtw_free_tx_data_list(struct urtw_softc *); +static void urtw_rxeof(struct usbd_xfer *, void *, usbd_status); -int urtw_tx_start(struct urtw_softc *, +static int urtw_tx_start(struct urtw_softc *, struct ieee80211_node *, struct mbuf *, int); -void urtw_txeof_low(struct usbd_xfer *, void *, +static void urtw_txeof_low(struct usbd_xfer *, void *, usbd_status); -void urtw_txeof_normal(struct usbd_xfer *, void *, +static void urtw_txeof_normal(struct usbd_xfer *, void *, usbd_status); -void urtw_next_scan(void *); -void urtw_task(void *); -void urtw_ledusbtask(void *); -void urtw_ledtask(void *); -int urtw_media_change(struct ifnet *); -int urtw_newstate(struct ieee80211com *, enum ieee80211_state, int); -void urtw_watchdog(struct ifnet *); -void urtw_set_chan(struct urtw_softc *, struct ieee80211_channel *); -int urtw_isbmode(uint16_t); -uint16_t urtw_rate2rtl(int); -uint16_t urtw_rtl2rate(int); -usbd_status urtw_set_rate(struct urtw_softc *); -usbd_status urtw_update_msr(struct urtw_softc *); -usbd_status urtw_read8_c(struct urtw_softc *, int, uint8_t *, uint8_t); -usbd_status urtw_read16_c(struct urtw_softc *, int, uint16_t *, uint8_t); -usbd_status urtw_read32_c(struct urtw_softc *, int, uint32_t *, uint8_t); -usbd_status urtw_write8_c(struct urtw_softc *, int, uint8_t, uint8_t); -usbd_status urtw_write16_c(struct urtw_softc *, int, uint16_t, uint8_t); -usbd_status urtw_write32_c(struct urtw_softc *, int, uint32_t, uint8_t); -usbd_status urtw_eprom_cs(struct urtw_softc *, int); -usbd_status urtw_eprom_ck(struct urtw_softc *); -usbd_status urtw_eprom_sendbits(struct urtw_softc *, int16_t *, +static void urtw_next_scan(void *); +static void urtw_task(void *); +static void urtw_ledusbtask(void *); +static void urtw_ledtask(void *); +static int urtw_media_change(struct ifnet *); +static int urtw_newstate(struct ieee80211com *, enum ieee80211_state, int); +static void urtw_watchdog(struct ifnet *); +static void urtw_set_chan(struct urtw_softc *, struct ieee80211_channel *); +static int urtw_isbmode(uint16_t); +static uint16_t urtw_rate2rtl(int); +static uint16_t urtw_rtl2rate(int); +static usbd_status urtw_set_rate(struct urtw_softc *); +static usbd_status urtw_update_msr(struct urtw_softc *); +static usbd_status urtw_read8_c(struct urtw_softc *, int, uint8_t *, uint8_t); +static usbd_status urtw_read16_c(struct urtw_softc *, int, uint16_t *, uint8_t); +static usbd_status urtw_read32_c(struct urtw_softc *, int, uint32_t *, uint8_t); +static usbd_status urtw_write8_c(struct urtw_softc *, int, uint8_t, uint8_t); +static usbd_status urtw_write16_c(struct urtw_softc *, int, uint16_t, uint8_t); +static usbd_status urtw_write32_c(struct urtw_softc *, int, uint32_t, uint8_t); +static usbd_status urtw_eprom_cs(struct urtw_softc *, int); +static usbd_status urtw_eprom_ck(struct urtw_softc *); +static usbd_status urtw_eprom_sendbits(struct urtw_softc *, int16_t *, int); -usbd_status urtw_eprom_read32(struct urtw_softc *, uint32_t, +static usbd_status urtw_eprom_read32(struct urtw_softc *, uint32_t, uint32_t *); -usbd_status urtw_eprom_readbit(struct urtw_softc *, int16_t *); -usbd_status urtw_eprom_writebit(struct urtw_softc *, int16_t); -usbd_status urtw_get_macaddr(struct urtw_softc *); -usbd_status urtw_get_txpwr(struct urtw_softc *); -usbd_status urtw_get_rfchip(struct urtw_softc *); -usbd_status urtw_led_init(struct urtw_softc *); -usbd_status urtw_8185_rf_pins_enable(struct urtw_softc *); -usbd_status urtw_8185_tx_antenna(struct urtw_softc *, uint8_t); -usbd_status urtw_8187_write_phy(struct urtw_softc *, uint8_t, uint32_t); -usbd_status urtw_8187_write_phy_ofdm_c(struct urtw_softc *, uint8_t, +static usbd_status urtw_eprom_readbit(struct urtw_softc *, int16_t *); +static usbd_status urtw_eprom_writebit(struct urtw_softc *, int16_t); +static usbd_status urtw_get_macaddr(struct urtw_softc *); +static usbd_status urtw_get_txpwr(struct urtw_softc *); +static usbd_status urtw_get_rfchip(struct urtw_softc *); +static usbd_status urtw_led_init(struct urtw_softc *); +static usbd_status urtw_8185_rf_pins_enable(struct urtw_softc *); +static usbd_status urtw_8185_tx_antenna(struct urtw_softc *, uint8_t); +static usbd_status urtw_8187_write_phy(struct urtw_softc *, uint8_t, uint32_t); +static usbd_status urtw_8187_write_phy_ofdm_c(struct urtw_softc *, uint8_t, uint32_t); -usbd_status urtw_8187_write_phy_cck_c(struct urtw_softc *, uint8_t, +static usbd_status urtw_8187_write_phy_cck_c(struct urtw_softc *, uint8_t, uint32_t); -usbd_status urtw_8225_setgain(struct urtw_softc *, int16_t); -usbd_status urtw_8225_usb_init(struct urtw_softc *); -usbd_status urtw_8225_write_c(struct urtw_softc *, uint8_t, uint16_t); -usbd_status urtw_8225_write_s16(struct urtw_softc *, uint8_t, int, +static usbd_status urtw_8225_setgain(struct urtw_softc *, int16_t); +static usbd_status urtw_8225_usb_init(struct urtw_softc *); +static usbd_status urtw_8225_write_c(struct urtw_softc *, uint8_t, uint16_t); +static usbd_status urtw_8225_write_s16(struct urtw_softc *, uint8_t, int, uint16_t); -usbd_status urtw_8225_read(struct urtw_softc *, uint8_t, uint32_t *); -usbd_status urtw_8225_rf_init(struct urtw_rf *); -usbd_status urtw_8225_rf_set_chan(struct urtw_rf *, int); -usbd_status urtw_8225_rf_set_sens(struct urtw_rf *); -usbd_status urtw_8225_set_txpwrlvl(struct urtw_softc *, int); -usbd_status urtw_8225v2_rf_init(struct urtw_rf *); -usbd_status urtw_8225v2_rf_set_chan(struct urtw_rf *, int); -usbd_status urtw_8225v2_set_txpwrlvl(struct urtw_softc *, int); -usbd_status urtw_8225v2_setgain(struct urtw_softc *, int16_t); -usbd_status urtw_8225_isv2(struct urtw_softc *, int *); -usbd_status urtw_read8e(struct urtw_softc *, int, uint8_t *); -usbd_status urtw_write8e(struct urtw_softc *, int, uint8_t); -usbd_status urtw_8180_set_anaparam(struct urtw_softc *, uint32_t); -usbd_status urtw_8185_set_anaparam2(struct urtw_softc *, uint32_t); -usbd_status urtw_open_pipes(struct urtw_softc *); -usbd_status urtw_close_pipes(struct urtw_softc *); -usbd_status urtw_intr_enable(struct urtw_softc *); -usbd_status urtw_intr_disable(struct urtw_softc *); -usbd_status urtw_reset(struct urtw_softc *); -usbd_status urtw_led_on(struct urtw_softc *, int); -usbd_status urtw_led_ctl(struct urtw_softc *, int); -usbd_status urtw_led_blink(struct urtw_softc *); -usbd_status urtw_led_mode0(struct urtw_softc *, int); -usbd_status urtw_led_mode1(struct urtw_softc *, int); -usbd_status urtw_led_mode2(struct urtw_softc *, int); -usbd_status urtw_led_mode3(struct urtw_softc *, int); -usbd_status urtw_rx_setconf(struct urtw_softc *); -usbd_status urtw_rx_enable(struct urtw_softc *); -usbd_status urtw_tx_enable(struct urtw_softc *); -usbd_status urtw_8187b_update_wmm(struct urtw_softc *); -usbd_status urtw_8187b_reset(struct urtw_softc *); -int urtw_8187b_init(struct ifnet *); -usbd_status urtw_8225v2_b_config_mac(struct urtw_softc *); -usbd_status urtw_8225v2_b_init_rfe(struct urtw_softc *); -usbd_status urtw_8225v2_b_update_chan(struct urtw_softc *); -usbd_status urtw_8225v2_b_rf_init(struct urtw_rf *); -usbd_status urtw_8225v2_b_rf_set_chan(struct urtw_rf *, int); -usbd_status urtw_8225v2_b_set_txpwrlvl(struct urtw_softc *, int); -int urtw_set_bssid(struct urtw_softc *, const uint8_t *); -int urtw_set_macaddr(struct urtw_softc *, const uint8_t *); - -int urtw_match(device_t, cfdata_t, void *); -void urtw_attach(device_t, device_t, void *); -int urtw_detach(device_t, int); -int urtw_activate(device_t, enum devact); +static usbd_status urtw_8225_read(struct urtw_softc *, uint8_t, uint32_t *); +static usbd_status urtw_8225_rf_init(struct urtw_rf *); +static usbd_status urtw_8225_rf_set_chan(struct urtw_rf *, int); +static usbd_status urtw_8225_rf_set_sens(struct urtw_rf *); +static usbd_status urtw_8225_set_txpwrlvl(struct urtw_softc *, int); +static usbd_status urtw_8225v2_rf_init(struct urtw_rf *); +static usbd_status urtw_8225v2_rf_set_chan(struct urtw_rf *, int); +static usbd_status urtw_8225v2_set_txpwrlvl(struct urtw_softc *, int); +static usbd_status urtw_8225v2_setgain(struct urtw_softc *, int16_t); +static usbd_status urtw_8225_isv2(struct urtw_softc *, int *); +static usbd_status urtw_read8e(struct urtw_softc *, int, uint8_t *); +static usbd_status urtw_write8e(struct urtw_softc *, int, uint8_t); +static usbd_status urtw_8180_set_anaparam(struct urtw_softc *, uint32_t); +static usbd_status urtw_8185_set_anaparam2(struct urtw_softc *, uint32_t); +static usbd_status urtw_open_pipes(struct urtw_softc *); +static usbd_status urtw_close_pipes(struct urtw_softc *); +static usbd_status urtw_intr_enable(struct urtw_softc *); +static usbd_status urtw_intr_disable(struct urtw_softc *); +static usbd_status urtw_reset(struct urtw_softc *); +static usbd_status urtw_led_on(struct urtw_softc *, int); +static usbd_status urtw_led_ctl(struct urtw_softc *, int); +static usbd_status urtw_led_blink(struct urtw_softc *); +static usbd_status urtw_led_mode0(struct urtw_softc *, int); +static usbd_status urtw_led_mode1(struct urtw_softc *, int); +static usbd_status urtw_led_mode2(struct urtw_softc *, int); +static usbd_status urtw_led_mode3(struct urtw_softc *, int); +static usbd_status urtw_rx_setconf(struct urtw_softc *); +static usbd_status urtw_rx_enable(struct urtw_softc *); +static usbd_status urtw_tx_enable(struct urtw_softc *); +static usbd_status urtw_8187b_update_wmm(struct urtw_softc *); +static usbd_status urtw_8187b_reset(struct urtw_softc *); +static int urtw_8187b_init(struct ifnet *); +static usbd_status urtw_8225v2_b_config_mac(struct urtw_softc *); +static usbd_status urtw_8225v2_b_init_rfe(struct urtw_softc *); +static usbd_status urtw_8225v2_b_update_chan(struct urtw_softc *); +static usbd_status urtw_8225v2_b_rf_init(struct urtw_rf *); +static usbd_status urtw_8225v2_b_rf_set_chan(struct urtw_rf *, int); +static usbd_status urtw_8225v2_b_set_txpwrlvl(struct urtw_softc *, int); +static int urtw_set_bssid(struct urtw_softc *, const uint8_t *); +static int urtw_set_macaddr(struct urtw_softc *, const uint8_t *); + +static int urtw_match(device_t, cfdata_t, void *); +static void urtw_attach(device_t, device_t, void *); +static int urtw_detach(device_t, int); +static int urtw_activate(device_t, enum devact); CFATTACH_DECL_NEW(urtw, sizeof(struct urtw_softc), urtw_match, @@ -590,7 +590,7 @@ CFATTACH_DECL_NEW(urtw, sizeof(struct urtw_softc), urtw_activate ); -int +static int urtw_match(device_t parent, cfdata_t match, void *aux) { struct usb_attach_arg *uaa = aux; @@ -599,7 +599,7 @@ urtw_match(device_t parent, cfdata_t match, void *aux) UMATCH_VENDOR_PRODUCT : UMATCH_NONE; } -void +static void urtw_attach(device_t parent, device_t self, void *aux) { struct urtw_softc *sc = device_private(self); @@ -766,7 +766,7 @@ fail: sc->sc_dying = true; } -int +static int urtw_detach(device_t self, int flags) { struct urtw_softc *sc = device_private(self); @@ -805,7 +805,7 @@ out: return 0; } -int +static int urtw_activate(device_t self, enum devact act) { struct urtw_softc *sc = device_private(self); @@ -819,7 +819,7 @@ urtw_activate(device_t self, enum devact act) return 0; } -usbd_status +static usbd_status urtw_close_pipes(struct urtw_softc *sc) { usbd_status error = 0; @@ -846,7 +846,7 @@ fail: return error; } -usbd_status +static usbd_status urtw_open_pipes(struct urtw_softc *sc) { usbd_status error; @@ -899,7 +899,7 @@ fail: return error; } -int +static int urtw_alloc_rx_data_list(struct urtw_softc *sc) { int i, error; @@ -943,7 +943,7 @@ fail: return error; } -void +static void urtw_free_rx_data_list(struct urtw_softc *sc) { int i; @@ -966,7 +966,7 @@ urtw_free_rx_data_list(struct urtw_softc *sc) } } -int +static int urtw_alloc_tx_data_list(struct urtw_softc *sc) { int i, error; @@ -1003,7 +1003,7 @@ fail: return error; } -void +static void urtw_free_tx_data_list(struct urtw_softc *sc) { int i; @@ -1030,7 +1030,7 @@ urtw_free_tx_data_list(struct urtw_softc *sc) } } -int +static int urtw_media_change(struct ifnet *ifp) { int error; @@ -1046,7 +1046,7 @@ urtw_media_change(struct ifnet *ifp) return 0; } -int +static int urtw_newstate(struct ieee80211com *ic, enum ieee80211_state nstate, int arg) { struct urtw_softc *sc = ic->ic_ifp->if_softc; @@ -1067,7 +1067,7 @@ urtw_newstate(struct ieee80211com *ic, enum ieee80211_state nstate, int arg) return 0; } -usbd_status +static usbd_status urtw_led_init(struct urtw_softc *sc) { uint32_t rev; @@ -1101,7 +1101,7 @@ fail: return error; } -usbd_status +static usbd_status urtw_8225_write_s16(struct urtw_softc *sc, uint8_t addr, int index, uint16_t data) { @@ -1116,7 +1116,7 @@ urtw_8225_write_s16(struct urtw_softc *sc, uint8_t addr, int index, return usbd_do_request(sc->sc_udev, &req, &data); } -usbd_status +static usbd_status urtw_8225_read(struct urtw_softc *sc, uint8_t addr, uint32_t *data) { int i; @@ -1206,7 +1206,7 @@ fail: return error; } -usbd_status +static usbd_status urtw_8225_write_c(struct urtw_softc *sc, uint8_t addr, uint16_t data) { uint16_t d80, d82, d84; @@ -1239,7 +1239,7 @@ fail: return error; } -usbd_status +static usbd_status urtw_8225_isv2(struct urtw_softc *sc, int *ret) { uint32_t data; @@ -1272,7 +1272,7 @@ fail: return error; } -usbd_status +static usbd_status urtw_get_rfchip(struct urtw_softc *sc) { struct urtw_rf *rf = &sc->sc_rf; @@ -1322,7 +1322,7 @@ fail: return USBD_INVAL; } -usbd_status +static usbd_status urtw_get_txpwr(struct urtw_softc *sc) { int i, j; @@ -1393,7 +1393,7 @@ fail: return error; } -usbd_status +static usbd_status urtw_get_macaddr(struct urtw_softc *sc) { struct ieee80211com *ic = &sc->sc_ic; @@ -1419,7 +1419,7 @@ fail: return error; } -usbd_status +static usbd_status urtw_eprom_read32(struct urtw_softc *sc, uint32_t addr, uint32_t *data) { #define URTW_READCMD_LEN 3 @@ -1495,7 +1495,7 @@ fail: #undef URTW_READCMD_LEN } -usbd_status +static usbd_status urtw_eprom_readbit(struct urtw_softc *sc, int16_t *data) { uint8_t data8; @@ -1509,7 +1509,7 @@ fail: return error; } -usbd_status +static usbd_status urtw_eprom_sendbits(struct urtw_softc *sc, int16_t *buf, int buflen) { int i = 0; @@ -1527,7 +1527,7 @@ fail: return error; } -usbd_status +static usbd_status urtw_eprom_writebit(struct urtw_softc *sc, int16_t bit) { uint8_t data; @@ -1543,7 +1543,7 @@ fail: return error; } -usbd_status +static usbd_status urtw_eprom_ck(struct urtw_softc *sc) { uint8_t data; @@ -1561,7 +1561,7 @@ fail: return error; } -usbd_status +static usbd_status urtw_eprom_cs(struct urtw_softc *sc, int able) { uint8_t data; @@ -1577,7 +1577,7 @@ fail: return error; } -usbd_status +static usbd_status urtw_read8_c(struct urtw_softc *sc, int val, uint8_t *data, uint8_t idx) { usb_device_request_t req; @@ -1593,7 +1593,7 @@ urtw_read8_c(struct urtw_softc *sc, int val, uint8_t *data, uint8_t idx) return error; } -usbd_status +static usbd_status urtw_read8e(struct urtw_softc *sc, int val, uint8_t *data) { usb_device_request_t req; @@ -1609,7 +1609,7 @@ urtw_read8e(struct urtw_softc *sc, int val, uint8_t *data) return error; } -usbd_status +static usbd_status urtw_read16_c(struct urtw_softc *sc, int val, uint16_t *data, uint8_t idx) { usb_device_request_t req; @@ -1625,7 +1625,7 @@ urtw_read16_c(struct urtw_softc *sc, int val, uint16_t *data, uint8_t idx) return error; } -usbd_status +static usbd_status urtw_read32_c(struct urtw_softc *sc, int val, uint32_t *data, uint8_t idx) { usb_device_request_t req; @@ -1641,7 +1641,7 @@ urtw_read32_c(struct urtw_softc *sc, int val, uint32_t *data, uint8_t idx) return error; } -usbd_status +static usbd_status urtw_write8_c(struct urtw_softc *sc, int val, uint8_t data, uint8_t idx) { usb_device_request_t req; @@ -1655,7 +1655,7 @@ urtw_write8_c(struct urtw_softc *sc, int val, uint8_t data, uint8_t idx) return usbd_do_request(sc->sc_udev, &req, &data); } -usbd_status +static usbd_status urtw_write8e(struct urtw_softc *sc, int val, uint8_t data) { usb_device_request_t req; @@ -1669,7 +1669,7 @@ urtw_write8e(struct urtw_softc *sc, int val, uint8_t data) return usbd_do_request(sc->sc_udev, &req, &data); } -usbd_status +static usbd_status urtw_write16_c(struct urtw_softc *sc, int val, uint16_t data, uint8_t idx) { usb_device_request_t req; @@ -1683,7 +1683,7 @@ urtw_write16_c(struct urtw_softc *sc, int val, uint16_t data, uint8_t idx) return usbd_do_request(sc->sc_udev, &req, &data); } -usbd_status +static usbd_status urtw_write32_c(struct urtw_softc *sc, int val, uint32_t data, uint8_t idx) { usb_device_request_t req; @@ -1711,7 +1711,7 @@ fail: return error; } -usbd_status +static usbd_status urtw_8180_set_anaparam(struct urtw_softc *sc, uint32_t val) { uint8_t data; @@ -1734,7 +1734,7 @@ fail: return error; } -usbd_status +static usbd_status urtw_8185_set_anaparam2(struct urtw_softc *sc, uint32_t val) { uint8_t data; @@ -1757,7 +1757,7 @@ fail: return error; } -usbd_status +static usbd_status urtw_intr_disable(struct urtw_softc *sc) { usbd_status error; @@ -1768,7 +1768,7 @@ fail: return error; } -usbd_status +static usbd_status urtw_reset(struct urtw_softc *sc) { uint8_t data; @@ -1823,7 +1823,7 @@ fail: return error; } -usbd_status +static usbd_status urtw_led_on(struct urtw_softc *sc, int type) { usbd_status error; @@ -1876,7 +1876,7 @@ fail: return error; } -usbd_status +static usbd_status urtw_led_mode0(struct urtw_softc *sc, int mode) { switch (mode) { @@ -1925,25 +1925,25 @@ urtw_led_mode0(struct urtw_softc *sc, int mode) return 0; } -usbd_status +static usbd_status urtw_led_mode1(struct urtw_softc *sc, int mode) { return USBD_INVAL; } -usbd_status +static usbd_status urtw_led_mode2(struct urtw_softc *sc, int mode) { return USBD_INVAL; } -usbd_status +static usbd_status urtw_led_mode3(struct urtw_softc *sc, int mode) { return USBD_INVAL; } -void +static void urtw_ledusbtask(void *arg) { struct urtw_softc *sc = arg; @@ -1954,7 +1954,7 @@ urtw_ledusbtask(void *arg) urtw_led_blink(sc); } -void +static void urtw_ledtask(void *arg) { struct urtw_softc *sc = arg; @@ -1966,7 +1966,7 @@ urtw_ledtask(void *arg) usb_add_task(sc->sc_udev, &sc->sc_ledtask, USB_TASKQ_DRIVER); } -usbd_status +static usbd_status urtw_led_ctl(struct urtw_softc *sc, int mode) { usbd_status error = 0; @@ -1992,7 +1992,7 @@ urtw_led_ctl(struct urtw_softc *sc, int mode) return error; } -usbd_status +static usbd_status urtw_led_blink(struct urtw_softc *sc) { uint8_t ing = 0; @@ -2038,7 +2038,7 @@ urtw_led_blink(struct urtw_softc *sc) return 0; } -usbd_status +static usbd_status urtw_update_msr(struct urtw_softc *sc) { struct ieee80211com *ic = &sc->sc_ic; @@ -2071,7 +2071,7 @@ fail: return error; } -uint16_t +static uint16_t urtw_rate2rtl(int rate) { unsigned int i; @@ -2084,7 +2084,7 @@ urtw_rate2rtl(int rate) return 3; } -uint16_t +static uint16_t urtw_rtl2rate(int rate) { unsigned int i; @@ -2097,7 +2097,7 @@ urtw_rtl2rate(int rate) return 0; } -usbd_status +static usbd_status urtw_set_rate(struct urtw_softc *sc) { int i, basic_rate, min_rr_rate, max_rr_rate; @@ -2123,7 +2123,7 @@ fail: return error; } -usbd_status +static usbd_status urtw_intr_enable(struct urtw_softc *sc) { usbd_status error; @@ -2133,7 +2133,7 @@ fail: return error; } -usbd_status +static usbd_status urtw_rx_setconf(struct urtw_softc *sc) { struct ifnet *ifp = sc->sc_ic.ic_ifp; @@ -2174,7 +2174,7 @@ fail: return error; } -usbd_status +static usbd_status urtw_rx_enable(struct urtw_softc *sc) { int i; @@ -2208,7 +2208,7 @@ fail: return error; } -usbd_status +static usbd_status urtw_tx_enable(struct urtw_softc *sc) { uint8_t data8; @@ -2251,7 +2251,7 @@ fail: return error; } -int +static int urtw_init(struct ifnet *ifp) { struct urtw_softc *sc = ifp->if_softc; @@ -2368,7 +2368,7 @@ fail: return error; } -int +static int urtw_ioctl(struct ifnet *ifp, u_long cmd, void *data) { #define IS_RUNNING(ifp) \ @@ -2425,7 +2425,7 @@ urtw_ioctl(struct ifnet *ifp, u_long cmd, void *data) #undef IS_RUNNING } -void +static void urtw_start(struct ifnet *ifp) { struct urtw_softc *sc = ifp->if_softc; @@ -2498,7 +2498,7 @@ urtw_start(struct ifnet *ifp) } } -void +static void urtw_watchdog(struct ifnet *ifp) { struct urtw_softc *sc = ifp->if_softc; @@ -2517,7 +2517,7 @@ urtw_watchdog(struct ifnet *ifp) ieee80211_watchdog(&sc->sc_ic); } -void +static void urtw_txeof_low(struct usbd_xfer *xfer, void *priv, usbd_status status) { @@ -2556,7 +2556,7 @@ urtw_txeof_low(struct usbd_xfer *xfer, void *priv, splx(s); } -void +static void urtw_txeof_normal(struct usbd_xfer *xfer, void *priv, usbd_status status) { @@ -2595,7 +2595,7 @@ urtw_txeof_normal(struct usbd_xfer *xfer, void *priv, splx(s); } -int +static int urtw_tx_start(struct urtw_softc *sc, struct ieee80211_node *ni, struct mbuf *m0, int prior) { @@ -2706,7 +2706,7 @@ urtw_tx_start(struct urtw_softc *sc, struct ieee80211_node *ni, struct mbuf *m0, return 0; } -usbd_status +static usbd_status urtw_8225_usb_init(struct urtw_softc *sc) { uint8_t data; @@ -2733,7 +2733,7 @@ fail: return error; } -usbd_status +static usbd_status urtw_8185_rf_pins_enable(struct urtw_softc *sc) { usbd_status error = 0; @@ -2743,7 +2743,7 @@ fail: return error; } -usbd_status +static usbd_status urtw_8187_write_phy(struct urtw_softc *sc, uint8_t addr, uint32_t data) { uint32_t phyw; @@ -2762,21 +2762,21 @@ fail: return error; } -usbd_status +static usbd_status urtw_8187_write_phy_ofdm_c(struct urtw_softc *sc, uint8_t addr, uint32_t data) { data = data & 0xff; return urtw_8187_write_phy(sc, addr, data); } -usbd_status +static usbd_status urtw_8187_write_phy_cck_c(struct urtw_softc *sc, uint8_t addr, uint32_t data) { data = data & 0xff; return urtw_8187_write_phy(sc, addr, data | 0x10000); } -usbd_status +static usbd_status urtw_8225_setgain(struct urtw_softc *sc, int16_t gain) { usbd_status error; @@ -2789,7 +2789,7 @@ fail: return error; } -usbd_status +static usbd_status urtw_8225_set_txpwrlvl(struct urtw_softc *sc, int chan) { int i, idx, set; @@ -2842,7 +2842,7 @@ fail: return error; } -usbd_status +static usbd_status urtw_8185_tx_antenna(struct urtw_softc *sc, uint8_t ant) { usbd_status error; @@ -2853,7 +2853,7 @@ fail: return error; } -usbd_status +static usbd_status urtw_8225_rf_init(struct urtw_rf *rf) { struct urtw_softc *sc = rf->rf_sc; @@ -2950,7 +2950,7 @@ fail: return error; } -usbd_status +static usbd_status urtw_8225_rf_set_chan(struct urtw_rf *rf, int chan) { struct urtw_softc *sc = rf->rf_sc; @@ -2986,7 +2986,7 @@ fail: return error; } -usbd_status +static usbd_status urtw_8225_rf_set_sens(struct urtw_rf *rf) { struct urtw_softc *sc = rf->rf_sc; @@ -3011,7 +3011,7 @@ fail: return error; } -void +static void urtw_stop(struct ifnet *ifp, int disable) { struct urtw_softc *sc = ifp->if_softc; @@ -3045,7 +3045,7 @@ fail: return; } -int +static int urtw_isbmode(uint16_t rate) { rate = urtw_rtl2rate(rate); @@ -3054,7 +3054,7 @@ urtw_isbmode(uint16_t rate) rate == 44) ? 1 : 0; } -void +static void urtw_rxeof(struct usbd_xfer *xfer, void *priv, usbd_status status) { struct urtw_rx_data *data = priv; @@ -3181,7 +3181,7 @@ skip: /* setup a new transfer */ (void)usbd_transfer(xfer); } -usbd_status +static usbd_status urtw_8225v2_setgain(struct urtw_softc *sc, int16_t gain) { uint8_t *gainp; @@ -3201,7 +3201,7 @@ fail: return error; } -usbd_status +static usbd_status urtw_8225v2_set_txpwrlvl(struct urtw_softc *sc, int chan) { int i; @@ -3248,7 +3248,7 @@ fail: return error; } -usbd_status +static usbd_status urtw_8225v2_rf_init(struct urtw_rf *rf) { struct urtw_softc *sc = rf->rf_sc; @@ -3366,7 +3366,7 @@ fail: return error; } -usbd_status +static usbd_status urtw_8225v2_rf_set_chan(struct urtw_rf *rf, int chan) { struct urtw_softc *sc = rf->rf_sc; @@ -3403,7 +3403,7 @@ fail: return error; } -void +static void urtw_set_chan(struct urtw_softc *sc, struct ieee80211_channel *c) { struct urtw_rf *rf = &sc->sc_rf; @@ -3435,7 +3435,7 @@ fail: return; } -void +static void urtw_next_scan(void *arg) { struct urtw_softc *sc = arg; @@ -3451,7 +3451,7 @@ urtw_next_scan(void *arg) splx(s); } -void +static void urtw_task(void *arg) { struct urtw_softc *sc = arg; @@ -3515,7 +3515,7 @@ fail: } } -usbd_status +static usbd_status urtw_8187b_update_wmm(struct urtw_softc *sc) { struct ieee80211com *ic = &sc->sc_ic; @@ -3547,7 +3547,7 @@ fail: return error; } -usbd_status +static usbd_status urtw_8187b_reset(struct urtw_softc *sc) { uint8_t data; @@ -3592,7 +3592,7 @@ fail: return error; } -int +static int urtw_8187b_init(struct ifnet *ifp) { struct urtw_softc *sc = ifp->if_softc; @@ -3731,7 +3731,7 @@ fail: return error; } -usbd_status +static usbd_status urtw_8225v2_b_config_mac(struct urtw_softc *sc) { int i; @@ -3755,7 +3755,7 @@ fail: return error; } -usbd_status +static usbd_status urtw_8225v2_b_init_rfe(struct urtw_softc *sc) { usbd_status error; @@ -3769,7 +3769,7 @@ fail: return error; } -usbd_status +static usbd_status urtw_8225v2_b_update_chan(struct urtw_softc *sc) { struct ieee80211com *ic = &sc->sc_ic; @@ -3805,7 +3805,7 @@ fail: return error; } -usbd_status +static usbd_status urtw_8225v2_b_rf_init(struct urtw_rf *rf) { struct urtw_softc *sc = rf->rf_sc; @@ -3901,7 +3901,7 @@ fail: return error; } -usbd_status +static usbd_status urtw_8225v2_b_rf_set_chan(struct urtw_rf *rf, int chan) { struct urtw_softc *sc = rf->rf_sc; @@ -3926,7 +3926,7 @@ fail: return error; } -usbd_status +static usbd_status urtw_8225v2_b_set_txpwrlvl(struct urtw_softc *sc, int chan) { int i; @@ -4029,7 +4029,7 @@ fail: return error; } -int +static int urtw_set_bssid(struct urtw_softc *sc, const uint8_t *bssid) { int error; @@ -4045,7 +4045,7 @@ fail: return error; } -int +static int urtw_set_macaddr(struct urtw_softc *sc, const uint8_t *addr) { int error; diff --git a/sys/dev/usb/if_zyd.c b/sys/dev/usb/if_zyd.c index 15fcc050a92..ca5b2e51ce1 100644 --- a/sys/dev/usb/if_zyd.c +++ b/sys/dev/usb/if_zyd.c @@ -1,5 +1,5 @@ /* $OpenBSD: if_zyd.c,v 1.52 2007/02/11 00:08:04 jsg Exp $ */ -/* $NetBSD: if_zyd.c,v 1.52 2019/05/05 03:17:54 mrg Exp $ */ +/* $NetBSD: if_zyd.c,v 1.53 2019/11/28 17:09:10 maxv Exp $ */ /*- * Copyright (c) 2006 by Damien Bergamini <damien.bergamini@free.fr> @@ -23,7 +23,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_zyd.c,v 1.52 2019/05/05 03:17:54 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_zyd.c,v 1.53 2019/11/28 17:09:10 maxv Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -156,10 +156,10 @@ static const struct zyd_type { #define zyd_lookup(v, p) \ ((const struct zyd_type *)usb_lookup(zyd_devs, v, p)) -int zyd_match(device_t, cfdata_t, void *); -void zyd_attach(device_t, device_t, void *); -int zyd_detach(device_t, int); -int zyd_activate(device_t, enum devact); +static int zyd_match(device_t, cfdata_t, void *); +static void zyd_attach(device_t, device_t, void *); +static int zyd_detach(device_t, int); +static int zyd_activate(device_t, enum devact); CFATTACH_DECL_NEW(zyd, sizeof(struct zyd_softc), zyd_match, @@ -239,7 +239,7 @@ Static void zyd_iter_func(void *, struct ieee80211_node *); Static void zyd_amrr_timeout(void *); Static void zyd_newassoc(struct ieee80211_node *, int); -int +static int zyd_match(device_t parent, cfdata_t match, void *aux) { struct usb_attach_arg *uaa = aux; @@ -297,7 +297,7 @@ zyd_attachhook(device_t self) return; } -void +static void zyd_attach(device_t parent, device_t self, void *aux) { struct zyd_softc *sc = device_private(self); @@ -452,7 +452,7 @@ zyd_complete_attach(struct zyd_softc *sc) fail: return error; } -int +static int zyd_detach(device_t self, int flags) { struct zyd_softc *sc = device_private(self); @@ -2650,7 +2650,7 @@ zyd_newassoc(struct ieee80211_node *ni, int isnew) ni->ni_txrate = i; } -int +static int zyd_activate(device_t self, enum devact act) { struct zyd_softc *sc = device_private(self); |
