Staging: brcm80211: s/uint16/u16/
[deliverable/linux.git] / drivers / staging / brcm80211 / phy / wlc_phy_lcn.c
index c34d06bf69e38c827253c1a2e060d61baca4fe36..0031361cc48c2e64de84e5f4cb0e8b60c0cbacab 100644 (file)
@@ -17,6 +17,9 @@
 #include <wlc_cfg.h>
 #include <qmath.h>
 #include <osl.h>
+#include <linux/kernel.h>
+#include <linux/string.h>
+#include <linuxver.h>
 #include <siutils.h>
 #include <bitfuncs.h>
 #include <hndpmu.h>
        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 {
@@ -157,11 +160,11 @@ typedef enum {
 typedef struct {
        lcnphy_txgains_t gains;
        bool useindex;
-       uint8 index;
+       u8 index;
 } lcnphy_txcalgains_t;
 
 typedef struct {
-       uint8 chan;
+       u8 chan;
        int16 a;
        int16 b;
 } lcnphy_rx_iqcomp_t;
@@ -172,8 +175,8 @@ typedef struct {
 } lcnphy_spb_tone_t;
 
 typedef struct {
-       uint16 re;
-       uint16 im;
+       u16 re;
+       u16 im;
 } lcnphy_unsign16_struct;
 
 typedef struct {
@@ -183,8 +186,8 @@ typedef struct {
 } lcnphy_iq_est_t;
 
 typedef struct {
-       uint16 ptcentreTs20;
-       uint16 ptcentreFactor;
+       u16 ptcentreTs20;
+       u16 ptcentreFactor;
 } lcnphy_sfo_cfg_t;
 
 typedef enum {
@@ -192,7 +195,7 @@ 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},
@@ -202,7 +205,7 @@ static const iqcal_gain_params_lcnphy *tbl_iqcal_gainparams_lcnphy[1] = {
        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),
 };
@@ -225,7 +228,7 @@ static const lcnphy_sfo_cfg_t lcnphy_sfo_cfg[] = {
 };
 
 static const
-uint16 lcnphy_iqcal_loft_gainladder[] = {
+u16 lcnphy_iqcal_loft_gainladder[] = {
        ((2 << 8) | 0),
        ((3 << 8) | 0),
        ((4 << 8) | 0),
@@ -249,7 +252,7 @@ uint16 lcnphy_iqcal_loft_gainladder[] = {
 };
 
 static const
-uint16 lcnphy_iqcal_ir_gainladder[] = {
+u16 lcnphy_iqcal_ir_gainladder[] = {
        ((1 << 8) | 0),
        ((2 << 8) | 0),
        ((4 << 8) | 0),
@@ -309,7 +312,7 @@ lcnphy_spb_tone_t lcnphy_spb_tone_3750[] = {
 };
 
 static const
-uint16 iqlo_loopback_rf_regs[20] = {
+u16 iqlo_loopback_rf_regs[20] = {
        RADIO_2064_REG036,
        RADIO_2064_REG11A,
        RADIO_2064_REG03A,
@@ -333,7 +336,7 @@ uint16 iqlo_loopback_rf_regs[20] = {
 };
 
 static const
-uint16 tempsense_phy_regs[14] = {
+u16 tempsense_phy_regs[14] = {
        0x503,
        0x4a4,
        0x4d0,
@@ -351,7 +354,7 @@ uint16 tempsense_phy_regs[14] = {
 };
 
 static const
-uint16 rxiq_cal_rf_reg[11] = {
+u16 rxiq_cal_rf_reg[11] = {
        RADIO_2064_REG098,
        RADIO_2064_REG116,
        RADIO_2064_REG12C,
@@ -460,7 +463,7 @@ static const uint32 lcnphy_23bitgaincode_table[] = {
        0x04464f,
 };
 
-static const int8 lcnphy_gain_table[] = {
+static const s8 lcnphy_gain_table[] = {
        -16,
        -13,
        10,
@@ -500,7 +503,7 @@ static const int8 lcnphy_gain_table[] = {
        92,
 };
 
-static const int8 lcnphy_gain_index_offset_for_rssi[] = {
+static const s8 lcnphy_gain_index_offset_for_rssi[] = {
        7,
        7,
        7,
@@ -541,23 +544,23 @@ static const int8 lcnphy_gain_index_offset_for_rssi[] = {
        -2
 };
 
-extern CONST uint8 spur_tbl_rev0[];
-extern CONST uint32 dot11lcnphytbl_rx_gain_info_sz_rev1;
-extern CONST dot11lcnphytbl_info_t dot11lcnphytbl_rx_gain_info_rev1[];
-extern CONST dot11lcnphytbl_info_t dot11lcn_sw_ctrl_tbl_info_4313_bt_epa;
-extern CONST dot11lcnphytbl_info_t dot11lcn_sw_ctrl_tbl_info_4313_bt_epa_p250;
+extern const u8 spur_tbl_rev0[];
+extern const uint32 dot11lcnphytbl_rx_gain_info_sz_rev1;
+extern const dot11lcnphytbl_info_t dot11lcnphytbl_rx_gain_info_rev1[];
+extern const dot11lcnphytbl_info_t dot11lcn_sw_ctrl_tbl_info_4313_bt_epa;
+extern const dot11lcnphytbl_info_t dot11lcn_sw_ctrl_tbl_info_4313_bt_epa_p250;
 
 typedef struct _chan_info_2064_lcnphy {
        uint chan;
        uint freq;
-       uint8 logen_buftune;
-       uint8 logen_rccr_tx;
-       uint8 txrf_mix_tune_ctrl;
-       uint8 pa_input_tune_g;
-       uint8 logen_rccr_rx;
-       uint8 pa_rxrf_lna1_freq_tune;
-       uint8 pa_rxrf_lna2_freq_tune;
-       uint8 rxrf_rxrf_spare1;
+       u8 logen_buftune;
+       u8 logen_rccr_tx;
+       u8 txrf_mix_tune_ctrl;
+       u8 pa_input_tune_g;
+       u8 logen_rccr_rx;
+       u8 pa_rxrf_lna1_freq_tune;
+       u8 pa_rxrf_lna2_freq_tune;
+       u8 rxrf_rxrf_spare1;
 } chan_info_2064_lcnphy_t;
 
 static chan_info_2064_lcnphy_t chan_info_2064_lcnphy[] = {
@@ -889,7 +892,7 @@ lcnphy_radio_regs_t lcnphy_radio_regs_2064[] = {
 #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,
@@ -921,7 +924,7 @@ uint16
 };
 
 #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,
@@ -935,12 +938,12 @@ uint16
 #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) & \
@@ -964,55 +967,55 @@ uint16
 #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))
 
-#define LCNPHY_IQLOCC_READ(val) ((uint8)(-(int8)(((val) & 0xf0) >> 4) + (int8)((val) & 0x0f)))
+#define LCNPHY_IQLOCC_READ(val) ((u8)(-(s8)(((val) & 0xf0) >> 4) + (s8)((val) & 0x0f)))
 #define FIXED_TXPWR 78
 #define LCNPHY_TEMPSENSE(val) ((int16)((val > 255) ? (val - 512) : val))
 
 static uint32 wlc_lcnphy_qdiv_roundup(uint32 divident, uint32 divisor,
-                                     uint8 precision);
+                                     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, uint8 m0);
-static uint8 wlc_lcnphy_get_bbmult(phy_info_t *pi);
+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_get_tx_gain(phy_info_t *pi, lcnphy_txgains_t *gains);
 static void wlc_lcnphy_set_tx_gain_override(phy_info_t *pi, bool bEnable);
 static void wlc_lcnphy_toggle_afe_pwdn(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,
-                                uint8 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 void wlc_lcnphy_afe_clk_init(phy_info_t *pi, uint8 mode);
+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, 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,
-                               uint8 rate, struct ether_addr *sa,
+                               u8 rate, struct ether_addr *sa,
                                uint32 wait_delay);
 static void wlc_lcnphy_radio_2064_channel_tune_4313(phy_info_t *pi,
-                                                   uint8 channel);
+                                                   u8 channel);
 
 static void wlc_lcnphy_load_tx_gain_table(phy_info_t *pi,
                                          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);
@@ -1032,7 +1035,7 @@ static void wlc_lcnphy_rcal(phy_info_t *pi);
 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)
 {
@@ -1046,7 +1049,7 @@ void wlc_lcnphy_read_table(phy_info_t *pi, phytbl_info_t *pti)
 
 static void
 wlc_lcnphy_common_read_table(phy_info_t *pi, uint32 tbl_id,
-                            CONST void *tbl_ptr, uint32 tbl_len,
+                            const void *tbl_ptr, uint32 tbl_len,
                             uint32 tbl_width, uint32 tbl_offset)
 {
        phytbl_info_t tab;
@@ -1060,7 +1063,7 @@ wlc_lcnphy_common_read_table(phy_info_t *pi, uint32 tbl_id,
 
 static void
 wlc_lcnphy_common_write_table(phy_info_t *pi, uint32 tbl_id,
-                             CONST void *tbl_ptr, uint32 tbl_len,
+                             const void *tbl_ptr, uint32 tbl_len,
                              uint32 tbl_width, uint32 tbl_offset)
 {
 
@@ -1074,7 +1077,7 @@ wlc_lcnphy_common_write_table(phy_info_t *pi, uint32 tbl_id,
 }
 
 static uint32
-wlc_lcnphy_qdiv_roundup(uint32 dividend, uint32 divisor, uint8 precision)
+wlc_lcnphy_qdiv_roundup(uint32 dividend, uint32 divisor, u8 precision)
 {
        uint32 quotient, remainder, roundup, rbit;
 
@@ -1121,23 +1124,23 @@ static int wlc_lcnphy_calc_floor(int16 coeff_x, int type)
        return k;
 }
 
-int8 wlc_lcnphy_get_current_tx_pwr_idx(phy_info_t *pi)
+s8 wlc_lcnphy_get_current_tx_pwr_idx(phy_info_t *pi)
 {
-       int8 index;
+       s8 index;
        phy_info_lcnphy_t *pi_lcn = pi->u.pi_lcnphy;
 
        if (txpwrctrl_off(pi))
                index = pi_lcn->lcnphy_current_index;
        else if (wlc_lcnphy_tssi_based_pwr_ctrl_enabled(pi))
                index =
-                   (int8) (wlc_lcnphy_get_current_tx_pwr_idx_if_pwrctrl_on(pi)
+                   (s8) (wlc_lcnphy_get_current_tx_pwr_idx_if_pwrctrl_on(pi)
                            / 2);
        else
                index = pi_lcn->lcnphy_current_index;
        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 };
 
@@ -1148,7 +1151,7 @@ static uint32 wlc_lcnphy_measure_digital_power(phy_info_t *pi, uint16 nsamples)
 
 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) {
@@ -1179,7 +1182,7 @@ void wlc_lcnphy_crsuprs(phy_info_t *pi, int channel)
 
 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);
@@ -1215,7 +1218,7 @@ static void wlc_lcnphy_txrx_spur_avoidance_mode(phy_info_t *pi, bool enable)
 
 void wlc_phy_chanspec_set_lcnphy(phy_info_t *pi, chanspec_t chanspec)
 {
-       uint8 channel = CHSPEC_CHANNEL(chanspec);
+       u8 channel = CHSPEC_CHANNEL(chanspec);
 
        wlc_phy_chanspec_radio_set((wlc_phy_t *) pi, chanspec);
 
@@ -1250,9 +1253,9 @@ void wlc_phy_chanspec_set_lcnphy(phy_info_t *pi, chanspec_t chanspec)
 
 }
 
-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;
@@ -1263,7 +1266,7 @@ static void wlc_lcnphy_set_dac_gain(phy_info_t *pi, uint16 dac_gain)
 
 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);
 
@@ -1272,9 +1275,9 @@ static void wlc_lcnphy_set_tx_gain_override(phy_info_t *pi, bool bEnable)
        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) >>
@@ -1286,7 +1289,7 @@ static uint16 wlc_lcnphy_get_pa_gain(phy_info_t *pi)
 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),
@@ -1309,9 +1312,9 @@ wlc_lcnphy_set_tx_gain(phy_info_t *pi, lcnphy_txgains_t *target_gains)
        wlc_lcnphy_enable_tx_gain_override(pi);
 }
 
-static void wlc_lcnphy_set_bbmult(phy_info_t *pi, uint8 m0)
+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;
@@ -1390,9 +1393,9 @@ static void wlc_lcnphy_set_tssi_mux(phy_info_t *pi, lcnphy_tssi_mode_t pos)
        }
 }
 
-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))
@@ -1413,7 +1416,7 @@ static uint16 wlc_lcnphy_rfseq_tbl_adc_pwrup(phy_info_t *pi)
 
 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 =
@@ -1571,7 +1574,7 @@ static void wlc_lcnphy_tssi_setup(phy_info_t *pi)
 
 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);
@@ -1640,12 +1643,12 @@ void wlc_lcnphy_txpower_recalc_target(phy_info_t *pi)
        }
 }
 
-static void wlc_lcnphy_set_tx_pwr_soft_ctrl(phy_info_t *pi, int8 index)
+static void wlc_lcnphy_set_tx_pwr_soft_ctrl(phy_info_t *pi, s8 index)
 {
        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))
@@ -1686,19 +1689,19 @@ static void wlc_lcnphy_set_tx_pwr_soft_ctrl(phy_info_t *pi, int8 index)
 
        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);
 
 }
 
-static int8 wlc_lcnphy_tempcompensated_txpwrctrl(phy_info_t *pi)
+static s8 wlc_lcnphy_tempcompensated_txpwrctrl(phy_info_t *pi)
 {
-       int8 index, delta_brd, delta_temp, new_index, tempcorrx;
+       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))
@@ -1712,7 +1715,7 @@ static int8 wlc_lcnphy_tempcompensated_txpwrctrl(phy_info_t *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) {
@@ -1730,7 +1733,7 @@ static int8 wlc_lcnphy_tempcompensated_txpwrctrl(phy_info_t *pi)
                temp_diff = -temp_diff;
        }
 
-       delta_temp = (int8) wlc_lcnphy_qdiv_roundup((uint32) (temp_diff * 192),
+       delta_temp = (s8) wlc_lcnphy_qdiv_roundup((uint32) (temp_diff * 192),
                                                    (uint32) (pi_lcn->
                                                              lcnphy_tempsense_slope
                                                              * 10), 0);
@@ -1741,9 +1744,9 @@ static int8 wlc_lcnphy_tempcompensated_txpwrctrl(phy_info_t *pi)
            && LCNREV_IS(pi->pubpi.phy_rev, 0))
                delta_temp = 0;
        if (pi_lcn->lcnphy_tempcorrx > 31)
-               tempcorrx = (int8) (pi_lcn->lcnphy_tempcorrx - 64);
+               tempcorrx = (s8) (pi_lcn->lcnphy_tempcorrx - 64);
        else
-               tempcorrx = (int8) pi_lcn->lcnphy_tempcorrx;
+               tempcorrx = (s8) pi_lcn->lcnphy_tempcorrx;
        if (LCNREV_IS(pi->pubpi.phy_rev, 1))
                tempcorrx = 4;
        new_index =
@@ -1758,10 +1761,10 @@ static int8 wlc_lcnphy_tempcompensated_txpwrctrl(phy_info_t *pi)
        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;
@@ -1771,10 +1774,10 @@ static uint16 wlc_lcnphy_set_tx_pwr_ctrl_mode(phy_info_t *pi, uint16 mode)
        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);
-       int8 index;
+       u16 old_mode = wlc_lcnphy_get_tx_pwr_ctrl(pi);
+       s8 index;
        phy_info_lcnphy_t *pi_lcn = pi->u.pi_lcnphy;
 
        ASSERT((LCNPHY_TX_PWR_CTRL_OFF == mode) ||
@@ -1821,7 +1824,7 @@ void wlc_lcnphy_set_tx_pwr_ctrl(phy_info_t *pi, uint16 mode)
                if (mode == LCNPHY_TX_PWR_CTRL_TEMPBASED) {
                        index = wlc_lcnphy_tempcompensated_txpwrctrl(pi);
                        wlc_lcnphy_set_tx_pwr_soft_ctrl(pi, index);
-                       pi_lcn->lcnphy_current_index = (int8)
+                       pi_lcn->lcnphy_current_index = (s8)
                            ((read_phy_reg(pi, 0x4a9) & 0xFF) / 2);
                }
        }
@@ -1849,40 +1852,40 @@ wlc_lcnphy_tx_iqlo_cal(phy_info_t *pi,
 {
 
        lcnphy_txgains_t cal_gains, temp_gains;
-       uint16 hash;
-       uint8 band_idx;
+       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;
        }
@@ -1972,13 +1975,13 @@ wlc_lcnphy_tx_iqlo_cal(phy_info_t *pi,
        write_phy_reg(pi, 0x93d, 0xc0);
 
        wlc_lcnphy_common_write_table(pi, LCNPHY_TBL_ID_IQLOCAL,
-                                     (CONST void *)
+                                     (const void *)
                                      lcnphy_iqcal_loft_gainladder,
                                      ARRAYSIZE(lcnphy_iqcal_loft_gainladder),
                                      16, 0);
 
        wlc_lcnphy_common_write_table(pi, LCNPHY_TBL_ID_IQLOCAL,
-                                     (CONST void *)lcnphy_iqcal_ir_gainladder,
+                                     (const void *)lcnphy_iqcal_ir_gainladder,
                                      ARRAYSIZE(lcnphy_iqcal_ir_gainladder), 16,
                                      32);
 
@@ -1994,9 +1997,9 @@ wlc_lcnphy_tx_iqlo_cal(phy_info_t *pi,
        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;
 
@@ -2061,7 +2064,7 @@ wlc_lcnphy_tx_iqlo_cal(phy_info_t *pi,
 
  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);
@@ -2084,14 +2087,14 @@ static void wlc_lcnphy_idle_tssi_est(wlc_phy_t *ppi)
        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 ==
@@ -2145,28 +2148,28 @@ static void wlc_lcnphy_idle_tssi_est(wlc_phy_t *ppi)
                wlapi_enable_mac(pi->sh->physhim);
 }
 
-static void wlc_lcnphy_vbat_temp_sense_setup(phy_info_t *pi, uint8 mode)
+static void wlc_lcnphy_vbat_temp_sense_setup(phy_info_t *pi, u8 mode)
 {
        bool suspend;
-       uint16 save_txpwrCtrlEn;
-       uint8 auxpga_vmidcourse, auxpga_vmidfine, auxpga_gain;
-       uint16 auxpga_vmid;
+       u16 save_txpwrCtrlEn;
+       u8 auxpga_vmidcourse, auxpga_vmidfine, auxpga_gain;
+       u16 auxpga_vmid;
        phytbl_info_t tab;
        uint32 val;
-       uint8 save_reg007, save_reg0FF, save_reg11F, save_reg005, save_reg025,
+       u8 save_reg007, save_reg0FF, save_reg11F, save_reg005, save_reg025,
            save_reg112;
-       uint16 values_to_save[14];
-       int8 index;
+       u16 values_to_save[14];
+       s8 index;
        int i;
        phy_info_lcnphy_t *pi_lcn = pi->u.pi_lcnphy;
        OSL_DELAY(999);
 
-       save_reg007 = (uint8) read_radio_reg(pi, RADIO_2064_REG007);
-       save_reg0FF = (uint8) read_radio_reg(pi, RADIO_2064_REG0FF);
-       save_reg11F = (uint8) read_radio_reg(pi, RADIO_2064_REG11F);
-       save_reg005 = (uint8) read_radio_reg(pi, RADIO_2064_REG005);
-       save_reg025 = (uint8) read_radio_reg(pi, RADIO_2064_REG025);
-       save_reg112 = (uint8) read_radio_reg(pi, RADIO_2064_REG112);
+       save_reg007 = (u8) read_radio_reg(pi, RADIO_2064_REG007);
+       save_reg0FF = (u8) read_radio_reg(pi, RADIO_2064_REG0FF);
+       save_reg11F = (u8) read_radio_reg(pi, RADIO_2064_REG11F);
+       save_reg005 = (u8) read_radio_reg(pi, RADIO_2064_REG005);
+       save_reg025 = (u8) read_radio_reg(pi, RADIO_2064_REG025);
+       save_reg112 = (u8) read_radio_reg(pi, RADIO_2064_REG112);
 
        for (i = 0; i < 14; i++)
                values_to_save[i] = read_phy_reg(pi, tempsense_phy_regs[i]);
@@ -2254,7 +2257,7 @@ static void wlc_lcnphy_vbat_temp_sense_setup(phy_info_t *pi, uint8 mode)
                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);
@@ -2271,12 +2274,12 @@ static void wlc_lcnphy_vbat_temp_sense_setup(phy_info_t *pi, uint8 mode)
        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);
@@ -2290,7 +2293,7 @@ static void wlc_lcnphy_vbat_temp_sense_setup(phy_info_t *pi, uint8 mode)
 void WLBANDINITFN(wlc_lcnphy_tx_pwr_ctrl_init) (wlc_phy_t *ppi)
 {
        lcnphy_txgains_t tx_gains;
-       uint8 bbmult;
+       u8 bbmult;
        phytbl_info_t tab;
        int32 a1, b0, b1;
        int32 tssi, pwr, maxtargetpwr, mintargetpwr;
@@ -2365,9 +2368,9 @@ void WLBANDINITFN(wlc_lcnphy_tx_pwr_ctrl_init) (wlc_phy_t *ppi)
                wlapi_enable_mac(pi->sh->physhim);
 }
 
-static uint8 wlc_lcnphy_get_bbmult(phy_info_t *pi)
+static u8 wlc_lcnphy_get_bbmult(phy_info_t *pi)
 {
-       uint16 m0m1;
+       u16 m0m1;
        phytbl_info_t tab;
 
        tab.tbl_ptr = &m0m1;
@@ -2377,10 +2380,10 @@ static uint8 wlc_lcnphy_get_bbmult(phy_info_t *pi)
        tab.tbl_width = 16;
        wlc_lcnphy_read_table(pi, &tab);
 
-       return (uint8) ((m0m1 & 0xff00) >> 8);
+       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,
@@ -2392,7 +2395,7 @@ static void wlc_lcnphy_set_pa_gain(phy_info_t *pi, uint16 gain)
 
 void
 wlc_lcnphy_get_radio_loft(phy_info_t *pi,
-                         uint8 *ei0, uint8 *eq0, uint8 *fi0, uint8 *fq0)
+                         u8 *ei0, u8 *eq0, u8 *fi0, u8 *fq0)
 {
        *ei0 = LCNPHY_IQLOCC_READ(read_radio_reg(pi, RADIO_2064_REG089));
        *eq0 = LCNPHY_IQLOCC_READ(read_radio_reg(pi, RADIO_2064_REG08A));
@@ -2402,13 +2405,13 @@ wlc_lcnphy_get_radio_loft(phy_info_t *pi,
 
 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;
@@ -2419,10 +2422,10 @@ static void wlc_lcnphy_get_tx_gain(phy_info_t *pi, lcnphy_txgains_t *gains)
        }
 }
 
-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;
@@ -2435,7 +2438,7 @@ void wlc_lcnphy_set_tx_iqcc(phy_info_t *pi, uint16 a, uint16 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;
 
@@ -2450,16 +2453,16 @@ void wlc_lcnphy_set_tx_locc(phy_info_t *pi, uint16 didq)
 void wlc_lcnphy_set_tx_pwr_by_index(phy_info_t *pi, int index)
 {
        phytbl_info_t tab;
-       uint16 a, b;
-       uint8 bb_mult;
+       u16 a, b;
+       u8 bb_mult;
        uint32 bbmultiqcomp, txgain, locoeffs, rfpower;
        lcnphy_txgains_t gains;
        phy_info_lcnphy_t *pi_lcn = pi->u.pi_lcnphy;
 
        ASSERT(index <= LCNPHY_MAX_TX_POWER_INDEX);
 
-       pi_lcn->lcnphy_tx_power_idx_override = (int8) index;
-       pi_lcn->lcnphy_current_index = (uint8) index;
+       pi_lcn->lcnphy_tx_power_idx_override = (s8) index;
+       pi_lcn->lcnphy_current_index = (u8) index;
 
        tab.tbl_id = LCNPHY_TBL_ID_TXPWRCTL;
        tab.tbl_width = 32;
@@ -2476,29 +2479,29 @@ void wlc_lcnphy_set_tx_pwr_by_index(phy_info_t *pi, int index)
        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 = (uint8) ((bbmultiqcomp >> 20) & 0xff);
+       bb_mult = (u8) ((bbmultiqcomp >> 20) & 0xff);
        wlc_lcnphy_set_bbmult(pi, bb_mult);
 
        wlc_lcnphy_enable_tx_gain_override(pi);
 
        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;
@@ -2539,13 +2542,13 @@ static void wlc_lcnphy_clear_papd_comptable(phy_info_t *pi)
 
 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) |
@@ -2574,7 +2577,7 @@ wlc_lcnphy_set_rx_gain_by_distribution(phy_info_t *pi,
 
 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);
 
@@ -2601,27 +2604,27 @@ void wlc_lcnphy_tx_pu(phy_info_t *pi, bool bEnable)
 {
        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);
@@ -2676,8 +2679,8 @@ void wlc_lcnphy_tx_pu(phy_info_t *pi, bool bEnable)
 
 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);
@@ -2691,7 +2694,7 @@ wlc_lcnphy_run_samples(phy_info_t *pi,
 
        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);
@@ -2704,7 +2707,7 @@ wlc_lcnphy_run_samples(phy_info_t *pi,
 void wlc_lcnphy_deaf_mode(phy_info_t *pi, bool mode)
 {
 
-       uint8 phybw40;
+       u8 phybw40;
        phybw40 = CHSPEC_IS40(pi->radio_chanspec);
 
        if (LCNREV_LT(pi->pubpi.phy_rev, 2)) {
@@ -2726,16 +2729,16 @@ void wlc_lcnphy_deaf_mode(phy_info_t *pi, bool mode)
 }
 
 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)
 {
-       uint8 phy_bw;
-       uint16 num_samps, t, k;
+       u8 phy_bw;
+       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;
 
@@ -2771,8 +2774,8 @@ wlc_lcnphy_start_tx_tone(phy_info_t *pi, int32 f_kHz, uint16 max_val,
 
                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;
        }
 
@@ -2824,12 +2827,12 @@ void wlc_lcnphy_stop_tx_tone(phy_info_t *pi)
 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;
@@ -2843,10 +2846,10 @@ void wlc_lcnphy_get_tx_iqcc(phy_info_t *pi, uint16 *a, uint16 *b)
        *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;
@@ -2862,13 +2865,13 @@ static void wlc_lcnphy_txpwrtbl_iqlo_cal(phy_info_t *pi)
 {
 
        lcnphy_txgains_t target_gains, old_gains;
-       uint8 save_bb_mult;
-       uint16 a, b, didq, save_pa_gain = 0;
+       u8 save_bb_mult;
+       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;
-       uint8 ei0, eq0, fi0, fq0;
+       u8 ei0, eq0, fi0, fq0;
        phy_info_lcnphy_t *pi_lcn = pi->u.pi_lcnphy;
 
        wlc_lcnphy_get_tx_gain(pi, &old_gains);
@@ -2902,7 +2905,7 @@ static void wlc_lcnphy_txpwrtbl_iqlo_cal(phy_info_t *pi)
        }
 
        wlc_lcnphy_get_radio_loft(pi, &ei0, &eq0, &fi0, &fq0);
-       if ((ABS((int8) fi0) == 15) && (ABS((int8) fq0) == 15)) {
+       if ((ABS((s8) fi0) == 15) && (ABS((s8) fq0) == 15)) {
                if (CHSPEC_IS5G(pi->radio_chanspec)) {
                        target_gains.gm_gain = 255;
                        target_gains.pga_gain = 255;
@@ -2974,7 +2977,7 @@ static void wlc_lcnphy_txpwrtbl_iqlo_cal(phy_info_t *pi)
 
 int16 wlc_lcnphy_tempsense_new(phy_info_t *pi, bool mode)
 {
-       uint16 tempsenseval1, tempsenseval2;
+       u16 tempsenseval1, tempsenseval2;
        int16 avg = 0;
        bool suspend = 0;
 
@@ -3017,12 +3020,12 @@ int16 wlc_lcnphy_tempsense_new(phy_info_t *pi, bool mode)
        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))
@@ -3075,21 +3078,21 @@ uint16 wlc_lcnphy_tempsense(phy_info_t *pi, bool mode)
                if (!suspend)
                        wlapi_enable_mac(pi->sh->physhim);
        }
-       return (uint16) avg;
+       return (u16) avg;
 }
 
-int8 wlc_lcnphy_tempsense_degree(phy_info_t *pi, bool mode)
+s8 wlc_lcnphy_tempsense_degree(phy_info_t *pi, bool mode)
 {
        int32 degree = wlc_lcnphy_tempsense_new(pi, mode);
        degree =
            ((degree << 10) + LCN_TEMPSENSE_OFFSET + (LCN_TEMPSENSE_DEN >> 1))
            / LCN_TEMPSENSE_DEN;
-       return (int8) degree;
+       return (s8) degree;
 }
 
-int8 wlc_lcnphy_vbatsense(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;
 
@@ -3120,12 +3123,12 @@ int8 wlc_lcnphy_vbatsense(phy_info_t *pi, bool mode)
                if (!suspend)
                        wlapi_enable_mac(pi->sh->physhim);
        }
-       return (int8) avg;
+       return (s8) avg;
 }
 
-static void wlc_lcnphy_afe_clk_init(phy_info_t *pi, uint8 mode)
+static void wlc_lcnphy_afe_clk_init(phy_info_t *pi, u8 mode)
 {
-       uint8 phybw40;
+       u8 phybw40;
        phybw40 = CHSPEC_IS40(pi->radio_chanspec);
 
        mod_phy_reg(pi, 0x6d1, (0x1 << 7), (1) << 7);
@@ -3139,12 +3142,12 @@ static void wlc_lcnphy_afe_clk_init(phy_info_t *pi, uint8 mode)
 
 static bool
 wlc_lcnphy_rx_iq_est(phy_info_t *pi,
-                    uint16 num_samps,
-                    uint8 wait_time, lcnphy_iq_est_t *iq_est)
+                    u16 num_samps,
+                    u8 wait_time, lcnphy_iq_est_t *iq_est)
 {
        int wait_count = 0;
        bool result = TRUE;
-       uint8 phybw40;
+       u8 phybw40;
        phybw40 = CHSPEC_IS40(pi->radio_chanspec);
 
        mod_phy_reg(pi, 0x6da, (0x1 << 5), (1) << 5);
@@ -3153,7 +3156,7 @@ wlc_lcnphy_rx_iq_est(phy_info_t *pi,
 
        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);
 
@@ -3184,11 +3187,11 @@ wlc_lcnphy_rx_iq_est(phy_info_t *pi,
        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;
@@ -3253,8 +3256,8 @@ static bool wlc_lcnphy_calc_rx_iq_comp(phy_info_t *pi, uint16 num_samps)
        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);
@@ -3275,17 +3278,17 @@ wlc_lcnphy_rx_iq_cal(phy_info_t *pi, const lcnphy_rx_iqcomp_t *iqcomp,
                     int tx_gain_idx)
 {
        lcnphy_txgains_t old_gains;
-       uint16 tx_pwr_ctrl;
-       uint8 tx_gain_index_old = 0;
+       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;
 
@@ -3301,9 +3304,9 @@ wlc_lcnphy_rx_iq_cal(phy_info_t *pi, const lcnphy_rx_iqcomp_t *iqcomp,
                            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;
@@ -3390,7 +3393,7 @@ wlc_lcnphy_rx_iq_cal(phy_info_t *pi, const lcnphy_rx_iqcomp_t *iqcomp,
                        tia_gain -= 1;
                        wlc_lcnphy_set_rx_gain_by_distribution(pi,
                                                               0, 0, 2, 2,
-                                                              (uint16)
+                                                              (u16)
                                                               tia_gain, 1, 0);
                        OSL_DELAY(500);
 
@@ -3450,8 +3453,8 @@ static void wlc_lcnphy_temp_adj(phy_info_t *pi)
 static void wlc_lcnphy_glacial_timer_based_cal(phy_info_t *pi)
 {
        bool suspend;
-       int8 index;
-       uint16 SAVE_pwrctrl = wlc_lcnphy_get_tx_pwr_ctrl(pi);
+       s8 index;
+       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));
@@ -3477,8 +3480,8 @@ static void wlc_lcnphy_periodic_cal(phy_info_t *pi)
        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);
-       int8 index;
+       u16 SAVE_pwrctrl = wlc_lcnphy_get_tx_pwr_ctrl(pi);
+       s8 index;
        phytbl_info_t tab;
        int32 a1, b0, b1;
        int32 tssi, pwr, maxtargetpwr, mintargetpwr;
@@ -3546,7 +3549,7 @@ static void wlc_lcnphy_periodic_cal(phy_info_t *pi)
 
 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;
 
@@ -3586,14 +3589,14 @@ void wlc_lcnphy_calib_modes(phy_info_t *pi, uint mode)
        }
 }
 
-void wlc_lcnphy_get_tssi(phy_info_t *pi, int8 *ofdm_pwr, int8 *cck_pwr)
+void wlc_lcnphy_get_tssi(phy_info_t *pi, s8 *ofdm_pwr, s8 *cck_pwr)
 {
-       int8 cck_offset;
-       uint16 status;
+       s8 cck_offset;
+       u16 status;
        status = (read_phy_reg(pi, 0x4ab));
        if (wlc_lcnphy_tssi_based_pwr_ctrl_enabled(pi) &&
            (status  & (0x1 << 15))) {
-               *ofdm_pwr = (int8) (((read_phy_reg(pi, 0x4ab) & (0x1ff << 0))
+               *ofdm_pwr = (s8) (((read_phy_reg(pi, 0x4ab) & (0x1ff << 0))
                                     >> 0) >> 1);
 
                if (wlc_phy_tpc_isenabled_lcnphy(pi))
@@ -3616,7 +3619,7 @@ void WLBANDINITFN(wlc_phy_cal_init_lcnphy) (phy_info_t *pi)
 
 static void wlc_lcnphy_set_chanspec_tweaks(phy_info_t *pi, chanspec_t chanspec)
 {
-       uint8 channel = CHSPEC_CHANNEL(chanspec);
+       u8 channel = CHSPEC_CHANNEL(chanspec);
        phy_info_lcnphy_t *pi_lcn = pi->u.pi_lcnphy;
 
        if (NORADIO_ENAB(pi->pubpi))
@@ -3667,29 +3670,29 @@ static void wlc_lcnphy_set_chanspec_tweaks(phy_info_t *pi, chanspec_t chanspec)
 }
 
 void
-wlc_lcnphy_pktengtx(wlc_phy_t *ppi, wl_pkteng_t *pkteng, uint8 rate,
+wlc_lcnphy_pktengtx(wlc_phy_t *ppi, wl_pkteng_t *pkteng, u8 rate,
                    struct ether_addr *sa, uint32 wait_delay)
 {
 }
 
 void wlc_lcnphy_tx_power_adjustment(wlc_phy_t *ppi)
 {
-       int8 index;
-       uint16 index2;
+       s8 index;
+       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 = (int8)
+               pi_lcn->lcnphy_current_index = (s8)
                    ((read_phy_reg(pi, 0x4a9) & 0xFF) / 2);
        }
 }
 
-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);
 
@@ -3707,7 +3710,7 @@ static void wlc_lcnphy_set_rx_iq_comp(phy_info_t *pi, uint16 a, uint16 b)
 
 void WLBANDINITFN(wlc_phy_init_lcnphy) (phy_info_t *pi)
 {
-       uint8 phybw40;
+       u8 phybw40;
        phy_info_lcnphy_t *pi_lcn = pi->u.pi_lcnphy;
        phybw40 = CHSPEC_IS40(pi->radio_chanspec);
 
@@ -3755,9 +3758,9 @@ void WLBANDINITFN(wlc_phy_init_lcnphy) (phy_info_t *pi)
 }
 
 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] =
@@ -3848,12 +3851,12 @@ wlc_lcnphy_tx_iqlo_loopback(phy_info_t *pi, uint16 *values_to_save)
 }
 
 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;
 
@@ -3873,7 +3876,7 @@ wlc_lcnphy_samp_cap(phy_info_t *pi, int clip_detect_algo, uint16 thresh,
        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);
@@ -3949,8 +3952,8 @@ static void wlc_lcnphy_tx_iqlo_soft_cal_full(phy_info_t *pi)
 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:
@@ -3993,8 +3996,8 @@ 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)
 {
-       uint16 a, b, didq;
-       uint8 di0, dq0, ei, eq, fi, fq;
+       u16 a, b, didq;
+       u8 di0, dq0, ei, eq, fi, fq;
        lcnphy_unsign16_struct cc;
        cc.re = 0;
        cc.im = 0;
@@ -4008,18 +4011,18 @@ static lcnphy_unsign16_struct wlc_lcnphy_get_cc(phy_info_t *pi, int cal_type)
                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;
@@ -4032,16 +4035,16 @@ wlc_lcnphy_a1(phy_info_t *pi, int cal_type, int num_levels, int step_size_lg2)
        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);
@@ -4049,7 +4052,7 @@ wlc_lcnphy_a1(phy_info_t *pi, int cal_type, int num_levels, int step_size_lg2)
                return;
        }
 
-       phy_c32 = MALLOC(pi->sh->osh, sizeof(uint16) * 20);
+       phy_c32 = MALLOC(pi->sh->osh, sizeof(u16) * 20);
        if (NULL == phy_c32) {
                return;
        }
@@ -4218,12 +4221,12 @@ wlc_lcnphy_a1(phy_info_t *pi, int cal_type, int num_levels, int step_size_lg2)
        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;
 
@@ -4244,8 +4247,8 @@ WLBANDINITFN(wlc_lcnphy_load_tx_gain_table) (phy_info_t *pi,
        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;
@@ -4278,8 +4281,8 @@ static void wlc_lcnphy_load_rfpower(phy_info_t *pi)
 {
        phytbl_info_t tab;
        uint32 val, bbmult, rfgain;
-       uint8 index;
-       uint8 scale_factor = 1;
+       u8 index;
+       u8 scale_factor = 1;
        int16 temp, temp1, temp2, qQ, qQ1, qQ2, shift;
 
        tab.tbl_id = LCNPHY_TBL_ID_TXPWRCTL;
@@ -4326,7 +4329,7 @@ static void wlc_lcnphy_load_rfpower(phy_info_t *pi)
 static void WLBANDINITFN(wlc_lcnphy_tbl_init) (phy_info_t *pi)
 {
        uint idx;
-       uint8 phybw40;
+       u8 phybw40;
        phytbl_info_t tab;
        uint32 val;
 
@@ -4420,7 +4423,7 @@ static void WLBANDINITFN(wlc_lcnphy_tbl_init) (phy_info_t *pi)
 
 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);
@@ -4445,7 +4448,7 @@ static void WLBANDINITFN(wlc_lcnphy_rev0_baseband_init) (phy_info_t *pi)
 
        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));
@@ -4514,7 +4517,7 @@ static void wlc_lcnphy_agc_temp_init(phy_info_t *pi)
                        & (0xff << 0));
        if (temp > 127)
                temp -= 256;
-       pi_lcn->lcnphy_input_pwr_offset_db = (int8) temp;
+       pi_lcn->lcnphy_input_pwr_offset_db = (s8) temp;
 
        pi_lcn->lcnphy_Med_Low_Gain_db = (read_phy_reg(pi, 0x424)
                                          & (0xff << 8))
@@ -4612,12 +4615,12 @@ static void WLBANDINITFN(wlc_radio_2064_init) (phy_info_t *pi)
                        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);
@@ -4671,7 +4674,7 @@ static void WLBANDINITFN(wlc_lcnphy_radio_init) (phy_info_t *pi)
 
 static void wlc_lcnphy_rcal(phy_info_t *pi)
 {
-       uint8 rcal_value;
+       u8 rcal_value;
 
        if (NORADIO_ENAB(pi->pubpi))
                return;
@@ -4691,7 +4694,7 @@ static void wlc_lcnphy_rcal(phy_info_t *pi)
        SPINWAIT(!wlc_radio_2064_rcal_done(pi), 10 * 1000 * 1000);
 
        if (wlc_radio_2064_rcal_done(pi)) {
-               rcal_value = (uint8) read_radio_reg(pi, RADIO_2064_REG05C);
+               rcal_value = (u8) read_radio_reg(pi, RADIO_2064_REG05C);
                rcal_value = rcal_value & 0x1f;
        }
 
@@ -4702,8 +4705,8 @@ static void wlc_lcnphy_rcal(phy_info_t *pi)
 
 static void wlc_lcnphy_rc_cal(phy_info_t *pi)
 {
-       uint8 dflt_rc_cal_val;
-       uint16 flt_val;
+       u8 dflt_rc_cal_val;
+       u16 flt_val;
 
        if (NORADIO_ENAB(pi->pubpi))
                return;
@@ -4725,27 +4728,27 @@ static void wlc_lcnphy_rc_cal(phy_info_t *pi)
 
 static bool BCMATTACHFN(wlc_phy_txpwr_srom_read_lcnphy) (phy_info_t *pi)
 {
-       int8 txpwr = 0;
+       s8 txpwr = 0;
        int i;
        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 =
-                   (uint8) PHY_GETINTVAR(pi, "triso2g");
+                   (u8) PHY_GETINTVAR(pi, "triso2g");
 
                pi_lcn->lcnphy_rx_power_offset =
-                   (uint8) PHY_GETINTVAR(pi, "rxpo2g");
+                   (u8) PHY_GETINTVAR(pi, "rxpo2g");
 
                pi->txpa_2g[0] = (int16) PHY_GETINTVAR(pi, "pa0b0");
                pi->txpa_2g[1] = (int16) PHY_GETINTVAR(pi, "pa0b1");
                pi->txpa_2g[2] = (int16) PHY_GETINTVAR(pi, "pa0b2");
 
-               pi_lcn->lcnphy_rssi_vf = (uint8) PHY_GETINTVAR(pi, "rssismf2g");
-               pi_lcn->lcnphy_rssi_vc = (uint8) PHY_GETINTVAR(pi, "rssismc2g");
-               pi_lcn->lcnphy_rssi_gs = (uint8) PHY_GETINTVAR(pi, "rssisav2g");
+               pi_lcn->lcnphy_rssi_vf = (u8) PHY_GETINTVAR(pi, "rssismf2g");
+               pi_lcn->lcnphy_rssi_vc = (u8) PHY_GETINTVAR(pi, "rssismc2g");
+               pi_lcn->lcnphy_rssi_gs = (u8) PHY_GETINTVAR(pi, "rssisav2g");
 
                {
                        pi_lcn->lcnphy_rssi_vf_lowtemp = pi_lcn->lcnphy_rssi_vf;
@@ -4760,7 +4763,7 @@ static bool BCMATTACHFN(wlc_phy_txpwr_srom_read_lcnphy) (phy_info_t *pi)
                            pi_lcn->lcnphy_rssi_gs;
                }
 
-               txpwr = (int8) PHY_GETINTVAR(pi, "maxp2ga0");
+               txpwr = (s8) PHY_GETINTVAR(pi, "maxp2ga0");
                pi->tx_srom_max_2g = txpwr;
 
                for (i = 0; i < PWRTBL_NUM_COEFF; i++) {
@@ -4768,7 +4771,7 @@ static bool BCMATTACHFN(wlc_phy_txpwr_srom_read_lcnphy) (phy_info_t *pi)
                        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;
 
@@ -4785,9 +4788,9 @@ static bool BCMATTACHFN(wlc_phy_txpwr_srom_read_lcnphy) (phy_info_t *pi)
                                offset_ofdm >>= 4;
                        }
                } else {
-                       uint8 opo = 0;
+                       u8 opo = 0;
 
-                       opo = (uint8) PHY_GETINTVAR(pi, "opo");
+                       opo = (u8) PHY_GETINTVAR(pi, "opo");
 
                        for (i = TXP_FIRST_CCK; i <= TXP_LAST_CCK; i++) {
                                pi->tx_srom_max_rate_2g[i] = txpwr;
@@ -4801,8 +4804,8 @@ static bool BCMATTACHFN(wlc_phy_txpwr_srom_read_lcnphy) (phy_info_t *pi)
                                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++) {
@@ -4813,24 +4816,24 @@ static bool BCMATTACHFN(wlc_phy_txpwr_srom_read_lcnphy) (phy_info_t *pi)
                }
 
                pi_lcn->lcnphy_rawtempsense =
-                   (uint16) PHY_GETINTVAR(pi, "rawtempsense");
+                   (u16) PHY_GETINTVAR(pi, "rawtempsense");
                pi_lcn->lcnphy_measPower =
-                   (uint8) PHY_GETINTVAR(pi, "measpower");
+                   (u8) PHY_GETINTVAR(pi, "measpower");
                pi_lcn->lcnphy_tempsense_slope =
-                   (uint8) PHY_GETINTVAR(pi, "tempsense_slope");
+                   (u8) PHY_GETINTVAR(pi, "tempsense_slope");
                pi_lcn->lcnphy_hw_iqcal_en =
                    (bool) PHY_GETINTVAR(pi, "hw_iqcal_en");
                pi_lcn->lcnphy_iqcal_swp_dis =
                    (bool) PHY_GETINTVAR(pi, "iqcal_swp_dis");
                pi_lcn->lcnphy_tempcorrx =
-                   (uint8) PHY_GETINTVAR(pi, "tempcorrx");
+                   (u8) PHY_GETINTVAR(pi, "tempcorrx");
                pi_lcn->lcnphy_tempsense_option =
-                   (uint8) PHY_GETINTVAR(pi, "tempsense_option");
+                   (u8) PHY_GETINTVAR(pi, "tempsense_option");
                pi_lcn->lcnphy_freqoffset_corr =
-                   (uint8) PHY_GETINTVAR(pi, "freqoffset_corr");
-               if ((uint8) getintvar(pi->vars, "aa2g") > 1)
+                   (u8) PHY_GETINTVAR(pi, "freqoffset_corr");
+               if ((u8) getintvar(pi->vars, "aa2g") > 1)
                        wlc_phy_ant_rxdiv_set((wlc_phy_t *) pi,
-                                             (uint8) getintvar(pi->vars,
+                                             (u8) getintvar(pi->vars,
                                                                "aa2g"));
        }
        pi_lcn->lcnphy_cck_dig_filt_type = -1;
@@ -4847,10 +4850,10 @@ static bool BCMATTACHFN(wlc_phy_txpwr_srom_read_lcnphy) (phy_info_t *pi)
 
 void wlc_2064_vco_cal(phy_info_t *pi)
 {
-       uint8 calnrst;
+       u8 calnrst;
 
        mod_radio_reg(pi, RADIO_2064_REG057, 1 << 3, 1 << 3);
-       calnrst = (uint8) read_radio_reg(pi, RADIO_2064_REG056) & 0xf8;
+       calnrst = (u8) read_radio_reg(pi, RADIO_2064_REG056) & 0xf8;
        write_radio_reg(pi, RADIO_2064_REG056, calnrst);
        OSL_DELAY(1);
        write_radio_reg(pi, RADIO_2064_REG056, calnrst | 0x03);
@@ -4861,16 +4864,16 @@ void wlc_2064_vco_cal(phy_info_t *pi)
 }
 
 static void
-wlc_lcnphy_radio_2064_channel_tune_4313(phy_info_t *pi, uint8 channel)
+wlc_lcnphy_radio_2064_channel_tune_4313(phy_info_t *pi, u8 channel)
 {
        uint i;
        const chan_info_2064_lcnphy_t *ci;
-       uint8 rfpll_doubler = 0;
-       uint8 pll_pwrup, pll_pwrup_ovr;
+       u8 rfpll_doubler = 0;
+       u8 pll_pwrup, pll_pwrup_ovr;
        fixed qFxtal, qFref, qFvco, qFcal;
-       uint8 d15, d16, f16, e44, e45;
+       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];
@@ -4917,8 +4920,8 @@ wlc_lcnphy_radio_2064_channel_tune_4313(phy_info_t *pi, uint8 channel)
 
        write_radio_reg(pi, RADIO_2064_REG06C, ci->rxrf_rxrf_spare1);
 
-       pll_pwrup = (uint8) read_radio_reg(pi, RADIO_2064_REG044);
-       pll_pwrup_ovr = (uint8) read_radio_reg(pi, RADIO_2064_REG12B);
+       pll_pwrup = (u8) read_radio_reg(pi, RADIO_2064_REG044);
+       pll_pwrup_ovr = (u8) read_radio_reg(pi, RADIO_2064_REG12B);
 
        or_radio_reg(pi, RADIO_2064_REG044, 0x07);
 
@@ -4957,10 +4960,10 @@ wlc_lcnphy_radio_2064_channel_tune_4313(phy_info_t *pi, uint8 channel)
        f16 = ((d16 + 1) * (d15 + 1)) / qFcal;
        setCount = f16 * 3 * (ci->freq) / 32 - 1;
        mod_radio_reg(pi, RADIO_2064_REG053, (0x0f << 0),
-                     (uint8) (setCount >> 8));
+                     (u8) (setCount >> 8));
 
        or_radio_reg(pi, RADIO_2064_REG053, 0x10);
-       write_radio_reg(pi, RADIO_2064_REG054, (uint8) (setCount & 0xff));
+       write_radio_reg(pi, RADIO_2064_REG054, (u8) (setCount & 0xff));
 
        div_int = ((fvco3 * (PLL_2064_MHZ >> 4)) / fref3) << 4;
 
@@ -4972,13 +4975,13 @@ wlc_lcnphy_radio_2064_channel_tune_4313(phy_info_t *pi, uint8 channel)
        div_frac = wlc_lcnphy_qdiv_roundup(div_frac, fref3, 20);
 
        mod_radio_reg(pi, RADIO_2064_REG045, (0x1f << 0),
-                     (uint8) (div_int >> 4));
+                     (u8) (div_int >> 4));
        mod_radio_reg(pi, RADIO_2064_REG046, (0x1f << 4),
-                     (uint8) (div_int << 4));
+                     (u8) (div_int << 4));
        mod_radio_reg(pi, RADIO_2064_REG046, (0x0f << 0),
-                     (uint8) (div_frac >> 16));
-       write_radio_reg(pi, RADIO_2064_REG047, (uint8) (div_frac >> 8) & 0xff);
-       write_radio_reg(pi, RADIO_2064_REG048, (uint8) div_frac & 0xff);
+                     (u8) (div_frac >> 16));
+       write_radio_reg(pi, RADIO_2064_REG047, (u8) (div_frac >> 8) & 0xff);
+       write_radio_reg(pi, RADIO_2064_REG048, (u8) div_frac & 0xff);
 
        write_radio_reg(pi, RADIO_2064_REG040, 0xfb);
 
