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;
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;
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;
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;
}WMI_RSSI_THRESHOLD_VAL;
typedef PREPACK struct {
- A_INT16 rssi;
+ s16 rssi;
u8 range;
}POSTPACK WMI_RSSI_THRESHOLD_EVENT;
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;
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;
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;
}
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;
//#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);
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)
{
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)
{
{
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:
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);
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);
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;
} 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 {
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);
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 */
#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;
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;
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;
}
#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;
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;
#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;