Lines Matching refs:hal
151 struct rtw_hal *hal = &rtwdev->hal; in rtw_phy_dig_write() local
155 for (path = 0; path < hal->rf_path_num; path++) { in rtw_phy_dig_write()
525 if (rtwdev->hal.current_band_type != RTW_BAND_2G) in rtw_phy_cck_pd()
672 struct rtw_hal *hal = &rtwdev->hal; in rtw_phy_read_rf() local
677 if (rf_path >= hal->rf_path_num) { in rtw_phy_read_rf()
694 struct rtw_hal *hal = &rtwdev->hal; in rtw_phy_write_rf_reg_sipi() local
701 if (rf_path >= hal->rf_path_num) { in rtw_phy_write_rf_reg_sipi()
733 struct rtw_hal *hal = &rtwdev->hal; in rtw_phy_write_rf_reg() local
738 if (rf_path >= hal->rf_path_num) { in rtw_phy_write_rf_reg()
775 struct rtw_hal *hal = &rtwdev->hal; in rtw_phy_setup_phy_cond() local
779 cond.cut = hal->cut_version ? hal->cut_version : 15; in rtw_phy_setup_phy_cond()
797 hal->phy_cond = cond; in rtw_phy_setup_phy_cond()
799 rtw_dbg(rtwdev, RTW_DBG_PHY, "phy cond=0x%08x\n", *((u32 *)&hal->phy_cond)); in rtw_phy_setup_phy_cond()
804 struct rtw_hal *hal = &rtwdev->hal; in check_positive() local
805 struct rtw_phy_cond drv_cond = hal->phy_cond; in check_positive()
1184 struct rtw_hal *hal = &rtwdev->hal; in rtw_phy_store_tx_power_by_rate() local
1204 hal->tx_pwr_by_rate_offset_2g[rfpath][rate] = offset; in rtw_phy_store_tx_power_by_rate()
1206 hal->tx_pwr_by_rate_offset_5g[rfpath][rate] = offset; in rtw_phy_store_tx_power_by_rate()
1265 struct rtw_hal *hal = &rtwdev->hal; in rtw_phy_set_tx_power_limit() local
1283 hal->tx_pwr_limit_2g[regd][bw][rs][ch_idx] = pwr_limit; in rtw_phy_set_tx_power_limit()
1284 ww = hal->tx_pwr_limit_2g[RTW_REGD_WW][bw][rs][ch_idx]; in rtw_phy_set_tx_power_limit()
1286 hal->tx_pwr_limit_2g[RTW_REGD_WW][bw][rs][ch_idx] = ww; in rtw_phy_set_tx_power_limit()
1288 hal->tx_pwr_limit_5g[regd][bw][rs][ch_idx] = pwr_limit; in rtw_phy_set_tx_power_limit()
1289 ww = hal->tx_pwr_limit_5g[RTW_REGD_WW][bw][rs][ch_idx]; in rtw_phy_set_tx_power_limit()
1291 hal->tx_pwr_limit_5g[RTW_REGD_WW][bw][rs][ch_idx] = ww; in rtw_phy_set_tx_power_limit()
1300 struct rtw_hal *hal = &rtwdev->hal; in rtw_xref_5g_txpwr_lmt() local
1302 s8 lmt_ht = hal->tx_pwr_limit_5g[regd][bw][rs_ht][ch_idx]; in rtw_xref_5g_txpwr_lmt()
1303 s8 lmt_vht = hal->tx_pwr_limit_5g[regd][bw][rs_vht][ch_idx]; in rtw_xref_5g_txpwr_lmt()
1309 hal->tx_pwr_limit_5g[regd][bw][rs_ht][ch_idx] = lmt_vht; in rtw_xref_5g_txpwr_lmt()
1312 hal->tx_pwr_limit_5g[regd][bw][rs_vht][ch_idx] = lmt_ht; in rtw_xref_5g_txpwr_lmt()
1447 for (rf_path = 0; rf_path < rtwdev->hal.rf_path_num; rf_path++) { in rtw_phy_load_tables()
1680 struct rtw_hal *hal = &rtwdev->hal; in rtw_phy_get_tx_power_limit() local
1681 u8 *cch_by_bw = hal->cch_by_bw; in rtw_phy_get_tx_power_limit()
1723 hal->tx_pwr_limit_2g[regd][cur_bw][rs][ch_idx] : in rtw_phy_get_tx_power_limit()
1724 hal->tx_pwr_limit_5g[regd][cur_bw][rs][ch_idx]; in rtw_phy_get_tx_power_limit()
1740 struct rtw_hal *hal = &rtwdev->hal; in rtw_get_tx_power_params() local
1756 *offset = hal->tx_pwr_by_rate_offset_2g[path][rate]; in rtw_get_tx_power_params()
1762 *offset = hal->tx_pwr_by_rate_offset_5g[path][rate]; in rtw_get_tx_power_params()
1797 struct rtw_hal *hal = &rtwdev->hal; in rtw_phy_set_tx_power_index_by_rs() local
1811 bw = hal->current_band_width; in rtw_phy_set_tx_power_index_by_rs()
1816 hal->tx_pwr_tbl[path][rate] = pwr_idx; in rtw_phy_set_tx_power_index_by_rs()
1828 struct rtw_hal *hal = &rtwdev->hal; in rtw_phy_set_tx_power_level_by_path() local
1832 if (hal->current_band_type == RTW_BAND_2G) in rtw_phy_set_tx_power_level_by_path()
1844 struct rtw_hal *hal = &rtwdev->hal; in rtw_phy_set_tx_power_level() local
1847 mutex_lock(&hal->tx_power_mutex); in rtw_phy_set_tx_power_level()
1849 for (path = 0; path < hal->rf_path_num; path++) in rtw_phy_set_tx_power_level()
1853 mutex_unlock(&hal->tx_power_mutex); in rtw_phy_set_tx_power_level()
1857 rtw_phy_tx_power_by_rate_config_by_path(struct rtw_hal *hal, u8 path, in rtw_phy_tx_power_by_rate_config_by_path() argument
1868 base_2g = hal->tx_pwr_by_rate_offset_2g[path][base_idx]; in rtw_phy_tx_power_by_rate_config_by_path()
1869 base_5g = hal->tx_pwr_by_rate_offset_5g[path][base_idx]; in rtw_phy_tx_power_by_rate_config_by_path()
1870 hal->tx_pwr_by_rate_base_2g[path][rs] = base_2g; in rtw_phy_tx_power_by_rate_config_by_path()
1871 hal->tx_pwr_by_rate_base_5g[path][rs] = base_5g; in rtw_phy_tx_power_by_rate_config_by_path()
1874 hal->tx_pwr_by_rate_offset_2g[path][rate_idx] -= base_2g; in rtw_phy_tx_power_by_rate_config_by_path()
1875 hal->tx_pwr_by_rate_offset_5g[path][rate_idx] -= base_5g; in rtw_phy_tx_power_by_rate_config_by_path()
1879 void rtw_phy_tx_power_by_rate_config(struct rtw_hal *hal) in rtw_phy_tx_power_by_rate_config() argument
1884 rtw_phy_tx_power_by_rate_config_by_path(hal, path, in rtw_phy_tx_power_by_rate_config()
1887 rtw_phy_tx_power_by_rate_config_by_path(hal, path, in rtw_phy_tx_power_by_rate_config()
1890 rtw_phy_tx_power_by_rate_config_by_path(hal, path, in rtw_phy_tx_power_by_rate_config()
1893 rtw_phy_tx_power_by_rate_config_by_path(hal, path, in rtw_phy_tx_power_by_rate_config()
1896 rtw_phy_tx_power_by_rate_config_by_path(hal, path, in rtw_phy_tx_power_by_rate_config()
1899 rtw_phy_tx_power_by_rate_config_by_path(hal, path, in rtw_phy_tx_power_by_rate_config()
1906 __rtw_phy_tx_power_limit_config(struct rtw_hal *hal, u8 regd, u8 bw, u8 rs) in __rtw_phy_tx_power_limit_config() argument
1912 base = hal->tx_pwr_by_rate_base_2g[0][rs]; in __rtw_phy_tx_power_limit_config()
1913 hal->tx_pwr_limit_2g[regd][bw][rs][ch] -= base; in __rtw_phy_tx_power_limit_config()
1917 base = hal->tx_pwr_by_rate_base_5g[0][rs]; in __rtw_phy_tx_power_limit_config()
1918 hal->tx_pwr_limit_5g[regd][bw][rs][ch] -= base; in __rtw_phy_tx_power_limit_config()
1922 void rtw_phy_tx_power_limit_config(struct rtw_hal *hal) in rtw_phy_tx_power_limit_config() argument
1927 hal->cch_by_bw[RTW_CHANNEL_WIDTH_20] = 1; in rtw_phy_tx_power_limit_config()
1932 __rtw_phy_tx_power_limit_config(hal, regd, bw, rs); in rtw_phy_tx_power_limit_config()
1938 struct rtw_hal *hal = &rtwdev->hal; in rtw_phy_init_tx_power_limit() local
1944 hal->tx_pwr_limit_2g[regd][bw][rs][ch] = max_power_index; in rtw_phy_init_tx_power_limit()
1948 hal->tx_pwr_limit_5g[regd][bw][rs][ch] = max_power_index; in rtw_phy_init_tx_power_limit()
1953 struct rtw_hal *hal = &rtwdev->hal; in rtw_phy_init_tx_power() local
1959 hal->tx_pwr_by_rate_offset_2g[path][rate] = 0; in rtw_phy_init_tx_power()
1960 hal->tx_pwr_by_rate_offset_5g[path][rate] = 0; in rtw_phy_init_tx_power()