From cb1e370987c3651707e30e404e41ebdc83571fba Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Wed, 2 Feb 2011 14:05:54 -0800 Subject: [PATCH] staging: ath6kl: Convert A_INT16 to s16 Signed-off-by: Joe Perches Signed-off-by: Greg Kroah-Hartman --- drivers/staging/ath6kl/include/common/wmi.h | 36 +++++++++---------- drivers/staging/ath6kl/include/wlan_api.h | 2 +- drivers/staging/ath6kl/os/linux/ar6000_drv.c | 24 ++++++------- drivers/staging/ath6kl/os/linux/ar6000_pm.c | 2 +- .../ath6kl/os/linux/include/ar6xapi_linux.h | 6 ++-- .../ath6kl/os/linux/include/athdrv_linux.h | 10 +++--- drivers/staging/ath6kl/wmi/wmi.c | 18 +++++----- drivers/staging/ath6kl/wmi/wmi_host.h | 4 +-- 8 files changed, 50 insertions(+), 52 deletions(-) diff --git a/drivers/staging/ath6kl/include/common/wmi.h b/drivers/staging/ath6kl/include/common/wmi.h index 2fb03bea403e..12ca0254e8ef 100644 --- a/drivers/staging/ath6kl/include/common/wmi.h +++ b/drivers/staging/ath6kl/include/common/wmi.h @@ -996,18 +996,18 @@ typedef PREPACK struct { typedef PREPACK struct WMI_RSSI_THRESHOLD_PARAMS{ u32 pollTime; /* Polling time as a factor of LI */ - A_INT16 thresholdAbove1_Val; /* lowest of upper */ - A_INT16 thresholdAbove2_Val; - A_INT16 thresholdAbove3_Val; - A_INT16 thresholdAbove4_Val; - A_INT16 thresholdAbove5_Val; - A_INT16 thresholdAbove6_Val; /* highest of upper */ - A_INT16 thresholdBelow1_Val; /* lowest of bellow */ - A_INT16 thresholdBelow2_Val; - A_INT16 thresholdBelow3_Val; - A_INT16 thresholdBelow4_Val; - A_INT16 thresholdBelow5_Val; - A_INT16 thresholdBelow6_Val; /* highest of bellow */ + s16 thresholdAbove1_Val; /* lowest of upper */ + s16 thresholdAbove2_Val; + s16 thresholdAbove3_Val; + s16 thresholdAbove4_Val; + s16 thresholdAbove5_Val; + s16 thresholdAbove6_Val; /* highest of upper */ + s16 thresholdBelow1_Val; /* lowest of bellow */ + s16 thresholdBelow2_Val; + s16 thresholdBelow3_Val; + s16 thresholdBelow4_Val; + s16 thresholdBelow5_Val; + s16 thresholdBelow6_Val; /* highest of bellow */ u8 weight; /* "alpha" */ u8 reserved[3]; } POSTPACK WMI_RSSI_THRESHOLD_PARAMS_CMD; @@ -1209,8 +1209,8 @@ typedef PREPACK struct { typedef PREPACK struct WMI_LOWRSSI_SCAN_PARAMS { u16 lowrssi_scan_period; - A_INT16 lowrssi_scan_threshold; - A_INT16 lowrssi_roam_threshold; + s16 lowrssi_scan_threshold; + s16 lowrssi_roam_threshold; u8 roam_rssi_floor; u8 reserved[1]; /* For alignment */ } POSTPACK WMI_LOWRSSI_SCAN_PARAMS; @@ -2062,7 +2062,7 @@ typedef PREPACK struct { u16 channel; u8 frameType; /* see WMI_BI_FTYPE */ u8 snr; - A_INT16 rssi; + s16 rssi; u8 bssid[ATH_MAC_LEN]; u32 ieMask; } POSTPACK WMI_BSS_INFO_HDR; @@ -2277,9 +2277,9 @@ typedef PREPACK struct { u32 cs_lowRssi_cnt; u16 cs_connect_cnt; u16 cs_disconnect_cnt; - A_INT16 cs_aveBeacon_rssi; + s16 cs_aveBeacon_rssi; u16 cs_roam_count; - A_INT16 cs_rssi; + s16 cs_rssi; u8 cs_snr; u8 cs_aveBeacon_snr; u8 cs_lastRoam_msec; @@ -2335,7 +2335,7 @@ typedef enum{ }WMI_RSSI_THRESHOLD_VAL; typedef PREPACK struct { - A_INT16 rssi; + s16 rssi; u8 range; }POSTPACK WMI_RSSI_THRESHOLD_EVENT; diff --git a/drivers/staging/ath6kl/include/wlan_api.h b/drivers/staging/ath6kl/include/wlan_api.h index ce799683725d..ba5493c98a76 100644 --- a/drivers/staging/ath6kl/include/wlan_api.h +++ b/drivers/staging/ath6kl/include/wlan_api.h @@ -61,7 +61,7 @@ struct ieee80211_common_ie { typedef struct bss { u8 ni_macaddr[6]; u8 ni_snr; - A_INT16 ni_rssi; + s16 ni_rssi; struct bss *ni_list_next; struct bss *ni_list_prev; struct bss *ni_hash_next; diff --git a/drivers/staging/ath6kl/os/linux/ar6000_drv.c b/drivers/staging/ath6kl/os/linux/ar6000_drv.c index d527cee25d1c..651f9f4b665a 100644 --- a/drivers/staging/ath6kl/os/linux/ar6000_drv.c +++ b/drivers/staging/ath6kl/os/linux/ar6000_drv.c @@ -260,16 +260,16 @@ typedef struct user_rssi_compensation_t { u16 bg_enable; u16 enable; }; - A_INT16 bg_param_a; - A_INT16 bg_param_b; - A_INT16 a_param_a; - A_INT16 a_param_b; + s16 bg_param_a; + s16 bg_param_b; + s16 a_param_a; + s16 a_param_b; u32 reserved; } USER_RSSI_CPENSATION; static USER_RSSI_CPENSATION rssi_compensation_param; -static A_INT16 rssi_compensation_table[96]; +static s16 rssi_compensation_table[96]; int reconnect_flag = 0; static ar6k_pal_config_t ar6k_pal_config_g; @@ -2430,7 +2430,7 @@ int ar6000_init(struct net_device *dev) AR_SOFTC_T *ar; int status; A_INT32 timeleft; - A_INT16 i; + s16 i; int ret = 0; #if defined(INIT_MODE_DRV_ENABLED) && defined(ENABLE_COEXISTENCE) WMI_SET_BTCOEX_COLOCATED_BT_DEV_CMD sbcb_cmd; @@ -5030,7 +5030,7 @@ ar6000_targetStats_event(AR_SOFTC_T *ar, u8 *ptr, u32 len) } void -ar6000_rssiThreshold_event(AR_SOFTC_T *ar, WMI_RSSI_THRESHOLD_VAL newThreshold, A_INT16 rssi) +ar6000_rssiThreshold_event(AR_SOFTC_T *ar, WMI_RSSI_THRESHOLD_VAL newThreshold, s16 rssi) { USER_RSSI_THOLD userRssiThold; @@ -5791,7 +5791,7 @@ read_rssi_compensation_param(AR_SOFTC_T *ar) //#define RSSICOMPENSATION_PRINT #ifdef RSSICOMPENSATION_PRINT - A_INT16 i; + s16 i; cust_data_ptr = ar6000_get_cust_data_buffer(ar->arTargetType); for (i=0; i<16; i++) { A_PRINTF("cust_data_%d = %x \n", i, *(u8 *)cust_data_ptr); @@ -5856,8 +5856,7 @@ rssi_compensation_calc_tcmd(u32 freq, A_INT32 rssi, u32 totalPkt) return rssi; } -A_INT16 -rssi_compensation_calc(AR_SOFTC_T *ar, A_INT16 rssi) +s16 rssi_compensation_calc(AR_SOFTC_T *ar, s16 rssi) { if (ar->arBssChannel > 5000) { @@ -5885,10 +5884,9 @@ rssi_compensation_calc(AR_SOFTC_T *ar, A_INT16 rssi) return rssi; } -A_INT16 -rssi_compensation_reverse_calc(AR_SOFTC_T *ar, A_INT16 rssi, bool Above) +s16 rssi_compensation_reverse_calc(AR_SOFTC_T *ar, s16 rssi, bool Above) { - A_INT16 i; + s16 i; if (ar->arBssChannel > 5000) { diff --git a/drivers/staging/ath6kl/os/linux/ar6000_pm.c b/drivers/staging/ath6kl/os/linux/ar6000_pm.c index 691e535403a1..0995bbbb4e38 100644 --- a/drivers/staging/ath6kl/os/linux/ar6000_pm.c +++ b/drivers/staging/ath6kl/os/linux/ar6000_pm.c @@ -215,7 +215,7 @@ int ar6000_suspend_ev(void *context) { int status = A_OK; AR_SOFTC_T *ar = (AR_SOFTC_T *)context; - A_INT16 pmmode = ar->arSuspendConfig; + s16 pmmode = ar->arSuspendConfig; wow_not_connected: switch (pmmode) { case WLAN_SUSPEND_WOW: diff --git a/drivers/staging/ath6kl/os/linux/include/ar6xapi_linux.h b/drivers/staging/ath6kl/os/linux/include/ar6xapi_linux.h index bd62141b89eb..328982fb3a94 100644 --- a/drivers/staging/ath6kl/os/linux/include/ar6xapi_linux.h +++ b/drivers/staging/ath6kl/os/linux/include/ar6xapi_linux.h @@ -54,7 +54,7 @@ void ar6000_scanComplete_event(struct ar6_softc *ar, int status); void ar6000_targetStats_event(struct ar6_softc *ar, u8 *ptr, u32 len); void ar6000_rssiThreshold_event(struct ar6_softc *ar, WMI_RSSI_THRESHOLD_VAL newThreshold, - A_INT16 rssi); + s16 rssi); void ar6000_reportError_event(struct ar6_softc *, WMI_TARGET_ERROR_VAL errorVal); void ar6000_cac_event(struct ar6_softc *ar, u8 ac, u8 cac_indication, u8 statusCode, u8 *tspecSuggestion); @@ -78,8 +78,8 @@ void ar6000_gpio_data_rx(u32 reg_id, u32 value); void ar6000_gpio_ack_rx(void); A_INT32 rssi_compensation_calc_tcmd(u32 freq, A_INT32 rssi, u32 totalPkt); -A_INT16 rssi_compensation_calc(struct ar6_softc *ar, A_INT16 rssi); -A_INT16 rssi_compensation_reverse_calc(struct ar6_softc *ar, A_INT16 rssi, bool Above); +s16 rssi_compensation_calc(struct ar6_softc *ar, s16 rssi); +s16 rssi_compensation_reverse_calc(struct ar6_softc *ar, s16 rssi, bool Above); void ar6000_dbglog_init_done(struct ar6_softc *ar); diff --git a/drivers/staging/ath6kl/os/linux/include/athdrv_linux.h b/drivers/staging/ath6kl/os/linux/include/athdrv_linux.h index a345ecd319ba..a3e65081f98d 100644 --- a/drivers/staging/ath6kl/os/linux/include/athdrv_linux.h +++ b/drivers/staging/ath6kl/os/linux/include/athdrv_linux.h @@ -1069,9 +1069,9 @@ typedef struct targetStats_t { u32 wow_num_pkts_dropped; u16 wow_num_events_discarded; - A_INT16 noise_floor_calibation; - A_INT16 cs_rssi; - A_INT16 cs_aveBeacon_rssi; + s16 noise_floor_calibation; + s16 cs_rssi; + s16 cs_aveBeacon_rssi; u8 cs_aveBeacon_snr; u8 cs_lastRoam_msec; u8 cs_snr; @@ -1139,8 +1139,8 @@ typedef struct ar6000_dbglog_module_config_s { } DBGLOG_MODULE_CONFIG; typedef struct user_rssi_thold_t { - A_INT16 tag; - A_INT16 rssi; + s16 tag; + s16 rssi; } USER_RSSI_THOLD; typedef struct user_rssi_params_t { diff --git a/drivers/staging/ath6kl/wmi/wmi.c b/drivers/staging/ath6kl/wmi/wmi.c index f5f9aa1a5353..b80bdb7e7643 100644 --- a/drivers/staging/ath6kl/wmi/wmi.c +++ b/drivers/staging/ath6kl/wmi/wmi.c @@ -166,8 +166,8 @@ static int wmi_keepalive_reply_rx(struct wmi_t *wmip, u8 *datap, int len); int wmi_cmd_send_xtnd(struct wmi_t *wmip, void *osbuf, WMIX_COMMAND_ID cmdId, WMI_SYNC_FLAG syncflag); -u8 ar6000_get_upper_threshold(A_INT16 rssi, SQ_THRESHOLD_PARAMS *sq_thresh, u32 size); -u8 ar6000_get_lower_threshold(A_INT16 rssi, SQ_THRESHOLD_PARAMS *sq_thresh, u32 size); +u8 ar6000_get_upper_threshold(s16 rssi, SQ_THRESHOLD_PARAMS *sq_thresh, u32 size); +u8 ar6000_get_lower_threshold(s16 rssi, SQ_THRESHOLD_PARAMS *sq_thresh, u32 size); void wmi_cache_configure_rssithreshold(struct wmi_t *wmip, WMI_RSSI_THRESHOLD_PARAMS_CMD *rssiCmd); void wmi_cache_configure_snrthreshold(struct wmi_t *wmip, WMI_SNR_THRESHOLD_PARAMS_CMD *snrCmd); @@ -281,7 +281,7 @@ typedef PREPACK struct _iphdr { u8 ip_tos; /* type of service */ u16 ip_len; /* total length */ u16 ip_id; /* identification */ - A_INT16 ip_off; /* fragment offset field */ + s16 ip_off; /* fragment offset field */ #define IP_DF 0x4000 /* dont fragment flag */ #define IP_MF 0x2000 /* more fragments flag */ #define IP_OFFMASK 0x1fff /* mask for fragmenting bits */ @@ -294,8 +294,8 @@ typedef PREPACK struct _iphdr { #include "athendpack.h" -static A_INT16 rssi_event_value = 0; -static A_INT16 snr_event_value = 0; +static s16 rssi_event_value = 0; +static s16 snr_event_value = 0; bool is_probe_ssid = false; @@ -1874,7 +1874,7 @@ wmi_rssiThresholdEvent_rx(struct wmi_t *wmip, u8 *datap, int len) SQ_THRESHOLD_PARAMS *sq_thresh = &wmip->wmi_SqThresholdParams[SIGNAL_QUALITY_METRICS_RSSI]; u8 upper_rssi_threshold, lower_rssi_threshold; - A_INT16 rssi; + s16 rssi; if (len < sizeof(*reply)) { return A_EINVAL; @@ -2143,7 +2143,7 @@ wmi_snrThresholdEvent_rx(struct wmi_t *wmip, u8 *datap, int len) WMI_SNR_THRESHOLD_VAL newThreshold; WMI_SNR_THRESHOLD_PARAMS_CMD cmd; u8 upper_snr_threshold, lower_snr_threshold; - A_INT16 snr; + s16 snr; if (len < sizeof(*reply)) { return A_EINVAL; @@ -5882,7 +5882,7 @@ wmi_scan_indication (struct wmi_t *wmip) } #endif -u8 ar6000_get_upper_threshold(A_INT16 rssi, SQ_THRESHOLD_PARAMS *sq_thresh, +u8 ar6000_get_upper_threshold(s16 rssi, SQ_THRESHOLD_PARAMS *sq_thresh, u32 size) { u32 index; @@ -5899,7 +5899,7 @@ u8 ar6000_get_upper_threshold(A_INT16 rssi, SQ_THRESHOLD_PARAMS *sq_thresh, return threshold; } -u8 ar6000_get_lower_threshold(A_INT16 rssi, SQ_THRESHOLD_PARAMS *sq_thresh, +u8 ar6000_get_lower_threshold(s16 rssi, SQ_THRESHOLD_PARAMS *sq_thresh, u32 size) { u32 index; diff --git a/drivers/staging/ath6kl/wmi/wmi_host.h b/drivers/staging/ath6kl/wmi/wmi_host.h index ed8335fa7c52..53e4f085dfe6 100644 --- a/drivers/staging/ath6kl/wmi/wmi_host.h +++ b/drivers/staging/ath6kl/wmi/wmi_host.h @@ -42,8 +42,8 @@ struct wmi_stats { #define SIGNAL_QUALITY_UPPER_THRESHOLD_LEVELS SIGNAL_QUALITY_THRESHOLD_LEVELS #define SIGNAL_QUALITY_LOWER_THRESHOLD_LEVELS SIGNAL_QUALITY_THRESHOLD_LEVELS typedef struct sq_threshold_params_s { - A_INT16 upper_threshold[SIGNAL_QUALITY_UPPER_THRESHOLD_LEVELS]; - A_INT16 lower_threshold[SIGNAL_QUALITY_LOWER_THRESHOLD_LEVELS]; + s16 upper_threshold[SIGNAL_QUALITY_UPPER_THRESHOLD_LEVELS]; + s16 lower_threshold[SIGNAL_QUALITY_LOWER_THRESHOLD_LEVELS]; u32 upper_threshold_valid_count; u32 lower_threshold_valid_count; u32 polling_interval; -- 2.34.1