Lines Matching refs:txpower
4040 s8 txpower) in rt2800_txpower_to_dev() argument
4044 txpower = rt2x00_get_field8(txpower, EEPROM_TXPOWER_ALC); in rt2800_txpower_to_dev()
4047 return clamp_t(s8, txpower, MIN_G_TXPOWER, MAX_G_TXPOWER); in rt2800_txpower_to_dev()
4051 return clamp_t(s8, txpower, MIN_A_TXPOWER_3593, in rt2800_txpower_to_dev()
4054 return clamp_t(s8, txpower, MIN_A_TXPOWER, MAX_A_TXPOWER); in rt2800_txpower_to_dev()
4697 u8 txpower, int delta) in rt2800_compensate_txpower() argument
4706 return min_t(u8, txpower, 0xc); in rt2800_compensate_txpower()
4709 return min_t(u8, txpower, 0xf); in rt2800_compensate_txpower()
4734 eirp_txpower = eirp_txpower_criterion + (txpower - criterion) + in rt2800_compensate_txpower()
4742 txpower = max(0, txpower + delta - reg_limit); in rt2800_compensate_txpower()
4743 return min_t(u8, txpower, 0xc); in rt2800_compensate_txpower()
4770 u8 txpower; in rt2800_config_txpower_rt3593() local
4798 txpower = rt2x00_get_field16(eeprom, EEPROM_TXPOWER_BYRATE_RATE0); in rt2800_config_txpower_rt3593()
4799 txpower = rt2800_compensate_txpower(rt2x00dev, 1, band, power_level, in rt2800_config_txpower_rt3593()
4800 txpower, delta); in rt2800_config_txpower_rt3593()
4802 TX_PWR_CFG_0_CCK1_CH0, txpower); in rt2800_config_txpower_rt3593()
4804 TX_PWR_CFG_0_CCK1_CH1, txpower); in rt2800_config_txpower_rt3593()
4806 TX_PWR_CFG_0_EXT_CCK1_CH2, txpower); in rt2800_config_txpower_rt3593()
4809 txpower = rt2x00_get_field16(eeprom, EEPROM_TXPOWER_BYRATE_RATE1); in rt2800_config_txpower_rt3593()
4810 txpower = rt2800_compensate_txpower(rt2x00dev, 1, band, power_level, in rt2800_config_txpower_rt3593()
4811 txpower, delta); in rt2800_config_txpower_rt3593()
4813 TX_PWR_CFG_0_CCK5_CH0, txpower); in rt2800_config_txpower_rt3593()
4815 TX_PWR_CFG_0_CCK5_CH1, txpower); in rt2800_config_txpower_rt3593()
4817 TX_PWR_CFG_0_EXT_CCK5_CH2, txpower); in rt2800_config_txpower_rt3593()
4820 txpower = rt2x00_get_field16(eeprom, EEPROM_TXPOWER_BYRATE_RATE2); in rt2800_config_txpower_rt3593()
4821 txpower = rt2800_compensate_txpower(rt2x00dev, 0, band, power_level, in rt2800_config_txpower_rt3593()
4822 txpower, delta); in rt2800_config_txpower_rt3593()
4824 TX_PWR_CFG_0_OFDM6_CH0, txpower); in rt2800_config_txpower_rt3593()
4826 TX_PWR_CFG_0_OFDM6_CH1, txpower); in rt2800_config_txpower_rt3593()
4828 TX_PWR_CFG_0_EXT_OFDM6_CH2, txpower); in rt2800_config_txpower_rt3593()
4831 txpower = rt2x00_get_field16(eeprom, EEPROM_TXPOWER_BYRATE_RATE3); in rt2800_config_txpower_rt3593()
4832 txpower = rt2800_compensate_txpower(rt2x00dev, 0, band, power_level, in rt2800_config_txpower_rt3593()
4833 txpower, delta); in rt2800_config_txpower_rt3593()
4835 TX_PWR_CFG_0_OFDM12_CH0, txpower); in rt2800_config_txpower_rt3593()
4837 TX_PWR_CFG_0_OFDM12_CH1, txpower); in rt2800_config_txpower_rt3593()
4839 TX_PWR_CFG_0_EXT_OFDM12_CH2, txpower); in rt2800_config_txpower_rt3593()
4846 txpower = rt2x00_get_field16(eeprom, EEPROM_TXPOWER_BYRATE_RATE0); in rt2800_config_txpower_rt3593()
4847 txpower = rt2800_compensate_txpower(rt2x00dev, 0, band, power_level, in rt2800_config_txpower_rt3593()
4848 txpower, delta); in rt2800_config_txpower_rt3593()
4850 TX_PWR_CFG_1_OFDM24_CH0, txpower); in rt2800_config_txpower_rt3593()
4852 TX_PWR_CFG_1_OFDM24_CH1, txpower); in rt2800_config_txpower_rt3593()
4854 TX_PWR_CFG_1_EXT_OFDM24_CH2, txpower); in rt2800_config_txpower_rt3593()
4857 txpower = rt2x00_get_field16(eeprom, EEPROM_TXPOWER_BYRATE_RATE1); in rt2800_config_txpower_rt3593()
4858 txpower = rt2800_compensate_txpower(rt2x00dev, 0, band, power_level, in rt2800_config_txpower_rt3593()
4859 txpower, delta); in rt2800_config_txpower_rt3593()
4861 TX_PWR_CFG_1_OFDM48_CH0, txpower); in rt2800_config_txpower_rt3593()
4863 TX_PWR_CFG_1_OFDM48_CH1, txpower); in rt2800_config_txpower_rt3593()
4865 TX_PWR_CFG_1_EXT_OFDM48_CH2, txpower); in rt2800_config_txpower_rt3593()
4868 txpower = rt2x00_get_field16(eeprom, EEPROM_TXPOWER_BYRATE_RATE2); in rt2800_config_txpower_rt3593()
4869 txpower = rt2800_compensate_txpower(rt2x00dev, 0, band, power_level, in rt2800_config_txpower_rt3593()
4870 txpower, delta); in rt2800_config_txpower_rt3593()
4872 TX_PWR_CFG_7_OFDM54_CH0, txpower); in rt2800_config_txpower_rt3593()
4874 TX_PWR_CFG_7_OFDM54_CH1, txpower); in rt2800_config_txpower_rt3593()
4876 TX_PWR_CFG_7_OFDM54_CH2, txpower); in rt2800_config_txpower_rt3593()
4883 txpower = rt2x00_get_field16(eeprom, EEPROM_TXPOWER_BYRATE_RATE0); in rt2800_config_txpower_rt3593()
4884 txpower = rt2800_compensate_txpower(rt2x00dev, 0, band, power_level, in rt2800_config_txpower_rt3593()
4885 txpower, delta); in rt2800_config_txpower_rt3593()
4887 TX_PWR_CFG_1_MCS0_CH0, txpower); in rt2800_config_txpower_rt3593()
4889 TX_PWR_CFG_1_MCS0_CH1, txpower); in rt2800_config_txpower_rt3593()
4891 TX_PWR_CFG_1_EXT_MCS0_CH2, txpower); in rt2800_config_txpower_rt3593()
4894 txpower = rt2x00_get_field16(eeprom, EEPROM_TXPOWER_BYRATE_RATE1); in rt2800_config_txpower_rt3593()
4895 txpower = rt2800_compensate_txpower(rt2x00dev, 0, band, power_level, in rt2800_config_txpower_rt3593()
4896 txpower, delta); in rt2800_config_txpower_rt3593()
4898 TX_PWR_CFG_1_MCS2_CH0, txpower); in rt2800_config_txpower_rt3593()
4900 TX_PWR_CFG_1_MCS2_CH1, txpower); in rt2800_config_txpower_rt3593()
4902 TX_PWR_CFG_1_EXT_MCS2_CH2, txpower); in rt2800_config_txpower_rt3593()
4905 txpower = rt2x00_get_field16(eeprom, EEPROM_TXPOWER_BYRATE_RATE2); in rt2800_config_txpower_rt3593()
4906 txpower = rt2800_compensate_txpower(rt2x00dev, 0, band, power_level, in rt2800_config_txpower_rt3593()
4907 txpower, delta); in rt2800_config_txpower_rt3593()
4909 TX_PWR_CFG_2_MCS4_CH0, txpower); in rt2800_config_txpower_rt3593()
4911 TX_PWR_CFG_2_MCS4_CH1, txpower); in rt2800_config_txpower_rt3593()
4913 TX_PWR_CFG_2_EXT_MCS4_CH2, txpower); in rt2800_config_txpower_rt3593()
4916 txpower = rt2x00_get_field16(eeprom, EEPROM_TXPOWER_BYRATE_RATE3); in rt2800_config_txpower_rt3593()
4917 txpower = rt2800_compensate_txpower(rt2x00dev, 0, band, power_level, in rt2800_config_txpower_rt3593()
4918 txpower, delta); in rt2800_config_txpower_rt3593()
4920 TX_PWR_CFG_2_MCS6_CH0, txpower); in rt2800_config_txpower_rt3593()
4922 TX_PWR_CFG_2_MCS6_CH1, txpower); in rt2800_config_txpower_rt3593()
4924 TX_PWR_CFG_2_EXT_MCS6_CH2, txpower); in rt2800_config_txpower_rt3593()
4931 txpower = rt2x00_get_field16(eeprom, EEPROM_TXPOWER_BYRATE_RATE0); in rt2800_config_txpower_rt3593()
4932 txpower = rt2800_compensate_txpower(rt2x00dev, 0, band, power_level, in rt2800_config_txpower_rt3593()
4933 txpower, delta); in rt2800_config_txpower_rt3593()
4935 TX_PWR_CFG_7_MCS7_CH0, txpower); in rt2800_config_txpower_rt3593()
4937 TX_PWR_CFG_7_MCS7_CH1, txpower); in rt2800_config_txpower_rt3593()
4939 TX_PWR_CFG_7_MCS7_CH2, txpower); in rt2800_config_txpower_rt3593()
4942 txpower = rt2x00_get_field16(eeprom, EEPROM_TXPOWER_BYRATE_RATE1); in rt2800_config_txpower_rt3593()
4943 txpower = rt2800_compensate_txpower(rt2x00dev, 0, band, power_level, in rt2800_config_txpower_rt3593()
4944 txpower, delta); in rt2800_config_txpower_rt3593()
4946 TX_PWR_CFG_2_MCS8_CH0, txpower); in rt2800_config_txpower_rt3593()
4948 TX_PWR_CFG_2_MCS8_CH1, txpower); in rt2800_config_txpower_rt3593()
4950 TX_PWR_CFG_2_EXT_MCS8_CH2, txpower); in rt2800_config_txpower_rt3593()
4953 txpower = rt2x00_get_field16(eeprom, EEPROM_TXPOWER_BYRATE_RATE2); in rt2800_config_txpower_rt3593()
4954 txpower = rt2800_compensate_txpower(rt2x00dev, 0, band, power_level, in rt2800_config_txpower_rt3593()
4955 txpower, delta); in rt2800_config_txpower_rt3593()
4957 TX_PWR_CFG_2_MCS10_CH0, txpower); in rt2800_config_txpower_rt3593()
4959 TX_PWR_CFG_2_MCS10_CH1, txpower); in rt2800_config_txpower_rt3593()
4961 TX_PWR_CFG_2_EXT_MCS10_CH2, txpower); in rt2800_config_txpower_rt3593()
4964 txpower = rt2x00_get_field16(eeprom, EEPROM_TXPOWER_BYRATE_RATE3); in rt2800_config_txpower_rt3593()
4965 txpower = rt2800_compensate_txpower(rt2x00dev, 0, band, power_level, in rt2800_config_txpower_rt3593()
4966 txpower, delta); in rt2800_config_txpower_rt3593()
4968 TX_PWR_CFG_3_MCS12_CH0, txpower); in rt2800_config_txpower_rt3593()
4970 TX_PWR_CFG_3_MCS12_CH1, txpower); in rt2800_config_txpower_rt3593()
4972 TX_PWR_CFG_3_EXT_MCS12_CH2, txpower); in rt2800_config_txpower_rt3593()
4979 txpower = rt2x00_get_field16(eeprom, EEPROM_TXPOWER_BYRATE_RATE0); in rt2800_config_txpower_rt3593()
4980 txpower = rt2800_compensate_txpower(rt2x00dev, 0, band, power_level, in rt2800_config_txpower_rt3593()
4981 txpower, delta); in rt2800_config_txpower_rt3593()
4983 TX_PWR_CFG_3_MCS14_CH0, txpower); in rt2800_config_txpower_rt3593()
4985 TX_PWR_CFG_3_MCS14_CH1, txpower); in rt2800_config_txpower_rt3593()
4987 TX_PWR_CFG_3_EXT_MCS14_CH2, txpower); in rt2800_config_txpower_rt3593()
4990 txpower = rt2x00_get_field16(eeprom, EEPROM_TXPOWER_BYRATE_RATE1); in rt2800_config_txpower_rt3593()
4991 txpower = rt2800_compensate_txpower(rt2x00dev, 0, band, power_level, in rt2800_config_txpower_rt3593()
4992 txpower, delta); in rt2800_config_txpower_rt3593()
4994 TX_PWR_CFG_8_MCS15_CH0, txpower); in rt2800_config_txpower_rt3593()
4996 TX_PWR_CFG_8_MCS15_CH1, txpower); in rt2800_config_txpower_rt3593()
4998 TX_PWR_CFG_8_MCS15_CH2, txpower); in rt2800_config_txpower_rt3593()
5001 txpower = rt2x00_get_field16(eeprom, EEPROM_TXPOWER_BYRATE_RATE2); in rt2800_config_txpower_rt3593()
5002 txpower = rt2800_compensate_txpower(rt2x00dev, 0, band, power_level, in rt2800_config_txpower_rt3593()
5003 txpower, delta); in rt2800_config_txpower_rt3593()
5005 TX_PWR_CFG_5_MCS16_CH0, txpower); in rt2800_config_txpower_rt3593()
5007 TX_PWR_CFG_5_MCS16_CH1, txpower); in rt2800_config_txpower_rt3593()
5009 TX_PWR_CFG_5_MCS16_CH2, txpower); in rt2800_config_txpower_rt3593()
5012 txpower = rt2x00_get_field16(eeprom, EEPROM_TXPOWER_BYRATE_RATE3); in rt2800_config_txpower_rt3593()
5013 txpower = rt2800_compensate_txpower(rt2x00dev, 0, band, power_level, in rt2800_config_txpower_rt3593()
5014 txpower, delta); in rt2800_config_txpower_rt3593()
5016 TX_PWR_CFG_5_MCS18_CH0, txpower); in rt2800_config_txpower_rt3593()
5018 TX_PWR_CFG_5_MCS18_CH1, txpower); in rt2800_config_txpower_rt3593()
5020 TX_PWR_CFG_5_MCS18_CH2, txpower); in rt2800_config_txpower_rt3593()
5027 txpower = rt2x00_get_field16(eeprom, EEPROM_TXPOWER_BYRATE_RATE0); in rt2800_config_txpower_rt3593()
5028 txpower = rt2800_compensate_txpower(rt2x00dev, 0, band, power_level, in rt2800_config_txpower_rt3593()
5029 txpower, delta); in rt2800_config_txpower_rt3593()
5031 TX_PWR_CFG_6_MCS20_CH0, txpower); in rt2800_config_txpower_rt3593()
5033 TX_PWR_CFG_6_MCS20_CH1, txpower); in rt2800_config_txpower_rt3593()
5035 TX_PWR_CFG_6_MCS20_CH2, txpower); in rt2800_config_txpower_rt3593()
5038 txpower = rt2x00_get_field16(eeprom, EEPROM_TXPOWER_BYRATE_RATE1); in rt2800_config_txpower_rt3593()
5039 txpower = rt2800_compensate_txpower(rt2x00dev, 0, band, power_level, in rt2800_config_txpower_rt3593()
5040 txpower, delta); in rt2800_config_txpower_rt3593()
5042 TX_PWR_CFG_6_MCS22_CH0, txpower); in rt2800_config_txpower_rt3593()
5044 TX_PWR_CFG_6_MCS22_CH1, txpower); in rt2800_config_txpower_rt3593()
5046 TX_PWR_CFG_6_MCS22_CH2, txpower); in rt2800_config_txpower_rt3593()
5049 txpower = rt2x00_get_field16(eeprom, EEPROM_TXPOWER_BYRATE_RATE2); in rt2800_config_txpower_rt3593()
5050 txpower = rt2800_compensate_txpower(rt2x00dev, 0, band, power_level, in rt2800_config_txpower_rt3593()
5051 txpower, delta); in rt2800_config_txpower_rt3593()
5053 TX_PWR_CFG_8_MCS23_CH0, txpower); in rt2800_config_txpower_rt3593()
5055 TX_PWR_CFG_8_MCS23_CH1, txpower); in rt2800_config_txpower_rt3593()
5057 TX_PWR_CFG_8_MCS23_CH2, txpower); in rt2800_config_txpower_rt3593()
5064 txpower = rt2x00_get_field16(eeprom, EEPROM_TXPOWER_BYRATE_RATE0); in rt2800_config_txpower_rt3593()
5065 txpower = rt2800_compensate_txpower(rt2x00dev, 0, band, power_level, in rt2800_config_txpower_rt3593()
5066 txpower, delta); in rt2800_config_txpower_rt3593()
5068 TX_PWR_CFG_3_STBC0_CH0, txpower); in rt2800_config_txpower_rt3593()
5070 TX_PWR_CFG_3_STBC0_CH1, txpower); in rt2800_config_txpower_rt3593()
5072 TX_PWR_CFG_3_EXT_STBC0_CH2, txpower); in rt2800_config_txpower_rt3593()
5075 txpower = rt2x00_get_field16(eeprom, EEPROM_TXPOWER_BYRATE_RATE1); in rt2800_config_txpower_rt3593()
5076 txpower = rt2800_compensate_txpower(rt2x00dev, 0, band, power_level, in rt2800_config_txpower_rt3593()
5077 txpower, delta); in rt2800_config_txpower_rt3593()
5079 TX_PWR_CFG_3_STBC2_CH0, txpower); in rt2800_config_txpower_rt3593()
5081 TX_PWR_CFG_3_STBC2_CH1, txpower); in rt2800_config_txpower_rt3593()
5083 TX_PWR_CFG_3_EXT_STBC2_CH2, txpower); in rt2800_config_txpower_rt3593()
5086 txpower = rt2x00_get_field16(eeprom, EEPROM_TXPOWER_BYRATE_RATE2); in rt2800_config_txpower_rt3593()
5087 txpower = rt2800_compensate_txpower(rt2x00dev, 0, band, power_level, in rt2800_config_txpower_rt3593()
5088 txpower, delta); in rt2800_config_txpower_rt3593()
5089 rt2x00_set_field32(®s[TX_PWR_CFG_4_IDX], TX_PWR_CFG_RATE0, txpower); in rt2800_config_txpower_rt3593()
5090 rt2x00_set_field32(®s[TX_PWR_CFG_4_IDX], TX_PWR_CFG_RATE1, txpower); in rt2800_config_txpower_rt3593()
5092 txpower); in rt2800_config_txpower_rt3593()
5095 txpower = rt2x00_get_field16(eeprom, EEPROM_TXPOWER_BYRATE_RATE3); in rt2800_config_txpower_rt3593()
5096 txpower = rt2800_compensate_txpower(rt2x00dev, 0, band, power_level, in rt2800_config_txpower_rt3593()
5097 txpower, delta); in rt2800_config_txpower_rt3593()
5098 rt2x00_set_field32(®s[TX_PWR_CFG_4_IDX], TX_PWR_CFG_RATE2, txpower); in rt2800_config_txpower_rt3593()
5099 rt2x00_set_field32(®s[TX_PWR_CFG_4_IDX], TX_PWR_CFG_RATE3, txpower); in rt2800_config_txpower_rt3593()
5101 txpower); in rt2800_config_txpower_rt3593()
5108 txpower = rt2x00_get_field16(eeprom, EEPROM_TXPOWER_BYRATE_RATE0); in rt2800_config_txpower_rt3593()
5109 txpower = rt2800_compensate_txpower(rt2x00dev, 0, band, power_level, in rt2800_config_txpower_rt3593()
5110 txpower, delta); in rt2800_config_txpower_rt3593()
5112 TX_PWR_CFG_9_STBC7_CH0, txpower); in rt2800_config_txpower_rt3593()
5114 TX_PWR_CFG_9_STBC7_CH1, txpower); in rt2800_config_txpower_rt3593()
5116 TX_PWR_CFG_9_STBC7_CH2, txpower); in rt2800_config_txpower_rt3593()
5289 u8 txpower, r1; in rt2800_config_txpower_rt28xx() local
5372 txpower = rt2x00_get_field16(eeprom, in rt2800_config_txpower_rt28xx()
5374 txpower = rt2800_compensate_txpower(rt2x00dev, is_rate_b, band, in rt2800_config_txpower_rt28xx()
5375 power_level, txpower, delta); in rt2800_config_txpower_rt28xx()
5376 rt2x00_set_field32(®, TX_PWR_CFG_RATE0, txpower); in rt2800_config_txpower_rt28xx()
5383 txpower = rt2x00_get_field16(eeprom, in rt2800_config_txpower_rt28xx()
5385 txpower = rt2800_compensate_txpower(rt2x00dev, is_rate_b, band, in rt2800_config_txpower_rt28xx()
5386 power_level, txpower, delta); in rt2800_config_txpower_rt28xx()
5387 rt2x00_set_field32(®, TX_PWR_CFG_RATE1, txpower); in rt2800_config_txpower_rt28xx()
5394 txpower = rt2x00_get_field16(eeprom, in rt2800_config_txpower_rt28xx()
5396 txpower = rt2800_compensate_txpower(rt2x00dev, is_rate_b, band, in rt2800_config_txpower_rt28xx()
5397 power_level, txpower, delta); in rt2800_config_txpower_rt28xx()
5398 rt2x00_set_field32(®, TX_PWR_CFG_RATE2, txpower); in rt2800_config_txpower_rt28xx()
5405 txpower = rt2x00_get_field16(eeprom, in rt2800_config_txpower_rt28xx()
5407 txpower = rt2800_compensate_txpower(rt2x00dev, is_rate_b, band, in rt2800_config_txpower_rt28xx()
5408 power_level, txpower, delta); in rt2800_config_txpower_rt28xx()
5409 rt2x00_set_field32(®, TX_PWR_CFG_RATE3, txpower); in rt2800_config_txpower_rt28xx()
5422 txpower = rt2x00_get_field16(eeprom, in rt2800_config_txpower_rt28xx()
5424 txpower = rt2800_compensate_txpower(rt2x00dev, is_rate_b, band, in rt2800_config_txpower_rt28xx()
5425 power_level, txpower, delta); in rt2800_config_txpower_rt28xx()
5426 rt2x00_set_field32(®, TX_PWR_CFG_RATE4, txpower); in rt2800_config_txpower_rt28xx()
5433 txpower = rt2x00_get_field16(eeprom, in rt2800_config_txpower_rt28xx()
5435 txpower = rt2800_compensate_txpower(rt2x00dev, is_rate_b, band, in rt2800_config_txpower_rt28xx()
5436 power_level, txpower, delta); in rt2800_config_txpower_rt28xx()
5437 rt2x00_set_field32(®, TX_PWR_CFG_RATE5, txpower); in rt2800_config_txpower_rt28xx()
5444 txpower = rt2x00_get_field16(eeprom, in rt2800_config_txpower_rt28xx()
5446 txpower = rt2800_compensate_txpower(rt2x00dev, is_rate_b, band, in rt2800_config_txpower_rt28xx()
5447 power_level, txpower, delta); in rt2800_config_txpower_rt28xx()
5448 rt2x00_set_field32(®, TX_PWR_CFG_RATE6, txpower); in rt2800_config_txpower_rt28xx()
5455 txpower = rt2x00_get_field16(eeprom, in rt2800_config_txpower_rt28xx()
5457 txpower = rt2800_compensate_txpower(rt2x00dev, is_rate_b, band, in rt2800_config_txpower_rt28xx()
5458 power_level, txpower, delta); in rt2800_config_txpower_rt28xx()
5459 rt2x00_set_field32(®, TX_PWR_CFG_RATE7, txpower); in rt2800_config_txpower_rt28xx()