Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/bwi/bwirf.c
Context not available. | |||||
bwi_rf_lo_update_11g(struct bwi_mac *mac) | bwi_rf_lo_update_11g(struct bwi_mac *mac) | ||||
{ | { | ||||
struct bwi_softc *sc = mac->mac_sc; | struct bwi_softc *sc = mac->mac_sc; | ||||
struct ifnet *ifp = sc->sc_ifp; | |||||
struct bwi_rf *rf = &mac->mac_rf; | struct bwi_rf *rf = &mac->mac_rf; | ||||
struct bwi_phy *phy = &mac->mac_phy; | struct bwi_phy *phy = &mac->mac_phy; | ||||
struct bwi_tpctl *tpctl = &mac->mac_tpctl; | struct bwi_tpctl *tpctl = &mac->mac_tpctl; | ||||
Context not available. | |||||
PHY_WRITE(mac, 0x812, 0xb2); | PHY_WRITE(mac, 0x812, 0xb2); | ||||
} | } | ||||
if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) | if ((sc->sc_flags & BWI_F_RUNNING) == 0) | ||||
tpctl->tp_ctrl2 = bwi_rf_get_tp_ctrl2(mac); | tpctl->tp_ctrl2 = bwi_rf_get_tp_ctrl2(mac); | ||||
PHY_WRITE(mac, 0x80f, 0x8078); | PHY_WRITE(mac, 0x80f, 0x8078); | ||||
Context not available. | |||||
PHY_WRITE(mac, 0x15, devi_ctrl | 0xefa0); | PHY_WRITE(mac, 0x15, devi_ctrl | 0xefa0); | ||||
} | } | ||||
if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) | if ((sc->sc_flags & BWI_F_RUNNING) == 0) | ||||
tpctl = NULL; | tpctl = NULL; | ||||
bwi_rf_lo_adjust(mac, tpctl); | bwi_rf_lo_adjust(mac, tpctl); | ||||
Context not available. | |||||
static const int rf_lo_measure_order[RF_ATTEN_LISTSZ] = | static const int rf_lo_measure_order[RF_ATTEN_LISTSZ] = | ||||
{ 3, 1, 5, 7, 9, 2, 0, 4, 6, 8, 10, 11, 12, 13 }; | { 3, 1, 5, 7, 9, 2, 0, 4, 6, 8, 10, 11, 12, 13 }; | ||||
struct ifnet *ifp = mac->mac_sc->sc_ifp; | struct bwi_softc *sc = mac->mac_sc; | ||||
struct bwi_rf_lo lo_save, *lo; | struct bwi_rf_lo lo_save, *lo; | ||||
uint8_t devi_ctrl = 0; | uint8_t devi_ctrl = 0; | ||||
int idx, adj_rf7a = 0; | int idx, adj_rf7a = 0; | ||||
Context not available. | |||||
for (bbp_atten = 0; bbp_atten < BBP_ATTEN_MAX; ++bbp_atten) { | for (bbp_atten = 0; bbp_atten < BBP_ATTEN_MAX; ++bbp_atten) { | ||||
uint16_t tp_ctrl2, rf7a; | uint16_t tp_ctrl2, rf7a; | ||||
if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) { | if ((sc->sc_flags & BWI_F_RUNNING) == 0) { | ||||
if (idx == 0) { | if (idx == 0) { | ||||
bzero(&lo_save, sizeof(lo_save)); | bzero(&lo_save, sizeof(lo_save)); | ||||
} else if (init_rf_atten < 0) { | } else if (init_rf_atten < 0) { | ||||
Context not available. |