u8 gainctrl_dirn = NPHY_RXCAL_GAIN_INIT;
nphy_ipa_txrxgain_t *nphy_rxcal_gaintbl;
u16 hpvga, lpf_biq1, lpf_biq0, lna2, lna1;
- s16 fine_gain_idx;
+ int fine_gain_idx;
s8 txpwrindex;
u16 nphy_rxcal_txgain[2];
if (core_idx == 0) {
ref_iq_vals =
- max((est[0].i_pwr +
+ max_t(u32, (est[0].i_pwr +
est[0].q_pwr) >> (log_num_samps + 1),
1);
} else {
ref_iq_vals =
- max((est[1].i_pwr +
+ max_t(u32, (est[1].i_pwr +
est[1].q_pwr) >> (log_num_samps + 1),
1);
}
TXLPF_IDAC_4, txlpf_idac);
}
- rxlpf_rccal_hpc = max(min(rxlpf_rccal_hpc, 31), 0);
- txlpf_rccal_lpc = max(min(txlpf_rccal_lpc, 31), 0);
+ rxlpf_rccal_hpc = max(min_t(u8, rxlpf_rccal_hpc, 31), 0);
+ txlpf_rccal_lpc = max(min_t(u8, txlpf_rccal_lpc, 31), 0);
write_radio_reg(pi, (RADIO_2056_RX_RXLPF_RCCAL_HPC |
((rx_core ==
hpf_change = desired_log2_pwr - actual_log2_pwr;
curr_hpf += hpf_change;
- curr_hpf = max(min(curr_hpf, 10), 0);
+ curr_hpf = max(min_t(u16, curr_hpf, 10), 0);
if (use_hpf_num == 1) {
curr_hpf1 = curr_hpf;
} else {
s32 phy_a3, phy_a4, phy_a5, phy_a6, phy_a7;
phy_a1 = end - min(end, (winsz >> 1));
- phy_a2 = min(NPHY_PAPD_EPS_TBL_SIZE - 1, end + (winsz >> 1));
+ phy_a2 = min_t(u32, NPHY_PAPD_EPS_TBL_SIZE - 1, end + (winsz >> 1));
phy_a3 = phy_a2 - phy_a1 + 1;
phy_a6 = 0;
phy_a7 = 0;