@@ -4987,8 +4990,8 @@ wlc_lcnphy_radio_2064_channel_tune_4313(phy_info_t *pi, uint8 channel)
        write_radio_reg(pi, RADIO_2064_REG043, 0x0C);
 
        {
-               uint8 h29, h23, c28, d29, h28_ten, e30, h30_ten, cp_current;
-               uint16 c29, c38, c30, g30, d28;
+               u8 h29, h23, c28, d29, h28_ten, e30, h30_ten, cp_current;
+               u16 c29, c38, c30, g30, d28;
                c29 = loop_bw;
                d29 = 200;
                c38 = 1250;
@@ -5037,7 +5040,7 @@ bool wlc_phy_tpc_isenabled_lcnphy(phy_info_t *pi)
 
 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)) {
@@ -5110,17 +5113,17 @@ bool wlc_phy_attach_lcnphy(phy_info_t *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;
@@ -5251,7 +5254,7 @@ wlc_lcnphy_load_tx_iir_filter(phy_info_t *pi, bool is_ofdm, int16 filt_type)
        int16 filt_index = -1;
        int j;
 
-       uint16 addr[] = {
+       u16 addr[] = {
                0x910,
                0x91e,
                0x91f,
@@ -5270,7 +5273,7 @@ wlc_lcnphy_load_tx_iir_filter(phy_info_t *pi, bool is_ofdm, int16 filt_type)
                0x932
        };
 
-       uint16 addr_ofdm[] = {
+       u16 addr_ofdm[] = {
                0x90f,
                0x900,
                0x901,
This page took 0.058069 seconds and 5 git commands to generate.