Lines Matching +full:0 +full:x1900

103 #define BWI_PHYTBL_WRSSI	0x1000
104 #define BWI_PHYTBL_NOISE_SCALE 0x1400
105 #define BWI_PHYTBL_NOISE 0x1800
106 #define BWI_PHYTBL_ROTOR 0x2000
107 #define BWI_PHYTBL_DELAY 0x2400
108 #define BWI_PHYTBL_RSSI 0x4000
109 #define BWI_PHYTBL_SIGMA_SQ 0x5000
110 #define BWI_PHYTBL_WRSSI_REV1 0x5400
111 #define BWI_PHYTBL_FREQ 0x5800
187 for (i = 0; i < nitems(bwi_sup_bphy); ++i) { in bwi_phy_attach()
219 return 0; in bwi_phy_attach()
226 uint16_t mask = __BITS(3, 0); in bwi_phy_set_bbp_atten()
228 if (phy->phy_version == 0) { in bwi_phy_set_bbp_atten()
251 return 0; in bwi_phy_calibrate()
254 bwi_mac_reset(mac, 0); in bwi_phy_calibrate()
260 return 0; in bwi_phy_calibrate()
268 KASSERT(phy->phy_tbl_ctrl != 0 && phy->phy_tbl_data_lo != 0, in bwi_tbl_write_2()
280 KASSERT(phy->phy_tbl_data_lo != 0 && phy->phy_tbl_data_hi != 0 && in bwi_tbl_write_4()
281 phy->phy_tbl_ctrl != 0, in bwi_tbl_write_4()
287 PHY_WRITE(mac, phy->phy_tbl_data_lo, data & 0xffff); in bwi_tbl_write_4()
327 PHY_WRITE(mac, 0x814, 0); in bwi_phy_init_11g()
328 PHY_WRITE(mac, 0x815, 0); in bwi_phy_init_11g()
331 PHY_WRITE(mac, 0x811, 0); in bwi_phy_init_11g()
332 PHY_WRITE(mac, 0x15, 0xc0); in bwi_phy_init_11g()
334 PHY_WRITE(mac, 0x811, 0x400); in bwi_phy_init_11g()
335 PHY_WRITE(mac, 0x15, 0xc0); in bwi_phy_init_11g()
342 val = PHY_READ(mac, 0x400) & 0xff; in bwi_phy_init_11g()
344 PHY_WRITE(mac, 0x4c2, 0x1816); in bwi_phy_init_11g()
345 PHY_WRITE(mac, 0x4c3, 0x8006); in bwi_phy_init_11g()
347 PHY_FILT_SETBITS(mac, 0x4cc, in bwi_phy_init_11g()
348 0xff, 0x1f00); in bwi_phy_init_11g()
355 PHY_WRITE(mac, 0x47e, 0x78); in bwi_phy_init_11g()
358 PHY_SETBITS(mac, 0x801, 0x80); in bwi_phy_init_11g()
359 PHY_SETBITS(mac, 0x43e, 0x4); in bwi_phy_init_11g()
368 if (tpctl->tp_ctrl2 == 0xffff) { in bwi_phy_init_11g()
372 RF_WRITE(mac, 0x52, in bwi_phy_init_11g()
375 RF_FILT_SETBITS(mac, 0x52, 0xfff0, tpctl->tp_ctrl2); in bwi_phy_init_11g()
379 PHY_FILT_SETBITS(mac, 0x36, 0xfff, in bwi_phy_init_11g()
384 PHY_WRITE(mac, 0x2e, 0x8075); in bwi_phy_init_11g()
386 PHY_WRITE(mac, 0x2e, 0x807f); in bwi_phy_init_11g()
389 PHY_WRITE(mac, 0x2f, 0x101); in bwi_phy_init_11g()
391 PHY_WRITE(mac, 0x2f, 0x202); in bwi_phy_init_11g()
396 PHY_WRITE(mac, 0x80f, 0x8078); in bwi_phy_init_11g()
399 if ((sc->sc_card_flags & BWI_CARD_F_SW_NRSSI) == 0) { in bwi_phy_init_11g()
400 bwi_rf_init_hw_nrssi_table(mac, 0xffff /* XXX */); in bwi_phy_init_11g()
403 if (rf->rf_nrssi[0] == BWI_INVALID_NRSSI) { in bwi_phy_init_11g()
415 PHY_WRITE(mac, 0x805, 0x3230); in bwi_phy_init_11g()
420 PHY_CLRBITS(mac, 0x429, 0x4000); in bwi_phy_init_11g()
421 PHY_CLRBITS(mac, 0x4c3, 0x8000); in bwi_phy_init_11g()
443 PHY_WRITE(mac, 0x20, 0x301c); in bwi_phy_init_11b_rev4()
444 PHY_WRITE(mac, 0x26, 0); in bwi_phy_init_11b_rev4()
445 PHY_WRITE(mac, 0x30, 0xc6); in bwi_phy_init_11b_rev4()
446 PHY_WRITE(mac, 0x88, 0x3e00); in bwi_phy_init_11b_rev4()
448 for (ofs = 0, val = 0x3c3d; ofs < 30; ++ofs, val -= 0x202) in bwi_phy_init_11b_rev4()
449 PHY_WRITE(mac, 0x89 + ofs, val); in bwi_phy_init_11b_rev4()
456 bwi_rf_set_chan(mac, chan, 0); in bwi_phy_init_11b_rev4()
459 RF_WRITE(mac, 0x75, 0x80); in bwi_phy_init_11b_rev4()
460 RF_WRITE(mac, 0x79, 0x81); in bwi_phy_init_11b_rev4()
463 RF_WRITE(mac, 0x50, 0x20); in bwi_phy_init_11b_rev4()
464 RF_WRITE(mac, 0x50, 0x23); in bwi_phy_init_11b_rev4()
467 RF_WRITE(mac, 0x50, 0x20); in bwi_phy_init_11b_rev4()
468 RF_WRITE(mac, 0x5a, 0x70); in bwi_phy_init_11b_rev4()
469 RF_WRITE(mac, 0x5b, 0x7b); in bwi_phy_init_11b_rev4()
470 RF_WRITE(mac, 0x5c, 0xb0); in bwi_phy_init_11b_rev4()
471 RF_WRITE(mac, 0x7a, 0xf); in bwi_phy_init_11b_rev4()
472 PHY_WRITE(mac, 0x38, 0x677); in bwi_phy_init_11b_rev4()
476 PHY_WRITE(mac, 0x14, 0x80); in bwi_phy_init_11b_rev4()
477 PHY_WRITE(mac, 0x32, 0xca); in bwi_phy_init_11b_rev4()
479 PHY_WRITE(mac, 0x32, 0xe0); in bwi_phy_init_11b_rev4()
480 PHY_WRITE(mac, 0x35, 0x7c2); in bwi_phy_init_11b_rev4()
484 PHY_WRITE(mac, 0x26, 0xcc00); in bwi_phy_init_11b_rev4()
486 PHY_WRITE(mac, 0x26, 0xce00); in bwi_phy_init_11b_rev4()
488 CSR_WRITE_2(sc, BWI_RF_CHAN_EX, 0x1100); in bwi_phy_init_11b_rev4()
490 PHY_WRITE(mac, 0x2a, 0x88a3); in bwi_phy_init_11b_rev4()
492 PHY_WRITE(mac, 0x2a, 0x88c2); in bwi_phy_init_11b_rev4()
511 RF_SETBITS(mac, 0x7a, 0x50); in bwi_phy_init_11b_rev5()
517 val = 0x2120; in bwi_phy_init_11b_rev5()
518 for (ofs = 0xa8; ofs < 0xc7; ++ofs) { in bwi_phy_init_11b_rev5()
520 val += 0x202; in bwi_phy_init_11b_rev5()
524 PHY_FILT_SETBITS(mac, 0x35, 0xf0ff, 0x700); in bwi_phy_init_11b_rev5()
527 PHY_WRITE(mac, 0x38, 0x667); in bwi_phy_init_11b_rev5()
531 RF_SETBITS(mac, 0x7a, 0x20); in bwi_phy_init_11b_rev5()
532 RF_SETBITS(mac, 0x51, 0x4); in bwi_phy_init_11b_rev5()
535 CSR_WRITE_2(sc, BWI_RF_ANTDIV, 0); in bwi_phy_init_11b_rev5()
537 PHY_SETBITS(mac, 0x802, 0x100); in bwi_phy_init_11b_rev5()
538 PHY_SETBITS(mac, 0x42b, 0x2000); in bwi_phy_init_11b_rev5()
539 PHY_WRITE(mac, 0x1c, 0x186a); in bwi_phy_init_11b_rev5()
541 PHY_FILT_SETBITS(mac, 0x13, 0xff, 0x1900); in bwi_phy_init_11b_rev5()
542 PHY_FILT_SETBITS(mac, 0x35, 0xffc0, 0x64); in bwi_phy_init_11b_rev5()
543 PHY_FILT_SETBITS(mac, 0x5d, 0xff80, 0xa); in bwi_phy_init_11b_rev5()
549 PHY_WRITE(mac, 0x26, 0xce00); in bwi_phy_init_11b_rev5()
550 PHY_WRITE(mac, 0x21, 0x3763); in bwi_phy_init_11b_rev5()
551 PHY_WRITE(mac, 0x22, 0x1bc3); in bwi_phy_init_11b_rev5()
552 PHY_WRITE(mac, 0x23, 0x6f9); in bwi_phy_init_11b_rev5()
553 PHY_WRITE(mac, 0x24, 0x37e); in bwi_phy_init_11b_rev5()
555 PHY_WRITE(mac, 0x26, 0xcc00); in bwi_phy_init_11b_rev5()
557 PHY_WRITE(mac, 0x30, 0xc6); in bwi_phy_init_11b_rev5()
562 PHY_WRITE(mac, 0x20, 0x3e1c); in bwi_phy_init_11b_rev5()
564 PHY_WRITE(mac, 0x20, 0x301c); in bwi_phy_init_11b_rev5()
566 if (phy->phy_version == 0) in bwi_phy_init_11b_rev5()
571 bwi_rf_set_chan(mac, 7, 0); in bwi_phy_init_11b_rev5()
574 RF_WRITE(mac, 0x75, 0x80); in bwi_phy_init_11b_rev5()
575 RF_WRITE(mac, 0x79, 0x81); in bwi_phy_init_11b_rev5()
578 RF_WRITE(mac, 0x50, 0x20); in bwi_phy_init_11b_rev5()
579 RF_WRITE(mac, 0x50, 0x23); in bwi_phy_init_11b_rev5()
582 RF_WRITE(mac, 0x50, 0x20); in bwi_phy_init_11b_rev5()
583 RF_WRITE(mac, 0x5a, 0x70); in bwi_phy_init_11b_rev5()
586 RF_WRITE(mac, 0x5b, 0x7b); in bwi_phy_init_11b_rev5()
587 RF_WRITE(mac, 0x5c, 0xb0); in bwi_phy_init_11b_rev5()
588 RF_SETBITS(mac, 0x7a, 0x7); in bwi_phy_init_11b_rev5()
590 bwi_rf_set_chan(mac, orig_chan, 0); in bwi_phy_init_11b_rev5()
592 PHY_WRITE(mac, 0x14, 0x80); in bwi_phy_init_11b_rev5()
593 PHY_WRITE(mac, 0x32, 0xca); in bwi_phy_init_11b_rev5()
594 PHY_WRITE(mac, 0x2a, 0x88a3); in bwi_phy_init_11b_rev5()
599 RF_WRITE(mac, 0x5d, 0xd); in bwi_phy_init_11b_rev5()
601 CSR_FILT_SETBITS_2(sc, BWI_PHY_MAGIC_REG1, 0xffc0, 0x4); in bwi_phy_init_11b_rev5()
613 PHY_WRITE(mac, 0x3e, 0x817a); in bwi_phy_init_11b_rev6()
614 RF_SETBITS(mac, 0x7a, 0x58); in bwi_phy_init_11b_rev6()
617 RF_WRITE(mac, 0x51, 0x37); in bwi_phy_init_11b_rev6()
618 RF_WRITE(mac, 0x52, 0x70); in bwi_phy_init_11b_rev6()
619 RF_WRITE(mac, 0x53, 0xb3); in bwi_phy_init_11b_rev6()
620 RF_WRITE(mac, 0x54, 0x9b); in bwi_phy_init_11b_rev6()
621 RF_WRITE(mac, 0x5a, 0x88); in bwi_phy_init_11b_rev6()
622 RF_WRITE(mac, 0x5b, 0x88); in bwi_phy_init_11b_rev6()
623 RF_WRITE(mac, 0x5d, 0x88); in bwi_phy_init_11b_rev6()
624 RF_WRITE(mac, 0x5e, 0x88); in bwi_phy_init_11b_rev6()
625 RF_WRITE(mac, 0x7d, 0x88); in bwi_phy_init_11b_rev6()
628 RF_WRITE(mac, 0x51, 0); in bwi_phy_init_11b_rev6()
629 RF_WRITE(mac, 0x52, 0x40); in bwi_phy_init_11b_rev6()
630 RF_WRITE(mac, 0x53, 0xb7); in bwi_phy_init_11b_rev6()
631 RF_WRITE(mac, 0x54, 0x98); in bwi_phy_init_11b_rev6()
632 RF_WRITE(mac, 0x5a, 0x88); in bwi_phy_init_11b_rev6()
633 RF_WRITE(mac, 0x5b, 0x6b); in bwi_phy_init_11b_rev6()
634 RF_WRITE(mac, 0x5c, 0xf); in bwi_phy_init_11b_rev6()
636 RF_WRITE(mac, 0x5d, 0xfa); in bwi_phy_init_11b_rev6()
637 RF_WRITE(mac, 0x5e, 0xd8); in bwi_phy_init_11b_rev6()
639 RF_WRITE(mac, 0x5d, 0xf5); in bwi_phy_init_11b_rev6()
640 RF_WRITE(mac, 0x5e, 0xb8); in bwi_phy_init_11b_rev6()
642 RF_WRITE(mac, 0x73, 0x3); in bwi_phy_init_11b_rev6()
643 RF_WRITE(mac, 0x7d, 0xa8); in bwi_phy_init_11b_rev6()
644 RF_WRITE(mac, 0x7c, 0x1); in bwi_phy_init_11b_rev6()
645 RF_WRITE(mac, 0x7e, 0x8); in bwi_phy_init_11b_rev6()
648 val = 0x1e1f; in bwi_phy_init_11b_rev6()
649 for (ofs = 0x88; ofs < 0x98; ++ofs) { in bwi_phy_init_11b_rev6()
651 val -= 0x202; in bwi_phy_init_11b_rev6()
654 val = 0x3e3f; in bwi_phy_init_11b_rev6()
655 for (ofs = 0x98; ofs < 0xa8; ++ofs) { in bwi_phy_init_11b_rev6()
657 val -= 0x202; in bwi_phy_init_11b_rev6()
660 val = 0x2120; in bwi_phy_init_11b_rev6()
661 for (ofs = 0xa8; ofs < 0xc8; ++ofs) { in bwi_phy_init_11b_rev6()
662 PHY_WRITE(mac, ofs, (val & 0x3f3f)); in bwi_phy_init_11b_rev6()
663 val += 0x202; in bwi_phy_init_11b_rev6()
670 RF_SETBITS(mac, 0x7a, 0x20); in bwi_phy_init_11b_rev6()
671 RF_SETBITS(mac, 0x51, 0x4); in bwi_phy_init_11b_rev6()
672 PHY_SETBITS(mac, 0x802, 0x100); in bwi_phy_init_11b_rev6()
673 PHY_SETBITS(mac, 0x42b, 0x2000); in bwi_phy_init_11b_rev6()
674 PHY_WRITE(mac, 0x5b, 0); in bwi_phy_init_11b_rev6()
675 PHY_WRITE(mac, 0x5c, 0); in bwi_phy_init_11b_rev6()
681 bwi_rf_set_chan(mac, 1, 0); in bwi_phy_init_11b_rev6()
683 bwi_rf_set_chan(mac, 13, 0); in bwi_phy_init_11b_rev6()
685 RF_WRITE(mac, 0x50, 0x20); in bwi_phy_init_11b_rev6()
686 RF_WRITE(mac, 0x50, 0x23); in bwi_phy_init_11b_rev6()
691 RF_SETBITS(mac, 0x7c, 0x2); in bwi_phy_init_11b_rev6()
692 RF_WRITE(mac, 0x50, 0x20); in bwi_phy_init_11b_rev6()
695 RF_WRITE(mac, 0x7c, 0x20); in bwi_phy_init_11b_rev6()
696 RF_WRITE(mac, 0x5a, 0x70); in bwi_phy_init_11b_rev6()
697 RF_WRITE(mac, 0x5b, 0x7b); in bwi_phy_init_11b_rev6()
698 RF_WRITE(mac, 0x5c, 0xb0); in bwi_phy_init_11b_rev6()
701 RF_FILT_SETBITS(mac, 0x7a, 0xf8, 0x7); in bwi_phy_init_11b_rev6()
703 bwi_rf_set_chan(mac, orig_chan, 0); in bwi_phy_init_11b_rev6()
705 PHY_WRITE(mac, 0x14, 0x200); in bwi_phy_init_11b_rev6()
707 PHY_WRITE(mac, 0x2a, 0x88c2); in bwi_phy_init_11b_rev6()
709 PHY_WRITE(mac, 0x2a, 0x8ac0); in bwi_phy_init_11b_rev6()
710 PHY_WRITE(mac, 0x38, 0x668); in bwi_phy_init_11b_rev6()
715 PHY_FILT_SETBITS(mac, 0x5d, 0xff80, 0x3); in bwi_phy_init_11b_rev6()
717 RF_WRITE(mac, 0x5d, 0xd); in bwi_phy_init_11b_rev6()
722 PHY_CLRBITS(mac, 0x61, 0xf000); in bwi_phy_init_11b_rev6()
724 PHY_FILT_SETBITS(mac, 0x2, 0xffc0, 0x4); in bwi_phy_init_11b_rev6()
729 PHY_WRITE(mac, 0x16, 0x410); in bwi_phy_init_11b_rev6()
730 PHY_WRITE(mac, 0x17, 0x820); in bwi_phy_init_11b_rev6()
731 PHY_WRITE(mac, 0x62, 0x7); in bwi_phy_init_11b_rev6()
741 CSR_WRITE_2(sc, BWI_BBP_ATTEN, 0); in bwi_phy_init_11b_rev6()
755 PHY_WRITE(mac, 0x406, 0x4f19); in bwi_phy_config_11g()
756 PHY_FILT_SETBITS(mac, 0x429, 0xfc3f, 0x340); in bwi_phy_config_11g()
757 PHY_WRITE(mac, 0x42c, 0x5a); in bwi_phy_config_11g()
758 PHY_WRITE(mac, 0x427, 0x1a); in bwi_phy_config_11g()
761 for (i = 0; i < nitems(bwi_phy_freq_11g_rev1); ++i) { in bwi_phy_config_11g()
767 for (i = 0; i < nitems(bwi_phy_noise_11g_rev1); ++i) { in bwi_phy_config_11g()
773 for (i = 0; i < nitems(bwi_phy_rotor_11g_rev1); ++i) { in bwi_phy_config_11g()
779 bwi_nrssi_write(mac, 0xba98, (int16_t)0x7654); /* XXX */ in bwi_phy_config_11g()
782 PHY_WRITE(mac, 0x4c0, 0x1861); in bwi_phy_config_11g()
783 PHY_WRITE(mac, 0x4c1, 0x271); in bwi_phy_config_11g()
785 PHY_WRITE(mac, 0x4c0, 0x98); in bwi_phy_config_11g()
786 PHY_WRITE(mac, 0x4c1, 0x70); in bwi_phy_config_11g()
787 PHY_WRITE(mac, 0x4c9, 0x80); in bwi_phy_config_11g()
789 PHY_SETBITS(mac, 0x42b, 0x800); in bwi_phy_config_11g()
792 for (i = 0; i < 64; ++i) in bwi_phy_config_11g()
796 for (i = 0; i < nitems(bwi_phy_noise_11g); ++i) { in bwi_phy_config_11g()
808 } else if (phy->phy_rev >= 7 && (PHY_READ(mac, 0x449) & 0x200)) { in bwi_phy_config_11g()
815 for (i = 0; i < n; ++i) in bwi_phy_config_11g()
829 n = 0; in bwi_phy_config_11g()
831 for (i = 0; i < n; ++i) in bwi_phy_config_11g()
836 for (i = 0; i < nitems(bwi_phy_delay_11g_rev1); ++i) { in bwi_phy_config_11g()
843 bwi_tbl_write_2(mac, BWI_PHYTBL_WRSSI_REV1 + i, 0x20); in bwi_phy_config_11g()
847 wrd_ofs1 = 0x5001; in bwi_phy_config_11g()
848 wrd_ofs2 = 0x5002; in bwi_phy_config_11g()
851 for (i = 0; i < 0x20; ++i) in bwi_phy_config_11g()
852 bwi_tbl_write_2(mac, BWI_PHYTBL_WRSSI + i, 0x820); in bwi_phy_config_11g()
856 PHY_READ(mac, 0x400); /* Dummy read */ in bwi_phy_config_11g()
857 PHY_WRITE(mac, 0x403, 0x1000); in bwi_phy_config_11g()
858 bwi_tbl_write_2(mac, 0x3c02, 0xf); in bwi_phy_config_11g()
859 bwi_tbl_write_2(mac, 0x3c03, 0x14); in bwi_phy_config_11g()
861 wrd_ofs1 = 0x401; in bwi_phy_config_11g()
862 wrd_ofs2 = 0x402; in bwi_phy_config_11g()
865 if (!(BWI_IS_BRCM_BU4306(sc) && sc->sc_pci_revid == 0x17)) { in bwi_phy_config_11g()
866 bwi_tbl_write_2(mac, wrd_ofs1, 0x2); in bwi_phy_config_11g()
867 bwi_tbl_write_2(mac, wrd_ofs2, 0x1); in bwi_phy_config_11g()
872 PHY_WRITE(mac, 0x46e, 0x3cf); in bwi_phy_config_11g()
884 ofs = phy->phy_rev == 1 ? 0x4c00 : 0; in bwi_phy_config_agc()
886 bwi_tbl_write_2(mac, ofs, 0xfe); in bwi_phy_config_agc()
887 bwi_tbl_write_2(mac, ofs + 1, 0xd); in bwi_phy_config_agc()
888 bwi_tbl_write_2(mac, ofs + 2, 0x13); in bwi_phy_config_agc()
889 bwi_tbl_write_2(mac, ofs + 3, 0x19); in bwi_phy_config_agc()
892 bwi_tbl_write_2(mac, 0x1800, 0x2710); in bwi_phy_config_agc()
893 bwi_tbl_write_2(mac, 0x1801, 0x9b83); in bwi_phy_config_agc()
894 bwi_tbl_write_2(mac, 0x1802, 0x9b83); in bwi_phy_config_agc()
895 bwi_tbl_write_2(mac, 0x1803, 0xf8d); in bwi_phy_config_agc()
896 PHY_WRITE(mac, 0x455, 0x4); in bwi_phy_config_agc()
899 PHY_FILT_SETBITS(mac, 0x4a5, 0xff, 0x5700); in bwi_phy_config_agc()
900 PHY_FILT_SETBITS(mac, 0x41a, 0xff80, 0xf); in bwi_phy_config_agc()
901 PHY_FILT_SETBITS(mac, 0x41a, 0xc07f, 0x2b80); in bwi_phy_config_agc()
902 PHY_FILT_SETBITS(mac, 0x48c, 0xf0ff, 0x300); in bwi_phy_config_agc()
904 RF_SETBITS(mac, 0x7a, 0x8); in bwi_phy_config_agc()
906 PHY_FILT_SETBITS(mac, 0x4a0, 0xfff0, 0x8); in bwi_phy_config_agc()
907 PHY_FILT_SETBITS(mac, 0x4a1, 0xf0ff, 0x600); in bwi_phy_config_agc()
908 PHY_FILT_SETBITS(mac, 0x4a2, 0xf0ff, 0x700); in bwi_phy_config_agc()
909 PHY_FILT_SETBITS(mac, 0x4a0, 0xf0ff, 0x100); in bwi_phy_config_agc()
912 PHY_FILT_SETBITS(mac, 0x4a2, 0xfff0, 0x7); in bwi_phy_config_agc()
914 PHY_FILT_SETBITS(mac, 0x488, 0xff00, 0x1c); in bwi_phy_config_agc()
915 PHY_FILT_SETBITS(mac, 0x488, 0xc0ff, 0x200); in bwi_phy_config_agc()
916 PHY_FILT_SETBITS(mac, 0x496, 0xff00, 0x1c); in bwi_phy_config_agc()
917 PHY_FILT_SETBITS(mac, 0x489, 0xff00, 0x20); in bwi_phy_config_agc()
918 PHY_FILT_SETBITS(mac, 0x489, 0xc0ff, 0x200); in bwi_phy_config_agc()
919 PHY_FILT_SETBITS(mac, 0x482, 0xff00, 0x2e); in bwi_phy_config_agc()
920 PHY_FILT_SETBITS(mac, 0x496, 0xff, 0x1a00); in bwi_phy_config_agc()
921 PHY_FILT_SETBITS(mac, 0x481, 0xff00, 0x28); in bwi_phy_config_agc()
922 PHY_FILT_SETBITS(mac, 0x481, 0xff, 0x2c00); in bwi_phy_config_agc()
925 PHY_WRITE(mac, 0x430, 0x92b); in bwi_phy_config_agc()
926 PHY_FILT_SETBITS(mac, 0x41b, 0xffe1, 0x2); in bwi_phy_config_agc()
928 PHY_CLRBITS(mac, 0x41b, 0x1e); in bwi_phy_config_agc()
929 PHY_WRITE(mac, 0x41f, 0x287a); in bwi_phy_config_agc()
930 PHY_FILT_SETBITS(mac, 0x420, 0xfff0, 0x4); in bwi_phy_config_agc()
933 PHY_WRITE(mac, 0x422, 0x287a); in bwi_phy_config_agc()
934 PHY_FILT_SETBITS(mac, 0x420, 0xfff, 0x3000); in bwi_phy_config_agc()
938 PHY_FILT_SETBITS(mac, 0x4a8, 0x8080, 0x7874); in bwi_phy_config_agc()
939 PHY_WRITE(mac, 0x48e, 0x1c00); in bwi_phy_config_agc()
942 PHY_FILT_SETBITS(mac, 0x4ab, 0xf0ff, 0x600); in bwi_phy_config_agc()
943 PHY_WRITE(mac, 0x48b, 0x5e); in bwi_phy_config_agc()
944 PHY_FILT_SETBITS(mac, 0x48c, 0xff00, 0x1e); in bwi_phy_config_agc()
945 PHY_WRITE(mac, 0x48d, 0x2); in bwi_phy_config_agc()
948 bwi_tbl_write_2(mac, ofs + 0x800, 0); in bwi_phy_config_agc()
949 bwi_tbl_write_2(mac, ofs + 0x801, 7); in bwi_phy_config_agc()
950 bwi_tbl_write_2(mac, ofs + 0x802, 16); in bwi_phy_config_agc()
951 bwi_tbl_write_2(mac, ofs + 0x803, 28); in bwi_phy_config_agc()
954 PHY_CLRBITS(mac, 0x426, 0x3); in bwi_phy_config_agc()
955 PHY_CLRBITS(mac, 0x426, 0x1000); in bwi_phy_config_agc()
967 tbl_gain_ofs1 = 0x5000; in bwi_set_gains()
970 tbl_gain_ofs1 = 0x400; in bwi_set_gains()
974 for (i = 0; i < 4; ++i) { in bwi_set_gains()
979 tbl_gain = (i & 0x1) << 1; in bwi_set_gains()
980 tbl_gain |= (i & 0x2) >> 1; in bwi_set_gains()
985 for (i = 0; i < 16; ++i) { in bwi_set_gains()
1002 phy_gain1 = 0x4040; in bwi_set_gains()
1003 phy_gain2 = 0x4000; in bwi_set_gains()
1005 PHY_FILT_SETBITS(mac, 0x4a0, 0xbfbf, phy_gain1); in bwi_set_gains()
1006 PHY_FILT_SETBITS(mac, 0x4a1, 0xbfbf, phy_gain1); in bwi_set_gains()
1007 PHY_FILT_SETBITS(mac, 0x4a2, 0xbfbf, phy_gain2); in bwi_set_gains()