Commit 1f4c34bd authored by Joe Perches's avatar Joe Perches Committed by Greg Kroah-Hartman

staging: ath6kl: Convert enum A_STATUS to int

Convert enum members to int as well.
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Acked-by: default avatarVipin Mehta <vipin.mehta@atheros.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent a789325d
...@@ -41,12 +41,12 @@ ...@@ -41,12 +41,12 @@
/* ------ Global Variable Declarations ------- */ /* ------ Global Variable Declarations ------- */
static A_BOOL bmiDone; static A_BOOL bmiDone;
A_STATUS int
bmiBufferSend(HIF_DEVICE *device, bmiBufferSend(HIF_DEVICE *device,
A_UCHAR *buffer, A_UCHAR *buffer,
A_UINT32 length); A_UINT32 length);
A_STATUS int
bmiBufferReceive(HIF_DEVICE *device, bmiBufferReceive(HIF_DEVICE *device,
A_UCHAR *buffer, A_UCHAR *buffer,
A_UINT32 length, A_UINT32 length,
......
...@@ -105,10 +105,10 @@ BMICleanup(void) ...@@ -105,10 +105,10 @@ BMICleanup(void)
} }
} }
A_STATUS int
BMIDone(HIF_DEVICE *device) BMIDone(HIF_DEVICE *device)
{ {
A_STATUS status; int status;
A_UINT32 cid; A_UINT32 cid;
if (bmiDone) { if (bmiDone) {
...@@ -141,10 +141,10 @@ BMIDone(HIF_DEVICE *device) ...@@ -141,10 +141,10 @@ BMIDone(HIF_DEVICE *device)
return A_OK; return A_OK;
} }
A_STATUS int
BMIGetTargetInfo(HIF_DEVICE *device, struct bmi_target_info *targ_info) BMIGetTargetInfo(HIF_DEVICE *device, struct bmi_target_info *targ_info)
{ {
A_STATUS status; int status;
A_UINT32 cid; A_UINT32 cid;
if (bmiDone) { if (bmiDone) {
...@@ -200,14 +200,14 @@ BMIGetTargetInfo(HIF_DEVICE *device, struct bmi_target_info *targ_info) ...@@ -200,14 +200,14 @@ BMIGetTargetInfo(HIF_DEVICE *device, struct bmi_target_info *targ_info)
return A_OK; return A_OK;
} }
A_STATUS int
BMIReadMemory(HIF_DEVICE *device, BMIReadMemory(HIF_DEVICE *device,
A_UINT32 address, A_UINT32 address,
A_UCHAR *buffer, A_UCHAR *buffer,
A_UINT32 length) A_UINT32 length)
{ {
A_UINT32 cid; A_UINT32 cid;
A_STATUS status; int status;
A_UINT32 offset; A_UINT32 offset;
A_UINT32 remaining, rxlen; A_UINT32 remaining, rxlen;
...@@ -256,14 +256,14 @@ BMIReadMemory(HIF_DEVICE *device, ...@@ -256,14 +256,14 @@ BMIReadMemory(HIF_DEVICE *device,
return A_OK; return A_OK;
} }
A_STATUS int
BMIWriteMemory(HIF_DEVICE *device, BMIWriteMemory(HIF_DEVICE *device,
A_UINT32 address, A_UINT32 address,
A_UCHAR *buffer, A_UCHAR *buffer,
A_UINT32 length) A_UINT32 length)
{ {
A_UINT32 cid; A_UINT32 cid;
A_STATUS status; int status;
A_UINT32 offset; A_UINT32 offset;
A_UINT32 remaining, txlen; A_UINT32 remaining, txlen;
const A_UINT32 header = sizeof(cid) + sizeof(address) + sizeof(length); const A_UINT32 header = sizeof(cid) + sizeof(address) + sizeof(length);
...@@ -321,13 +321,13 @@ BMIWriteMemory(HIF_DEVICE *device, ...@@ -321,13 +321,13 @@ BMIWriteMemory(HIF_DEVICE *device,
return A_OK; return A_OK;
} }
A_STATUS int
BMIExecute(HIF_DEVICE *device, BMIExecute(HIF_DEVICE *device,
A_UINT32 address, A_UINT32 address,
A_UINT32 *param) A_UINT32 *param)
{ {
A_UINT32 cid; A_UINT32 cid;
A_STATUS status; int status;
A_UINT32 offset; A_UINT32 offset;
A_ASSERT(BMI_COMMAND_FITS(sizeof(cid) + sizeof(address) + sizeof(param))); A_ASSERT(BMI_COMMAND_FITS(sizeof(cid) + sizeof(address) + sizeof(param)));
...@@ -369,12 +369,12 @@ BMIExecute(HIF_DEVICE *device, ...@@ -369,12 +369,12 @@ BMIExecute(HIF_DEVICE *device,
return A_OK; return A_OK;
} }
A_STATUS int
BMISetAppStart(HIF_DEVICE *device, BMISetAppStart(HIF_DEVICE *device,
A_UINT32 address) A_UINT32 address)
{ {
A_UINT32 cid; A_UINT32 cid;
A_STATUS status; int status;
A_UINT32 offset; A_UINT32 offset;
A_ASSERT(BMI_COMMAND_FITS(sizeof(cid) + sizeof(address))); A_ASSERT(BMI_COMMAND_FITS(sizeof(cid) + sizeof(address)));
...@@ -406,13 +406,13 @@ BMISetAppStart(HIF_DEVICE *device, ...@@ -406,13 +406,13 @@ BMISetAppStart(HIF_DEVICE *device,
return A_OK; return A_OK;
} }
A_STATUS int
BMIReadSOCRegister(HIF_DEVICE *device, BMIReadSOCRegister(HIF_DEVICE *device,
A_UINT32 address, A_UINT32 address,
A_UINT32 *param) A_UINT32 *param)
{ {
A_UINT32 cid; A_UINT32 cid;
A_STATUS status; int status;
A_UINT32 offset; A_UINT32 offset;
A_ASSERT(BMI_COMMAND_FITS(sizeof(cid) + sizeof(address))); A_ASSERT(BMI_COMMAND_FITS(sizeof(cid) + sizeof(address)));
...@@ -452,13 +452,13 @@ BMIReadSOCRegister(HIF_DEVICE *device, ...@@ -452,13 +452,13 @@ BMIReadSOCRegister(HIF_DEVICE *device,
return A_OK; return A_OK;
} }
A_STATUS int
BMIWriteSOCRegister(HIF_DEVICE *device, BMIWriteSOCRegister(HIF_DEVICE *device,
A_UINT32 address, A_UINT32 address,
A_UINT32 param) A_UINT32 param)
{ {
A_UINT32 cid; A_UINT32 cid;
A_STATUS status; int status;
A_UINT32 offset; A_UINT32 offset;
A_ASSERT(BMI_COMMAND_FITS(sizeof(cid) + sizeof(address) + sizeof(param))); A_ASSERT(BMI_COMMAND_FITS(sizeof(cid) + sizeof(address) + sizeof(param)));
...@@ -492,7 +492,7 @@ BMIWriteSOCRegister(HIF_DEVICE *device, ...@@ -492,7 +492,7 @@ BMIWriteSOCRegister(HIF_DEVICE *device,
return A_OK; return A_OK;
} }
A_STATUS int
BMIrompatchInstall(HIF_DEVICE *device, BMIrompatchInstall(HIF_DEVICE *device,
A_UINT32 ROM_addr, A_UINT32 ROM_addr,
A_UINT32 RAM_addr, A_UINT32 RAM_addr,
...@@ -501,7 +501,7 @@ BMIrompatchInstall(HIF_DEVICE *device, ...@@ -501,7 +501,7 @@ BMIrompatchInstall(HIF_DEVICE *device,
A_UINT32 *rompatch_id) A_UINT32 *rompatch_id)
{ {
A_UINT32 cid; A_UINT32 cid;
A_STATUS status; int status;
A_UINT32 offset; A_UINT32 offset;
A_ASSERT(BMI_COMMAND_FITS(sizeof(cid) + sizeof(ROM_addr) + sizeof(RAM_addr) + A_ASSERT(BMI_COMMAND_FITS(sizeof(cid) + sizeof(ROM_addr) + sizeof(RAM_addr) +
...@@ -548,12 +548,12 @@ BMIrompatchInstall(HIF_DEVICE *device, ...@@ -548,12 +548,12 @@ BMIrompatchInstall(HIF_DEVICE *device,
return A_OK; return A_OK;
} }
A_STATUS int
BMIrompatchUninstall(HIF_DEVICE *device, BMIrompatchUninstall(HIF_DEVICE *device,
A_UINT32 rompatch_id) A_UINT32 rompatch_id)
{ {
A_UINT32 cid; A_UINT32 cid;
A_STATUS status; int status;
A_UINT32 offset; A_UINT32 offset;
A_ASSERT(BMI_COMMAND_FITS(sizeof(cid) + sizeof(rompatch_id))); A_ASSERT(BMI_COMMAND_FITS(sizeof(cid) + sizeof(rompatch_id)));
...@@ -585,14 +585,14 @@ BMIrompatchUninstall(HIF_DEVICE *device, ...@@ -585,14 +585,14 @@ BMIrompatchUninstall(HIF_DEVICE *device,
return A_OK; return A_OK;
} }
static A_STATUS static int
_BMIrompatchChangeActivation(HIF_DEVICE *device, _BMIrompatchChangeActivation(HIF_DEVICE *device,
A_UINT32 rompatch_count, A_UINT32 rompatch_count,
A_UINT32 *rompatch_list, A_UINT32 *rompatch_list,
A_UINT32 do_activate) A_UINT32 do_activate)
{ {
A_UINT32 cid; A_UINT32 cid;
A_STATUS status; int status;
A_UINT32 offset; A_UINT32 offset;
A_UINT32 length; A_UINT32 length;
...@@ -629,7 +629,7 @@ _BMIrompatchChangeActivation(HIF_DEVICE *device, ...@@ -629,7 +629,7 @@ _BMIrompatchChangeActivation(HIF_DEVICE *device,
return A_OK; return A_OK;
} }
A_STATUS int
BMIrompatchActivate(HIF_DEVICE *device, BMIrompatchActivate(HIF_DEVICE *device,
A_UINT32 rompatch_count, A_UINT32 rompatch_count,
A_UINT32 *rompatch_list) A_UINT32 *rompatch_list)
...@@ -637,7 +637,7 @@ BMIrompatchActivate(HIF_DEVICE *device, ...@@ -637,7 +637,7 @@ BMIrompatchActivate(HIF_DEVICE *device,
return _BMIrompatchChangeActivation(device, rompatch_count, rompatch_list, 1); return _BMIrompatchChangeActivation(device, rompatch_count, rompatch_list, 1);
} }
A_STATUS int
BMIrompatchDeactivate(HIF_DEVICE *device, BMIrompatchDeactivate(HIF_DEVICE *device,
A_UINT32 rompatch_count, A_UINT32 rompatch_count,
A_UINT32 *rompatch_list) A_UINT32 *rompatch_list)
...@@ -645,13 +645,13 @@ BMIrompatchDeactivate(HIF_DEVICE *device, ...@@ -645,13 +645,13 @@ BMIrompatchDeactivate(HIF_DEVICE *device,
return _BMIrompatchChangeActivation(device, rompatch_count, rompatch_list, 0); return _BMIrompatchChangeActivation(device, rompatch_count, rompatch_list, 0);
} }
A_STATUS int
BMILZData(HIF_DEVICE *device, BMILZData(HIF_DEVICE *device,
A_UCHAR *buffer, A_UCHAR *buffer,
A_UINT32 length) A_UINT32 length)
{ {
A_UINT32 cid; A_UINT32 cid;
A_STATUS status; int status;
A_UINT32 offset; A_UINT32 offset;
A_UINT32 remaining, txlen; A_UINT32 remaining, txlen;
const A_UINT32 header = sizeof(cid) + sizeof(length); const A_UINT32 header = sizeof(cid) + sizeof(length);
...@@ -695,12 +695,12 @@ BMILZData(HIF_DEVICE *device, ...@@ -695,12 +695,12 @@ BMILZData(HIF_DEVICE *device,
return A_OK; return A_OK;
} }
A_STATUS int
BMILZStreamStart(HIF_DEVICE *device, BMILZStreamStart(HIF_DEVICE *device,
A_UINT32 address) A_UINT32 address)
{ {
A_UINT32 cid; A_UINT32 cid;
A_STATUS status; int status;
A_UINT32 offset; A_UINT32 offset;
A_ASSERT(BMI_COMMAND_FITS(sizeof(cid) + sizeof(address))); A_ASSERT(BMI_COMMAND_FITS(sizeof(cid) + sizeof(address)));
...@@ -733,12 +733,12 @@ BMILZStreamStart(HIF_DEVICE *device, ...@@ -733,12 +733,12 @@ BMILZStreamStart(HIF_DEVICE *device,
} }
/* BMI Access routines */ /* BMI Access routines */
A_STATUS int
bmiBufferSend(HIF_DEVICE *device, bmiBufferSend(HIF_DEVICE *device,
A_UCHAR *buffer, A_UCHAR *buffer,
A_UINT32 length) A_UINT32 length)
{ {
A_STATUS status; int status;
A_UINT32 timeout; A_UINT32 timeout;
A_UINT32 address; A_UINT32 address;
A_UINT32 mboxAddress[HTC_MAILBOX_NUM_MAX]; A_UINT32 mboxAddress[HTC_MAILBOX_NUM_MAX];
...@@ -781,13 +781,13 @@ bmiBufferSend(HIF_DEVICE *device, ...@@ -781,13 +781,13 @@ bmiBufferSend(HIF_DEVICE *device,
return status; return status;
} }
A_STATUS int
bmiBufferReceive(HIF_DEVICE *device, bmiBufferReceive(HIF_DEVICE *device,
A_UCHAR *buffer, A_UCHAR *buffer,
A_UINT32 length, A_UINT32 length,
A_BOOL want_timeout) A_BOOL want_timeout)
{ {
A_STATUS status; int status;
A_UINT32 address; A_UINT32 address;
A_UINT32 mboxAddress[HTC_MAILBOX_NUM_MAX]; A_UINT32 mboxAddress[HTC_MAILBOX_NUM_MAX];
HIF_PENDING_EVENTS_INFO hifPendingEvents; HIF_PENDING_EVENTS_INFO hifPendingEvents;
...@@ -957,10 +957,10 @@ bmiBufferReceive(HIF_DEVICE *device, ...@@ -957,10 +957,10 @@ bmiBufferReceive(HIF_DEVICE *device,
return A_OK; return A_OK;
} }
A_STATUS int
BMIFastDownload(HIF_DEVICE *device, A_UINT32 address, A_UCHAR *buffer, A_UINT32 length) BMIFastDownload(HIF_DEVICE *device, A_UINT32 address, A_UCHAR *buffer, A_UINT32 length)
{ {
A_STATUS status = A_ERROR; int status = A_ERROR;
A_UINT32 lastWord = 0; A_UINT32 lastWord = 0;
A_UINT32 lastWordOffset = length & ~0x3; A_UINT32 lastWordOffset = length & ~0x3;
A_UINT32 unalignedBytes = length & 0x3; A_UINT32 unalignedBytes = length & 0x3;
...@@ -997,13 +997,13 @@ BMIFastDownload(HIF_DEVICE *device, A_UINT32 address, A_UCHAR *buffer, A_UINT32 ...@@ -997,13 +997,13 @@ BMIFastDownload(HIF_DEVICE *device, A_UINT32 address, A_UCHAR *buffer, A_UINT32
return status; return status;
} }
A_STATUS int
BMIRawWrite(HIF_DEVICE *device, A_UCHAR *buffer, A_UINT32 length) BMIRawWrite(HIF_DEVICE *device, A_UCHAR *buffer, A_UINT32 length)
{ {
return bmiBufferSend(device, buffer, length); return bmiBufferSend(device, buffer, length);
} }
A_STATUS int
BMIRawRead(HIF_DEVICE *device, A_UCHAR *buffer, A_UINT32 length, A_BOOL want_timeout) BMIRawRead(HIF_DEVICE *device, A_UCHAR *buffer, A_UINT32 length, A_BOOL want_timeout)
{ {
return bmiBufferReceive(device, buffer, length, want_timeout); return bmiBufferReceive(device, buffer, length, want_timeout);
......
...@@ -58,7 +58,7 @@ typedef struct bus_request { ...@@ -58,7 +58,7 @@ typedef struct bus_request {
A_UINT32 length; A_UINT32 length;
A_UINT32 request; A_UINT32 request;
void *context; void *context;
A_STATUS status; int status;
struct _HIF_SCATTER_REQ_PRIV *pScatterReq; /* this request is a scatter request */ struct _HIF_SCATTER_REQ_PRIV *pScatterReq; /* this request is a scatter request */
} BUS_REQUEST; } BUS_REQUEST;
...@@ -110,18 +110,18 @@ typedef struct _HIF_SCATTER_REQ_PRIV { ...@@ -110,18 +110,18 @@ typedef struct _HIF_SCATTER_REQ_PRIV {
#define ATH_DEBUG_SCATTER ATH_DEBUG_MAKE_MODULE_MASK(0) #define ATH_DEBUG_SCATTER ATH_DEBUG_MAKE_MODULE_MASK(0)
A_STATUS SetupHIFScatterSupport(HIF_DEVICE *device, HIF_DEVICE_SCATTER_SUPPORT_INFO *pInfo); int SetupHIFScatterSupport(HIF_DEVICE *device, HIF_DEVICE_SCATTER_SUPPORT_INFO *pInfo);
void CleanupHIFScatterResources(HIF_DEVICE *device); void CleanupHIFScatterResources(HIF_DEVICE *device);
A_STATUS DoHifReadWriteScatter(HIF_DEVICE *device, BUS_REQUEST *busrequest); int DoHifReadWriteScatter(HIF_DEVICE *device, BUS_REQUEST *busrequest);
#else // HIF_LINUX_MMC_SCATTER_SUPPORT #else // HIF_LINUX_MMC_SCATTER_SUPPORT
static inline A_STATUS SetupHIFScatterSupport(HIF_DEVICE *device, HIF_DEVICE_SCATTER_SUPPORT_INFO *pInfo) static inline int SetupHIFScatterSupport(HIF_DEVICE *device, HIF_DEVICE_SCATTER_SUPPORT_INFO *pInfo)
{ {
return A_ENOTSUP; return A_ENOTSUP;
} }
static inline A_STATUS DoHifReadWriteScatter(HIF_DEVICE *device, BUS_REQUEST *busrequest) static inline int DoHifReadWriteScatter(HIF_DEVICE *device, BUS_REQUEST *busrequest)
{ {
return A_ENOTSUP; return A_ENOTSUP;
} }
......
...@@ -107,8 +107,8 @@ extern A_UINT32 busspeedlow; ...@@ -107,8 +107,8 @@ extern A_UINT32 busspeedlow;
extern A_UINT32 debughif; extern A_UINT32 debughif;
static void ResetAllCards(void); static void ResetAllCards(void);
static A_STATUS hifDisableFunc(HIF_DEVICE *device, struct sdio_func *func); static int hifDisableFunc(HIF_DEVICE *device, struct sdio_func *func);
static A_STATUS hifEnableFunc(HIF_DEVICE *device, struct sdio_func *func); static int hifEnableFunc(HIF_DEVICE *device, struct sdio_func *func);
#ifdef DEBUG #ifdef DEBUG
...@@ -123,7 +123,7 @@ ATH_DEBUG_INSTANTIATE_MODULE_VAR(hif, ...@@ -123,7 +123,7 @@ ATH_DEBUG_INSTANTIATE_MODULE_VAR(hif,
/* ------ Functions ------ */ /* ------ Functions ------ */
A_STATUS HIFInit(OSDRV_CALLBACKS *callbacks) int HIFInit(OSDRV_CALLBACKS *callbacks)
{ {
int status; int status;
AR_DEBUG_ASSERT(callbacks != NULL); AR_DEBUG_ASSERT(callbacks != NULL);
...@@ -152,7 +152,7 @@ A_STATUS HIFInit(OSDRV_CALLBACKS *callbacks) ...@@ -152,7 +152,7 @@ A_STATUS HIFInit(OSDRV_CALLBACKS *callbacks)
} }
static A_STATUS static int
__HIFReadWrite(HIF_DEVICE *device, __HIFReadWrite(HIF_DEVICE *device,
A_UINT32 address, A_UINT32 address,
A_UCHAR *buffer, A_UCHAR *buffer,
...@@ -161,7 +161,7 @@ __HIFReadWrite(HIF_DEVICE *device, ...@@ -161,7 +161,7 @@ __HIFReadWrite(HIF_DEVICE *device,
void *context) void *context)
{ {
A_UINT8 opcode; A_UINT8 opcode;
A_STATUS status = A_OK; int status = A_OK;
int ret; int ret;
A_UINT8 *tbuffer; A_UINT8 *tbuffer;
A_BOOL bounced = FALSE; A_BOOL bounced = FALSE;
...@@ -329,7 +329,7 @@ void AddToAsyncList(HIF_DEVICE *device, BUS_REQUEST *busrequest) ...@@ -329,7 +329,7 @@ void AddToAsyncList(HIF_DEVICE *device, BUS_REQUEST *busrequest)
/* queue a read/write request */ /* queue a read/write request */
A_STATUS int
HIFReadWrite(HIF_DEVICE *device, HIFReadWrite(HIF_DEVICE *device,
A_UINT32 address, A_UINT32 address,
A_UCHAR *buffer, A_UCHAR *buffer,
...@@ -337,7 +337,7 @@ HIFReadWrite(HIF_DEVICE *device, ...@@ -337,7 +337,7 @@ HIFReadWrite(HIF_DEVICE *device,
A_UINT32 request, A_UINT32 request,
void *context) void *context)
{ {
A_STATUS status = A_OK; int status = A_OK;
BUS_REQUEST *busrequest; BUS_REQUEST *busrequest;
...@@ -375,7 +375,7 @@ HIFReadWrite(HIF_DEVICE *device, ...@@ -375,7 +375,7 @@ HIFReadWrite(HIF_DEVICE *device,
/* interrupted, exit */ /* interrupted, exit */
return A_ERROR; return A_ERROR;
} else { } else {
A_STATUS status = busrequest->status; int status = busrequest->status;
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: sync return freeing 0x%lX: 0x%X\n", AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: sync return freeing 0x%lX: 0x%X\n",
(unsigned long)busrequest, busrequest->status)); (unsigned long)busrequest, busrequest->status));
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: freeing req: 0x%X\n", (unsigned int)request)); AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: freeing req: 0x%X\n", (unsigned int)request));
...@@ -402,7 +402,7 @@ static int async_task(void *param) ...@@ -402,7 +402,7 @@ static int async_task(void *param)
{ {
HIF_DEVICE *device; HIF_DEVICE *device;
BUS_REQUEST *request; BUS_REQUEST *request;
A_STATUS status; int status;
unsigned long flags; unsigned long flags;
device = (HIF_DEVICE *)param; device = (HIF_DEVICE *)param;
...@@ -488,7 +488,7 @@ static A_INT32 IssueSDCommand(HIF_DEVICE *device, A_UINT32 opcode, A_UINT32 arg, ...@@ -488,7 +488,7 @@ static A_INT32 IssueSDCommand(HIF_DEVICE *device, A_UINT32 opcode, A_UINT32 arg,
return err; return err;
} }
A_STATUS ReinitSDIO(HIF_DEVICE *device) int ReinitSDIO(HIF_DEVICE *device)
{ {
A_INT32 err; A_INT32 err;
struct mmc_host *host; struct mmc_host *host;
...@@ -647,10 +647,10 @@ A_STATUS ReinitSDIO(HIF_DEVICE *device) ...@@ -647,10 +647,10 @@ A_STATUS ReinitSDIO(HIF_DEVICE *device)
return (err) ? A_ERROR : A_OK; return (err) ? A_ERROR : A_OK;
} }
A_STATUS int
PowerStateChangeNotify(HIF_DEVICE *device, HIF_DEVICE_POWER_CHANGE_TYPE config) PowerStateChangeNotify(HIF_DEVICE *device, HIF_DEVICE_POWER_CHANGE_TYPE config)
{ {
A_STATUS status = A_OK; int status = A_OK;
#if defined(CONFIG_PM) #if defined(CONFIG_PM)
struct sdio_func *func = device->func; struct sdio_func *func = device->func;
int old_reset_val; int old_reset_val;
...@@ -690,12 +690,12 @@ PowerStateChangeNotify(HIF_DEVICE *device, HIF_DEVICE_POWER_CHANGE_TYPE config) ...@@ -690,12 +690,12 @@ PowerStateChangeNotify(HIF_DEVICE *device, HIF_DEVICE_POWER_CHANGE_TYPE config)
return status; return status;
} }
A_STATUS int
HIFConfigureDevice(HIF_DEVICE *device, HIF_DEVICE_CONFIG_OPCODE opcode, HIFConfigureDevice(HIF_DEVICE *device, HIF_DEVICE_CONFIG_OPCODE opcode,
void *config, A_UINT32 configLen) void *config, A_UINT32 configLen)
{ {
A_UINT32 count; A_UINT32 count;
A_STATUS status = A_OK; int status = A_OK;
switch(opcode) { switch(opcode) {
case HIF_DEVICE_GET_MBOX_BLOCK_SIZE: case HIF_DEVICE_GET_MBOX_BLOCK_SIZE:
...@@ -774,7 +774,7 @@ HIFShutDownDevice(HIF_DEVICE *device) ...@@ -774,7 +774,7 @@ HIFShutDownDevice(HIF_DEVICE *device)
static void static void
hifIRQHandler(struct sdio_func *func) hifIRQHandler(struct sdio_func *func)
{ {
A_STATUS status; int status;
HIF_DEVICE *device; HIF_DEVICE *device;
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: +hifIRQHandler\n")); AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: +hifIRQHandler\n"));
...@@ -949,10 +949,10 @@ hifFreeBusRequest(HIF_DEVICE *device, BUS_REQUEST *busrequest) ...@@ -949,10 +949,10 @@ hifFreeBusRequest(HIF_DEVICE *device, BUS_REQUEST *busrequest)
spin_unlock_irqrestore(&device->lock, flag); spin_unlock_irqrestore(&device->lock, flag);
} }
static A_STATUS hifDisableFunc(HIF_DEVICE *device, struct sdio_func *func) static int hifDisableFunc(HIF_DEVICE *device, struct sdio_func *func)
{ {
int ret; int ret;
A_STATUS status = A_OK; int status = A_OK;
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: +hifDisableFunc\n")); AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: +hifDisableFunc\n"));
device = getHifDevice(func); device = getHifDevice(func);
...@@ -1080,7 +1080,7 @@ static int hifEnableFunc(HIF_DEVICE *device, struct sdio_func *func) ...@@ -1080,7 +1080,7 @@ static int hifEnableFunc(HIF_DEVICE *device, struct sdio_func *func)
static int hifDeviceSuspend(struct device *dev) static int hifDeviceSuspend(struct device *dev)
{ {
struct sdio_func *func=dev_to_sdio_func(dev); struct sdio_func *func=dev_to_sdio_func(dev);
A_STATUS status = A_OK; int status = A_OK;
HIF_DEVICE *device; HIF_DEVICE *device;
device = getHifDevice(func); device = getHifDevice(func);
...@@ -1107,7 +1107,7 @@ static int hifDeviceSuspend(struct device *dev) ...@@ -1107,7 +1107,7 @@ static int hifDeviceSuspend(struct device *dev)
static int hifDeviceResume(struct device *dev) static int hifDeviceResume(struct device *dev)
{ {
struct sdio_func *func=dev_to_sdio_func(dev); struct sdio_func *func=dev_to_sdio_func(dev);
A_STATUS status = A_OK; int status = A_OK;
HIF_DEVICE *device; HIF_DEVICE *device;
device = getHifDevice(func); device = getHifDevice(func);
...@@ -1126,7 +1126,7 @@ static int hifDeviceResume(struct device *dev) ...@@ -1126,7 +1126,7 @@ static int hifDeviceResume(struct device *dev)
static void hifDeviceRemoved(struct sdio_func *func) static void hifDeviceRemoved(struct sdio_func *func)
{ {
A_STATUS status = A_OK; int status = A_OK;
HIF_DEVICE *device; HIF_DEVICE *device;
AR_DEBUG_ASSERT(func != NULL); AR_DEBUG_ASSERT(func != NULL);
...@@ -1151,11 +1151,11 @@ static void hifDeviceRemoved(struct sdio_func *func) ...@@ -1151,11 +1151,11 @@ static void hifDeviceRemoved(struct sdio_func *func)
/* /*
* This should be moved to AR6K HTC layer. * This should be moved to AR6K HTC layer.
*/ */
A_STATUS hifWaitForPendingRecv(HIF_DEVICE *device) int hifWaitForPendingRecv(HIF_DEVICE *device)
{ {
A_INT32 cnt = 10; A_INT32 cnt = 10;
A_UINT8 host_int_status; A_UINT8 host_int_status;
A_STATUS status = A_OK; int status = A_OK;
do { do {
while (atomic_read(&device->irqHandling)) { while (atomic_read(&device->irqHandling)) {
...@@ -1233,7 +1233,7 @@ void HIFReleaseDevice(HIF_DEVICE *device) ...@@ -1233,7 +1233,7 @@ void HIFReleaseDevice(HIF_DEVICE *device)
device->claimedContext = NULL; device->claimedContext = NULL;
} }
A_STATUS HIFAttachHTC(HIF_DEVICE *device, HTC_CALLBACKS *callbacks) int HIFAttachHTC(HIF_DEVICE *device, HTC_CALLBACKS *callbacks)
{ {
if (device->htcCallbacks.context != NULL) { if (device->htcCallbacks.context != NULL) {
/* already in use! */ /* already in use! */
......
...@@ -79,7 +79,7 @@ static HIF_SCATTER_REQ *AllocScatterReq(HIF_DEVICE *device) ...@@ -79,7 +79,7 @@ static HIF_SCATTER_REQ *AllocScatterReq(HIF_DEVICE *device)
} }
/* called by async task to perform the operation synchronously using direct MMC APIs */ /* called by async task to perform the operation synchronously using direct MMC APIs */
A_STATUS DoHifReadWriteScatter(HIF_DEVICE *device, BUS_REQUEST *busrequest) int DoHifReadWriteScatter(HIF_DEVICE *device, BUS_REQUEST *busrequest)
{ {
int i; int i;
A_UINT8 rw; A_UINT8 rw;
...@@ -89,7 +89,7 @@ A_STATUS DoHifReadWriteScatter(HIF_DEVICE *device, BUS_REQUEST *busrequest) ...@@ -89,7 +89,7 @@ A_STATUS DoHifReadWriteScatter(HIF_DEVICE *device, BUS_REQUEST *busrequest)
struct mmc_data data; struct mmc_data data;
HIF_SCATTER_REQ_PRIV *pReqPriv; HIF_SCATTER_REQ_PRIV *pReqPriv;
HIF_SCATTER_REQ *pReq; HIF_SCATTER_REQ *pReq;
A_STATUS status = A_OK; int status = A_OK;
struct scatterlist *pSg; struct scatterlist *pSg;
pReqPriv = busrequest->pScatterReq; pReqPriv = busrequest->pScatterReq;
...@@ -199,9 +199,9 @@ A_STATUS DoHifReadWriteScatter(HIF_DEVICE *device, BUS_REQUEST *busrequest) ...@@ -199,9 +199,9 @@ A_STATUS DoHifReadWriteScatter(HIF_DEVICE *device, BUS_REQUEST *busrequest)
} }
/* callback to issue a read-write scatter request */ /* callback to issue a read-write scatter request */
static A_STATUS HifReadWriteScatter(HIF_DEVICE *device, HIF_SCATTER_REQ *pReq) static int HifReadWriteScatter(HIF_DEVICE *device, HIF_SCATTER_REQ *pReq)
{ {
A_STATUS status = A_EINVAL; int status = A_EINVAL;
A_UINT32 request = pReq->Request; A_UINT32 request = pReq->Request;
HIF_SCATTER_REQ_PRIV *pReqPriv = (HIF_SCATTER_REQ_PRIV *)pReq->HIFPrivate[0]; HIF_SCATTER_REQ_PRIV *pReqPriv = (HIF_SCATTER_REQ_PRIV *)pReq->HIFPrivate[0];
...@@ -275,9 +275,9 @@ static A_STATUS HifReadWriteScatter(HIF_DEVICE *device, HIF_SCATTER_REQ *pReq) ...@@ -275,9 +275,9 @@ static A_STATUS HifReadWriteScatter(HIF_DEVICE *device, HIF_SCATTER_REQ *pReq)
} }
/* setup of HIF scatter resources */ /* setup of HIF scatter resources */
A_STATUS SetupHIFScatterSupport(HIF_DEVICE *device, HIF_DEVICE_SCATTER_SUPPORT_INFO *pInfo) int SetupHIFScatterSupport(HIF_DEVICE *device, HIF_DEVICE_SCATTER_SUPPORT_INFO *pInfo)
{ {
A_STATUS status = A_ERROR; int status = A_ERROR;
int i; int i;
HIF_SCATTER_REQ_PRIV *pReqPriv; HIF_SCATTER_REQ_PRIV *pReqPriv;
BUS_REQUEST *busrequest; BUS_REQUEST *busrequest;
......
...@@ -35,8 +35,8 @@ ...@@ -35,8 +35,8 @@
#define MAILBOX_FOR_BLOCK_SIZE 1 #define MAILBOX_FOR_BLOCK_SIZE 1
A_STATUS DevEnableInterrupts(AR6K_DEVICE *pDev); int DevEnableInterrupts(AR6K_DEVICE *pDev);
A_STATUS DevDisableInterrupts(AR6K_DEVICE *pDev); int DevDisableInterrupts(AR6K_DEVICE *pDev);
static void DevCleanupVirtualScatterSupport(AR6K_DEVICE *pDev); static void DevCleanupVirtualScatterSupport(AR6K_DEVICE *pDev);
...@@ -74,10 +74,10 @@ void DevCleanup(AR6K_DEVICE *pDev) ...@@ -74,10 +74,10 @@ void DevCleanup(AR6K_DEVICE *pDev)
} }
} }
A_STATUS DevSetup(AR6K_DEVICE *pDev) int DevSetup(AR6K_DEVICE *pDev)
{ {
A_UINT32 blocksizes[AR6K_MAILBOXES]; A_UINT32 blocksizes[AR6K_MAILBOXES];
A_STATUS status = A_OK; int status = A_OK;
int i; int i;
HTC_CALLBACKS htcCallbacks; HTC_CALLBACKS htcCallbacks;
...@@ -216,9 +216,9 @@ A_STATUS DevSetup(AR6K_DEVICE *pDev) ...@@ -216,9 +216,9 @@ A_STATUS DevSetup(AR6K_DEVICE *pDev)
} }
A_STATUS DevEnableInterrupts(AR6K_DEVICE *pDev) int DevEnableInterrupts(AR6K_DEVICE *pDev)
{ {
A_STATUS status; int status;
AR6K_IRQ_ENABLE_REGISTERS regs; AR6K_IRQ_ENABLE_REGISTERS regs;
LOCK_AR6K(pDev); LOCK_AR6K(pDev);
...@@ -276,7 +276,7 @@ A_STATUS DevEnableInterrupts(AR6K_DEVICE *pDev) ...@@ -276,7 +276,7 @@ A_STATUS DevEnableInterrupts(AR6K_DEVICE *pDev)
return status; return status;
} }
A_STATUS DevDisableInterrupts(AR6K_DEVICE *pDev) int DevDisableInterrupts(AR6K_DEVICE *pDev)
{ {
AR6K_IRQ_ENABLE_REGISTERS regs; AR6K_IRQ_ENABLE_REGISTERS regs;
...@@ -301,7 +301,7 @@ A_STATUS DevDisableInterrupts(AR6K_DEVICE *pDev) ...@@ -301,7 +301,7 @@ A_STATUS DevDisableInterrupts(AR6K_DEVICE *pDev)
} }
/* enable device interrupts */ /* enable device interrupts */
A_STATUS DevUnmaskInterrupts(AR6K_DEVICE *pDev) int DevUnmaskInterrupts(AR6K_DEVICE *pDev)
{ {
/* for good measure, make sure interrupt are disabled before unmasking at the HIF /* for good measure, make sure interrupt are disabled before unmasking at the HIF
* layer. * layer.
...@@ -309,7 +309,7 @@ A_STATUS DevUnmaskInterrupts(AR6K_DEVICE *pDev) ...@@ -309,7 +309,7 @@ A_STATUS DevUnmaskInterrupts(AR6K_DEVICE *pDev)
* and when HTC is finally ready to handle interrupts, other software can perform target "soft" resets. * and when HTC is finally ready to handle interrupts, other software can perform target "soft" resets.
* The AR6K interrupt enables reset back to an "enabled" state when this happens. * The AR6K interrupt enables reset back to an "enabled" state when this happens.
* */ * */
A_STATUS IntStatus = A_OK; int IntStatus = A_OK;
DevDisableInterrupts(pDev); DevDisableInterrupts(pDev);
#ifdef THREAD_X #ifdef THREAD_X
...@@ -327,7 +327,7 @@ A_STATUS DevUnmaskInterrupts(AR6K_DEVICE *pDev) ...@@ -327,7 +327,7 @@ A_STATUS DevUnmaskInterrupts(AR6K_DEVICE *pDev)
} }
/* disable all device interrupts */ /* disable all device interrupts */
A_STATUS DevMaskInterrupts(AR6K_DEVICE *pDev) int DevMaskInterrupts(AR6K_DEVICE *pDev)
{ {
/* mask the interrupt at the HIF layer, we don't want a stray interrupt taken while /* mask the interrupt at the HIF layer, we don't want a stray interrupt taken while
* we zero out our shadow registers in DevDisableInterrupts()*/ * we zero out our shadow registers in DevDisableInterrupts()*/
...@@ -355,9 +355,9 @@ static void DevDoEnableDisableRecvAsyncHandler(void *Context, HTC_PACKET *pPacke ...@@ -355,9 +355,9 @@ static void DevDoEnableDisableRecvAsyncHandler(void *Context, HTC_PACKET *pPacke
/* disable packet reception (used in case the host runs out of buffers) /* disable packet reception (used in case the host runs out of buffers)
* this is the "override" method when the HIF reports another methods to * this is the "override" method when the HIF reports another methods to
* disable recv events */ * disable recv events */
static A_STATUS DevDoEnableDisableRecvOverride(AR6K_DEVICE *pDev, A_BOOL EnableRecv, A_BOOL AsyncMode) static int DevDoEnableDisableRecvOverride(AR6K_DEVICE *pDev, A_BOOL EnableRecv, A_BOOL AsyncMode)
{ {
A_STATUS status = A_OK; int status = A_OK;
HTC_PACKET *pIOPacket = NULL; HTC_PACKET *pIOPacket = NULL;
AR_DEBUG_PRINTF(ATH_DEBUG_TRC,("DevDoEnableDisableRecvOverride: Enable:%d Mode:%d\n", AR_DEBUG_PRINTF(ATH_DEBUG_TRC,("DevDoEnableDisableRecvOverride: Enable:%d Mode:%d\n",
...@@ -403,9 +403,9 @@ static A_STATUS DevDoEnableDisableRecvOverride(AR6K_DEVICE *pDev, A_BOOL EnableR ...@@ -403,9 +403,9 @@ static A_STATUS DevDoEnableDisableRecvOverride(AR6K_DEVICE *pDev, A_BOOL EnableR
/* disable packet reception (used in case the host runs out of buffers) /* disable packet reception (used in case the host runs out of buffers)
* this is the "normal" method using the interrupt enable registers through * this is the "normal" method using the interrupt enable registers through
* the host I/F */ * the host I/F */
static A_STATUS DevDoEnableDisableRecvNormal(AR6K_DEVICE *pDev, A_BOOL EnableRecv, A_BOOL AsyncMode) static int DevDoEnableDisableRecvNormal(AR6K_DEVICE *pDev, A_BOOL EnableRecv, A_BOOL AsyncMode)
{ {
A_STATUS status = A_OK; int status = A_OK;
HTC_PACKET *pIOPacket = NULL; HTC_PACKET *pIOPacket = NULL;
AR6K_IRQ_ENABLE_REGISTERS regs; AR6K_IRQ_ENABLE_REGISTERS regs;
...@@ -470,7 +470,7 @@ static A_STATUS DevDoEnableDisableRecvNormal(AR6K_DEVICE *pDev, A_BOOL EnableRec ...@@ -470,7 +470,7 @@ static A_STATUS DevDoEnableDisableRecvNormal(AR6K_DEVICE *pDev, A_BOOL EnableRec
} }
A_STATUS DevStopRecv(AR6K_DEVICE *pDev, A_BOOL AsyncMode) int DevStopRecv(AR6K_DEVICE *pDev, A_BOOL AsyncMode)
{ {
if (NULL == pDev->HifMaskUmaskRecvEvent) { if (NULL == pDev->HifMaskUmaskRecvEvent) {
return DevDoEnableDisableRecvNormal(pDev,FALSE,AsyncMode); return DevDoEnableDisableRecvNormal(pDev,FALSE,AsyncMode);
...@@ -479,7 +479,7 @@ A_STATUS DevStopRecv(AR6K_DEVICE *pDev, A_BOOL AsyncMode) ...@@ -479,7 +479,7 @@ A_STATUS DevStopRecv(AR6K_DEVICE *pDev, A_BOOL AsyncMode)
} }
} }
A_STATUS DevEnableRecv(AR6K_DEVICE *pDev, A_BOOL AsyncMode) int DevEnableRecv(AR6K_DEVICE *pDev, A_BOOL AsyncMode)
{ {
if (NULL == pDev->HifMaskUmaskRecvEvent) { if (NULL == pDev->HifMaskUmaskRecvEvent) {
return DevDoEnableDisableRecvNormal(pDev,TRUE,AsyncMode); return DevDoEnableDisableRecvNormal(pDev,TRUE,AsyncMode);
...@@ -488,9 +488,9 @@ A_STATUS DevEnableRecv(AR6K_DEVICE *pDev, A_BOOL AsyncMode) ...@@ -488,9 +488,9 @@ A_STATUS DevEnableRecv(AR6K_DEVICE *pDev, A_BOOL AsyncMode)
} }
} }
A_STATUS DevWaitForPendingRecv(AR6K_DEVICE *pDev,A_UINT32 TimeoutInMs,A_BOOL *pbIsRecvPending) int DevWaitForPendingRecv(AR6K_DEVICE *pDev,A_UINT32 TimeoutInMs,A_BOOL *pbIsRecvPending)
{ {
A_STATUS status = A_OK; int status = A_OK;
A_UCHAR host_int_status = 0x0; A_UCHAR host_int_status = 0x0;
A_UINT32 counter = 0x0; A_UINT32 counter = 0x0;
...@@ -608,7 +608,7 @@ static void DevFreeScatterReq(HIF_DEVICE *Context, HIF_SCATTER_REQ *pReq) ...@@ -608,7 +608,7 @@ static void DevFreeScatterReq(HIF_DEVICE *Context, HIF_SCATTER_REQ *pReq)
UNLOCK_AR6K(pDev); UNLOCK_AR6K(pDev);
} }
A_STATUS DevCopyScatterListToFromDMABuffer(HIF_SCATTER_REQ *pReq, A_BOOL FromDMA) int DevCopyScatterListToFromDMABuffer(HIF_SCATTER_REQ *pReq, A_BOOL FromDMA)
{ {
A_UINT8 *pDMABuffer = NULL; A_UINT8 *pDMABuffer = NULL;
int i, remaining; int i, remaining;
...@@ -664,10 +664,10 @@ static void DevReadWriteScatterAsyncHandler(void *Context, HTC_PACKET *pPacket) ...@@ -664,10 +664,10 @@ static void DevReadWriteScatterAsyncHandler(void *Context, HTC_PACKET *pPacket)
AR_DEBUG_PRINTF(ATH_DEBUG_RECV,("-DevReadWriteScatterAsyncHandler \n")); AR_DEBUG_PRINTF(ATH_DEBUG_RECV,("-DevReadWriteScatterAsyncHandler \n"));
} }
static A_STATUS DevReadWriteScatter(HIF_DEVICE *Context, HIF_SCATTER_REQ *pReq) static int DevReadWriteScatter(HIF_DEVICE *Context, HIF_SCATTER_REQ *pReq)
{ {
AR6K_DEVICE *pDev = (AR6K_DEVICE *)Context; AR6K_DEVICE *pDev = (AR6K_DEVICE *)Context;
A_STATUS status = A_OK; int status = A_OK;
HTC_PACKET *pIOPacket = NULL; HTC_PACKET *pIOPacket = NULL;
A_UINT32 request = pReq->Request; A_UINT32 request = pReq->Request;
...@@ -749,9 +749,9 @@ static void DevCleanupVirtualScatterSupport(AR6K_DEVICE *pDev) ...@@ -749,9 +749,9 @@ static void DevCleanupVirtualScatterSupport(AR6K_DEVICE *pDev)
} }
/* function to set up virtual scatter support if HIF layer has not implemented the interface */ /* function to set up virtual scatter support if HIF layer has not implemented the interface */
static A_STATUS DevSetupVirtualScatterSupport(AR6K_DEVICE *pDev) static int DevSetupVirtualScatterSupport(AR6K_DEVICE *pDev)
{ {
A_STATUS status = A_OK; int status = A_OK;
int bufferSize, sgreqSize; int bufferSize, sgreqSize;
int i; int i;
DEV_SCATTER_DMA_VIRTUAL_INFO *pVirtualInfo; DEV_SCATTER_DMA_VIRTUAL_INFO *pVirtualInfo;
...@@ -811,9 +811,9 @@ static A_STATUS DevSetupVirtualScatterSupport(AR6K_DEVICE *pDev) ...@@ -811,9 +811,9 @@ static A_STATUS DevSetupVirtualScatterSupport(AR6K_DEVICE *pDev)
} }
A_STATUS DevSetupMsgBundling(AR6K_DEVICE *pDev, int MaxMsgsPerTransfer) int DevSetupMsgBundling(AR6K_DEVICE *pDev, int MaxMsgsPerTransfer)
{ {
A_STATUS status; int status;
if (pDev->MailBoxInfo.Flags & HIF_MBOX_FLAG_NO_BUNDLING) { if (pDev->MailBoxInfo.Flags & HIF_MBOX_FLAG_NO_BUNDLING) {
AR_DEBUG_PRINTF(ATH_DEBUG_WARN, ("HIF requires bundling disabled\n")); AR_DEBUG_PRINTF(ATH_DEBUG_WARN, ("HIF requires bundling disabled\n"));
...@@ -876,9 +876,9 @@ A_STATUS DevSetupMsgBundling(AR6K_DEVICE *pDev, int MaxMsgsPerTransfer) ...@@ -876,9 +876,9 @@ A_STATUS DevSetupMsgBundling(AR6K_DEVICE *pDev, int MaxMsgsPerTransfer)
return status; return status;
} }
A_STATUS DevSubmitScatterRequest(AR6K_DEVICE *pDev, HIF_SCATTER_REQ *pScatterReq, A_BOOL Read, A_BOOL Async) int DevSubmitScatterRequest(AR6K_DEVICE *pDev, HIF_SCATTER_REQ *pScatterReq, A_BOOL Read, A_BOOL Async)
{ {
A_STATUS status; int status;
if (Read) { if (Read) {
/* read operation */ /* read operation */
...@@ -1125,9 +1125,9 @@ static A_UINT16 GetEndMarker(void) ...@@ -1125,9 +1125,9 @@ static A_UINT16 GetEndMarker(void)
#define ATH_PRINT_OUT_ZONE ATH_DEBUG_ERR #define ATH_PRINT_OUT_ZONE ATH_DEBUG_ERR
/* send the ordered buffers to the target */ /* send the ordered buffers to the target */
static A_STATUS SendBuffers(AR6K_DEVICE *pDev, int mbox) static int SendBuffers(AR6K_DEVICE *pDev, int mbox)
{ {
A_STATUS status = A_OK; int status = A_OK;
A_UINT32 request = HIF_WR_SYNC_BLOCK_INC; A_UINT32 request = HIF_WR_SYNC_BLOCK_INC;
BUFFER_PROC_LIST sendList[BUFFER_PROC_LIST_DEPTH]; BUFFER_PROC_LIST sendList[BUFFER_PROC_LIST_DEPTH];
int i; int i;
...@@ -1169,9 +1169,9 @@ static A_STATUS SendBuffers(AR6K_DEVICE *pDev, int mbox) ...@@ -1169,9 +1169,9 @@ static A_STATUS SendBuffers(AR6K_DEVICE *pDev, int mbox)
} }
/* poll the mailbox credit counter until we get a credit or timeout */ /* poll the mailbox credit counter until we get a credit or timeout */
static A_STATUS GetCredits(AR6K_DEVICE *pDev, int mbox, int *pCredits) static int GetCredits(AR6K_DEVICE *pDev, int mbox, int *pCredits)
{ {
A_STATUS status = A_OK; int status = A_OK;
int timeout = TEST_CREDITS_RECV_TIMEOUT; int timeout = TEST_CREDITS_RECV_TIMEOUT;
A_UINT8 credits = 0; A_UINT8 credits = 0;
A_UINT32 address; A_UINT32 address;
...@@ -1216,9 +1216,9 @@ static A_STATUS GetCredits(AR6K_DEVICE *pDev, int mbox, int *pCredits) ...@@ -1216,9 +1216,9 @@ static A_STATUS GetCredits(AR6K_DEVICE *pDev, int mbox, int *pCredits)
/* wait for the buffers to come back */ /* wait for the buffers to come back */
static A_STATUS RecvBuffers(AR6K_DEVICE *pDev, int mbox) static int RecvBuffers(AR6K_DEVICE *pDev, int mbox)
{ {
A_STATUS status = A_OK; int status = A_OK;
A_UINT32 request = HIF_RD_SYNC_BLOCK_INC; A_UINT32 request = HIF_RD_SYNC_BLOCK_INC;
BUFFER_PROC_LIST recvList[BUFFER_PROC_LIST_DEPTH]; BUFFER_PROC_LIST recvList[BUFFER_PROC_LIST_DEPTH];
int curBuffer; int curBuffer;
...@@ -1294,9 +1294,9 @@ static A_STATUS RecvBuffers(AR6K_DEVICE *pDev, int mbox) ...@@ -1294,9 +1294,9 @@ static A_STATUS RecvBuffers(AR6K_DEVICE *pDev, int mbox)
} }
static A_STATUS DoOneMboxHWTest(AR6K_DEVICE *pDev, int mbox) static int DoOneMboxHWTest(AR6K_DEVICE *pDev, int mbox)
{ {
A_STATUS status; int status;
do { do {
/* send out buffers */ /* send out buffers */
...@@ -1330,10 +1330,10 @@ static A_STATUS DoOneMboxHWTest(AR6K_DEVICE *pDev, int mbox) ...@@ -1330,10 +1330,10 @@ static A_STATUS DoOneMboxHWTest(AR6K_DEVICE *pDev, int mbox)
} }
/* here is where the test starts */ /* here is where the test starts */
A_STATUS DoMboxHWTest(AR6K_DEVICE *pDev) int DoMboxHWTest(AR6K_DEVICE *pDev)
{ {
int i; int i;
A_STATUS status; int status;
int credits = 0; int credits = 0;
A_UINT8 params[4]; A_UINT8 params[4];
int numBufs; int numBufs;
......
...@@ -98,9 +98,9 @@ typedef struct AR6K_ASYNC_REG_IO_BUFFER { ...@@ -98,9 +98,9 @@ typedef struct AR6K_ASYNC_REG_IO_BUFFER {
typedef struct _AR6K_GMBOX_INFO { typedef struct _AR6K_GMBOX_INFO {
void *pProtocolContext; void *pProtocolContext;
A_STATUS (*pMessagePendingCallBack)(void *pContext, A_UINT8 LookAheadBytes[], int ValidBytes); int (*pMessagePendingCallBack)(void *pContext, A_UINT8 LookAheadBytes[], int ValidBytes);
A_STATUS (*pCreditsPendingCallback)(void *pContext, int NumCredits, A_BOOL CreditIRQEnabled); int (*pCreditsPendingCallback)(void *pContext, int NumCredits, A_BOOL CreditIRQEnabled);
void (*pTargetFailureCallback)(void *pContext, A_STATUS Status); void (*pTargetFailureCallback)(void *pContext, int Status);
void (*pStateDumpCallback)(void *pContext); void (*pStateDumpCallback)(void *pContext);
A_BOOL CreditCountIRQEnabled; A_BOOL CreditCountIRQEnabled;
} AR6K_GMBOX_INFO; } AR6K_GMBOX_INFO;
...@@ -121,7 +121,7 @@ typedef struct _AR6K_DEVICE { ...@@ -121,7 +121,7 @@ typedef struct _AR6K_DEVICE {
HTC_PACKET_QUEUE RegisterIOList; HTC_PACKET_QUEUE RegisterIOList;
AR6K_ASYNC_REG_IO_BUFFER RegIOBuffers[AR6K_MAX_REG_IO_BUFFERS]; AR6K_ASYNC_REG_IO_BUFFER RegIOBuffers[AR6K_MAX_REG_IO_BUFFERS];
void (*TargetFailureCallback)(void *Context); void (*TargetFailureCallback)(void *Context);
A_STATUS (*MessagePendingCallback)(void *Context, int (*MessagePendingCallback)(void *Context,
A_UINT32 LookAheads[], A_UINT32 LookAheads[],
int NumLookAheads, int NumLookAheads,
A_BOOL *pAsyncProc, A_BOOL *pAsyncProc,
...@@ -147,16 +147,16 @@ typedef struct _AR6K_DEVICE { ...@@ -147,16 +147,16 @@ typedef struct _AR6K_DEVICE {
#define UNLOCK_AR6K(p) A_MUTEX_UNLOCK(&(p)->Lock); #define UNLOCK_AR6K(p) A_MUTEX_UNLOCK(&(p)->Lock);
#define REF_IRQ_STATUS_RECHECK(p) (p)->RecheckIRQStatusCnt = 1 /* note: no need to lock this, it only gets set */ #define REF_IRQ_STATUS_RECHECK(p) (p)->RecheckIRQStatusCnt = 1 /* note: no need to lock this, it only gets set */
A_STATUS DevSetup(AR6K_DEVICE *pDev); int DevSetup(AR6K_DEVICE *pDev);
void DevCleanup(AR6K_DEVICE *pDev); void DevCleanup(AR6K_DEVICE *pDev);
A_STATUS DevUnmaskInterrupts(AR6K_DEVICE *pDev); int DevUnmaskInterrupts(AR6K_DEVICE *pDev);
A_STATUS DevMaskInterrupts(AR6K_DEVICE *pDev); int DevMaskInterrupts(AR6K_DEVICE *pDev);
A_STATUS DevPollMboxMsgRecv(AR6K_DEVICE *pDev, int DevPollMboxMsgRecv(AR6K_DEVICE *pDev,
A_UINT32 *pLookAhead, A_UINT32 *pLookAhead,
int TimeoutMS); int TimeoutMS);
A_STATUS DevRWCompletionHandler(void *context, A_STATUS status); int DevRWCompletionHandler(void *context, int status);
A_STATUS DevDsrHandler(void *context); int DevDsrHandler(void *context);
A_STATUS DevCheckPendingRecvMsgsAsync(void *context); int DevCheckPendingRecvMsgsAsync(void *context);
void DevAsyncIrqProcessComplete(AR6K_DEVICE *pDev); void DevAsyncIrqProcessComplete(AR6K_DEVICE *pDev);
void DevDumpRegisters(AR6K_DEVICE *pDev, void DevDumpRegisters(AR6K_DEVICE *pDev,
AR6K_IRQ_PROC_REGISTERS *pIrqProcRegs, AR6K_IRQ_PROC_REGISTERS *pIrqProcRegs,
...@@ -166,20 +166,20 @@ void DevDumpRegisters(AR6K_DEVICE *pDev, ...@@ -166,20 +166,20 @@ void DevDumpRegisters(AR6K_DEVICE *pDev,
#define DEV_STOP_RECV_SYNC FALSE #define DEV_STOP_RECV_SYNC FALSE
#define DEV_ENABLE_RECV_ASYNC TRUE #define DEV_ENABLE_RECV_ASYNC TRUE
#define DEV_ENABLE_RECV_SYNC FALSE #define DEV_ENABLE_RECV_SYNC FALSE
A_STATUS DevStopRecv(AR6K_DEVICE *pDev, A_BOOL ASyncMode); int DevStopRecv(AR6K_DEVICE *pDev, A_BOOL ASyncMode);
A_STATUS DevEnableRecv(AR6K_DEVICE *pDev, A_BOOL ASyncMode); int DevEnableRecv(AR6K_DEVICE *pDev, A_BOOL ASyncMode);
A_STATUS DevEnableInterrupts(AR6K_DEVICE *pDev); int DevEnableInterrupts(AR6K_DEVICE *pDev);
A_STATUS DevDisableInterrupts(AR6K_DEVICE *pDev); int DevDisableInterrupts(AR6K_DEVICE *pDev);
A_STATUS DevWaitForPendingRecv(AR6K_DEVICE *pDev,A_UINT32 TimeoutInMs,A_BOOL *pbIsRecvPending); int DevWaitForPendingRecv(AR6K_DEVICE *pDev,A_UINT32 TimeoutInMs,A_BOOL *pbIsRecvPending);
#define DEV_CALC_RECV_PADDED_LEN(pDev, length) (((length) + (pDev)->BlockMask) & (~((pDev)->BlockMask))) #define DEV_CALC_RECV_PADDED_LEN(pDev, length) (((length) + (pDev)->BlockMask) & (~((pDev)->BlockMask)))
#define DEV_CALC_SEND_PADDED_LEN(pDev, length) DEV_CALC_RECV_PADDED_LEN(pDev,length) #define DEV_CALC_SEND_PADDED_LEN(pDev, length) DEV_CALC_RECV_PADDED_LEN(pDev,length)
#define DEV_IS_LEN_BLOCK_ALIGNED(pDev, length) (((length) % (pDev)->BlockSize) == 0) #define DEV_IS_LEN_BLOCK_ALIGNED(pDev, length) (((length) % (pDev)->BlockSize) == 0)
static INLINE A_STATUS DevSendPacket(AR6K_DEVICE *pDev, HTC_PACKET *pPacket, A_UINT32 SendLength) { static INLINE int DevSendPacket(AR6K_DEVICE *pDev, HTC_PACKET *pPacket, A_UINT32 SendLength) {
A_UINT32 paddedLength; A_UINT32 paddedLength;
A_BOOL sync = (pPacket->Completion == NULL) ? TRUE : FALSE; A_BOOL sync = (pPacket->Completion == NULL) ? TRUE : FALSE;
A_STATUS status; int status;
/* adjust the length to be a multiple of block size if appropriate */ /* adjust the length to be a multiple of block size if appropriate */
paddedLength = DEV_CALC_SEND_PADDED_LEN(pDev, SendLength); paddedLength = DEV_CALC_SEND_PADDED_LEN(pDev, SendLength);
...@@ -219,9 +219,9 @@ static INLINE A_STATUS DevSendPacket(AR6K_DEVICE *pDev, HTC_PACKET *pPacket, A_U ...@@ -219,9 +219,9 @@ static INLINE A_STATUS DevSendPacket(AR6K_DEVICE *pDev, HTC_PACKET *pPacket, A_U
return status; return status;
} }
static INLINE A_STATUS DevRecvPacket(AR6K_DEVICE *pDev, HTC_PACKET *pPacket, A_UINT32 RecvLength) { static INLINE int DevRecvPacket(AR6K_DEVICE *pDev, HTC_PACKET *pPacket, A_UINT32 RecvLength) {
A_UINT32 paddedLength; A_UINT32 paddedLength;
A_STATUS status; int status;
A_BOOL sync = (pPacket->Completion == NULL) ? TRUE : FALSE; A_BOOL sync = (pPacket->Completion == NULL) ? TRUE : FALSE;
/* adjust the length to be a multiple of block size if appropriate */ /* adjust the length to be a multiple of block size if appropriate */
...@@ -272,7 +272,7 @@ static INLINE A_STATUS DevRecvPacket(AR6K_DEVICE *pDev, HTC_PACKET *pPacket, A_U ...@@ -272,7 +272,7 @@ static INLINE A_STATUS DevRecvPacket(AR6K_DEVICE *pDev, HTC_PACKET *pPacket, A_U
* *
*/ */
A_STATUS DevCopyScatterListToFromDMABuffer(HIF_SCATTER_REQ *pReq, A_BOOL FromDMA); int DevCopyScatterListToFromDMABuffer(HIF_SCATTER_REQ *pReq, A_BOOL FromDMA);
/* copy any READ data back into scatter list */ /* copy any READ data back into scatter list */
#define DEV_FINISH_SCATTER_OPERATION(pR) \ #define DEV_FINISH_SCATTER_OPERATION(pR) \
...@@ -283,7 +283,7 @@ A_STATUS DevCopyScatterListToFromDMABuffer(HIF_SCATTER_REQ *pReq, A_BOOL FromDMA ...@@ -283,7 +283,7 @@ A_STATUS DevCopyScatterListToFromDMABuffer(HIF_SCATTER_REQ *pReq, A_BOOL FromDMA
} }
/* copy any WRITE data to bounce buffer */ /* copy any WRITE data to bounce buffer */
static INLINE A_STATUS DEV_PREPARE_SCATTER_OPERATION(HIF_SCATTER_REQ *pReq) { static INLINE int DEV_PREPARE_SCATTER_OPERATION(HIF_SCATTER_REQ *pReq) {
if ((pReq->Request & HIF_WRITE) && (pReq->ScatterMethod == HIF_SCATTER_DMA_BOUNCE)) { if ((pReq->Request & HIF_WRITE) && (pReq->ScatterMethod == HIF_SCATTER_DMA_BOUNCE)) {
return DevCopyScatterListToFromDMABuffer(pReq,TO_DMA_BUFFER); return DevCopyScatterListToFromDMABuffer(pReq,TO_DMA_BUFFER);
} else { } else {
...@@ -292,7 +292,7 @@ static INLINE A_STATUS DEV_PREPARE_SCATTER_OPERATION(HIF_SCATTER_REQ *pReq) { ...@@ -292,7 +292,7 @@ static INLINE A_STATUS DEV_PREPARE_SCATTER_OPERATION(HIF_SCATTER_REQ *pReq) {
} }
A_STATUS DevSetupMsgBundling(AR6K_DEVICE *pDev, int MaxMsgsPerTransfer); int DevSetupMsgBundling(AR6K_DEVICE *pDev, int MaxMsgsPerTransfer);
#define DEV_GET_MAX_MSG_PER_BUNDLE(pDev) (pDev)->HifScatterInfo.MaxScatterEntries #define DEV_GET_MAX_MSG_PER_BUNDLE(pDev) (pDev)->HifScatterInfo.MaxScatterEntries
#define DEV_GET_MAX_BUNDLE_LENGTH(pDev) (pDev)->HifScatterInfo.MaxTransferSizePerScatterReq #define DEV_GET_MAX_BUNDLE_LENGTH(pDev) (pDev)->HifScatterInfo.MaxTransferSizePerScatterReq
...@@ -309,10 +309,10 @@ A_STATUS DevSetupMsgBundling(AR6K_DEVICE *pDev, int MaxMsgsPerTransfer); ...@@ -309,10 +309,10 @@ A_STATUS DevSetupMsgBundling(AR6K_DEVICE *pDev, int MaxMsgsPerTransfer);
#define DEV_SCATTER_WRITE FALSE #define DEV_SCATTER_WRITE FALSE
#define DEV_SCATTER_ASYNC TRUE #define DEV_SCATTER_ASYNC TRUE
#define DEV_SCATTER_SYNC FALSE #define DEV_SCATTER_SYNC FALSE
A_STATUS DevSubmitScatterRequest(AR6K_DEVICE *pDev, HIF_SCATTER_REQ *pScatterReq, A_BOOL Read, A_BOOL Async); int DevSubmitScatterRequest(AR6K_DEVICE *pDev, HIF_SCATTER_REQ *pScatterReq, A_BOOL Read, A_BOOL Async);
#ifdef MBOXHW_UNIT_TEST #ifdef MBOXHW_UNIT_TEST
A_STATUS DoMboxHWTest(AR6K_DEVICE *pDev); int DoMboxHWTest(AR6K_DEVICE *pDev);
#endif #endif
/* completely virtual */ /* completely virtual */
...@@ -334,8 +334,8 @@ void DumpAR6KDevState(AR6K_DEVICE *pDev); ...@@ -334,8 +334,8 @@ void DumpAR6KDevState(AR6K_DEVICE *pDev);
#ifdef ATH_AR6K_ENABLE_GMBOX #ifdef ATH_AR6K_ENABLE_GMBOX
void DevCleanupGMbox(AR6K_DEVICE *pDev); void DevCleanupGMbox(AR6K_DEVICE *pDev);
A_STATUS DevSetupGMbox(AR6K_DEVICE *pDev); int DevSetupGMbox(AR6K_DEVICE *pDev);
A_STATUS DevCheckGMboxInterrupts(AR6K_DEVICE *pDev); int DevCheckGMboxInterrupts(AR6K_DEVICE *pDev);
void DevNotifyGMboxTargetFailure(AR6K_DEVICE *pDev); void DevNotifyGMboxTargetFailure(AR6K_DEVICE *pDev);
#else #else
...@@ -345,7 +345,7 @@ void DevNotifyGMboxTargetFailure(AR6K_DEVICE *pDev); ...@@ -345,7 +345,7 @@ void DevNotifyGMboxTargetFailure(AR6K_DEVICE *pDev);
#define DevCheckGMboxInterrupts(p) A_OK #define DevCheckGMboxInterrupts(p) A_OK
#define DevNotifyGMboxTargetFailure(p) #define DevNotifyGMboxTargetFailure(p)
static INLINE A_STATUS DevSetupGMbox(AR6K_DEVICE *pDev) { static INLINE int DevSetupGMbox(AR6K_DEVICE *pDev) {
pDev->GMboxEnabled = FALSE; pDev->GMboxEnabled = FALSE;
return A_OK; return A_OK;
} }
...@@ -356,7 +356,7 @@ static INLINE A_STATUS DevSetupGMbox(AR6K_DEVICE *pDev) { ...@@ -356,7 +356,7 @@ static INLINE A_STATUS DevSetupGMbox(AR6K_DEVICE *pDev) {
/* GMBOX protocol modules must expose each of these internal APIs */ /* GMBOX protocol modules must expose each of these internal APIs */
HCI_TRANSPORT_HANDLE GMboxAttachProtocol(AR6K_DEVICE *pDev, HCI_TRANSPORT_CONFIG_INFO *pInfo); HCI_TRANSPORT_HANDLE GMboxAttachProtocol(AR6K_DEVICE *pDev, HCI_TRANSPORT_CONFIG_INFO *pInfo);
A_STATUS GMboxProtocolInstall(AR6K_DEVICE *pDev); int GMboxProtocolInstall(AR6K_DEVICE *pDev);
void GMboxProtocolUninstall(AR6K_DEVICE *pDev); void GMboxProtocolUninstall(AR6K_DEVICE *pDev);
/* API used by GMBOX protocol modules */ /* API used by GMBOX protocol modules */
...@@ -372,8 +372,8 @@ AR6K_DEVICE *HTCGetAR6KDevice(void *HTCHandle); ...@@ -372,8 +372,8 @@ AR6K_DEVICE *HTCGetAR6KDevice(void *HTCHandle);
#define DEV_GMBOX_GET_PROTOCOL(pDev) (pDev)->GMboxInfo.pProtocolContext #define DEV_GMBOX_GET_PROTOCOL(pDev) (pDev)->GMboxInfo.pProtocolContext
A_STATUS DevGMboxWrite(AR6K_DEVICE *pDev, HTC_PACKET *pPacket, A_UINT32 WriteLength); int DevGMboxWrite(AR6K_DEVICE *pDev, HTC_PACKET *pPacket, A_UINT32 WriteLength);
A_STATUS DevGMboxRead(AR6K_DEVICE *pDev, HTC_PACKET *pPacket, A_UINT32 ReadLength); int DevGMboxRead(AR6K_DEVICE *pDev, HTC_PACKET *pPacket, A_UINT32 ReadLength);
#define PROC_IO_ASYNC TRUE #define PROC_IO_ASYNC TRUE
#define PROC_IO_SYNC FALSE #define PROC_IO_SYNC FALSE
...@@ -387,11 +387,11 @@ typedef enum GMBOX_IRQ_ACTION_TYPE { ...@@ -387,11 +387,11 @@ typedef enum GMBOX_IRQ_ACTION_TYPE {
GMBOX_CREDIT_IRQ_DISABLE, GMBOX_CREDIT_IRQ_DISABLE,
} GMBOX_IRQ_ACTION_TYPE; } GMBOX_IRQ_ACTION_TYPE;
A_STATUS DevGMboxIRQAction(AR6K_DEVICE *pDev, GMBOX_IRQ_ACTION_TYPE, A_BOOL AsyncMode); int DevGMboxIRQAction(AR6K_DEVICE *pDev, GMBOX_IRQ_ACTION_TYPE, A_BOOL AsyncMode);
A_STATUS DevGMboxReadCreditCounter(AR6K_DEVICE *pDev, A_BOOL AsyncMode, int *pCredits); int DevGMboxReadCreditCounter(AR6K_DEVICE *pDev, A_BOOL AsyncMode, int *pCredits);
A_STATUS DevGMboxReadCreditSize(AR6K_DEVICE *pDev, int *pCreditSize); int DevGMboxReadCreditSize(AR6K_DEVICE *pDev, int *pCreditSize);
A_STATUS DevGMboxRecvLookAheadPeek(AR6K_DEVICE *pDev, A_UINT8 *pLookAheadBuffer, int *pLookAheadBytes); int DevGMboxRecvLookAheadPeek(AR6K_DEVICE *pDev, A_UINT8 *pLookAheadBuffer, int *pLookAheadBytes);
A_STATUS DevGMboxSetTargetInterrupt(AR6K_DEVICE *pDev, int SignalNumber, int AckTimeoutMS); int DevGMboxSetTargetInterrupt(AR6K_DEVICE *pDev, int SignalNumber, int AckTimeoutMS);
#endif #endif
......
...@@ -36,12 +36,12 @@ ...@@ -36,12 +36,12 @@
extern void AR6KFreeIOPacket(AR6K_DEVICE *pDev, HTC_PACKET *pPacket); extern void AR6KFreeIOPacket(AR6K_DEVICE *pDev, HTC_PACKET *pPacket);
extern HTC_PACKET *AR6KAllocIOPacket(AR6K_DEVICE *pDev); extern HTC_PACKET *AR6KAllocIOPacket(AR6K_DEVICE *pDev);
static A_STATUS DevServiceDebugInterrupt(AR6K_DEVICE *pDev); static int DevServiceDebugInterrupt(AR6K_DEVICE *pDev);
#define DELAY_PER_INTERVAL_MS 10 /* 10 MS delay per polling interval */ #define DELAY_PER_INTERVAL_MS 10 /* 10 MS delay per polling interval */
/* completion routine for ALL HIF layer async I/O */ /* completion routine for ALL HIF layer async I/O */
A_STATUS DevRWCompletionHandler(void *context, A_STATUS status) int DevRWCompletionHandler(void *context, int status)
{ {
HTC_PACKET *pPacket = (HTC_PACKET *)context; HTC_PACKET *pPacket = (HTC_PACKET *)context;
...@@ -59,11 +59,11 @@ A_STATUS DevRWCompletionHandler(void *context, A_STATUS status) ...@@ -59,11 +59,11 @@ A_STATUS DevRWCompletionHandler(void *context, A_STATUS status)
} }
/* mailbox recv message polling */ /* mailbox recv message polling */
A_STATUS DevPollMboxMsgRecv(AR6K_DEVICE *pDev, int DevPollMboxMsgRecv(AR6K_DEVICE *pDev,
A_UINT32 *pLookAhead, A_UINT32 *pLookAhead,
int TimeoutMS) int TimeoutMS)
{ {
A_STATUS status = A_OK; int status = A_OK;
int timeout = TimeoutMS/DELAY_PER_INTERVAL_MS; int timeout = TimeoutMS/DELAY_PER_INTERVAL_MS;
A_ASSERT(timeout > 0); A_ASSERT(timeout > 0);
...@@ -152,9 +152,9 @@ A_STATUS DevPollMboxMsgRecv(AR6K_DEVICE *pDev, ...@@ -152,9 +152,9 @@ A_STATUS DevPollMboxMsgRecv(AR6K_DEVICE *pDev,
return status; return status;
} }
static A_STATUS DevServiceCPUInterrupt(AR6K_DEVICE *pDev) static int DevServiceCPUInterrupt(AR6K_DEVICE *pDev)
{ {
A_STATUS status; int status;
A_UINT8 cpu_int_status; A_UINT8 cpu_int_status;
A_UINT8 regBuffer[4]; A_UINT8 regBuffer[4];
...@@ -192,9 +192,9 @@ static A_STATUS DevServiceCPUInterrupt(AR6K_DEVICE *pDev) ...@@ -192,9 +192,9 @@ static A_STATUS DevServiceCPUInterrupt(AR6K_DEVICE *pDev)
} }
static A_STATUS DevServiceErrorInterrupt(AR6K_DEVICE *pDev) static int DevServiceErrorInterrupt(AR6K_DEVICE *pDev)
{ {
A_STATUS status; int status;
A_UINT8 error_int_status; A_UINT8 error_int_status;
A_UINT8 regBuffer[4]; A_UINT8 regBuffer[4];
...@@ -245,10 +245,10 @@ static A_STATUS DevServiceErrorInterrupt(AR6K_DEVICE *pDev) ...@@ -245,10 +245,10 @@ static A_STATUS DevServiceErrorInterrupt(AR6K_DEVICE *pDev)
return status; return status;
} }
static A_STATUS DevServiceDebugInterrupt(AR6K_DEVICE *pDev) static int DevServiceDebugInterrupt(AR6K_DEVICE *pDev)
{ {
A_UINT32 dummy; A_UINT32 dummy;
A_STATUS status; int status;
/* Send a target failure event to the application */ /* Send a target failure event to the application */
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("Target debug interrupt\n")); AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("Target debug interrupt\n"));
...@@ -275,7 +275,7 @@ static A_STATUS DevServiceDebugInterrupt(AR6K_DEVICE *pDev) ...@@ -275,7 +275,7 @@ static A_STATUS DevServiceDebugInterrupt(AR6K_DEVICE *pDev)
return status; return status;
} }
static A_STATUS DevServiceCounterInterrupt(AR6K_DEVICE *pDev) static int DevServiceCounterInterrupt(AR6K_DEVICE *pDev)
{ {
A_UINT8 counter_int_status; A_UINT8 counter_int_status;
...@@ -363,7 +363,7 @@ static void DevGetEventAsyncHandler(void *Context, HTC_PACKET *pPacket) ...@@ -363,7 +363,7 @@ static void DevGetEventAsyncHandler(void *Context, HTC_PACKET *pPacket)
HIFAckInterrupt(pDev->HIFDevice); HIFAckInterrupt(pDev->HIFDevice);
} else { } else {
int fetched = 0; int fetched = 0;
A_STATUS status; int status;
AR_DEBUG_PRINTF(ATH_DEBUG_IRQ, AR_DEBUG_PRINTF(ATH_DEBUG_IRQ,
(" DevGetEventAsyncHandler : detected another message, lookahead :0x%X \n", (" DevGetEventAsyncHandler : detected another message, lookahead :0x%X \n",
...@@ -388,10 +388,10 @@ static void DevGetEventAsyncHandler(void *Context, HTC_PACKET *pPacket) ...@@ -388,10 +388,10 @@ static void DevGetEventAsyncHandler(void *Context, HTC_PACKET *pPacket)
/* called by the HTC layer when it wants us to check if the device has any more pending /* called by the HTC layer when it wants us to check if the device has any more pending
* recv messages, this starts off a series of async requests to read interrupt registers */ * recv messages, this starts off a series of async requests to read interrupt registers */
A_STATUS DevCheckPendingRecvMsgsAsync(void *context) int DevCheckPendingRecvMsgsAsync(void *context)
{ {
AR6K_DEVICE *pDev = (AR6K_DEVICE *)context; AR6K_DEVICE *pDev = (AR6K_DEVICE *)context;
A_STATUS status = A_OK; int status = A_OK;
HTC_PACKET *pIOPacket; HTC_PACKET *pIOPacket;
/* this is called in an ASYNC only context, we may NOT block, sleep or call any apis that can /* this is called in an ASYNC only context, we may NOT block, sleep or call any apis that can
...@@ -467,9 +467,9 @@ void DevAsyncIrqProcessComplete(AR6K_DEVICE *pDev) ...@@ -467,9 +467,9 @@ void DevAsyncIrqProcessComplete(AR6K_DEVICE *pDev)
} }
/* process pending interrupts synchronously */ /* process pending interrupts synchronously */
static A_STATUS ProcessPendingIRQs(AR6K_DEVICE *pDev, A_BOOL *pDone, A_BOOL *pASyncProcessing) static int ProcessPendingIRQs(AR6K_DEVICE *pDev, A_BOOL *pDone, A_BOOL *pASyncProcessing)
{ {
A_STATUS status = A_OK; int status = A_OK;
A_UINT8 host_int_status = 0; A_UINT8 host_int_status = 0;
A_UINT32 lookAhead = 0; A_UINT32 lookAhead = 0;
...@@ -681,10 +681,10 @@ static A_STATUS ProcessPendingIRQs(AR6K_DEVICE *pDev, A_BOOL *pDone, A_BOOL *pAS ...@@ -681,10 +681,10 @@ static A_STATUS ProcessPendingIRQs(AR6K_DEVICE *pDev, A_BOOL *pDone, A_BOOL *pAS
/* Synchronousinterrupt handler, this handler kicks off all interrupt processing.*/ /* Synchronousinterrupt handler, this handler kicks off all interrupt processing.*/
A_STATUS DevDsrHandler(void *context) int DevDsrHandler(void *context)
{ {
AR6K_DEVICE *pDev = (AR6K_DEVICE *)context; AR6K_DEVICE *pDev = (AR6K_DEVICE *)context;
A_STATUS status = A_OK; int status = A_OK;
A_BOOL done = FALSE; A_BOOL done = FALSE;
A_BOOL asyncProc = FALSE; A_BOOL asyncProc = FALSE;
...@@ -746,7 +746,7 @@ A_STATUS DevDsrHandler(void *context) ...@@ -746,7 +746,7 @@ A_STATUS DevDsrHandler(void *context)
#ifdef ATH_DEBUG_MODULE #ifdef ATH_DEBUG_MODULE
void DumpAR6KDevState(AR6K_DEVICE *pDev) void DumpAR6KDevState(AR6K_DEVICE *pDev)
{ {
A_STATUS status; int status;
AR6K_IRQ_ENABLE_REGISTERS regs; AR6K_IRQ_ENABLE_REGISTERS regs;
AR6K_IRQ_PROC_REGISTERS procRegs; AR6K_IRQ_PROC_REGISTERS procRegs;
......
...@@ -74,9 +74,9 @@ static void DevGMboxIRQActionAsyncHandler(void *Context, HTC_PACKET *pPacket) ...@@ -74,9 +74,9 @@ static void DevGMboxIRQActionAsyncHandler(void *Context, HTC_PACKET *pPacket)
AR_DEBUG_PRINTF(ATH_DEBUG_IRQ,("-DevGMboxIRQActionAsyncHandler \n")); AR_DEBUG_PRINTF(ATH_DEBUG_IRQ,("-DevGMboxIRQActionAsyncHandler \n"));
} }
static A_STATUS DevGMboxCounterEnableDisable(AR6K_DEVICE *pDev, GMBOX_IRQ_ACTION_TYPE IrqAction, A_BOOL AsyncMode) static int DevGMboxCounterEnableDisable(AR6K_DEVICE *pDev, GMBOX_IRQ_ACTION_TYPE IrqAction, A_BOOL AsyncMode)
{ {
A_STATUS status = A_OK; int status = A_OK;
AR6K_IRQ_ENABLE_REGISTERS regs; AR6K_IRQ_ENABLE_REGISTERS regs;
HTC_PACKET *pIOPacket = NULL; HTC_PACKET *pIOPacket = NULL;
...@@ -155,9 +155,9 @@ static A_STATUS DevGMboxCounterEnableDisable(AR6K_DEVICE *pDev, GMBOX_IRQ_ACTION ...@@ -155,9 +155,9 @@ static A_STATUS DevGMboxCounterEnableDisable(AR6K_DEVICE *pDev, GMBOX_IRQ_ACTION
} }
A_STATUS DevGMboxIRQAction(AR6K_DEVICE *pDev, GMBOX_IRQ_ACTION_TYPE IrqAction, A_BOOL AsyncMode) int DevGMboxIRQAction(AR6K_DEVICE *pDev, GMBOX_IRQ_ACTION_TYPE IrqAction, A_BOOL AsyncMode)
{ {
A_STATUS status = A_OK; int status = A_OK;
HTC_PACKET *pIOPacket = NULL; HTC_PACKET *pIOPacket = NULL;
A_UINT8 GMboxIntControl[4]; A_UINT8 GMboxIntControl[4];
...@@ -269,9 +269,9 @@ void DevCleanupGMbox(AR6K_DEVICE *pDev) ...@@ -269,9 +269,9 @@ void DevCleanupGMbox(AR6K_DEVICE *pDev)
} }
} }
A_STATUS DevSetupGMbox(AR6K_DEVICE *pDev) int DevSetupGMbox(AR6K_DEVICE *pDev)
{ {
A_STATUS status = A_OK; int status = A_OK;
A_UINT8 muxControl[4]; A_UINT8 muxControl[4];
do { do {
...@@ -322,9 +322,9 @@ A_STATUS DevSetupGMbox(AR6K_DEVICE *pDev) ...@@ -322,9 +322,9 @@ A_STATUS DevSetupGMbox(AR6K_DEVICE *pDev)
return status; return status;
} }
A_STATUS DevCheckGMboxInterrupts(AR6K_DEVICE *pDev) int DevCheckGMboxInterrupts(AR6K_DEVICE *pDev)
{ {
A_STATUS status = A_OK; int status = A_OK;
A_UINT8 counter_int_status; A_UINT8 counter_int_status;
int credits; int credits;
A_UINT8 host_int_status2; A_UINT8 host_int_status2;
...@@ -396,11 +396,11 @@ A_STATUS DevCheckGMboxInterrupts(AR6K_DEVICE *pDev) ...@@ -396,11 +396,11 @@ A_STATUS DevCheckGMboxInterrupts(AR6K_DEVICE *pDev)
} }
A_STATUS DevGMboxWrite(AR6K_DEVICE *pDev, HTC_PACKET *pPacket, A_UINT32 WriteLength) int DevGMboxWrite(AR6K_DEVICE *pDev, HTC_PACKET *pPacket, A_UINT32 WriteLength)
{ {
A_UINT32 paddedLength; A_UINT32 paddedLength;
A_BOOL sync = (pPacket->Completion == NULL) ? TRUE : FALSE; A_BOOL sync = (pPacket->Completion == NULL) ? TRUE : FALSE;
A_STATUS status; int status;
A_UINT32 address; A_UINT32 address;
/* adjust the length to be a multiple of block size if appropriate */ /* adjust the length to be a multiple of block size if appropriate */
...@@ -433,11 +433,11 @@ A_STATUS DevGMboxWrite(AR6K_DEVICE *pDev, HTC_PACKET *pPacket, A_UINT32 WriteLen ...@@ -433,11 +433,11 @@ A_STATUS DevGMboxWrite(AR6K_DEVICE *pDev, HTC_PACKET *pPacket, A_UINT32 WriteLen
return status; return status;
} }
A_STATUS DevGMboxRead(AR6K_DEVICE *pDev, HTC_PACKET *pPacket, A_UINT32 ReadLength) int DevGMboxRead(AR6K_DEVICE *pDev, HTC_PACKET *pPacket, A_UINT32 ReadLength)
{ {
A_UINT32 paddedLength; A_UINT32 paddedLength;
A_STATUS status; int status;
A_BOOL sync = (pPacket->Completion == NULL) ? TRUE : FALSE; A_BOOL sync = (pPacket->Completion == NULL) ? TRUE : FALSE;
/* adjust the length to be a multiple of block size if appropriate */ /* adjust the length to be a multiple of block size if appropriate */
...@@ -539,9 +539,9 @@ static void DevGMboxReadCreditsAsyncHandler(void *Context, HTC_PACKET *pPacket) ...@@ -539,9 +539,9 @@ static void DevGMboxReadCreditsAsyncHandler(void *Context, HTC_PACKET *pPacket)
AR_DEBUG_PRINTF(ATH_DEBUG_IRQ,("-DevGMboxReadCreditsAsyncHandler \n")); AR_DEBUG_PRINTF(ATH_DEBUG_IRQ,("-DevGMboxReadCreditsAsyncHandler \n"));
} }
A_STATUS DevGMboxReadCreditCounter(AR6K_DEVICE *pDev, A_BOOL AsyncMode, int *pCredits) int DevGMboxReadCreditCounter(AR6K_DEVICE *pDev, A_BOOL AsyncMode, int *pCredits)
{ {
A_STATUS status = A_OK; int status = A_OK;
HTC_PACKET *pIOPacket = NULL; HTC_PACKET *pIOPacket = NULL;
AR_DEBUG_PRINTF(ATH_DEBUG_SEND,("+DevGMboxReadCreditCounter (%s) \n", AsyncMode ? "ASYNC" : "SYNC")); AR_DEBUG_PRINTF(ATH_DEBUG_SEND,("+DevGMboxReadCreditCounter (%s) \n", AsyncMode ? "ASYNC" : "SYNC"));
...@@ -602,9 +602,9 @@ A_STATUS DevGMboxReadCreditCounter(AR6K_DEVICE *pDev, A_BOOL AsyncMode, int *pCr ...@@ -602,9 +602,9 @@ A_STATUS DevGMboxReadCreditCounter(AR6K_DEVICE *pDev, A_BOOL AsyncMode, int *pCr
return status; return status;
} }
A_STATUS DevGMboxReadCreditSize(AR6K_DEVICE *pDev, int *pCreditSize) int DevGMboxReadCreditSize(AR6K_DEVICE *pDev, int *pCreditSize)
{ {
A_STATUS status; int status;
A_UINT8 buffer[4]; A_UINT8 buffer[4];
status = HIFReadWrite(pDev->HIFDevice, status = HIFReadWrite(pDev->HIFDevice,
...@@ -634,10 +634,10 @@ void DevNotifyGMboxTargetFailure(AR6K_DEVICE *pDev) ...@@ -634,10 +634,10 @@ void DevNotifyGMboxTargetFailure(AR6K_DEVICE *pDev)
} }
} }
A_STATUS DevGMboxRecvLookAheadPeek(AR6K_DEVICE *pDev, A_UINT8 *pLookAheadBuffer, int *pLookAheadBytes) int DevGMboxRecvLookAheadPeek(AR6K_DEVICE *pDev, A_UINT8 *pLookAheadBuffer, int *pLookAheadBytes)
{ {
A_STATUS status = A_OK; int status = A_OK;
AR6K_IRQ_PROC_REGISTERS procRegs; AR6K_IRQ_PROC_REGISTERS procRegs;
int maxCopy; int maxCopy;
...@@ -676,9 +676,9 @@ A_STATUS DevGMboxRecvLookAheadPeek(AR6K_DEVICE *pDev, A_UINT8 *pLookAheadBuffer, ...@@ -676,9 +676,9 @@ A_STATUS DevGMboxRecvLookAheadPeek(AR6K_DEVICE *pDev, A_UINT8 *pLookAheadBuffer,
return status; return status;
} }
A_STATUS DevGMboxSetTargetInterrupt(AR6K_DEVICE *pDev, int Signal, int AckTimeoutMS) int DevGMboxSetTargetInterrupt(AR6K_DEVICE *pDev, int Signal, int AckTimeoutMS)
{ {
A_STATUS status = A_OK; int status = A_OK;
int i; int i;
A_UINT8 buffer[4]; A_UINT8 buffer[4];
......
...@@ -94,7 +94,7 @@ typedef struct { ...@@ -94,7 +94,7 @@ typedef struct {
(p)->HCIConfig.pHCISendComplete((p)->HCIConfig.pContext, (pt)); \ (p)->HCIConfig.pHCISendComplete((p)->HCIConfig.pContext, (pt)); \
} }
static A_STATUS HCITrySend(GMBOX_PROTO_HCI_UART *pProt, HTC_PACKET *pPacket, A_BOOL Synchronous); static int HCITrySend(GMBOX_PROTO_HCI_UART *pProt, HTC_PACKET *pPacket, A_BOOL Synchronous);
static void HCIUartCleanup(GMBOX_PROTO_HCI_UART *pProtocol) static void HCIUartCleanup(GMBOX_PROTO_HCI_UART *pProtocol)
{ {
...@@ -106,9 +106,9 @@ static void HCIUartCleanup(GMBOX_PROTO_HCI_UART *pProtocol) ...@@ -106,9 +106,9 @@ static void HCIUartCleanup(GMBOX_PROTO_HCI_UART *pProtocol)
A_FREE(pProtocol); A_FREE(pProtocol);
} }
static A_STATUS InitTxCreditState(GMBOX_PROTO_HCI_UART *pProt) static int InitTxCreditState(GMBOX_PROTO_HCI_UART *pProt)
{ {
A_STATUS status; int status;
int credits; int credits;
int creditPollCount = CREDIT_POLL_COUNT; int creditPollCount = CREDIT_POLL_COUNT;
A_BOOL gotCredits = FALSE; A_BOOL gotCredits = FALSE;
...@@ -184,13 +184,13 @@ static A_STATUS InitTxCreditState(GMBOX_PROTO_HCI_UART *pProt) ...@@ -184,13 +184,13 @@ static A_STATUS InitTxCreditState(GMBOX_PROTO_HCI_UART *pProt)
return status; return status;
} }
static A_STATUS CreditsAvailableCallback(void *pContext, int Credits, A_BOOL CreditIRQEnabled) static int CreditsAvailableCallback(void *pContext, int Credits, A_BOOL CreditIRQEnabled)
{ {
GMBOX_PROTO_HCI_UART *pProt = (GMBOX_PROTO_HCI_UART *)pContext; GMBOX_PROTO_HCI_UART *pProt = (GMBOX_PROTO_HCI_UART *)pContext;
A_BOOL enableCreditIrq = FALSE; A_BOOL enableCreditIrq = FALSE;
A_BOOL disableCreditIrq = FALSE; A_BOOL disableCreditIrq = FALSE;
A_BOOL doPendingSends = FALSE; A_BOOL doPendingSends = FALSE;
A_STATUS status = A_OK; int status = A_OK;
/** this callback is called under 2 conditions: /** this callback is called under 2 conditions:
* 1. The credit IRQ interrupt was enabled and signaled. * 1. The credit IRQ interrupt was enabled and signaled.
...@@ -269,14 +269,14 @@ static A_STATUS CreditsAvailableCallback(void *pContext, int Credits, A_BOOL Cre ...@@ -269,14 +269,14 @@ static A_STATUS CreditsAvailableCallback(void *pContext, int Credits, A_BOOL Cre
return status; return status;
} }
static INLINE void NotifyTransportFailure(GMBOX_PROTO_HCI_UART *pProt, A_STATUS status) static INLINE void NotifyTransportFailure(GMBOX_PROTO_HCI_UART *pProt, int status)
{ {
if (pProt->HCIConfig.TransportFailure != NULL) { if (pProt->HCIConfig.TransportFailure != NULL) {
pProt->HCIConfig.TransportFailure(pProt->HCIConfig.pContext, status); pProt->HCIConfig.TransportFailure(pProt->HCIConfig.pContext, status);
} }
} }
static void FailureCallback(void *pContext, A_STATUS Status) static void FailureCallback(void *pContext, int Status)
{ {
GMBOX_PROTO_HCI_UART *pProt = (GMBOX_PROTO_HCI_UART *)pContext; GMBOX_PROTO_HCI_UART *pProt = (GMBOX_PROTO_HCI_UART *)pContext;
...@@ -299,10 +299,10 @@ static void StateDumpCallback(void *pContext) ...@@ -299,10 +299,10 @@ static void StateDumpCallback(void *pContext)
AR_DEBUG_PRINTF(ATH_DEBUG_ANY,("==================================================\n")); AR_DEBUG_PRINTF(ATH_DEBUG_ANY,("==================================================\n"));
} }
static A_STATUS HCIUartMessagePending(void *pContext, A_UINT8 LookAheadBytes[], int ValidBytes) static int HCIUartMessagePending(void *pContext, A_UINT8 LookAheadBytes[], int ValidBytes)
{ {
GMBOX_PROTO_HCI_UART *pProt = (GMBOX_PROTO_HCI_UART *)pContext; GMBOX_PROTO_HCI_UART *pProt = (GMBOX_PROTO_HCI_UART *)pContext;
A_STATUS status = A_OK; int status = A_OK;
int totalRecvLength = 0; int totalRecvLength = 0;
HCI_TRANSPORT_PACKET_TYPE pktType = HCI_PACKET_INVALID; HCI_TRANSPORT_PACKET_TYPE pktType = HCI_PACKET_INVALID;
A_BOOL recvRefillCalled = FALSE; A_BOOL recvRefillCalled = FALSE;
...@@ -542,9 +542,9 @@ static void HCISendPacketCompletion(void *Context, HTC_PACKET *pPacket) ...@@ -542,9 +542,9 @@ static void HCISendPacketCompletion(void *Context, HTC_PACKET *pPacket)
AR_DEBUG_PRINTF(ATH_DEBUG_SEND,("+HCISendPacketCompletion \n")); AR_DEBUG_PRINTF(ATH_DEBUG_SEND,("+HCISendPacketCompletion \n"));
} }
static A_STATUS SeekCreditsSynch(GMBOX_PROTO_HCI_UART *pProt) static int SeekCreditsSynch(GMBOX_PROTO_HCI_UART *pProt)
{ {
A_STATUS status = A_OK; int status = A_OK;
int credits; int credits;
int retry = 100; int retry = 100;
...@@ -574,9 +574,9 @@ static A_STATUS SeekCreditsSynch(GMBOX_PROTO_HCI_UART *pProt) ...@@ -574,9 +574,9 @@ static A_STATUS SeekCreditsSynch(GMBOX_PROTO_HCI_UART *pProt)
return status; return status;
} }
static A_STATUS HCITrySend(GMBOX_PROTO_HCI_UART *pProt, HTC_PACKET *pPacket, A_BOOL Synchronous) static int HCITrySend(GMBOX_PROTO_HCI_UART *pProt, HTC_PACKET *pPacket, A_BOOL Synchronous)
{ {
A_STATUS status = A_OK; int status = A_OK;
int transferLength; int transferLength;
int creditsRequired, remainder; int creditsRequired, remainder;
A_UINT8 hciUartType; A_UINT8 hciUartType;
...@@ -841,9 +841,9 @@ static void FlushRecvBuffers(GMBOX_PROTO_HCI_UART *pProt) ...@@ -841,9 +841,9 @@ static void FlushRecvBuffers(GMBOX_PROTO_HCI_UART *pProt)
/*** protocol module install entry point ***/ /*** protocol module install entry point ***/
A_STATUS GMboxProtocolInstall(AR6K_DEVICE *pDev) int GMboxProtocolInstall(AR6K_DEVICE *pDev)
{ {
A_STATUS status = A_OK; int status = A_OK;
GMBOX_PROTO_HCI_UART *pProtocol = NULL; GMBOX_PROTO_HCI_UART *pProtocol = NULL;
do { do {
...@@ -903,10 +903,10 @@ void GMboxProtocolUninstall(AR6K_DEVICE *pDev) ...@@ -903,10 +903,10 @@ void GMboxProtocolUninstall(AR6K_DEVICE *pDev)
} }
static A_STATUS NotifyTransportReady(GMBOX_PROTO_HCI_UART *pProt) static int NotifyTransportReady(GMBOX_PROTO_HCI_UART *pProt)
{ {
HCI_TRANSPORT_PROPERTIES props; HCI_TRANSPORT_PROPERTIES props;
A_STATUS status = A_OK; int status = A_OK;
do { do {
...@@ -996,10 +996,10 @@ void HCI_TransportDetach(HCI_TRANSPORT_HANDLE HciTrans) ...@@ -996,10 +996,10 @@ void HCI_TransportDetach(HCI_TRANSPORT_HANDLE HciTrans)
AR_DEBUG_PRINTF(ATH_DEBUG_TRC,("-HCI_TransportAttach \n")); AR_DEBUG_PRINTF(ATH_DEBUG_TRC,("-HCI_TransportAttach \n"));
} }
A_STATUS HCI_TransportAddReceivePkts(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET_QUEUE *pQueue) int HCI_TransportAddReceivePkts(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET_QUEUE *pQueue)
{ {
GMBOX_PROTO_HCI_UART *pProt = (GMBOX_PROTO_HCI_UART *)HciTrans; GMBOX_PROTO_HCI_UART *pProt = (GMBOX_PROTO_HCI_UART *)HciTrans;
A_STATUS status = A_OK; int status = A_OK;
A_BOOL unblockRecv = FALSE; A_BOOL unblockRecv = FALSE;
HTC_PACKET *pPacket; HTC_PACKET *pPacket;
...@@ -1064,7 +1064,7 @@ A_STATUS HCI_TransportAddReceivePkts(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET_Q ...@@ -1064,7 +1064,7 @@ A_STATUS HCI_TransportAddReceivePkts(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET_Q
return A_OK; return A_OK;
} }
A_STATUS HCI_TransportSendPkt(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET *pPacket, A_BOOL Synchronous) int HCI_TransportSendPkt(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET *pPacket, A_BOOL Synchronous)
{ {
GMBOX_PROTO_HCI_UART *pProt = (GMBOX_PROTO_HCI_UART *)HciTrans; GMBOX_PROTO_HCI_UART *pProt = (GMBOX_PROTO_HCI_UART *)HciTrans;
...@@ -1097,9 +1097,9 @@ void HCI_TransportStop(HCI_TRANSPORT_HANDLE HciTrans) ...@@ -1097,9 +1097,9 @@ void HCI_TransportStop(HCI_TRANSPORT_HANDLE HciTrans)
AR_DEBUG_PRINTF(ATH_DEBUG_TRC,("-HCI_TransportStop \n")); AR_DEBUG_PRINTF(ATH_DEBUG_TRC,("-HCI_TransportStop \n"));
} }
A_STATUS HCI_TransportStart(HCI_TRANSPORT_HANDLE HciTrans) int HCI_TransportStart(HCI_TRANSPORT_HANDLE HciTrans)
{ {
A_STATUS status; int status;
GMBOX_PROTO_HCI_UART *pProt = (GMBOX_PROTO_HCI_UART *)HciTrans; GMBOX_PROTO_HCI_UART *pProt = (GMBOX_PROTO_HCI_UART *)HciTrans;
AR_DEBUG_PRINTF(ATH_DEBUG_TRC,("+HCI_TransportStart \n")); AR_DEBUG_PRINTF(ATH_DEBUG_TRC,("+HCI_TransportStart \n"));
...@@ -1144,7 +1144,7 @@ A_STATUS HCI_TransportStart(HCI_TRANSPORT_HANDLE HciTrans) ...@@ -1144,7 +1144,7 @@ A_STATUS HCI_TransportStart(HCI_TRANSPORT_HANDLE HciTrans)
return status; return status;
} }
A_STATUS HCI_TransportEnableDisableAsyncRecv(HCI_TRANSPORT_HANDLE HciTrans, A_BOOL Enable) int HCI_TransportEnableDisableAsyncRecv(HCI_TRANSPORT_HANDLE HciTrans, A_BOOL Enable)
{ {
GMBOX_PROTO_HCI_UART *pProt = (GMBOX_PROTO_HCI_UART *)HciTrans; GMBOX_PROTO_HCI_UART *pProt = (GMBOX_PROTO_HCI_UART *)HciTrans;
return DevGMboxIRQAction(pProt->pDev, return DevGMboxIRQAction(pProt->pDev,
...@@ -1153,12 +1153,12 @@ A_STATUS HCI_TransportEnableDisableAsyncRecv(HCI_TRANSPORT_HANDLE HciTrans, A_BO ...@@ -1153,12 +1153,12 @@ A_STATUS HCI_TransportEnableDisableAsyncRecv(HCI_TRANSPORT_HANDLE HciTrans, A_BO
} }
A_STATUS HCI_TransportRecvHCIEventSync(HCI_TRANSPORT_HANDLE HciTrans, int HCI_TransportRecvHCIEventSync(HCI_TRANSPORT_HANDLE HciTrans,
HTC_PACKET *pPacket, HTC_PACKET *pPacket,
int MaxPollMS) int MaxPollMS)
{ {
GMBOX_PROTO_HCI_UART *pProt = (GMBOX_PROTO_HCI_UART *)HciTrans; GMBOX_PROTO_HCI_UART *pProt = (GMBOX_PROTO_HCI_UART *)HciTrans;
A_STATUS status = A_OK; int status = A_OK;
A_UINT8 lookAhead[8]; A_UINT8 lookAhead[8];
int bytes; int bytes;
int totalRecvLength; int totalRecvLength;
...@@ -1225,12 +1225,12 @@ A_STATUS HCI_TransportRecvHCIEventSync(HCI_TRANSPORT_HANDLE HciTrans, ...@@ -1225,12 +1225,12 @@ A_STATUS HCI_TransportRecvHCIEventSync(HCI_TRANSPORT_HANDLE HciTrans,
#define LSB_SCRATCH_IDX 4 #define LSB_SCRATCH_IDX 4
#define MSB_SCRATCH_IDX 5 #define MSB_SCRATCH_IDX 5
A_STATUS HCI_TransportSetBaudRate(HCI_TRANSPORT_HANDLE HciTrans, A_UINT32 Baud) int HCI_TransportSetBaudRate(HCI_TRANSPORT_HANDLE HciTrans, A_UINT32 Baud)
{ {
GMBOX_PROTO_HCI_UART *pProt = (GMBOX_PROTO_HCI_UART *)HciTrans; GMBOX_PROTO_HCI_UART *pProt = (GMBOX_PROTO_HCI_UART *)HciTrans;
HIF_DEVICE *pHIFDevice = (HIF_DEVICE *)(pProt->pDev->HIFDevice); HIF_DEVICE *pHIFDevice = (HIF_DEVICE *)(pProt->pDev->HIFDevice);
A_UINT32 scaledBaud, scratchAddr; A_UINT32 scaledBaud, scratchAddr;
A_STATUS status = A_OK; int status = A_OK;
/* Divide the desired baud rate by 100 /* Divide the desired baud rate by 100
* Store the LSB in the local scratch register 4 and the MSB in the local * Store the LSB in the local scratch register 4 and the MSB in the local
...@@ -1256,9 +1256,9 @@ A_STATUS HCI_TransportSetBaudRate(HCI_TRANSPORT_HANDLE HciTrans, A_UINT32 Baud) ...@@ -1256,9 +1256,9 @@ A_STATUS HCI_TransportSetBaudRate(HCI_TRANSPORT_HANDLE HciTrans, A_UINT32 Baud)
return status; return status;
} }
A_STATUS HCI_TransportEnablePowerMgmt(HCI_TRANSPORT_HANDLE HciTrans, A_BOOL Enable) int HCI_TransportEnablePowerMgmt(HCI_TRANSPORT_HANDLE HciTrans, A_BOOL Enable)
{ {
A_STATUS status; int status;
GMBOX_PROTO_HCI_UART *pProt = (GMBOX_PROTO_HCI_UART *)HciTrans; GMBOX_PROTO_HCI_UART *pProt = (GMBOX_PROTO_HCI_UART *)HciTrans;
if (Enable) { if (Enable) {
......
...@@ -93,7 +93,7 @@ static void HTCCleanup(HTC_TARGET *target) ...@@ -93,7 +93,7 @@ static void HTCCleanup(HTC_TARGET *target)
HTC_HANDLE HTCCreate(void *hif_handle, HTC_INIT_INFO *pInfo) HTC_HANDLE HTCCreate(void *hif_handle, HTC_INIT_INFO *pInfo)
{ {
HTC_TARGET *target = NULL; HTC_TARGET *target = NULL;
A_STATUS status = A_OK; int status = A_OK;
int i; int i;
A_UINT32 ctrl_bufsz; A_UINT32 ctrl_bufsz;
A_UINT32 blocksizes[HTC_MAILBOX_NUM_MAX]; A_UINT32 blocksizes[HTC_MAILBOX_NUM_MAX];
...@@ -222,10 +222,10 @@ void *HTCGetHifDevice(HTC_HANDLE HTCHandle) ...@@ -222,10 +222,10 @@ void *HTCGetHifDevice(HTC_HANDLE HTCHandle)
/* wait for the target to arrive (sends HTC Ready message) /* wait for the target to arrive (sends HTC Ready message)
* this operation is fully synchronous and the message is polled for */ * this operation is fully synchronous and the message is polled for */
A_STATUS HTCWaitTarget(HTC_HANDLE HTCHandle) int HTCWaitTarget(HTC_HANDLE HTCHandle)
{ {
HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
A_STATUS status; int status;
HTC_PACKET *pPacket = NULL; HTC_PACKET *pPacket = NULL;
HTC_READY_EX_MSG *pRdyMsg; HTC_READY_EX_MSG *pRdyMsg;
...@@ -369,11 +369,11 @@ A_STATUS HTCWaitTarget(HTC_HANDLE HTCHandle) ...@@ -369,11 +369,11 @@ A_STATUS HTCWaitTarget(HTC_HANDLE HTCHandle)
/* Start HTC, enable interrupts and let the target know host has finished setup */ /* Start HTC, enable interrupts and let the target know host has finished setup */
A_STATUS HTCStart(HTC_HANDLE HTCHandle) int HTCStart(HTC_HANDLE HTCHandle)
{ {
HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
HTC_PACKET *pPacket; HTC_PACKET *pPacket;
A_STATUS status; int status;
AR_DEBUG_PRINTF(ATH_DEBUG_TRC, ("HTCStart Enter\n")); AR_DEBUG_PRINTF(ATH_DEBUG_TRC, ("HTCStart Enter\n"));
......
...@@ -164,14 +164,14 @@ typedef struct _HTC_TARGET { ...@@ -164,14 +164,14 @@ typedef struct _HTC_TARGET {
/* internal HTC functions */ /* internal HTC functions */
void HTCControlTxComplete(void *Context, HTC_PACKET *pPacket); void HTCControlTxComplete(void *Context, HTC_PACKET *pPacket);
void HTCControlRecv(void *Context, HTC_PACKET *pPacket); void HTCControlRecv(void *Context, HTC_PACKET *pPacket);
A_STATUS HTCWaitforControlMessage(HTC_TARGET *target, HTC_PACKET **ppControlPacket); int HTCWaitforControlMessage(HTC_TARGET *target, HTC_PACKET **ppControlPacket);
HTC_PACKET *HTCAllocControlBuffer(HTC_TARGET *target, HTC_PACKET_QUEUE *pList); HTC_PACKET *HTCAllocControlBuffer(HTC_TARGET *target, HTC_PACKET_QUEUE *pList);
void HTCFreeControlBuffer(HTC_TARGET *target, HTC_PACKET *pPacket, HTC_PACKET_QUEUE *pList); void HTCFreeControlBuffer(HTC_TARGET *target, HTC_PACKET *pPacket, HTC_PACKET_QUEUE *pList);
A_STATUS HTCIssueSend(HTC_TARGET *target, HTC_PACKET *pPacket); int HTCIssueSend(HTC_TARGET *target, HTC_PACKET *pPacket);
void HTCRecvCompleteHandler(void *Context, HTC_PACKET *pPacket); void HTCRecvCompleteHandler(void *Context, HTC_PACKET *pPacket);
A_STATUS HTCRecvMessagePendingHandler(void *Context, A_UINT32 MsgLookAheads[], int NumLookAheads, A_BOOL *pAsyncProc, int *pNumPktsFetched); int HTCRecvMessagePendingHandler(void *Context, A_UINT32 MsgLookAheads[], int NumLookAheads, A_BOOL *pAsyncProc, int *pNumPktsFetched);
void HTCProcessCreditRpt(HTC_TARGET *target, HTC_CREDIT_REPORT *pRpt, int NumEntries, HTC_ENDPOINT_ID FromEndpoint); void HTCProcessCreditRpt(HTC_TARGET *target, HTC_CREDIT_REPORT *pRpt, int NumEntries, HTC_ENDPOINT_ID FromEndpoint);
A_STATUS HTCSendSetupComplete(HTC_TARGET *target); int HTCSendSetupComplete(HTC_TARGET *target);
void HTCFlushRecvBuffers(HTC_TARGET *target); void HTCFlushRecvBuffers(HTC_TARGET *target);
void HTCFlushSendPkts(HTC_TARGET *target); void HTCFlushSendPkts(HTC_TARGET *target);
......
...@@ -83,7 +83,7 @@ static void DoRecvCompletion(HTC_ENDPOINT *pEndpoint, ...@@ -83,7 +83,7 @@ static void DoRecvCompletion(HTC_ENDPOINT *pEndpoint,
} }
static INLINE A_STATUS HTCProcessTrailer(HTC_TARGET *target, static INLINE int HTCProcessTrailer(HTC_TARGET *target,
A_UINT8 *pBuffer, A_UINT8 *pBuffer,
int Length, int Length,
A_UINT32 *pNextLookAheads, A_UINT32 *pNextLookAheads,
...@@ -95,7 +95,7 @@ static INLINE A_STATUS HTCProcessTrailer(HTC_TARGET *target, ...@@ -95,7 +95,7 @@ static INLINE A_STATUS HTCProcessTrailer(HTC_TARGET *target,
HTC_LOOKAHEAD_REPORT *pLookAhead; HTC_LOOKAHEAD_REPORT *pLookAhead;
A_UINT8 *pOrigBuffer; A_UINT8 *pOrigBuffer;
int origLength; int origLength;
A_STATUS status; int status;
AR_DEBUG_PRINTF(ATH_DEBUG_RECV, ("+HTCProcessTrailer (length:%d) \n", Length)); AR_DEBUG_PRINTF(ATH_DEBUG_RECV, ("+HTCProcessTrailer (length:%d) \n", Length));
...@@ -226,14 +226,14 @@ static INLINE A_STATUS HTCProcessTrailer(HTC_TARGET *target, ...@@ -226,14 +226,14 @@ static INLINE A_STATUS HTCProcessTrailer(HTC_TARGET *target,
/* process a received message (i.e. strip off header, process any trailer data) /* process a received message (i.e. strip off header, process any trailer data)
* note : locks must be released when this function is called */ * note : locks must be released when this function is called */
static A_STATUS HTCProcessRecvHeader(HTC_TARGET *target, static int HTCProcessRecvHeader(HTC_TARGET *target,
HTC_PACKET *pPacket, HTC_PACKET *pPacket,
A_UINT32 *pNextLookAheads, A_UINT32 *pNextLookAheads,
int *pNumLookAheads) int *pNumLookAheads)
{ {
A_UINT8 temp; A_UINT8 temp;
A_UINT8 *pBuf; A_UINT8 *pBuf;
A_STATUS status = A_OK; int status = A_OK;
A_UINT16 payloadLen; A_UINT16 payloadLen;
A_UINT32 lookAhead; A_UINT32 lookAhead;
...@@ -392,7 +392,7 @@ static INLINE void HTCAsyncRecvCheckMorePackets(HTC_TARGET *target, ...@@ -392,7 +392,7 @@ static INLINE void HTCAsyncRecvCheckMorePackets(HTC_TARGET *target,
{ {
/* was there a lookahead for the next packet? */ /* was there a lookahead for the next packet? */
if (NumLookAheads > 0) { if (NumLookAheads > 0) {
A_STATUS nextStatus; int nextStatus;
int fetched = 0; int fetched = 0;
AR_DEBUG_PRINTF(ATH_DEBUG_RECV, AR_DEBUG_PRINTF(ATH_DEBUG_RECV,
("HTCAsyncRecvCheckMorePackets - num lookaheads were non-zero : %d \n", ("HTCAsyncRecvCheckMorePackets - num lookaheads were non-zero : %d \n",
...@@ -521,7 +521,7 @@ void HTCRecvCompleteHandler(void *Context, HTC_PACKET *pPacket) ...@@ -521,7 +521,7 @@ void HTCRecvCompleteHandler(void *Context, HTC_PACKET *pPacket)
HTC_ENDPOINT *pEndpoint; HTC_ENDPOINT *pEndpoint;
A_UINT32 nextLookAheads[HTC_HOST_MAX_MSG_PER_BUNDLE]; A_UINT32 nextLookAheads[HTC_HOST_MAX_MSG_PER_BUNDLE];
int numLookAheads = 0; int numLookAheads = 0;
A_STATUS status; int status;
A_BOOL checkMorePkts = TRUE; A_BOOL checkMorePkts = TRUE;
AR_DEBUG_PRINTF(ATH_DEBUG_RECV, ("+HTCRecvCompleteHandler (pkt:0x%lX, status:%d, ep:%d) \n", AR_DEBUG_PRINTF(ATH_DEBUG_RECV, ("+HTCRecvCompleteHandler (pkt:0x%lX, status:%d, ep:%d) \n",
...@@ -587,9 +587,9 @@ void HTCRecvCompleteHandler(void *Context, HTC_PACKET *pPacket) ...@@ -587,9 +587,9 @@ void HTCRecvCompleteHandler(void *Context, HTC_PACKET *pPacket)
/* synchronously wait for a control message from the target, /* synchronously wait for a control message from the target,
* This function is used at initialization time ONLY. At init messages * This function is used at initialization time ONLY. At init messages
* on ENDPOINT 0 are expected. */ * on ENDPOINT 0 are expected. */
A_STATUS HTCWaitforControlMessage(HTC_TARGET *target, HTC_PACKET **ppControlPacket) int HTCWaitforControlMessage(HTC_TARGET *target, HTC_PACKET **ppControlPacket)
{ {
A_STATUS status; int status;
A_UINT32 lookAhead; A_UINT32 lookAhead;
HTC_PACKET *pPacket = NULL; HTC_PACKET *pPacket = NULL;
HTC_FRAME_HDR *pHdr; HTC_FRAME_HDR *pHdr;
...@@ -686,13 +686,13 @@ A_STATUS HTCWaitforControlMessage(HTC_TARGET *target, HTC_PACKET **ppControlPack ...@@ -686,13 +686,13 @@ A_STATUS HTCWaitforControlMessage(HTC_TARGET *target, HTC_PACKET **ppControlPack
return status; return status;
} }
static A_STATUS AllocAndPrepareRxPackets(HTC_TARGET *target, static int AllocAndPrepareRxPackets(HTC_TARGET *target,
A_UINT32 LookAheads[], A_UINT32 LookAheads[],
int Messages, int Messages,
HTC_ENDPOINT *pEndpoint, HTC_ENDPOINT *pEndpoint,
HTC_PACKET_QUEUE *pQueue) HTC_PACKET_QUEUE *pQueue)
{ {
A_STATUS status = A_OK; int status = A_OK;
HTC_PACKET *pPacket; HTC_PACKET *pPacket;
HTC_FRAME_HDR *pHdr; HTC_FRAME_HDR *pHdr;
int i,j; int i,j;
...@@ -887,7 +887,7 @@ static void HTCAsyncRecvScatterCompletion(HIF_SCATTER_REQ *pScatterReq) ...@@ -887,7 +887,7 @@ static void HTCAsyncRecvScatterCompletion(HIF_SCATTER_REQ *pScatterReq)
A_UINT32 lookAheads[HTC_HOST_MAX_MSG_PER_BUNDLE]; A_UINT32 lookAheads[HTC_HOST_MAX_MSG_PER_BUNDLE];
int numLookAheads = 0; int numLookAheads = 0;
HTC_TARGET *target = (HTC_TARGET *)pScatterReq->Context; HTC_TARGET *target = (HTC_TARGET *)pScatterReq->Context;
A_STATUS status; int status;
A_BOOL partialBundle = FALSE; A_BOOL partialBundle = FALSE;
HTC_PACKET_QUEUE localRecvQueue; HTC_PACKET_QUEUE localRecvQueue;
A_BOOL procError = FALSE; A_BOOL procError = FALSE;
...@@ -984,13 +984,13 @@ static void HTCAsyncRecvScatterCompletion(HIF_SCATTER_REQ *pScatterReq) ...@@ -984,13 +984,13 @@ static void HTCAsyncRecvScatterCompletion(HIF_SCATTER_REQ *pScatterReq)
AR_DEBUG_PRINTF(ATH_DEBUG_RECV,("-HTCAsyncRecvScatterCompletion \n")); AR_DEBUG_PRINTF(ATH_DEBUG_RECV,("-HTCAsyncRecvScatterCompletion \n"));
} }
static A_STATUS HTCIssueRecvPacketBundle(HTC_TARGET *target, static int HTCIssueRecvPacketBundle(HTC_TARGET *target,
HTC_PACKET_QUEUE *pRecvPktQueue, HTC_PACKET_QUEUE *pRecvPktQueue,
HTC_PACKET_QUEUE *pSyncCompletionQueue, HTC_PACKET_QUEUE *pSyncCompletionQueue,
int *pNumPacketsFetched, int *pNumPacketsFetched,
A_BOOL PartialBundle) A_BOOL PartialBundle)
{ {
A_STATUS status = A_OK; int status = A_OK;
HIF_SCATTER_REQ *pScatterReq; HIF_SCATTER_REQ *pScatterReq;
int i, totalLength; int i, totalLength;
int pktsToScatter; int pktsToScatter;
...@@ -1117,10 +1117,10 @@ static INLINE void CheckRecvWaterMark(HTC_ENDPOINT *pEndpoint) ...@@ -1117,10 +1117,10 @@ static INLINE void CheckRecvWaterMark(HTC_ENDPOINT *pEndpoint)
} }
/* callback when device layer or lookahead report parsing detects a pending message */ /* callback when device layer or lookahead report parsing detects a pending message */
A_STATUS HTCRecvMessagePendingHandler(void *Context, A_UINT32 MsgLookAheads[], int NumLookAheads, A_BOOL *pAsyncProc, int *pNumPktsFetched) int HTCRecvMessagePendingHandler(void *Context, A_UINT32 MsgLookAheads[], int NumLookAheads, A_BOOL *pAsyncProc, int *pNumPktsFetched)
{ {
HTC_TARGET *target = (HTC_TARGET *)Context; HTC_TARGET *target = (HTC_TARGET *)Context;
A_STATUS status = A_OK; int status = A_OK;
HTC_PACKET *pPacket; HTC_PACKET *pPacket;
HTC_ENDPOINT *pEndpoint; HTC_ENDPOINT *pEndpoint;
A_BOOL asyncProc = FALSE; A_BOOL asyncProc = FALSE;
...@@ -1385,12 +1385,12 @@ A_STATUS HTCRecvMessagePendingHandler(void *Context, A_UINT32 MsgLookAheads[], i ...@@ -1385,12 +1385,12 @@ A_STATUS HTCRecvMessagePendingHandler(void *Context, A_UINT32 MsgLookAheads[], i
return status; return status;
} }
A_STATUS HTCAddReceivePktMultiple(HTC_HANDLE HTCHandle, HTC_PACKET_QUEUE *pPktQueue) int HTCAddReceivePktMultiple(HTC_HANDLE HTCHandle, HTC_PACKET_QUEUE *pPktQueue)
{ {
HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
HTC_ENDPOINT *pEndpoint; HTC_ENDPOINT *pEndpoint;
A_BOOL unblockRecv = FALSE; A_BOOL unblockRecv = FALSE;
A_STATUS status = A_OK; int status = A_OK;
HTC_PACKET *pFirstPacket; HTC_PACKET *pFirstPacket;
pFirstPacket = HTC_GET_PKT_AT_HEAD(pPktQueue); pFirstPacket = HTC_GET_PKT_AT_HEAD(pPktQueue);
...@@ -1455,7 +1455,7 @@ A_STATUS HTCAddReceivePktMultiple(HTC_HANDLE HTCHandle, HTC_PACKET_QUEUE *pPktQu ...@@ -1455,7 +1455,7 @@ A_STATUS HTCAddReceivePktMultiple(HTC_HANDLE HTCHandle, HTC_PACKET_QUEUE *pPktQu
} }
/* Makes a buffer available to the HTC module */ /* Makes a buffer available to the HTC module */
A_STATUS HTCAddReceivePkt(HTC_HANDLE HTCHandle, HTC_PACKET *pPacket) int HTCAddReceivePkt(HTC_HANDLE HTCHandle, HTC_PACKET *pPacket)
{ {
HTC_PACKET_QUEUE queue; HTC_PACKET_QUEUE queue;
INIT_HTC_PACKET_QUEUE_AND_ADD(&queue,pPacket); INIT_HTC_PACKET_QUEUE_AND_ADD(&queue,pPacket);
...@@ -1563,11 +1563,11 @@ int HTCGetNumRecvBuffers(HTC_HANDLE HTCHandle, ...@@ -1563,11 +1563,11 @@ int HTCGetNumRecvBuffers(HTC_HANDLE HTCHandle,
return HTC_PACKET_QUEUE_DEPTH(&(target->EndPoint[Endpoint].RxBuffers)); return HTC_PACKET_QUEUE_DEPTH(&(target->EndPoint[Endpoint].RxBuffers));
} }
A_STATUS HTCWaitForPendingRecv(HTC_HANDLE HTCHandle, int HTCWaitForPendingRecv(HTC_HANDLE HTCHandle,
A_UINT32 TimeoutInMs, A_UINT32 TimeoutInMs,
A_BOOL *pbIsRecvPending) A_BOOL *pbIsRecvPending)
{ {
A_STATUS status = A_OK; int status = A_OK;
HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
status = DevWaitForPendingRecv(&target->Device, status = DevWaitForPendingRecv(&target->Device,
......
...@@ -113,9 +113,9 @@ static void HTCSendPktCompletionHandler(void *Context, HTC_PACKET *pPacket) ...@@ -113,9 +113,9 @@ static void HTCSendPktCompletionHandler(void *Context, HTC_PACKET *pPacket)
DO_EP_TX_COMPLETION(pEndpoint,&container); DO_EP_TX_COMPLETION(pEndpoint,&container);
} }
A_STATUS HTCIssueSend(HTC_TARGET *target, HTC_PACKET *pPacket) int HTCIssueSend(HTC_TARGET *target, HTC_PACKET *pPacket)
{ {
A_STATUS status; int status;
A_BOOL sync = FALSE; A_BOOL sync = FALSE;
if (pPacket->Completion == NULL) { if (pPacket->Completion == NULL) {
...@@ -270,7 +270,7 @@ static void HTCAsyncSendScatterCompletion(HIF_SCATTER_REQ *pScatterReq) ...@@ -270,7 +270,7 @@ static void HTCAsyncSendScatterCompletion(HIF_SCATTER_REQ *pScatterReq)
HTC_PACKET *pPacket; HTC_PACKET *pPacket;
HTC_ENDPOINT *pEndpoint = (HTC_ENDPOINT *)pScatterReq->Context; HTC_ENDPOINT *pEndpoint = (HTC_ENDPOINT *)pScatterReq->Context;
HTC_TARGET *target = (HTC_TARGET *)pEndpoint->target; HTC_TARGET *target = (HTC_TARGET *)pEndpoint->target;
A_STATUS status = A_OK; int status = A_OK;
HTC_PACKET_QUEUE sendCompletes; HTC_PACKET_QUEUE sendCompletes;
INIT_HTC_PACKET_QUEUE(&sendCompletes); INIT_HTC_PACKET_QUEUE(&sendCompletes);
...@@ -668,7 +668,7 @@ static HTC_SEND_QUEUE_RESULT HTCTrySend(HTC_TARGET *target, ...@@ -668,7 +668,7 @@ static HTC_SEND_QUEUE_RESULT HTCTrySend(HTC_TARGET *target,
return HTC_SEND_QUEUE_OK; return HTC_SEND_QUEUE_OK;
} }
A_STATUS HTCSendPktsMultiple(HTC_HANDLE HTCHandle, HTC_PACKET_QUEUE *pPktQueue) int HTCSendPktsMultiple(HTC_HANDLE HTCHandle, HTC_PACKET_QUEUE *pPktQueue)
{ {
HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
HTC_ENDPOINT *pEndpoint; HTC_ENDPOINT *pEndpoint;
...@@ -709,7 +709,7 @@ A_STATUS HTCSendPktsMultiple(HTC_HANDLE HTCHandle, HTC_PACKET_QUEUE *pPktQueue) ...@@ -709,7 +709,7 @@ A_STATUS HTCSendPktsMultiple(HTC_HANDLE HTCHandle, HTC_PACKET_QUEUE *pPktQueue)
} }
/* HTC API - HTCSendPkt */ /* HTC API - HTCSendPkt */
A_STATUS HTCSendPkt(HTC_HANDLE HTCHandle, HTC_PACKET *pPacket) int HTCSendPkt(HTC_HANDLE HTCHandle, HTC_PACKET *pPacket)
{ {
HTC_PACKET_QUEUE queue; HTC_PACKET_QUEUE queue;
......
...@@ -57,10 +57,10 @@ void HTCControlRecv(void *Context, HTC_PACKET *pPacket) ...@@ -57,10 +57,10 @@ void HTCControlRecv(void *Context, HTC_PACKET *pPacket)
HTC_RECYCLE_RX_PKT((HTC_TARGET*)Context,pPacket,&((HTC_TARGET*)Context)->EndPoint[0]); HTC_RECYCLE_RX_PKT((HTC_TARGET*)Context,pPacket,&((HTC_TARGET*)Context)->EndPoint[0]);
} }
A_STATUS HTCSendSetupComplete(HTC_TARGET *target) int HTCSendSetupComplete(HTC_TARGET *target)
{ {
HTC_PACKET *pSendPacket = NULL; HTC_PACKET *pSendPacket = NULL;
A_STATUS status; int status;
do { do {
/* allocate a packet to send to the target */ /* allocate a packet to send to the target */
...@@ -121,12 +121,12 @@ A_STATUS HTCSendSetupComplete(HTC_TARGET *target) ...@@ -121,12 +121,12 @@ A_STATUS HTCSendSetupComplete(HTC_TARGET *target)
} }
A_STATUS HTCConnectService(HTC_HANDLE HTCHandle, int HTCConnectService(HTC_HANDLE HTCHandle,
HTC_SERVICE_CONNECT_REQ *pConnectReq, HTC_SERVICE_CONNECT_REQ *pConnectReq,
HTC_SERVICE_CONNECT_RESP *pConnectResp) HTC_SERVICE_CONNECT_RESP *pConnectResp)
{ {
HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
A_STATUS status = A_OK; int status = A_OK;
HTC_PACKET *pRecvPacket = NULL; HTC_PACKET *pRecvPacket = NULL;
HTC_PACKET *pSendPacket = NULL; HTC_PACKET *pSendPacket = NULL;
HTC_CONNECT_SERVICE_RESPONSE_MSG *pResponseMsg; HTC_CONNECT_SERVICE_RESPONSE_MSG *pResponseMsg;
......
...@@ -181,8 +181,8 @@ void a_register_module_debug_info(ATH_DEBUG_MODULE_DBG_INFO *pInfo); ...@@ -181,8 +181,8 @@ void a_register_module_debug_info(ATH_DEBUG_MODULE_DBG_INFO *pInfo);
#endif #endif
A_STATUS a_get_module_mask(A_CHAR *module_name, A_UINT32 *pMask); int a_get_module_mask(A_CHAR *module_name, A_UINT32 *pMask);
A_STATUS a_set_module_mask(A_CHAR *module_name, A_UINT32 Mask); int a_set_module_mask(A_CHAR *module_name, A_UINT32 Mask);
void a_dump_module_debug_info_by_name(A_CHAR *module_name); void a_dump_module_debug_info_by_name(A_CHAR *module_name);
void a_module_debug_support_init(void); void a_module_debug_support_init(void);
void a_module_debug_support_cleanup(void); void a_module_debug_support_cleanup(void);
......
...@@ -54,9 +54,9 @@ typedef struct { ...@@ -54,9 +54,9 @@ typedef struct {
A_UINT8 bdaddr[6]; /* Bluetooth device address */ A_UINT8 bdaddr[6]; /* Bluetooth device address */
} AR3K_CONFIG_INFO; } AR3K_CONFIG_INFO;
A_STATUS AR3KConfigure(AR3K_CONFIG_INFO *pConfigInfo); int AR3KConfigure(AR3K_CONFIG_INFO *pConfigInfo);
A_STATUS AR3KConfigureExit(void *config); int AR3KConfigureExit(void *config);
#ifdef __cplusplus #ifdef __cplusplus
} }
......
...@@ -25,21 +25,21 @@ ...@@ -25,21 +25,21 @@
#define AR6000_DIAG_H_ #define AR6000_DIAG_H_
A_STATUS int
ar6000_ReadRegDiag(HIF_DEVICE *hifDevice, A_UINT32 *address, A_UINT32 *data); ar6000_ReadRegDiag(HIF_DEVICE *hifDevice, A_UINT32 *address, A_UINT32 *data);
A_STATUS int
ar6000_WriteRegDiag(HIF_DEVICE *hifDevice, A_UINT32 *address, A_UINT32 *data); ar6000_WriteRegDiag(HIF_DEVICE *hifDevice, A_UINT32 *address, A_UINT32 *data);
A_STATUS int
ar6000_ReadDataDiag(HIF_DEVICE *hifDevice, A_UINT32 address, ar6000_ReadDataDiag(HIF_DEVICE *hifDevice, A_UINT32 address,
A_UCHAR *data, A_UINT32 length); A_UCHAR *data, A_UINT32 length);
A_STATUS int
ar6000_WriteDataDiag(HIF_DEVICE *hifDevice, A_UINT32 address, ar6000_WriteDataDiag(HIF_DEVICE *hifDevice, A_UINT32 address,
A_UCHAR *data, A_UINT32 length); A_UCHAR *data, A_UINT32 length);
A_STATUS int
ar6k_ReadTargetRegister(HIF_DEVICE *hifDevice, int regsel, A_UINT32 *regval); ar6k_ReadTargetRegister(HIF_DEVICE *hifDevice, int regsel, A_UINT32 *regval);
void void
......
...@@ -43,44 +43,44 @@ BMIInit(void); ...@@ -43,44 +43,44 @@ BMIInit(void);
void void
BMICleanup(void); BMICleanup(void);
A_STATUS int
BMIDone(HIF_DEVICE *device); BMIDone(HIF_DEVICE *device);
A_STATUS int
BMIGetTargetInfo(HIF_DEVICE *device, struct bmi_target_info *targ_info); BMIGetTargetInfo(HIF_DEVICE *device, struct bmi_target_info *targ_info);
A_STATUS int
BMIReadMemory(HIF_DEVICE *device, BMIReadMemory(HIF_DEVICE *device,
A_UINT32 address, A_UINT32 address,
A_UCHAR *buffer, A_UCHAR *buffer,
A_UINT32 length); A_UINT32 length);
A_STATUS int
BMIWriteMemory(HIF_DEVICE *device, BMIWriteMemory(HIF_DEVICE *device,
A_UINT32 address, A_UINT32 address,
A_UCHAR *buffer, A_UCHAR *buffer,
A_UINT32 length); A_UINT32 length);
A_STATUS int
BMIExecute(HIF_DEVICE *device, BMIExecute(HIF_DEVICE *device,
A_UINT32 address, A_UINT32 address,
A_UINT32 *param); A_UINT32 *param);
A_STATUS int
BMISetAppStart(HIF_DEVICE *device, BMISetAppStart(HIF_DEVICE *device,
A_UINT32 address); A_UINT32 address);
A_STATUS int
BMIReadSOCRegister(HIF_DEVICE *device, BMIReadSOCRegister(HIF_DEVICE *device,
A_UINT32 address, A_UINT32 address,
A_UINT32 *param); A_UINT32 *param);
A_STATUS int
BMIWriteSOCRegister(HIF_DEVICE *device, BMIWriteSOCRegister(HIF_DEVICE *device,
A_UINT32 address, A_UINT32 address,
A_UINT32 param); A_UINT32 param);
A_STATUS int
BMIrompatchInstall(HIF_DEVICE *device, BMIrompatchInstall(HIF_DEVICE *device,
A_UINT32 ROM_addr, A_UINT32 ROM_addr,
A_UINT32 RAM_addr, A_UINT32 RAM_addr,
...@@ -88,41 +88,41 @@ BMIrompatchInstall(HIF_DEVICE *device, ...@@ -88,41 +88,41 @@ BMIrompatchInstall(HIF_DEVICE *device,
A_UINT32 do_activate, A_UINT32 do_activate,
A_UINT32 *patch_id); A_UINT32 *patch_id);
A_STATUS int
BMIrompatchUninstall(HIF_DEVICE *device, BMIrompatchUninstall(HIF_DEVICE *device,
A_UINT32 rompatch_id); A_UINT32 rompatch_id);
A_STATUS int
BMIrompatchActivate(HIF_DEVICE *device, BMIrompatchActivate(HIF_DEVICE *device,
A_UINT32 rompatch_count, A_UINT32 rompatch_count,
A_UINT32 *rompatch_list); A_UINT32 *rompatch_list);
A_STATUS int
BMIrompatchDeactivate(HIF_DEVICE *device, BMIrompatchDeactivate(HIF_DEVICE *device,
A_UINT32 rompatch_count, A_UINT32 rompatch_count,
A_UINT32 *rompatch_list); A_UINT32 *rompatch_list);
A_STATUS int
BMILZStreamStart(HIF_DEVICE *device, BMILZStreamStart(HIF_DEVICE *device,
A_UINT32 address); A_UINT32 address);
A_STATUS int
BMILZData(HIF_DEVICE *device, BMILZData(HIF_DEVICE *device,
A_UCHAR *buffer, A_UCHAR *buffer,
A_UINT32 length); A_UINT32 length);
A_STATUS int
BMIFastDownload(HIF_DEVICE *device, BMIFastDownload(HIF_DEVICE *device,
A_UINT32 address, A_UINT32 address,
A_UCHAR *buffer, A_UCHAR *buffer,
A_UINT32 length); A_UINT32 length);
A_STATUS int
BMIRawWrite(HIF_DEVICE *device, BMIRawWrite(HIF_DEVICE *device,
A_UCHAR *buffer, A_UCHAR *buffer,
A_UINT32 length); A_UINT32 length);
A_STATUS int
BMIRawRead(HIF_DEVICE *device, BMIRawRead(HIF_DEVICE *device,
A_UCHAR *buffer, A_UCHAR *buffer,
A_UINT32 length, A_UINT32 length,
......
...@@ -31,44 +31,47 @@ ...@@ -31,44 +31,47 @@
/* /*
* Generic error codes that can be used by hw, sta, ap, sim, dk * Generic error codes that can be used by hw, sta, ap, sim, dk
* and any other environments. Since these are enums, feel free to * and any other environments.
* add any more codes that you need. * Feel free to add any more codes that you need.
*/ */
typedef enum { #define A_ERROR (-1) /* Generic error return */
A_ERROR = -1, /* Generic error return */ #define A_OK 0 /* success */
A_OK = 0, /* success */ #define A_DEVICE_NOT_FOUND 1 /* not able to find PCI device */
/* Following values start at 1 */ #define A_NO_MEMORY 2 /* not able to allocate memory,
A_DEVICE_NOT_FOUND, /* not able to find PCI device */ * not avail#defineable */
A_NO_MEMORY, /* not able to allocate memory, not available */ #define A_MEMORY_NOT_AVAIL 3 /* memory region is not free for
A_MEMORY_NOT_AVAIL, /* memory region is not free for mapping */ * mapping */
A_NO_FREE_DESC, /* no free descriptors available */ #define A_NO_FREE_DESC 4 /* no free descriptors available */
A_BAD_ADDRESS, /* address does not match descriptor */ #define A_BAD_ADDRESS 5 /* address does not match descriptor */
A_WIN_DRIVER_ERROR, /* used in NT_HW version, if problem at init */ #define A_WIN_DRIVER_ERROR 6 /* used in NT_HW version,
A_REGS_NOT_MAPPED, /* registers not correctly mapped */ * if problem at init */
A_EPERM, /* Not superuser */ #define A_REGS_NOT_MAPPED 7 /* registers not correctly mapped */
A_EACCES, /* Access denied */ #define A_EPERM 8 /* Not superuser */
A_ENOENT, /* No such entry, search failed, etc. */ #define A_EACCES 0 /* Access denied */
A_EEXIST, /* The object already exists (can't create) */ #define A_ENOENT 10 /* No such entry, search failed, etc. */
A_EFAULT, /* Bad address fault */ #define A_EEXIST 11 /* The object already exists
A_EBUSY, /* Object is busy */ * (can't create) */
A_EINVAL, /* Invalid parameter */ #define A_EFAULT 12 /* Bad address fault */
A_EMSGSIZE, /* Inappropriate message buffer length */ #define A_EBUSY 13 /* Object is busy */
A_ECANCELED, /* Operation canceled */ #define A_EINVAL 14 /* Invalid parameter */
A_ENOTSUP, /* Operation not supported */ #define A_EMSGSIZE 15 /* Bad message buffer length */
A_ECOMM, /* Communication error on send */ #define A_ECANCELED 16 /* Operation canceled */
A_EPROTO, /* Protocol error */ #define A_ENOTSUP 17 /* Operation not supported */
A_ENODEV, /* No such device */ #define A_ECOMM 18 /* Communication error on send */
A_EDEVNOTUP, /* device is not UP */ #define A_EPROTO 19 /* Protocol error */
A_NO_RESOURCE, /* No resources for requested operation */ #define A_ENODEV 20 /* No such device */
A_HARDWARE, /* Hardware failure */ #define A_EDEVNOTUP 21 /* device is not UP */
A_PENDING, /* Asynchronous routine; will send up results la #define A_NO_RESOURCE 22 /* No resources for
ter (typically in callback) */ * requested operation */
A_EBADCHANNEL, /* The channel cannot be used */ #define A_HARDWARE 23 /* Hardware failure */
A_DECRYPT_ERROR, /* Decryption error */ #define A_PENDING 24 /* Asynchronous routine; will send up
A_PHY_ERROR, /* RX PHY error */ * results later
A_CONSUMED /* Object was consumed */ * (typically in callback) */
} A_STATUS; #define A_EBADCHANNEL 25 /* The channel cannot be used */
#define A_DECRYPT_ERROR 26 /* Decryption error */
#define A_PHY_ERROR 27 /* RX PHY error */
#define A_CONSUMED 28 /* Object was consumed */
#define A_SUCCESS(x) (x == A_OK) #define A_SUCCESS(x) (x == A_OK)
#define A_FAILED(x) (!A_SUCCESS(x)) #define A_FAILED(x) (!A_SUCCESS(x))
......
...@@ -64,28 +64,28 @@ extern "C" { ...@@ -64,28 +64,28 @@ extern "C" {
#endif #endif
/* OS-independent APIs */ /* OS-independent APIs */
A_STATUS ar6000_setup_credit_dist(HTC_HANDLE HTCHandle, COMMON_CREDIT_STATE_INFO *pCredInfo); int ar6000_setup_credit_dist(HTC_HANDLE HTCHandle, COMMON_CREDIT_STATE_INFO *pCredInfo);
A_STATUS ar6000_ReadRegDiag(HIF_DEVICE *hifDevice, A_UINT32 *address, A_UINT32 *data); int ar6000_ReadRegDiag(HIF_DEVICE *hifDevice, A_UINT32 *address, A_UINT32 *data);
A_STATUS ar6000_WriteRegDiag(HIF_DEVICE *hifDevice, A_UINT32 *address, A_UINT32 *data); int ar6000_WriteRegDiag(HIF_DEVICE *hifDevice, A_UINT32 *address, A_UINT32 *data);
A_STATUS ar6000_ReadDataDiag(HIF_DEVICE *hifDevice, A_UINT32 address, A_UCHAR *data, A_UINT32 length); int ar6000_ReadDataDiag(HIF_DEVICE *hifDevice, A_UINT32 address, A_UCHAR *data, A_UINT32 length);
A_STATUS ar6000_reset_device(HIF_DEVICE *hifDevice, A_UINT32 TargetType, A_BOOL waitForCompletion, A_BOOL coldReset); int ar6000_reset_device(HIF_DEVICE *hifDevice, A_UINT32 TargetType, A_BOOL waitForCompletion, A_BOOL coldReset);
void ar6000_dump_target_assert_info(HIF_DEVICE *hifDevice, A_UINT32 TargetType); void ar6000_dump_target_assert_info(HIF_DEVICE *hifDevice, A_UINT32 TargetType);
A_STATUS ar6000_set_htc_params(HIF_DEVICE *hifDevice, int ar6000_set_htc_params(HIF_DEVICE *hifDevice,
A_UINT32 TargetType, A_UINT32 TargetType,
A_UINT32 MboxIsrYieldValue, A_UINT32 MboxIsrYieldValue,
A_UINT8 HtcControlBuffers); A_UINT8 HtcControlBuffers);
A_STATUS ar6000_prepare_target(HIF_DEVICE *hifDevice, int ar6000_prepare_target(HIF_DEVICE *hifDevice,
A_UINT32 TargetType, A_UINT32 TargetType,
A_UINT32 TargetVersion); A_UINT32 TargetVersion);
A_STATUS ar6000_set_hci_bridge_flags(HIF_DEVICE *hifDevice, int ar6000_set_hci_bridge_flags(HIF_DEVICE *hifDevice,
A_UINT32 TargetType, A_UINT32 TargetType,
A_UINT32 Flags); A_UINT32 Flags);
...@@ -93,13 +93,13 @@ void ar6000_copy_cust_data_from_target(HIF_DEVICE *hifDevice, A_UINT32 TargetTyp ...@@ -93,13 +93,13 @@ void ar6000_copy_cust_data_from_target(HIF_DEVICE *hifDevice, A_UINT32 TargetTyp
A_UINT8 *ar6000_get_cust_data_buffer(A_UINT32 TargetType); A_UINT8 *ar6000_get_cust_data_buffer(A_UINT32 TargetType);
A_STATUS ar6000_setBTState(void *context, A_UINT8 *pInBuf, A_UINT32 InBufSize); int ar6000_setBTState(void *context, A_UINT8 *pInBuf, A_UINT32 InBufSize);
A_STATUS ar6000_setDevicePowerState(void *context, A_UINT8 *pInBuf, A_UINT32 InBufSize); int ar6000_setDevicePowerState(void *context, A_UINT8 *pInBuf, A_UINT32 InBufSize);
A_STATUS ar6000_setWowMode(void *context, A_UINT8 *pInBuf, A_UINT32 InBufSize); int ar6000_setWowMode(void *context, A_UINT8 *pInBuf, A_UINT32 InBufSize);
A_STATUS ar6000_setHostMode(void *context, A_UINT8 *pInBuf, A_UINT32 InBufSize); int ar6000_setHostMode(void *context, A_UINT8 *pInBuf, A_UINT32 InBufSize);
#ifdef __cplusplus #ifdef __cplusplus
} }
......
...@@ -39,7 +39,7 @@ extern "C" { ...@@ -39,7 +39,7 @@ extern "C" {
#endif #endif
/* Called to send a DataSet Open Reply back to the Target. */ /* Called to send a DataSet Open Reply back to the Target. */
A_STATUS wmi_dset_open_reply(struct wmi_t *wmip, int wmi_dset_open_reply(struct wmi_t *wmip,
A_UINT32 status, A_UINT32 status,
A_UINT32 access_cookie, A_UINT32 access_cookie,
A_UINT32 size, A_UINT32 size,
...@@ -49,7 +49,7 @@ A_STATUS wmi_dset_open_reply(struct wmi_t *wmip, ...@@ -49,7 +49,7 @@ A_STATUS wmi_dset_open_reply(struct wmi_t *wmip,
A_UINT32 targ_reply_arg); A_UINT32 targ_reply_arg);
/* Called to send a DataSet Data Reply back to the Target. */ /* Called to send a DataSet Data Reply back to the Target. */
A_STATUS wmi_dset_data_reply(struct wmi_t *wmip, int wmi_dset_data_reply(struct wmi_t *wmip,
A_UINT32 status, A_UINT32 status,
A_UINT8 *host_buf, A_UINT8 *host_buf,
A_UINT32 length, A_UINT32 length,
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
/* /*
* Send a command to the Target in order to change output on GPIO pins. * Send a command to the Target in order to change output on GPIO pins.
*/ */
A_STATUS wmi_gpio_output_set(struct wmi_t *wmip, int wmi_gpio_output_set(struct wmi_t *wmip,
A_UINT32 set_mask, A_UINT32 set_mask,
A_UINT32 clear_mask, A_UINT32 clear_mask,
A_UINT32 enable_mask, A_UINT32 enable_mask,
...@@ -37,23 +37,23 @@ A_STATUS wmi_gpio_output_set(struct wmi_t *wmip, ...@@ -37,23 +37,23 @@ A_STATUS wmi_gpio_output_set(struct wmi_t *wmip,
/* /*
* Send a command to the Target requesting input state of GPIO pins. * Send a command to the Target requesting input state of GPIO pins.
*/ */
A_STATUS wmi_gpio_input_get(struct wmi_t *wmip); int wmi_gpio_input_get(struct wmi_t *wmip);
/* /*
* Send a command to the Target to change the value of a GPIO register. * Send a command to the Target to change the value of a GPIO register.
*/ */
A_STATUS wmi_gpio_register_set(struct wmi_t *wmip, int wmi_gpio_register_set(struct wmi_t *wmip,
A_UINT32 gpioreg_id, A_UINT32 gpioreg_id,
A_UINT32 value); A_UINT32 value);
/* /*
* Send a command to the Target to fetch the value of a GPIO register. * Send a command to the Target to fetch the value of a GPIO register.
*/ */
A_STATUS wmi_gpio_register_get(struct wmi_t *wmip, A_UINT32 gpioreg_id); int wmi_gpio_register_get(struct wmi_t *wmip, A_UINT32 gpioreg_id);
/* /*
* Send a command to the Target, acknowledging some GPIO interrupts. * Send a command to the Target, acknowledging some GPIO interrupts.
*/ */
A_STATUS wmi_gpio_intr_ack(struct wmi_t *wmip, A_UINT32 ack_mask); int wmi_gpio_intr_ack(struct wmi_t *wmip, A_UINT32 ack_mask);
#endif /* _GPIO_API_H_ */ #endif /* _GPIO_API_H_ */
...@@ -90,8 +90,8 @@ typedef struct _HCI_TRANSPORT_CONFIG_INFO { ...@@ -90,8 +90,8 @@ typedef struct _HCI_TRANSPORT_CONFIG_INFO {
int EventRecvBufferWaterMark; /* low watermark to trigger recv refill */ int EventRecvBufferWaterMark; /* low watermark to trigger recv refill */
int MaxSendQueueDepth; /* max number of packets in the single send queue */ int MaxSendQueueDepth; /* max number of packets in the single send queue */
void *pContext; /* context for all callbacks */ void *pContext; /* context for all callbacks */
void (*TransportFailure)(void *pContext, A_STATUS Status); /* transport failure callback */ void (*TransportFailure)(void *pContext, int Status); /* transport failure callback */
A_STATUS (*TransportReady)(HCI_TRANSPORT_HANDLE, HCI_TRANSPORT_PROPERTIES *,void *pContext); /* transport is ready */ int (*TransportReady)(HCI_TRANSPORT_HANDLE, HCI_TRANSPORT_PROPERTIES *,void *pContext); /* transport is ready */
void (*TransportRemoved)(void *pContext); /* transport was removed */ void (*TransportRemoved)(void *pContext); /* transport was removed */
/* packet processing callbacks */ /* packet processing callbacks */
HCI_TRANSPORT_SEND_PKT_COMPLETE pHCISendComplete; HCI_TRANSPORT_SEND_PKT_COMPLETE pHCISendComplete;
...@@ -141,7 +141,7 @@ void HCI_TransportDetach(HCI_TRANSPORT_HANDLE HciTrans); ...@@ -141,7 +141,7 @@ void HCI_TransportDetach(HCI_TRANSPORT_HANDLE HciTrans);
@example: @example:
@see also: @see also:
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
A_STATUS HCI_TransportAddReceivePkts(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET_QUEUE *pQueue); int HCI_TransportAddReceivePkts(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET_QUEUE *pQueue);
/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@desc: Send an HCI packet packet @desc: Send an HCI packet packet
...@@ -166,7 +166,7 @@ A_STATUS HCI_TransportAddReceivePkts(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKE ...@@ -166,7 +166,7 @@ A_STATUS HCI_TransportAddReceivePkts(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKE
@example: @example:
@see also: @see also:
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
A_STATUS HCI_TransportSendPkt(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET *pPacket, A_BOOL Synchronous); int HCI_TransportSendPkt(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET *pPacket, A_BOOL Synchronous);
/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
...@@ -193,7 +193,7 @@ void HCI_TransportStop(HCI_TRANSPORT_HANDLE HciTrans); ...@@ -193,7 +193,7 @@ void HCI_TransportStop(HCI_TRANSPORT_HANDLE HciTrans);
@example: @example:
@see also: @see also:
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
A_STATUS HCI_TransportStart(HCI_TRANSPORT_HANDLE HciTrans); int HCI_TransportStart(HCI_TRANSPORT_HANDLE HciTrans);
/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@desc: Enable or Disable Asynchronous Recv @desc: Enable or Disable Asynchronous Recv
...@@ -206,7 +206,7 @@ A_STATUS HCI_TransportStart(HCI_TRANSPORT_HANDLE HciTrans); ...@@ -206,7 +206,7 @@ A_STATUS HCI_TransportStart(HCI_TRANSPORT_HANDLE HciTrans);
@example: @example:
@see also: @see also:
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
A_STATUS HCI_TransportEnableDisableAsyncRecv(HCI_TRANSPORT_HANDLE HciTrans, A_BOOL Enable); int HCI_TransportEnableDisableAsyncRecv(HCI_TRANSPORT_HANDLE HciTrans, A_BOOL Enable);
/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@desc: Receive an event packet from the HCI transport synchronously using polling @desc: Receive an event packet from the HCI transport synchronously using polling
...@@ -222,7 +222,7 @@ A_STATUS HCI_TransportEnableDisableAsyncRecv(HCI_TRANSPORT_HANDLE HciTrans, A ...@@ -222,7 +222,7 @@ A_STATUS HCI_TransportEnableDisableAsyncRecv(HCI_TRANSPORT_HANDLE HciTrans, A
@example: @example:
@see also: HCI_TransportEnableDisableAsyncRecv @see also: HCI_TransportEnableDisableAsyncRecv
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
A_STATUS HCI_TransportRecvHCIEventSync(HCI_TRANSPORT_HANDLE HciTrans, int HCI_TransportRecvHCIEventSync(HCI_TRANSPORT_HANDLE HciTrans,
HTC_PACKET *pPacket, HTC_PACKET *pPacket,
int MaxPollMS); int MaxPollMS);
...@@ -237,7 +237,7 @@ A_STATUS HCI_TransportRecvHCIEventSync(HCI_TRANSPORT_HANDLE HciTrans, ...@@ -237,7 +237,7 @@ A_STATUS HCI_TransportRecvHCIEventSync(HCI_TRANSPORT_HANDLE HciTrans,
@example: @example:
@see also: @see also:
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
A_STATUS HCI_TransportSetBaudRate(HCI_TRANSPORT_HANDLE HciTrans, A_UINT32 Baud); int HCI_TransportSetBaudRate(HCI_TRANSPORT_HANDLE HciTrans, A_UINT32 Baud);
/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@desc: Enable/Disable HCI Transport Power Management @desc: Enable/Disable HCI Transport Power Management
...@@ -250,7 +250,7 @@ A_STATUS HCI_TransportSetBaudRate(HCI_TRANSPORT_HANDLE HciTrans, A_UINT32 Bau ...@@ -250,7 +250,7 @@ A_STATUS HCI_TransportSetBaudRate(HCI_TRANSPORT_HANDLE HciTrans, A_UINT32 Bau
@example: @example:
@see also: @see also:
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
A_STATUS HCI_TransportEnablePowerMgmt(HCI_TRANSPORT_HANDLE HciTrans, A_BOOL Enable); int HCI_TransportEnablePowerMgmt(HCI_TRANSPORT_HANDLE HciTrans, A_BOOL Enable);
#ifdef __cplusplus #ifdef __cplusplus
} }
......
...@@ -293,7 +293,7 @@ typedef struct _HIF_SCATTER_REQ { ...@@ -293,7 +293,7 @@ typedef struct _HIF_SCATTER_REQ {
A_UINT32 TotalLength; /* total length of entire transfer */ A_UINT32 TotalLength; /* total length of entire transfer */
A_UINT32 CallerFlags; /* caller specific flags can be stored here */ A_UINT32 CallerFlags; /* caller specific flags can be stored here */
HIF_SCATTER_COMP_CB CompletionRoutine; /* completion routine set by caller */ HIF_SCATTER_COMP_CB CompletionRoutine; /* completion routine set by caller */
A_STATUS CompletionStatus; /* status of completion */ int CompletionStatus; /* status of completion */
void *Context; /* caller context for this request */ void *Context; /* caller context for this request */
int ValidScatterEntries; /* number of valid entries set by caller */ int ValidScatterEntries; /* number of valid entries set by caller */
HIF_SCATTER_METHOD ScatterMethod; /* scatter method handled by HIF */ HIF_SCATTER_METHOD ScatterMethod; /* scatter method handled by HIF */
...@@ -304,7 +304,7 @@ typedef struct _HIF_SCATTER_REQ { ...@@ -304,7 +304,7 @@ typedef struct _HIF_SCATTER_REQ {
typedef HIF_SCATTER_REQ * ( *HIF_ALLOCATE_SCATTER_REQUEST)(HIF_DEVICE *device); typedef HIF_SCATTER_REQ * ( *HIF_ALLOCATE_SCATTER_REQUEST)(HIF_DEVICE *device);
typedef void ( *HIF_FREE_SCATTER_REQUEST)(HIF_DEVICE *device, HIF_SCATTER_REQ *request); typedef void ( *HIF_FREE_SCATTER_REQUEST)(HIF_DEVICE *device, HIF_SCATTER_REQ *request);
typedef A_STATUS ( *HIF_READWRITE_SCATTER)(HIF_DEVICE *device, HIF_SCATTER_REQ *request); typedef int ( *HIF_READWRITE_SCATTER)(HIF_DEVICE *device, HIF_SCATTER_REQ *request);
typedef struct _HIF_DEVICE_SCATTER_SUPPORT_INFO { typedef struct _HIF_DEVICE_SCATTER_SUPPORT_INFO {
/* information returned from HIF layer */ /* information returned from HIF layer */
...@@ -324,19 +324,19 @@ typedef struct { ...@@ -324,19 +324,19 @@ typedef struct {
struct htc_callbacks { struct htc_callbacks {
void *context; /* context to pass to the dsrhandler void *context; /* context to pass to the dsrhandler
note : rwCompletionHandler is provided the context passed to HIFReadWrite */ note : rwCompletionHandler is provided the context passed to HIFReadWrite */
A_STATUS (* rwCompletionHandler)(void *rwContext, A_STATUS status); int (* rwCompletionHandler)(void *rwContext, int status);
A_STATUS (* dsrHandler)(void *context); int (* dsrHandler)(void *context);
}; };
typedef struct osdrv_callbacks { typedef struct osdrv_callbacks {
void *context; /* context to pass for all callbacks except deviceRemovedHandler void *context; /* context to pass for all callbacks except deviceRemovedHandler
the deviceRemovedHandler is only called if the device is claimed */ the deviceRemovedHandler is only called if the device is claimed */
A_STATUS (* deviceInsertedHandler)(void *context, void *hif_handle); int (* deviceInsertedHandler)(void *context, void *hif_handle);
A_STATUS (* deviceRemovedHandler)(void *claimedContext, void *hif_handle); int (* deviceRemovedHandler)(void *claimedContext, void *hif_handle);
A_STATUS (* deviceSuspendHandler)(void *context); int (* deviceSuspendHandler)(void *context);
A_STATUS (* deviceResumeHandler)(void *context); int (* deviceResumeHandler)(void *context);
A_STATUS (* deviceWakeupHandler)(void *context); int (* deviceWakeupHandler)(void *context);
A_STATUS (* devicePowerChangeHandler)(void *context, HIF_DEVICE_POWER_CHANGE_TYPE config); int (* devicePowerChangeHandler)(void *context, HIF_DEVICE_POWER_CHANGE_TYPE config);
} OSDRV_CALLBACKS; } OSDRV_CALLBACKS;
#define HIF_OTHER_EVENTS (1 << 0) /* other interrupts (non-Recv) are pending, host #define HIF_OTHER_EVENTS (1 << 0) /* other interrupts (non-Recv) are pending, host
...@@ -355,14 +355,14 @@ typedef struct _HIF_PENDING_EVENTS_INFO { ...@@ -355,14 +355,14 @@ typedef struct _HIF_PENDING_EVENTS_INFO {
/* function to get pending events , some HIF modules use special mechanisms /* function to get pending events , some HIF modules use special mechanisms
* to detect packet available and other interrupts */ * to detect packet available and other interrupts */
typedef A_STATUS ( *HIF_PENDING_EVENTS_FUNC)(HIF_DEVICE *device, typedef int ( *HIF_PENDING_EVENTS_FUNC)(HIF_DEVICE *device,
HIF_PENDING_EVENTS_INFO *pEvents, HIF_PENDING_EVENTS_INFO *pEvents,
void *AsyncContext); void *AsyncContext);
#define HIF_MASK_RECV TRUE #define HIF_MASK_RECV TRUE
#define HIF_UNMASK_RECV FALSE #define HIF_UNMASK_RECV FALSE
/* function to mask recv events */ /* function to mask recv events */
typedef A_STATUS ( *HIF_MASK_UNMASK_RECV_EVENT)(HIF_DEVICE *device, typedef int ( *HIF_MASK_UNMASK_RECV_EVENT)(HIF_DEVICE *device,
A_BOOL Mask, A_BOOL Mask,
void *AsyncContext); void *AsyncContext);
...@@ -372,7 +372,7 @@ typedef A_STATUS ( *HIF_MASK_UNMASK_RECV_EVENT)(HIF_DEVICE *device, ...@@ -372,7 +372,7 @@ typedef A_STATUS ( *HIF_MASK_UNMASK_RECV_EVENT)(HIF_DEVICE *device,
* and to set OS driver callbacks (i.e. insertion/removal) to the HIF layer * and to set OS driver callbacks (i.e. insertion/removal) to the HIF layer
* *
*/ */
A_STATUS HIFInit(OSDRV_CALLBACKS *callbacks); int HIFInit(OSDRV_CALLBACKS *callbacks);
/* This API claims the HIF device and provides a context for handling removal. /* This API claims the HIF device and provides a context for handling removal.
* The device removal callback is only called when the OSDRV layer claims * The device removal callback is only called when the OSDRV layer claims
...@@ -382,7 +382,7 @@ void HIFClaimDevice(HIF_DEVICE *device, void *claimedContext); ...@@ -382,7 +382,7 @@ void HIFClaimDevice(HIF_DEVICE *device, void *claimedContext);
void HIFReleaseDevice(HIF_DEVICE *device); void HIFReleaseDevice(HIF_DEVICE *device);
/* This API allows the HTC layer to attach to the HIF device */ /* This API allows the HTC layer to attach to the HIF device */
A_STATUS HIFAttachHTC(HIF_DEVICE *device, HTC_CALLBACKS *callbacks); int HIFAttachHTC(HIF_DEVICE *device, HTC_CALLBACKS *callbacks);
/* This API detaches the HTC layer from the HIF device */ /* This API detaches the HTC layer from the HIF device */
void HIFDetachHTC(HIF_DEVICE *device); void HIFDetachHTC(HIF_DEVICE *device);
...@@ -398,7 +398,7 @@ void HIFDetachHTC(HIF_DEVICE *device); ...@@ -398,7 +398,7 @@ void HIFDetachHTC(HIF_DEVICE *device);
* length - Amount of data to be transmitted or received. * length - Amount of data to be transmitted or received.
* request - Characterizes the attributes of the command. * request - Characterizes the attributes of the command.
*/ */
A_STATUS int
HIFReadWrite(HIF_DEVICE *device, HIFReadWrite(HIF_DEVICE *device,
A_UINT32 address, A_UINT32 address,
A_UCHAR *buffer, A_UCHAR *buffer,
...@@ -441,7 +441,7 @@ int HIFIRQEventNotify(void); ...@@ -441,7 +441,7 @@ int HIFIRQEventNotify(void);
int HIFRWCompleteEventNotify(void); int HIFRWCompleteEventNotify(void);
#endif #endif
A_STATUS int
HIFConfigureDevice(HIF_DEVICE *device, HIF_DEVICE_CONFIG_OPCODE opcode, HIFConfigureDevice(HIF_DEVICE *device, HIF_DEVICE_CONFIG_OPCODE opcode,
void *config, A_UINT32 configLen); void *config, A_UINT32 configLen);
...@@ -449,7 +449,7 @@ HIFConfigureDevice(HIF_DEVICE *device, HIF_DEVICE_CONFIG_OPCODE opcode, ...@@ -449,7 +449,7 @@ HIFConfigureDevice(HIF_DEVICE *device, HIF_DEVICE_CONFIG_OPCODE opcode,
* This API wait for the remaining MBOX messages to be drained * This API wait for the remaining MBOX messages to be drained
* This should be moved to HTC AR6K layer * This should be moved to HTC AR6K layer
*/ */
A_STATUS hifWaitForPendingRecv(HIF_DEVICE *device); int hifWaitForPendingRecv(HIF_DEVICE *device);
#ifdef __cplusplus #ifdef __cplusplus
} }
......
...@@ -45,7 +45,7 @@ typedef A_UINT16 HTC_SERVICE_ID; ...@@ -45,7 +45,7 @@ typedef A_UINT16 HTC_SERVICE_ID;
typedef struct _HTC_INIT_INFO { typedef struct _HTC_INIT_INFO {
void *pContext; /* context for target failure notification */ void *pContext; /* context for target failure notification */
void (*TargetFailure)(void *Instance, A_STATUS Status); void (*TargetFailure)(void *Instance, int Status);
} HTC_INIT_INFO; } HTC_INIT_INFO;
/* per service connection send completion */ /* per service connection send completion */
...@@ -319,7 +319,7 @@ void HTCSetCreditDistribution(HTC_HANDLE HTCHandle, ...@@ -319,7 +319,7 @@ void HTCSetCreditDistribution(HTC_HANDLE HTCHandle,
@example: @example:
@see also: HTCConnectService @see also: HTCConnectService
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
A_STATUS HTCWaitTarget(HTC_HANDLE HTCHandle); int HTCWaitTarget(HTC_HANDLE HTCHandle);
/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@desc: Start target service communications @desc: Start target service communications
@function name: HTCStart @function name: HTCStart
...@@ -334,7 +334,7 @@ A_STATUS HTCWaitTarget(HTC_HANDLE HTCHandle); ...@@ -334,7 +334,7 @@ A_STATUS HTCWaitTarget(HTC_HANDLE HTCHandle);
@example: @example:
@see also: HTCConnectService @see also: HTCConnectService
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
A_STATUS HTCStart(HTC_HANDLE HTCHandle); int HTCStart(HTC_HANDLE HTCHandle);
/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@desc: Add receive packet to HTC @desc: Add receive packet to HTC
@function name: HTCAddReceivePkt @function name: HTCAddReceivePkt
...@@ -348,7 +348,7 @@ A_STATUS HTCStart(HTC_HANDLE HTCHandle); ...@@ -348,7 +348,7 @@ A_STATUS HTCStart(HTC_HANDLE HTCHandle);
@example: @example:
@see also: @see also:
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
A_STATUS HTCAddReceivePkt(HTC_HANDLE HTCHandle, HTC_PACKET *pPacket); int HTCAddReceivePkt(HTC_HANDLE HTCHandle, HTC_PACKET *pPacket);
/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@desc: Connect to an HTC service @desc: Connect to an HTC service
@function name: HTCConnectService @function name: HTCConnectService
...@@ -361,7 +361,7 @@ A_STATUS HTCAddReceivePkt(HTC_HANDLE HTCHandle, HTC_PACKET *pPacket); ...@@ -361,7 +361,7 @@ A_STATUS HTCAddReceivePkt(HTC_HANDLE HTCHandle, HTC_PACKET *pPacket);
@example: @example:
@see also: HTCStart @see also: HTCStart
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
A_STATUS HTCConnectService(HTC_HANDLE HTCHandle, int HTCConnectService(HTC_HANDLE HTCHandle,
HTC_SERVICE_CONNECT_REQ *pReq, HTC_SERVICE_CONNECT_REQ *pReq,
HTC_SERVICE_CONNECT_RESP *pResp); HTC_SERVICE_CONNECT_RESP *pResp);
/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
...@@ -377,7 +377,7 @@ A_STATUS HTCConnectService(HTC_HANDLE HTCHandle, ...@@ -377,7 +377,7 @@ A_STATUS HTCConnectService(HTC_HANDLE HTCHandle,
@example: @example:
@see also: HTCFlushEndpoint @see also: HTCFlushEndpoint
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
A_STATUS HTCSendPkt(HTC_HANDLE HTCHandle, HTC_PACKET *pPacket); int HTCSendPkt(HTC_HANDLE HTCHandle, HTC_PACKET *pPacket);
/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@desc: Stop HTC service communications @desc: Stop HTC service communications
@function name: HTCStop @function name: HTCStop
...@@ -511,7 +511,7 @@ void HTCUnblockRecv(HTC_HANDLE HTCHandle); ...@@ -511,7 +511,7 @@ void HTCUnblockRecv(HTC_HANDLE HTCHandle);
@example: @example:
@see also: HTCFlushEndpoint @see also: HTCFlushEndpoint
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
A_STATUS HTCSendPktsMultiple(HTC_HANDLE HTCHandle, HTC_PACKET_QUEUE *pPktQueue); int HTCSendPktsMultiple(HTC_HANDLE HTCHandle, HTC_PACKET_QUEUE *pPktQueue);
/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@desc: Add multiple receive packets to HTC @desc: Add multiple receive packets to HTC
...@@ -530,7 +530,7 @@ A_STATUS HTCSendPktsMultiple(HTC_HANDLE HTCHandle, HTC_PACKET_QUEUE *pPktQueu ...@@ -530,7 +530,7 @@ A_STATUS HTCSendPktsMultiple(HTC_HANDLE HTCHandle, HTC_PACKET_QUEUE *pPktQueu
@example: @example:
@see also: @see also:
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
A_STATUS HTCAddReceivePktMultiple(HTC_HANDLE HTCHandle, HTC_PACKET_QUEUE *pPktQueue); int HTCAddReceivePktMultiple(HTC_HANDLE HTCHandle, HTC_PACKET_QUEUE *pPktQueue);
/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@desc: Check if an endpoint is marked active @desc: Check if an endpoint is marked active
...@@ -564,7 +564,7 @@ int HTCGetNumRecvBuffers(HTC_HANDLE HTCHandle, ...@@ -564,7 +564,7 @@ int HTCGetNumRecvBuffers(HTC_HANDLE HTCHandle,
/* internally used functions for testing... */ /* internally used functions for testing... */
void HTCEnableRecv(HTC_HANDLE HTCHandle); void HTCEnableRecv(HTC_HANDLE HTCHandle);
void HTCDisableRecv(HTC_HANDLE HTCHandle); void HTCDisableRecv(HTC_HANDLE HTCHandle);
A_STATUS HTCWaitForPendingRecv(HTC_HANDLE HTCHandle, int HTCWaitForPendingRecv(HTC_HANDLE HTCHandle,
A_UINT32 TimeoutInMs, A_UINT32 TimeoutInMs,
A_BOOL *pbIsRecvPending); A_BOOL *pbIsRecvPending);
......
...@@ -89,7 +89,7 @@ typedef struct _HTC_PACKET { ...@@ -89,7 +89,7 @@ typedef struct _HTC_PACKET {
A_UINT32 BufferLength; /* length of buffer */ A_UINT32 BufferLength; /* length of buffer */
A_UINT32 ActualLength; /* actual length of payload */ A_UINT32 ActualLength; /* actual length of payload */
HTC_ENDPOINT_ID Endpoint; /* endpoint that this packet was sent/recv'd from */ HTC_ENDPOINT_ID Endpoint; /* endpoint that this packet was sent/recv'd from */
A_STATUS Status; /* completion status */ int Status; /* completion status */
union { union {
HTC_TX_PACKET_INFO AsTx; /* Tx Packet specific info */ HTC_TX_PACKET_INFO AsTx; /* Tx Packet specific info */
HTC_RX_PACKET_INFO AsRx; /* Rx Packet specific info */ HTC_RX_PACKET_INFO AsRx; /* Rx Packet specific info */
......
...@@ -96,7 +96,7 @@ void wlan_node_table_init(void *wmip, struct ieee80211_node_table *nt); ...@@ -96,7 +96,7 @@ void wlan_node_table_init(void *wmip, struct ieee80211_node_table *nt);
void wlan_node_table_reset(struct ieee80211_node_table *nt); void wlan_node_table_reset(struct ieee80211_node_table *nt);
void wlan_node_table_cleanup(struct ieee80211_node_table *nt); void wlan_node_table_cleanup(struct ieee80211_node_table *nt);
A_STATUS wlan_parse_beacon(A_UINT8 *buf, int framelen, int wlan_parse_beacon(A_UINT8 *buf, int framelen,
struct ieee80211_common_ie *cie); struct ieee80211_common_ie *cie);
A_UINT16 wlan_ieee2freq(int chan); A_UINT16 wlan_ieee2freq(int chan);
......
This diff is collapsed.
...@@ -47,14 +47,14 @@ ...@@ -47,14 +47,14 @@
#define HCI_MAX_EVT_RECV_LENGTH 257 #define HCI_MAX_EVT_RECV_LENGTH 257
#define EXIT_MIN_BOOT_COMMAND_STATUS_OFFSET 5 #define EXIT_MIN_BOOT_COMMAND_STATUS_OFFSET 5
A_STATUS AthPSInitialize(AR3K_CONFIG_INFO *hdev); int AthPSInitialize(AR3K_CONFIG_INFO *hdev);
static A_STATUS SendHCICommand(AR3K_CONFIG_INFO *pConfig, static int SendHCICommand(AR3K_CONFIG_INFO *pConfig,
A_UINT8 *pBuffer, A_UINT8 *pBuffer,
int Length) int Length)
{ {
HTC_PACKET *pPacket = NULL; HTC_PACKET *pPacket = NULL;
A_STATUS status = A_OK; int status = A_OK;
do { do {
...@@ -84,11 +84,11 @@ static A_STATUS SendHCICommand(AR3K_CONFIG_INFO *pConfig, ...@@ -84,11 +84,11 @@ static A_STATUS SendHCICommand(AR3K_CONFIG_INFO *pConfig,
return status; return status;
} }
static A_STATUS RecvHCIEvent(AR3K_CONFIG_INFO *pConfig, static int RecvHCIEvent(AR3K_CONFIG_INFO *pConfig,
A_UINT8 *pBuffer, A_UINT8 *pBuffer,
int *pLength) int *pLength)
{ {
A_STATUS status = A_OK; int status = A_OK;
HTC_PACKET *pRecvPacket = NULL; HTC_PACKET *pRecvPacket = NULL;
do { do {
...@@ -122,13 +122,13 @@ static A_STATUS RecvHCIEvent(AR3K_CONFIG_INFO *pConfig, ...@@ -122,13 +122,13 @@ static A_STATUS RecvHCIEvent(AR3K_CONFIG_INFO *pConfig,
return status; return status;
} }
A_STATUS SendHCICommandWaitCommandComplete(AR3K_CONFIG_INFO *pConfig, int SendHCICommandWaitCommandComplete(AR3K_CONFIG_INFO *pConfig,
A_UINT8 *pHCICommand, A_UINT8 *pHCICommand,
int CmdLength, int CmdLength,
A_UINT8 **ppEventBuffer, A_UINT8 **ppEventBuffer,
A_UINT8 **ppBufferToFree) A_UINT8 **ppBufferToFree)
{ {
A_STATUS status = A_OK; int status = A_OK;
A_UINT8 *pBuffer = NULL; A_UINT8 *pBuffer = NULL;
A_UINT8 *pTemp; A_UINT8 *pTemp;
int length; int length;
...@@ -209,9 +209,9 @@ A_STATUS SendHCICommandWaitCommandComplete(AR3K_CONFIG_INFO *pConfig, ...@@ -209,9 +209,9 @@ A_STATUS SendHCICommandWaitCommandComplete(AR3K_CONFIG_INFO *pConfig,
return status; return status;
} }
static A_STATUS AR3KConfigureHCIBaud(AR3K_CONFIG_INFO *pConfig) static int AR3KConfigureHCIBaud(AR3K_CONFIG_INFO *pConfig)
{ {
A_STATUS status = A_OK; int status = A_OK;
A_UINT8 hciBaudChangeCommand[] = {0x0c,0xfc,0x2,0,0}; A_UINT8 hciBaudChangeCommand[] = {0x0c,0xfc,0x2,0,0};
A_UINT16 baudVal; A_UINT16 baudVal;
A_UINT8 *pEvent = NULL; A_UINT8 *pEvent = NULL;
...@@ -274,9 +274,9 @@ static A_STATUS AR3KConfigureHCIBaud(AR3K_CONFIG_INFO *pConfig) ...@@ -274,9 +274,9 @@ static A_STATUS AR3KConfigureHCIBaud(AR3K_CONFIG_INFO *pConfig)
return status; return status;
} }
static A_STATUS AR3KExitMinBoot(AR3K_CONFIG_INFO *pConfig) static int AR3KExitMinBoot(AR3K_CONFIG_INFO *pConfig)
{ {
A_STATUS status; int status;
A_CHAR exitMinBootCmd[] = {0x25,0xFC,0x0c,0x03,0x00,0x00,0x00,0x00,0x00,0x00, A_CHAR exitMinBootCmd[] = {0x25,0xFC,0x0c,0x03,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00}; 0x00,0x00,0x00,0x00,0x00};
A_UINT8 *pEvent = NULL; A_UINT8 *pEvent = NULL;
...@@ -310,9 +310,9 @@ static A_STATUS AR3KExitMinBoot(AR3K_CONFIG_INFO *pConfig) ...@@ -310,9 +310,9 @@ static A_STATUS AR3KExitMinBoot(AR3K_CONFIG_INFO *pConfig)
return status; return status;
} }
static A_STATUS AR3KConfigureSendHCIReset(AR3K_CONFIG_INFO *pConfig) static int AR3KConfigureSendHCIReset(AR3K_CONFIG_INFO *pConfig)
{ {
A_STATUS status = A_OK; int status = A_OK;
A_UINT8 hciResetCommand[] = {0x03,0x0c,0x0}; A_UINT8 hciResetCommand[] = {0x03,0x0c,0x0};
A_UINT8 *pEvent = NULL; A_UINT8 *pEvent = NULL;
A_UINT8 *pBufferToFree = NULL; A_UINT8 *pBufferToFree = NULL;
...@@ -334,9 +334,9 @@ static A_STATUS AR3KConfigureSendHCIReset(AR3K_CONFIG_INFO *pConfig) ...@@ -334,9 +334,9 @@ static A_STATUS AR3KConfigureSendHCIReset(AR3K_CONFIG_INFO *pConfig)
return status; return status;
} }
static A_STATUS AR3KEnableTLPM(AR3K_CONFIG_INFO *pConfig) static int AR3KEnableTLPM(AR3K_CONFIG_INFO *pConfig)
{ {
A_STATUS status; int status;
/* AR3K vendor specific command for Host Wakeup Config */ /* AR3K vendor specific command for Host Wakeup Config */
A_CHAR hostWakeupConfig[] = {0x31,0xFC,0x18, A_CHAR hostWakeupConfig[] = {0x31,0xFC,0x18,
0x02,0x00,0x00,0x00, 0x02,0x00,0x00,0x00,
...@@ -453,9 +453,9 @@ static A_STATUS AR3KEnableTLPM(AR3K_CONFIG_INFO *pConfig) ...@@ -453,9 +453,9 @@ static A_STATUS AR3KEnableTLPM(AR3K_CONFIG_INFO *pConfig)
return status; return status;
} }
A_STATUS AR3KConfigure(AR3K_CONFIG_INFO *pConfig) int AR3KConfigure(AR3K_CONFIG_INFO *pConfig)
{ {
A_STATUS status = A_OK; int status = A_OK;
AR_DEBUG_PRINTF(ATH_DEBUG_INFO,("AR3K Config: Configuring AR3K ...\n")); AR_DEBUG_PRINTF(ATH_DEBUG_INFO,("AR3K Config: Configuring AR3K ...\n"));
...@@ -521,9 +521,9 @@ A_STATUS AR3KConfigure(AR3K_CONFIG_INFO *pConfig) ...@@ -521,9 +521,9 @@ A_STATUS AR3KConfigure(AR3K_CONFIG_INFO *pConfig)
return status; return status;
} }
A_STATUS AR3KConfigureExit(void *config) int AR3KConfigureExit(void *config)
{ {
A_STATUS status = A_OK; int status = A_OK;
AR3K_CONFIG_INFO *pConfig = (AR3K_CONFIG_INFO *)config; AR3K_CONFIG_INFO *pConfig = (AR3K_CONFIG_INFO *)config;
AR_DEBUG_PRINTF(ATH_DEBUG_INFO,("AR3K Config: Cleaning up AR3K ...\n")); AR_DEBUG_PRINTF(ATH_DEBUG_INFO,("AR3K Config: Cleaning up AR3K ...\n"));
......
...@@ -46,7 +46,7 @@ typedef struct { ...@@ -46,7 +46,7 @@ typedef struct {
AR3K_CONFIG_INFO *dev; AR3K_CONFIG_INFO *dev;
}HciCommandListParam; }HciCommandListParam;
A_STATUS SendHCICommandWaitCommandComplete(AR3K_CONFIG_INFO *pConfig, int SendHCICommandWaitCommandComplete(AR3K_CONFIG_INFO *pConfig,
A_UINT8 *pHCICommand, A_UINT8 *pHCICommand,
int CmdLength, int CmdLength,
A_UINT8 **ppEventBuffer, A_UINT8 **ppEventBuffer,
...@@ -56,8 +56,8 @@ A_UINT32 Rom_Version; ...@@ -56,8 +56,8 @@ A_UINT32 Rom_Version;
A_UINT32 Build_Version; A_UINT32 Build_Version;
extern A_BOOL BDADDR; extern A_BOOL BDADDR;
A_STATUS getDeviceType(AR3K_CONFIG_INFO *pConfig, A_UINT32 * code); int getDeviceType(AR3K_CONFIG_INFO *pConfig, A_UINT32 * code);
A_STATUS ReadVersionInfo(AR3K_CONFIG_INFO *pConfig); int ReadVersionInfo(AR3K_CONFIG_INFO *pConfig);
#ifndef HCI_TRANSPORT_SDIO #ifndef HCI_TRANSPORT_SDIO
DECLARE_WAIT_QUEUE_HEAD(PsCompleteEvent); DECLARE_WAIT_QUEUE_HEAD(PsCompleteEvent);
...@@ -70,7 +70,7 @@ int PSHciWritepacket(struct hci_dev*,A_UCHAR* Data, A_UINT32 len); ...@@ -70,7 +70,7 @@ int PSHciWritepacket(struct hci_dev*,A_UCHAR* Data, A_UINT32 len);
extern char *bdaddr; extern char *bdaddr;
#endif /* HCI_TRANSPORT_SDIO */ #endif /* HCI_TRANSPORT_SDIO */
A_STATUS write_bdaddr(AR3K_CONFIG_INFO *pConfig,A_UCHAR *bdaddr,int type); int write_bdaddr(AR3K_CONFIG_INFO *pConfig,A_UCHAR *bdaddr,int type);
int PSSendOps(void *arg); int PSSendOps(void *arg);
...@@ -91,9 +91,9 @@ void Hci_log(A_UCHAR * log_string,A_UCHAR *data,A_UINT32 len) ...@@ -91,9 +91,9 @@ void Hci_log(A_UCHAR * log_string,A_UCHAR *data,A_UINT32 len)
A_STATUS AthPSInitialize(AR3K_CONFIG_INFO *hdev) int AthPSInitialize(AR3K_CONFIG_INFO *hdev)
{ {
A_STATUS status = A_OK; int status = A_OK;
if(hdev == NULL) { if(hdev == NULL) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Invalid Device handle received\n")); AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Invalid Device handle received\n"));
return A_ERROR; return A_ERROR;
...@@ -389,7 +389,7 @@ int PSSendOps(void *arg) ...@@ -389,7 +389,7 @@ int PSSendOps(void *arg)
* with a HCI Command Complete event. * with a HCI Command Complete event.
* For HCI SDIO transport, this will be internally defined. * For HCI SDIO transport, this will be internally defined.
*/ */
A_STATUS SendHCICommandWaitCommandComplete(AR3K_CONFIG_INFO *pConfig, int SendHCICommandWaitCommandComplete(AR3K_CONFIG_INFO *pConfig,
A_UINT8 *pHCICommand, A_UINT8 *pHCICommand,
int CmdLength, int CmdLength,
A_UINT8 **ppEventBuffer, A_UINT8 **ppEventBuffer,
...@@ -419,7 +419,7 @@ A_STATUS SendHCICommandWaitCommandComplete(AR3K_CONFIG_INFO *pConfig, ...@@ -419,7 +419,7 @@ A_STATUS SendHCICommandWaitCommandComplete(AR3K_CONFIG_INFO *pConfig,
} }
#endif /* HCI_TRANSPORT_SDIO */ #endif /* HCI_TRANSPORT_SDIO */
A_STATUS ReadPSEvent(A_UCHAR* Data){ int ReadPSEvent(A_UCHAR* Data){
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,(" PS Event %x %x %x\n",Data[4],Data[5],Data[3])); AR_DEBUG_PRINTF(ATH_DEBUG_ERR,(" PS Event %x %x %x\n",Data[4],Data[5],Data[3]));
if(Data[4] == 0xFC && Data[5] == 0x00) if(Data[4] == 0xFC && Data[5] == 0x00)
...@@ -481,14 +481,14 @@ int str2ba(unsigned char *str_bdaddr,unsigned char *bdaddr) ...@@ -481,14 +481,14 @@ int str2ba(unsigned char *str_bdaddr,unsigned char *bdaddr)
return 0; return 0;
} }
A_STATUS write_bdaddr(AR3K_CONFIG_INFO *pConfig,A_UCHAR *bdaddr,int type) int write_bdaddr(AR3K_CONFIG_INFO *pConfig,A_UCHAR *bdaddr,int type)
{ {
A_UCHAR bdaddr_cmd[] = { 0x0B, 0xFC, 0x0A, 0x01, 0x01, A_UCHAR bdaddr_cmd[] = { 0x0B, 0xFC, 0x0A, 0x01, 0x01,
0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
A_UINT8 *event; A_UINT8 *event;
A_UINT8 *bufferToFree = NULL; A_UINT8 *bufferToFree = NULL;
A_STATUS result = A_ERROR; int result = A_ERROR;
int inc,outc; int inc,outc;
if (type == BDADDR_TYPE_STRING) if (type == BDADDR_TYPE_STRING)
...@@ -516,12 +516,12 @@ A_STATUS write_bdaddr(AR3K_CONFIG_INFO *pConfig,A_UCHAR *bdaddr,int type) ...@@ -516,12 +516,12 @@ A_STATUS write_bdaddr(AR3K_CONFIG_INFO *pConfig,A_UCHAR *bdaddr,int type)
return result; return result;
} }
A_STATUS ReadVersionInfo(AR3K_CONFIG_INFO *pConfig) int ReadVersionInfo(AR3K_CONFIG_INFO *pConfig)
{ {
A_UINT8 hciCommand[] = {0x1E,0xfc,0x00}; A_UINT8 hciCommand[] = {0x1E,0xfc,0x00};
A_UINT8 *event; A_UINT8 *event;
A_UINT8 *bufferToFree = NULL; A_UINT8 *bufferToFree = NULL;
A_STATUS result = A_ERROR; int result = A_ERROR;
if(A_OK == SendHCICommandWaitCommandComplete(pConfig,hciCommand,sizeof(hciCommand),&event,&bufferToFree)) { if(A_OK == SendHCICommandWaitCommandComplete(pConfig,hciCommand,sizeof(hciCommand),&event,&bufferToFree)) {
result = ReadPSEvent(event); result = ReadPSEvent(event);
...@@ -531,13 +531,13 @@ A_STATUS ReadVersionInfo(AR3K_CONFIG_INFO *pConfig) ...@@ -531,13 +531,13 @@ A_STATUS ReadVersionInfo(AR3K_CONFIG_INFO *pConfig)
} }
return result; return result;
} }
A_STATUS getDeviceType(AR3K_CONFIG_INFO *pConfig, A_UINT32 * code) int getDeviceType(AR3K_CONFIG_INFO *pConfig, A_UINT32 * code)
{ {
A_UINT8 hciCommand[] = {0x05,0xfc,0x05,0x00,0x00,0x00,0x00,0x04}; A_UINT8 hciCommand[] = {0x05,0xfc,0x05,0x00,0x00,0x00,0x00,0x04};
A_UINT8 *event; A_UINT8 *event;
A_UINT8 *bufferToFree = NULL; A_UINT8 *bufferToFree = NULL;
A_UINT32 reg; A_UINT32 reg;
A_STATUS result = A_ERROR; int result = A_ERROR;
*code = 0; *code = 0;
hciCommand[3] = (A_UINT8)(FPGA_REGISTER & 0xFF); hciCommand[3] = (A_UINT8)(FPGA_REGISTER & 0xFF);
hciCommand[4] = (A_UINT8)((FPGA_REGISTER >> 8) & 0xFF); hciCommand[4] = (A_UINT8)((FPGA_REGISTER >> 8) & 0xFF);
......
...@@ -70,6 +70,6 @@ extern wait_queue_t Eventwait; ...@@ -70,6 +70,6 @@ extern wait_queue_t Eventwait;
extern A_UCHAR *HciEventpacket; extern A_UCHAR *HciEventpacket;
#endif /* #ifndef HCI_TRANSPORT_SDIO */ #endif /* #ifndef HCI_TRANSPORT_SDIO */
A_STATUS AthPSInitialize(AR3K_CONFIG_INFO *hdev); int AthPSInitialize(AR3K_CONFIG_INFO *hdev);
A_STATUS ReadPSEvent(A_UCHAR* Data); int ReadPSEvent(A_UCHAR* Data);
#endif /* __AR3KPSCONFIG_H */ #endif /* __AR3KPSCONFIG_H */
...@@ -127,10 +127,10 @@ tPsTagEntry PsTagEntry[RAMPS_MAX_PS_TAGS_PER_FILE]; ...@@ -127,10 +127,10 @@ tPsTagEntry PsTagEntry[RAMPS_MAX_PS_TAGS_PER_FILE];
tRamPatch RamPatch[MAX_NUM_PATCH_ENTRY]; tRamPatch RamPatch[MAX_NUM_PATCH_ENTRY];
A_STATUS AthParseFilesUnified(A_UCHAR *srcbuffer,A_UINT32 srclen, int FileFormat); int AthParseFilesUnified(A_UCHAR *srcbuffer,A_UINT32 srclen, int FileFormat);
char AthReadChar(A_UCHAR *buffer, A_UINT32 len,A_UINT32 *pos); char AthReadChar(A_UCHAR *buffer, A_UINT32 len,A_UINT32 *pos);
char * AthGetLine(char * buffer, int maxlen, A_UCHAR *srcbuffer,A_UINT32 len,A_UINT32 *pos); char * AthGetLine(char * buffer, int maxlen, A_UCHAR *srcbuffer,A_UINT32 len,A_UINT32 *pos);
static A_STATUS AthPSCreateHCICommand(A_UCHAR Opcode, A_UINT32 Param1,PSCmdPacket *PSPatchPacket,A_UINT32 *index); static int AthPSCreateHCICommand(A_UCHAR Opcode, A_UINT32 Param1,PSCmdPacket *PSPatchPacket,A_UINT32 *index);
/* Function to reads the next character from the input buffer */ /* Function to reads the next character from the input buffer */
char AthReadChar(A_UCHAR *buffer, A_UINT32 len,A_UINT32 *pos) char AthReadChar(A_UCHAR *buffer, A_UINT32 len,A_UINT32 *pos)
...@@ -315,7 +315,7 @@ unsigned int uReadDataInSection(char *pCharLine, ST_PS_DATA_FORMAT stPS_DataForm ...@@ -315,7 +315,7 @@ unsigned int uReadDataInSection(char *pCharLine, ST_PS_DATA_FORMAT stPS_DataForm
return (0x0FFF); return (0x0FFF);
} }
} }
A_STATUS AthParseFilesUnified(A_UCHAR *srcbuffer,A_UINT32 srclen, int FileFormat) int AthParseFilesUnified(A_UCHAR *srcbuffer,A_UINT32 srclen, int FileFormat)
{ {
char *Buffer; char *Buffer;
char *pCharLine; char *pCharLine;
...@@ -558,7 +558,7 @@ A_STATUS AthParseFilesUnified(A_UCHAR *srcbuffer,A_UINT32 srclen, int FileFormat ...@@ -558,7 +558,7 @@ A_STATUS AthParseFilesUnified(A_UCHAR *srcbuffer,A_UINT32 srclen, int FileFormat
/********************/ /********************/
A_STATUS GetNextTwoChar(A_UCHAR *srcbuffer,A_UINT32 len, A_UINT32 *pos, char * buffer) int GetNextTwoChar(A_UCHAR *srcbuffer,A_UINT32 len, A_UINT32 *pos, char * buffer)
{ {
unsigned char ch; unsigned char ch;
...@@ -579,7 +579,7 @@ A_STATUS GetNextTwoChar(A_UCHAR *srcbuffer,A_UINT32 len, A_UINT32 *pos, char * b ...@@ -579,7 +579,7 @@ A_STATUS GetNextTwoChar(A_UCHAR *srcbuffer,A_UINT32 len, A_UINT32 *pos, char * b
return A_OK; return A_OK;
} }
A_STATUS AthDoParsePatch(A_UCHAR *patchbuffer, A_UINT32 patchlen) int AthDoParsePatch(A_UCHAR *patchbuffer, A_UINT32 patchlen)
{ {
char Byte[3]; char Byte[3];
...@@ -659,9 +659,9 @@ A_STATUS AthDoParsePatch(A_UCHAR *patchbuffer, A_UINT32 patchlen) ...@@ -659,9 +659,9 @@ A_STATUS AthDoParsePatch(A_UCHAR *patchbuffer, A_UINT32 patchlen)
/********************/ /********************/
A_STATUS AthDoParsePS(A_UCHAR *srcbuffer, A_UINT32 srclen) int AthDoParsePS(A_UCHAR *srcbuffer, A_UINT32 srclen)
{ {
A_STATUS status; int status;
int i; int i;
A_BOOL BDADDR_Present = A_ERROR; A_BOOL BDADDR_Present = A_ERROR;
...@@ -833,7 +833,7 @@ int AthCreateCommandList(PSCmdPacket **HciPacketList, A_UINT32 *numPackets) ...@@ -833,7 +833,7 @@ int AthCreateCommandList(PSCmdPacket **HciPacketList, A_UINT32 *numPackets)
//////////////////////// ////////////////////////
///////////// /////////////
static A_STATUS AthPSCreateHCICommand(A_UCHAR Opcode, A_UINT32 Param1,PSCmdPacket *PSPatchPacket,A_UINT32 *index) static int AthPSCreateHCICommand(A_UCHAR Opcode, A_UINT32 Param1,PSCmdPacket *PSPatchPacket,A_UINT32 *index)
{ {
A_UCHAR *HCI_PS_Command; A_UCHAR *HCI_PS_Command;
A_UINT32 Length; A_UINT32 Length;
...@@ -955,7 +955,7 @@ static A_STATUS AthPSCreateHCICommand(A_UCHAR Opcode, A_UINT32 Param1,PSCmdPacke ...@@ -955,7 +955,7 @@ static A_STATUS AthPSCreateHCICommand(A_UCHAR Opcode, A_UINT32 Param1,PSCmdPacke
} }
return A_OK; return A_OK;
} }
A_STATUS AthFreeCommandList(PSCmdPacket **HciPacketList, A_UINT32 numPackets) int AthFreeCommandList(PSCmdPacket **HciPacketList, A_UINT32 numPackets)
{ {
int i; int i;
if(*HciPacketList == NULL) { if(*HciPacketList == NULL) {
......
...@@ -104,10 +104,10 @@ typedef struct PSCmdPacket ...@@ -104,10 +104,10 @@ typedef struct PSCmdPacket
} PSCmdPacket; } PSCmdPacket;
/* Parses a Patch information buffer and store it in global structure */ /* Parses a Patch information buffer and store it in global structure */
A_STATUS AthDoParsePatch(A_UCHAR *, A_UINT32); int AthDoParsePatch(A_UCHAR *, A_UINT32);
/* parses a PS information buffer and stores it in a global structure */ /* parses a PS information buffer and stores it in a global structure */
A_STATUS AthDoParsePS(A_UCHAR *, A_UINT32); int AthDoParsePS(A_UCHAR *, A_UINT32);
/* /*
* Uses the output of Both AthDoParsePS and AthDoParsePatch APIs to form HCI command array with * Uses the output of Both AthDoParsePS and AthDoParsePatch APIs to form HCI command array with
...@@ -123,5 +123,5 @@ A_STATUS AthDoParsePS(A_UCHAR *, A_UINT32); ...@@ -123,5 +123,5 @@ A_STATUS AthDoParsePS(A_UCHAR *, A_UINT32);
int AthCreateCommandList(PSCmdPacket **, A_UINT32 *); int AthCreateCommandList(PSCmdPacket **, A_UINT32 *);
/* Cleanup the dynamically allicated HCI command list */ /* Cleanup the dynamically allicated HCI command list */
A_STATUS AthFreeCommandList(PSCmdPacket **HciPacketList, A_UINT32 numPackets); int AthFreeCommandList(PSCmdPacket **HciPacketList, A_UINT32 numPackets);
#endif /* __AR3KPSPARSER_H */ #endif /* __AR3KPSPARSER_H */
...@@ -83,9 +83,9 @@ static A_UINT8 custDataAR6003[AR6003_CUST_DATA_SIZE]; ...@@ -83,9 +83,9 @@ static A_UINT8 custDataAR6003[AR6003_CUST_DATA_SIZE];
#ifdef USE_4BYTE_REGISTER_ACCESS #ifdef USE_4BYTE_REGISTER_ACCESS
/* set the window address register (using 4-byte register access ). */ /* set the window address register (using 4-byte register access ). */
A_STATUS ar6000_SetAddressWindowRegister(HIF_DEVICE *hifDevice, A_UINT32 RegisterAddr, A_UINT32 Address) int ar6000_SetAddressWindowRegister(HIF_DEVICE *hifDevice, A_UINT32 RegisterAddr, A_UINT32 Address)
{ {
A_STATUS status; int status;
A_UINT8 addrValue[4]; A_UINT8 addrValue[4];
A_INT32 i; A_INT32 i;
...@@ -144,9 +144,9 @@ A_STATUS ar6000_SetAddressWindowRegister(HIF_DEVICE *hifDevice, A_UINT32 Registe ...@@ -144,9 +144,9 @@ A_STATUS ar6000_SetAddressWindowRegister(HIF_DEVICE *hifDevice, A_UINT32 Registe
#else #else
/* set the window address register */ /* set the window address register */
A_STATUS ar6000_SetAddressWindowRegister(HIF_DEVICE *hifDevice, A_UINT32 RegisterAddr, A_UINT32 Address) int ar6000_SetAddressWindowRegister(HIF_DEVICE *hifDevice, A_UINT32 RegisterAddr, A_UINT32 Address)
{ {
A_STATUS status; int status;
/* write bytes 1,2,3 of the register to set the upper address bytes, the LSB is written /* write bytes 1,2,3 of the register to set the upper address bytes, the LSB is written
* last to initiate the access cycle */ * last to initiate the access cycle */
...@@ -186,10 +186,10 @@ A_STATUS ar6000_SetAddressWindowRegister(HIF_DEVICE *hifDevice, A_UINT32 Registe ...@@ -186,10 +186,10 @@ A_STATUS ar6000_SetAddressWindowRegister(HIF_DEVICE *hifDevice, A_UINT32 Registe
* Read from the AR6000 through its diagnostic window. * Read from the AR6000 through its diagnostic window.
* No cooperation from the Target is required for this. * No cooperation from the Target is required for this.
*/ */
A_STATUS int
ar6000_ReadRegDiag(HIF_DEVICE *hifDevice, A_UINT32 *address, A_UINT32 *data) ar6000_ReadRegDiag(HIF_DEVICE *hifDevice, A_UINT32 *address, A_UINT32 *data)
{ {
A_STATUS status; int status;
/* set window register to start read cycle */ /* set window register to start read cycle */
status = ar6000_SetAddressWindowRegister(hifDevice, status = ar6000_SetAddressWindowRegister(hifDevice,
...@@ -220,10 +220,10 @@ ar6000_ReadRegDiag(HIF_DEVICE *hifDevice, A_UINT32 *address, A_UINT32 *data) ...@@ -220,10 +220,10 @@ ar6000_ReadRegDiag(HIF_DEVICE *hifDevice, A_UINT32 *address, A_UINT32 *data)
* Write to the AR6000 through its diagnostic window. * Write to the AR6000 through its diagnostic window.
* No cooperation from the Target is required for this. * No cooperation from the Target is required for this.
*/ */
A_STATUS int
ar6000_WriteRegDiag(HIF_DEVICE *hifDevice, A_UINT32 *address, A_UINT32 *data) ar6000_WriteRegDiag(HIF_DEVICE *hifDevice, A_UINT32 *address, A_UINT32 *data)
{ {
A_STATUS status; int status;
/* set write data */ /* set write data */
status = HIFReadWrite(hifDevice, status = HIFReadWrite(hifDevice,
...@@ -243,12 +243,12 @@ ar6000_WriteRegDiag(HIF_DEVICE *hifDevice, A_UINT32 *address, A_UINT32 *data) ...@@ -243,12 +243,12 @@ ar6000_WriteRegDiag(HIF_DEVICE *hifDevice, A_UINT32 *address, A_UINT32 *data)
*address); *address);
} }
A_STATUS int
ar6000_ReadDataDiag(HIF_DEVICE *hifDevice, A_UINT32 address, ar6000_ReadDataDiag(HIF_DEVICE *hifDevice, A_UINT32 address,
A_UCHAR *data, A_UINT32 length) A_UCHAR *data, A_UINT32 length)
{ {
A_UINT32 count; A_UINT32 count;
A_STATUS status = A_OK; int status = A_OK;
for (count = 0; count < length; count += 4, address += 4) { for (count = 0; count < length; count += 4, address += 4) {
if ((status = ar6000_ReadRegDiag(hifDevice, &address, if ((status = ar6000_ReadRegDiag(hifDevice, &address,
...@@ -261,12 +261,12 @@ ar6000_ReadDataDiag(HIF_DEVICE *hifDevice, A_UINT32 address, ...@@ -261,12 +261,12 @@ ar6000_ReadDataDiag(HIF_DEVICE *hifDevice, A_UINT32 address,
return status; return status;
} }
A_STATUS int
ar6000_WriteDataDiag(HIF_DEVICE *hifDevice, A_UINT32 address, ar6000_WriteDataDiag(HIF_DEVICE *hifDevice, A_UINT32 address,
A_UCHAR *data, A_UINT32 length) A_UCHAR *data, A_UINT32 length)
{ {
A_UINT32 count; A_UINT32 count;
A_STATUS status = A_OK; int status = A_OK;
for (count = 0; count < length; count += 4, address += 4) { for (count = 0; count < length; count += 4, address += 4) {
if ((status = ar6000_WriteRegDiag(hifDevice, &address, if ((status = ar6000_WriteRegDiag(hifDevice, &address,
...@@ -279,10 +279,10 @@ ar6000_WriteDataDiag(HIF_DEVICE *hifDevice, A_UINT32 address, ...@@ -279,10 +279,10 @@ ar6000_WriteDataDiag(HIF_DEVICE *hifDevice, A_UINT32 address,
return status; return status;
} }
A_STATUS int
ar6k_ReadTargetRegister(HIF_DEVICE *hifDevice, int regsel, A_UINT32 *regval) ar6k_ReadTargetRegister(HIF_DEVICE *hifDevice, int regsel, A_UINT32 *regval)
{ {
A_STATUS status; int status;
A_UCHAR vals[4]; A_UCHAR vals[4];
A_UCHAR register_selection[4]; A_UCHAR register_selection[4];
...@@ -329,10 +329,10 @@ ar6k_FetchTargetRegs(HIF_DEVICE *hifDevice, A_UINT32 *targregs) ...@@ -329,10 +329,10 @@ ar6k_FetchTargetRegs(HIF_DEVICE *hifDevice, A_UINT32 *targregs)
} }
#if 0 #if 0
static A_STATUS static int
_do_write_diag(HIF_DEVICE *hifDevice, A_UINT32 addr, A_UINT32 value) _do_write_diag(HIF_DEVICE *hifDevice, A_UINT32 addr, A_UINT32 value)
{ {
A_STATUS status; int status;
status = ar6000_WriteRegDiag(hifDevice, &addr, &value); status = ar6000_WriteRegDiag(hifDevice, &addr, &value);
if (status != A_OK) if (status != A_OK)
...@@ -357,7 +357,7 @@ _do_write_diag(HIF_DEVICE *hifDevice, A_UINT32 addr, A_UINT32 value) ...@@ -357,7 +357,7 @@ _do_write_diag(HIF_DEVICE *hifDevice, A_UINT32 addr, A_UINT32 value)
* TBD: Might want to add special handling for AR6K_OPTION_BMI_DISABLE. * TBD: Might want to add special handling for AR6K_OPTION_BMI_DISABLE.
*/ */
#if 0 #if 0
static A_STATUS static int
_delay_until_target_alive(HIF_DEVICE *hifDevice, A_INT32 wait_msecs, A_UINT32 TargetType) _delay_until_target_alive(HIF_DEVICE *hifDevice, A_INT32 wait_msecs, A_UINT32 TargetType)
{ {
A_INT32 actual_wait; A_INT32 actual_wait;
...@@ -399,9 +399,9 @@ _delay_until_target_alive(HIF_DEVICE *hifDevice, A_INT32 wait_msecs, A_UINT32 Ta ...@@ -399,9 +399,9 @@ _delay_until_target_alive(HIF_DEVICE *hifDevice, A_INT32 wait_msecs, A_UINT32 Ta
#define AR6002_RESET_CONTROL_ADDRESS 0x00004000 #define AR6002_RESET_CONTROL_ADDRESS 0x00004000
#define AR6003_RESET_CONTROL_ADDRESS 0x00004000 #define AR6003_RESET_CONTROL_ADDRESS 0x00004000
/* reset device */ /* reset device */
A_STATUS ar6000_reset_device(HIF_DEVICE *hifDevice, A_UINT32 TargetType, A_BOOL waitForCompletion, A_BOOL coldReset) int ar6000_reset_device(HIF_DEVICE *hifDevice, A_UINT32 TargetType, A_BOOL waitForCompletion, A_BOOL coldReset)
{ {
A_STATUS status = A_OK; int status = A_OK;
A_UINT32 address; A_UINT32 address;
A_UINT32 data; A_UINT32 data;
...@@ -557,7 +557,7 @@ void ar6000_dump_target_assert_info(HIF_DEVICE *hifDevice, A_UINT32 TargetType) ...@@ -557,7 +557,7 @@ void ar6000_dump_target_assert_info(HIF_DEVICE *hifDevice, A_UINT32 TargetType)
{ {
A_UINT32 address; A_UINT32 address;
A_UINT32 regDumpArea = 0; A_UINT32 regDumpArea = 0;
A_STATUS status; int status;
A_UINT32 regDumpValues[REGISTER_DUMP_LEN_MAX]; A_UINT32 regDumpValues[REGISTER_DUMP_LEN_MAX];
A_UINT32 regDumpCount = 0; A_UINT32 regDumpCount = 0;
A_UINT32 i; A_UINT32 i;
...@@ -625,12 +625,12 @@ void ar6000_dump_target_assert_info(HIF_DEVICE *hifDevice, A_UINT32 TargetType) ...@@ -625,12 +625,12 @@ void ar6000_dump_target_assert_info(HIF_DEVICE *hifDevice, A_UINT32 TargetType)
/* set HTC/Mbox operational parameters, this can only be called when the target is in the /* set HTC/Mbox operational parameters, this can only be called when the target is in the
* BMI phase */ * BMI phase */
A_STATUS ar6000_set_htc_params(HIF_DEVICE *hifDevice, int ar6000_set_htc_params(HIF_DEVICE *hifDevice,
A_UINT32 TargetType, A_UINT32 TargetType,
A_UINT32 MboxIsrYieldValue, A_UINT32 MboxIsrYieldValue,
A_UINT8 HtcControlBuffers) A_UINT8 HtcControlBuffers)
{ {
A_STATUS status; int status;
A_UINT32 blocksizes[HTC_MAILBOX_NUM_MAX]; A_UINT32 blocksizes[HTC_MAILBOX_NUM_MAX];
do { do {
...@@ -685,18 +685,18 @@ A_STATUS ar6000_set_htc_params(HIF_DEVICE *hifDevice, ...@@ -685,18 +685,18 @@ A_STATUS ar6000_set_htc_params(HIF_DEVICE *hifDevice,
} }
static A_STATUS prepare_ar6002(HIF_DEVICE *hifDevice, A_UINT32 TargetVersion) static int prepare_ar6002(HIF_DEVICE *hifDevice, A_UINT32 TargetVersion)
{ {
A_STATUS status = A_OK; int status = A_OK;
/* placeholder */ /* placeholder */
return status; return status;
} }
static A_STATUS prepare_ar6003(HIF_DEVICE *hifDevice, A_UINT32 TargetVersion) static int prepare_ar6003(HIF_DEVICE *hifDevice, A_UINT32 TargetVersion)
{ {
A_STATUS status = A_OK; int status = A_OK;
/* placeholder */ /* placeholder */
...@@ -704,7 +704,7 @@ static A_STATUS prepare_ar6003(HIF_DEVICE *hifDevice, A_UINT32 TargetVersion) ...@@ -704,7 +704,7 @@ static A_STATUS prepare_ar6003(HIF_DEVICE *hifDevice, A_UINT32 TargetVersion)
} }
/* this function assumes the caller has already initialized the BMI APIs */ /* this function assumes the caller has already initialized the BMI APIs */
A_STATUS ar6000_prepare_target(HIF_DEVICE *hifDevice, int ar6000_prepare_target(HIF_DEVICE *hifDevice,
A_UINT32 TargetType, A_UINT32 TargetType,
A_UINT32 TargetVersion) A_UINT32 TargetVersion)
{ {
...@@ -725,7 +725,7 @@ A_STATUS ar6000_prepare_target(HIF_DEVICE *hifDevice, ...@@ -725,7 +725,7 @@ A_STATUS ar6000_prepare_target(HIF_DEVICE *hifDevice,
* THIS IS FOR USE ONLY WITH AR6002 REV 1.x. * THIS IS FOR USE ONLY WITH AR6002 REV 1.x.
* TBDXXX: Remove this function when REV 1.x is desupported. * TBDXXX: Remove this function when REV 1.x is desupported.
*/ */
A_STATUS int
ar6002_REV1_reset_force_host (HIF_DEVICE *hifDevice) ar6002_REV1_reset_force_host (HIF_DEVICE *hifDevice)
{ {
A_INT32 i; A_INT32 i;
...@@ -735,7 +735,7 @@ ar6002_REV1_reset_force_host (HIF_DEVICE *hifDevice) ...@@ -735,7 +735,7 @@ ar6002_REV1_reset_force_host (HIF_DEVICE *hifDevice)
}; };
struct forceROM_s *ForceROM; struct forceROM_s *ForceROM;
A_INT32 szForceROM; A_INT32 szForceROM;
A_STATUS status = A_OK; int status = A_OK;
A_UINT32 address; A_UINT32 address;
A_UINT32 data; A_UINT32 data;
...@@ -934,7 +934,7 @@ void a_dump_module_debug_info_by_name(A_CHAR *module_name) ...@@ -934,7 +934,7 @@ void a_dump_module_debug_info_by_name(A_CHAR *module_name)
} }
A_STATUS a_get_module_mask(A_CHAR *module_name, A_UINT32 *pMask) int a_get_module_mask(A_CHAR *module_name, A_UINT32 *pMask)
{ {
ATH_DEBUG_MODULE_DBG_INFO *pInfo = FindModule(module_name); ATH_DEBUG_MODULE_DBG_INFO *pInfo = FindModule(module_name);
...@@ -946,7 +946,7 @@ A_STATUS a_get_module_mask(A_CHAR *module_name, A_UINT32 *pMask) ...@@ -946,7 +946,7 @@ A_STATUS a_get_module_mask(A_CHAR *module_name, A_UINT32 *pMask)
return A_OK; return A_OK;
} }
A_STATUS a_set_module_mask(A_CHAR *module_name, A_UINT32 Mask) int a_set_module_mask(A_CHAR *module_name, A_UINT32 Mask)
{ {
ATH_DEBUG_MODULE_DBG_INFO *pInfo = FindModule(module_name); ATH_DEBUG_MODULE_DBG_INFO *pInfo = FindModule(module_name);
...@@ -999,11 +999,11 @@ void a_module_debug_support_cleanup(void) ...@@ -999,11 +999,11 @@ void a_module_debug_support_cleanup(void)
} }
/* can only be called during bmi init stage */ /* can only be called during bmi init stage */
A_STATUS ar6000_set_hci_bridge_flags(HIF_DEVICE *hifDevice, int ar6000_set_hci_bridge_flags(HIF_DEVICE *hifDevice,
A_UINT32 TargetType, A_UINT32 TargetType,
A_UINT32 Flags) A_UINT32 Flags)
{ {
A_STATUS status = A_OK; int status = A_OK;
do { do {
......
...@@ -393,7 +393,7 @@ static void SeekCredits(COMMON_CREDIT_STATE_INFO *pCredInfo, ...@@ -393,7 +393,7 @@ static void SeekCredits(COMMON_CREDIT_STATE_INFO *pCredInfo,
} }
/* initialize and setup credit distribution */ /* initialize and setup credit distribution */
A_STATUS ar6000_setup_credit_dist(HTC_HANDLE HTCHandle, COMMON_CREDIT_STATE_INFO *pCredInfo) int ar6000_setup_credit_dist(HTC_HANDLE HTCHandle, COMMON_CREDIT_STATE_INFO *pCredInfo)
{ {
HTC_SERVICE_ID servicepriority[5]; HTC_SERVICE_ID servicepriority[5];
......
...@@ -51,7 +51,7 @@ static int screen_is_off; ...@@ -51,7 +51,7 @@ static int screen_is_off;
static struct early_suspend ar6k_early_suspend; static struct early_suspend ar6k_early_suspend;
#endif #endif
static A_STATUS (*ar6000_avail_ev_p)(void *, void *); static int (*ar6000_avail_ev_p)(void *, void *);
#if defined(CONFIG_ANDROID_LOGGER) && (!defined(CONFIG_MMC_MSM)) #if defined(CONFIG_ANDROID_LOGGER) && (!defined(CONFIG_MMC_MSM))
int logger_write(const enum logidx index, int logger_write(const enum logidx index,
...@@ -269,9 +269,9 @@ void android_release_firmware(const struct firmware *firmware) ...@@ -269,9 +269,9 @@ void android_release_firmware(const struct firmware *firmware)
} }
} }
static A_STATUS ar6000_android_avail_ev(void *context, void *hif_handle) static int ar6000_android_avail_ev(void *context, void *hif_handle)
{ {
A_STATUS ret; int ret;
ar6000_enable_mmchost_detect_change(0); ar6000_enable_mmchost_detect_change(0);
ret = ar6000_avail_ev_p(context, hif_handle); ret = ar6000_avail_ev_p(context, hif_handle);
return ret; return ret;
......
...@@ -57,7 +57,7 @@ ATH_DEBUG_INSTANTIATE_MODULE_VAR(pm, ...@@ -57,7 +57,7 @@ ATH_DEBUG_INSTANTIATE_MODULE_VAR(pm,
#endif /* DEBUG */ #endif /* DEBUG */
A_STATUS ar6000_exit_cut_power_state(AR_SOFTC_T *ar); int ar6000_exit_cut_power_state(AR_SOFTC_T *ar);
#ifdef CONFIG_PM #ifdef CONFIG_PM
static void ar6k_send_asleep_event_to_app(AR_SOFTC_T *ar, A_BOOL asleep) static void ar6k_send_asleep_event_to_app(AR_SOFTC_T *ar, A_BOOL asleep)
...@@ -122,7 +122,7 @@ static void ar6000_wow_suspend(AR_SOFTC_T *ar) ...@@ -122,7 +122,7 @@ static void ar6000_wow_suspend(AR_SOFTC_T *ar)
struct in_ifaddr *ifa = NULL; struct in_ifaddr *ifa = NULL;
struct in_device *in_dev; struct in_device *in_dev;
A_UINT8 macMask[] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; A_UINT8 macMask[] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
A_STATUS status; int status;
WMI_ADD_WOW_PATTERN_CMD addWowCmd = { .filter = { 0 } }; WMI_ADD_WOW_PATTERN_CMD addWowCmd = { .filter = { 0 } };
WMI_DEL_WOW_PATTERN_CMD delWowCmd; WMI_DEL_WOW_PATTERN_CMD delWowCmd;
WMI_SET_HOST_SLEEP_MODE_CMD hostSleepMode = {FALSE, TRUE}; WMI_SET_HOST_SLEEP_MODE_CMD hostSleepMode = {FALSE, TRUE};
...@@ -211,9 +211,9 @@ static void ar6000_wow_suspend(AR_SOFTC_T *ar) ...@@ -211,9 +211,9 @@ static void ar6000_wow_suspend(AR_SOFTC_T *ar)
} }
} }
A_STATUS ar6000_suspend_ev(void *context) int ar6000_suspend_ev(void *context)
{ {
A_STATUS status = A_OK; int status = A_OK;
AR_SOFTC_T *ar = (AR_SOFTC_T *)context; AR_SOFTC_T *ar = (AR_SOFTC_T *)context;
A_INT16 pmmode = ar->arSuspendConfig; A_INT16 pmmode = ar->arSuspendConfig;
wow_not_connected: wow_not_connected:
...@@ -248,7 +248,7 @@ A_STATUS ar6000_suspend_ev(void *context) ...@@ -248,7 +248,7 @@ A_STATUS ar6000_suspend_ev(void *context)
return status; return status;
} }
A_STATUS ar6000_resume_ev(void *context) int ar6000_resume_ev(void *context)
{ {
AR_SOFTC_T *ar = (AR_SOFTC_T *)context; AR_SOFTC_T *ar = (AR_SOFTC_T *)context;
A_UINT16 powerState = ar->arWlanPowerState; A_UINT16 powerState = ar->arWlanPowerState;
...@@ -290,10 +290,10 @@ void ar6000_check_wow_status(AR_SOFTC_T *ar, struct sk_buff *skb, A_BOOL isEvent ...@@ -290,10 +290,10 @@ void ar6000_check_wow_status(AR_SOFTC_T *ar, struct sk_buff *skb, A_BOOL isEvent
} }
} }
A_STATUS ar6000_power_change_ev(void *context, A_UINT32 config) int ar6000_power_change_ev(void *context, A_UINT32 config)
{ {
AR_SOFTC_T *ar = (AR_SOFTC_T *)context; AR_SOFTC_T *ar = (AR_SOFTC_T *)context;
A_STATUS status = A_OK; int status = A_OK;
AR_DEBUG_PRINTF(ATH_DEBUG_PM, ("%s: power change event callback %d \n", __func__, config)); AR_DEBUG_PRINTF(ATH_DEBUG_PM, ("%s: power change event callback %d \n", __func__, config));
switch (config) { switch (config) {
...@@ -342,10 +342,10 @@ static struct platform_driver ar6000_pm_device = { ...@@ -342,10 +342,10 @@ static struct platform_driver ar6000_pm_device = {
}; };
#endif /* CONFIG_PM */ #endif /* CONFIG_PM */
A_STATUS int
ar6000_setup_cut_power_state(struct ar6_softc *ar, AR6000_WLAN_STATE state) ar6000_setup_cut_power_state(struct ar6_softc *ar, AR6000_WLAN_STATE state)
{ {
A_STATUS status = A_OK; int status = A_OK;
HIF_DEVICE_POWER_CHANGE_TYPE config; HIF_DEVICE_POWER_CHANGE_TYPE config;
AR_DEBUG_PRINTF(ATH_DEBUG_PM, ("%s: Cut power %d %d \n", __func__,state, ar->arWlanPowerState)); AR_DEBUG_PRINTF(ATH_DEBUG_PM, ("%s: Cut power %d %d \n", __func__,state, ar->arWlanPowerState));
...@@ -412,10 +412,10 @@ ar6000_setup_cut_power_state(struct ar6_softc *ar, AR6000_WLAN_STATE state) ...@@ -412,10 +412,10 @@ ar6000_setup_cut_power_state(struct ar6_softc *ar, AR6000_WLAN_STATE state)
return status; return status;
} }
A_STATUS int
ar6000_setup_deep_sleep_state(struct ar6_softc *ar, AR6000_WLAN_STATE state) ar6000_setup_deep_sleep_state(struct ar6_softc *ar, AR6000_WLAN_STATE state)
{ {
A_STATUS status = A_OK; int status = A_OK;
AR_DEBUG_PRINTF(ATH_DEBUG_PM, ("%s: Deep sleep %d %d \n", __func__,state, ar->arWlanPowerState)); AR_DEBUG_PRINTF(ATH_DEBUG_PM, ("%s: Deep sleep %d %d \n", __func__,state, ar->arWlanPowerState));
#ifdef CONFIG_PM #ifdef CONFIG_PM
...@@ -536,10 +536,10 @@ ar6000_setup_deep_sleep_state(struct ar6_softc *ar, AR6000_WLAN_STATE state) ...@@ -536,10 +536,10 @@ ar6000_setup_deep_sleep_state(struct ar6_softc *ar, AR6000_WLAN_STATE state)
return status; return status;
} }
A_STATUS int
ar6000_update_wlan_pwr_state(struct ar6_softc *ar, AR6000_WLAN_STATE state, A_BOOL pmEvent) ar6000_update_wlan_pwr_state(struct ar6_softc *ar, AR6000_WLAN_STATE state, A_BOOL pmEvent)
{ {
A_STATUS status = A_OK; int status = A_OK;
A_UINT16 powerState, oldPowerState; A_UINT16 powerState, oldPowerState;
AR6000_WLAN_STATE oldstate = ar->arWlanState; AR6000_WLAN_STATE oldstate = ar->arWlanState;
A_BOOL wlanOff = ar->arWlanOff; A_BOOL wlanOff = ar->arWlanOff;
...@@ -650,12 +650,12 @@ ar6000_update_wlan_pwr_state(struct ar6_softc *ar, AR6000_WLAN_STATE state, A_BO ...@@ -650,12 +650,12 @@ ar6000_update_wlan_pwr_state(struct ar6_softc *ar, AR6000_WLAN_STATE state, A_BO
return status; return status;
} }
A_STATUS int
ar6000_set_bt_hw_state(struct ar6_softc *ar, A_UINT32 enable) ar6000_set_bt_hw_state(struct ar6_softc *ar, A_UINT32 enable)
{ {
#ifdef CONFIG_PM #ifdef CONFIG_PM
A_BOOL off = (enable == 0); A_BOOL off = (enable == 0);
A_STATUS status; int status;
if (ar->arBTOff == off) { if (ar->arBTOff == off) {
return A_OK; return A_OK;
} }
...@@ -667,10 +667,10 @@ ar6000_set_bt_hw_state(struct ar6_softc *ar, A_UINT32 enable) ...@@ -667,10 +667,10 @@ ar6000_set_bt_hw_state(struct ar6_softc *ar, A_UINT32 enable)
#endif #endif
} }
A_STATUS int
ar6000_set_wlan_state(struct ar6_softc *ar, AR6000_WLAN_STATE state) ar6000_set_wlan_state(struct ar6_softc *ar, AR6000_WLAN_STATE state)
{ {
A_STATUS status; int status;
A_BOOL off = (state == WLAN_DISABLED); A_BOOL off = (state == WLAN_DISABLED);
if (ar->arWlanOff == off) { if (ar->arWlanOff == off) {
return A_OK; return A_OK;
......
...@@ -111,10 +111,10 @@ ar6000_htc_raw_write_cb(void *Context, HTC_PACKET *pPacket) ...@@ -111,10 +111,10 @@ ar6000_htc_raw_write_cb(void *Context, HTC_PACKET *pPacket)
} }
/* connect to a service */ /* connect to a service */
static A_STATUS ar6000_connect_raw_service(AR_SOFTC_T *ar, static int ar6000_connect_raw_service(AR_SOFTC_T *ar,
HTC_RAW_STREAM_ID StreamID) HTC_RAW_STREAM_ID StreamID)
{ {
A_STATUS status; int status;
HTC_SERVICE_CONNECT_RESP response; HTC_SERVICE_CONNECT_RESP response;
A_UINT8 streamNo; A_UINT8 streamNo;
HTC_SERVICE_CONNECT_REQ connect; HTC_SERVICE_CONNECT_REQ connect;
...@@ -168,7 +168,7 @@ static A_STATUS ar6000_connect_raw_service(AR_SOFTC_T *ar, ...@@ -168,7 +168,7 @@ static A_STATUS ar6000_connect_raw_service(AR_SOFTC_T *ar,
int ar6000_htc_raw_open(AR_SOFTC_T *ar) int ar6000_htc_raw_open(AR_SOFTC_T *ar)
{ {
A_STATUS status; int status;
int streamID, endPt, count2; int streamID, endPt, count2;
raw_htc_buffer *buffer; raw_htc_buffer *buffer;
HTC_SERVICE_ID servicepriority; HTC_SERVICE_ID servicepriority;
......
...@@ -120,7 +120,7 @@ static int btpal_send_frame(struct sk_buff *skb) ...@@ -120,7 +120,7 @@ static int btpal_send_frame(struct sk_buff *skb)
struct hci_dev *hdev = (struct hci_dev *)skb->dev; struct hci_dev *hdev = (struct hci_dev *)skb->dev;
HCI_TRANSPORT_PACKET_TYPE type; HCI_TRANSPORT_PACKET_TYPE type;
ar6k_hci_pal_info_t *pHciPalInfo; ar6k_hci_pal_info_t *pHciPalInfo;
A_STATUS status = A_OK; int status = A_OK;
struct sk_buff *txSkb = NULL; struct sk_buff *txSkb = NULL;
AR_SOFTC_T *ar; AR_SOFTC_T *ar;
...@@ -269,9 +269,9 @@ static void bt_cleanup_hci_pal(ar6k_hci_pal_info_t *pHciPalInfo) ...@@ -269,9 +269,9 @@ static void bt_cleanup_hci_pal(ar6k_hci_pal_info_t *pHciPalInfo)
/********************************************************* /*********************************************************
* Allocate HCI device and store in PAL private info structure. * Allocate HCI device and store in PAL private info structure.
*********************************************************/ *********************************************************/
static A_STATUS bt_setup_hci_pal(ar6k_hci_pal_info_t *pHciPalInfo) static int bt_setup_hci_pal(ar6k_hci_pal_info_t *pHciPalInfo)
{ {
A_STATUS status = A_OK; int status = A_OK;
struct hci_dev *pHciDev = NULL; struct hci_dev *pHciDev = NULL;
if (!setupbtdev) { if (!setupbtdev) {
...@@ -402,9 +402,9 @@ A_BOOL ar6k_pal_recv_pkt(void *pHciPal, void *osbuf) ...@@ -402,9 +402,9 @@ A_BOOL ar6k_pal_recv_pkt(void *pHciPal, void *osbuf)
* Registers a HCI device. * Registers a HCI device.
* Registers packet receive callback function with ar6k * Registers packet receive callback function with ar6k
**********************************************************/ **********************************************************/
A_STATUS ar6k_setup_hci_pal(void *ar_p) int ar6k_setup_hci_pal(void *ar_p)
{ {
A_STATUS status = A_OK; int status = A_OK;
ar6k_hci_pal_info_t *pHciPalInfo; ar6k_hci_pal_info_t *pHciPalInfo;
ar6k_pal_config_t ar6k_pal_config; ar6k_pal_config_t ar6k_pal_config;
AR_SOFTC_T *ar = (AR_SOFTC_T *)ar_p; AR_SOFTC_T *ar = (AR_SOFTC_T *)ar_p;
...@@ -443,7 +443,7 @@ A_STATUS ar6k_setup_hci_pal(void *ar_p) ...@@ -443,7 +443,7 @@ A_STATUS ar6k_setup_hci_pal(void *ar_p)
return status; return status;
} }
#else /* AR6K_ENABLE_HCI_PAL */ #else /* AR6K_ENABLE_HCI_PAL */
A_STATUS ar6k_setup_hci_pal(void *ar_p) int ar6k_setup_hci_pal(void *ar_p)
{ {
return A_OK; return A_OK;
} }
...@@ -457,7 +457,7 @@ void ar6k_cleanup_hci_pal(void *ar_p) ...@@ -457,7 +457,7 @@ void ar6k_cleanup_hci_pal(void *ar_p)
* Register init and callback function with ar6k * Register init and callback function with ar6k
* when PAL driver is a separate kernel module. * when PAL driver is a separate kernel module.
****************************************************/ ****************************************************/
A_STATUS ar6k_register_hci_pal(HCI_TRANSPORT_CALLBACKS *hciTransCallbacks); int ar6k_register_hci_pal(HCI_TRANSPORT_CALLBACKS *hciTransCallbacks);
static int __init pal_init_module(void) static int __init pal_init_module(void)
{ {
HCI_TRANSPORT_CALLBACKS hciTransCallbacks; HCI_TRANSPORT_CALLBACKS hciTransCallbacks;
......
...@@ -245,7 +245,7 @@ ar6k_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev, ...@@ -245,7 +245,7 @@ ar6k_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev,
struct cfg80211_connect_params *sme) struct cfg80211_connect_params *sme)
{ {
AR_SOFTC_T *ar = ar6k_priv(dev); AR_SOFTC_T *ar = ar6k_priv(dev);
A_STATUS status; int status;
AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("%s: \n", __func__)); AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("%s: \n", __func__));
...@@ -780,7 +780,7 @@ ar6k_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev, ...@@ -780,7 +780,7 @@ ar6k_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev,
} }
void void
ar6k_cfg80211_scanComplete_event(AR_SOFTC_T *ar, A_STATUS status) ar6k_cfg80211_scanComplete_event(AR_SOFTC_T *ar, int status)
{ {
AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("%s: status %d\n", __func__, status)); AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("%s: status %d\n", __func__, status));
...@@ -815,7 +815,7 @@ ar6k_cfg80211_add_key(struct wiphy *wiphy, struct net_device *ndev, ...@@ -815,7 +815,7 @@ ar6k_cfg80211_add_key(struct wiphy *wiphy, struct net_device *ndev,
struct ar_key *key = NULL; struct ar_key *key = NULL;
A_UINT8 key_usage; A_UINT8 key_usage;
A_UINT8 key_type; A_UINT8 key_type;
A_STATUS status = 0; int status = 0;
AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("%s:\n", __func__)); AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("%s:\n", __func__));
...@@ -982,7 +982,7 @@ ar6k_cfg80211_set_default_key(struct wiphy *wiphy, struct net_device *ndev, ...@@ -982,7 +982,7 @@ ar6k_cfg80211_set_default_key(struct wiphy *wiphy, struct net_device *ndev,
{ {
AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(ndev); AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(ndev);
struct ar_key *key = NULL; struct ar_key *key = NULL;
A_STATUS status = A_OK; int status = A_OK;
AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("%s: index %d\n", __func__, key_index)); AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("%s: index %d\n", __func__, key_index));
...@@ -1269,7 +1269,7 @@ ar6k_cfg80211_join_ibss(struct wiphy *wiphy, struct net_device *dev, ...@@ -1269,7 +1269,7 @@ ar6k_cfg80211_join_ibss(struct wiphy *wiphy, struct net_device *dev,
struct cfg80211_ibss_params *ibss_param) struct cfg80211_ibss_params *ibss_param)
{ {
AR_SOFTC_T *ar = ar6k_priv(dev); AR_SOFTC_T *ar = ar6k_priv(dev);
A_STATUS status; int status;
AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("%s: \n", __func__)); AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("%s: \n", __func__));
......
...@@ -38,20 +38,20 @@ ...@@ -38,20 +38,20 @@
HCI_TRANSPORT_HANDLE (*_HCI_TransportAttach)(void *HTCHandle, HCI_TRANSPORT_CONFIG_INFO *pInfo); HCI_TRANSPORT_HANDLE (*_HCI_TransportAttach)(void *HTCHandle, HCI_TRANSPORT_CONFIG_INFO *pInfo);
void (*_HCI_TransportDetach)(HCI_TRANSPORT_HANDLE HciTrans); void (*_HCI_TransportDetach)(HCI_TRANSPORT_HANDLE HciTrans);
A_STATUS (*_HCI_TransportAddReceivePkts)(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET_QUEUE *pQueue); int (*_HCI_TransportAddReceivePkts)(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET_QUEUE *pQueue);
A_STATUS (*_HCI_TransportSendPkt)(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET *pPacket, A_BOOL Synchronous); int (*_HCI_TransportSendPkt)(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET *pPacket, A_BOOL Synchronous);
void (*_HCI_TransportStop)(HCI_TRANSPORT_HANDLE HciTrans); void (*_HCI_TransportStop)(HCI_TRANSPORT_HANDLE HciTrans);
A_STATUS (*_HCI_TransportStart)(HCI_TRANSPORT_HANDLE HciTrans); int (*_HCI_TransportStart)(HCI_TRANSPORT_HANDLE HciTrans);
A_STATUS (*_HCI_TransportEnableDisableAsyncRecv)(HCI_TRANSPORT_HANDLE HciTrans, A_BOOL Enable); int (*_HCI_TransportEnableDisableAsyncRecv)(HCI_TRANSPORT_HANDLE HciTrans, A_BOOL Enable);
A_STATUS (*_HCI_TransportRecvHCIEventSync)(HCI_TRANSPORT_HANDLE HciTrans, int (*_HCI_TransportRecvHCIEventSync)(HCI_TRANSPORT_HANDLE HciTrans,
HTC_PACKET *pPacket, HTC_PACKET *pPacket,
int MaxPollMS); int MaxPollMS);
A_STATUS (*_HCI_TransportSetBaudRate)(HCI_TRANSPORT_HANDLE HciTrans, A_UINT32 Baud); int (*_HCI_TransportSetBaudRate)(HCI_TRANSPORT_HANDLE HciTrans, A_UINT32 Baud);
A_STATUS (*_HCI_TransportEnablePowerMgmt)(HCI_TRANSPORT_HANDLE HciTrans, A_BOOL Enable); int (*_HCI_TransportEnablePowerMgmt)(HCI_TRANSPORT_HANDLE HciTrans, A_BOOL Enable);
extern HCI_TRANSPORT_CALLBACKS ar6kHciTransCallbacks; extern HCI_TRANSPORT_CALLBACKS ar6kHciTransCallbacks;
A_STATUS ar6000_register_hci_transport(HCI_TRANSPORT_CALLBACKS *hciTransCallbacks) int ar6000_register_hci_transport(HCI_TRANSPORT_CALLBACKS *hciTransCallbacks)
{ {
ar6kHciTransCallbacks = *hciTransCallbacks; ar6kHciTransCallbacks = *hciTransCallbacks;
...@@ -69,10 +69,10 @@ A_STATUS ar6000_register_hci_transport(HCI_TRANSPORT_CALLBACKS *hciTransCallback ...@@ -69,10 +69,10 @@ A_STATUS ar6000_register_hci_transport(HCI_TRANSPORT_CALLBACKS *hciTransCallback
return A_OK; return A_OK;
} }
A_STATUS int
ar6000_get_hif_dev(HIF_DEVICE *device, void *config) ar6000_get_hif_dev(HIF_DEVICE *device, void *config)
{ {
A_STATUS status; int status;
status = HIFConfigureDevice(device, status = HIFConfigureDevice(device,
HIF_DEVICE_GET_OS_DEVICE, HIF_DEVICE_GET_OS_DEVICE,
...@@ -81,13 +81,13 @@ ar6000_get_hif_dev(HIF_DEVICE *device, void *config) ...@@ -81,13 +81,13 @@ ar6000_get_hif_dev(HIF_DEVICE *device, void *config)
return status; return status;
} }
A_STATUS ar6000_set_uart_config(HIF_DEVICE *hifDevice, int ar6000_set_uart_config(HIF_DEVICE *hifDevice,
A_UINT32 scale, A_UINT32 scale,
A_UINT32 step) A_UINT32 step)
{ {
A_UINT32 regAddress; A_UINT32 regAddress;
A_UINT32 regVal; A_UINT32 regVal;
A_STATUS status; int status;
regAddress = WLAN_UART_BASE_ADDRESS | UART_CLKDIV_ADDRESS; regAddress = WLAN_UART_BASE_ADDRESS | UART_CLKDIV_ADDRESS;
regVal = ((A_UINT32)scale << 16) | step; regVal = ((A_UINT32)scale << 16) | step;
...@@ -97,10 +97,10 @@ A_STATUS ar6000_set_uart_config(HIF_DEVICE *hifDevice, ...@@ -97,10 +97,10 @@ A_STATUS ar6000_set_uart_config(HIF_DEVICE *hifDevice,
return status; return status;
} }
A_STATUS ar6000_get_core_clock_config(HIF_DEVICE *hifDevice, A_UINT32 *data) int ar6000_get_core_clock_config(HIF_DEVICE *hifDevice, A_UINT32 *data)
{ {
A_UINT32 regAddress; A_UINT32 regAddress;
A_STATUS status; int status;
regAddress = WLAN_RTC_BASE_ADDRESS | WLAN_CPU_CLOCK_ADDRESS; regAddress = WLAN_RTC_BASE_ADDRESS | WLAN_CPU_CLOCK_ADDRESS;
/* read CPU clock settings*/ /* read CPU clock settings*/
......
...@@ -106,9 +106,9 @@ AR3K_CONFIG_INFO ar3kconfig; ...@@ -106,9 +106,9 @@ AR3K_CONFIG_INFO ar3kconfig;
AR6K_HCI_BRIDGE_INFO *g_pHcidevInfo; AR6K_HCI_BRIDGE_INFO *g_pHcidevInfo;
#endif #endif
static A_STATUS bt_setup_hci(AR6K_HCI_BRIDGE_INFO *pHcidevInfo); static int bt_setup_hci(AR6K_HCI_BRIDGE_INFO *pHcidevInfo);
static void bt_cleanup_hci(AR6K_HCI_BRIDGE_INFO *pHcidevInfo); static void bt_cleanup_hci(AR6K_HCI_BRIDGE_INFO *pHcidevInfo);
static A_STATUS bt_register_hci(AR6K_HCI_BRIDGE_INFO *pHcidevInfo); static int bt_register_hci(AR6K_HCI_BRIDGE_INFO *pHcidevInfo);
static A_BOOL bt_indicate_recv(AR6K_HCI_BRIDGE_INFO *pHcidevInfo, static A_BOOL bt_indicate_recv(AR6K_HCI_BRIDGE_INFO *pHcidevInfo,
HCI_TRANSPORT_PACKET_TYPE Type, HCI_TRANSPORT_PACKET_TYPE Type,
struct sk_buff *skb); struct sk_buff *skb);
...@@ -116,14 +116,14 @@ static struct sk_buff *bt_alloc_buffer(AR6K_HCI_BRIDGE_INFO *pHcidevInfo, int Le ...@@ -116,14 +116,14 @@ static struct sk_buff *bt_alloc_buffer(AR6K_HCI_BRIDGE_INFO *pHcidevInfo, int Le
static void bt_free_buffer(AR6K_HCI_BRIDGE_INFO *pHcidevInfo, struct sk_buff *skb); static void bt_free_buffer(AR6K_HCI_BRIDGE_INFO *pHcidevInfo, struct sk_buff *skb);
#ifdef EXPORT_HCI_BRIDGE_INTERFACE #ifdef EXPORT_HCI_BRIDGE_INTERFACE
A_STATUS ar6000_setup_hci(void *ar); int ar6000_setup_hci(void *ar);
void ar6000_cleanup_hci(void *ar); void ar6000_cleanup_hci(void *ar);
A_STATUS hci_test_send(void *ar, struct sk_buff *skb); int hci_test_send(void *ar, struct sk_buff *skb);
#else #else
A_STATUS ar6000_setup_hci(AR_SOFTC_T *ar); int ar6000_setup_hci(AR_SOFTC_T *ar);
void ar6000_cleanup_hci(AR_SOFTC_T *ar); void ar6000_cleanup_hci(AR_SOFTC_T *ar);
/* HCI bridge testing */ /* HCI bridge testing */
A_STATUS hci_test_send(AR_SOFTC_T *ar, struct sk_buff *skb); int hci_test_send(AR_SOFTC_T *ar, struct sk_buff *skb);
#endif /* EXPORT_HCI_BRIDGE_INTERFACE */ #endif /* EXPORT_HCI_BRIDGE_INTERFACE */
#define LOCK_BRIDGE(dev) spin_lock_bh(&(dev)->BridgeLock) #define LOCK_BRIDGE(dev) spin_lock_bh(&(dev)->BridgeLock)
...@@ -215,12 +215,12 @@ static void RefillRecvBuffers(AR6K_HCI_BRIDGE_INFO *pHcidevInfo, ...@@ -215,12 +215,12 @@ static void RefillRecvBuffers(AR6K_HCI_BRIDGE_INFO *pHcidevInfo,
#define HOST_INTEREST_ITEM_ADDRESS(ar, item) \ #define HOST_INTEREST_ITEM_ADDRESS(ar, item) \
(((ar)->arTargetType == TARGET_TYPE_AR6002) ? AR6002_HOST_INTEREST_ITEM_ADDRESS(item) : \ (((ar)->arTargetType == TARGET_TYPE_AR6002) ? AR6002_HOST_INTEREST_ITEM_ADDRESS(item) : \
(((ar)->arTargetType == TARGET_TYPE_AR6003) ? AR6003_HOST_INTEREST_ITEM_ADDRESS(item) : 0)) (((ar)->arTargetType == TARGET_TYPE_AR6003) ? AR6003_HOST_INTEREST_ITEM_ADDRESS(item) : 0))
static A_STATUS ar6000_hci_transport_ready(HCI_TRANSPORT_HANDLE HCIHandle, static int ar6000_hci_transport_ready(HCI_TRANSPORT_HANDLE HCIHandle,
HCI_TRANSPORT_PROPERTIES *pProps, HCI_TRANSPORT_PROPERTIES *pProps,
void *pContext) void *pContext)
{ {
AR6K_HCI_BRIDGE_INFO *pHcidevInfo = (AR6K_HCI_BRIDGE_INFO *)pContext; AR6K_HCI_BRIDGE_INFO *pHcidevInfo = (AR6K_HCI_BRIDGE_INFO *)pContext;
A_STATUS status; int status;
A_UINT32 address, hci_uart_pwr_mgmt_params; A_UINT32 address, hci_uart_pwr_mgmt_params;
// AR3K_CONFIG_INFO ar3kconfig; // AR3K_CONFIG_INFO ar3kconfig;
...@@ -323,7 +323,7 @@ static A_STATUS ar6000_hci_transport_ready(HCI_TRANSPORT_HANDLE HCIHandle, ...@@ -323,7 +323,7 @@ static A_STATUS ar6000_hci_transport_ready(HCI_TRANSPORT_HANDLE HCIHandle,
return status; return status;
} }
static void ar6000_hci_transport_failure(void *pContext, A_STATUS Status) static void ar6000_hci_transport_failure(void *pContext, int Status)
{ {
AR6K_HCI_BRIDGE_INFO *pHcidevInfo = (AR6K_HCI_BRIDGE_INFO *)pContext; AR6K_HCI_BRIDGE_INFO *pHcidevInfo = (AR6K_HCI_BRIDGE_INFO *)pContext;
...@@ -464,13 +464,13 @@ static HCI_SEND_FULL_ACTION ar6000_hci_pkt_send_full(void *pContext, HTC_PACKET ...@@ -464,13 +464,13 @@ static HCI_SEND_FULL_ACTION ar6000_hci_pkt_send_full(void *pContext, HTC_PACKET
} }
#ifdef EXPORT_HCI_BRIDGE_INTERFACE #ifdef EXPORT_HCI_BRIDGE_INTERFACE
A_STATUS ar6000_setup_hci(void *ar) int ar6000_setup_hci(void *ar)
#else #else
A_STATUS ar6000_setup_hci(AR_SOFTC_T *ar) int ar6000_setup_hci(AR_SOFTC_T *ar)
#endif #endif
{ {
HCI_TRANSPORT_CONFIG_INFO config; HCI_TRANSPORT_CONFIG_INFO config;
A_STATUS status = A_OK; int status = A_OK;
int i; int i;
HTC_PACKET *pPacket; HTC_PACKET *pPacket;
AR6K_HCI_BRIDGE_INFO *pHcidevInfo; AR6K_HCI_BRIDGE_INFO *pHcidevInfo;
...@@ -596,9 +596,9 @@ void ar6000_cleanup_hci(AR_SOFTC_T *ar) ...@@ -596,9 +596,9 @@ void ar6000_cleanup_hci(AR_SOFTC_T *ar)
} }
#ifdef EXPORT_HCI_BRIDGE_INTERFACE #ifdef EXPORT_HCI_BRIDGE_INTERFACE
A_STATUS hci_test_send(void *ar, struct sk_buff *skb) int hci_test_send(void *ar, struct sk_buff *skb)
#else #else
A_STATUS hci_test_send(AR_SOFTC_T *ar, struct sk_buff *skb) int hci_test_send(AR_SOFTC_T *ar, struct sk_buff *skb)
#endif #endif
{ {
int status = A_OK; int status = A_OK;
...@@ -712,7 +712,7 @@ static int bt_send_frame(struct sk_buff *skb) ...@@ -712,7 +712,7 @@ static int bt_send_frame(struct sk_buff *skb)
HCI_TRANSPORT_PACKET_TYPE type; HCI_TRANSPORT_PACKET_TYPE type;
AR6K_HCI_BRIDGE_INFO *pHcidevInfo; AR6K_HCI_BRIDGE_INFO *pHcidevInfo;
HTC_PACKET *pPacket; HTC_PACKET *pPacket;
A_STATUS status = A_OK; int status = A_OK;
struct sk_buff *txSkb = NULL; struct sk_buff *txSkb = NULL;
if (!hdev) { if (!hdev) {
...@@ -853,9 +853,9 @@ static void bt_destruct(struct hci_dev *hdev) ...@@ -853,9 +853,9 @@ static void bt_destruct(struct hci_dev *hdev)
/* nothing to do here */ /* nothing to do here */
} }
static A_STATUS bt_setup_hci(AR6K_HCI_BRIDGE_INFO *pHcidevInfo) static int bt_setup_hci(AR6K_HCI_BRIDGE_INFO *pHcidevInfo)
{ {
A_STATUS status = A_OK; int status = A_OK;
struct hci_dev *pHciDev = NULL; struct hci_dev *pHciDev = NULL;
HIF_DEVICE_OS_DEVICE_INFO osDevInfo; HIF_DEVICE_OS_DEVICE_INFO osDevInfo;
...@@ -935,10 +935,10 @@ static void bt_cleanup_hci(AR6K_HCI_BRIDGE_INFO *pHcidevInfo) ...@@ -935,10 +935,10 @@ static void bt_cleanup_hci(AR6K_HCI_BRIDGE_INFO *pHcidevInfo)
} }
} }
static A_STATUS bt_register_hci(AR6K_HCI_BRIDGE_INFO *pHcidevInfo) static int bt_register_hci(AR6K_HCI_BRIDGE_INFO *pHcidevInfo)
{ {
int err; int err;
A_STATUS status = A_OK; int status = A_OK;
do { do {
AR_DEBUG_PRINTF(ATH_DEBUG_HCI_BRIDGE, ("HCI Bridge: registering HCI... \n")); AR_DEBUG_PRINTF(ATH_DEBUG_HCI_BRIDGE, ("HCI Bridge: registering HCI... \n"));
...@@ -1041,7 +1041,7 @@ static void bt_free_buffer(AR6K_HCI_BRIDGE_INFO *pHcidevInfo, struct sk_buff *sk ...@@ -1041,7 +1041,7 @@ static void bt_free_buffer(AR6K_HCI_BRIDGE_INFO *pHcidevInfo, struct sk_buff *sk
#else // { CONFIG_BLUEZ_HCI_BRIDGE #else // { CONFIG_BLUEZ_HCI_BRIDGE
/* stubs when we only want to test the HCI bridging Interface without the HT stack */ /* stubs when we only want to test the HCI bridging Interface without the HT stack */
static A_STATUS bt_setup_hci(AR6K_HCI_BRIDGE_INFO *pHcidevInfo) static int bt_setup_hci(AR6K_HCI_BRIDGE_INFO *pHcidevInfo)
{ {
return A_OK; return A_OK;
} }
...@@ -1049,7 +1049,7 @@ static void bt_cleanup_hci(AR6K_HCI_BRIDGE_INFO *pHcidevInfo) ...@@ -1049,7 +1049,7 @@ static void bt_cleanup_hci(AR6K_HCI_BRIDGE_INFO *pHcidevInfo)
{ {
} }
static A_STATUS bt_register_hci(AR6K_HCI_BRIDGE_INFO *pHcidevInfo) static int bt_register_hci(AR6K_HCI_BRIDGE_INFO *pHcidevInfo)
{ {
A_ASSERT(FALSE); A_ASSERT(FALSE);
return A_ERROR; return A_ERROR;
...@@ -1080,9 +1080,9 @@ static void bt_free_buffer(AR6K_HCI_BRIDGE_INFO *pHcidevInfo, struct sk_buff *sk ...@@ -1080,9 +1080,9 @@ static void bt_free_buffer(AR6K_HCI_BRIDGE_INFO *pHcidevInfo, struct sk_buff *sk
/* stubs when GMBOX support is not needed */ /* stubs when GMBOX support is not needed */
#ifdef EXPORT_HCI_BRIDGE_INTERFACE #ifdef EXPORT_HCI_BRIDGE_INTERFACE
A_STATUS ar6000_setup_hci(void *ar) int ar6000_setup_hci(void *ar)
#else #else
A_STATUS ar6000_setup_hci(AR_SOFTC_T *ar) int ar6000_setup_hci(AR_SOFTC_T *ar)
#endif #endif
{ {
return A_OK; return A_OK;
...@@ -1120,7 +1120,7 @@ int hci_test_send(AR_SOFTC_T *ar, struct sk_buff *skb) ...@@ -1120,7 +1120,7 @@ int hci_test_send(AR_SOFTC_T *ar, struct sk_buff *skb)
static int __init static int __init
hcibridge_init_module(void) hcibridge_init_module(void)
{ {
A_STATUS status; int status;
HCI_TRANSPORT_CALLBACKS hciTransCallbacks; HCI_TRANSPORT_CALLBACKS hciTransCallbacks;
hciTransCallbacks.setupTransport = ar6000_setup_hci; hciTransCallbacks.setupTransport = ar6000_setup_hci;
......
...@@ -121,8 +121,8 @@ struct USER_SAVEDKEYS { ...@@ -121,8 +121,8 @@ struct USER_SAVEDKEYS {
#define DBG_DEFAULTS (DBG_ERROR|DBG_WARNING) #define DBG_DEFAULTS (DBG_ERROR|DBG_WARNING)
A_STATUS ar6000_ReadRegDiag(HIF_DEVICE *hifDevice, A_UINT32 *address, A_UINT32 *data); int ar6000_ReadRegDiag(HIF_DEVICE *hifDevice, A_UINT32 *address, A_UINT32 *data);
A_STATUS ar6000_WriteRegDiag(HIF_DEVICE *hifDevice, A_UINT32 *address, A_UINT32 *data); int ar6000_WriteRegDiag(HIF_DEVICE *hifDevice, A_UINT32 *address, A_UINT32 *data);
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
...@@ -737,12 +737,12 @@ remove_sta(AR_SOFTC_T *ar, A_UINT8 *mac, A_UINT16 reason); ...@@ -737,12 +737,12 @@ remove_sta(AR_SOFTC_T *ar, A_UINT8 *mac, A_UINT16 reason);
/* HCI support */ /* HCI support */
#ifndef EXPORT_HCI_BRIDGE_INTERFACE #ifndef EXPORT_HCI_BRIDGE_INTERFACE
A_STATUS ar6000_setup_hci(AR_SOFTC_T *ar); int ar6000_setup_hci(AR_SOFTC_T *ar);
void ar6000_cleanup_hci(AR_SOFTC_T *ar); void ar6000_cleanup_hci(AR_SOFTC_T *ar);
void ar6000_set_default_ar3kconfig(AR_SOFTC_T *ar, void *ar3kconfig); void ar6000_set_default_ar3kconfig(AR_SOFTC_T *ar, void *ar3kconfig);
/* HCI bridge testing */ /* HCI bridge testing */
A_STATUS hci_test_send(AR_SOFTC_T *ar, struct sk_buff *skb); int hci_test_send(AR_SOFTC_T *ar, struct sk_buff *skb);
#endif #endif
ATH_DEBUG_DECLARE_EXTERN(htc); ATH_DEBUG_DECLARE_EXTERN(htc);
......
...@@ -31,7 +31,7 @@ struct ar6_softc; ...@@ -31,7 +31,7 @@ struct ar6_softc;
void ar6000_ready_event(void *devt, A_UINT8 *datap, A_UINT8 phyCap, void ar6000_ready_event(void *devt, A_UINT8 *datap, A_UINT8 phyCap,
A_UINT32 sw_ver, A_UINT32 abi_ver); A_UINT32 sw_ver, A_UINT32 abi_ver);
A_STATUS ar6000_control_tx(void *devt, void *osbuf, HTC_ENDPOINT_ID eid); int ar6000_control_tx(void *devt, void *osbuf, HTC_ENDPOINT_ID eid);
void ar6000_connect_event(struct ar6_softc *ar, A_UINT16 channel, void ar6000_connect_event(struct ar6_softc *ar, A_UINT16 channel,
A_UINT8 *bssid, A_UINT16 listenInterval, A_UINT8 *bssid, A_UINT16 listenInterval,
A_UINT16 beaconInterval, NETWORK_TYPE networkType, A_UINT16 beaconInterval, NETWORK_TYPE networkType,
...@@ -50,7 +50,7 @@ void ar6000_keepalive_rx(void *devt, A_UINT8 configured); ...@@ -50,7 +50,7 @@ void ar6000_keepalive_rx(void *devt, A_UINT8 configured);
void ar6000_neighborReport_event(struct ar6_softc *ar, int numAps, void ar6000_neighborReport_event(struct ar6_softc *ar, int numAps,
WMI_NEIGHBOR_INFO *info); WMI_NEIGHBOR_INFO *info);
void ar6000_set_numdataendpts(struct ar6_softc *ar, A_UINT32 num); void ar6000_set_numdataendpts(struct ar6_softc *ar, A_UINT32 num);
void ar6000_scanComplete_event(struct ar6_softc *ar, A_STATUS status); void ar6000_scanComplete_event(struct ar6_softc *ar, int status);
void ar6000_targetStats_event(struct ar6_softc *ar, A_UINT8 *ptr, A_UINT32 len); void ar6000_targetStats_event(struct ar6_softc *ar, A_UINT8 *ptr, A_UINT32 len);
void ar6000_rssiThreshold_event(struct ar6_softc *ar, void ar6000_rssiThreshold_event(struct ar6_softc *ar,
WMI_RSSI_THRESHOLD_VAL newThreshold, WMI_RSSI_THRESHOLD_VAL newThreshold,
...@@ -103,7 +103,7 @@ void ar6000_lqThresholdEvent_rx(void *devt, WMI_LQ_THRESHOLD_VAL range, A_UINT8 ...@@ -103,7 +103,7 @@ void ar6000_lqThresholdEvent_rx(void *devt, WMI_LQ_THRESHOLD_VAL range, A_UINT8
void ar6000_ratemask_rx(void *devt, A_UINT32 ratemask); void ar6000_ratemask_rx(void *devt, A_UINT32 ratemask);
A_STATUS ar6000_get_driver_cfg(struct net_device *dev, int ar6000_get_driver_cfg(struct net_device *dev,
A_UINT16 cfgParam, A_UINT16 cfgParam,
void *result); void *result);
void ar6000_bssInfo_event_rx(struct ar6_softc *ar, A_UINT8 *data, int len); void ar6000_bssInfo_event_rx(struct ar6_softc *ar, A_UINT8 *data, int len);
...@@ -149,12 +149,12 @@ A_UINT32 ar6000_getclkfreq (void); ...@@ -149,12 +149,12 @@ A_UINT32 ar6000_getclkfreq (void);
int ar6000_ap_mode_profile_commit(struct ar6_softc *ar); int ar6000_ap_mode_profile_commit(struct ar6_softc *ar);
struct ieee80211req_wpaie; struct ieee80211req_wpaie;
A_STATUS int
ar6000_ap_mode_get_wpa_ie(struct ar6_softc *ar, struct ieee80211req_wpaie *wpaie); ar6000_ap_mode_get_wpa_ie(struct ar6_softc *ar, struct ieee80211req_wpaie *wpaie);
A_STATUS is_iwioctl_allowed(A_UINT8 mode, A_UINT16 cmd); int is_iwioctl_allowed(A_UINT8 mode, A_UINT16 cmd);
A_STATUS is_xioctl_allowed(A_UINT8 mode, int cmd); int is_xioctl_allowed(A_UINT8 mode, int cmd);
void ar6000_pspoll_event(struct ar6_softc *ar,A_UINT8 aid); void ar6000_pspoll_event(struct ar6_softc *ar,A_UINT8 aid);
...@@ -170,15 +170,15 @@ int ap_set_wapi_key(struct ar6_softc *ar, void *ik); ...@@ -170,15 +170,15 @@ int ap_set_wapi_key(struct ar6_softc *ar, void *ik);
void ap_wapi_rekey_event(struct ar6_softc *ar, A_UINT8 type, A_UINT8 *mac); void ap_wapi_rekey_event(struct ar6_softc *ar, A_UINT8 type, A_UINT8 *mac);
#endif #endif
A_STATUS ar6000_connect_to_ap(struct ar6_softc *ar); int ar6000_connect_to_ap(struct ar6_softc *ar);
A_STATUS ar6000_update_wlan_pwr_state(struct ar6_softc *ar, AR6000_WLAN_STATE state, A_BOOL suspending); int ar6000_update_wlan_pwr_state(struct ar6_softc *ar, AR6000_WLAN_STATE state, A_BOOL suspending);
A_STATUS ar6000_set_wlan_state(struct ar6_softc *ar, AR6000_WLAN_STATE state); int ar6000_set_wlan_state(struct ar6_softc *ar, AR6000_WLAN_STATE state);
A_STATUS ar6000_set_bt_hw_state(struct ar6_softc *ar, A_UINT32 state); int ar6000_set_bt_hw_state(struct ar6_softc *ar, A_UINT32 state);
#ifdef CONFIG_PM #ifdef CONFIG_PM
A_STATUS ar6000_suspend_ev(void *context); int ar6000_suspend_ev(void *context);
A_STATUS ar6000_resume_ev(void *context); int ar6000_resume_ev(void *context);
A_STATUS ar6000_power_change_ev(void *context, A_UINT32 config); int ar6000_power_change_ev(void *context, A_UINT32 config);
void ar6000_check_wow_status(struct ar6_softc *ar, struct sk_buff *skb, A_BOOL isEvent); void ar6000_check_wow_status(struct ar6_softc *ar, struct sk_buff *skb, A_BOOL isEvent);
#endif #endif
...@@ -186,8 +186,8 @@ void ar6000_pm_init(void); ...@@ -186,8 +186,8 @@ void ar6000_pm_init(void);
void ar6000_pm_exit(void); void ar6000_pm_exit(void);
#ifdef CONFIG_AP_VIRTUAL_ADAPTER_SUPPORT #ifdef CONFIG_AP_VIRTUAL_ADAPTER_SUPPORT
A_STATUS ar6000_add_ap_interface(struct ar6_softc *ar, char *ifname); int ar6000_add_ap_interface(struct ar6_softc *ar, char *ifname);
A_STATUS ar6000_remove_ap_interface(struct ar6_softc *ar); int ar6000_remove_ap_interface(struct ar6_softc *ar);
#endif /* CONFIG_AP_VIRTUAL_ADAPTER_SUPPORT */ #endif /* CONFIG_AP_VIRTUAL_ADAPTER_SUPPORT */
#ifdef __cplusplus #ifdef __cplusplus
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
struct wireless_dev *ar6k_cfg80211_init(struct device *dev); struct wireless_dev *ar6k_cfg80211_init(struct device *dev);
void ar6k_cfg80211_deinit(AR_SOFTC_T *ar); void ar6k_cfg80211_deinit(AR_SOFTC_T *ar);
void ar6k_cfg80211_scanComplete_event(AR_SOFTC_T *ar, A_STATUS status); void ar6k_cfg80211_scanComplete_event(AR_SOFTC_T *ar, int status);
void ar6k_cfg80211_connect_event(AR_SOFTC_T *ar, A_UINT16 channel, void ar6k_cfg80211_connect_event(AR_SOFTC_T *ar, A_UINT16 channel,
A_UINT8 *bssid, A_UINT16 listenInterval, A_UINT8 *bssid, A_UINT16 listenInterval,
......
...@@ -27,16 +27,16 @@ ...@@ -27,16 +27,16 @@
extern HCI_TRANSPORT_HANDLE (*_HCI_TransportAttach)(void *HTCHandle, HCI_TRANSPORT_CONFIG_INFO *pInfo); extern HCI_TRANSPORT_HANDLE (*_HCI_TransportAttach)(void *HTCHandle, HCI_TRANSPORT_CONFIG_INFO *pInfo);
extern void (*_HCI_TransportDetach)(HCI_TRANSPORT_HANDLE HciTrans); extern void (*_HCI_TransportDetach)(HCI_TRANSPORT_HANDLE HciTrans);
extern A_STATUS (*_HCI_TransportAddReceivePkts)(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET_QUEUE *pQueue); extern int (*_HCI_TransportAddReceivePkts)(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET_QUEUE *pQueue);
extern A_STATUS (*_HCI_TransportSendPkt)(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET *pPacket, A_BOOL Synchronous); extern int (*_HCI_TransportSendPkt)(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET *pPacket, A_BOOL Synchronous);
extern void (*_HCI_TransportStop)(HCI_TRANSPORT_HANDLE HciTrans); extern void (*_HCI_TransportStop)(HCI_TRANSPORT_HANDLE HciTrans);
extern A_STATUS (*_HCI_TransportStart)(HCI_TRANSPORT_HANDLE HciTrans); extern int (*_HCI_TransportStart)(HCI_TRANSPORT_HANDLE HciTrans);
extern A_STATUS (*_HCI_TransportEnableDisableAsyncRecv)(HCI_TRANSPORT_HANDLE HciTrans, A_BOOL Enable); extern int (*_HCI_TransportEnableDisableAsyncRecv)(HCI_TRANSPORT_HANDLE HciTrans, A_BOOL Enable);
extern A_STATUS (*_HCI_TransportRecvHCIEventSync)(HCI_TRANSPORT_HANDLE HciTrans, extern int (*_HCI_TransportRecvHCIEventSync)(HCI_TRANSPORT_HANDLE HciTrans,
HTC_PACKET *pPacket, HTC_PACKET *pPacket,
int MaxPollMS); int MaxPollMS);
extern A_STATUS (*_HCI_TransportSetBaudRate)(HCI_TRANSPORT_HANDLE HciTrans, A_UINT32 Baud); extern int (*_HCI_TransportSetBaudRate)(HCI_TRANSPORT_HANDLE HciTrans, A_UINT32 Baud);
extern A_STATUS (*_HCI_TransportEnablePowerMgmt)(HCI_TRANSPORT_HANDLE HciTrans, A_BOOL Enable); extern int (*_HCI_TransportEnablePowerMgmt)(HCI_TRANSPORT_HANDLE HciTrans, A_BOOL Enable);
#define HCI_TransportAttach(HTCHandle, pInfo) \ #define HCI_TransportAttach(HTCHandle, pInfo) \
...@@ -61,11 +61,11 @@ extern A_STATUS (*_HCI_TransportEnablePowerMgmt)(HCI_TRANSPORT_HANDLE HciTran ...@@ -61,11 +61,11 @@ extern A_STATUS (*_HCI_TransportEnablePowerMgmt)(HCI_TRANSPORT_HANDLE HciTran
_HCI_TransportEnablePowerMgmt((HciTrans), (Enable)) _HCI_TransportEnablePowerMgmt((HciTrans), (Enable))
extern A_STATUS ar6000_register_hci_transport(HCI_TRANSPORT_CALLBACKS *hciTransCallbacks); extern int ar6000_register_hci_transport(HCI_TRANSPORT_CALLBACKS *hciTransCallbacks);
extern A_STATUS ar6000_get_hif_dev(HIF_DEVICE *device, void *config); extern int ar6000_get_hif_dev(HIF_DEVICE *device, void *config);
extern A_STATUS ar6000_set_uart_config(HIF_DEVICE *hifDevice, A_UINT32 scale, A_UINT32 step); extern int ar6000_set_uart_config(HIF_DEVICE *hifDevice, A_UINT32 scale, A_UINT32 step);
/* get core clock register settings /* get core clock register settings
* data: 0 - 40/44MHz * data: 0 - 40/44MHz
...@@ -73,4 +73,4 @@ extern A_STATUS ar6000_set_uart_config(HIF_DEVICE *hifDevice, A_UINT32 scale, A_ ...@@ -73,4 +73,4 @@ extern A_STATUS ar6000_set_uart_config(HIF_DEVICE *hifDevice, A_UINT32 scale, A_
* where (5G band/2.4G band) * where (5G band/2.4G band)
* assume 2.4G band for now * assume 2.4G band for now
*/ */
extern A_STATUS ar6000_get_core_clock_config(HIF_DEVICE *hifDevice, A_UINT32 *data); extern int ar6000_get_core_clock_config(HIF_DEVICE *hifDevice, A_UINT32 *data);
...@@ -307,15 +307,15 @@ void *a_netbuf_alloc_raw(int size); ...@@ -307,15 +307,15 @@ void *a_netbuf_alloc_raw(int size);
void a_netbuf_free(void *bufPtr); void a_netbuf_free(void *bufPtr);
void *a_netbuf_to_data(void *bufPtr); void *a_netbuf_to_data(void *bufPtr);
A_UINT32 a_netbuf_to_len(void *bufPtr); A_UINT32 a_netbuf_to_len(void *bufPtr);
A_STATUS a_netbuf_push(void *bufPtr, A_INT32 len); int a_netbuf_push(void *bufPtr, A_INT32 len);
A_STATUS a_netbuf_push_data(void *bufPtr, char *srcPtr, A_INT32 len); int a_netbuf_push_data(void *bufPtr, char *srcPtr, A_INT32 len);
A_STATUS a_netbuf_put(void *bufPtr, A_INT32 len); int a_netbuf_put(void *bufPtr, A_INT32 len);
A_STATUS a_netbuf_put_data(void *bufPtr, char *srcPtr, A_INT32 len); int a_netbuf_put_data(void *bufPtr, char *srcPtr, A_INT32 len);
A_STATUS a_netbuf_pull(void *bufPtr, A_INT32 len); int a_netbuf_pull(void *bufPtr, A_INT32 len);
A_STATUS a_netbuf_pull_data(void *bufPtr, char *dstPtr, A_INT32 len); int a_netbuf_pull_data(void *bufPtr, char *dstPtr, A_INT32 len);
A_STATUS a_netbuf_trim(void *bufPtr, A_INT32 len); int a_netbuf_trim(void *bufPtr, A_INT32 len);
A_STATUS a_netbuf_trim_data(void *bufPtr, char *dstPtr, A_INT32 len); int a_netbuf_trim_data(void *bufPtr, char *dstPtr, A_INT32 len);
A_STATUS a_netbuf_setlen(void *bufPtr, A_INT32 len); int a_netbuf_setlen(void *bufPtr, A_INT32 len);
A_INT32 a_netbuf_headroom(void *bufPtr); A_INT32 a_netbuf_headroom(void *bufPtr);
void a_netbuf_enqueue(A_NETBUF_QUEUE_T *q, void *pkt); 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_prequeue(A_NETBUF_QUEUE_T *q, void *pkt);
......
...@@ -136,7 +136,7 @@ ar6000_ioctl_set_qos_supp(struct net_device *dev, struct ifreq *rq) ...@@ -136,7 +136,7 @@ ar6000_ioctl_set_qos_supp(struct net_device *dev, struct ifreq *rq)
{ {
AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev);
WMI_SET_QOS_SUPP_CMD cmd; WMI_SET_QOS_SUPP_CMD cmd;
A_STATUS ret; int ret;
if ((dev->flags & IFF_UP) != IFF_UP) { if ((dev->flags & IFF_UP) != IFF_UP) {
return -EIO; return -EIO;
...@@ -171,7 +171,7 @@ ar6000_ioctl_set_wmm(struct net_device *dev, struct ifreq *rq) ...@@ -171,7 +171,7 @@ ar6000_ioctl_set_wmm(struct net_device *dev, struct ifreq *rq)
{ {
AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev);
WMI_SET_WMM_CMD cmd; WMI_SET_WMM_CMD cmd;
A_STATUS ret; int ret;
if ((dev->flags & IFF_UP) != IFF_UP) { if ((dev->flags & IFF_UP) != IFF_UP) {
return -EIO; return -EIO;
...@@ -212,7 +212,7 @@ ar6000_ioctl_set_txop(struct net_device *dev, struct ifreq *rq) ...@@ -212,7 +212,7 @@ ar6000_ioctl_set_txop(struct net_device *dev, struct ifreq *rq)
{ {
AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev);
WMI_SET_WMM_TXOP_CMD cmd; WMI_SET_WMM_TXOP_CMD cmd;
A_STATUS ret; int ret;
if ((dev->flags & IFF_UP) != IFF_UP) { if ((dev->flags & IFF_UP) != IFF_UP) {
return -EIO; return -EIO;
...@@ -246,7 +246,7 @@ static int ...@@ -246,7 +246,7 @@ static int
ar6000_ioctl_get_rd(struct net_device *dev, struct ifreq *rq) ar6000_ioctl_get_rd(struct net_device *dev, struct ifreq *rq)
{ {
AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev);
A_STATUS ret = 0; int ret = 0;
if ((dev->flags & IFF_UP) != IFF_UP || ar->arWmiReady == FALSE) { if ((dev->flags & IFF_UP) != IFF_UP || ar->arWmiReady == FALSE) {
return -EIO; return -EIO;
...@@ -264,7 +264,7 @@ ar6000_ioctl_set_country(struct net_device *dev, struct ifreq *rq) ...@@ -264,7 +264,7 @@ ar6000_ioctl_set_country(struct net_device *dev, struct ifreq *rq)
{ {
AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev);
WMI_AP_SET_COUNTRY_CMD cmd; WMI_AP_SET_COUNTRY_CMD cmd;
A_STATUS ret; int ret;
if ((dev->flags & IFF_UP) != IFF_UP) { if ((dev->flags & IFF_UP) != IFF_UP) {
return -EIO; return -EIO;
...@@ -577,7 +577,7 @@ ar6000_ioctl_create_qos(struct net_device *dev, struct ifreq *rq) ...@@ -577,7 +577,7 @@ ar6000_ioctl_create_qos(struct net_device *dev, struct ifreq *rq)
{ {
AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev);
WMI_CREATE_PSTREAM_CMD cmd; WMI_CREATE_PSTREAM_CMD cmd;
A_STATUS ret; int ret;
if (ar->arWmiReady == FALSE) { if (ar->arWmiReady == FALSE) {
return -EIO; return -EIO;
...@@ -662,7 +662,7 @@ ar6000_ioctl_get_qos_queue(struct net_device *dev, struct ifreq *rq) ...@@ -662,7 +662,7 @@ ar6000_ioctl_get_qos_queue(struct net_device *dev, struct ifreq *rq)
} }
#ifdef CONFIG_HOST_TCMD_SUPPORT #ifdef CONFIG_HOST_TCMD_SUPPORT
static A_STATUS static int
ar6000_ioctl_tcmd_get_rx_report(struct net_device *dev, ar6000_ioctl_tcmd_get_rx_report(struct net_device *dev,
struct ifreq *rq, A_UINT8 *data, A_UINT32 len) struct ifreq *rq, A_UINT8 *data, A_UINT32 len)
{ {
...@@ -1386,7 +1386,7 @@ ar6000_gpio_ack_rx(void) ...@@ -1386,7 +1386,7 @@ ar6000_gpio_ack_rx(void)
wake_up(&arEvent); wake_up(&arEvent);
} }
A_STATUS int
ar6000_gpio_output_set(struct net_device *dev, ar6000_gpio_output_set(struct net_device *dev,
A_UINT32 set_mask, A_UINT32 set_mask,
A_UINT32 clear_mask, A_UINT32 clear_mask,
...@@ -1400,7 +1400,7 @@ ar6000_gpio_output_set(struct net_device *dev, ...@@ -1400,7 +1400,7 @@ ar6000_gpio_output_set(struct net_device *dev,
set_mask, clear_mask, enable_mask, disable_mask); set_mask, clear_mask, enable_mask, disable_mask);
} }
static A_STATUS static int
ar6000_gpio_input_get(struct net_device *dev) ar6000_gpio_input_get(struct net_device *dev)
{ {
AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev);
...@@ -1409,7 +1409,7 @@ ar6000_gpio_input_get(struct net_device *dev) ...@@ -1409,7 +1409,7 @@ ar6000_gpio_input_get(struct net_device *dev)
return wmi_gpio_input_get(ar->arWmi); return wmi_gpio_input_get(ar->arWmi);
} }
static A_STATUS static int
ar6000_gpio_register_set(struct net_device *dev, ar6000_gpio_register_set(struct net_device *dev,
A_UINT32 gpioreg_id, A_UINT32 gpioreg_id,
A_UINT32 value) A_UINT32 value)
...@@ -1420,7 +1420,7 @@ ar6000_gpio_register_set(struct net_device *dev, ...@@ -1420,7 +1420,7 @@ ar6000_gpio_register_set(struct net_device *dev,
return wmi_gpio_register_set(ar->arWmi, gpioreg_id, value); return wmi_gpio_register_set(ar->arWmi, gpioreg_id, value);
} }
static A_STATUS static int
ar6000_gpio_register_get(struct net_device *dev, ar6000_gpio_register_get(struct net_device *dev,
A_UINT32 gpioreg_id) A_UINT32 gpioreg_id)
{ {
...@@ -1430,7 +1430,7 @@ ar6000_gpio_register_get(struct net_device *dev, ...@@ -1430,7 +1430,7 @@ ar6000_gpio_register_get(struct net_device *dev,
return wmi_gpio_register_get(ar->arWmi, gpioreg_id); return wmi_gpio_register_get(ar->arWmi, gpioreg_id);
} }
static A_STATUS static int
ar6000_gpio_intr_ack(struct net_device *dev, ar6000_gpio_intr_ack(struct net_device *dev,
A_UINT32 ack_mask) A_UINT32 ack_mask)
{ {
...@@ -1445,7 +1445,7 @@ ar6000_gpio_intr_ack(struct net_device *dev, ...@@ -1445,7 +1445,7 @@ ar6000_gpio_intr_ack(struct net_device *dev,
static struct prof_count_s prof_count_results; static struct prof_count_s prof_count_results;
static A_BOOL prof_count_available; /* Requested GPIO data available */ static A_BOOL prof_count_available; /* Requested GPIO data available */
static A_STATUS static int
prof_count_get(struct net_device *dev) prof_count_get(struct net_device *dev)
{ {
AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev);
...@@ -1469,14 +1469,14 @@ prof_count_rx(A_UINT32 addr, A_UINT32 count) ...@@ -1469,14 +1469,14 @@ prof_count_rx(A_UINT32 addr, A_UINT32 count)
#endif /* CONFIG_TARGET_PROFILE_SUPPORT */ #endif /* CONFIG_TARGET_PROFILE_SUPPORT */
static A_STATUS static int
ar6000_create_acl_data_osbuf(struct net_device *dev, A_UINT8 *userdata, void **p_osbuf) ar6000_create_acl_data_osbuf(struct net_device *dev, A_UINT8 *userdata, void **p_osbuf)
{ {
void *osbuf = NULL; void *osbuf = NULL;
A_UINT8 tmp_space[8]; A_UINT8 tmp_space[8];
HCI_ACL_DATA_PKT *acl; HCI_ACL_DATA_PKT *acl;
A_UINT8 hdr_size, *datap=NULL; A_UINT8 hdr_size, *datap=NULL;
A_STATUS ret = A_OK; int ret = A_OK;
/* ACL is in data path. There is a need to create pool /* ACL is in data path. There is a need to create pool
* mechanism for allocating and freeing NETBUFs - ToDo later. * mechanism for allocating and freeing NETBUFs - ToDo later.
...@@ -1739,7 +1739,7 @@ int ...@@ -1739,7 +1739,7 @@ int
ar6000_ioctl_setkey(AR_SOFTC_T *ar, struct ieee80211req_key *ik) ar6000_ioctl_setkey(AR_SOFTC_T *ar, struct ieee80211req_key *ik)
{ {
KEY_USAGE keyUsage; KEY_USAGE keyUsage;
A_STATUS status; int status;
CRYPTO_TYPE keyType = NONE_CRYPT; CRYPTO_TYPE keyType = NONE_CRYPT;
#ifdef USER_KEYS #ifdef USER_KEYS
...@@ -1885,7 +1885,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) ...@@ -1885,7 +1885,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
goto ioctl_done; goto ioctl_done;
} }
} else { } else {
A_STATUS ret = is_iwioctl_allowed(ar->arNextMode, cmd); int ret = is_iwioctl_allowed(ar->arNextMode, cmd);
if(ret == A_ENOTSUP) { if(ret == A_ENOTSUP) {
A_PRINTF("iwioctl: cmd=0x%x not allowed in this mode\n", cmd); A_PRINTF("iwioctl: cmd=0x%x not allowed in this mode\n", cmd);
ret = -EOPNOTSUPP; ret = -EOPNOTSUPP;
...@@ -1994,7 +1994,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) ...@@ -1994,7 +1994,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
} else if (copy_from_user(&req, userdata, sizeof(struct ieee80211req_addpmkid))) { } else if (copy_from_user(&req, userdata, sizeof(struct ieee80211req_addpmkid))) {
ret = -EFAULT; ret = -EFAULT;
} else { } else {
A_STATUS status; int status;
AR_DEBUG_PRINTF(ATH_DEBUG_WLAN_CONNECT,("Add pmkid for %2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x en=%d\n", AR_DEBUG_PRINTF(ATH_DEBUG_WLAN_CONNECT,("Add pmkid for %2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x en=%d\n",
req.pi_bssid[0], req.pi_bssid[1], req.pi_bssid[2], req.pi_bssid[0], req.pi_bssid[1], req.pi_bssid[2],
...@@ -3365,7 +3365,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) ...@@ -3365,7 +3365,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
case AR6000_XIOCTL_WMI_SETFIXRATES: case AR6000_XIOCTL_WMI_SETFIXRATES:
{ {
WMI_FIX_RATES_CMD setFixRatesCmd; WMI_FIX_RATES_CMD setFixRatesCmd;
A_STATUS returnStatus; int returnStatus;
if (ar->arWmiReady == FALSE) { if (ar->arWmiReady == FALSE) {
ret = -EIO; ret = -EIO;
......
...@@ -105,7 +105,7 @@ a_netbuf_to_data(void *bufPtr) ...@@ -105,7 +105,7 @@ a_netbuf_to_data(void *bufPtr)
* Add len # of bytes to the beginning of the network buffer * Add len # of bytes to the beginning of the network buffer
* pointed to by bufPtr * pointed to by bufPtr
*/ */
A_STATUS int
a_netbuf_push(void *bufPtr, A_INT32 len) a_netbuf_push(void *bufPtr, A_INT32 len)
{ {
skb_push((struct sk_buff *)bufPtr, len); skb_push((struct sk_buff *)bufPtr, len);
...@@ -117,7 +117,7 @@ a_netbuf_push(void *bufPtr, A_INT32 len) ...@@ -117,7 +117,7 @@ a_netbuf_push(void *bufPtr, A_INT32 len)
* Add len # of bytes to the beginning of the network buffer * Add len # of bytes to the beginning of the network buffer
* pointed to by bufPtr and also fill with data * pointed to by bufPtr and also fill with data
*/ */
A_STATUS int
a_netbuf_push_data(void *bufPtr, char *srcPtr, A_INT32 len) a_netbuf_push_data(void *bufPtr, char *srcPtr, A_INT32 len)
{ {
skb_push((struct sk_buff *) bufPtr, len); skb_push((struct sk_buff *) bufPtr, len);
...@@ -130,7 +130,7 @@ a_netbuf_push_data(void *bufPtr, char *srcPtr, A_INT32 len) ...@@ -130,7 +130,7 @@ a_netbuf_push_data(void *bufPtr, char *srcPtr, A_INT32 len)
* Add len # of bytes to the end of the network buffer * Add len # of bytes to the end of the network buffer
* pointed to by bufPtr * pointed to by bufPtr
*/ */
A_STATUS int
a_netbuf_put(void *bufPtr, A_INT32 len) a_netbuf_put(void *bufPtr, A_INT32 len)
{ {
skb_put((struct sk_buff *)bufPtr, len); skb_put((struct sk_buff *)bufPtr, len);
...@@ -142,7 +142,7 @@ a_netbuf_put(void *bufPtr, A_INT32 len) ...@@ -142,7 +142,7 @@ a_netbuf_put(void *bufPtr, A_INT32 len)
* Add len # of bytes to the end of the network buffer * Add len # of bytes to the end of the network buffer
* pointed to by bufPtr and also fill with data * pointed to by bufPtr and also fill with data
*/ */
A_STATUS int
a_netbuf_put_data(void *bufPtr, char *srcPtr, A_INT32 len) a_netbuf_put_data(void *bufPtr, char *srcPtr, A_INT32 len)
{ {
char *start = (char*)(((struct sk_buff *)bufPtr)->data + char *start = (char*)(((struct sk_buff *)bufPtr)->data +
...@@ -157,7 +157,7 @@ a_netbuf_put_data(void *bufPtr, char *srcPtr, A_INT32 len) ...@@ -157,7 +157,7 @@ a_netbuf_put_data(void *bufPtr, char *srcPtr, A_INT32 len)
/* /*
* Trim the network buffer pointed to by bufPtr to len # of bytes * Trim the network buffer pointed to by bufPtr to len # of bytes
*/ */
A_STATUS int
a_netbuf_setlen(void *bufPtr, A_INT32 len) a_netbuf_setlen(void *bufPtr, A_INT32 len)
{ {
skb_trim((struct sk_buff *)bufPtr, len); skb_trim((struct sk_buff *)bufPtr, len);
...@@ -168,7 +168,7 @@ a_netbuf_setlen(void *bufPtr, A_INT32 len) ...@@ -168,7 +168,7 @@ a_netbuf_setlen(void *bufPtr, A_INT32 len)
/* /*
* Chop of len # of bytes from the end of the buffer. * Chop of len # of bytes from the end of the buffer.
*/ */
A_STATUS int
a_netbuf_trim(void *bufPtr, A_INT32 len) a_netbuf_trim(void *bufPtr, A_INT32 len)
{ {
skb_trim((struct sk_buff *)bufPtr, ((struct sk_buff *)bufPtr)->len - len); skb_trim((struct sk_buff *)bufPtr, ((struct sk_buff *)bufPtr)->len - len);
...@@ -179,7 +179,7 @@ a_netbuf_trim(void *bufPtr, A_INT32 len) ...@@ -179,7 +179,7 @@ a_netbuf_trim(void *bufPtr, A_INT32 len)
/* /*
* Chop of len # of bytes from the end of the buffer and return the data. * Chop of len # of bytes from the end of the buffer and return the data.
*/ */
A_STATUS int
a_netbuf_trim_data(void *bufPtr, char *dstPtr, A_INT32 len) a_netbuf_trim_data(void *bufPtr, char *dstPtr, A_INT32 len)
{ {
char *start = (char*)(((struct sk_buff *)bufPtr)->data + char *start = (char*)(((struct sk_buff *)bufPtr)->data +
...@@ -204,7 +204,7 @@ a_netbuf_headroom(void *bufPtr) ...@@ -204,7 +204,7 @@ a_netbuf_headroom(void *bufPtr)
/* /*
* Removes specified number of bytes from the beginning of the buffer * Removes specified number of bytes from the beginning of the buffer
*/ */
A_STATUS int
a_netbuf_pull(void *bufPtr, A_INT32 len) a_netbuf_pull(void *bufPtr, A_INT32 len)
{ {
skb_pull((struct sk_buff *)bufPtr, len); skb_pull((struct sk_buff *)bufPtr, len);
...@@ -216,7 +216,7 @@ a_netbuf_pull(void *bufPtr, A_INT32 len) ...@@ -216,7 +216,7 @@ a_netbuf_pull(void *bufPtr, A_INT32 len)
* Removes specified number of bytes from the beginning of the buffer * Removes specified number of bytes from the beginning of the buffer
* and return the data * and return the data
*/ */
A_STATUS int
a_netbuf_pull_data(void *bufPtr, char *dstPtr, A_INT32 len) a_netbuf_pull_data(void *bufPtr, char *dstPtr, A_INT32 len)
{ {
A_MEMCPY(dstPtr, ((struct sk_buff *)bufPtr)->data, len); A_MEMCPY(dstPtr, ((struct sk_buff *)bufPtr)->data, len);
......
...@@ -463,7 +463,7 @@ ar6000_ioctl_siwessid(struct net_device *dev, ...@@ -463,7 +463,7 @@ ar6000_ioctl_siwessid(struct net_device *dev,
struct iw_point *data, char *ssid) struct iw_point *data, char *ssid)
{ {
AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev);
A_STATUS status; int status;
A_UINT8 arNetworkType; A_UINT8 arNetworkType;
A_UINT8 prevMode = ar->arNetworkType; A_UINT8 prevMode = ar->arNetworkType;
...@@ -1548,7 +1548,7 @@ ar6000_ioctl_siwpmksa(struct net_device *dev, ...@@ -1548,7 +1548,7 @@ ar6000_ioctl_siwpmksa(struct net_device *dev,
{ {
AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev);
A_INT32 ret; A_INT32 ret;
A_STATUS status; int status;
struct iw_pmksa *pmksa; struct iw_pmksa *pmksa;
pmksa = (struct iw_pmksa *)extra; pmksa = (struct iw_pmksa *)extra;
...@@ -1599,7 +1599,7 @@ static int ar6000_set_wapi_key(struct net_device *dev, ...@@ -1599,7 +1599,7 @@ static int ar6000_set_wapi_key(struct net_device *dev,
A_INT32 index; A_INT32 index;
A_UINT32 *PN; A_UINT32 *PN;
A_INT32 i; A_INT32 i;
A_STATUS status; int status;
A_UINT8 wapiKeyRsc[16]; A_UINT8 wapiKeyRsc[16];
CRYPTO_TYPE keyType = WAPI_CRYPT; CRYPTO_TYPE keyType = WAPI_CRYPT;
const A_UINT8 broadcastMac[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; const A_UINT8 broadcastMac[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
...@@ -1660,7 +1660,7 @@ ar6000_ioctl_siwencodeext(struct net_device *dev, ...@@ -1660,7 +1660,7 @@ ar6000_ioctl_siwencodeext(struct net_device *dev,
A_INT32 keyLen; A_INT32 keyLen;
A_UINT8 *keyData; A_UINT8 *keyData;
A_UINT8 keyRsc[8]; A_UINT8 keyRsc[8];
A_STATUS status; int status;
CRYPTO_TYPE keyType; CRYPTO_TYPE keyType;
#ifdef USER_KEYS #ifdef USER_KEYS
struct ieee80211req_key ik; struct ieee80211req_key ik;
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
#include "aggr_rx_internal.h" #include "aggr_rx_internal.h"
#include "wmi.h" #include "wmi.h"
extern A_STATUS extern int
wmi_dot3_2_dix(void *osbuf); wmi_dot3_2_dix(void *osbuf);
static void static void
...@@ -57,7 +57,7 @@ aggr_init(ALLOC_NETBUFS netbuf_allocator) ...@@ -57,7 +57,7 @@ aggr_init(ALLOC_NETBUFS netbuf_allocator)
AGGR_INFO *p_aggr = NULL; AGGR_INFO *p_aggr = NULL;
RXTID *rxtid; RXTID *rxtid;
A_UINT8 i; A_UINT8 i;
A_STATUS status = A_OK; int status = A_OK;
A_PRINTF("In aggr_init..\n"); A_PRINTF("In aggr_init..\n");
......
...@@ -97,7 +97,7 @@ iswscoui(const A_UINT8 *frm) ...@@ -97,7 +97,7 @@ iswscoui(const A_UINT8 *frm)
return frm[1] > 3 && LE_READ_4(frm+2) == ((0x04<<24)|WPA_OUI); return frm[1] > 3 && LE_READ_4(frm+2) == ((0x04<<24)|WPA_OUI);
} }
A_STATUS int
wlan_parse_beacon(A_UINT8 *buf, int framelen, struct ieee80211_common_ie *cie) wlan_parse_beacon(A_UINT8 *buf, int framelen, struct ieee80211_common_ie *cie)
{ {
A_UINT8 *frm, *efrm; A_UINT8 *frm, *efrm;
......
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