wlapi_bmac_read_shm((pi)->sh->physhim, M_UCODE_MACSTAT + OFFSETOF(macstat_t, txallfrm))
typedef struct {
- uint16 gm_gain;
- uint16 pga_gain;
- uint16 pad_gain;
- uint16 dac_gain;
+ u16 gm_gain;
+ u16 pga_gain;
+ u16 pad_gain;
+ u16 dac_gain;
} lcnphy_txgains_t;
typedef enum {
} lcnphy_spb_tone_t;
typedef struct {
- uint16 re;
- uint16 im;
+ u16 re;
+ u16 im;
} lcnphy_unsign16_struct;
typedef struct {
} lcnphy_iq_est_t;
typedef struct {
- uint16 ptcentreTs20;
- uint16 ptcentreFactor;
+ u16 ptcentreTs20;
+ u16 ptcentreFactor;
} lcnphy_sfo_cfg_t;
typedef enum {
LCNPHY_PAPD_CAL_OFDM
} lcnphy_papd_cal_type_t;
-typedef uint16 iqcal_gain_params_lcnphy[9];
+typedef u16 iqcal_gain_params_lcnphy[9];
static const iqcal_gain_params_lcnphy tbl_iqcal_gainparams_lcnphy_2G[] = {
{0, 0, 0, 0, 0, 0, 0, 0, 0},
tbl_iqcal_gainparams_lcnphy_2G,
};
-static const uint16 iqcal_gainparams_numgains_lcnphy[1] = {
+static const u16 iqcal_gainparams_numgains_lcnphy[1] = {
sizeof(tbl_iqcal_gainparams_lcnphy_2G) /
sizeof(*tbl_iqcal_gainparams_lcnphy_2G),
};
};
static const
-uint16 lcnphy_iqcal_loft_gainladder[] = {
+u16 lcnphy_iqcal_loft_gainladder[] = {
((2 << 8) | 0),
((3 << 8) | 0),
((4 << 8) | 0),
};
static const
-uint16 lcnphy_iqcal_ir_gainladder[] = {
+u16 lcnphy_iqcal_ir_gainladder[] = {
((1 << 8) | 0),
((2 << 8) | 0),
((4 << 8) | 0),
};
static const
-uint16 iqlo_loopback_rf_regs[20] = {
+u16 iqlo_loopback_rf_regs[20] = {
RADIO_2064_REG036,
RADIO_2064_REG11A,
RADIO_2064_REG03A,
};
static const
-uint16 tempsense_phy_regs[14] = {
+u16 tempsense_phy_regs[14] = {
0x503,
0x4a4,
0x4d0,
};
static const
-uint16 rxiq_cal_rf_reg[11] = {
+u16 rxiq_cal_rf_reg[11] = {
RADIO_2064_REG098,
RADIO_2064_REG116,
RADIO_2064_REG12C,
#define LCNPHY_NUM_DIG_FILT_COEFFS 16
#define LCNPHY_NUM_TX_DIG_FILTERS_CCK 13
-uint16
+u16
LCNPHY_txdigfiltcoeffs_cck[LCNPHY_NUM_TX_DIG_FILTERS_CCK]
[LCNPHY_NUM_DIG_FILT_COEFFS + 1] = {
{0, 1, 415, 1874, 64, 128, 64, 792, 1656, 64, 128, 64, 778, 1582, 64,
};
#define LCNPHY_NUM_TX_DIG_FILTERS_OFDM 3
-uint16
+u16
LCNPHY_txdigfiltcoeffs_ofdm[LCNPHY_NUM_TX_DIG_FILTERS_OFDM]
[LCNPHY_NUM_DIG_FILT_COEFFS + 1] = {
{0, 0, 0xa2, 0x0, 0x100, 0x100, 0x0, 0x0, 0x0, 0x100, 0x0, 0x0,
#define wlc_lcnphy_set_start_tx_pwr_idx(pi, idx) \
mod_phy_reg(pi, 0x4a4, \
(0x1ff << 0), \
- (uint16)(idx) << 0)
+ (u16)(idx) << 0)
#define wlc_lcnphy_set_tx_pwr_npt(pi, npt) \
mod_phy_reg(pi, 0x4a5, \
(0x7 << 8), \
- (uint16)(npt) << 8)
+ (u16)(npt) << 8)
#define wlc_lcnphy_get_tx_pwr_ctrl(pi) \
(read_phy_reg((pi), 0x4a4) & \
#define wlc_lcnphy_set_target_tx_pwr(pi, target) \
mod_phy_reg(pi, 0x4a7, \
(0xff << 0), \
- (uint16)(target) << 0)
+ (u16)(target) << 0)
#define wlc_radio_2064_rcal_done(pi) (0 != (read_radio_reg(pi, RADIO_2064_REG05C) & 0x20))
#define tempsense_done(pi) (0x8000 == (read_phy_reg(pi, 0x476) & 0x8000))
static uint32 wlc_lcnphy_qdiv_roundup(uint32 divident, uint32 divisor,
u8 precision);
static void wlc_lcnphy_set_rx_gain_by_distribution(phy_info_t *pi,
- uint16 ext_lna, uint16 trsw,
- uint16 biq2, uint16 biq1,
- uint16 tia, uint16 lna2,
- uint16 lna1);
+ u16 ext_lna, u16 trsw,
+ u16 biq2, u16 biq1,
+ u16 tia, u16 lna2,
+ u16 lna1);
static void wlc_lcnphy_clear_tx_power_offsets(phy_info_t *pi);
-static void wlc_lcnphy_set_pa_gain(phy_info_t *pi, uint16 gain);
+static void wlc_lcnphy_set_pa_gain(phy_info_t *pi, u16 gain);
static void wlc_lcnphy_set_trsw_override(phy_info_t *pi, bool tx, bool rx);
static void wlc_lcnphy_set_bbmult(phy_info_t *pi, u8 m0);
static u8 wlc_lcnphy_get_bbmult(phy_info_t *pi);
static void wlc_lcnphy_rx_gain_override_enable(phy_info_t *pi, bool enable);
static void wlc_lcnphy_set_tx_gain(phy_info_t *pi,
lcnphy_txgains_t *target_gains);
-static bool wlc_lcnphy_rx_iq_est(phy_info_t *pi, uint16 num_samps,
+static bool wlc_lcnphy_rx_iq_est(phy_info_t *pi, u16 num_samps,
u8 wait_time, lcnphy_iq_est_t *iq_est);
-static bool wlc_lcnphy_calc_rx_iq_comp(phy_info_t *pi, uint16 num_samps);
-static uint16 wlc_lcnphy_get_pa_gain(phy_info_t *pi);
+static bool wlc_lcnphy_calc_rx_iq_comp(phy_info_t *pi, u16 num_samps);
+static u16 wlc_lcnphy_get_pa_gain(phy_info_t *pi);
static void wlc_lcnphy_afe_clk_init(phy_info_t *pi, u8 mode);
extern void wlc_lcnphy_tx_pwr_ctrl_init(wlc_phy_t *ppi);
extern void wlc_lcnphy_pktengtx(wlc_phy_t *ppi, wl_pkteng_t *pkteng,
const lcnphy_tx_gain_tbl_entry *g);
static void wlc_lcnphy_samp_cap(phy_info_t *pi, int clip_detect_algo,
- uint16 thresh, int16 *ptr, int mode);
+ u16 thresh, int16 *ptr, int mode);
static int wlc_lcnphy_calc_floor(int16 coeff, int type);
static void wlc_lcnphy_tx_iqlo_loopback(phy_info_t *pi,
- uint16 *values_to_save);
+ u16 *values_to_save);
static void wlc_lcnphy_tx_iqlo_loopback_cleanup(phy_info_t *pi,
- uint16 *values_to_save);
+ u16 *values_to_save);
static void wlc_lcnphy_set_cc(phy_info_t *pi, int cal_type, int16 coeff_x,
int16 coeff_y);
static lcnphy_unsign16_struct wlc_lcnphy_get_cc(phy_info_t *pi, int cal_type);
static void wlc_lcnphy_txrx_spur_avoidance_mode(phy_info_t *pi, bool enable);
static int wlc_lcnphy_load_tx_iir_filter(phy_info_t *pi, bool is_ofdm,
int16 filt_type);
-static void wlc_lcnphy_set_rx_iq_comp(phy_info_t *pi, uint16 a, uint16 b);
+static void wlc_lcnphy_set_rx_iq_comp(phy_info_t *pi, u16 a, u16 b);
void wlc_lcnphy_write_table(phy_info_t *pi, const phytbl_info_t *pti)
{
return index;
}
-static uint32 wlc_lcnphy_measure_digital_power(phy_info_t *pi, uint16 nsamples)
+static uint32 wlc_lcnphy_measure_digital_power(phy_info_t *pi, u16 nsamples)
{
lcnphy_iq_est_t iq_est = { 0, 0, 0 };
void wlc_lcnphy_crsuprs(phy_info_t *pi, int channel)
{
- uint16 afectrlovr, afectrlovrval;
+ u16 afectrlovr, afectrlovrval;
afectrlovr = read_phy_reg(pi, 0x43b);
afectrlovrval = read_phy_reg(pi, 0x43c);
if (channel != 0) {
static void wlc_lcnphy_toggle_afe_pwdn(phy_info_t *pi)
{
- uint16 save_AfeCtrlOvrVal, save_AfeCtrlOvr;
+ u16 save_AfeCtrlOvrVal, save_AfeCtrlOvr;
save_AfeCtrlOvrVal = read_phy_reg(pi, 0x43c);
save_AfeCtrlOvr = read_phy_reg(pi, 0x43b);
}
-static void wlc_lcnphy_set_dac_gain(phy_info_t *pi, uint16 dac_gain)
+static void wlc_lcnphy_set_dac_gain(phy_info_t *pi, u16 dac_gain)
{
- uint16 dac_ctrl;
+ u16 dac_ctrl;
dac_ctrl = (read_phy_reg(pi, 0x439) >> 0);
dac_ctrl = dac_ctrl & 0xc7f;
static void wlc_lcnphy_set_tx_gain_override(phy_info_t *pi, bool bEnable)
{
- uint16 bit = bEnable ? 1 : 0;
+ u16 bit = bEnable ? 1 : 0;
mod_phy_reg(pi, 0x4b0, (0x1 << 7), bit << 7);
mod_phy_reg(pi, 0x43b, (0x1 << 6), bit << 6);
}
-static uint16 wlc_lcnphy_get_pa_gain(phy_info_t *pi)
+static u16 wlc_lcnphy_get_pa_gain(phy_info_t *pi)
{
- uint16 pa_gain;
+ u16 pa_gain;
pa_gain = (read_phy_reg(pi, 0x4fb) &
LCNPHY_txgainctrlovrval1_pagain_ovr_val1_MASK) >>
static void
wlc_lcnphy_set_tx_gain(phy_info_t *pi, lcnphy_txgains_t *target_gains)
{
- uint16 pa_gain = wlc_lcnphy_get_pa_gain(pi);
+ u16 pa_gain = wlc_lcnphy_get_pa_gain(pi);
mod_phy_reg(pi, 0x4b5,
(0xffff << 0),
static void wlc_lcnphy_set_bbmult(phy_info_t *pi, u8 m0)
{
- uint16 m0m1 = (uint16) m0 << 8;
+ u16 m0m1 = (u16) m0 << 8;
phytbl_info_t tab;
tab.tbl_ptr = &m0m1;
}
}
-static uint16 wlc_lcnphy_rfseq_tbl_adc_pwrup(phy_info_t *pi)
+static u16 wlc_lcnphy_rfseq_tbl_adc_pwrup(phy_info_t *pi)
{
- uint16 N1, N2, N3, N4, N5, N6, N;
+ u16 N1, N2, N3, N4, N5, N6, N;
N1 = ((read_phy_reg(pi, 0x4a5) & (0xff << 0))
>> 0);
N2 = 1 << ((read_phy_reg(pi, 0x4a5) & (0x7 << 12))
static void wlc_lcnphy_pwrctrl_rssiparams(phy_info_t *pi)
{
- uint16 auxpga_vmid, auxpga_vmid_temp, auxpga_gain_temp;
+ u16 auxpga_vmid, auxpga_vmid_temp, auxpga_gain_temp;
phy_info_lcnphy_t *pi_lcn = pi->u.pi_lcnphy;
auxpga_vmid =
void wlc_lcnphy_tx_pwr_update_npt(phy_info_t *pi)
{
- uint16 tx_cnt, tx_total, npt;
+ u16 tx_cnt, tx_total, npt;
phy_info_lcnphy_t *pi_lcn = pi->u.pi_lcnphy;
tx_total = wlc_lcnphy_total_tx_frames(pi);
uint32 cck_offset[4] = { 22, 22, 22, 22 };
uint32 ofdm_offset, reg_offset_cck;
int i;
- uint16 index2;
+ u16 index2;
phytbl_info_t tab;
if (wlc_lcnphy_tssi_based_pwr_ctrl_enabled(pi))
mod_phy_reg(pi, 0x4a9, (0x1 << 15), (1) << 15);
- index2 = (uint16) (index * 2);
+ index2 = (u16) (index * 2);
mod_phy_reg(pi, 0x4a9, (0x1ff << 0), (index2) << 0);
mod_phy_reg(pi, 0x6a3, (0x1 << 4), (0) << 4);
s8 index, delta_brd, delta_temp, new_index, tempcorrx;
int16 manp, meas_temp, temp_diff;
bool neg = 0;
- uint16 temp;
+ u16 temp;
phy_info_lcnphy_t *pi_lcn = pi->u.pi_lcnphy;
if (wlc_lcnphy_tssi_based_pwr_ctrl_enabled(pi))
if (pi_lcn->lcnphy_tempsense_slope == 0) {
return index;
}
- temp = (uint16) wlc_lcnphy_tempsense(pi, 0);
+ temp = (u16) wlc_lcnphy_tempsense(pi, 0);
meas_temp = LCNPHY_TEMPSENSE(temp);
if (pi->tx_power_min != 0) {
return new_index;
}
-static uint16 wlc_lcnphy_set_tx_pwr_ctrl_mode(phy_info_t *pi, uint16 mode)
+static u16 wlc_lcnphy_set_tx_pwr_ctrl_mode(phy_info_t *pi, u16 mode)
{
- uint16 current_mode = mode;
+ u16 current_mode = mode;
if (wlc_lcnphy_tempsense_based_pwr_ctrl_enabled(pi) &&
mode == LCNPHY_TX_PWR_CTRL_HW)
current_mode = LCNPHY_TX_PWR_CTRL_TEMPBASED;
return current_mode;
}
-void wlc_lcnphy_set_tx_pwr_ctrl(phy_info_t *pi, uint16 mode)
+void wlc_lcnphy_set_tx_pwr_ctrl(phy_info_t *pi, u16 mode)
{
- uint16 old_mode = wlc_lcnphy_get_tx_pwr_ctrl(pi);
+ u16 old_mode = wlc_lcnphy_get_tx_pwr_ctrl(pi);
s8 index;
phy_info_lcnphy_t *pi_lcn = pi->u.pi_lcnphy;
{
lcnphy_txgains_t cal_gains, temp_gains;
- uint16 hash;
+ u16 hash;
u8 band_idx;
int j;
- uint16 ncorr_override[5];
- uint16 syst_coeffs[] = { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ u16 ncorr_override[5];
+ u16 syst_coeffs[] = { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000
};
- uint16 commands_fullcal[] = {
+ u16 commands_fullcal[] = {
0x8434, 0x8334, 0x8084, 0x8267, 0x8056, 0x8234 };
- uint16 commands_recal[] = {
+ u16 commands_recal[] = {
0x8434, 0x8334, 0x8084, 0x8267, 0x8056, 0x8234 };
- uint16 command_nums_fullcal[] = {
+ u16 command_nums_fullcal[] = {
0x7a97, 0x7a97, 0x7a97, 0x7a87, 0x7a87, 0x7b97 };
- uint16 command_nums_recal[] = {
+ u16 command_nums_recal[] = {
0x7a97, 0x7a97, 0x7a97, 0x7a87, 0x7a87, 0x7b97 };
- uint16 *command_nums = command_nums_fullcal;
+ u16 *command_nums = command_nums_fullcal;
- uint16 *start_coeffs = NULL, *cal_cmds = NULL, cal_type, diq_start;
- uint16 tx_pwr_ctrl_old, save_txpwrctrlrfctrl2;
- uint16 save_sslpnCalibClkEnCtrl, save_sslpnRxFeClkEnCtrl;
+ u16 *start_coeffs = NULL, *cal_cmds = NULL, cal_type, diq_start;
+ u16 tx_pwr_ctrl_old, save_txpwrctrlrfctrl2;
+ u16 save_sslpnCalibClkEnCtrl, save_sslpnRxFeClkEnCtrl;
bool tx_gain_override_old;
lcnphy_txgains_t old_gains;
uint i, n_cal_cmds = 0, n_cal_start = 0;
- uint16 *values_to_save;
+ u16 *values_to_save;
phy_info_lcnphy_t *pi_lcn = pi->u.pi_lcnphy;
if (NORADIO_ENAB(pi->pubpi))
return;
- values_to_save = MALLOC(pi->sh->osh, sizeof(uint16) * 20);
+ values_to_save = MALLOC(pi->sh->osh, sizeof(u16) * 20);
if (NULL == values_to_save) {
return;
}
write_phy_reg(pi, 0x6da, 0xffff);
for (i = n_cal_start; i < n_cal_cmds; i++) {
- uint16 zero_diq = 0;
- uint16 best_coeffs[11];
- uint16 command_num;
+ u16 zero_diq = 0;
+ u16 best_coeffs[11];
+ u16 command_num;
cal_type = (cal_cmds[i] & 0x0f00) >> 8;
cleanup:
wlc_lcnphy_tx_iqlo_loopback_cleanup(pi, values_to_save);
- MFREE(pi->sh->osh, values_to_save, 20 * sizeof(uint16));
+ MFREE(pi->sh->osh, values_to_save, 20 * sizeof(u16));
if (!keep_tone)
wlc_lcnphy_stop_tx_tone(pi);
bool suspend, tx_gain_override_old;
lcnphy_txgains_t old_gains;
phy_info_t *pi = (phy_info_t *) ppi;
- uint16 idleTssi, idleTssi0_2C, idleTssi0_OB, idleTssi0_regvalue_OB,
+ u16 idleTssi, idleTssi0_2C, idleTssi0_OB, idleTssi0_regvalue_OB,
idleTssi0_regvalue_2C;
- uint16 SAVE_txpwrctrl = wlc_lcnphy_get_tx_pwr_ctrl(pi);
- uint16 SAVE_lpfgain = read_radio_reg(pi, RADIO_2064_REG112);
- uint16 SAVE_jtag_bb_afe_switch =
+ u16 SAVE_txpwrctrl = wlc_lcnphy_get_tx_pwr_ctrl(pi);
+ u16 SAVE_lpfgain = read_radio_reg(pi, RADIO_2064_REG112);
+ u16 SAVE_jtag_bb_afe_switch =
read_radio_reg(pi, RADIO_2064_REG007) & 1;
- uint16 SAVE_jtag_auxpga = read_radio_reg(pi, RADIO_2064_REG0FF) & 0x10;
- uint16 SAVE_iqadc_aux_en = read_radio_reg(pi, RADIO_2064_REG11F) & 4;
+ u16 SAVE_jtag_auxpga = read_radio_reg(pi, RADIO_2064_REG0FF) & 0x10;
+ u16 SAVE_iqadc_aux_en = read_radio_reg(pi, RADIO_2064_REG11F) & 4;
idleTssi = read_phy_reg(pi, 0x4ab);
suspend =
(0 ==
static void wlc_lcnphy_vbat_temp_sense_setup(phy_info_t *pi, u8 mode)
{
bool suspend;
- uint16 save_txpwrCtrlEn;
+ u16 save_txpwrCtrlEn;
u8 auxpga_vmidcourse, auxpga_vmidfine, auxpga_gain;
- uint16 auxpga_vmid;
+ u16 auxpga_vmid;
phytbl_info_t tab;
uint32 val;
u8 save_reg007, save_reg0FF, save_reg11F, save_reg005, save_reg025,
save_reg112;
- uint16 values_to_save[14];
+ u16 values_to_save[14];
s8 index;
int i;
phy_info_lcnphy_t *pi_lcn = pi->u.pi_lcnphy;
auxpga_gain = 2;
}
auxpga_vmid =
- (uint16) ((2 << 8) | (auxpga_vmidcourse << 4) | auxpga_vmidfine);
+ (u16) ((2 << 8) | (auxpga_vmidcourse << 4) | auxpga_vmidfine);
mod_phy_reg(pi, 0x4d8, (0x1 << 0), (1) << 0);
mod_phy_reg(pi, 0x4d8, (0x3ff << 2), (auxpga_vmid) << 2);
if (!tempsense_done(pi))
OSL_DELAY(10);
- write_radio_reg(pi, RADIO_2064_REG007, (uint16) save_reg007);
- write_radio_reg(pi, RADIO_2064_REG0FF, (uint16) save_reg0FF);
- write_radio_reg(pi, RADIO_2064_REG11F, (uint16) save_reg11F);
- write_radio_reg(pi, RADIO_2064_REG005, (uint16) save_reg005);
- write_radio_reg(pi, RADIO_2064_REG025, (uint16) save_reg025);
- write_radio_reg(pi, RADIO_2064_REG112, (uint16) save_reg112);
+ write_radio_reg(pi, RADIO_2064_REG007, (u16) save_reg007);
+ write_radio_reg(pi, RADIO_2064_REG0FF, (u16) save_reg0FF);
+ write_radio_reg(pi, RADIO_2064_REG11F, (u16) save_reg11F);
+ write_radio_reg(pi, RADIO_2064_REG005, (u16) save_reg005);
+ write_radio_reg(pi, RADIO_2064_REG025, (u16) save_reg025);
+ write_radio_reg(pi, RADIO_2064_REG112, (u16) save_reg112);
for (i = 0; i < 14; i++)
write_phy_reg(pi, tempsense_phy_regs[i], values_to_save[i]);
wlc_lcnphy_set_tx_pwr_by_index(pi, (int)index);
static u8 wlc_lcnphy_get_bbmult(phy_info_t *pi)
{
- uint16 m0m1;
+ u16 m0m1;
phytbl_info_t tab;
tab.tbl_ptr = &m0m1;
return (u8) ((m0m1 & 0xff00) >> 8);
}
-static void wlc_lcnphy_set_pa_gain(phy_info_t *pi, uint16 gain)
+static void wlc_lcnphy_set_pa_gain(phy_info_t *pi, u16 gain)
{
mod_phy_reg(pi, 0x4fb,
LCNPHY_txgainctrlovrval1_pagain_ovr_val1_MASK,
static void wlc_lcnphy_get_tx_gain(phy_info_t *pi, lcnphy_txgains_t *gains)
{
- uint16 dac_gain;
+ u16 dac_gain;
dac_gain = read_phy_reg(pi, 0x439) >> 0;
gains->dac_gain = (dac_gain & 0x380) >> 7;
{
- uint16 rfgain0, rfgain1;
+ u16 rfgain0, rfgain1;
rfgain0 = (read_phy_reg(pi, 0x4b5) & (0xffff << 0)) >> 0;
rfgain1 = (read_phy_reg(pi, 0x4fb) & (0x7fff << 0)) >> 0;
}
}
-void wlc_lcnphy_set_tx_iqcc(phy_info_t *pi, uint16 a, uint16 b)
+void wlc_lcnphy_set_tx_iqcc(phy_info_t *pi, u16 a, u16 b)
{
phytbl_info_t tab;
- uint16 iqcc[2];
+ u16 iqcc[2];
iqcc[0] = a;
iqcc[1] = b;
wlc_lcnphy_write_table(pi, &tab);
}
-void wlc_lcnphy_set_tx_locc(phy_info_t *pi, uint16 didq)
+void wlc_lcnphy_set_tx_locc(phy_info_t *pi, u16 didq)
{
phytbl_info_t tab;
void wlc_lcnphy_set_tx_pwr_by_index(phy_info_t *pi, int index)
{
phytbl_info_t tab;
- uint16 a, b;
+ u16 a, b;
u8 bb_mult;
uint32 bbmultiqcomp, txgain, locoeffs, rfpower;
lcnphy_txgains_t gains;
tab.tbl_ptr = &txgain;
wlc_lcnphy_read_table(pi, &tab);
- gains.gm_gain = (uint16) (txgain & 0xff);
- gains.pga_gain = (uint16) (txgain >> 8) & 0xff;
- gains.pad_gain = (uint16) (txgain >> 16) & 0xff;
- gains.dac_gain = (uint16) (bbmultiqcomp >> 28) & 0x07;
+ gains.gm_gain = (u16) (txgain & 0xff);
+ gains.pga_gain = (u16) (txgain >> 8) & 0xff;
+ gains.pad_gain = (u16) (txgain >> 16) & 0xff;
+ gains.dac_gain = (u16) (bbmultiqcomp >> 28) & 0x07;
wlc_lcnphy_set_tx_gain(pi, &gains);
- wlc_lcnphy_set_pa_gain(pi, (uint16) (txgain >> 24) & 0x7f);
+ wlc_lcnphy_set_pa_gain(pi, (u16) (txgain >> 24) & 0x7f);
bb_mult = (u8) ((bbmultiqcomp >> 20) & 0xff);
wlc_lcnphy_set_bbmult(pi, bb_mult);
if (!wlc_lcnphy_tempsense_based_pwr_ctrl_enabled(pi)) {
- a = (uint16) ((bbmultiqcomp >> 10) & 0x3ff);
- b = (uint16) (bbmultiqcomp & 0x3ff);
+ a = (u16) ((bbmultiqcomp >> 10) & 0x3ff);
+ b = (u16) (bbmultiqcomp & 0x3ff);
wlc_lcnphy_set_tx_iqcc(pi, a, b);
tab.tbl_offset = LCNPHY_TX_PWR_CTRL_LO_OFFSET + index;
tab.tbl_ptr = &locoeffs;
wlc_lcnphy_read_table(pi, &tab);
- wlc_lcnphy_set_tx_locc(pi, (uint16) locoeffs);
+ wlc_lcnphy_set_tx_locc(pi, (u16) locoeffs);
tab.tbl_offset = LCNPHY_TX_PWR_CTRL_PWR_OFFSET + index;
tab.tbl_ptr = &rfpower;
static void
wlc_lcnphy_set_rx_gain_by_distribution(phy_info_t *pi,
- uint16 trsw,
- uint16 ext_lna,
- uint16 biq2,
- uint16 biq1,
- uint16 tia, uint16 lna2, uint16 lna1)
+ u16 trsw,
+ u16 ext_lna,
+ u16 biq2,
+ u16 biq1,
+ u16 tia, u16 lna2, u16 lna1)
{
- uint16 gain0_15, gain16_19;
+ u16 gain0_15, gain16_19;
gain16_19 = biq2 & 0xf;
gain0_15 = ((biq1 & 0xf) << 12) |
static void wlc_lcnphy_rx_gain_override_enable(phy_info_t *pi, bool enable)
{
- uint16 ebit = enable ? 1 : 0;
+ u16 ebit = enable ? 1 : 0;
mod_phy_reg(pi, 0x4b0, (0x1 << 8), ebit << 8);
{
if (!bEnable) {
- and_phy_reg(pi, 0x43b, ~(uint16) ((0x1 << 1) | (0x1 << 4)));
+ and_phy_reg(pi, 0x43b, ~(u16) ((0x1 << 1) | (0x1 << 4)));
mod_phy_reg(pi, 0x43c, (0x1 << 1), 1 << 1);
and_phy_reg(pi, 0x44c,
- ~(uint16) ((0x1 << 3) |
+ ~(u16) ((0x1 << 3) |
(0x1 << 5) |
(0x1 << 12) |
(0x1 << 0) | (0x1 << 1) | (0x1 << 2)));
and_phy_reg(pi, 0x44d,
- ~(uint16) ((0x1 << 3) | (0x1 << 5) | (0x1 << 14)));
+ ~(u16) ((0x1 << 3) | (0x1 << 5) | (0x1 << 14)));
mod_phy_reg(pi, 0x44d, (0x1 << 2), 1 << 2);
mod_phy_reg(pi, 0x44d, (0x1 << 1) | (0x1 << 0), (0x1 << 0));
and_phy_reg(pi, 0x4f9,
- ~(uint16) ((0x1 << 0) | (0x1 << 1) | (0x1 << 2)));
+ ~(u16) ((0x1 << 0) | (0x1 << 1) | (0x1 << 2)));
and_phy_reg(pi, 0x4fa,
- ~(uint16) ((0x1 << 0) | (0x1 << 1) | (0x1 << 2)));
+ ~(u16) ((0x1 << 0) | (0x1 << 1) | (0x1 << 2)));
} else {
mod_phy_reg(pi, 0x43b, (0x1 << 1), 1 << 1);
static void
wlc_lcnphy_run_samples(phy_info_t *pi,
- uint16 num_samps,
- uint16 num_loops, uint16 wait, bool iqcalmode)
+ u16 num_samps,
+ u16 num_loops, u16 wait, bool iqcalmode)
{
or_phy_reg(pi, 0x6da, 0x8080);
if (iqcalmode) {
- and_phy_reg(pi, 0x453, (uint16) ~(0x1 << 15));
+ and_phy_reg(pi, 0x453, (u16) ~(0x1 << 15));
or_phy_reg(pi, 0x453, (0x1 << 15));
} else {
write_phy_reg(pi, 0x63f, 1);
}
void
-wlc_lcnphy_start_tx_tone(phy_info_t *pi, int32 f_kHz, uint16 max_val,
+wlc_lcnphy_start_tx_tone(phy_info_t *pi, int32 f_kHz, u16 max_val,
bool iqcalmode)
{
u8 phy_bw;
- uint16 num_samps, t, k;
+ u16 num_samps, t, k;
uint32 bw;
fixed theta = 0, rot = 0;
cint32 tone_samp;
uint32 data_buf[64];
- uint16 i_samp, q_samp;
+ u16 i_samp, q_samp;
phytbl_info_t tab;
phy_info_lcnphy_t *pi_lcn = pi->u.pi_lcnphy;
theta += rot;
- i_samp = (uint16) (FLOAT(tone_samp.i * max_val) & 0x3ff);
- q_samp = (uint16) (FLOAT(tone_samp.q * max_val) & 0x3ff);
+ i_samp = (u16) (FLOAT(tone_samp.i * max_val) & 0x3ff);
+ q_samp = (u16) (FLOAT(tone_samp.q * max_val) & 0x3ff);
data_buf[t] = (i_samp << 10) | q_samp;
}
static void wlc_lcnphy_clear_trsw_override(phy_info_t *pi)
{
- and_phy_reg(pi, 0x44c, (uint16) ~((0x1 << 1) | (0x1 << 0)));
+ and_phy_reg(pi, 0x44c, (u16) ~((0x1 << 1) | (0x1 << 0)));
}
-void wlc_lcnphy_get_tx_iqcc(phy_info_t *pi, uint16 *a, uint16 *b)
+void wlc_lcnphy_get_tx_iqcc(phy_info_t *pi, u16 *a, u16 *b)
{
- uint16 iqcc[2];
+ u16 iqcc[2];
phytbl_info_t tab;
tab.tbl_ptr = iqcc;
*b = iqcc[1];
}
-uint16 wlc_lcnphy_get_tx_locc(phy_info_t *pi)
+u16 wlc_lcnphy_get_tx_locc(phy_info_t *pi)
{
phytbl_info_t tab;
- uint16 didq;
+ u16 didq;
tab.tbl_id = 0;
tab.tbl_width = 16;
lcnphy_txgains_t target_gains, old_gains;
u8 save_bb_mult;
- uint16 a, b, didq, save_pa_gain = 0;
+ u16 a, b, didq, save_pa_gain = 0;
uint idx, SAVE_txpwrindex = 0xFF;
uint32 val;
- uint16 SAVE_txpwrctrl = wlc_lcnphy_get_tx_pwr_ctrl(pi);
+ u16 SAVE_txpwrctrl = wlc_lcnphy_get_tx_pwr_ctrl(pi);
phytbl_info_t tab;
u8 ei0, eq0, fi0, fq0;
phy_info_lcnphy_t *pi_lcn = pi->u.pi_lcnphy;
int16 wlc_lcnphy_tempsense_new(phy_info_t *pi, bool mode)
{
- uint16 tempsenseval1, tempsenseval2;
+ u16 tempsenseval1, tempsenseval2;
int16 avg = 0;
bool suspend = 0;
return avg;
}
-uint16 wlc_lcnphy_tempsense(phy_info_t *pi, bool mode)
+u16 wlc_lcnphy_tempsense(phy_info_t *pi, bool mode)
{
- uint16 tempsenseval1, tempsenseval2;
+ u16 tempsenseval1, tempsenseval2;
int32 avg = 0;
bool suspend = 0;
- uint16 SAVE_txpwrctrl = wlc_lcnphy_get_tx_pwr_ctrl(pi);
+ u16 SAVE_txpwrctrl = wlc_lcnphy_get_tx_pwr_ctrl(pi);
phy_info_lcnphy_t *pi_lcn = pi->u.pi_lcnphy;
if (NORADIO_ENAB(pi->pubpi))
if (!suspend)
wlapi_enable_mac(pi->sh->physhim);
}
- return (uint16) avg;
+ return (u16) avg;
}
s8 wlc_lcnphy_tempsense_degree(phy_info_t *pi, bool mode)
s8 wlc_lcnphy_vbatsense(phy_info_t *pi, bool mode)
{
- uint16 vbatsenseval;
+ u16 vbatsenseval;
int32 avg = 0;
bool suspend = 0;
static bool
wlc_lcnphy_rx_iq_est(phy_info_t *pi,
- uint16 num_samps,
+ u16 num_samps,
u8 wait_time, lcnphy_iq_est_t *iq_est)
{
int wait_count = 0;
mod_phy_reg(pi, 0x482, (0xffff << 0), (num_samps) << 0);
- mod_phy_reg(pi, 0x481, (0xff << 0), ((uint16) wait_time) << 0);
+ mod_phy_reg(pi, 0x481, (0xff << 0), ((u16) wait_time) << 0);
mod_phy_reg(pi, 0x481, (0x1 << 8), (0) << 8);
return result;
}
-static bool wlc_lcnphy_calc_rx_iq_comp(phy_info_t *pi, uint16 num_samps)
+static bool wlc_lcnphy_calc_rx_iq_comp(phy_info_t *pi, u16 num_samps)
{
#define LCNPHY_MIN_RXIQ_PWR 2
bool result;
- uint16 a0_new, b0_new;
+ u16 a0_new, b0_new;
lcnphy_iq_est_t iq_est = { 0, 0, 0 };
int32 a, b, temp;
int16 iq_nbits, qq_nbits, arsh, brsh;
b -= a * a;
b = (int32) wlc_phy_sqrt_int((uint32) b);
b -= (1 << 10);
- a0_new = (uint16) (a & 0x3ff);
- b0_new = (uint16) (b & 0x3ff);
+ a0_new = (u16) (a & 0x3ff);
+ b0_new = (u16) (b & 0x3ff);
cleanup:
wlc_lcnphy_set_rx_iq_comp(pi, a0_new, b0_new);
int tx_gain_idx)
{
lcnphy_txgains_t old_gains;
- uint16 tx_pwr_ctrl;
+ u16 tx_pwr_ctrl;
u8 tx_gain_index_old = 0;
bool result = FALSE, tx_gain_override_old = FALSE;
- uint16 i, Core1TxControl_old, RFOverride0_old,
+ u16 i, Core1TxControl_old, RFOverride0_old,
RFOverrideVal0_old, rfoverride2_old, rfoverride2val_old,
rfoverride3_old, rfoverride3val_old, rfoverride4_old,
rfoverride4val_old, afectrlovr_old, afectrlovrval_old;
int tia_gain;
uint32 received_power, rx_pwr_threshold;
- uint16 old_sslpnCalibClkEnCtrl, old_sslpnRxFeClkEnCtrl;
- uint16 values_to_save[11];
+ u16 old_sslpnCalibClkEnCtrl, old_sslpnRxFeClkEnCtrl;
+ u16 values_to_save[11];
int16 *ptr;
phy_info_lcnphy_t *pi_lcn = pi->u.pi_lcnphy;
CHSPEC_CHANNEL(pi->radio_chanspec)) {
wlc_lcnphy_set_rx_iq_comp(pi,
- (uint16)
+ (u16)
iqcomp[iqcomp_sz].a,
- (uint16)
+ (u16)
iqcomp[iqcomp_sz].b);
result = TRUE;
break;
tia_gain -= 1;
wlc_lcnphy_set_rx_gain_by_distribution(pi,
0, 0, 2, 2,
- (uint16)
+ (u16)
tia_gain, 1, 0);
OSL_DELAY(500);
{
bool suspend;
s8 index;
- uint16 SAVE_pwrctrl = wlc_lcnphy_get_tx_pwr_ctrl(pi);
+ u16 SAVE_pwrctrl = wlc_lcnphy_get_tx_pwr_ctrl(pi);
phy_info_lcnphy_t *pi_lcn = pi->u.pi_lcnphy;
suspend =
(0 == (R_REG(pi->sh->osh, &pi->regs->maccontrol) & MCTL_EN_MAC));
bool suspend, full_cal;
const lcnphy_rx_iqcomp_t *rx_iqcomp;
int rx_iqcomp_sz;
- uint16 SAVE_pwrctrl = wlc_lcnphy_get_tx_pwr_ctrl(pi);
+ u16 SAVE_pwrctrl = wlc_lcnphy_get_tx_pwr_ctrl(pi);
s8 index;
phytbl_info_t tab;
int32 a1, b0, b1;
void wlc_lcnphy_calib_modes(phy_info_t *pi, uint mode)
{
- uint16 temp_new;
+ u16 temp_new;
int temp1, temp2, temp_diff;
phy_info_lcnphy_t *pi_lcn = pi->u.pi_lcnphy;
void wlc_lcnphy_get_tssi(phy_info_t *pi, s8 *ofdm_pwr, s8 *cck_pwr)
{
s8 cck_offset;
- uint16 status;
+ u16 status;
status = (read_phy_reg(pi, 0x4ab));
if (wlc_lcnphy_tssi_based_pwr_ctrl_enabled(pi) &&
(status & (0x1 << 15))) {
void wlc_lcnphy_tx_power_adjustment(wlc_phy_t *ppi)
{
s8 index;
- uint16 index2;
+ u16 index2;
phy_info_t *pi = (phy_info_t *) ppi;
phy_info_lcnphy_t *pi_lcn = pi->u.pi_lcnphy;
- uint16 SAVE_txpwrctrl = wlc_lcnphy_get_tx_pwr_ctrl(pi);
+ u16 SAVE_txpwrctrl = wlc_lcnphy_get_tx_pwr_ctrl(pi);
if (wlc_lcnphy_tempsense_based_pwr_ctrl_enabled(pi) && SAVE_txpwrctrl) {
index = wlc_lcnphy_tempcompensated_txpwrctrl(pi);
- index2 = (uint16) (index * 2);
+ index2 = (u16) (index * 2);
mod_phy_reg(pi, 0x4a9, (0x1ff << 0), (index2) << 0);
pi_lcn->lcnphy_current_index = (s8)
}
}
-static void wlc_lcnphy_set_rx_iq_comp(phy_info_t *pi, uint16 a, uint16 b)
+static void wlc_lcnphy_set_rx_iq_comp(phy_info_t *pi, u16 a, u16 b)
{
mod_phy_reg(pi, 0x645, (0x3ff << 0), (a) << 0);
}
static void
-wlc_lcnphy_tx_iqlo_loopback(phy_info_t *pi, uint16 *values_to_save)
+wlc_lcnphy_tx_iqlo_loopback(phy_info_t *pi, u16 *values_to_save)
{
- uint16 vmid;
+ u16 vmid;
int i;
for (i = 0; i < 20; i++) {
values_to_save[i] =
}
static void
-wlc_lcnphy_samp_cap(phy_info_t *pi, int clip_detect_algo, uint16 thresh,
+wlc_lcnphy_samp_cap(phy_info_t *pi, int clip_detect_algo, u16 thresh,
int16 *ptr, int mode)
{
uint32 curval1, curval2, stpptr, curptr, strptr, val;
- uint16 sslpnCalibClkEnCtrl, timer;
- uint16 old_sslpnCalibClkEnCtrl;
+ u16 sslpnCalibClkEnCtrl, timer;
+ u16 old_sslpnCalibClkEnCtrl;
int16 imag, real;
phy_info_lcnphy_t *pi_lcn = pi->u.pi_lcnphy;
write_phy_reg(pi, 0x555, 0x0);
write_phy_reg(pi, 0x5a6, 0x5);
- write_phy_reg(pi, 0x5a2, (uint16) (mode | mode << 6));
+ write_phy_reg(pi, 0x5a2, (u16) (mode | mode << 6));
write_phy_reg(pi, 0x5cf, 3);
write_phy_reg(pi, 0x5a5, 0x3);
write_phy_reg(pi, 0x583, 0x0);
static void
wlc_lcnphy_set_cc(phy_info_t *pi, int cal_type, int16 coeff_x, int16 coeff_y)
{
- uint16 di0dq0;
- uint16 x, y, data_rf;
+ u16 di0dq0;
+ u16 x, y, data_rf;
int k;
switch (cal_type) {
case 0:
static lcnphy_unsign16_struct wlc_lcnphy_get_cc(phy_info_t *pi, int cal_type)
{
- uint16 a, b, didq;
+ u16 a, b, didq;
u8 di0, dq0, ei, eq, fi, fq;
lcnphy_unsign16_struct cc;
cc.re = 0;
didq = wlc_lcnphy_get_tx_locc(pi);
di0 = (((didq & 0xff00) << 16) >> 24);
dq0 = (((didq & 0x00ff) << 24) >> 24);
- cc.re = (uint16) di0;
- cc.im = (uint16) dq0;
+ cc.re = (u16) di0;
+ cc.im = (u16) dq0;
break;
case 3:
wlc_lcnphy_get_radio_loft(pi, &ei, &eq, &fi, &fq);
- cc.re = (uint16) ei;
- cc.im = (uint16) eq;
+ cc.re = (u16) ei;
+ cc.im = (u16) eq;
break;
case 4:
wlc_lcnphy_get_radio_loft(pi, &ei, &eq, &fi, &fq);
- cc.re = (uint16) fi;
- cc.im = (uint16) fq;
+ cc.re = (u16) fi;
+ cc.im = (u16) fq;
break;
}
return cc;
lcnphy_spb_tone_t phy_c2;
lcnphy_unsign16_struct phy_c3;
int phy_c4, phy_c5, k, l, j, phy_c6;
- uint16 phy_c7, phy_c8, phy_c9;
+ u16 phy_c7, phy_c8, phy_c9;
int16 phy_c10, phy_c11, phy_c12, phy_c13, phy_c14, phy_c15, phy_c16;
int16 *ptr, phy_c17;
int32 phy_c18, phy_c19;
uint32 phy_c20, phy_c21;
bool phy_c22, phy_c23, phy_c24, phy_c25;
- uint16 phy_c26, phy_c27;
- uint16 phy_c28, phy_c29, phy_c30;
- uint16 phy_c31;
- uint16 *phy_c32;
+ u16 phy_c26, phy_c27;
+ u16 phy_c28, phy_c29, phy_c30;
+ u16 phy_c31;
+ u16 *phy_c32;
phy_c21 = 0;
phy_c10 = phy_c13 = phy_c14 = phy_c8 = 0;
ptr = MALLOC(pi->sh->osh, sizeof(int16) * 131);
return;
}
- phy_c32 = MALLOC(pi->sh->osh, sizeof(uint16) * 20);
+ phy_c32 = MALLOC(pi->sh->osh, sizeof(u16) * 20);
if (NULL == phy_c32) {
return;
}
write_phy_reg(pi, 0x4d8, phy_c30);
write_radio_reg(pi, RADIO_2064_REG026, phy_c31);
- MFREE(pi->sh->osh, phy_c32, 20 * sizeof(uint16));
+ MFREE(pi->sh->osh, phy_c32, 20 * sizeof(u16));
MFREE(pi->sh->osh, ptr, 131 * sizeof(int16));
}
static void
-wlc_lcnphy_tx_iqlo_loopback_cleanup(phy_info_t *pi, uint16 *values_to_save)
+wlc_lcnphy_tx_iqlo_loopback_cleanup(phy_info_t *pi, u16 *values_to_save)
{
int i;
uint32 j;
phytbl_info_t tab;
uint32 val;
- uint16 pa_gain;
- uint16 gm_gain;
+ u16 pa_gain;
+ u16 gm_gain;
if (CHSPEC_IS5G(pi->radio_chanspec))
pa_gain = 0x70;
static void WLBANDINITFN(wlc_lcnphy_rev0_baseband_init) (phy_info_t *pi)
{
- uint16 afectrl1;
+ u16 afectrl1;
phy_info_lcnphy_t *pi_lcn = pi->u.pi_lcnphy;
write_radio_reg(pi, RADIO_2064_REG11C, 0x0);
if (0) {
afectrl1 = 0;
- afectrl1 = (uint16) ((pi_lcn->lcnphy_rssi_vf) |
+ afectrl1 = (u16) ((pi_lcn->lcnphy_rssi_vf) |
(pi_lcn->lcnphy_rssi_vc << 4) | (pi_lcn->
lcnphy_rssi_gs
<< 10));
write_radio_reg(pi,
((lcnphyregs[i].address & 0x3fff) |
RADIO_DEFAULT_CORE),
- (uint16) lcnphyregs[i].init_a);
+ (u16) lcnphyregs[i].init_a);
else if (lcnphyregs[i].do_init_g)
write_radio_reg(pi,
((lcnphyregs[i].address & 0x3fff) |
RADIO_DEFAULT_CORE),
- (uint16) lcnphyregs[i].init_g);
+ (u16) lcnphyregs[i].init_g);
write_radio_reg(pi, RADIO_2064_REG032, 0x62);
write_radio_reg(pi, RADIO_2064_REG033, 0x19);
static void wlc_lcnphy_rc_cal(phy_info_t *pi)
{
u8 dflt_rc_cal_val;
- uint16 flt_val;
+ u16 flt_val;
if (NORADIO_ENAB(pi->pubpi))
return;
phy_info_lcnphy_t *pi_lcn = pi->u.pi_lcnphy;
if (CHSPEC_IS2G(pi->radio_chanspec)) {
- uint16 cckpo = 0;
+ u16 cckpo = 0;
uint32 offset_ofdm, offset_mcs;
pi_lcn->lcnphy_tr_isolation_mid =
pi->txpa_2g_high_temp[i] = pi->txpa_2g[i];
}
- cckpo = (uint16) PHY_GETINTVAR(pi, "cck2gpo");
+ cckpo = (u16) PHY_GETINTVAR(pi, "cck2gpo");
if (cckpo) {
uint max_pwr_chan = txpwr;
offset_ofdm >>= 4;
}
offset_mcs =
- ((uint16) PHY_GETINTVAR(pi, "mcs2gpo1") << 16) |
- (uint16) PHY_GETINTVAR(pi, "mcs2gpo0");
+ ((u16) PHY_GETINTVAR(pi, "mcs2gpo1") << 16) |
+ (u16) PHY_GETINTVAR(pi, "mcs2gpo0");
pi_lcn->lcnphy_mcs20_po = offset_mcs;
for (i = TXP_FIRST_SISO_MCS_20;
i <= TXP_LAST_SISO_MCS_20; i++) {
}
pi_lcn->lcnphy_rawtempsense =
- (uint16) PHY_GETINTVAR(pi, "rawtempsense");
+ (u16) PHY_GETINTVAR(pi, "rawtempsense");
pi_lcn->lcnphy_measPower =
(u8) PHY_GETINTVAR(pi, "measpower");
pi_lcn->lcnphy_tempsense_slope =
fixed qFxtal, qFref, qFvco, qFcal;
u8 d15, d16, f16, e44, e45;
uint32 div_int, div_frac, fvco3, fpfd, fref3, fcal_div;
- uint16 loop_bw, d30, setCount;
+ u16 loop_bw, d30, setCount;
if (NORADIO_ENAB(pi->pubpi))
return;
ci = &chan_info_2064_lcnphy[0];
{
u8 h29, h23, c28, d29, h28_ten, e30, h30_ten, cp_current;
- uint16 c29, c38, c30, g30, d28;
+ u16 c29, c38, c30, g30, d28;
c29 = loop_bw;
d29 = 200;
c38 = 1250;
void wlc_phy_txpower_recalc_target_lcnphy(phy_info_t *pi)
{
- uint16 pwr_ctrl;
+ u16 pwr_ctrl;
if (wlc_lcnphy_tempsense_based_pwr_ctrl_enabled(pi)) {
wlc_lcnphy_calib_modes(pi, LCNPHY_PERICAL_TEMPBASED_TXPWRCTRL);
} else if (wlc_lcnphy_tssi_based_pwr_ctrl_enabled(pi)) {
static void wlc_lcnphy_set_rx_gain(phy_info_t *pi, uint32 gain)
{
- uint16 trsw, ext_lna, lna1, lna2, tia, biq0, biq1, gain0_15, gain16_19;
+ u16 trsw, ext_lna, lna1, lna2, tia, biq0, biq1, gain0_15, gain16_19;
trsw = (gain & ((uint32) 1 << 28)) ? 0 : 1;
- ext_lna = (uint16) (gain >> 29) & 0x01;
- lna1 = (uint16) (gain >> 0) & 0x0f;
- lna2 = (uint16) (gain >> 4) & 0x0f;
- tia = (uint16) (gain >> 8) & 0xf;
- biq0 = (uint16) (gain >> 12) & 0xf;
- biq1 = (uint16) (gain >> 16) & 0xf;
-
- gain0_15 = (uint16) ((lna1 & 0x3) | ((lna1 & 0x3) << 2) |
+ ext_lna = (u16) (gain >> 29) & 0x01;
+ lna1 = (u16) (gain >> 0) & 0x0f;
+ lna2 = (u16) (gain >> 4) & 0x0f;
+ tia = (u16) (gain >> 8) & 0xf;
+ biq0 = (u16) (gain >> 12) & 0xf;
+ biq1 = (u16) (gain >> 16) & 0xf;
+
+ gain0_15 = (u16) ((lna1 & 0x3) | ((lna1 & 0x3) << 2) |
((lna2 & 0x3) << 4) | ((lna2 & 0x3) << 6) |
((tia & 0xf) << 8) | ((biq0 & 0xf) << 12));
gain16_19 = biq1;
int16 filt_index = -1;
int j;
- uint16 addr[] = {
+ u16 addr[] = {
0x910,
0x91e,
0x91f,
0x932
};
- uint16 addr_ofdm[] = {
+ u16 addr_ofdm[] = {
0x90f,
0x900,
0x901,