Lines Matching refs:kidx
1703 u8 val, kidx = dpk->cur_idx[path];
1705 val = dpk->is_dpk_enable && !off && dpk->bp[path][kidx].path_ok;
1707 rtw89_phy_write32_mask(rtwdev, R_DPD_CH0A + (path << 8) + (kidx << 2),
1711 kidx, dpk->is_dpk_enable && !off ? "enable" : "disable");
1769 u8 kidx = dpk->cur_idx[path];
1771 dpk->bp[path][kidx].band = chan->band_type;
1772 dpk->bp[path][kidx].ch = chan->channel;
1773 dpk->bp[path][kidx].bw = chan->band_width;
1780 dpk->bp[path][kidx].band == 0 ? "2G" :
1781 dpk->bp[path][kidx].band == 1 ? "5G" : "6G",
1782 dpk->bp[path][kidx].ch,
1783 dpk->bp[path][kidx].bw == 0 ? "20M" :
1784 dpk->bp[path][kidx].bw == 1 ? "40M" : "80M");
1886 static void _dpk_get_thermal(struct rtw89_dev *rtwdev, u8 kidx, enum rtw89_rf_path path)
1896 dpk->bp[path][kidx].ther_dpk = rtw89_read_rf(rtwdev, path, RR_TM, RR_TM_VAL);
1899 dpk->bp[path][kidx].ther_dpk);
1903 enum rtw89_rf_path path, u8 kidx)
1907 if (dpk->bp[path][kidx].band == RTW89_BAND_2G) {
1923 rtw89_write_rf(rtwdev, path, RR_BTC, RR_BTC_TXBB, dpk->bp[path][kidx].bw + 1);
1956 void _dpk_tpg_sel(struct rtw89_dev *rtwdev, enum rtw89_rf_path path, u8 kidx)
1960 if (dpk->bp[path][kidx].bw == RTW89_CHANNEL_WIDTH_80)
1962 else if (dpk->bp[path][kidx].bw == RTW89_CHANNEL_WIDTH_40)
1968 dpk->bp[path][kidx].bw == RTW89_CHANNEL_WIDTH_80 ? "80M" :
1969 dpk->bp[path][kidx].bw == RTW89_CHANNEL_WIDTH_40 ? "40M" : "20M");
1973 enum rtw89_rf_path path, u8 kidx, u8 gain)
1977 val = 0x80 + kidx * 0x20 + gain * 0x10;
1980 "[DPK] table select for Kidx[%d], Gain[%d] (0x%x)\n", kidx,
1984 static bool _dpk_sync_check(struct rtw89_dev *rtwdev, enum rtw89_rf_path path, u8 kidx)
2002 dpk->corr_idx[path][kidx] = corr_idx;
2003 dpk->corr_val[path][kidx] = corr_val;
2016 dpk->dc_i[path][kidx] = dc_i;
2017 dpk->dc_q[path][kidx] = dc_q;
2027 enum rtw89_rf_path path, u8 kidx)
2031 return _dpk_sync_check(rtwdev, path, kidx);
2104 enum rtw89_rf_path path, u8 kidx)
2106 _dpk_table_select(rtwdev, path, kidx, 1);
2111 enum rtw89_rf_path path, u8 kidx)
2113 _dpk_tpg_sel(rtwdev, path, kidx);
2219 enum rtw89_rf_path path, u8 kidx, u8 init_txagc,
2235 if (_dpk_sync(rtwdev, phy, path, kidx)) {
2283 _dpk_gainloss(rtwdev, phy, path, kidx);
2366 enum rtw89_rf_path path, u8 kidx, u8 gain)
2370 if (dpk->bp[path][kidx].bw < RTW89_CHANNEL_WIDTH_80 &&
2371 dpk->bp[path][kidx].band == RTW89_BAND_5G)
2380 enum rtw89_rf_path path, u8 kidx, u8 gain, u8 txagc)
2387 B_COEF_SEL_MDPD, kidx);
2393 dpk->bp[path][kidx].txagc_dpk = txagc;
2395 0x3F << ((gain << 3) + (kidx << 4)), txagc);
2397 dpk->bp[path][kidx].pwsf = pwsf;
2398 rtw89_phy_write32_mask(rtwdev, R_DPD_BND + (path << 8) + (kidx << 2),
2404 dpk->bp[path][kidx].gs = gs;
2406 rtw89_phy_write32_mask(rtwdev, R_DPD_CH0A + (path << 8) + (kidx << 2),
2409 rtw89_phy_write32_mask(rtwdev, R_DPD_CH0A + (path << 8) + (kidx << 2),
2412 rtw89_phy_write32_mask(rtwdev, R_DPD_CH0A + (path << 8) + (kidx << 2),
2449 u8 txagc = 0x38, kidx = dpk->cur_idx[path];
2453 "[DPK] ========= S%d[%d] DPK Start =========\n", path, kidx);
2460 _dpk_rf_setting(rtwdev, gain, path, kidx);
2463 _dpk_kip_preset(rtwdev, phy, path, kidx);
2465 _dpk_table_select(rtwdev, path, kidx, gain);
2467 txagc = _dpk_agc(rtwdev, phy, path, kidx, txagc, false);
2473 _dpk_get_thermal(rtwdev, kidx, path);
2475 _dpk_idl_mpa(rtwdev, phy, path, kidx, gain);
2479 _dpk_fill_result(rtwdev, phy, path, kidx, gain, txagc);
2483 dpk->bp[path][kidx].path_ok = true;
2485 dpk->bp[path][kidx].path_ok = false;
2487 rtw89_debug(rtwdev, RTW89_DBG_RFK, "[DPK] S%d[%d] DPK %s\n", path, kidx,
2599 u8 path, kidx;
2605 kidx = dpk->cur_idx[path];
2609 path, kidx, dpk->bp[path][kidx].ch);
2616 if (dpk->bp[path][kidx].ch && cur_ther)
2617 delta_ther[path] = dpk->bp[path][kidx].ther_dpk - cur_ther;
2619 if (dpk->bp[path][kidx].band == RTW89_BAND_2G)
2667 pwsf[0] = dpk->bp[path][kidx].pwsf +
2669 pwsf[1] = dpk->bp[path][kidx].pwsf +
2672 pwsf[0] = dpk->bp[path][kidx].pwsf + ini_diff;
2673 pwsf[1] = dpk->bp[path][kidx].pwsf + ini_diff;
2677 pwsf[0] = (dpk->bp[path][kidx].pwsf + delta_ther[path]) & 0x1ff;
2678 pwsf[1] = (dpk->bp[path][kidx].pwsf + delta_ther[path]) & 0x1ff;
2688 R_DPD_BND + (path << 8) + (kidx << 2),
2691 R_DPD_BND + (path << 8) + (kidx << 2),