Update to 5.6.1.5

This commit is contained in:
Rin Cat
2019-11-14 18:16:30 -05:00
parent 20fba52b05
commit c8ee6e0746
63 changed files with 41239 additions and 40294 deletions

View File

@@ -952,6 +952,12 @@ void halrf_support_ability_debug(void *dm_void, char input[][16], u32 *_used,
"04. (( %s ))HAL_RF_TXGAPK\n",
((rf->rf_supportability & HAL_RF_TXGAPK) ? ("V") :
(".")));
#if (RTL8192F_SUPPORT == 1)
PDM_SNPF(out_len, used, output + used, out_len - used,
"07. (( %s ))HAL_2GBAND_SHIFT\n",
((rf->rf_supportability & HAL_2GBAND_SHIFT) ? ("V") :
(".")));
#endif
} else {
if (dm_value[1] == 1) /* enable */
rf->rf_supportability |= BIT(dm_value[0]);
@@ -968,6 +974,48 @@ void halrf_support_ability_debug(void *dm_void, char input[][16], u32 *_used,
*_out_len = out_len;
}
void halrf_support_band_shift_debug(void *dm_void, char input[][16], u32 *_used,
char *output, u32 *_out_len)
{
struct dm_struct *dm = (struct dm_struct *)dm_void;
struct _hal_rf_ *rf = &dm->rf_table;
//u32 band_value[2] = {00};
u32 dm_value[10] = {0};
u32 used = *_used;
u32 out_len = *_out_len;
u8 i;
#if (RTL8192F_SUPPORT == 1)
for (i = 0; i < 7; i++)
if (input[i + 1])
PHYDM_SSCANF(input[i + 2], DCMD_DECIMAL, &dm_value[i]);
if (!(rf->rf_supportability & HAL_2GBAND_SHIFT)) {
PDM_SNPF(out_len, used, output + used, out_len - used,
"\nCurr-RF_supportability[07. (( . ))HAL_2GBAND_SHIFT]\nNo RF Band Shift,default: 2.4G!\n");
} else {
if (dm_value[0] == 01) {
rf->rf_shift_band = HAL_RF_2P3;
PDM_SNPF(out_len, used, output + used, out_len - used,
"\n[rf_shift_band] = %d\nRF Band Shift to 2.3G!\n",
rf->rf_shift_band);
} else if (dm_value[0] == 02) {
rf->rf_shift_band = HAL_RF_2P5;
PDM_SNPF(out_len, used, output + used, out_len - used,
"\n[rf_shift_band] = %d\nRF Band Shift to 2.5G!\n",
rf->rf_shift_band);
} else {
rf->rf_shift_band = HAL_RF_2P4;
PDM_SNPF(out_len, used, output + used, out_len - used,
"\n[rf_shift_band] = %d\nNo RF Band Shift,default: 2.4G!\n",
rf->rf_shift_band);
}
}
*_used = used;
*_out_len = out_len;
#endif
}
void halrf_cmn_info_init(void *dm_void, enum halrf_cmninfo_init cmn_info,
u32 value)
{
@@ -1134,6 +1182,18 @@ void halrf_supportability_init_mp(void *dm_void)
0;
break;
#endif
#if (RTL8192F_SUPPORT == 1)
case ODM_RTL8192F:
rf->rf_supportability =
HAL_RF_TX_PWR_TRACK |
HAL_RF_IQK |
HAL_RF_LCK |
HAL_2GBAND_SHIFT |
/*@HAL_RF_DPK |*/
/*@HAL_RF_TXGAPK |*/
0;
break;
#endif
#if (RTL8195B_SUPPORT == 1)
case ODM_RTL8195B:
rf->rf_supportability =
@@ -1209,6 +1269,18 @@ void halrf_supportability_init(void *dm_void)
0;
break;
#endif
#if (RTL8192F_SUPPORT == 1)
case ODM_RTL8192F:
rf->rf_supportability =
HAL_RF_TX_PWR_TRACK |
HAL_RF_IQK |
HAL_RF_LCK |
HAL_2GBAND_SHIFT |
/*@HAL_RF_DPK |*/
/*@HAL_RF_TXGAPK |*/
0;
break;
#endif
#if (RTL8195B_SUPPORT == 1)
case ODM_RTL8195B:
rf->rf_supportability =

View File

@@ -371,6 +371,7 @@ enum halrf_func_idx { /*F_XXX = PHYDM XXX function*/
RF03_DPK = 3,
RF04_TXGAPK = 4,
RF05_DACK = 5,
RF07_2GBAND_SHIFT = 7
};
enum halrf_ability {
@@ -379,7 +380,14 @@ enum halrf_ability {
HAL_RF_LCK = BIT(RF02_LCK),
HAL_RF_DPK = BIT(RF03_DPK),
HAL_RF_TXGAPK = BIT(RF04_TXGAPK),
HAL_RF_DACK = BIT(RF05_DACK)
HAL_RF_DACK = BIT(RF05_DACK),
HAL_2GBAND_SHIFT = BIT(RF07_2GBAND_SHIFT)
};
enum halrf_shift_band {
HAL_RF_2P4 = 0,
HAL_RF_2P3 = 1,
HAL_RF_2P5 = 2
};
enum halrf_dbg_comp {
@@ -430,6 +438,7 @@ struct _hal_rf_ {
/*update*/
u32 rf_supportability;
u8 rf_shift_band;
u8 eeprom_thermal;
u8 dpk_en; /*Enable Function DPK OFF/ON = 0/1*/
@@ -468,6 +477,8 @@ u8 halrf_match_iqk_version(void *dm_void);
void halrf_support_ability_debug(void *dm_void, char input[][16], u32 *_used,
char *output, u32 *_out_len);
void halrf_support_band_shift_debug(void *dm_void, char input[][16], u32 *_used,
char *output, u32 *_out_len);
void halrf_cmn_info_init(void *dm_void, enum halrf_cmninfo_init cmn_info,
u32 value);

View File

@@ -139,6 +139,7 @@ enum halrf_CMD_ID {
HALRF_IQK_INFO,
HALRF_IQK,
HALRF_IQK_DEBUG,
HAL_BAND_SHIFT,
};
struct halrf_command halrf_cmd_ary[] = {
@@ -149,6 +150,7 @@ struct halrf_command halrf_cmd_ary[] = {
{"iqk_info", HALRF_IQK_INFO},
{"iqk", HALRF_IQK},
{"iqk_dbg", HALRF_IQK_DEBUG},
{"band_shift", HAL_BAND_SHIFT},
};
void halrf_cmd_parser(void *dm_void, char input[][16], u32 *_used, char *output,
@@ -192,6 +194,10 @@ void halrf_cmd_parser(void *dm_void, char input[][16], u32 *_used, char *output,
halrf_support_ability_debug(dm, &input[0], &used, output,
&out_len);
break;
case HAL_BAND_SHIFT:
halrf_support_band_shift_debug(dm, &input[0], &used, output,
&out_len);
break;
case HALRF_DBG_COMP:
halrf_debug_trace(dm, &input[0], &used, output, &out_len);
break;

View File

@@ -318,13 +318,13 @@ void _iqk_restore_rf_8822b(struct dm_struct *dm, u32 *backup_rf_reg,
odm_set_rf_reg(dm, RF_PATH_B, RF_0xef, MASK20BITS, 0x0);
/*0xdf[4]=0*/
_iqk_rf_set_check_8822b(dm, RF_PATH_A, 0xdf,
RF_backup[0][RF_PATH_A] & (!BIT(4)));
RF_backup[0][RF_PATH_A] & (~BIT(4)));
_iqk_rf_set_check_8822b(dm, RF_PATH_B, 0xdf,
RF_backup[0][RF_PATH_B] & (!BIT(4)));
RF_backup[0][RF_PATH_B] & (~BIT(4)));
#if 0
/*odm_set_rf_reg(dm, RF_PATH_A, RF_0xdf, MASK20BITS, RF_backup[0][RF_PATH_A] & (!BIT(4)));*/
/*odm_set_rf_reg(dm, RF_PATH_B, RF_0xdf, MASK20BITS, RF_backup[0][RF_PATH_B] & (!BIT(4)));*/
/*odm_set_rf_reg(dm, RF_PATH_A, RF_0xdf, MASK20BITS, RF_backup[0][RF_PATH_A] & (~BIT(4)));*/
/*odm_set_rf_reg(dm, RF_PATH_B, RF_0xdf, MASK20BITS, RF_backup[0][RF_PATH_B] & (~BIT(4)));*/
#endif
for (i = 1; i < RF_REG_NUM_8822B; i++) {
@@ -443,11 +443,11 @@ void _iqk_reload_iqk_setting_8822b(struct dm_struct *dm, u8 ch,
odm_write_4byte(dm, 0x1bd8, data);
}
if (idx == 0) {
report = !(iqk->iqk_fail_report[ch][path][idx]);
report = ~(iqk->iqk_fail_report[ch][path][idx]);
odm_set_bb_reg(dm, iqk_apply[path],
BIT(0), report);
} else {
report = !(iqk->iqk_fail_report[ch][path][idx]);
report = ~(iqk->iqk_fail_report[ch][path][idx]);
odm_set_bb_reg(dm, iqk_apply[path],
BIT(10), report);
}
@@ -528,7 +528,7 @@ void _iqk_rf_setting_8822b(struct dm_struct *dm)
/*0xdf:B11 = 1,B4 = 0, B1 = 1*/
tmp = odm_get_rf_reg(dm, (enum rf_path)path,
RF_0xdf, MASK20BITS);
tmp = (tmp & (!BIT(4))) | BIT(1) | BIT(11);
tmp = (tmp & (~BIT(4))) | BIT(1) | BIT(11);
_iqk_rf_set_check_8822b(dm, (enum rf_path)path, 0xdf, tmp);
#if 0
/*odm_set_rf_reg(dm, (enum rf_path)path, RF_0xdf, MASK20BITS, tmp);*/