Lines Matching refs:bwi_softc
149 static void bwi_sysctlattach(struct bwi_softc *);
196 static int bwi_mac_attach(struct bwi_softc *, int, uint8_t);
284 static uint16_t bwi_read_sprom(struct bwi_softc *, uint16_t);
285 static void bwi_setup_desc32(struct bwi_softc *, struct bwi_desc32 *, int,
287 static void bwi_power_on(struct bwi_softc *, int);
288 static int bwi_power_off(struct bwi_softc *, int);
289 static int bwi_regwin_switch(struct bwi_softc *, struct bwi_regwin *,
291 static int bwi_regwin_select(struct bwi_softc *, int);
292 static void bwi_regwin_info(struct bwi_softc *, uint16_t *, uint8_t *);
293 static void bwi_led_attach(struct bwi_softc *);
294 static void bwi_led_newstate(struct bwi_softc *, enum ieee80211_state);
296 static void bwi_led_event(struct bwi_softc *, int);
297 static void bwi_led_blink_start(struct bwi_softc *, int, int);
300 static int bwi_bbp_attach(struct bwi_softc *);
301 static int bwi_bus_init(struct bwi_softc *, struct bwi_mac *);
302 static void bwi_get_card_flags(struct bwi_softc *);
303 static void bwi_get_eaddr(struct bwi_softc *, uint16_t, uint8_t *);
304 static void bwi_get_clock_freq(struct bwi_softc *,
306 static int bwi_set_clock_mode(struct bwi_softc *, enum bwi_clock_mode);
307 static int bwi_set_clock_delay(struct bwi_softc *);
309 static void bwi_init_statechg(struct bwi_softc *, int);
314 static void bwi_newstate_begin(struct bwi_softc *, enum ieee80211_state);
326 static int bwi_pio_alloc(struct bwi_softc *);
327 static void bwi_pio_free(struct bwi_softc *);
328 static int bwi_dma_alloc(struct bwi_softc *);
329 static void bwi_dma_free(struct bwi_softc *);
330 static void bwi_ring_data_free(struct bwi_ring_data *, struct bwi_softc *);
331 static int bwi_dma_ring_alloc(struct bwi_softc *,
333 static int bwi_dma_txstats_alloc(struct bwi_softc *, uint32_t,
335 static void bwi_dma_txstats_free(struct bwi_softc *);
336 static int bwi_dma_mbuf_create(struct bwi_softc *);
337 static void bwi_dma_mbuf_destroy(struct bwi_softc *, int, int);
338 static void bwi_enable_intrs(struct bwi_softc *, uint32_t);
339 static void bwi_disable_intrs(struct bwi_softc *, uint32_t);
340 static int bwi_init_tx_ring_pio(struct bwi_softc *, int);
341 static int bwi_init_rx_ring_pio(struct bwi_softc *);
342 static int bwi_init_txstats_pio(struct bwi_softc *);
343 static void bwi_setup_rx_desc_pio(struct bwi_softc *, int, bus_addr_t,
345 static void bwi_setup_tx_desc_pio(struct bwi_softc *,
347 static int bwi_init_tx_ring32(struct bwi_softc *, int);
348 static void bwi_init_rxdesc_ring32(struct bwi_softc *, uint32_t,
350 static int bwi_init_rx_ring32(struct bwi_softc *);
351 static int bwi_init_txstats32(struct bwi_softc *);
352 static void bwi_setup_rx_desc32(struct bwi_softc *, int, bus_addr_t, int);
353 static void bwi_setup_tx_desc32(struct bwi_softc *, struct bwi_ring_data *,
355 static int bwi_init_tx_ring64(struct bwi_softc *, int);
356 static int bwi_init_rx_ring64(struct bwi_softc *);
357 static int bwi_init_txstats64(struct bwi_softc *);
358 static void bwi_setup_rx_desc64(struct bwi_softc *, int, bus_addr_t, int);
359 static void bwi_setup_tx_desc64(struct bwi_softc *, struct bwi_ring_data *,
361 static int bwi_newbuf(struct bwi_softc *, int, int);
362 static void bwi_set_addr_filter(struct bwi_softc *, uint16_t,
364 static int bwi_set_chan(struct bwi_softc *, struct ieee80211_channel *);
366 static int bwi_rxeof(struct bwi_softc *, int);
367 static int bwi_rxeof_pio(struct bwi_softc *);
368 static int bwi_rxeof32(struct bwi_softc *);
369 static int bwi_rxeof64(struct bwi_softc *);
370 static void bwi_free_txstats_pio(struct bwi_softc *);
371 static void bwi_free_rx_ring_pio(struct bwi_softc *);
372 static void bwi_free_tx_ring_pio(struct bwi_softc *, int);
373 static void bwi_reset_rx_ring32(struct bwi_softc *, uint32_t);
374 static void bwi_free_txstats32(struct bwi_softc *);
375 static void bwi_free_rx_ring32(struct bwi_softc *);
376 static void bwi_free_tx_ring32(struct bwi_softc *, int);
377 static void bwi_free_txstats64(struct bwi_softc *);
378 static void bwi_free_rx_ring64(struct bwi_softc *);
379 bwi_softc *, int);
390 static int bwi_encap(struct bwi_softc *, int, struct mbuf *,
392 static void bwi_start_tx_pio(struct bwi_softc *, uint32_t, int);
393 static void bwi_start_tx32(struct bwi_softc *, uint32_t, int);
394 static void bwi_start_tx64(struct bwi_softc *, uint32_t, int);
395 static void bwi_txeof_status_pio(struct bwi_softc *);
396 static void bwi_txeof_status32(struct bwi_softc *);
397 static void bwi_txeof_status64(struct bwi_softc *);
398 static void _bwi_txeof(struct bwi_softc *, uint16_t, uint8_t);
399 static void bwi_txeof_status(struct bwi_softc *, int);
400 static void bwi_txeof(struct bwi_softc *);
401 static int bwi_bbp_power_on(struct bwi_softc *, enum bwi_clock_mode);
402 static void bwi_bbp_power_off(struct bwi_softc *);
403 static int bwi_get_pwron_delay(struct bwi_softc *sc);
404 static int bwi_bus_attach(struct bwi_softc *);
407 static int bwi_regwin_is_enabled(struct bwi_softc *, struct bwi_regwin *);
408 static uint32_t bwi_regwin_disable_bits(struct bwi_softc *);
409 static void bwi_regwin_enable(struct bwi_softc *, struct bwi_regwin *,
411 static void bwi_regwin_disable(struct bwi_softc *, struct bwi_regwin *,
413 static void bwi_set_bssid(struct bwi_softc *, const uint8_t *);
416 static void bwi_do_calibrate(struct bwi_softc *);
418 static int bwi_calc_rssi(struct bwi_softc *,
656 bwi_sysctlattach(struct bwi_softc *sc)
719 struct bwi_softc *sc = arg;
863 struct bwi_softc *sc = arg;
883 bwi_attach(struct bwi_softc *sc)
1122 bwi_detach(struct bwi_softc *sc)
1164 struct bwi_softc *sc = mac->mac_sc;
1207 struct bwi_softc *sc = mac->mac_sc;
1224 struct bwi_softc *sc = mac->mac_sc;
1250 struct bwi_softc *sc = mac->mac_sc;
1268 struct bwi_softc *sc = mac->mac_sc;
1336 struct bwi_softc *sc = mac->mac_sc;
1507 struct bwi_softc *sc = mac->mac_sc;
1592 struct bwi_softc *sc = mac->mac_sc;
1641 struct bwi_softc *sc = mac->mac_sc;
1748 struct bwi_softc *sc = mac->mac_sc;
1807 struct bwi_softc *sc = mac->mac_sc;
1881 struct bwi_softc *sc = mac->mac_sc;
1960 struct bwi_softc *sc = mac->mac_sc;
2072 struct bwi_softc *sc = mac->mac_sc;
2155 struct bwi_softc *sc = mac->mac_sc;
2190 struct bwi_softc *sc = mac->mac_sc;
2207 struct bwi_softc *sc = mac->mac_sc;
2292 struct bwi_softc *sc = mac->mac_sc;
2313 struct bwi_softc *sc = mac->mac_sc;
2382 struct bwi_softc *sc = mac->mac_sc;
2411 struct bwi_softc *sc = mac->mac_sc;
2508 struct bwi_softc *sc = mac->mac_sc;
2523 struct bwi_softc *sc = mac->mac_sc;
2553 struct bwi_softc *sc = mac->mac_sc;
2594 struct bwi_softc *sc = mac->mac_sc;
2621 struct bwi_softc *sc = mac->mac_sc;
2695 bwi_mac_attach(struct bwi_softc *sc, int id, uint8_t rev)
2814 struct bwi_softc *sc = mac->mac_sc;
2870 struct bwi_softc *sc = mac->mac_sc;
2985 struct bwi_softc *sc = mac->mac_sc;
3007 struct bwi_softc *sc = mac->mac_sc;
3027 struct bwi_softc *sc = mac->mac_sc;
3043 struct bwi_softc *sc = mac->mac_sc;
3053 struct bwi_softc *sc = mac->mac_sc;
3063 struct bwi_softc *sc = mac->mac_sc;
3222 struct bwi_softc *sc = mac->mac_sc;
3335 struct bwi_softc *sc;
3346 struct bwi_softc *sc = mac->mac_sc;
3415 struct bwi_softc *sc = mac->mac_sc;
3516 struct bwi_softc *sc = mac->mac_sc;
3653 struct bwi_softc *sc = mac->mac_sc;
3965 struct bwi_softc *sc = mac->mac_sc;
3975 struct bwi_softc *sc = mac->mac_sc;
3993 struct bwi_softc *sc = mac->mac_sc;
4108 struct bwi_softc *sc = mac->mac_sc;
4332 struct bwi_softc *sc = mac->mac_sc;
4442 struct bwi_softc *sc = mac->mac_sc;
4532 struct bwi_softc *sc = mac->mac_sc;
4848 struct bwi_softc *sc = mac->mac_sc;
5032 struct bwi_softc *sc = mac->mac_sc;
5421 struct bwi_softc *sc = mac->mac_sc;
5691 struct bwi_softc *sc = mac->mac_sc;
6063 struct bwi_softc *sc = mac->mac_sc;
6341 struct bwi_softc *sc = mac->mac_sc;
6462 bwi_read_sprom(struct bwi_softc *sc, uint16_t ofs)
6468 bwi_setup_desc32(struct bwi_softc *sc, struct bwi_desc32 *desc_array,
6496 bwi_power_on(struct bwi_softc *sc, int with_pll)
6541 bwi_power_off(struct bwi_softc *sc, int with_pll)
6569 bwi_regwin_switch(struct bwi_softc *sc, struct bwi_regwin *rw,
6597 bwi_regwin_select(struct bwi_softc *sc, int id)
6615 bwi_regwin_info(struct bwi_softc *sc, uint16_t *type, uint8_t *rev)
6629 bwi_led_attach(struct bwi_softc
6701 bwi_led_newstate(struct bwi_softc *sc, enum ieee80211_state nstate)
6762 bwi_led_event(struct bwi_softc *sc, int event)
6797 bwi_led_blink_start(struct bwi_softc *sc, int on_dur, int off_dur)
6820 struct bwi_softc *sc = xsc;
6834 struct bwi_softc *sc = xsc;
6840 bwi_bbp_attach(struct bwi_softc *sc)
6983 bwi_bus_init(struct bwi_softc *sc, struct bwi_mac *mac)
7088 bwi_get_card_flags(struct bwi_softc *sc)
7103 bwi_get_eaddr(struct bwi_softc *sc, uint16_t eaddr_ofs, uint8_t *eaddr)
7114 bwi_get_clock_freq(struct bwi_softc *sc, struct bwi_clock_freq *freq)
7178 bwi_set_clock_mode(struct bwi_softc *sc, enum bwi_clock_mode clk_mode)
7235 bwi_set_clock_delay(struct bwi_softc *sc)
7275 struct bwi_softc *sc = ifp->if_softc;
7283 bwi_init_statechg(struct bwi_softc *sc, int statechg)
7378 struct bwi_softc *sc = ifp->if_softc;
7474 struct bwi_softc *sc = ifp->if_softc;
7625 struct bwi_softc *sc = ifp->if_softc;
7650 struct bwi_softc *sc = ifp->if_softc;
7705 bwi_newstate_begin(struct bwi_softc *sc, enum ieee80211_state nstate)
7719 struct bwi_softc *sc = ic->ic_ifp->if_softc;
7789 struct bwi_softc *sc = ic->ic_ifp->if_softc;
7808 bwi_tx_fifo_pkt_valid(struct bwi_softc *sc, u_int len)
7814 bwi_tx_fifo_avail(struct bwi_softc *sc, u_int len)
7820 bwi_tx_frame_data_pio(struct bwi_softc *sc, u_int idx, uint32_t *ctl,
7845 bwi_tx_frame_pio(struct bwi_softc *sc, struct bwi_txbuf *tb)
7866 bwi_tx_pending(struct bwi_softc *sc)
7907 struct bwi_softc *sc = ic->ic_ifp->if_softc;
7935 struct bwi_softc *sc = ifp->if_softc;
7967 struct bwi_softc *sc = arg;
7976 struct bwi_softc *sc = arg;
7996 struct bwi_softc *sc = ic->ic_ifp->if_softc;
8023 bwi_pio_alloc(struct bwi_softc *sc)
8072 bwi_pio_free(struct bwi_softc *sc)
8081 bwi_dma_alloc(struct bwi_softc *sc)
8202 bwi_dma_free(struct bwi_softc *sc)
8217 bwi_ring_data_free(struct bwi_ring_data *rd, struct bwi_softc *sc)
8226 bwi_dma_ring_alloc(struct bwi_softc *sc,
8261 bwi_dma_txstats_alloc(struct bwi_softc *sc, uint32_t ctrl_base,
8357 bwi_dma_txstats_free(struct bwi_softc *sc)
8375 bwi_dma_mbuf_create(struct bwi_softc *sc)
8442 bwi_dma_mbuf_destroy(struct bwi_softc *sc, int ntx, int nrx)
8481 bwi_enable_intrs(struct bwi_softc *sc, uint32_t enable_intrs)
8488 bwi_disable_intrs(struct bwi_softc *sc, uint32_t disable_intrs)
8495 bwi_init_tx_ring_pio(struct bwi_softc *sc, int ring_idx)
8501 bwi_init_rx_ring_pio(struct bwi_softc *sc)
8523 bwi_init_txstats_pio(struct bwi_softc *sc)
8529 bwi_setup_rx_desc_pio(struct bwi_softc *sc, int buf_idx, bus_addr_t paddr,
8535 bwi_setup_tx_desc_pio(struct bwi_softc *sc, struct bwi_ring_data *rd,
8541 bwi_init_tx_ring32(struct bwi_softc *sc, int ring_idx)
8574 bwi_init_rxdesc_ring32(struct bwi_softc *sc, uint32_t ctrl_base,
8597 bwi_init_rx_ring32(struct bwi_softc *sc)
8621 bwi_init_txstats32(struct bwi_softc *sc)
8649 bwi_setup_rx_desc32(struct bwi_softc *sc, int buf_idx, bus_addr_t paddr,
8660 bwi_setup_tx_desc32(struct bwi_softc *sc, struct bwi_ring_data *rd,
8668 bwi_init_tx_ring64(struct bwi_softc *sc, int ring_idx)
8675 bwi_init_rx_ring64(struct bwi_softc *sc)
8682 bwi_init_txstats64(struct bwi_softc *sc)
8689 bwi_setup_rx_desc64(struct bwi_softc *sc, int buf_idx, bus_addr_t paddr,
8696 bwi_setup_tx_desc64(struct bwi_softc *sc, struct bwi_ring_data *rd,
8703 bwi_newbuf(struct bwi_softc *sc, int buf_idx, int init)
8788 bwi_set_addr_filter(struct bwi_softc *sc, uint16_t addr_ofs,
8806 bwi_set_chan(struct bwi_softc *sc, struct ieee80211_channel *c)
8830 struct bwi_softc *sc = xsc;
8843 bwi_rxeof(struct bwi_softc *sc, int end_idx)
8956 bwi_rx_frame_data_pio(struct bwi_softc *sc, struct bwi_rxbuf_hdr *hdr, int qid)
9061 bwi_rx_frame_pio(struct bwi_softc *sc)
9124 bwi_rxeof_pio(struct bwi_softc *sc)
9136 bwi_rxeof32(struct bwi_softc *sc)
9156 bwi_rxeof64(struct bwi_softc *sc)
9163 bwi_reset_rx_ring32(struct bwi_softc *sc, uint32_t rx_ctrl)
9188 bwi_free_txstats_pio(struct bwi_softc *sc)
9193 bwi_free_txstats32(struct bwi_softc *sc)
9199 bwi_free_rx_ring_pio(struct bwi_softc *sc)
9204 bwi_free_tx_ring_pio(struct bwi_softc *sc, int ring_idx)
9210 bwi_free_rx_ring32(struct bwi_softc *sc)
9230 bwi_free_tx_ring32(struct bwi_softc *sc, int ring_idx)
9292 bwi_free_txstats64(struct bwi_softc *sc)
9298 bwi_free_rx_ring64(struct bwi_softc *sc)
9304 bwi_free_tx_ring64(struct bwi_softc *sc, int ring_idx)
9612 bwi_encap(struct bwi_softc *sc, int idx, struct mbuf *m,
9863 bwi_start_tx_pio(struct bwi_softc *sc, uint32_t tx_ctrl, int idx)
9874 bwi_start_tx32(struct bwi_softc *sc, uint32_t tx_ctrl, int idx)
9882 bwi_start_tx64(struct bwi_softc *sc, uint32_t tx_ctrl, int idx)
9888 bwi_txeof_status_pio(struct bwi_softc *sc)
9894 bwi_txeof_status32(struct bwi_softc *sc)
9920 bwi_txeof_status64(struct bwi_softc *sc)
9926 _bwi_txeof(struct bwi_softc *sc, uint16_t tx_id, uint8_t retry_cnt)
9982 bwi_txeof_status(struct bwi_softc *sc, int end_idx)
10004 bwi_txeof(struct bwi_softc *sc)
10038 bwi_bbp_power_on(struct bwi_softc *sc, enum bwi_clock_mode clk_mode)
10046 bwi_bbp_power_off(struct bwi_softc *sc)
10053 bwi_get_pwron_delay(struct bwi_softc *sc)
10080 bwi_bus_attach(struct bwi_softc *sc)
10119 bwi_regwin_disable_bits(struct bwi_softc *sc)
10137 bwi_regwin_is_enabled(struct bwi_softc *sc, struct bwi_regwin *rw)
10158 bwi_regwin_disable(struct bwi_softc *sc, struct bwi_regwin *rw, uint32_t flags)
10234 bwi_regwin_enable(struct bwi_softc *sc, struct bwi_regwin *rw, uint32_t flags)
10282 bwi_set_bssid(struct bwi_softc *sc, const uint8_t *bssid)
10315 struct bwi_softc *sc = ifp->if_softc;
10333 struct bwi_softc *sc = ifp->if_softc;
10348 bwi_do_calibrate(struct bwi_softc *sc)
10368 struct bwi_softc *sc = xsc;
10397 bwi_calc_rssi(struct bwi_softc *sc, const struct bwi_rxbuf_hdr *hdr)
10410 struct bwi_softc *sc = device_private(dv);
10422 struct bwi_softc *sc = device_private(dv);