return 0;
}
-static A_INT32 IssueSDCommand(HIF_DEVICE *device, u32 opcode, u32 arg, u32 flags, u32 *resp)
+static s32 IssueSDCommand(HIF_DEVICE *device, u32 opcode, u32 arg, u32 flags, u32 *resp)
{
struct mmc_command cmd;
- A_INT32 err;
+ s32 err;
struct mmc_host *host;
struct sdio_func *func;
int ReinitSDIO(HIF_DEVICE *device)
{
- A_INT32 err;
+ s32 err;
struct mmc_host *host;
struct mmc_card *card;
struct sdio_func *func;
*/
int hifWaitForPendingRecv(HIF_DEVICE *device)
{
- A_INT32 cnt = 10;
+ s32 cnt = 10;
u8 host_int_status;
int status = A_OK;
{
struct mmc_command ioCmd;
unsigned long arg;
- A_INT32 err;
+ s32 err;
memset(&ioCmd,0,sizeof(ioCmd));
SDIO_SET_CMD52_READ_ARG(arg,0,address);
/* cleanup the HTC instance */
static void HTCCleanup(HTC_TARGET *target)
{
- A_INT32 i;
+ s32 i;
DevCleanup(&target->Device);
u32 mode;
u32 freq;
u32 dataRate;
- A_INT32 txPwr;
+ s32 txPwr;
u32 antenna;
u32 enANI;
u32 scramblerOff;
} POSTPACK para;
struct PREPACK TCMD_CONT_RX_REPORT {
u32 totalPkt;
- A_INT32 rssiInDBm;
+ s32 rssiInDBm;
u32 crcErrPkt;
u32 secErrPkt;
u16 rateCnt[TCMD_MAX_RATES];
* WMI_SCAN_COMPLETE_EVENTID - no parameters (old), staus parameter (new)
*/
typedef PREPACK struct {
- A_INT32 status;
+ s32 status;
} POSTPACK WMI_SCAN_COMPLETE_EVENT;
#define MAX_OPT_DATA_LEN 1400
u32 tx_retry_cnt;
u32 tx_mult_retry_cnt;
u32 tx_rts_fail_cnt;
- A_INT32 tx_unicast_rate;
+ s32 tx_unicast_rate;
}POSTPACK tx_stats_t;
typedef PREPACK struct {
u32 rx_key_cache_miss;
u32 rx_decrypt_err;
u32 rx_duplicate_frames;
- A_INT32 rx_unicast_rate;
+ s32 rx_unicast_rate;
}POSTPACK rx_stats_t;
typedef PREPACK struct {
typedef PREPACK struct {
u32 lqVal;
- A_INT32 noise_floor_calibation;
+ s32 noise_floor_calibation;
pm_stats_t pmStats;
wlan_net_stats_t txrxStats;
wlan_wow_stats_t wowStats;
} WMI_LQ_THRESHOLD_VAL;
typedef PREPACK struct {
- A_INT32 lq;
+ s32 lq;
u8 range; /* WMI_LQ_THRESHOLD_VAL */
}POSTPACK WMI_LQ_THRESHOLD_EVENT;
/*
#define MAX_ROAM_TBL_CAND 5
typedef PREPACK struct {
- A_INT32 roam_util;
+ s32 roam_util;
u8 bssid[ATH_MAC_LEN];
s8 rssi;
s8 rssidt;
} COMMON_CREDIT_STATE_INFO;
typedef struct {
- A_INT32 (*setupTransport)(void *ar);
+ s32 (*setupTransport)(void *ar);
void (*cleanupTransport)(void *ar);
} HCI_TRANSPORT_CALLBACKS;
int wmi_create_pstream_cmd(struct wmi_t *wmip, WMI_CREATE_PSTREAM_CMD *pstream);
int wmi_delete_pstream_cmd(struct wmi_t *wmip, u8 trafficClass, u8 streamID);
int wmi_set_framerate_cmd(struct wmi_t *wmip, u8 bEnable, u8 type, u8 subType, u16 rateMask);
-int wmi_set_bitrate_cmd(struct wmi_t *wmip, A_INT32 dataRate, A_INT32 mgmtRate, A_INT32 ctlRate);
+int wmi_set_bitrate_cmd(struct wmi_t *wmip, s32 dataRate, s32 mgmtRate, s32 ctlRate);
int wmi_get_bitrate_cmd(struct wmi_t *wmip);
-s8 wmi_validate_bitrate(struct wmi_t *wmip, A_INT32 rate, s8 *rate_idx);
+s8 wmi_validate_bitrate(struct wmi_t *wmip, s32 rate, s8 *rate_idx);
int wmi_get_regDomain_cmd(struct wmi_t *wmip);
int wmi_get_channelList_cmd(struct wmi_t *wmip);
int wmi_set_channelParams_cmd(struct wmi_t *wmip, u8 scanParam,
int wmi_set_halparam_cmd(struct wmi_t *wmip, u8 *cmd, u16 dataLen);
-A_INT32 wmi_get_rate(s8 rateindex);
+s32 wmi_get_rate(s8 rateindex);
int wmi_set_ip_cmd(struct wmi_t *wmip, WMI_SET_IP_CMD *cmd);
{
int status;
u8 addrValue[4];
- A_INT32 i;
+ s32 i;
/* write bytes 1,2,3 of the register to set the upper address bytes, the LSB is written
* last to initiate the access cycle */
*/
#if 0
static int
-_delay_until_target_alive(HIF_DEVICE *hifDevice, A_INT32 wait_msecs, u32 TargetType)
+_delay_until_target_alive(HIF_DEVICE *hifDevice, s32 wait_msecs, u32 TargetType)
{
- A_INT32 actual_wait;
- A_INT32 i;
+ s32 actual_wait;
+ s32 i;
u32 address;
actual_wait = 0;
{
u32 eepHeaderAddr;
u8 AR6003CustDataShadow[AR6003_CUST_DATA_SIZE+4];
- A_INT32 i;
+ s32 i;
if (BMIReadMemory(hifDevice,
HOST_INTEREST_ITEM_ADDRESS(TargetType, hi_board_data),
int
ar6002_REV1_reset_force_host (HIF_DEVICE *hifDevice)
{
- A_INT32 i;
+ s32 i;
struct forceROM_s {
u32 addr;
u32 data;
};
struct forceROM_s *ForceROM;
- A_INT32 szForceROM;
+ s32 szForceROM;
int status = A_OK;
u32 address;
u32 data;
u32 dbglog_get_debug_fragment(s8 *datap, u32 len, u32 limit)
{
- A_INT32 *buffer;
+ s32 *buffer;
u32 count;
u32 numargs;
u32 length;
u32 fraglen;
count = fraglen = 0;
- buffer = (A_INT32 *)datap;
+ buffer = (s32 *)datap;
length = (limit >> 2);
if (len <= limit) {
void
dbglog_parse_debug_logs(s8 *datap, u32 len)
{
- A_INT32 *buffer;
+ s32 *buffer;
u32 count;
u32 timestamp;
u32 debugid;
u32 length;
count = 0;
- buffer = (A_INT32 *)datap;
+ buffer = (s32 *)datap;
length = (len >> 2);
while (count < length) {
debugid = DBGLOG_GET_DBGID(buffer[count]);
{
AR_SOFTC_T *ar;
int status;
- A_INT32 timeleft;
+ s32 timeleft;
s16 i;
int ret = 0;
#if defined(INIT_MODE_DRV_ENABLED) && defined(ENABLE_COEXISTENCE)
void
-ar6000_bitrate_rx(void *devt, A_INT32 rateKbps)
+ar6000_bitrate_rx(void *devt, s32 rateKbps)
{
AR_SOFTC_T *ar = (AR_SOFTC_T *)devt;
return;
}
-A_INT32
-rssi_compensation_calc_tcmd(u32 freq, A_INT32 rssi, u32 totalPkt)
+s32 rssi_compensation_calc_tcmd(u32 freq, s32 rssi, u32 totalPkt)
{
if (freq > 5000)
s8 arRssi;
u8 arTxPwr;
bool arTxPwrSet;
- A_INT32 arBitRate;
+ s32 arBitRate;
struct net_device_stats arNetStats;
struct iw_statistics arIwStats;
s8 arNumChannels;
#ifdef CONFIG_HOST_TCMD_SUPPORT
u8 tcmdRxReport;
u32 tcmdRxTotalPkt;
- A_INT32 tcmdRxRssi;
+ s32 tcmdRxRssi;
u32 tcmdPm;
u32 arTargetMode;
u32 tcmdRxcrcErrPkt;
u32 dbglog_init_done;
u32 arConnectCtrlFlags;
#ifdef USER_KEYS
- A_INT32 user_savedkeys_stat;
+ s32 user_savedkeys_stat;
u32 user_key_ctrl;
struct USER_SAVEDKEYS user_saved_keys;
#endif
#endif
WMI_BTCOEX_CONFIG_EVENT arBtcoexConfig;
WMI_BTCOEX_STATS_EVENT arBtcoexStats;
- A_INT32 (*exitCallback)(void *config); /* generic callback at AR6K exit */
+ s32 (*exitCallback)(void *config); /* generic callback at AR6K exit */
HIF_DEVICE_OS_DEVICE_INFO osDevInfo;
#ifdef ATH6K_CONFIG_CFG80211
struct wireless_dev *wdev;
u8 *assocInfo, u16 protocolReasonStatus);
void ar6000_tkip_micerr_event(struct ar6_softc *ar, u8 keyid,
bool ismcast);
-void ar6000_bitrate_rx(void *devt, A_INT32 rateKbps);
+void ar6000_bitrate_rx(void *devt, s32 rateKbps);
void ar6000_channelList_rx(void *devt, s8 numChan, u16 *chanList);
void ar6000_regDomain_event(struct ar6_softc *ar, u32 regCode);
void ar6000_txPwr_rx(void *devt, u8 txPwr);
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);
+s32 rssi_compensation_calc_tcmd(u32 freq, s32 rssi, u32 totalPkt);
s16 rssi_compensation_calc(struct ar6_softc *ar, s16 rssi);
s16 rssi_compensation_reverse_calc(struct ar6_softc *ar, s16 rssi, bool Above);
u64 cs_connect_cnt;
u64 cs_disconnect_cnt;
- A_INT32 tx_unicast_rate;
- A_INT32 rx_unicast_rate;
+ s32 tx_unicast_rate;
+ s32 rx_unicast_rate;
u32 lq_val;
void a_netbuf_free(void *bufPtr);
void *a_netbuf_to_data(void *bufPtr);
u32 a_netbuf_to_len(void *bufPtr);
-int a_netbuf_push(void *bufPtr, A_INT32 len);
-int a_netbuf_push_data(void *bufPtr, char *srcPtr, A_INT32 len);
-int a_netbuf_put(void *bufPtr, A_INT32 len);
-int a_netbuf_put_data(void *bufPtr, char *srcPtr, A_INT32 len);
-int a_netbuf_pull(void *bufPtr, A_INT32 len);
-int a_netbuf_pull_data(void *bufPtr, char *dstPtr, A_INT32 len);
-int a_netbuf_trim(void *bufPtr, A_INT32 len);
-int a_netbuf_trim_data(void *bufPtr, char *dstPtr, A_INT32 len);
-int a_netbuf_setlen(void *bufPtr, A_INT32 len);
-A_INT32 a_netbuf_headroom(void *bufPtr);
+int a_netbuf_push(void *bufPtr, s32 len);
+int a_netbuf_push_data(void *bufPtr, char *srcPtr, s32 len);
+int a_netbuf_put(void *bufPtr, s32 len);
+int a_netbuf_put_data(void *bufPtr, char *srcPtr, s32 len);
+int a_netbuf_pull(void *bufPtr, s32 len);
+int a_netbuf_pull_data(void *bufPtr, char *dstPtr, s32 len);
+int a_netbuf_trim(void *bufPtr, s32 len);
+int a_netbuf_trim_data(void *bufPtr, char *dstPtr, s32 len);
+int a_netbuf_setlen(void *bufPtr, s32 len);
+s32 a_netbuf_headroom(void *bufPtr);
void a_netbuf_enqueue(A_NETBUF_QUEUE_T *q, void *pkt);
void a_netbuf_prequeue(A_NETBUF_QUEUE_T *q, void *pkt);
void *a_netbuf_dequeue(A_NETBUF_QUEUE_T *q);
AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev);
WMI_RSSI_THRESHOLD_PARAMS_CMD cmd;
USER_RSSI_PARAMS rssiParams;
- A_INT32 i, j;
+ s32 i, j;
int ret = 0;
if (ar->arWmiReady == false) {
* pointed to by bufPtr
*/
int
-a_netbuf_push(void *bufPtr, A_INT32 len)
+a_netbuf_push(void *bufPtr, s32 len)
{
skb_push((struct sk_buff *)bufPtr, len);
* pointed to by bufPtr and also fill with data
*/
int
-a_netbuf_push_data(void *bufPtr, char *srcPtr, A_INT32 len)
+a_netbuf_push_data(void *bufPtr, char *srcPtr, s32 len)
{
skb_push((struct sk_buff *) bufPtr, len);
A_MEMCPY(((struct sk_buff *)bufPtr)->data, srcPtr, len);
* pointed to by bufPtr
*/
int
-a_netbuf_put(void *bufPtr, A_INT32 len)
+a_netbuf_put(void *bufPtr, s32 len)
{
skb_put((struct sk_buff *)bufPtr, len);
* pointed to by bufPtr and also fill with data
*/
int
-a_netbuf_put_data(void *bufPtr, char *srcPtr, A_INT32 len)
+a_netbuf_put_data(void *bufPtr, char *srcPtr, s32 len)
{
char *start = (char*)(((struct sk_buff *)bufPtr)->data +
((struct sk_buff *)bufPtr)->len);
* Trim the network buffer pointed to by bufPtr to len # of bytes
*/
int
-a_netbuf_setlen(void *bufPtr, A_INT32 len)
+a_netbuf_setlen(void *bufPtr, s32 len)
{
skb_trim((struct sk_buff *)bufPtr, len);
* Chop of len # of bytes from the end of the buffer.
*/
int
-a_netbuf_trim(void *bufPtr, A_INT32 len)
+a_netbuf_trim(void *bufPtr, s32 len)
{
skb_trim((struct sk_buff *)bufPtr, ((struct sk_buff *)bufPtr)->len - len);
* Chop of len # of bytes from the end of the buffer and return the data.
*/
int
-a_netbuf_trim_data(void *bufPtr, char *dstPtr, A_INT32 len)
+a_netbuf_trim_data(void *bufPtr, char *dstPtr, s32 len)
{
char *start = (char*)(((struct sk_buff *)bufPtr)->data +
(((struct sk_buff *)bufPtr)->len - len));
/*
* Returns the number of bytes available to a a_netbuf_push()
*/
-A_INT32
-a_netbuf_headroom(void *bufPtr)
+s32 a_netbuf_headroom(void *bufPtr)
{
return (skb_headroom((struct sk_buff *)bufPtr));
}
* Removes specified number of bytes from the beginning of the buffer
*/
int
-a_netbuf_pull(void *bufPtr, A_INT32 len)
+a_netbuf_pull(void *bufPtr, s32 len)
{
skb_pull((struct sk_buff *)bufPtr, len);
* and return the data
*/
int
-a_netbuf_pull_data(void *bufPtr, char *dstPtr, A_INT32 len)
+a_netbuf_pull_data(void *bufPtr, char *dstPtr, s32 len)
{
A_MEMCPY(dstPtr, ((struct sk_buff *)bufPtr)->data, len);
skb_pull((struct sk_buff *)bufPtr, len);
char *end_buf;
struct ieee80211_common_ie *cie;
char *current_val;
- A_INT32 j;
+ s32 j;
u32 rate_len, data_len = 0;
param = (struct ar_giwscan_param *)arg;
{
AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev);
int index;
- A_INT32 auth = 0;
+ s32 auth = 0;
if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != A_OK) {
A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd);
bool profChanged;
u16 param;
- A_INT32 ret;
- A_INT32 value;
+ s32 ret;
+ s32 value;
if (ar->arWmiReady == false) {
return -EIO;
{
AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev);
u16 param;
- A_INT32 ret;
+ s32 ret;
if (ar->arWmiReady == false) {
return -EIO;
struct iw_point *data, char *extra)
{
AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev);
- A_INT32 ret;
+ s32 ret;
int status;
struct iw_pmksa *pmksa;
AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev);
struct iw_encode_ext *ext = (struct iw_encode_ext *)extra;
KEY_USAGE keyUsage = 0;
- A_INT32 keyLen;
+ s32 keyLen;
u8 *keyData;
- A_INT32 index;
+ s32 index;
u32 *PN;
- A_INT32 i;
+ s32 i;
int status;
u8 wapiKeyRsc[16];
CRYPTO_TYPE keyType = WAPI_CRYPT;
struct iw_point *erq, char *extra)
{
AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev);
- A_INT32 index;
+ s32 index;
struct iw_encode_ext *ext;
KEY_USAGE keyUsage;
- A_INT32 keyLen;
+ s32 keyLen;
u8 *keyData;
u8 keyRsc[8];
int status;
wmi_lqThresholdEvent_rx(struct wmi_t *wmip, u8 *datap, int len);
static bool
-wmi_is_bitrate_index_valid(struct wmi_t *wmip, A_INT32 rateIndex);
+wmi_is_bitrate_index_valid(struct wmi_t *wmip, s32 rateIndex);
static int
wmi_aplistEvent_rx(struct wmi_t *wmip, u8 *datap, int len);
#endif
int wps_enable;
-static const A_INT32 wmi_rateTable[][2] = {
+static const s32 wmi_rateTable[][2] = {
//{W/O SGI, with SGI}
{1000, 1000},
{2000, 2000},
{135000, 150000},
{0, 0}};
-#define MODE_A_SUPPORT_RATE_START ((A_INT32) 4)
-#define MODE_A_SUPPORT_RATE_STOP ((A_INT32) 11)
+#define MODE_A_SUPPORT_RATE_START ((s32) 4)
+#define MODE_A_SUPPORT_RATE_STOP ((s32) 11)
#define MODE_GONLY_SUPPORT_RATE_START MODE_A_SUPPORT_RATE_START
#define MODE_GONLY_SUPPORT_RATE_STOP MODE_A_SUPPORT_RATE_STOP
-#define MODE_B_SUPPORT_RATE_START ((A_INT32) 0)
-#define MODE_B_SUPPORT_RATE_STOP ((A_INT32) 3)
+#define MODE_B_SUPPORT_RATE_START ((s32) 0)
+#define MODE_B_SUPPORT_RATE_STOP ((s32) 3)
-#define MODE_G_SUPPORT_RATE_START ((A_INT32) 0)
-#define MODE_G_SUPPORT_RATE_STOP ((A_INT32) 11)
+#define MODE_G_SUPPORT_RATE_START ((s32) 0)
+#define MODE_G_SUPPORT_RATE_STOP ((s32) 11)
-#define MODE_GHT20_SUPPORT_RATE_START ((A_INT32) 0)
-#define MODE_GHT20_SUPPORT_RATE_STOP ((A_INT32) 19)
+#define MODE_GHT20_SUPPORT_RATE_START ((s32) 0)
+#define MODE_GHT20_SUPPORT_RATE_STOP ((s32) 19)
#define MAX_NUMBER_OF_SUPPORT_RATES (MODE_GHT20_SUPPORT_RATE_STOP + 1)
wmi_bitrate_reply_rx(struct wmi_t *wmip, u8 *datap, int len)
{
WMI_BIT_RATE_REPLY *reply;
- A_INT32 rate;
+ s32 rate;
u32 sgi,index;
/* 54149:
* WMI_BIT_RATE_CMD structure is changed to WMI_BIT_RATE_REPLY.
void *osbuf;
WMI_CREATE_PSTREAM_CMD *cmd;
u8 fatPipeExistsForAC=0;
- A_INT32 minimalPHY = 0;
- A_INT32 nominalPHY = 0;
+ s32 minimalPHY = 0;
+ s32 nominalPHY = 0;
/* Validate all the parameters. */
if( !((params->userPriority < 8) &&
* then auto selection is used.
*/
int
-wmi_set_bitrate_cmd(struct wmi_t *wmip, A_INT32 dataRate, A_INT32 mgmtRate, A_INT32 ctlRate)
+wmi_set_bitrate_cmd(struct wmi_t *wmip, s32 dataRate, s32 mgmtRate, s32 ctlRate)
{
void *osbuf;
WMI_BIT_RATE_CMD *cmd;
* Returns true iff the given rate index is legal in the current PHY mode.
*/
bool
-wmi_is_bitrate_index_valid(struct wmi_t *wmip, A_INT32 rateIndex)
+wmi_is_bitrate_index_valid(struct wmi_t *wmip, s32 rateIndex)
{
WMI_PHY_MODE phyMode = (WMI_PHY_MODE) wmip->wmi_phyMode;
bool isValid = true;
return isValid;
}
-s8 wmi_validate_bitrate(struct wmi_t *wmip, A_INT32 rate, s8 *rate_idx)
+s8 wmi_validate_bitrate(struct wmi_t *wmip, s32 rate, s8 *rate_idx)
{
s8 i;
}
}
- if(wmi_is_bitrate_index_valid(wmip, (A_INT32) i) != true) {
+ if(wmi_is_bitrate_index_valid(wmip, (s32) i) != true) {
return A_EINVAL;
}
void *osbuf;
WMI_FIX_RATES_CMD *cmd;
#if 0
- A_INT32 rateIndex;
+ s32 rateIndex;
/* This check does not work for AR6003 as the HT modes are enabled only when
* the STA is connected to a HT_BSS and is not based only on channel. It is
* safe to skip this check however because rate control will only use rates
return (wmi_cmd_send(wmip, osbuf, WMI_SET_WHALPARAM_CMDID, NO_SYNC_WMIFLAG));
}
-A_INT32
-wmi_get_rate(s8 rateindex)
+s32 wmi_get_rate(s8 rateindex)
{
if (rateindex == RATE_AUTO) {
return 0;