Lines Matching full:rate
1145 u32 addr, u32 mask, u32 val, u8 *rate, in rtw_phy_get_rate_values_of_txpwr_by_rate() argument
1153 rate[0] = DESC_RATE6M; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1154 rate[1] = DESC_RATE9M; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1155 rate[2] = DESC_RATE12M; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1156 rate[3] = DESC_RATE18M; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1163 rate[0] = DESC_RATE24M; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1164 rate[1] = DESC_RATE36M; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1165 rate[2] = DESC_RATE48M; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1166 rate[3] = DESC_RATE54M; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1172 rate[0] = DESC_RATE1M; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1178 rate[0] = DESC_RATE2M; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1179 rate[1] = DESC_RATE5_5M; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1180 rate[2] = DESC_RATE11M; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1186 rate[0] = DESC_RATE11M; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1193 rate[0] = DESC_RATEMCS0; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1194 rate[1] = DESC_RATEMCS1; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1195 rate[2] = DESC_RATEMCS2; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1196 rate[3] = DESC_RATEMCS3; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1203 rate[0] = DESC_RATEMCS4; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1204 rate[1] = DESC_RATEMCS5; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1205 rate[2] = DESC_RATEMCS6; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1206 rate[3] = DESC_RATEMCS7; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1213 rate[0] = DESC_RATEMCS8; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1214 rate[1] = DESC_RATEMCS9; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1215 rate[2] = DESC_RATEMCS10; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1216 rate[3] = DESC_RATEMCS11; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1223 rate[0] = DESC_RATEMCS12; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1224 rate[1] = DESC_RATEMCS13; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1225 rate[2] = DESC_RATEMCS14; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1226 rate[3] = DESC_RATEMCS15; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1232 rate[0] = DESC_RATE1M; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1233 rate[1] = DESC_RATE2M; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1234 rate[2] = DESC_RATE5_5M; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1244 rate[0] = DESC_RATE1M; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1245 rate[1] = DESC_RATE2M; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1246 rate[2] = DESC_RATE5_5M; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1247 rate[3] = DESC_RATE11M; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1256 rate[0] = DESC_RATE6M; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1257 rate[1] = DESC_RATE9M; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1258 rate[2] = DESC_RATE12M; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1259 rate[3] = DESC_RATE18M; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1268 rate[0] = DESC_RATE24M; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1269 rate[1] = DESC_RATE36M; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1270 rate[2] = DESC_RATE48M; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1271 rate[3] = DESC_RATE54M; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1280 rate[0] = DESC_RATEMCS0; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1281 rate[1] = DESC_RATEMCS1; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1282 rate[2] = DESC_RATEMCS2; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1283 rate[3] = DESC_RATEMCS3; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1292 rate[0] = DESC_RATEMCS4; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1293 rate[1] = DESC_RATEMCS5; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1294 rate[2] = DESC_RATEMCS6; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1295 rate[3] = DESC_RATEMCS7; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1304 rate[0] = DESC_RATEMCS8; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1305 rate[1] = DESC_RATEMCS9; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1306 rate[2] = DESC_RATEMCS10; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1307 rate[3] = DESC_RATEMCS11; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1316 rate[0] = DESC_RATEMCS12; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1317 rate[1] = DESC_RATEMCS13; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1318 rate[2] = DESC_RATEMCS14; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1319 rate[3] = DESC_RATEMCS15; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1328 rate[0] = DESC_RATEVHT1SS_MCS0; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1329 rate[1] = DESC_RATEVHT1SS_MCS1; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1330 rate[2] = DESC_RATEVHT1SS_MCS2; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1331 rate[3] = DESC_RATEVHT1SS_MCS3; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1340 rate[0] = DESC_RATEVHT1SS_MCS4; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1341 rate[1] = DESC_RATEVHT1SS_MCS5; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1342 rate[2] = DESC_RATEVHT1SS_MCS6; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1343 rate[3] = DESC_RATEVHT1SS_MCS7; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1352 rate[0] = DESC_RATEVHT1SS_MCS8; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1353 rate[1] = DESC_RATEVHT1SS_MCS9; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1354 rate[2] = DESC_RATEVHT2SS_MCS0; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1355 rate[3] = DESC_RATEVHT2SS_MCS1; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1364 rate[0] = DESC_RATEVHT2SS_MCS2; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1365 rate[1] = DESC_RATEVHT2SS_MCS3; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1366 rate[2] = DESC_RATEVHT2SS_MCS4; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1367 rate[3] = DESC_RATEVHT2SS_MCS5; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1376 rate[0] = DESC_RATEVHT2SS_MCS6; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1377 rate[1] = DESC_RATEVHT2SS_MCS7; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1378 rate[2] = DESC_RATEVHT2SS_MCS8; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1379 rate[3] = DESC_RATEVHT2SS_MCS9; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1388 rate[0] = DESC_RATEMCS16; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1389 rate[1] = DESC_RATEMCS17; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1390 rate[2] = DESC_RATEMCS18; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1391 rate[3] = DESC_RATEMCS19; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1400 rate[0] = DESC_RATEMCS20; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1401 rate[1] = DESC_RATEMCS21; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1402 rate[2] = DESC_RATEMCS22; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1403 rate[3] = DESC_RATEMCS23; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1412 rate[0] = DESC_RATEVHT3SS_MCS0; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1413 rate[1] = DESC_RATEVHT3SS_MCS1; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1414 rate[2] = DESC_RATEVHT3SS_MCS2; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1415 rate[3] = DESC_RATEVHT3SS_MCS3; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1424 rate[0] = DESC_RATEVHT3SS_MCS4; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1425 rate[1] = DESC_RATEVHT3SS_MCS5; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1426 rate[2] = DESC_RATEVHT3SS_MCS6; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1427 rate[3] = DESC_RATEVHT3SS_MCS7; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1436 rate[0] = DESC_RATEVHT3SS_MCS8; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1437 rate[1] = DESC_RATEVHT3SS_MCS9; in rtw_phy_get_rate_values_of_txpwr_by_rate()
1454 u8 rate; in rtw_phy_store_tx_power_by_rate() local
1470 rate = rates[i]; in rtw_phy_store_tx_power_by_rate()
1472 hal->tx_pwr_by_rate_offset_2g[rfpath][rate] = offset; in rtw_phy_store_tx_power_by_rate()
1474 hal->tx_pwr_by_rate_offset_5g[rfpath][rate] = offset; in rtw_phy_store_tx_power_by_rate()
1784 static u8 rtw_get_channel_group(u8 channel, u8 rate) in rtw_get_channel_group() argument
1828 return rate <= DESC_RATE11M ? 5 : 4; in rtw_get_channel_group()
1874 static s8 rtw_phy_get_dis_dpd_by_rate_diff(struct rtw_dev *rtwdev, u16 rate) in rtw_phy_get_dis_dpd_by_rate_diff() argument
1888 switch (rate) { in rtw_phy_get_dis_dpd_by_rate_diff()
1908 u8 rate, u8 group) in rtw_phy_get_2g_tx_power_index() argument
1916 if (rate <= DESC_RATE11M) in rtw_phy_get_2g_tx_power_index()
1921 if (rate >= DESC_RATE6M && rate <= DESC_RATE54M) in rtw_phy_get_2g_tx_power_index()
1924 mcs_rate = (rate >= DESC_RATEMCS0 && rate <= DESC_RATEMCS15) || in rtw_phy_get_2g_tx_power_index()
1925 (rate >= DESC_RATEVHT1SS_MCS0 && in rtw_phy_get_2g_tx_power_index()
1926 rate <= DESC_RATEVHT2SS_MCS9); in rtw_phy_get_2g_tx_power_index()
1927 above_2ss = (rate >= DESC_RATEMCS8 && rate <= DESC_RATEMCS15) || in rtw_phy_get_2g_tx_power_index()
1928 (rate >= DESC_RATEVHT2SS_MCS0); in rtw_phy_get_2g_tx_power_index()
1955 u8 rate, u8 group) in rtw_phy_get_5g_tx_power_index() argument
1966 mcs_rate = (rate >= DESC_RATEMCS0 && rate <= DESC_RATEMCS15) || in rtw_phy_get_5g_tx_power_index()
1967 (rate >= DESC_RATEVHT1SS_MCS0 && in rtw_phy_get_5g_tx_power_index()
1968 rate <= DESC_RATEVHT2SS_MCS9); in rtw_phy_get_5g_tx_power_index()
1969 above_2ss = (rate >= DESC_RATEMCS8 && rate <= DESC_RATEMCS15) || in rtw_phy_get_5g_tx_power_index()
1970 (rate >= DESC_RATEVHT2SS_MCS0); in rtw_phy_get_5g_tx_power_index()
2006 /* return RTW_RATE_SECTION_MAX to indicate rate is invalid */
2007 static u8 rtw_phy_rate_to_rate_section(u8 rate) in rtw_phy_rate_to_rate_section() argument
2009 if (rate >= DESC_RATE1M && rate <= DESC_RATE11M) in rtw_phy_rate_to_rate_section()
2011 else if (rate >= DESC_RATE6M && rate <= DESC_RATE54M) in rtw_phy_rate_to_rate_section()
2013 else if (rate >= DESC_RATEMCS0 && rate <= DESC_RATEMCS7) in rtw_phy_rate_to_rate_section()
2015 else if (rate >= DESC_RATEMCS8 && rate <= DESC_RATEMCS15) in rtw_phy_rate_to_rate_section()
2017 else if (rate >= DESC_RATEVHT1SS_MCS0 && rate <= DESC_RATEVHT1SS_MCS9) in rtw_phy_rate_to_rate_section()
2019 else if (rate >= DESC_RATEVHT2SS_MCS0 && rate <= DESC_RATEVHT2SS_MCS9) in rtw_phy_rate_to_rate_section()
2027 u8 rate, u8 channel, u8 regd) in rtw_phy_get_tx_power_limit() argument
2032 u8 rs = rtw_phy_rate_to_rate_section(rate); in rtw_phy_get_tx_power_limit()
2069 WARN(1, "invalid arguments, band=%d, bw=%d, path=%d, rate=%d, ch=%d\n", in rtw_phy_get_tx_power_limit()
2070 band, bw, rf_path, rate, channel); in rtw_phy_get_tx_power_limit()
2075 u8 rf_path, u8 rate) in rtw_phy_get_tx_power_sar() argument
2077 u8 rs = rtw_phy_rate_to_rate_section(rate); in rtw_phy_get_tx_power_sar()
2090 WARN(1, "invalid arguments, sar_band=%d, path=%d, rate=%d\n", in rtw_phy_get_tx_power_sar()
2091 sar_band, rf_path, rate); in rtw_phy_get_tx_power_sar()
2095 void rtw_get_tx_power_params(struct rtw_dev *rtwdev, u8 path, u8 rate, u8 bw, in rtw_get_tx_power_params() argument
2109 group = rtw_get_channel_group(ch, rate); in rtw_get_tx_power_params()
2116 bw, rate, group); in rtw_get_tx_power_params()
2117 *offset = hal->tx_pwr_by_rate_offset_2g[path][rate]; in rtw_get_tx_power_params()
2122 bw, rate, group); in rtw_get_tx_power_params()
2123 *offset = hal->tx_pwr_by_rate_offset_5g[path][rate]; in rtw_get_tx_power_params()
2127 rate, ch, regd); in rtw_get_tx_power_params()
2128 *remnant = (rate <= DESC_RATE11M ? dm_info->txagc_remnant_cck : in rtw_get_tx_power_params()
2130 *sar = rtw_phy_get_tx_power_sar(rtwdev, hal->sar_band, path, rate); in rtw_get_tx_power_params()
2134 rtw_phy_get_tx_power_index(struct rtw_dev *rtwdev, u8 rf_path, u8 rate, in rtw_phy_get_tx_power_index() argument
2141 rtw_get_tx_power_params(rtwdev, rf_path, rate, bandwidth, in rtw_phy_get_tx_power_index()
2150 offset += rtw_phy_get_dis_dpd_by_rate_diff(rtwdev, rate); in rtw_phy_get_tx_power_index()
2168 u8 rate; in rtw_phy_set_tx_power_index_by_rs() local
2180 rate = rates[i]; in rtw_phy_set_tx_power_index_by_rs()
2181 pwr_idx = rtw_phy_get_tx_power_index(rtwdev, path, rate, in rtw_phy_set_tx_power_index_by_rs()
2183 hal->tx_pwr_tbl[path][rate] = pwr_idx; in rtw_phy_set_tx_power_index_by_rs()
2228 u8 rate; in rtw_phy_tx_power_by_rate_config_by_path() local
2240 for (rate = 0; rate < size; rate++) { in rtw_phy_tx_power_by_rate_config_by_path()
2241 rate_idx = rates[rate]; in rtw_phy_tx_power_by_rate_config_by_path()
2322 u8 regd, path, rate, rs, bw; in rtw_phy_init_tx_power() local
2324 /* init tx power by rate offset */ in rtw_phy_init_tx_power()
2326 for (rate = 0; rate < DESC_RATE_MAX; rate++) { in rtw_phy_init_tx_power()
2327 hal->tx_pwr_by_rate_offset_2g[path][rate] = 0; in rtw_phy_init_tx_power()
2328 hal->tx_pwr_by_rate_offset_5g[path][rate] = 0; in rtw_phy_init_tx_power()