Commit e59fe083 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

Staging: brcm80211: s/int16/s16/

Use the kernel types, don't invent your own.

Cc: Brett Rudley <brudley@broadcom.com>
Cc: Henry Ptasinski <henryp@broadcom.com>
Cc: Nohee Ko <noheek@broadcom.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 7d4df48e
......@@ -182,7 +182,7 @@ struct wl_dev {
struct wl_cfg80211_bss_info {
u16 band;
u16 channel;
int16 rssi;
s16 rssi;
u16 frame_len;
u8 frame_buf[1];
};
......
......@@ -324,7 +324,7 @@ extern "C" {
"bool", \
"s8", \
"u8", \
"int16", \
"s16", \
"u16", \
"int32", \
"uint32", \
......
......@@ -19,62 +19,62 @@
#include <typedefs.h>
int16 qm_sat32(int32 op);
s16 qm_sat32(int32 op);
int32 qm_mul321616(int16 op1, int16 op2);
int32 qm_mul321616(s16 op1, s16 op2);
int16 qm_mul16(int16 op1, int16 op2);
s16 qm_mul16(s16 op1, s16 op2);
int32 qm_muls321616(int16 op1, int16 op2);
int32 qm_muls321616(s16 op1, s16 op2);
u16 qm_mulu16(u16 op1, u16 op2);
int16 qm_muls16(int16 op1, int16 op2);
s16 qm_muls16(s16 op1, s16 op2);
int32 qm_add32(int32 op1, int32 op2);
int16 qm_add16(int16 op1, int16 op2);
s16 qm_add16(s16 op1, s16 op2);
int16 qm_sub16(int16 op1, int16 op2);
s16 qm_sub16(s16 op1, s16 op2);
int32 qm_sub32(int32 op1, int32 op2);
int32 qm_mac321616(int32 acc, int16 op1, int16 op2);
int32 qm_mac321616(int32 acc, s16 op1, s16 op2);
int32 qm_shl32(int32 op, int shift);
int32 qm_shr32(int32 op, int shift);
int16 qm_shl16(int16 op, int shift);
s16 qm_shl16(s16 op, int shift);
int16 qm_shr16(int16 op, int shift);
s16 qm_shr16(s16 op, int shift);
int16 qm_norm16(int16 op);
s16 qm_norm16(s16 op);
int16 qm_norm32(int32 op);
s16 qm_norm32(int32 op);
int16 qm_div_s(int16 num, int16 denom);
s16 qm_div_s(s16 num, s16 denom);
int16 qm_abs16(int16 op);
s16 qm_abs16(s16 op);
int16 qm_div16(int16 num, int16 denom, int16 *qQuotient);
s16 qm_div16(s16 num, s16 denom, s16 *qQuotient);
int32 qm_abs32(int32 op);
int16 qm_div163232(int32 num, int32 denom, int16 *qquotient);
s16 qm_div163232(int32 num, int32 denom, s16 *qquotient);
int32 qm_mul323216(int32 op1, int16 op2);
int32 qm_mul323216(int32 op1, s16 op2);
int32 qm_mulsu321616(int16 op1, u16 op2);
int32 qm_mulsu321616(s16 op1, u16 op2);
int32 qm_muls323216(int32 op1, int16 op2);
int32 qm_muls323216(int32 op1, s16 op2);
int32 qm_mul32(int32 a, int32 b);
int32 qm_muls32(int32 a, int32 b);
void qm_log10(int32 N, int16 qN, int16 *log10N, int16 *qLog10N);
void qm_log10(int32 N, s16 qN, s16 *log10N, s16 *qLog10N);
void qm_1byN(int32 N, int16 qN, int32 *result, int16 *qResult);
void qm_1byN(int32 N, s16 qN, int32 *result, s16 *qResult);
#endif /* #ifndef __QMATH_H__ */
......@@ -42,7 +42,7 @@ typedef unsigned long long int uintptr;
typedef unsigned int uint;
#endif
/* define [u]int16/32/64, uintptr */
/* define [u]int32/64, uintptr */
#ifndef TYPEDEF_UINT32
typedef unsigned int uint32;
......@@ -52,10 +52,6 @@ typedef unsigned int uint32;
typedef unsigned int uintptr;
#endif
#ifndef TYPEDEF_INT16
typedef signed short int16;
#endif
#ifndef TYPEDEF_INT32
typedef signed int int32;
#endif
......@@ -83,7 +79,6 @@ typedef signed int int32;
#undef TYPEDEF_UINT
#undef TYPEDEF_UINT32
#undef TYPEDEF_UINTPTR
#undef TYPEDEF_INT16
#undef TYPEDEF_INT32
/*
......
......@@ -55,7 +55,7 @@ typedef struct wl_bss_info_107 {
u8 channel; /* Channel no. */
u16 atim_window; /* units are Kusec */
u8 dtim_period; /* DTIM period */
int16 RSSI; /* receive signal strength (in dBm) */
s16 RSSI; /* receive signal strength (in dBm) */
s8 phy_noise; /* noise (in dBm) */
uint32 ie_length; /* byte length of Information Elements */
/* variable length Information Elements */
......@@ -88,7 +88,7 @@ typedef struct wl_bss_info_108 {
chanspec_t chanspec; /* chanspec for bss */
u16 atim_window; /* units are Kusec */
u8 dtim_period; /* DTIM period */
int16 RSSI; /* receive signal strength (in dBm) */
s16 RSSI; /* receive signal strength (in dBm) */
s8 phy_noise; /* noise (in dBm) */
u8 n_cap; /* BSS is 802.11N Capable */
......@@ -132,7 +132,7 @@ typedef struct wl_bss_info {
chanspec_t chanspec; /* chanspec for bss */
u16 atim_window; /* units are Kusec */
u8 dtim_period; /* DTIM period */
int16 RSSI; /* receive signal strength (in dBm) */
s16 RSSI; /* receive signal strength (in dBm) */
s8 phy_noise; /* noise (in dBm) */
u8 n_cap; /* BSS is 802.11N Capable */
......@@ -145,7 +145,7 @@ typedef struct wl_bss_info {
u16 ie_offset; /* offset at which IEs start, from beginning */
uint32 ie_length; /* byte length of Information Elements */
int16 SNR; /* average SNR of during frame reception */
s16 SNR; /* average SNR of during frame reception */
/* Add new fields here */
/* variable length Information Elements */
} wl_bss_info_t;
......
......@@ -2274,7 +2274,7 @@ static uint32 wlc_phy_txpower_est_power_nphy(phy_info_t *pi);
static uint32 wlc_phy_txpower_est_power_nphy(phy_info_t *pi)
{
int16 tx0_status, tx1_status;
s16 tx0_status, tx1_status;
u16 estPower1, estPower2;
u8 pwr0, pwr1, adj_pwr0, adj_pwr1;
uint32 est_pwr;
......@@ -3119,8 +3119,8 @@ static void wlc_phy_cal_perical_mphase_schedule(phy_info_t *pi, uint delay)
void wlc_phy_cal_perical(wlc_phy_t *pih, u8 reason)
{
int16 nphy_currtemp = 0;
int16 delta_temp = 0;
s16 nphy_currtemp = 0;
s16 delta_temp = 0;
bool do_periodic_cal = TRUE;
phy_info_t *pi = (phy_info_t *) pih;
......@@ -3171,7 +3171,7 @@ void wlc_phy_cal_perical(wlc_phy_t *pih, u8 reason)
nphy_currtemp - pi->nphy_lastcal_temp :
pi->nphy_lastcal_temp - nphy_currtemp;
if ((delta_temp < (int16) pi->phycal_tempdelta) &&
if ((delta_temp < (s16) pi->phycal_tempdelta) &&
(pi->nphy_txiqlocal_chanspec ==
pi->radio_chanspec)) {
do_periodic_cal = FALSE;
......@@ -3271,7 +3271,7 @@ void wlc_phy_stf_chain_get(wlc_phy_t *pih, u8 *txchain, u8 *rxchain)
u8 wlc_phy_stf_chain_active_get(wlc_phy_t *pih)
{
int16 nphy_currtemp;
s16 nphy_currtemp;
u8 active_bitmap;
phy_info_t *pi = (phy_info_t *) pih;
......
......@@ -345,8 +345,8 @@ typedef struct {
u16 badplcp_ma_total;
u16 badplcp_ma_list[MA_WINDOW_SZ];
int badplcp_ma_index;
int16 pre_badplcp_cnt;
int16 bphy_pre_badplcp_cnt;
s16 pre_badplcp_cnt;
s16 bphy_pre_badplcp_cnt;
u16 init_gain_core1;
u16 init_gain_core2;
......@@ -358,7 +358,7 @@ typedef struct {
u16 crsminpwrl0;
u16 crsminpwru0;
int16 crsminpwr_index;
s16 crsminpwr_index;
u16 radio_2057_core1_rssi_wb1a_gc_stored;
u16 radio_2057_core2_rssi_wb1a_gc_stored;
......@@ -413,10 +413,10 @@ typedef struct _lo_complex_t {
} lo_complex_abgphy_info_t;
typedef struct _nphy_iq_comp {
int16 a0;
int16 b0;
int16 a1;
int16 b1;
s16 a0;
s16 b0;
s16 a1;
s16 b1;
} nphy_iq_comp_t;
typedef struct _nphy_txpwrindex {
......@@ -446,30 +446,30 @@ typedef struct {
typedef struct _nphy_pwrctrl {
s8 max_pwr_2g;
s8 idle_targ_2g;
int16 pwrdet_2g_a1;
int16 pwrdet_2g_b0;
int16 pwrdet_2g_b1;
s16 pwrdet_2g_a1;
s16 pwrdet_2g_b0;
s16 pwrdet_2g_b1;
s8 max_pwr_5gm;
s8 idle_targ_5gm;
s8 max_pwr_5gh;
s8 max_pwr_5gl;
int16 pwrdet_5gm_a1;
int16 pwrdet_5gm_b0;
int16 pwrdet_5gm_b1;
int16 pwrdet_5gl_a1;
int16 pwrdet_5gl_b0;
int16 pwrdet_5gl_b1;
int16 pwrdet_5gh_a1;
int16 pwrdet_5gh_b0;
int16 pwrdet_5gh_b1;
s16 pwrdet_5gm_a1;
s16 pwrdet_5gm_b0;
s16 pwrdet_5gm_b1;
s16 pwrdet_5gl_a1;
s16 pwrdet_5gl_b0;
s16 pwrdet_5gl_b1;
s16 pwrdet_5gh_a1;
s16 pwrdet_5gh_b0;
s16 pwrdet_5gh_b1;
s8 idle_targ_5gl;
s8 idle_targ_5gh;
s8 idle_tssi_2g;
s8 idle_tssi_5g;
s8 idle_tssi;
int16 a1;
int16 b0;
int16 b1;
s16 a1;
s16 b0;
s16 b1;
} phy_pwrctrl_t;
typedef struct _nphy_txgains {
......@@ -634,12 +634,12 @@ struct phy_info {
bool disable_percal;
mbool measure_hold;
int16 txpa_2g[PWRTBL_NUM_COEFF];
int16 txpa_2g_low_temp[PWRTBL_NUM_COEFF];
int16 txpa_2g_high_temp[PWRTBL_NUM_COEFF];
int16 txpa_5g_low[PWRTBL_NUM_COEFF];
int16 txpa_5g_mid[PWRTBL_NUM_COEFF];
int16 txpa_5g_hi[PWRTBL_NUM_COEFF];
s16 txpa_2g[PWRTBL_NUM_COEFF];
s16 txpa_2g_low_temp[PWRTBL_NUM_COEFF];
s16 txpa_2g_high_temp[PWRTBL_NUM_COEFF];
s16 txpa_5g_low[PWRTBL_NUM_COEFF];
s16 txpa_5g_mid[PWRTBL_NUM_COEFF];
s16 txpa_5g_hi[PWRTBL_NUM_COEFF];
u8 tx_srom_max_2g;
u8 tx_srom_max_5g_low;
......@@ -682,7 +682,7 @@ struct phy_info {
bool txpwroverride;
bool txpwridx_override_aphy;
int16 radiopwr_override;
s16 radiopwr_override;
u16 hwpwr_txcur;
u8 saved_txpwr_idx;
......@@ -691,10 +691,10 @@ struct phy_info {
uint32 tr_R_gain_val;
uint32 tr_T_gain_val;
int16 ofdm_analog_filt_bw_override;
int16 cck_analog_filt_bw_override;
int16 ofdm_rccal_override;
int16 cck_rccal_override;
s16 ofdm_analog_filt_bw_override;
s16 cck_analog_filt_bw_override;
s16 ofdm_rccal_override;
s16 cck_rccal_override;
u16 extlna_type;
uint interference_mode_crs_time;
......@@ -714,8 +714,8 @@ struct phy_info {
s8 phy_scraminit;
u8 phy_gpiosel;
int16 phy_txcore_disable_temp;
int16 phy_txcore_enable_temp;
s16 phy_txcore_disable_temp;
s16 phy_txcore_enable_temp;
s8 phy_tempsense_offset;
bool phy_txcore_heatedup;
......@@ -729,8 +729,8 @@ struct phy_info {
s8 stats_11b_txpower[STATIC_NUM_RF][STATIC_NUM_BB];
u16 gain_table[TX_GAIN_TABLE_LENGTH];
bool loopback_gain;
int16 max_lpback_gain_hdB;
int16 trsw_rx_gain_hdB;
s16 max_lpback_gain_hdB;
s16 trsw_rx_gain_hdB;
u8 power_vec[8];
u16 rc_cal;
......@@ -820,7 +820,7 @@ struct phy_info {
u8 nphy_papd_skip;
u8 nphy_tssi_slope;
int16 nphy_noise_win[PHY_CORE_MAX][PHY_NOISE_WINDOW_SZ];
s16 nphy_noise_win[PHY_CORE_MAX][PHY_NOISE_WINDOW_SZ];
u8 nphy_noise_index;
u8 nphy_txpid2g[PHY_CORE_NUM_2];
......@@ -851,7 +851,7 @@ struct phy_info {
struct wlapi_timer *phycal_timer;
bool use_int_tx_iqlo_cal_nphy;
bool internal_tx_iqlo_cal_tapoff_intpa_nphy;
int16 nphy_lastcal_temp;
s16 nphy_lastcal_temp;
txiqcal_cache_t calibration_cache;
rssical_cache_t rssical_cache;
......@@ -861,7 +861,7 @@ struct phy_info {
uint nphy_papd_last_cal;
u16 nphy_papd_tx_gain_at_last_cal[2];
u8 nphy_papd_cal_gain_index[2];
int16 nphy_papd_epsilon_offset[2];
s16 nphy_papd_epsilon_offset[2];
bool nphy_papd_recal_enable;
uint32 nphy_papd_recal_counter;
bool nphy_force_papd_cal;
......@@ -912,7 +912,7 @@ struct phy_info {
u16 crsminpwr0;
u16 crsminpwrl0;
u16 crsminpwru0;
int16 noise_crsminpwr_index;
s16 noise_crsminpwr_index;
u16 init_gain_core1;
u16 init_gain_core2;
u16 init_gainb_core1;
......@@ -1085,7 +1085,7 @@ extern void wlc_phy_mcs_to_ofdm_powers_nphy(u8 *power,
u8 rate_mcs_start);
extern u16 wlc_lcnphy_tempsense(phy_info_t *pi, bool mode);
extern int16 wlc_lcnphy_tempsense_new(phy_info_t *pi, bool mode);
extern s16 wlc_lcnphy_tempsense_new(phy_info_t *pi, bool mode);
extern s8 wlc_lcnphy_tempsense_degree(phy_info_t *pi, bool mode);
extern s8 wlc_lcnphy_vbatsense(phy_info_t *pi, bool mode);
extern void wlc_phy_carrier_suppress_lcnphy(phy_info_t *pi);
......@@ -1171,7 +1171,7 @@ extern void wlc_phy_switch_radio_nphy(phy_info_t *pi, bool on);
extern void wlc_phy_stf_chain_upd_nphy(phy_info_t *pi);
extern void wlc_phy_force_rfseq_nphy(phy_info_t *pi, u8 cmd);
extern int16 wlc_phy_tempsense_nphy(phy_info_t *pi);
extern s16 wlc_phy_tempsense_nphy(phy_info_t *pi);
extern u16 wlc_phy_classifier_nphy(phy_info_t *pi, u16 mask, u16 val);
......
......@@ -165,13 +165,13 @@ typedef struct {
typedef struct {
u8 chan;
int16 a;
int16 b;
s16 a;
s16 b;
} lcnphy_rx_iqcomp_t;
typedef struct {
int16 re;
int16 im;
s16 re;
s16 im;
} lcnphy_spb_tone_t;
typedef struct {
......@@ -974,7 +974,7 @@ u16
#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))
#define LCNPHY_TEMPSENSE(val) ((s16)((val > 255) ? (val - 512) : val))
static uint32 wlc_lcnphy_qdiv_roundup(uint32 divident, uint32 divisor,
u8 precision);
......@@ -1010,14 +1010,14 @@ 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,
u16 thresh, int16 *ptr, int mode);
static int wlc_lcnphy_calc_floor(int16 coeff, int type);
u16 thresh, s16 *ptr, int mode);
static int wlc_lcnphy_calc_floor(s16 coeff, int type);
static void wlc_lcnphy_tx_iqlo_loopback(phy_info_t *pi,
u16 *values_to_save);
static void wlc_lcnphy_tx_iqlo_loopback_cleanup(phy_info_t *pi,
u16 *values_to_save);
static void wlc_lcnphy_set_cc(phy_info_t *pi, int cal_type, int16 coeff_x,
int16 coeff_y);
static void wlc_lcnphy_set_cc(phy_info_t *pi, int cal_type, s16 coeff_x,
s16 coeff_y);
static lcnphy_unsign16_struct wlc_lcnphy_get_cc(phy_info_t *pi, int cal_type);
static void wlc_lcnphy_a1(phy_info_t *pi, int cal_type,
int num_levels, int step_size_lg2);
......@@ -1034,7 +1034,7 @@ static void wlc_lcnphy_rc_cal(phy_info_t *pi);
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);
s16 filt_type);
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)
......@@ -1104,7 +1104,7 @@ wlc_lcnphy_qdiv_roundup(uint32 dividend, uint32 divisor, u8 precision)
return quotient;
}
static int wlc_lcnphy_calc_floor(int16 coeff_x, int type)
static int wlc_lcnphy_calc_floor(s16 coeff_x, int type)
{
int k;
k = 0;
......@@ -1699,7 +1699,7 @@ static void wlc_lcnphy_set_tx_pwr_soft_ctrl(phy_info_t *pi, s8 index)
static s8 wlc_lcnphy_tempcompensated_txpwrctrl(phy_info_t *pi)
{
s8 index, delta_brd, delta_temp, new_index, tempcorrx;
int16 manp, meas_temp, temp_diff;
s16 manp, meas_temp, temp_diff;
bool neg = 0;
u16 temp;
phy_info_lcnphy_t *pi_lcn = pi->u.pi_lcnphy;
......@@ -2795,7 +2795,7 @@ wlc_lcnphy_start_tx_tone(phy_info_t *pi, int32 f_kHz, u16 max_val,
void wlc_lcnphy_stop_tx_tone(phy_info_t *pi)
{
int16 playback_status;
s16 playback_status;
phy_info_lcnphy_t *pi_lcn = pi->u.pi_lcnphy;
pi->phy_tx_tone_freq = 0;
......@@ -2975,10 +2975,10 @@ static void wlc_lcnphy_txpwrtbl_iqlo_cal(phy_info_t *pi)
wlc_lcnphy_set_tx_pwr_by_index(pi, SAVE_txpwrindex);
}
int16 wlc_lcnphy_tempsense_new(phy_info_t *pi, bool mode)
s16 wlc_lcnphy_tempsense_new(phy_info_t *pi, bool mode)
{
u16 tempsenseval1, tempsenseval2;
int16 avg = 0;
s16 avg = 0;
bool suspend = 0;
if (NORADIO_ENAB(pi->pubpi))
......@@ -2996,14 +2996,14 @@ int16 wlc_lcnphy_tempsense_new(phy_info_t *pi, bool mode)
tempsenseval2 = read_phy_reg(pi, 0x477) & 0x1FF;
if (tempsenseval1 > 255)
avg = (int16) (tempsenseval1 - 512);
avg = (s16) (tempsenseval1 - 512);
else
avg = (int16) tempsenseval1;
avg = (s16) tempsenseval1;
if (tempsenseval2 > 255)
avg += (int16) (tempsenseval2 - 512);
avg += (s16) (tempsenseval2 - 512);
else
avg += (int16) tempsenseval2;
avg += (s16) tempsenseval2;
avg /= 2;
......@@ -3194,7 +3194,7 @@ static bool wlc_lcnphy_calc_rx_iq_comp(phy_info_t *pi, u16 num_samps)
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;
s16 iq_nbits, qq_nbits, arsh, brsh;
int32 iq;
uint32 ii, qq;
phy_info_lcnphy_t *pi_lcn = pi->u.pi_lcnphy;
......@@ -3289,10 +3289,10 @@ wlc_lcnphy_rx_iq_cal(phy_info_t *pi, const lcnphy_rx_iqcomp_t *iqcomp,
uint32 received_power, rx_pwr_threshold;
u16 old_sslpnCalibClkEnCtrl, old_sslpnRxFeClkEnCtrl;
u16 values_to_save[11];
int16 *ptr;
s16 *ptr;
phy_info_lcnphy_t *pi_lcn = pi->u.pi_lcnphy;
ptr = MALLOC(pi->sh->osh, sizeof(int16) * 131);
ptr = MALLOC(pi->sh->osh, sizeof(s16) * 131);
if (NULL == ptr) {
return FALSE;
}
......@@ -3440,7 +3440,7 @@ wlc_lcnphy_rx_iq_cal(phy_info_t *pi, const lcnphy_rx_iqcomp_t *iqcomp,
}
cal_done:
MFREE(pi->sh->osh, ptr, 131 * sizeof(int16));
MFREE(pi->sh->osh, ptr, 131 * sizeof(s16));
return result;
}
......@@ -3852,12 +3852,12 @@ wlc_lcnphy_tx_iqlo_loopback(phy_info_t *pi, u16 *values_to_save)
static void
wlc_lcnphy_samp_cap(phy_info_t *pi, int clip_detect_algo, u16 thresh,
int16 *ptr, int mode)
s16 *ptr, int mode)
{
uint32 curval1, curval2, stpptr, curptr, strptr, val;
u16 sslpnCalibClkEnCtrl, timer;
u16 old_sslpnCalibClkEnCtrl;
int16 imag, real;
s16 imag, real;
phy_info_lcnphy_t *pi_lcn = pi->u.pi_lcnphy;
timer = 0;
......@@ -3950,7 +3950,7 @@ 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)
wlc_lcnphy_set_cc(phy_info_t *pi, int cal_type, s16 coeff_x, s16 coeff_y)
{
u16 di0dq0;
u16 x, y, data_rf;
......@@ -4036,8 +4036,8 @@ wlc_lcnphy_a1(phy_info_t *pi, int cal_type, int num_levels, int step_size_lg2)
lcnphy_unsign16_struct phy_c3;
int phy_c4, phy_c5, k, l, j, phy_c6;
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;
s16 phy_c10, phy_c11, phy_c12, phy_c13, phy_c14, phy_c15, phy_c16;
s16 *ptr, phy_c17;
int32 phy_c18, phy_c19;
uint32 phy_c20, phy_c21;
bool phy_c22, phy_c23, phy_c24, phy_c25;
......@@ -4047,7 +4047,7 @@ wlc_lcnphy_a1(phy_info_t *pi, int cal_type, int num_levels, int step_size_lg2)
u16 *phy_c32;
phy_c21 = 0;
phy_c10 = phy_c13 = phy_c14 = phy_c8 = 0;
ptr = MALLOC(pi->sh->osh, sizeof(int16) * 131);
ptr = MALLOC(pi->sh->osh, sizeof(s16) * 131);
if (NULL == ptr) {
return;
}
......@@ -4098,8 +4098,8 @@ wlc_lcnphy_a1(phy_info_t *pi, int cal_type, int num_levels, int step_size_lg2)
phy_c7 = (1 << step_size_lg2);
phy_c3 = wlc_lcnphy_get_cc(pi, cal_type);
phy_c15 = (int16) phy_c3.re;
phy_c16 = (int16) phy_c3.im;
phy_c15 = (s16) phy_c3.re;
phy_c16 = (s16) phy_c3.im;
if (cal_type == 2) {
if (phy_c3.re > 127)
phy_c15 = phy_c3.re - 256;
......@@ -4222,7 +4222,7 @@ wlc_lcnphy_a1(phy_info_t *pi, int cal_type, int num_levels, int step_size_lg2)
write_radio_reg(pi, RADIO_2064_REG026, phy_c31);
MFREE(pi->sh->osh, phy_c32, 20 * sizeof(u16));
MFREE(pi->sh->osh, ptr, 131 * sizeof(int16));
MFREE(pi->sh->osh, ptr, 131 * sizeof(s16));
}
static void
......@@ -4283,7 +4283,7 @@ static void wlc_lcnphy_load_rfpower(phy_info_t *pi)
uint32 val, bbmult, rfgain;
u8 index;
u8 scale_factor = 1;
int16 temp, temp1, temp2, qQ, qQ1, qQ2, shift;
s16 temp, temp1, temp2, qQ, qQ1, qQ2, shift;
tab.tbl_id = LCNPHY_TBL_ID_TXPWRCTL;
tab.tbl_width = 32;
......@@ -4479,7 +4479,7 @@ static void WLBANDINITFN(wlc_lcnphy_rev2_baseband_init) (phy_info_t *pi)
static void wlc_lcnphy_agc_temp_init(phy_info_t *pi)
{
int16 temp;
s16 temp;
phytbl_info_t tab;
uint32 tableBuffer[2];
phy_info_lcnphy_t *pi_lcn = pi->u.pi_lcnphy;
......@@ -4487,7 +4487,7 @@ static void wlc_lcnphy_agc_temp_init(phy_info_t *pi)
if (NORADIO_ENAB(pi->pubpi))
return;
temp = (int16) read_phy_reg(pi, 0x4df);
temp = (s16) read_phy_reg(pi, 0x4df);
pi_lcn->lcnphy_ofdmgainidxtableoffset = (temp & (0xff << 0)) >> 0;
if (pi_lcn->lcnphy_ofdmgainidxtableoffset > 127)
......@@ -4513,7 +4513,7 @@ static void wlc_lcnphy_agc_temp_init(phy_info_t *pi)
tableBuffer[1] -= 128;
pi_lcn->lcnphy_tr_T_gain_val = tableBuffer[1];
temp = (int16) (read_phy_reg(pi, 0x434)
temp = (s16) (read_phy_reg(pi, 0x434)
& (0xff << 0));
if (temp > 127)
temp -= 256;
......@@ -4742,9 +4742,9 @@ static bool BCMATTACHFN(wlc_phy_txpwr_srom_read_lcnphy) (phy_info_t *pi)
pi_lcn->lcnphy_rx_power_offset =
(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->txpa_2g[0] = (s16) PHY_GETINTVAR(pi, "pa0b0");
pi->txpa_2g[1] = (s16) PHY_GETINTVAR(pi, "pa0b1");
pi->txpa_2g[2] = (s16) PHY_GETINTVAR(pi, "pa0b2");
pi_lcn->lcnphy_rssi_vf = (u8) PHY_GETINTVAR(pi, "rssismf2g");
pi_lcn->lcnphy_rssi_vc = (u8) PHY_GETINTVAR(pi, "rssismc2g");
......@@ -4838,8 +4838,8 @@ static bool BCMATTACHFN(wlc_phy_txpwr_srom_read_lcnphy) (phy_info_t *pi)
}
pi_lcn->lcnphy_cck_dig_filt_type = -1;
if (PHY_GETVAR(pi, "cckdigfilttype")) {
int16 temp;
temp = (int16) PHY_GETINTVAR(pi, "cckdigfilttype");
s16 temp;
temp = (s16) PHY_GETINTVAR(pi, "cckdigfilttype");
if (temp >= 0) {
pi_lcn->lcnphy_cck_dig_filt_type = temp;
}
......@@ -5249,9 +5249,9 @@ int32 wlc_lcnphy_rx_signal_power(phy_info_t *pi, int32 gain_index)
}
static int
wlc_lcnphy_load_tx_iir_filter(phy_info_t *pi, bool is_ofdm, int16 filt_type)
wlc_lcnphy_load_tx_iir_filter(phy_info_t *pi, bool is_ofdm, s16 filt_type)
{
int16 filt_index = -1;
s16 filt_index = -1;
int j;
u16 addr[] = {
......@@ -5295,7 +5295,7 @@ wlc_lcnphy_load_tx_iir_filter(phy_info_t *pi, bool is_ofdm, int16 filt_type)
if (!is_ofdm) {
for (j = 0; j < LCNPHY_NUM_TX_DIG_FILTERS_CCK; j++) {
if (filt_type == LCNPHY_txdigfiltcoeffs_cck[j][0]) {
filt_index = (int16) j;
filt_index = (s16) j;
break;
}
}
......@@ -5312,7 +5312,7 @@ wlc_lcnphy_load_tx_iir_filter(phy_info_t *pi, bool is_ofdm, int16 filt_type)
} else {
for (j = 0; j < LCNPHY_NUM_TX_DIG_FILTERS_OFDM; j++) {
if (filt_type == LCNPHY_txdigfiltcoeffs_ofdm[j][0]) {
filt_index = (int16) j;
filt_index = (s16) j;
break;
}
}
......
......@@ -47,9 +47,9 @@ struct phy_info_lcnphy {
u8 lcnphy_rssi_vc_hightemp;
u8 lcnphy_rssi_gs_hightemp;
int16 lcnphy_pa0b0;
int16 lcnphy_pa0b1;
int16 lcnphy_pa0b2;
s16 lcnphy_pa0b0;
s16 lcnphy_pa0b1;
s16 lcnphy_pa0b2;
u16 lcnphy_rawtempsense;
u8 lcnphy_measPower;
......@@ -76,8 +76,8 @@ struct phy_info_lcnphy {
uint32 lcnphy_gain_idx_14_hiword;
uint32 lcnphy_gain_idx_27_lowword;
uint32 lcnphy_gain_idx_27_hiword;
int16 lcnphy_ofdmgainidxtableoffset;
int16 lcnphy_dsssgainidxtableoffset;
s16 lcnphy_ofdmgainidxtableoffset;
s16 lcnphy_dsssgainidxtableoffset;
uint32 lcnphy_tr_R_gain_val;
uint32 lcnphy_tr_T_gain_val;
s8 lcnphy_input_pwr_offset_db;
......@@ -98,8 +98,8 @@ struct phy_info_lcnphy {
u16 lcnphy_extstxctrl4;
u16 lcnphy_extstxctrl0;
u16 lcnphy_extstxctrl1;
int16 lcnphy_cck_dig_filt_type;
int16 lcnphy_ofdm_dig_filt_type;
s16 lcnphy_cck_dig_filt_type;
s16 lcnphy_ofdm_dig_filt_type;
lcnphy_cal_results_t lcnphy_cal_results;
u8 lcnphy_psat_pwr;
......
This diff is collapsed.
......@@ -74,8 +74,8 @@ struct wlc_bsscfg {
/* security */
uint32 wsec; /* wireless security bitvec */
int16 auth; /* 802.11 authentication: Open, Shared Key, WPA */
int16 openshared; /* try Open auth first, then Shared Key */
s16 auth; /* 802.11 authentication: Open, Shared Key, WPA */
s16 openshared; /* try Open auth first, then Shared Key */
bool wsec_restrict; /* drop unencrypted packets if wsec is enabled */
bool eap_restrict; /* restrict data until 802.1X auth succeeds */
u16 WPA_auth; /* WPA: authenticated key management */
......
......@@ -790,7 +790,7 @@ void wlc_switch_shortslot(wlc_info_t *wlc, bool shortslot)
static u8 wlc_local_constraint_qdbm(wlc_info_t *wlc)
{
u8 local;
int16 local_max;
s16 local_max;
local = WLC_TXPWR_MAX;
if (wlc->pub->associated &&
......@@ -5795,7 +5795,7 @@ u16 BCMFASTPATH wlc_phytxctl1_calc(wlc_info_t *wlc, ratespec_t rspec)
/* 0 = 1Mbps; 1 = 2Mbps; 2 = 5.5Mbps; 3 = 11Mbps */
phyctl1 = (bw | (RSPEC_STF(rspec) << PHY_TXC1_MODE_SHIFT));
} else { /* legacy OFDM/CCK */
int16 phycfg;
s16 phycfg;
/* get the phyctl byte from rate phycfg table */
phycfg = wlc_rate_legacy_phyctl(RSPEC2RATE(rspec));
if (phycfg == -1) {
......
......@@ -317,7 +317,7 @@ typedef struct wlccore {
/* fifo */
uint *txavail[NFIFO]; /* # tx descriptors available */
int16 txpktpend[NFIFO]; /* tx admission control */
s16 txpktpend[NFIFO]; /* tx admission control */
#endif /* WLC_LOW */
macstat_t *macstat_snapshot; /* mac hw prev read values */
......
......@@ -169,8 +169,8 @@ typedef struct wlc_bss_info {
u16 flags; /* flags for internal attributes */
u8 SSID_len; /* the length of SSID */
u8 SSID[32]; /* SSID string */
int16 RSSI; /* receive signal strength (in dBm) */
int16 SNR; /* receive signal SNR in dB */
s16 RSSI; /* receive signal strength (in dBm) */
s16 SNR; /* receive signal SNR in dB */
u16 beacon_period; /* units are Kusec */
u16 atim_window; /* units are Kusec */
chanspec_t chanspec; /* Channel num, bw, ctrl_sb and band */
......
......@@ -467,7 +467,7 @@ wlc_rateset_default(wlc_rateset_t *rs_tgt, const wlc_rateset_t *rs_hw,
mcsallow ? txstreams : 1);
}
int16 BCMFASTPATH wlc_rate_legacy_phyctl(uint rate)
s16 BCMFASTPATH wlc_rate_legacy_phyctl(uint rate)
{
uint i;
for (i = 0; i < LEGACY_PHYCFG_TABLE_SIZE; i++)
......
......@@ -160,7 +160,7 @@ extern void wlc_rateset_default(struct wlc_rateset *rs_tgt,
const struct wlc_rateset *rs_hw, uint phy_type,
int bandtype, bool cck_only, uint rate_mask,
bool mcsallow, u8 bw, u8 txstreams);
extern int16 wlc_rate_legacy_phyctl(uint rate);
extern s16 wlc_rate_legacy_phyctl(uint rate);
extern void wlc_rateset_mcs_upd(struct wlc_rateset *rs, u8 txstreams);
extern void wlc_rateset_mcs_clear(struct wlc_rateset *rateset);
......
......@@ -75,7 +75,7 @@ struct osl_info {
/* Global ASSERT type flag */
uint32 g_assert_type;
static int16 linuxbcmerrormap[] = { 0, /* 0 */
static s16 linuxbcmerrormap[] = { 0, /* 0 */
-EINVAL, /* BCME_ERROR */
-EINVAL, /* BCME_BADARG */
-EINVAL, /* BCME_BADOPTION */
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment