• Home
  • Raw
  • Download

Lines Matching refs:sh

132 	wlapi_bmac_ucode_wake_override_phyreg_set(pi->sh->physhim);  in wlc_phyreg_enter()
138 wlapi_bmac_ucode_wake_override_phyreg_clear(pi->sh->physhim); in wlc_phyreg_exit()
144 wlapi_bmac_mctrl(pi->sh->physhim, MCTL_LOCK_RADIO, MCTL_LOCK_RADIO); in wlc_radioreg_enter()
155 wlapi_bmac_mctrl(pi->sh->physhim, MCTL_LOCK_RADIO, 0); in wlc_radioreg_exit()
185 if ((D11REV_GE(pi->sh->corerev, 24)) || in read_radio_reg()
186 (D11REV_IS(pi->sh->corerev, 22) in read_radio_reg()
201 if ((D11REV_GE(pi->sh->corerev, 24)) || in write_radio_reg()
202 (D11REV_IS(pi->sh->corerev, 22) in write_radio_reg()
223 if (D11REV_GE(pi->sh->corerev, 24)) { in read_radio_id()
367 struct shared_phy *sh; in wlc_phy_shared_attach() local
369 sh = kzalloc(sizeof(struct shared_phy), GFP_ATOMIC); in wlc_phy_shared_attach()
370 if (sh == NULL) in wlc_phy_shared_attach()
373 sh->physhim = shp->physhim; in wlc_phy_shared_attach()
374 sh->unit = shp->unit; in wlc_phy_shared_attach()
375 sh->corerev = shp->corerev; in wlc_phy_shared_attach()
377 sh->vid = shp->vid; in wlc_phy_shared_attach()
378 sh->did = shp->did; in wlc_phy_shared_attach()
379 sh->chip = shp->chip; in wlc_phy_shared_attach()
380 sh->chiprev = shp->chiprev; in wlc_phy_shared_attach()
381 sh->chippkg = shp->chippkg; in wlc_phy_shared_attach()
382 sh->sromrev = shp->sromrev; in wlc_phy_shared_attach()
383 sh->boardtype = shp->boardtype; in wlc_phy_shared_attach()
384 sh->boardrev = shp->boardrev; in wlc_phy_shared_attach()
385 sh->boardflags = shp->boardflags; in wlc_phy_shared_attach()
386 sh->boardflags2 = shp->boardflags2; in wlc_phy_shared_attach()
388 sh->fast_timer = PHY_SW_TIMER_FAST; in wlc_phy_shared_attach()
389 sh->slow_timer = PHY_SW_TIMER_SLOW; in wlc_phy_shared_attach()
390 sh->glacial_timer = PHY_SW_TIMER_GLACIAL; in wlc_phy_shared_attach()
392 sh->rssi_mode = RSSI_ANT_MERGE_MAX; in wlc_phy_shared_attach()
394 return sh; in wlc_phy_shared_attach()
402 if (!pi->sh->up) { in wlc_phy_timercb_phycal()
429 wlc_phy_attach(struct shared_phy *sh, struct bcma_device *d11core, in wlc_phy_attach() argument
438 if (D11REV_IS(sh->corerev, 4)) in wlc_phy_attach()
448 pi = sh->phy_head; in wlc_phy_attach()
450 wlapi_bmac_corereset(pi->sh->physhim, pi->pubpi.coreflags); in wlc_phy_attach()
460 pi->sh = sh; in wlc_phy_attach()
473 wlapi_bmac_corereset(pi->sh->physhim, pi->pubpi.coreflags); in wlc_phy_attach()
531 pi->sh->phyrxchain = 0x3; in wlc_phy_attach()
559 pi->phycal_timer = wlapi_init_timer(pi->sh->physhim, in wlc_phy_attach()
575 pi->next = pi->sh->phy_head; in wlc_phy_attach()
576 sh->phy_head = pi; in wlc_phy_attach()
600 if (pi->sh->phy_head == pi) in wlc_phy_detach()
601 pi->sh->phy_head = pi->next; in wlc_phy_detach()
602 else if (pi->sh->phy_head->next == pi) in wlc_phy_detach()
603 pi->sh->phy_head->next = NULL; in wlc_phy_detach()
729 if (!pi || !pi->sh) in wlc_phy_hw_clk_state_upd()
732 pi->sh->clk = newstate; in wlc_phy_hw_clk_state_upd()
739 if (!pi || !pi->sh) in wlc_phy_hw_state_upd()
742 pi->sh->up = newstate; in wlc_phy_hw_state_upd()
777 wlapi_bmac_bw_set(pi->sh->physhim, in wlc_phy_init()
788 if (D11REV_IS(pi->sh->corerev, 11) || D11REV_IS(pi->sh->corerev, 12)) in wlc_phy_init()
794 wlc_phy_ant_rxdiv_set((struct brcms_phy_pub *) pi, pi->sh->rx_antdiv); in wlc_phy_init()
841 if (pi->sh->chip == BCMA_CHIP_ID_BCM43224 && in wlc_phy_table_addr()
842 pi->sh->chiprev == 1) { in wlc_phy_table_addr()
851 if ((pi->sh->chip == BCMA_CHIP_ID_BCM43224) && in wlc_phy_table_data_write()
852 (pi->sh->chiprev == 1) && in wlc_phy_table_data_write()
885 if ((pi->sh->chip == BCMA_CHIP_ID_BCM43224) && in wlc_phy_write_table()
886 (pi->sh->chiprev == 1) && in wlc_phy_write_table()
922 if ((pi->sh->chip == BCMA_CHIP_ID_BCM43224) && in wlc_phy_read_table()
923 (pi->sh->chiprev == 1)) { in wlc_phy_read_table()
1009 wlapi_bmac_write_template_ram(pi->sh->physhim, 0, DUMMY_PKT_LEN, in wlc_phy_do_dummy_tx()
1014 if (D11REV_GE(pi->sh->corerev, 11)) in wlc_phy_do_dummy_tx()
1093 pi->nphy_perical_last = pi->sh->now - pi->sh->glacial_timer; in wlc_phy_mute_upd()
1104 wlapi_bmac_write_shm(pi->sh->physhim, M_B_TSSI_0, NULL_TSSI_W); in wlc_phy_clear_tssi()
1105 wlapi_bmac_write_shm(pi->sh->physhim, M_B_TSSI_1, NULL_TSSI_W); in wlc_phy_clear_tssi()
1106 wlapi_bmac_write_shm(pi->sh->physhim, M_G_TSSI_0, NULL_TSSI_W); in wlc_phy_clear_tssi()
1107 wlapi_bmac_write_shm(pi->sh->physhim, M_G_TSSI_1, NULL_TSSI_W); in wlc_phy_clear_tssi()
1188 wlapi_bmac_write_shm(pi->sh->physhim, M_CURCHANNEL, m_cur_channel); in wlc_phy_chanspec_set()
1363 wlapi_suspend_mac_and_wait(pi->sh->physhim); in wlc_phy_txpower_target_set()
1369 wlapi_enable_mac(pi->sh->physhim); in wlc_phy_txpower_target_set()
1385 if (pi->sh->up) { in wlc_phy_txpower_set()
1394 wlapi_suspend_mac_and_wait(pi->sh->physhim); in wlc_phy_txpower_set()
1400 wlapi_enable_mac(pi->sh->physhim); in wlc_phy_txpower_set()
1824 pi->sh->machwcap = machwcap; in wlc_phy_machwcap_set()
1875 wlapi_suspend_mac_and_wait(pi->sh->physhim); in wlc_phy_txpower_limit_set()
1879 wlapi_enable_mac(pi->sh->physhim); in wlc_phy_txpower_limit_set()
1902 if (!pi->sh->clk) in wlc_phy_txpower_update_shm()
1908 wlapi_bmac_write_shm(pi->sh->physhim, M_TXPWR_MAX, 63); in wlc_phy_txpower_update_shm()
1909 wlapi_bmac_write_shm(pi->sh->physhim, M_TXPWR_N, in wlc_phy_txpower_update_shm()
1912 wlapi_bmac_write_shm(pi->sh->physhim, M_TXPWR_TARGET, in wlc_phy_txpower_update_shm()
1915 wlapi_bmac_write_shm(pi->sh->physhim, M_TXPWR_CUR, in wlc_phy_txpower_update_shm()
1923 pi->sh->physhim, in wlc_phy_txpower_update_shm()
1925 wlapi_bmac_write_shm(pi->sh->physhim, offset + 6, in wlc_phy_txpower_update_shm()
1927 wlapi_bmac_write_shm(pi->sh->physhim, offset + 14, in wlc_phy_txpower_update_shm()
1931 wlapi_bmac_mhf(pi->sh->physhim, MHF2, MHF2_HWPWRCTL, in wlc_phy_txpower_update_shm()
1939 wlapi_bmac_write_shm(pi->sh->physhim, M_OFDM_OFFSET, in wlc_phy_txpower_update_shm()
1973 wlapi_suspend_mac_and_wait(pi->sh->physhim); in wlc_phy_txpower_hw_ctrl_set()
1983 wlapi_enable_mac(pi->sh->physhim); in wlc_phy_txpower_hw_ctrl_set()
2079 wlapi_suspend_mac_and_wait(pi->sh->physhim); in wlc_phy_txpower_get_current()
2083 wlapi_enable_mac(pi->sh->physhim); in wlc_phy_txpower_get_current()
2108 } else if (pi->hwpwrctrl && pi->sh->up) { in wlc_phy_txpower_get_current()
2156 pi->sh->rx_antdiv = val; in wlc_phy_ant_rxdiv_set()
2158 if (!(ISNPHY(pi) && D11REV_IS(pi->sh->corerev, 16))) { in wlc_phy_ant_rxdiv_set()
2160 wlapi_bmac_mhf(pi->sh->physhim, MHF1, MHF1_ANTDIV, in wlc_phy_ant_rxdiv_set()
2163 wlapi_bmac_mhf(pi->sh->physhim, MHF1, MHF1_ANTDIV, 0, in wlc_phy_ant_rxdiv_set()
2170 if (!pi->sh->clk) in wlc_phy_ant_rxdiv_set()
2176 wlapi_suspend_mac_and_wait(pi->sh->physhim); in wlc_phy_ant_rxdiv_set()
2191 wlapi_enable_mac(pi->sh->physhim); in wlc_phy_ant_rxdiv_set()
2229 pi->sh->phy_noise_window[pi->sh->phy_noise_index] = in wlc_phy_noise_cb()
2231 pi->sh->phy_noise_index = in wlc_phy_noise_cb()
2232 MODINC(pi->sh->phy_noise_index, MA_WINDOW_SZ); in wlc_phy_noise_cb()
2256 lo = wlapi_bmac_read_shm(pi->sh->physhim, M_PWRIND_MAP(idx)); in wlc_phy_noise_read_shmem()
2257 hi = wlapi_bmac_read_shm(pi->sh->physhim, in wlc_phy_noise_read_shmem()
2297 jssi_aux = wlapi_bmac_read_shm(pi->sh->physhim, M_JSSI_AUX); in wlc_phy_noise_sample_intr()
2300 lo = wlapi_bmac_read_shm(pi->sh->physhim, M_PWRIND_MAP0); in wlc_phy_noise_sample_intr()
2301 hi = wlapi_bmac_read_shm(pi->sh->physhim, M_PWRIND_MAP1); in wlc_phy_noise_sample_intr()
2304 lo = wlapi_bmac_read_shm(pi->sh->physhim, M_PWRIND_MAP2); in wlc_phy_noise_sample_intr()
2305 hi = wlapi_bmac_read_shm(pi->sh->physhim, M_PWRIND_MAP3); in wlc_phy_noise_sample_intr()
2310 status_1 = wlapi_bmac_read_shm(pi->sh->physhim, M_JSSI_0); in wlc_phy_noise_sample_intr()
2329 jssi_aux = wlapi_bmac_read_shm(pi->sh->physhim, M_JSSI_AUX); in wlc_phy_noise_sample_intr()
2364 pi->phynoise_now = pi->sh->now; in wlc_phy_noise_sample_request()
2386 wlapi_bmac_write_shm(pi->sh->physhim, M_JSSI_0, 0); in wlc_phy_noise_sample_request()
2387 wlapi_bmac_write_shm(pi->sh->physhim, M_PWRIND_MAP0, 0); in wlc_phy_noise_sample_request()
2388 wlapi_bmac_write_shm(pi->sh->physhim, M_PWRIND_MAP1, 0); in wlc_phy_noise_sample_request()
2389 wlapi_bmac_write_shm(pi->sh->physhim, M_PWRIND_MAP2, 0); in wlc_phy_noise_sample_request()
2390 wlapi_bmac_write_shm(pi->sh->physhim, M_PWRIND_MAP3, 0); in wlc_phy_noise_sample_request()
2395 wlapi_suspend_mac_and_wait(pi->sh->physhim); in wlc_phy_noise_sample_request()
2399 wlapi_enable_mac(pi->sh->physhim); in wlc_phy_noise_sample_request()
2406 wlapi_bmac_write_shm(pi->sh->physhim, M_PWRIND_MAP0, 0); in wlc_phy_noise_sample_request()
2407 wlapi_bmac_write_shm(pi->sh->physhim, M_PWRIND_MAP1, 0); in wlc_phy_noise_sample_request()
2408 wlapi_bmac_write_shm(pi->sh->physhim, M_PWRIND_MAP2, 0); in wlc_phy_noise_sample_request()
2409 wlapi_bmac_write_shm(pi->sh->physhim, M_PWRIND_MAP3, 0); in wlc_phy_noise_sample_request()
2429 wlapi_suspend_mac_and_wait(pi->sh->physhim); in wlc_phy_noise_sample_request()
2435 wlapi_enable_mac(pi->sh->physhim); in wlc_phy_noise_sample_request()
2536 if ((pi->sh->corerev >= 11) in wlc_phy_rssi_compute()
2596 pi->sh->now++; in wlc_phy_watchdog()
2607 if (pi->phynoise_state && (pi->sh->now - pi->phynoise_now) > 5) in wlc_phy_watchdog()
2611 ((pi->sh->now - pi->phycal_txpower) >= pi->sh->fast_timer)) { in wlc_phy_watchdog()
2614 pi->phycal_txpower = pi->sh->now; in wlc_phy_watchdog()
2625 ((pi->sh->now - pi->nphy_perical_last) >= in wlc_phy_watchdog()
2626 pi->sh->glacial_timer)) in wlc_phy_watchdog()
2635 ((pi->sh->now - pi->phy_lastcal) >= in wlc_phy_watchdog()
2636 pi->sh->glacial_timer)) { in wlc_phy_watchdog()
2659 pi->sh->phy_noise_window[i] = (s8) (rssi & 0xff); in wlc_phy_BSSinit()
2662 pi->sh->phy_noise_window[i] = in wlc_phy_BSSinit()
2665 pi->sh->phy_noise_index = 0; in wlc_phy_BSSinit()
2809 pi->sh->hw_phytxchain = txchain; in wlc_phy_stf_chain_init()
2810 pi->sh->hw_phyrxchain = rxchain; in wlc_phy_stf_chain_init()
2811 pi->sh->phytxchain = txchain; in wlc_phy_stf_chain_init()
2812 pi->sh->phyrxchain = rxchain; in wlc_phy_stf_chain_init()
2813 pi->pubpi.phy_corenum = (u8)hweight8(pi->sh->phyrxchain); in wlc_phy_stf_chain_init()
2820 pi->sh->phytxchain = txchain; in wlc_phy_stf_chain_set()
2825 pi->pubpi.phy_corenum = (u8)hweight8(pi->sh->phyrxchain); in wlc_phy_stf_chain_set()
2832 *txchain = pi->sh->phytxchain; in wlc_phy_stf_chain_get()
2833 *rxchain = pi->sh->phyrxchain; in wlc_phy_stf_chain_get()
2848 wlapi_suspend_mac_and_wait(pi->sh->physhim); in wlc_phy_stf_chain_active_get()
2850 wlapi_enable_mac(pi->sh->physhim); in wlc_phy_stf_chain_active_get()
2894 if ((pi->sh->chip == BCMA_CHIP_ID_BCM4313) && in wlc_lcnphy_epa_switch()
2895 (pi->sh->boardflags & BFL_FEM)) { in wlc_lcnphy_epa_switch()
2898 txant = wlapi_bmac_get_txant(pi->sh->physhim); in wlc_lcnphy_epa_switch()