Lines Matching +full:0 +full:x4301

224 	{ 0x4301, 0x4301, 0x4301 },
225 { 0x4305, 0x4307, 0x4307 },
226 { 0x4402, 0x4403, 0x4402 },
227 { 0x4610, 0x4615, 0x4610 },
228 { 0x4710, 0x4715, 0x4710 },
229 { 0x4720, 0x4725, 0x4309 }
236 { 0x4301, 5 },
237 { 0x4306, 6 },
238 { 0x4307, 5 },
239 { 0x4310, 8 },
240 { 0x4401, 3 },
241 { 0x4402, 3 },
242 { 0x4610, 9 },
243 { 0x4704, 9 },
244 { 0x4710, 9 },
245 { 0x5365, 7 }
272 #define PCI_VENDOR_COMPAQ 0x0e11
273 #define PCI_VENDOR_LINKSYS 0x1737
292 [0] = { 400, 100 },
371 TASK_INIT(&sc->sc_restart_task, 0, bwi_restart, sc); in bwi_attach()
372 callout_init_mtx(&sc->sc_calib_ch, &sc->sc_mtx, 0); in bwi_attach()
418 for (i = 0; i < sc->sc_nmac; ++i) { in bwi_attach()
439 mac = &sc->sc_mac[0]; in bwi_attach()
452 callout_init_mtx(&sc->sc_watchdog_timer, &sc->sc_mtx, 0); in bwi_attach()
530 "fw_version", CTLFLAG_RD, &sc->sc_fw_version, 0, in bwi_attach()
534 "led_idle", CTLFLAG_RW, &sc->sc_led_idle, 0, in bwi_attach()
538 "led_blink", CTLFLAG_RW, &sc->sc_led_blink, 0, in bwi_attach()
542 "txpwr_calib", CTLFLAG_RW, &sc->sc_txpwr_calib, 0, in bwi_attach()
547 "debug", CTLFLAG_RW, &sc->sc_debug, 0, "Debug flags"); in bwi_attach()
552 return (0); in bwi_attach()
570 for (i = 0; i < sc->sc_nmac; ++i) in bwi_detach()
578 return (0); in bwi_detach()
601 #if 0 in bwi_vap_create()
633 if (sc->sc_ic.ic_nrunning > 0) in bwi_resume()
641 return 0; in bwi_shutdown()
701 return 0; in bwi_power_off()
728 return 0; in bwi_regwin_switch()
738 for (i = 0; i < RETRY_MAX; ++i) { in bwi_regwin_select()
741 return 0; in bwi_regwin_select()
758 DPRINTF(sc, BWI_DBG_ATTACH, "regwin: type 0x%03x, rev %d, " in bwi_regwin_info()
759 "vendor 0x%04x\n", *type, *rev, in bwi_regwin_info()
772 * Get 0th regwin information in bwi_bbp_attach()
773 * NOTE: 0th regwin should exist in bwi_bbp_attach()
775 error = bwi_regwin_select(sc, 0); in bwi_bbp_attach()
777 device_printf(sc->sc_dev, "can't select regwin 0\n"); in bwi_bbp_attach()
785 bbp_id = 0; in bwi_bbp_attach()
786 info = 0; in bwi_bbp_attach()
791 BWI_CREATE_REGWIN(&sc->sc_com_regwin, 0, rw_type, rw_rev); in bwi_bbp_attach()
795 for (i = 0; i < nitems(bwi_bbpid_map); ++i) { in bwi_bbp_attach()
802 if (bbp_id == 0) { in bwi_bbp_attach()
804 "0x%04x\n", sc->sc_pci_did); in bwi_bbp_attach()
809 __SHIFTIN(0, BWI_INFO_BBPPKG_MASK); in bwi_bbp_attach()
815 nregwin = 0; in bwi_bbp_attach()
819 for (i = 0; i < nitems(bwi_regwin_count); ++i) { in bwi_bbp_attach()
825 if (nregwin == 0) { in bwi_bbp_attach()
827 "BBP id 0x%04x\n", bbp_id); in bwi_bbp_attach()
836 device_printf(sc->sc_dev, "BBP: id 0x%04x, rev 0x%x, pkg %d\n", in bwi_bbp_attach()
839 DPRINTF(sc, BWI_DBG_ATTACH, "nregwin %d, cap 0x%08x\n", in bwi_bbp_attach()
847 i = BWI_REGWIN_EXIST(&sc->sc_com_regwin) ? 1 : 0; in bwi_bbp_attach()
883 if (!BWI_REGWIN_EXIST(&sc->sc_mac[0].mac_regwin)) { in bwi_bbp_attach()
887 KASSERT(sc->sc_nmac > 0, ("no mac's")); in bwi_bbp_attach()
896 error = bwi_regwin_switch(sc, &sc->sc_mac[0].mac_regwin, NULL); in bwi_bbp_attach()
900 return 0; in bwi_bbp_attach()
978 CSR_WRITE_4(sc, BWI_BUS_DATA, 0); in bwi_bus_init()
1004 #define PCI_VENDOR_APPLE 0x106b in bwi_get_card_flags()
1005 #define PCI_VENDOR_DELL 0x1028 in bwi_get_card_flags()
1007 if (sc->sc_card_flags == 0xffff) in bwi_get_card_flags()
1008 sc->sc_card_flags = 0; in bwi_get_card_flags()
1012 sc->sc_pci_revid == 0x74) in bwi_get_card_flags()
1016 sc->sc_pci_subdid == 0x4e && /* XXX */ in bwi_get_card_flags()
1017 sc->sc_pci_revid > 0x40) in bwi_get_card_flags()
1020 DPRINTF(sc, BWI_DBG_ATTACH, "card flags 0x%04x\n", sc->sc_card_flags); in bwi_get_card_flags()
1030 for (i = 0; i < 3; ++i) { in bwi_get_eaddr()
1055 div = 0; in bwi_get_clock_freq()
1085 KASSERT(src >= 0 && src < BWI_CLKSRC_MAX, ("bad src %d", src)); in bwi_get_clock_freq()
1086 KASSERT(div != 0, ("div zero")); in bwi_get_clock_freq()
1104 int error, pwr_off = 0; in bwi_set_clock_mode()
1108 return 0; in bwi_set_clock_mode()
1111 return 0; in bwi_set_clock_mode()
1117 if ((sc->sc_cap & BWI_CAP_CLKMODE) == 0) in bwi_set_clock_mode()
1118 return 0; in bwi_set_clock_mode()
1125 bwi_power_on(sc, 0); /* Don't turn on PLL */ in bwi_set_clock_mode()
1151 bwi_power_off(sc, 0); /* Leave PLL as it is */ in bwi_set_clock_mode()
1164 return 0; in bwi_set_clock_delay()
1171 if (sc->sc_bbp_rev == 0) in bwi_set_clock_delay()
1179 CSR_FILT_SETBITS_4(sc, BWI_CLOCK_INFO, 0xffff, 0x40000); in bwi_set_clock_delay()
1221 mac = &sc->sc_mac[0]; in bwi_init_statechg()
1242 if ((mac->mac_flags & BWI_MAC_F_HAS_TXSTATS) == 0) { in bwi_init_statechg()
1249 for (i = 0; i < NRETRY; ++i) { in bwi_init_statechg()
1251 BWI_TXSTATUS0_VALID) == 0) in bwi_init_statechg()
1288 int startall = 0; in bwi_parent()
1291 if (ic->ic_nrunning > 0) { in bwi_parent()
1300 if (ic->ic_promisc > 0 && (sc->sc_flags & BWI_F_PROMISC) == 0) { in bwi_parent()
1303 } else if (ic->ic_promisc == 0 && in bwi_parent()
1304 (sc->sc_flags & BWI_F_PROMISC) != 0) { in bwi_parent()
1305 promisc = 0; in bwi_parent()
1309 if (promisc >= 0) in bwi_parent()
1312 if (ic->ic_nrunning > 0) { in bwi_parent()
1313 if ((sc->sc_flags & BWI_F_RUNNING) == 0) { in bwi_parent()
1331 if ((sc->sc_flags & BWI_F_RUNNING) == 0) { in bwi_transmit()
1342 return (0); in bwi_transmit()
1356 trans = 0; in bwi_start_locked()
1364 if ((wh->i_fc[1] & IEEE80211_FC1_PROTECTED) != 0 && in bwi_start_locked()
1372 if (bwi_encap(sc, idx, m, ni) != 0) { in bwi_start_locked()
1402 if ((sc->sc_flags & BWI_F_RUNNING) == 0) { in bwi_raw_xmit()
1423 if (error == 0) { in bwi_raw_xmit()
1439 if (sc->sc_tx_timer != 0 && --sc->sc_tx_timer == 0) { in bwi_watchdog()
1459 int i, error, pwr_off = 0; in bwi_stop_locked()
1465 sc->sc_led_blinking = 0; in bwi_stop_locked()
1478 for (i = 0; i < sc->sc_nmac; ++i) { in bwi_stop_locked()
1482 if ((mac->mac_flags & BWI_MAC_F_INITED) == 0) in bwi_stop_locked()
1498 sc->sc_tx_timer = 0; in bwi_stop_locked()
1510 int i, txrx_error, tx = 0, rx_data = -1; in bwi_intr()
1514 if ((sc->sc_flags & BWI_F_RUNNING) == 0 || in bwi_intr()
1523 if (intr_status == 0xffffffff) { /* Not for us */ in bwi_intr()
1528 DPRINTF(sc, BWI_DBG_INTR, "intr status 0x%08x\n", intr_status); in bwi_intr()
1531 if (intr_status == 0) { /* Nothing is interesting */ in bwi_intr()
1540 txrx_error = 0; in bwi_intr()
1542 for (i = 0; i < BWI_TXRX_NRING; ++i) { in bwi_intr()
1553 _DPRINTF(sc, BWI_DBG_INTR, ", %d 0x%08x", in bwi_intr()
1558 "%s: intr fatal TX/RX (%d) error 0x%08x\n", in bwi_intr()
1570 for (i = 0; i < BWI_TXRX_NRING; ++i) in bwi_intr()
1578 * Says for this bit (0x800): in bwi_intr()
1615 if ((CSR_READ_4(sc, BWI_MAC_PS_STATUS) & 0x8) == 0) in bwi_intr()
1618 CSR_WRITE_2(sc, BWI_MAC_PS_STATUS, 0x2); in bwi_intr()
1624 if (txrx_intr_status[0] & BWI_TXRX_INTR_RX) { in bwi_intr()
1648 if (tx && rx_data > 0) { in bwi_intr()
1655 } else if (rx_data > 0) { in bwi_intr()
1657 } else if (rx_data == 0) { in bwi_intr()
1692 mac = &sc->sc_mac[0]; in bwi_getradiocaps()
1695 memset(bands, 0, sizeof(bands)); in bwi_getradiocaps()
1712 ieee80211_add_channels_default_2ghz(chans, maxchans, nchans, bands, 0); in bwi_getradiocaps()
1726 bwi_rf_set_chan(mac, ieee80211_chan2ieee(ic, c), 0); in bwi_set_channel()
1762 if (error != 0) in bwi_newstate()
1810 bus_addr_t lowaddr = 0; in bwi_dma_alloc()
1811 bus_size_t tx_ring_sz, rx_ring_sz, desc_sz = 0; in bwi_dma_alloc()
1812 uint32_t txrx_ctrl_step = 0; in bwi_dma_alloc()
1814 has_txstats = 0; in bwi_dma_alloc()
1815 for (i = 0; i < sc->sc_nmac; ++i) { in bwi_dma_alloc()
1830 txrx_ctrl_step = 0x20; in bwi_dma_alloc()
1850 txrx_ctrl_step = 0x40; in bwi_dma_alloc()
1868 KASSERT(lowaddr != 0, ("lowaddr zero")); in bwi_dma_alloc()
1869 KASSERT(desc_sz != 0, ("desc_sz zero")); in bwi_dma_alloc()
1870 KASSERT(txrx_ctrl_step != 0, ("txrx_ctrl_step zero")); in bwi_dma_alloc()
1879 BWI_ALIGN, 0, /* alignment, bounds */ in bwi_dma_alloc()
1886 0, /* flags */ in bwi_dma_alloc()
1900 BWI_RING_ALIGN, 0, in bwi_dma_alloc()
1907 0, in bwi_dma_alloc()
1915 for (i = 0; i < BWI_TX_NRING; ++i) { in bwi_dma_alloc()
1930 BWI_RING_ALIGN, 0, in bwi_dma_alloc()
1937 0, in bwi_dma_alloc()
1946 rx_ring_sz, TXRX_CTRL(0)); in bwi_dma_alloc()
1972 for (i = 0; i < BWI_TX_NRING; ++i) { in bwi_dma_free()
2030 return 0; in bwi_dma_ring_alloc()
2055 0, in bwi_dma_txstats_alloc()
2062 0, in bwi_dma_txstats_alloc()
2103 0, in bwi_dma_txstats_alloc()
2110 0, in bwi_dma_txstats_alloc()
2140 return 0; in bwi_dma_txstats_alloc()
2186 0, in bwi_dma_mbuf_create()
2201 ntx = 0; in bwi_dma_mbuf_create()
2206 for (i = 0; i < BWI_TX_NRING; ++i) { in bwi_dma_mbuf_create()
2209 for (j = 0; j < BWI_TX_NDESC; ++j) { in bwi_dma_mbuf_create()
2210 error = bus_dmamap_create(sc->sc_buf_dtag, 0, in bwi_dma_mbuf_create()
2217 for (k = 0; k < j; ++k) { in bwi_dma_mbuf_create()
2230 error = bus_dmamap_create(sc->sc_buf_dtag, 0, in bwi_dma_mbuf_create()
2238 for (j = 0; j < BWI_RX_NDESC; ++j) { in bwi_dma_mbuf_create()
2239 error = bus_dmamap_create(sc->sc_buf_dtag, 0, in bwi_dma_mbuf_create()
2245 for (k = 0; k < j; ++k) { in bwi_dma_mbuf_create()
2255 return 0; in bwi_dma_mbuf_create()
2257 bwi_dma_mbuf_destroy(sc, ntx, 0); in bwi_dma_mbuf_create()
2269 for (i = 0; i < ntx; ++i) { in bwi_dma_mbuf_destroy()
2272 for (j = 0; j < BWI_TX_NDESC; ++j) { in bwi_dma_mbuf_destroy()
2290 for (j = 0; j < BWI_RX_NDESC; ++j) { in bwi_dma_mbuf_destroy()
2329 tbd->tbd_idx = 0; in bwi_init_tx_ring32()
2330 tbd->tbd_used = 0; in bwi_init_tx_ring32()
2348 return 0; in bwi_init_tx_ring32()
2380 sc->sc_rx_bdata.rbd_idx = 0; in bwi_init_rx_ring32()
2382 for (i = 0; i < BWI_RX_NDESC; ++i) { in bwi_init_rx_ring32()
2395 return 0; in bwi_init_rx_ring32()
2408 st->stats_idx = 0; in bwi_init_txstats32()
2411 for (i = 0; i < BWI_TXSTATS_NDESC; ++i) { in bwi_init_txstats32()
2413 stats_paddr, sizeof(struct bwi_txstats), 0); in bwi_init_txstats32()
2420 st->stats_ring_paddr, 0, BWI_TXSTATS_NDESC); in bwi_init_txstats32()
2421 return 0; in bwi_init_txstats32()
2432 paddr, buf_len, 0); in bwi_setup_rx_desc32()
2572 for (i = 0; i < (IEEE80211_ADDR_LEN / 2); ++i) { in bwi_set_addr_filter()
2587 int idx, rx_data = 0; in bwi_rxeof()
2604 if (bwi_newbuf(sc, idx, 0)) { in bwi_rxeof()
2612 hdr_extra = 0; in bwi_rxeof()
2692 if (rx_data >= 0) { in bwi_rxeof32()
2703 return 0; in bwi_rxeof64()
2711 CSR_WRITE_4(sc, rx_ctrl + BWI_RX32_CTRL, 0); in bwi_reset_rx_ring32()
2715 for (i = 0; i < NRETRY; ++i) { in bwi_reset_rx_ring32()
2730 CSR_WRITE_4(sc, rx_ctrl + BWI_RX32_RINGINFO, 0); in bwi_reset_rx_ring32()
2748 for (i = 0; i < BWI_RX_NDESC; ++i) { in bwi_free_rx_ring32()
2773 for (i = 0; i < NRETRY; ++i) { in bwi_free_tx_ring32()
2789 CSR_WRITE_4(sc, rd->rdata_txrx_ctrl + BWI_TX32_CTRL, 0); in bwi_free_tx_ring32()
2790 for (i = 0; i < NRETRY; ++i) { in bwi_free_tx_ring32()
2806 CSR_WRITE_4(sc, rd->rdata_txrx_ctrl + BWI_TX32_RINGINFO, 0); in bwi_free_tx_ring32()
2808 for (i = 0; i < BWI_TX_NDESC; ++i) { in bwi_free_tx_ring32()
2842 #define IEEE80211_OFDM_PLCP_RATE_MASK __BITS(3, 0)
2920 #if 0 in bwi_encap()
2930 type = wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK; in bwi_encap()
2949 if (rix > 0) { in bwi_encap()
2956 tb->tb_rate[0] = rate; in bwi_encap()
2964 sc->sc_tx_th.wt_flags = 0; in bwi_encap()
3060 error = 0; in bwi_encap()
3067 #if 0 in bwi_encap()
3069 for (i = 0; i < m->m_pkthdr.len; ++i) { in bwi_encap()
3070 if (i != 0 && i % 8 == 0) in bwi_encap()
3130 if (params->ibp_try1 != 0) { in bwi_encap_raw()
3139 tb->tb_rate[0] = rate; in bwi_encap_raw()
3147 sc->sc_tx_th.wt_flags = 0; in bwi_encap_raw()
3175 if (!ismcast && (params->ibp_flags & IEEE80211_BPF_NOACK) == 0) { in bwi_encap_raw()
3178 dur = ieee80211_ack_duration(sc->sc_rates, rate_fb, 0); in bwi_encap_raw()
3208 if (error != 0) { in bwi_encap_raw()
3305 if (tx_id == 0) { in _bwi_txeof()
3317 KASSERT(tbd->tbd_used > 0, ("tbd_used %d", tbd->tbd_used)); in _bwi_txeof()
3357 if (tbd->tbd_used == 0) in _bwi_txeof()
3358 sc->sc_tx_timer = 0; in _bwi_txeof()
3373 if ((stats->txs_flags & BWI_TXS_F_PENDING) == 0) { in bwi_txeof_status()
3397 if ((tx_status0 & BWI_TXSTATUS0_VALID) == 0) in bwi_txeof()
3440 if ((sc->sc_cap & BWI_CAP_CLKMODE) == 0) in bwi_get_pwron_delay()
3441 return 0; in bwi_get_pwron_delay()
3469 bwi_regwin_enable(sc, bus, 0); in bwi_bus_attach()
3472 CSR_WRITE_4(sc, BWI_INTRVEC, 0); in bwi_bus_attach()
3490 panic("unknown regwin type 0x%04x\n", rw->rw_type); in bwi_regwin_name()
3529 return 0; in bwi_regwin_is_enabled()
3562 for (i = 0; i < NRETRY; ++i) { in bwi_regwin_disable()
3573 for (i = 0; i < NRETRY; ++i) { in bwi_regwin_disable()
3577 if ((state_hi & BWI_STATE_HI_BUSY) == 0) in bwi_regwin_disable()
3629 CSR_WRITE_4(sc, BWI_STATE_HI, 0); in bwi_regwin_enable()
3677 for (i = 0; i < n; ++i) { in bwi_set_bssid()
3680 val = 0; in bwi_set_bssid()
3681 for (j = 0; j < sizeof(val); ++j) in bwi_set_bssid()
3684 TMPLT_WRITE_4(mac, 0x20 + (i * sizeof(val)), val); in bwi_set_bssid()
3787 for (i = 0; i < nitems(bwi_vendor_led_act); ++i) { in bwi_led_attach()
3797 val[0] = __SHIFTOUT(gpio, BWI_SPROM_GPIO_0); in bwi_led_attach()
3804 for (i = 0; i < BWI_LED_MAX; ++i) { in bwi_led_attach()
3807 if (val[i] == 0xff) { in bwi_led_attach()
3836 callout_init_mtx(&sc->sc_led_blink_ch, &sc->sc_mtx, 0); in bwi_led_attach()
3860 sc->sc_led_blinking = 0; in bwi_led_newstate()
3863 if ((sc->sc_flags & BWI_F_RUNNING) == 0) in bwi_led_newstate()
3867 for (i = 0; i < BWI_LED_MAX; ++i) { in bwi_led_newstate()
3885 on = 0; in bwi_led_newstate()
3891 on = 0; in bwi_led_newstate()
3896 on = 0; in bwi_led_newstate()
3900 on = 0; in bwi_led_newstate()
3917 if ((led->l_flags & BWI_LED_F_POLLABLE) == 0) in bwi_led_event()
3935 rate = 0; in bwi_led_event()
3973 val = bwi_led_onoff(sc->sc_blink_led, val, 0); in bwi_led_blink_next()
3984 sc->sc_led_blinking = 0; in bwi_led_blink_end()
3994 bwi_init_statechg(sc, 0); in bwi_restart()
3995 #if 0 in bwi_restart()