提交 9dabb722 编写于 作者: L Luis R. Rodriguez 提交者: Greg Kroah-Hartman

ath6kl: remove-typedef HIF_DEVICE

remove-typedef -s HIF_DEVICE \
	"struct hif_device" drivers/staging/ath6kl/
Tested-by: NNaveen Singh <nsingh@atheros.com>
Signed-off-by: NLuis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 a71f0bf6
...@@ -42,12 +42,12 @@ ...@@ -42,12 +42,12 @@
static bool bmiDone; static bool bmiDone;
int int
bmiBufferSend(HIF_DEVICE *device, bmiBufferSend(struct hif_device *device,
u8 *buffer, u8 *buffer,
u32 length); u32 length);
int int
bmiBufferReceive(HIF_DEVICE *device, bmiBufferReceive(struct hif_device *device,
u8 *buffer, u8 *buffer,
u32 length, u32 length,
bool want_timeout); bool want_timeout);
......
...@@ -106,7 +106,7 @@ BMICleanup(void) ...@@ -106,7 +106,7 @@ BMICleanup(void)
} }
int int
BMIDone(HIF_DEVICE *device) BMIDone(struct hif_device *device)
{ {
int status; int status;
u32 cid; u32 cid;
...@@ -142,7 +142,7 @@ BMIDone(HIF_DEVICE *device) ...@@ -142,7 +142,7 @@ BMIDone(HIF_DEVICE *device)
} }
int int
BMIGetTargetInfo(HIF_DEVICE *device, struct bmi_target_info *targ_info) BMIGetTargetInfo(struct hif_device *device, struct bmi_target_info *targ_info)
{ {
int status; int status;
u32 cid; u32 cid;
...@@ -201,7 +201,7 @@ BMIGetTargetInfo(HIF_DEVICE *device, struct bmi_target_info *targ_info) ...@@ -201,7 +201,7 @@ BMIGetTargetInfo(HIF_DEVICE *device, struct bmi_target_info *targ_info)
} }
int int
BMIReadMemory(HIF_DEVICE *device, BMIReadMemory(struct hif_device *device,
u32 address, u32 address,
u8 *buffer, u8 *buffer,
u32 length) u32 length)
...@@ -257,7 +257,7 @@ BMIReadMemory(HIF_DEVICE *device, ...@@ -257,7 +257,7 @@ BMIReadMemory(HIF_DEVICE *device,
} }
int int
BMIWriteMemory(HIF_DEVICE *device, BMIWriteMemory(struct hif_device *device,
u32 address, u32 address,
u8 *buffer, u8 *buffer,
u32 length) u32 length)
...@@ -322,7 +322,7 @@ BMIWriteMemory(HIF_DEVICE *device, ...@@ -322,7 +322,7 @@ BMIWriteMemory(HIF_DEVICE *device,
} }
int int
BMIExecute(HIF_DEVICE *device, BMIExecute(struct hif_device *device,
u32 address, u32 address,
u32 *param) u32 *param)
{ {
...@@ -370,7 +370,7 @@ BMIExecute(HIF_DEVICE *device, ...@@ -370,7 +370,7 @@ BMIExecute(HIF_DEVICE *device,
} }
int int
BMISetAppStart(HIF_DEVICE *device, BMISetAppStart(struct hif_device *device,
u32 address) u32 address)
{ {
u32 cid; u32 cid;
...@@ -407,7 +407,7 @@ BMISetAppStart(HIF_DEVICE *device, ...@@ -407,7 +407,7 @@ BMISetAppStart(HIF_DEVICE *device,
} }
int int
BMIReadSOCRegister(HIF_DEVICE *device, BMIReadSOCRegister(struct hif_device *device,
u32 address, u32 address,
u32 *param) u32 *param)
{ {
...@@ -453,7 +453,7 @@ BMIReadSOCRegister(HIF_DEVICE *device, ...@@ -453,7 +453,7 @@ BMIReadSOCRegister(HIF_DEVICE *device,
} }
int int
BMIWriteSOCRegister(HIF_DEVICE *device, BMIWriteSOCRegister(struct hif_device *device,
u32 address, u32 address,
u32 param) u32 param)
{ {
...@@ -493,7 +493,7 @@ BMIWriteSOCRegister(HIF_DEVICE *device, ...@@ -493,7 +493,7 @@ BMIWriteSOCRegister(HIF_DEVICE *device,
} }
int int
BMIrompatchInstall(HIF_DEVICE *device, BMIrompatchInstall(struct hif_device *device,
u32 ROM_addr, u32 ROM_addr,
u32 RAM_addr, u32 RAM_addr,
u32 nbytes, u32 nbytes,
...@@ -549,7 +549,7 @@ BMIrompatchInstall(HIF_DEVICE *device, ...@@ -549,7 +549,7 @@ BMIrompatchInstall(HIF_DEVICE *device,
} }
int int
BMIrompatchUninstall(HIF_DEVICE *device, BMIrompatchUninstall(struct hif_device *device,
u32 rompatch_id) u32 rompatch_id)
{ {
u32 cid; u32 cid;
...@@ -586,7 +586,7 @@ BMIrompatchUninstall(HIF_DEVICE *device, ...@@ -586,7 +586,7 @@ BMIrompatchUninstall(HIF_DEVICE *device,
} }
static int static int
_BMIrompatchChangeActivation(HIF_DEVICE *device, _BMIrompatchChangeActivation(struct hif_device *device,
u32 rompatch_count, u32 rompatch_count,
u32 *rompatch_list, u32 *rompatch_list,
u32 do_activate) u32 do_activate)
...@@ -630,7 +630,7 @@ _BMIrompatchChangeActivation(HIF_DEVICE *device, ...@@ -630,7 +630,7 @@ _BMIrompatchChangeActivation(HIF_DEVICE *device,
} }
int int
BMIrompatchActivate(HIF_DEVICE *device, BMIrompatchActivate(struct hif_device *device,
u32 rompatch_count, u32 rompatch_count,
u32 *rompatch_list) u32 *rompatch_list)
{ {
...@@ -638,7 +638,7 @@ BMIrompatchActivate(HIF_DEVICE *device, ...@@ -638,7 +638,7 @@ BMIrompatchActivate(HIF_DEVICE *device,
} }
int int
BMIrompatchDeactivate(HIF_DEVICE *device, BMIrompatchDeactivate(struct hif_device *device,
u32 rompatch_count, u32 rompatch_count,
u32 *rompatch_list) u32 *rompatch_list)
{ {
...@@ -646,7 +646,7 @@ BMIrompatchDeactivate(HIF_DEVICE *device, ...@@ -646,7 +646,7 @@ BMIrompatchDeactivate(HIF_DEVICE *device,
} }
int int
BMILZData(HIF_DEVICE *device, BMILZData(struct hif_device *device,
u8 *buffer, u8 *buffer,
u32 length) u32 length)
{ {
...@@ -696,7 +696,7 @@ BMILZData(HIF_DEVICE *device, ...@@ -696,7 +696,7 @@ BMILZData(HIF_DEVICE *device,
} }
int int
BMILZStreamStart(HIF_DEVICE *device, BMILZStreamStart(struct hif_device *device,
u32 address) u32 address)
{ {
u32 cid; u32 cid;
...@@ -734,7 +734,7 @@ BMILZStreamStart(HIF_DEVICE *device, ...@@ -734,7 +734,7 @@ BMILZStreamStart(HIF_DEVICE *device,
/* BMI Access routines */ /* BMI Access routines */
int int
bmiBufferSend(HIF_DEVICE *device, bmiBufferSend(struct hif_device *device,
u8 *buffer, u8 *buffer,
u32 length) u32 length)
{ {
...@@ -782,7 +782,7 @@ bmiBufferSend(HIF_DEVICE *device, ...@@ -782,7 +782,7 @@ bmiBufferSend(HIF_DEVICE *device,
} }
int int
bmiBufferReceive(HIF_DEVICE *device, bmiBufferReceive(struct hif_device *device,
u8 *buffer, u8 *buffer,
u32 length, u32 length,
bool want_timeout) bool want_timeout)
...@@ -958,7 +958,7 @@ bmiBufferReceive(HIF_DEVICE *device, ...@@ -958,7 +958,7 @@ bmiBufferReceive(HIF_DEVICE *device,
} }
int int
BMIFastDownload(HIF_DEVICE *device, u32 address, u8 *buffer, u32 length) BMIFastDownload(struct hif_device *device, u32 address, u8 *buffer, u32 length)
{ {
int status = A_ERROR; int status = A_ERROR;
u32 lastWord = 0; u32 lastWord = 0;
...@@ -998,13 +998,13 @@ BMIFastDownload(HIF_DEVICE *device, u32 address, u8 *buffer, u32 length) ...@@ -998,13 +998,13 @@ BMIFastDownload(HIF_DEVICE *device, u32 address, u8 *buffer, u32 length)
} }
int int
BMIRawWrite(HIF_DEVICE *device, u8 *buffer, u32 length) BMIRawWrite(struct hif_device *device, u8 *buffer, u32 length)
{ {
return bmiBufferSend(device, buffer, length); return bmiBufferSend(device, buffer, length);
} }
int int
BMIRawRead(HIF_DEVICE *device, u8 *buffer, u32 length, bool want_timeout) BMIRawRead(struct hif_device *device, u8 *buffer, u32 length, bool want_timeout)
{ {
return bmiBufferReceive(device, buffer, length, want_timeout); return bmiBufferReceive(device, buffer, length, want_timeout);
} }
...@@ -88,9 +88,9 @@ struct hif_device { ...@@ -88,9 +88,9 @@ struct hif_device {
#define CMD53_FIXED_ADDRESS 1 #define CMD53_FIXED_ADDRESS 1
#define CMD53_INCR_ADDRESS 2 #define CMD53_INCR_ADDRESS 2
BUS_REQUEST *hifAllocateBusRequest(HIF_DEVICE *device); BUS_REQUEST *hifAllocateBusRequest(struct hif_device *device);
void hifFreeBusRequest(HIF_DEVICE *device, BUS_REQUEST *busrequest); void hifFreeBusRequest(struct hif_device *device, BUS_REQUEST *busrequest);
void AddToAsyncList(HIF_DEVICE *device, BUS_REQUEST *busrequest); void AddToAsyncList(struct hif_device *device, BUS_REQUEST *busrequest);
#ifdef HIF_LINUX_MMC_SCATTER_SUPPORT #ifdef HIF_LINUX_MMC_SCATTER_SUPPORT
...@@ -100,7 +100,7 @@ void AddToAsyncList(HIF_DEVICE *device, BUS_REQUEST *busrequest); ...@@ -100,7 +100,7 @@ void AddToAsyncList(HIF_DEVICE *device, BUS_REQUEST *busrequest);
struct hif_scatter_req_priv { struct hif_scatter_req_priv {
struct hif_scatter_req *pHifScatterReq; /* HIF scatter request with allocated entries */ struct hif_scatter_req *pHifScatterReq; /* HIF scatter request with allocated entries */
HIF_DEVICE *device; /* this device */ struct hif_device *device; /* this device */
BUS_REQUEST *busrequest; /* request associated with request */ BUS_REQUEST *busrequest; /* request associated with request */
/* scatter list for linux */ /* scatter list for linux */
struct scatterlist sgentries[MAX_SCATTER_ENTRIES_PER_REQ]; struct scatterlist sgentries[MAX_SCATTER_ENTRIES_PER_REQ];
...@@ -108,18 +108,18 @@ struct hif_scatter_req_priv { ...@@ -108,18 +108,18 @@ 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)
int SetupHIFScatterSupport(HIF_DEVICE *device, struct hif_device_scatter_support_info *pInfo); int SetupHIFScatterSupport(struct hif_device *device, struct hif_device_scatter_support_info *pInfo);
void CleanupHIFScatterResources(HIF_DEVICE *device); void CleanupHIFScatterResources(struct hif_device *device);
int DoHifReadWriteScatter(HIF_DEVICE *device, BUS_REQUEST *busrequest); int DoHifReadWriteScatter(struct hif_device *device, BUS_REQUEST *busrequest);
#else // HIF_LINUX_MMC_SCATTER_SUPPORT #else // HIF_LINUX_MMC_SCATTER_SUPPORT
static inline int SetupHIFScatterSupport(HIF_DEVICE *device, struct hif_device_scatter_support_info *pInfo) static inline int SetupHIFScatterSupport(struct hif_device *device, struct hif_device_scatter_support_info *pInfo)
{ {
return A_ENOTSUP; return A_ENOTSUP;
} }
static inline int DoHifReadWriteScatter(HIF_DEVICE *device, BUS_REQUEST *busrequest) static inline int DoHifReadWriteScatter(struct hif_device *device, BUS_REQUEST *busrequest)
{ {
return A_ENOTSUP; return A_ENOTSUP;
} }
......
...@@ -58,9 +58,9 @@ static int hifDeviceResume(struct device *dev); ...@@ -58,9 +58,9 @@ static int hifDeviceResume(struct device *dev);
#endif /* CONFIG_PM */ #endif /* CONFIG_PM */
static int hifDeviceInserted(struct sdio_func *func, const struct sdio_device_id *id); static int hifDeviceInserted(struct sdio_func *func, const struct sdio_device_id *id);
static void hifDeviceRemoved(struct sdio_func *func); static void hifDeviceRemoved(struct sdio_func *func);
static HIF_DEVICE *addHifDevice(struct sdio_func *func); static struct hif_device *addHifDevice(struct sdio_func *func);
static HIF_DEVICE *getHifDevice(struct sdio_func *func); static struct hif_device *getHifDevice(struct sdio_func *func);
static void delHifDevice(HIF_DEVICE * device); static void delHifDevice(struct hif_device * device);
static int Func0_CMD52WriteByte(struct mmc_card *card, unsigned int address, unsigned char byte); static int Func0_CMD52WriteByte(struct mmc_card *card, unsigned int address, unsigned char byte);
static int Func0_CMD52ReadByte(struct mmc_card *card, unsigned int address, unsigned char *byte); static int Func0_CMD52ReadByte(struct mmc_card *card, unsigned int address, unsigned char *byte);
...@@ -107,8 +107,8 @@ extern u32 busspeedlow; ...@@ -107,8 +107,8 @@ extern u32 busspeedlow;
extern u32 debughif; extern u32 debughif;
static void ResetAllCards(void); static void ResetAllCards(void);
static int hifDisableFunc(HIF_DEVICE *device, struct sdio_func *func); static int hifDisableFunc(struct hif_device *device, struct sdio_func *func);
static int hifEnableFunc(HIF_DEVICE *device, struct sdio_func *func); static int hifEnableFunc(struct hif_device *device, struct sdio_func *func);
#ifdef DEBUG #ifdef DEBUG
...@@ -153,7 +153,7 @@ int HIFInit(OSDRV_CALLBACKS *callbacks) ...@@ -153,7 +153,7 @@ int HIFInit(OSDRV_CALLBACKS *callbacks)
} }
static int static int
__HIFReadWrite(HIF_DEVICE *device, __HIFReadWrite(struct hif_device *device,
u32 address, u32 address,
u8 *buffer, u8 *buffer,
u32 length, u32 length,
...@@ -304,7 +304,7 @@ __HIFReadWrite(HIF_DEVICE *device, ...@@ -304,7 +304,7 @@ __HIFReadWrite(HIF_DEVICE *device,
return status; return status;
} }
void AddToAsyncList(HIF_DEVICE *device, BUS_REQUEST *busrequest) void AddToAsyncList(struct hif_device *device, BUS_REQUEST *busrequest)
{ {
unsigned long flags; unsigned long flags;
BUS_REQUEST *async; BUS_REQUEST *async;
...@@ -330,7 +330,7 @@ void AddToAsyncList(HIF_DEVICE *device, BUS_REQUEST *busrequest) ...@@ -330,7 +330,7 @@ void AddToAsyncList(HIF_DEVICE *device, BUS_REQUEST *busrequest)
/* queue a read/write request */ /* queue a read/write request */
int int
HIFReadWrite(HIF_DEVICE *device, HIFReadWrite(struct hif_device *device,
u32 address, u32 address,
u8 *buffer, u8 *buffer,
u32 length, u32 length,
...@@ -400,12 +400,12 @@ HIFReadWrite(HIF_DEVICE *device, ...@@ -400,12 +400,12 @@ HIFReadWrite(HIF_DEVICE *device,
/* thread to serialize all requests, both sync and async */ /* thread to serialize all requests, both sync and async */
static int async_task(void *param) static int async_task(void *param)
{ {
HIF_DEVICE *device; struct hif_device *device;
BUS_REQUEST *request; BUS_REQUEST *request;
int status; int status;
unsigned long flags; unsigned long flags;
device = (HIF_DEVICE *)param; device = (struct hif_device *)param;
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: async task\n")); AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: async task\n"));
set_current_state(TASK_INTERRUPTIBLE); set_current_state(TASK_INTERRUPTIBLE);
while(!device->async_shutdown) { while(!device->async_shutdown) {
...@@ -465,7 +465,7 @@ static int async_task(void *param) ...@@ -465,7 +465,7 @@ static int async_task(void *param)
return 0; return 0;
} }
static s32 IssueSDCommand(HIF_DEVICE *device, u32 opcode, u32 arg, u32 flags, u32 *resp) static s32 IssueSDCommand(struct hif_device *device, u32 opcode, u32 arg, u32 flags, u32 *resp)
{ {
struct mmc_command cmd; struct mmc_command cmd;
s32 err; s32 err;
...@@ -488,7 +488,7 @@ static s32 IssueSDCommand(HIF_DEVICE *device, u32 opcode, u32 arg, u32 flags, u3 ...@@ -488,7 +488,7 @@ static s32 IssueSDCommand(HIF_DEVICE *device, u32 opcode, u32 arg, u32 flags, u3
return err; return err;
} }
int ReinitSDIO(HIF_DEVICE *device) int ReinitSDIO(struct hif_device *device)
{ {
s32 err; s32 err;
struct mmc_host *host; struct mmc_host *host;
...@@ -648,7 +648,7 @@ int ReinitSDIO(HIF_DEVICE *device) ...@@ -648,7 +648,7 @@ int ReinitSDIO(HIF_DEVICE *device)
} }
int int
PowerStateChangeNotify(HIF_DEVICE *device, HIF_DEVICE_POWER_CHANGE_TYPE config) PowerStateChangeNotify(struct hif_device *device, HIF_DEVICE_POWER_CHANGE_TYPE config)
{ {
int status = 0; int status = 0;
#if defined(CONFIG_PM) #if defined(CONFIG_PM)
...@@ -691,7 +691,7 @@ PowerStateChangeNotify(HIF_DEVICE *device, HIF_DEVICE_POWER_CHANGE_TYPE config) ...@@ -691,7 +691,7 @@ PowerStateChangeNotify(HIF_DEVICE *device, HIF_DEVICE_POWER_CHANGE_TYPE config)
} }
int int
HIFConfigureDevice(HIF_DEVICE *device, HIF_DEVICE_CONFIG_OPCODE opcode, HIFConfigureDevice(struct hif_device *device, HIF_DEVICE_CONFIG_OPCODE opcode,
void *config, u32 configLen) void *config, u32 configLen)
{ {
u32 count; u32 count;
...@@ -745,7 +745,7 @@ HIFConfigureDevice(HIF_DEVICE *device, HIF_DEVICE_CONFIG_OPCODE opcode, ...@@ -745,7 +745,7 @@ HIFConfigureDevice(HIF_DEVICE *device, HIF_DEVICE_CONFIG_OPCODE opcode,
} }
void void
HIFShutDownDevice(HIF_DEVICE *device) HIFShutDownDevice(struct hif_device *device)
{ {
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: +HIFShutDownDevice\n")); AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: +HIFShutDownDevice\n"));
if (device != NULL) { if (device != NULL) {
...@@ -775,7 +775,7 @@ static void ...@@ -775,7 +775,7 @@ static void
hifIRQHandler(struct sdio_func *func) hifIRQHandler(struct sdio_func *func)
{ {
int status; int status;
HIF_DEVICE *device; struct hif_device *device;
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: +hifIRQHandler\n")); AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: +hifIRQHandler\n"));
device = getHifDevice(func); device = getHifDevice(func);
...@@ -792,9 +792,9 @@ hifIRQHandler(struct sdio_func *func) ...@@ -792,9 +792,9 @@ hifIRQHandler(struct sdio_func *func)
/* handle HTC startup via thread*/ /* handle HTC startup via thread*/
static int startup_task(void *param) static int startup_task(void *param)
{ {
HIF_DEVICE *device; struct hif_device *device;
device = (HIF_DEVICE *)param; device = (struct hif_device *)param;
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: call HTC from startup_task\n")); AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: call HTC from startup_task\n"));
/* start up inform DRV layer */ /* start up inform DRV layer */
if ((osdrvCallbacks.deviceInsertedHandler(osdrvCallbacks.context,device)) != 0) { if ((osdrvCallbacks.deviceInsertedHandler(osdrvCallbacks.context,device)) != 0) {
...@@ -806,8 +806,8 @@ static int startup_task(void *param) ...@@ -806,8 +806,8 @@ static int startup_task(void *param)
#if defined(CONFIG_PM) #if defined(CONFIG_PM)
static int enable_task(void *param) static int enable_task(void *param)
{ {
HIF_DEVICE *device; struct hif_device *device;
device = (HIF_DEVICE *)param; device = (struct hif_device *)param;
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: call from resume_task\n")); AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: call from resume_task\n"));
/* start up inform DRV layer */ /* start up inform DRV layer */
...@@ -826,7 +826,7 @@ static int enable_task(void *param) ...@@ -826,7 +826,7 @@ static int enable_task(void *param)
static int hifDeviceInserted(struct sdio_func *func, const struct sdio_device_id *id) static int hifDeviceInserted(struct sdio_func *func, const struct sdio_device_id *id)
{ {
int ret; int ret;
HIF_DEVICE * device; struct hif_device * device;
int count; int count;
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, AR_DEBUG_PRINTF(ATH_DEBUG_TRACE,
...@@ -866,7 +866,7 @@ static int hifDeviceInserted(struct sdio_func *func, const struct sdio_device_id ...@@ -866,7 +866,7 @@ static int hifDeviceInserted(struct sdio_func *func, const struct sdio_device_id
void void
HIFAckInterrupt(HIF_DEVICE *device) HIFAckInterrupt(struct hif_device *device)
{ {
AR_DEBUG_ASSERT(device != NULL); AR_DEBUG_ASSERT(device != NULL);
...@@ -874,7 +874,7 @@ HIFAckInterrupt(HIF_DEVICE *device) ...@@ -874,7 +874,7 @@ HIFAckInterrupt(HIF_DEVICE *device)
} }
void void
HIFUnMaskInterrupt(HIF_DEVICE *device) HIFUnMaskInterrupt(struct hif_device *device)
{ {
int ret; int ret;
...@@ -890,7 +890,7 @@ HIFUnMaskInterrupt(HIF_DEVICE *device) ...@@ -890,7 +890,7 @@ HIFUnMaskInterrupt(HIF_DEVICE *device)
AR_DEBUG_ASSERT(ret == 0); AR_DEBUG_ASSERT(ret == 0);
} }
void HIFMaskInterrupt(HIF_DEVICE *device) void HIFMaskInterrupt(struct hif_device *device)
{ {
int ret; int ret;
AR_DEBUG_ASSERT(device != NULL); AR_DEBUG_ASSERT(device != NULL);
...@@ -910,7 +910,7 @@ void HIFMaskInterrupt(HIF_DEVICE *device) ...@@ -910,7 +910,7 @@ void HIFMaskInterrupt(HIF_DEVICE *device)
AR_DEBUG_ASSERT(ret == 0); AR_DEBUG_ASSERT(ret == 0);
} }
BUS_REQUEST *hifAllocateBusRequest(HIF_DEVICE *device) BUS_REQUEST *hifAllocateBusRequest(struct hif_device *device)
{ {
BUS_REQUEST *busrequest; BUS_REQUEST *busrequest;
unsigned long flag; unsigned long flag;
...@@ -930,7 +930,7 @@ BUS_REQUEST *hifAllocateBusRequest(HIF_DEVICE *device) ...@@ -930,7 +930,7 @@ BUS_REQUEST *hifAllocateBusRequest(HIF_DEVICE *device)
} }
void void
hifFreeBusRequest(HIF_DEVICE *device, BUS_REQUEST *busrequest) hifFreeBusRequest(struct hif_device *device, BUS_REQUEST *busrequest)
{ {
unsigned long flag; unsigned long flag;
...@@ -949,7 +949,7 @@ hifFreeBusRequest(HIF_DEVICE *device, BUS_REQUEST *busrequest) ...@@ -949,7 +949,7 @@ hifFreeBusRequest(HIF_DEVICE *device, BUS_REQUEST *busrequest)
spin_unlock_irqrestore(&device->lock, flag); spin_unlock_irqrestore(&device->lock, flag);
} }
static int hifDisableFunc(HIF_DEVICE *device, struct sdio_func *func) static int hifDisableFunc(struct hif_device *device, struct sdio_func *func)
{ {
int ret; int ret;
int status = 0; int status = 0;
...@@ -996,7 +996,7 @@ static int hifDisableFunc(HIF_DEVICE *device, struct sdio_func *func) ...@@ -996,7 +996,7 @@ static int hifDisableFunc(HIF_DEVICE *device, struct sdio_func *func)
return status; return status;
} }
static int hifEnableFunc(HIF_DEVICE *device, struct sdio_func *func) static int hifEnableFunc(struct hif_device *device, struct sdio_func *func)
{ {
struct task_struct* pTask; struct task_struct* pTask;
const char *taskName = NULL; const char *taskName = NULL;
...@@ -1081,7 +1081,7 @@ static int hifDeviceSuspend(struct device *dev) ...@@ -1081,7 +1081,7 @@ static int hifDeviceSuspend(struct device *dev)
{ {
struct sdio_func *func=dev_to_sdio_func(dev); struct sdio_func *func=dev_to_sdio_func(dev);
int status = 0; int status = 0;
HIF_DEVICE *device; struct hif_device *device;
device = getHifDevice(func); device = getHifDevice(func);
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: +hifDeviceSuspend\n")); AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: +hifDeviceSuspend\n"));
...@@ -1109,7 +1109,7 @@ static int hifDeviceResume(struct device *dev) ...@@ -1109,7 +1109,7 @@ static int hifDeviceResume(struct device *dev)
{ {
struct sdio_func *func=dev_to_sdio_func(dev); struct sdio_func *func=dev_to_sdio_func(dev);
int status = 0; int status = 0;
HIF_DEVICE *device; struct hif_device *device;
device = getHifDevice(func); device = getHifDevice(func);
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: +hifDeviceResume\n")); AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: +hifDeviceResume\n"));
...@@ -1128,7 +1128,7 @@ static int hifDeviceResume(struct device *dev) ...@@ -1128,7 +1128,7 @@ static int hifDeviceResume(struct device *dev)
static void hifDeviceRemoved(struct sdio_func *func) static void hifDeviceRemoved(struct sdio_func *func)
{ {
int status = 0; int status = 0;
HIF_DEVICE *device; struct hif_device *device;
AR_DEBUG_ASSERT(func != NULL); AR_DEBUG_ASSERT(func != NULL);
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: +hifDeviceRemoved\n")); AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: +hifDeviceRemoved\n"));
...@@ -1152,7 +1152,7 @@ static void hifDeviceRemoved(struct sdio_func *func) ...@@ -1152,7 +1152,7 @@ static void hifDeviceRemoved(struct sdio_func *func)
/* /*
* This should be moved to AR6K HTC layer. * This should be moved to AR6K HTC layer.
*/ */
int hifWaitForPendingRecv(HIF_DEVICE *device) int hifWaitForPendingRecv(struct hif_device *device)
{ {
s32 cnt = 10; s32 cnt = 10;
u8 host_int_status; u8 host_int_status;
...@@ -1183,13 +1183,13 @@ int hifWaitForPendingRecv(HIF_DEVICE *device) ...@@ -1183,13 +1183,13 @@ int hifWaitForPendingRecv(HIF_DEVICE *device)
} }
static HIF_DEVICE * static struct hif_device *
addHifDevice(struct sdio_func *func) addHifDevice(struct sdio_func *func)
{ {
HIF_DEVICE *hifdevice; struct hif_device *hifdevice;
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: addHifDevice\n")); AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: addHifDevice\n"));
AR_DEBUG_ASSERT(func != NULL); AR_DEBUG_ASSERT(func != NULL);
hifdevice = kzalloc(sizeof(HIF_DEVICE), GFP_KERNEL); hifdevice = kzalloc(sizeof(struct hif_device), GFP_KERNEL);
AR_DEBUG_ASSERT(hifdevice != NULL); AR_DEBUG_ASSERT(hifdevice != NULL);
#if HIF_USE_DMA_BOUNCE_BUFFER #if HIF_USE_DMA_BOUNCE_BUFFER
hifdevice->dma_buffer = kmalloc(HIF_DMA_BUFFER_SIZE, GFP_KERNEL); hifdevice->dma_buffer = kmalloc(HIF_DMA_BUFFER_SIZE, GFP_KERNEL);
...@@ -1202,15 +1202,15 @@ addHifDevice(struct sdio_func *func) ...@@ -1202,15 +1202,15 @@ addHifDevice(struct sdio_func *func)
return hifdevice; return hifdevice;
} }
static HIF_DEVICE * static struct hif_device *
getHifDevice(struct sdio_func *func) getHifDevice(struct sdio_func *func)
{ {
AR_DEBUG_ASSERT(func != NULL); AR_DEBUG_ASSERT(func != NULL);
return (HIF_DEVICE *)sdio_get_drvdata(func); return (struct hif_device *)sdio_get_drvdata(func);
} }
static void static void
delHifDevice(HIF_DEVICE * device) delHifDevice(struct hif_device * device)
{ {
AR_DEBUG_ASSERT(device!= NULL); AR_DEBUG_ASSERT(device!= NULL);
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: delHifDevice; 0x%p\n", device)); AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: delHifDevice; 0x%p\n", device));
...@@ -1222,17 +1222,17 @@ static void ResetAllCards(void) ...@@ -1222,17 +1222,17 @@ static void ResetAllCards(void)
{ {
} }
void HIFClaimDevice(HIF_DEVICE *device, void *context) void HIFClaimDevice(struct hif_device *device, void *context)
{ {
device->claimedContext = context; device->claimedContext = context;
} }
void HIFReleaseDevice(HIF_DEVICE *device) void HIFReleaseDevice(struct hif_device *device)
{ {
device->claimedContext = NULL; device->claimedContext = NULL;
} }
int HIFAttachHTC(HIF_DEVICE *device, HTC_CALLBACKS *callbacks) int HIFAttachHTC(struct hif_device *device, HTC_CALLBACKS *callbacks)
{ {
if (device->htcCallbacks.context != NULL) { if (device->htcCallbacks.context != NULL) {
/* already in use! */ /* already in use! */
...@@ -1242,7 +1242,7 @@ int HIFAttachHTC(HIF_DEVICE *device, HTC_CALLBACKS *callbacks) ...@@ -1242,7 +1242,7 @@ int HIFAttachHTC(HIF_DEVICE *device, HTC_CALLBACKS *callbacks)
return 0; return 0;
} }
void HIFDetachHTC(HIF_DEVICE *device) void HIFDetachHTC(struct hif_device *device)
{ {
A_MEMZERO(&device->htcCallbacks,sizeof(device->htcCallbacks)); A_MEMZERO(&device->htcCallbacks,sizeof(device->htcCallbacks));
} }
......
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
(((address) & 0x1FFFF) << 9) | \ (((address) & 0x1FFFF) << 9) | \
((bytes_blocks) & 0x1FF) ((bytes_blocks) & 0x1FF)
static void FreeScatterReq(HIF_DEVICE *device, struct hif_scatter_req *pReq) static void FreeScatterReq(struct hif_device *device, struct hif_scatter_req *pReq)
{ {
unsigned long flag; unsigned long flag;
...@@ -60,7 +60,7 @@ static void FreeScatterReq(HIF_DEVICE *device, struct hif_scatter_req *pReq) ...@@ -60,7 +60,7 @@ static void FreeScatterReq(HIF_DEVICE *device, struct hif_scatter_req *pReq)
} }
static struct hif_scatter_req *AllocScatterReq(HIF_DEVICE *device) static struct hif_scatter_req *AllocScatterReq(struct hif_device *device)
{ {
struct dl_list *pItem; struct dl_list *pItem;
unsigned long flag; unsigned long flag;
...@@ -79,7 +79,7 @@ static struct hif_scatter_req *AllocScatterReq(HIF_DEVICE *device) ...@@ -79,7 +79,7 @@ static struct 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 */
int DoHifReadWriteScatter(HIF_DEVICE *device, BUS_REQUEST *busrequest) int DoHifReadWriteScatter(struct hif_device *device, BUS_REQUEST *busrequest)
{ {
int i; int i;
u8 rw; u8 rw;
...@@ -199,7 +199,7 @@ int DoHifReadWriteScatter(HIF_DEVICE *device, BUS_REQUEST *busrequest) ...@@ -199,7 +199,7 @@ int DoHifReadWriteScatter(HIF_DEVICE *device, BUS_REQUEST *busrequest)
} }
/* callback to issue a read-write scatter request */ /* callback to issue a read-write scatter request */
static int HifReadWriteScatter(HIF_DEVICE *device, struct hif_scatter_req *pReq) static int HifReadWriteScatter(struct hif_device *device, struct hif_scatter_req *pReq)
{ {
int status = A_EINVAL; int status = A_EINVAL;
u32 request = pReq->Request; u32 request = pReq->Request;
...@@ -275,7 +275,7 @@ static int HifReadWriteScatter(HIF_DEVICE *device, struct hif_scatter_req *pReq) ...@@ -275,7 +275,7 @@ static int HifReadWriteScatter(HIF_DEVICE *device, struct hif_scatter_req *pReq)
} }
/* setup of HIF scatter resources */ /* setup of HIF scatter resources */
int SetupHIFScatterSupport(HIF_DEVICE *device, struct hif_device_scatter_support_info *pInfo) int SetupHIFScatterSupport(struct hif_device *device, struct hif_device_scatter_support_info *pInfo)
{ {
int status = A_ERROR; int status = A_ERROR;
int i; int i;
...@@ -356,7 +356,7 @@ int SetupHIFScatterSupport(HIF_DEVICE *device, struct hif_device_scatter_support ...@@ -356,7 +356,7 @@ int SetupHIFScatterSupport(HIF_DEVICE *device, struct hif_device_scatter_support
} }
/* clean up scatter support */ /* clean up scatter support */
void CleanupHIFScatterResources(HIF_DEVICE *device) void CleanupHIFScatterResources(struct hif_device *device)
{ {
struct hif_scatter_req_priv *pReqPriv; struct hif_scatter_req_priv *pReqPriv;
struct hif_scatter_req *pReq; struct hif_scatter_req *pReq;
......
...@@ -587,7 +587,7 @@ void DevDumpRegisters(struct ar6k_device *pDev, ...@@ -587,7 +587,7 @@ void DevDumpRegisters(struct ar6k_device *pDev,
#define DEV_GET_VIRT_DMA_INFO(p) ((struct dev_scatter_dma_virtual_info *)((p)->HIFPrivate[0])) #define DEV_GET_VIRT_DMA_INFO(p) ((struct dev_scatter_dma_virtual_info *)((p)->HIFPrivate[0]))
static struct hif_scatter_req *DevAllocScatterReq(HIF_DEVICE *Context) static struct hif_scatter_req *DevAllocScatterReq(struct hif_device *Context)
{ {
struct dl_list *pItem; struct dl_list *pItem;
struct ar6k_device *pDev = (struct ar6k_device *)Context; struct ar6k_device *pDev = (struct ar6k_device *)Context;
...@@ -600,7 +600,7 @@ static struct hif_scatter_req *DevAllocScatterReq(HIF_DEVICE *Context) ...@@ -600,7 +600,7 @@ static struct hif_scatter_req *DevAllocScatterReq(HIF_DEVICE *Context)
return NULL; return NULL;
} }
static void DevFreeScatterReq(HIF_DEVICE *Context, struct hif_scatter_req *pReq) static void DevFreeScatterReq(struct hif_device *Context, struct hif_scatter_req *pReq)
{ {
struct ar6k_device *pDev = (struct ar6k_device *)Context; struct ar6k_device *pDev = (struct ar6k_device *)Context;
LOCK_AR6K(pDev); LOCK_AR6K(pDev);
...@@ -664,7 +664,7 @@ static void DevReadWriteScatterAsyncHandler(void *Context, struct htc_packet *pP ...@@ -664,7 +664,7 @@ static void DevReadWriteScatterAsyncHandler(void *Context, struct htc_packet *pP
AR_DEBUG_PRINTF(ATH_DEBUG_RECV,("-DevReadWriteScatterAsyncHandler \n")); AR_DEBUG_PRINTF(ATH_DEBUG_RECV,("-DevReadWriteScatterAsyncHandler \n"));
} }
static int DevReadWriteScatter(HIF_DEVICE *Context, struct hif_scatter_req *pReq) static int DevReadWriteScatter(struct hif_device *Context, struct hif_scatter_req *pReq)
{ {
struct ar6k_device *pDev = (struct ar6k_device *)Context; struct ar6k_device *pDev = (struct ar6k_device *)Context;
int status = 0; int status = 0;
...@@ -739,7 +739,7 @@ static void DevCleanupVirtualScatterSupport(struct ar6k_device *pDev) ...@@ -739,7 +739,7 @@ static void DevCleanupVirtualScatterSupport(struct ar6k_device *pDev)
struct hif_scatter_req *pReq; struct hif_scatter_req *pReq;
while (1) { while (1) {
pReq = DevAllocScatterReq((HIF_DEVICE *)pDev); pReq = DevAllocScatterReq((struct hif_device *)pDev);
if (NULL == pReq) { if (NULL == pReq) {
break; break;
} }
...@@ -787,7 +787,7 @@ static int DevSetupVirtualScatterSupport(struct ar6k_device *pDev) ...@@ -787,7 +787,7 @@ static int DevSetupVirtualScatterSupport(struct ar6k_device *pDev)
pReq->ScatterMethod = HIF_SCATTER_DMA_BOUNCE; pReq->ScatterMethod = HIF_SCATTER_DMA_BOUNCE;
pReq->pScatterBounceBuffer = pVirtualInfo->pVirtDmaBuffer; pReq->pScatterBounceBuffer = pVirtualInfo->pVirtDmaBuffer;
/* free request to the list */ /* free request to the list */
DevFreeScatterReq((HIF_DEVICE *)pDev,pReq); DevFreeScatterReq((struct hif_device *)pDev,pReq);
} }
if (status) { if (status) {
......
...@@ -1233,7 +1233,7 @@ int HCI_TransportRecvHCIEventSync(HCI_TRANSPORT_HANDLE HciTrans, ...@@ -1233,7 +1233,7 @@ int HCI_TransportRecvHCIEventSync(HCI_TRANSPORT_HANDLE HciTrans,
int HCI_TransportSetBaudRate(HCI_TRANSPORT_HANDLE HciTrans, u32 Baud) int HCI_TransportSetBaudRate(HCI_TRANSPORT_HANDLE HciTrans, u32 Baud)
{ {
struct gmbox_proto_hci_uart *pProt = (struct gmbox_proto_hci_uart *)HciTrans; struct gmbox_proto_hci_uart *pProt = (struct gmbox_proto_hci_uart *)HciTrans;
HIF_DEVICE *pHIFDevice = (HIF_DEVICE *)(pProt->pDev->HIFDevice); struct hif_device *pHIFDevice = (struct hif_device *)(pProt->pDev->HIFDevice);
u32 scaledBaud, scratchAddr; u32 scaledBaud, scratchAddr;
int status = 0; int status = 0;
......
...@@ -42,7 +42,7 @@ struct ar3k_config_info { ...@@ -42,7 +42,7 @@ struct ar3k_config_info {
u32 Flags; /* config flags */ u32 Flags; /* config flags */
void *pHCIDev; /* HCI bridge device */ void *pHCIDev; /* HCI bridge device */
struct hci_transport_properties *pHCIProps; /* HCI bridge props */ struct hci_transport_properties *pHCIProps; /* HCI bridge props */
HIF_DEVICE *pHIFDevice; /* HIF layer device */ struct hif_device *pHIFDevice; /* HIF layer device */
u32 AR3KBaudRate; /* AR3K operational baud rate */ u32 AR3KBaudRate; /* AR3K operational baud rate */
u16 AR6KScale; /* AR6K UART scale value */ u16 AR6KScale; /* AR6K UART scale value */
......
...@@ -26,23 +26,23 @@ ...@@ -26,23 +26,23 @@
int int
ar6000_ReadRegDiag(HIF_DEVICE *hifDevice, u32 *address, u32 *data); ar6000_ReadRegDiag(struct hif_device *hifDevice, u32 *address, u32 *data);
int int
ar6000_WriteRegDiag(HIF_DEVICE *hifDevice, u32 *address, u32 *data); ar6000_WriteRegDiag(struct hif_device *hifDevice, u32 *address, u32 *data);
int int
ar6000_ReadDataDiag(HIF_DEVICE *hifDevice, u32 address, ar6000_ReadDataDiag(struct hif_device *hifDevice, u32 address,
u8 *data, u32 length); u8 *data, u32 length);
int int
ar6000_WriteDataDiag(HIF_DEVICE *hifDevice, u32 address, ar6000_WriteDataDiag(struct hif_device *hifDevice, u32 address,
u8 *data, u32 length); u8 *data, u32 length);
int int
ar6k_ReadTargetRegister(HIF_DEVICE *hifDevice, int regsel, u32 *regval); ar6k_ReadTargetRegister(struct hif_device *hifDevice, int regsel, u32 *regval);
void void
ar6k_FetchTargetRegs(HIF_DEVICE *hifDevice, u32 *targregs); ar6k_FetchTargetRegs(struct hif_device *hifDevice, u32 *targregs);
#endif /*AR6000_DIAG_H_*/ #endif /*AR6000_DIAG_H_*/
...@@ -44,44 +44,44 @@ void ...@@ -44,44 +44,44 @@ void
BMICleanup(void); BMICleanup(void);
int int
BMIDone(HIF_DEVICE *device); BMIDone(struct hif_device *device);
int int
BMIGetTargetInfo(HIF_DEVICE *device, struct bmi_target_info *targ_info); BMIGetTargetInfo(struct hif_device *device, struct bmi_target_info *targ_info);
int int
BMIReadMemory(HIF_DEVICE *device, BMIReadMemory(struct hif_device *device,
u32 address, u32 address,
u8 *buffer, u8 *buffer,
u32 length); u32 length);
int int
BMIWriteMemory(HIF_DEVICE *device, BMIWriteMemory(struct hif_device *device,
u32 address, u32 address,
u8 *buffer, u8 *buffer,
u32 length); u32 length);
int int
BMIExecute(HIF_DEVICE *device, BMIExecute(struct hif_device *device,
u32 address, u32 address,
u32 *param); u32 *param);
int int
BMISetAppStart(HIF_DEVICE *device, BMISetAppStart(struct hif_device *device,
u32 address); u32 address);
int int
BMIReadSOCRegister(HIF_DEVICE *device, BMIReadSOCRegister(struct hif_device *device,
u32 address, u32 address,
u32 *param); u32 *param);
int int
BMIWriteSOCRegister(HIF_DEVICE *device, BMIWriteSOCRegister(struct hif_device *device,
u32 address, u32 address,
u32 param); u32 param);
int int
BMIrompatchInstall(HIF_DEVICE *device, BMIrompatchInstall(struct hif_device *device,
u32 ROM_addr, u32 ROM_addr,
u32 RAM_addr, u32 RAM_addr,
u32 nbytes, u32 nbytes,
...@@ -89,41 +89,41 @@ BMIrompatchInstall(HIF_DEVICE *device, ...@@ -89,41 +89,41 @@ BMIrompatchInstall(HIF_DEVICE *device,
u32 *patch_id); u32 *patch_id);
int int
BMIrompatchUninstall(HIF_DEVICE *device, BMIrompatchUninstall(struct hif_device *device,
u32 rompatch_id); u32 rompatch_id);
int int
BMIrompatchActivate(HIF_DEVICE *device, BMIrompatchActivate(struct hif_device *device,
u32 rompatch_count, u32 rompatch_count,
u32 *rompatch_list); u32 *rompatch_list);
int int
BMIrompatchDeactivate(HIF_DEVICE *device, BMIrompatchDeactivate(struct hif_device *device,
u32 rompatch_count, u32 rompatch_count,
u32 *rompatch_list); u32 *rompatch_list);
int int
BMILZStreamStart(HIF_DEVICE *device, BMILZStreamStart(struct hif_device *device,
u32 address); u32 address);
int int
BMILZData(HIF_DEVICE *device, BMILZData(struct hif_device *device,
u8 *buffer, u8 *buffer,
u32 length); u32 length);
int int
BMIFastDownload(HIF_DEVICE *device, BMIFastDownload(struct hif_device *device,
u32 address, u32 address,
u8 *buffer, u8 *buffer,
u32 length); u32 length);
int int
BMIRawWrite(HIF_DEVICE *device, BMIRawWrite(struct hif_device *device,
u8 *buffer, u8 *buffer,
u32 length); u32 length);
int int
BMIRawRead(HIF_DEVICE *device, BMIRawRead(struct hif_device *device,
u8 *buffer, u8 *buffer,
u32 length, u32 length,
bool want_timeout); bool want_timeout);
......
...@@ -66,30 +66,30 @@ extern "C" { ...@@ -66,30 +66,30 @@ extern "C" {
/* OS-independent APIs */ /* OS-independent APIs */
int ar6000_setup_credit_dist(HTC_HANDLE HTCHandle, struct common_credit_state_info *pCredInfo); int ar6000_setup_credit_dist(HTC_HANDLE HTCHandle, struct common_credit_state_info *pCredInfo);
int ar6000_ReadRegDiag(HIF_DEVICE *hifDevice, u32 *address, u32 *data); int ar6000_ReadRegDiag(struct hif_device *hifDevice, u32 *address, u32 *data);
int ar6000_WriteRegDiag(HIF_DEVICE *hifDevice, u32 *address, u32 *data); int ar6000_WriteRegDiag(struct hif_device *hifDevice, u32 *address, u32 *data);
int ar6000_ReadDataDiag(HIF_DEVICE *hifDevice, u32 address, u8 *data, u32 length); int ar6000_ReadDataDiag(struct hif_device *hifDevice, u32 address, u8 *data, u32 length);
int ar6000_reset_device(HIF_DEVICE *hifDevice, u32 TargetType, bool waitForCompletion, bool coldReset); int ar6000_reset_device(struct hif_device *hifDevice, u32 TargetType, bool waitForCompletion, bool coldReset);
void ar6000_dump_target_assert_info(HIF_DEVICE *hifDevice, u32 TargetType); void ar6000_dump_target_assert_info(struct hif_device *hifDevice, u32 TargetType);
int ar6000_set_htc_params(HIF_DEVICE *hifDevice, int ar6000_set_htc_params(struct hif_device *hifDevice,
u32 TargetType, u32 TargetType,
u32 MboxIsrYieldValue, u32 MboxIsrYieldValue,
u8 HtcControlBuffers); u8 HtcControlBuffers);
int ar6000_prepare_target(HIF_DEVICE *hifDevice, int ar6000_prepare_target(struct hif_device *hifDevice,
u32 TargetType, u32 TargetType,
u32 TargetVersion); u32 TargetVersion);
int ar6000_set_hci_bridge_flags(HIF_DEVICE *hifDevice, int ar6000_set_hci_bridge_flags(struct hif_device *hifDevice,
u32 TargetType, u32 TargetType,
u32 Flags); u32 Flags);
void ar6000_copy_cust_data_from_target(HIF_DEVICE *hifDevice, u32 TargetType); void ar6000_copy_cust_data_from_target(struct hif_device *hifDevice, u32 TargetType);
u8 *ar6000_get_cust_data_buffer(u32 TargetType); u8 *ar6000_get_cust_data_buffer(u32 TargetType);
......
...@@ -38,7 +38,7 @@ extern "C" { ...@@ -38,7 +38,7 @@ extern "C" {
typedef struct htc_callbacks HTC_CALLBACKS; typedef struct htc_callbacks HTC_CALLBACKS;
typedef struct hif_device HIF_DEVICE; struct hif_device;
/* /*
* direction - Direction of transfer (HIF_READ/HIF_WRITE). * direction - Direction of transfer (HIF_READ/HIF_WRITE).
...@@ -301,9 +301,9 @@ struct hif_scatter_req { ...@@ -301,9 +301,9 @@ struct hif_scatter_req {
struct hif_scatter_item ScatterList[1]; /* start of scatter list */ struct hif_scatter_item ScatterList[1]; /* start of scatter list */
}; };
typedef struct hif_scatter_req * ( *HIF_ALLOCATE_SCATTER_REQUEST)(HIF_DEVICE *device); typedef struct hif_scatter_req * ( *HIF_ALLOCATE_SCATTER_REQUEST)(struct hif_device *device);
typedef void ( *HIF_FREE_SCATTER_REQUEST)(HIF_DEVICE *device, struct hif_scatter_req *request); typedef void ( *HIF_FREE_SCATTER_REQUEST)(struct hif_device *device, struct hif_scatter_req *request);
typedef int ( *HIF_READWRITE_SCATTER)(HIF_DEVICE *device, struct hif_scatter_req *request); typedef int ( *HIF_READWRITE_SCATTER)(struct hif_device *device, struct hif_scatter_req *request);
struct hif_device_scatter_support_info { struct hif_device_scatter_support_info {
/* information returned from HIF layer */ /* information returned from HIF layer */
...@@ -354,14 +354,14 @@ struct hif_pending_events_info { ...@@ -354,14 +354,14 @@ 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 int ( *HIF_PENDING_EVENTS_FUNC)(HIF_DEVICE *device, typedef int ( *HIF_PENDING_EVENTS_FUNC)(struct hif_device *device,
struct hif_pending_events_info *pEvents, struct 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 int ( *HIF_MASK_UNMASK_RECV_EVENT)(HIF_DEVICE *device, typedef int ( *HIF_MASK_UNMASK_RECV_EVENT)(struct hif_device *device,
bool Mask, bool Mask,
void *AsyncContext); void *AsyncContext);
...@@ -376,14 +376,14 @@ int HIFInit(OSDRV_CALLBACKS *callbacks); ...@@ -376,14 +376,14 @@ 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
* a device. The claimed context must be non-NULL */ * a device. The claimed context must be non-NULL */
void HIFClaimDevice(HIF_DEVICE *device, void *claimedContext); void HIFClaimDevice(struct hif_device *device, void *claimedContext);
/* release the claimed device */ /* release the claimed device */
void HIFReleaseDevice(HIF_DEVICE *device); void HIFReleaseDevice(struct 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 */
int HIFAttachHTC(HIF_DEVICE *device, HTC_CALLBACKS *callbacks); int HIFAttachHTC(struct 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(struct hif_device *device);
/* /*
* This API is used to provide the read/write interface over the specific bus * This API is used to provide the read/write interface over the specific bus
...@@ -398,7 +398,7 @@ void HIFDetachHTC(HIF_DEVICE *device); ...@@ -398,7 +398,7 @@ void HIFDetachHTC(HIF_DEVICE *device);
* request - Characterizes the attributes of the command. * request - Characterizes the attributes of the command.
*/ */
int int
HIFReadWrite(HIF_DEVICE *device, HIFReadWrite(struct hif_device *device,
u32 address, u32 address,
u8 *buffer, u8 *buffer,
u32 length, u32 length,
...@@ -409,7 +409,7 @@ HIFReadWrite(HIF_DEVICE *device, ...@@ -409,7 +409,7 @@ HIFReadWrite(HIF_DEVICE *device,
* This can be initiated from the unload driver context when the OSDRV layer has no more use for * This can be initiated from the unload driver context when the OSDRV layer has no more use for
* the device. * the device.
*/ */
void HIFShutDownDevice(HIF_DEVICE *device); void HIFShutDownDevice(struct hif_device *device);
/* /*
* This should translate to an acknowledgment to the bus driver indicating that * This should translate to an acknowledgment to the bus driver indicating that
...@@ -418,11 +418,11 @@ void HIFShutDownDevice(HIF_DEVICE *device); ...@@ -418,11 +418,11 @@ void HIFShutDownDevice(HIF_DEVICE *device);
* This should prevent the bus driver from raising an interrupt unless the * This should prevent the bus driver from raising an interrupt unless the
* previous one has been serviced and acknowledged using the previous API. * previous one has been serviced and acknowledged using the previous API.
*/ */
void HIFAckInterrupt(HIF_DEVICE *device); void HIFAckInterrupt(struct hif_device *device);
void HIFMaskInterrupt(HIF_DEVICE *device); void HIFMaskInterrupt(struct hif_device *device);
void HIFUnMaskInterrupt(HIF_DEVICE *device); void HIFUnMaskInterrupt(struct hif_device *device);
#ifdef THREAD_X #ifdef THREAD_X
/* /*
...@@ -441,14 +441,14 @@ int HIFRWCompleteEventNotify(void); ...@@ -441,14 +441,14 @@ int HIFRWCompleteEventNotify(void);
#endif #endif
int int
HIFConfigureDevice(HIF_DEVICE *device, HIF_DEVICE_CONFIG_OPCODE opcode, HIFConfigureDevice(struct hif_device *device, HIF_DEVICE_CONFIG_OPCODE opcode,
void *config, u32 configLen); void *config, u32 configLen);
/* /*
* 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
*/ */
int hifWaitForPendingRecv(HIF_DEVICE *device); int hifWaitForPendingRecv(struct hif_device *device);
#ifdef __cplusplus #ifdef __cplusplus
} }
......
...@@ -83,7 +83,7 @@ static u8 custDataAR6003[AR6003_CUST_DATA_SIZE]; ...@@ -83,7 +83,7 @@ static u8 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 ). */
int ar6000_SetAddressWindowRegister(HIF_DEVICE *hifDevice, u32 RegisterAddr, u32 Address) int ar6000_SetAddressWindowRegister(struct hif_device *hifDevice, u32 RegisterAddr, u32 Address)
{ {
int status; int status;
u8 addrValue[4]; u8 addrValue[4];
...@@ -144,7 +144,7 @@ int ar6000_SetAddressWindowRegister(HIF_DEVICE *hifDevice, u32 RegisterAddr, u32 ...@@ -144,7 +144,7 @@ int ar6000_SetAddressWindowRegister(HIF_DEVICE *hifDevice, u32 RegisterAddr, u32
#else #else
/* set the window address register */ /* set the window address register */
int ar6000_SetAddressWindowRegister(HIF_DEVICE *hifDevice, u32 RegisterAddr, u32 Address) int ar6000_SetAddressWindowRegister(struct hif_device *hifDevice, u32 RegisterAddr, u32 Address)
{ {
int status; int status;
...@@ -187,7 +187,7 @@ int ar6000_SetAddressWindowRegister(HIF_DEVICE *hifDevice, u32 RegisterAddr, u32 ...@@ -187,7 +187,7 @@ int ar6000_SetAddressWindowRegister(HIF_DEVICE *hifDevice, u32 RegisterAddr, u32
* No cooperation from the Target is required for this. * No cooperation from the Target is required for this.
*/ */
int int
ar6000_ReadRegDiag(HIF_DEVICE *hifDevice, u32 *address, u32 *data) ar6000_ReadRegDiag(struct hif_device *hifDevice, u32 *address, u32 *data)
{ {
int status; int status;
...@@ -221,7 +221,7 @@ ar6000_ReadRegDiag(HIF_DEVICE *hifDevice, u32 *address, u32 *data) ...@@ -221,7 +221,7 @@ ar6000_ReadRegDiag(HIF_DEVICE *hifDevice, u32 *address, u32 *data)
* No cooperation from the Target is required for this. * No cooperation from the Target is required for this.
*/ */
int int
ar6000_WriteRegDiag(HIF_DEVICE *hifDevice, u32 *address, u32 *data) ar6000_WriteRegDiag(struct hif_device *hifDevice, u32 *address, u32 *data)
{ {
int status; int status;
...@@ -244,7 +244,7 @@ ar6000_WriteRegDiag(HIF_DEVICE *hifDevice, u32 *address, u32 *data) ...@@ -244,7 +244,7 @@ ar6000_WriteRegDiag(HIF_DEVICE *hifDevice, u32 *address, u32 *data)
} }
int int
ar6000_ReadDataDiag(HIF_DEVICE *hifDevice, u32 address, ar6000_ReadDataDiag(struct hif_device *hifDevice, u32 address,
u8 *data, u32 length) u8 *data, u32 length)
{ {
u32 count; u32 count;
...@@ -262,7 +262,7 @@ ar6000_ReadDataDiag(HIF_DEVICE *hifDevice, u32 address, ...@@ -262,7 +262,7 @@ ar6000_ReadDataDiag(HIF_DEVICE *hifDevice, u32 address,
} }
int int
ar6000_WriteDataDiag(HIF_DEVICE *hifDevice, u32 address, ar6000_WriteDataDiag(struct hif_device *hifDevice, u32 address,
u8 *data, u32 length) u8 *data, u32 length)
{ {
u32 count; u32 count;
...@@ -280,7 +280,7 @@ ar6000_WriteDataDiag(HIF_DEVICE *hifDevice, u32 address, ...@@ -280,7 +280,7 @@ ar6000_WriteDataDiag(HIF_DEVICE *hifDevice, u32 address,
} }
int int
ar6k_ReadTargetRegister(HIF_DEVICE *hifDevice, int regsel, u32 *regval) ar6k_ReadTargetRegister(struct hif_device *hifDevice, int regsel, u32 *regval)
{ {
int status; int status;
u8 vals[4]; u8 vals[4];
...@@ -316,7 +316,7 @@ ar6k_ReadTargetRegister(HIF_DEVICE *hifDevice, int regsel, u32 *regval) ...@@ -316,7 +316,7 @@ ar6k_ReadTargetRegister(HIF_DEVICE *hifDevice, int regsel, u32 *regval)
} }
void void
ar6k_FetchTargetRegs(HIF_DEVICE *hifDevice, u32 *targregs) ar6k_FetchTargetRegs(struct hif_device *hifDevice, u32 *targregs)
{ {
int i; int i;
u32 val; u32 val;
...@@ -330,7 +330,7 @@ ar6k_FetchTargetRegs(HIF_DEVICE *hifDevice, u32 *targregs) ...@@ -330,7 +330,7 @@ ar6k_FetchTargetRegs(HIF_DEVICE *hifDevice, u32 *targregs)
#if 0 #if 0
static int static int
_do_write_diag(HIF_DEVICE *hifDevice, u32 addr, u32 value) _do_write_diag(struct hif_device *hifDevice, u32 addr, u32 value)
{ {
int status; int status;
...@@ -358,7 +358,7 @@ _do_write_diag(HIF_DEVICE *hifDevice, u32 addr, u32 value) ...@@ -358,7 +358,7 @@ _do_write_diag(HIF_DEVICE *hifDevice, u32 addr, u32 value)
*/ */
#if 0 #if 0
static int static int
_delay_until_target_alive(HIF_DEVICE *hifDevice, s32 wait_msecs, u32 TargetType) _delay_until_target_alive(struct hif_device *hifDevice, s32 wait_msecs, u32 TargetType)
{ {
s32 actual_wait; s32 actual_wait;
s32 i; s32 i;
...@@ -399,7 +399,7 @@ _delay_until_target_alive(HIF_DEVICE *hifDevice, s32 wait_msecs, u32 TargetType) ...@@ -399,7 +399,7 @@ _delay_until_target_alive(HIF_DEVICE *hifDevice, s32 wait_msecs, u32 TargetType)
#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 */
int ar6000_reset_device(HIF_DEVICE *hifDevice, u32 TargetType, bool waitForCompletion, bool coldReset) int ar6000_reset_device(struct hif_device *hifDevice, u32 TargetType, bool waitForCompletion, bool coldReset)
{ {
int status = 0; int status = 0;
u32 address; u32 address;
...@@ -481,7 +481,7 @@ int ar6000_reset_device(HIF_DEVICE *hifDevice, u32 TargetType, bool waitForCompl ...@@ -481,7 +481,7 @@ int ar6000_reset_device(HIF_DEVICE *hifDevice, u32 TargetType, bool waitForCompl
/* This should be called in BMI phase after firmware is downloaded */ /* This should be called in BMI phase after firmware is downloaded */
void void
ar6000_copy_cust_data_from_target(HIF_DEVICE *hifDevice, u32 TargetType) ar6000_copy_cust_data_from_target(struct hif_device *hifDevice, u32 TargetType)
{ {
u32 eepHeaderAddr; u32 eepHeaderAddr;
u8 AR6003CustDataShadow[AR6003_CUST_DATA_SIZE+4]; u8 AR6003CustDataShadow[AR6003_CUST_DATA_SIZE+4];
...@@ -552,7 +552,7 @@ u8 *ar6000_get_cust_data_buffer(u32 TargetType) ...@@ -552,7 +552,7 @@ u8 *ar6000_get_cust_data_buffer(u32 TargetType)
#endif #endif
void ar6000_dump_target_assert_info(HIF_DEVICE *hifDevice, u32 TargetType) void ar6000_dump_target_assert_info(struct hif_device *hifDevice, u32 TargetType)
{ {
u32 address; u32 address;
u32 regDumpArea = 0; u32 regDumpArea = 0;
...@@ -624,7 +624,7 @@ void ar6000_dump_target_assert_info(HIF_DEVICE *hifDevice, u32 TargetType) ...@@ -624,7 +624,7 @@ void ar6000_dump_target_assert_info(HIF_DEVICE *hifDevice, u32 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 */
int ar6000_set_htc_params(HIF_DEVICE *hifDevice, int ar6000_set_htc_params(struct hif_device *hifDevice,
u32 TargetType, u32 TargetType,
u32 MboxIsrYieldValue, u32 MboxIsrYieldValue,
u8 HtcControlBuffers) u8 HtcControlBuffers)
...@@ -684,7 +684,7 @@ int ar6000_set_htc_params(HIF_DEVICE *hifDevice, ...@@ -684,7 +684,7 @@ int ar6000_set_htc_params(HIF_DEVICE *hifDevice,
} }
static int prepare_ar6002(HIF_DEVICE *hifDevice, u32 TargetVersion) static int prepare_ar6002(struct hif_device *hifDevice, u32 TargetVersion)
{ {
int status = 0; int status = 0;
...@@ -693,7 +693,7 @@ static int prepare_ar6002(HIF_DEVICE *hifDevice, u32 TargetVersion) ...@@ -693,7 +693,7 @@ static int prepare_ar6002(HIF_DEVICE *hifDevice, u32 TargetVersion)
return status; return status;
} }
static int prepare_ar6003(HIF_DEVICE *hifDevice, u32 TargetVersion) static int prepare_ar6003(struct hif_device *hifDevice, u32 TargetVersion)
{ {
int status = 0; int status = 0;
...@@ -703,7 +703,7 @@ static int prepare_ar6003(HIF_DEVICE *hifDevice, u32 TargetVersion) ...@@ -703,7 +703,7 @@ static int prepare_ar6003(HIF_DEVICE *hifDevice, u32 TargetVersion)
} }
/* this function assumes the caller has already initialized the BMI APIs */ /* this function assumes the caller has already initialized the BMI APIs */
int ar6000_prepare_target(HIF_DEVICE *hifDevice, int ar6000_prepare_target(struct hif_device *hifDevice,
u32 TargetType, u32 TargetType,
u32 TargetVersion) u32 TargetVersion)
{ {
...@@ -725,7 +725,7 @@ int ar6000_prepare_target(HIF_DEVICE *hifDevice, ...@@ -725,7 +725,7 @@ int ar6000_prepare_target(HIF_DEVICE *hifDevice,
* TBDXXX: Remove this function when REV 1.x is desupported. * TBDXXX: Remove this function when REV 1.x is desupported.
*/ */
int int
ar6002_REV1_reset_force_host (HIF_DEVICE *hifDevice) ar6002_REV1_reset_force_host (struct hif_device *hifDevice)
{ {
s32 i; s32 i;
struct forceROM_s { struct forceROM_s {
...@@ -998,7 +998,7 @@ void a_module_debug_support_cleanup(void) ...@@ -998,7 +998,7 @@ void a_module_debug_support_cleanup(void)
} }
/* can only be called during bmi init stage */ /* can only be called during bmi init stage */
int ar6000_set_hci_bridge_flags(HIF_DEVICE *hifDevice, int ar6000_set_hci_bridge_flags(struct hif_device *hifDevice,
u32 TargetType, u32 TargetType,
u32 Flags) u32 Flags)
{ {
......
...@@ -55,7 +55,7 @@ char *p_mac = NULL; ...@@ -55,7 +55,7 @@ char *p_mac = NULL;
static u8 eeprom_data[EEPROM_SZ]; static u8 eeprom_data[EEPROM_SZ];
static u32 sys_sleep_reg; static u32 sys_sleep_reg;
static HIF_DEVICE *p_bmi_device; static struct hif_device *p_bmi_device;
// //
// Functions // Functions
...@@ -158,7 +158,7 @@ BMI_write_mem(u32 address, u8 *p_data, u32 sz) ...@@ -158,7 +158,7 @@ BMI_write_mem(u32 address, u8 *p_data, u32 sz)
* so we can access the EEPROM. * so we can access the EEPROM.
*/ */
static void static void
enable_SI(HIF_DEVICE *p_device) enable_SI(struct hif_device *p_device)
{ {
u32 regval; u32 regval;
...@@ -361,7 +361,7 @@ commit_4bytes(int offset, u32 data) ...@@ -361,7 +361,7 @@ commit_4bytes(int offset, u32 data)
} }
/* ATHENV */ /* ATHENV */
#ifdef ANDROID_ENV #ifdef ANDROID_ENV
void eeprom_ar6000_transfer(HIF_DEVICE *device, char *fake_file, char *p_mac) void eeprom_ar6000_transfer(struct hif_device *device, char *fake_file, char *p_mac)
{ {
u32 first_word; u32 first_word;
u32 board_data_addr; u32 board_data_addr;
......
...@@ -70,7 +70,7 @@ int ar6000_register_hci_transport(struct hci_transport_callbacks *hciTransCallba ...@@ -70,7 +70,7 @@ int ar6000_register_hci_transport(struct hci_transport_callbacks *hciTransCallba
} }
int int
ar6000_get_hif_dev(HIF_DEVICE *device, void *config) ar6000_get_hif_dev(struct hif_device *device, void *config)
{ {
int status; int status;
...@@ -81,7 +81,7 @@ ar6000_get_hif_dev(HIF_DEVICE *device, void *config) ...@@ -81,7 +81,7 @@ ar6000_get_hif_dev(HIF_DEVICE *device, void *config)
return status; return status;
} }
int ar6000_set_uart_config(HIF_DEVICE *hifDevice, int ar6000_set_uart_config(struct hif_device *hifDevice,
u32 scale, u32 scale,
u32 step) u32 step)
{ {
...@@ -97,7 +97,7 @@ int ar6000_set_uart_config(HIF_DEVICE *hifDevice, ...@@ -97,7 +97,7 @@ int ar6000_set_uart_config(HIF_DEVICE *hifDevice,
return status; return status;
} }
int ar6000_get_core_clock_config(HIF_DEVICE *hifDevice, u32 *data) int ar6000_get_core_clock_config(struct hif_device *hifDevice, u32 *data)
{ {
u32 regAddress; u32 regAddress;
int status; int status;
......
...@@ -270,7 +270,7 @@ static int ar6000_hci_transport_ready(HCI_TRANSPORT_HANDLE HCIHandle, ...@@ -270,7 +270,7 @@ static int ar6000_hci_transport_ready(HCI_TRANSPORT_HANDLE HCIHandle,
ar3kconfig.pHCIDev = pHcidevInfo->pHCIDev; ar3kconfig.pHCIDev = pHcidevInfo->pHCIDev;
ar3kconfig.pHCIProps = &pHcidevInfo->HCIProps; ar3kconfig.pHCIProps = &pHcidevInfo->HCIProps;
#ifdef EXPORT_HCI_BRIDGE_INTERFACE #ifdef EXPORT_HCI_BRIDGE_INTERFACE
ar3kconfig.pHIFDevice = (HIF_DEVICE *)(pHcidevInfo->HCITransHdl.hifDevice); ar3kconfig.pHIFDevice = (struct hif_device *)(pHcidevInfo->HCITransHdl.hifDevice);
#else #else
ar3kconfig.pHIFDevice = pHcidevInfo->ar->arHifDevice; ar3kconfig.pHIFDevice = pHcidevInfo->ar->arHifDevice;
#endif #endif
...@@ -868,7 +868,7 @@ static int bt_setup_hci(struct ar6k_hci_bridge_info *pHcidevInfo) ...@@ -868,7 +868,7 @@ static int bt_setup_hci(struct ar6k_hci_bridge_info *pHcidevInfo)
A_MEMZERO(&osDevInfo,sizeof(osDevInfo)); A_MEMZERO(&osDevInfo,sizeof(osDevInfo));
/* get the underlying OS device */ /* get the underlying OS device */
#ifdef EXPORT_HCI_BRIDGE_INTERFACE #ifdef EXPORT_HCI_BRIDGE_INTERFACE
status = ar6000_get_hif_dev((HIF_DEVICE *)(pHcidevInfo->HCITransHdl.hifDevice), status = ar6000_get_hif_dev((struct hif_device *)(pHcidevInfo->HCITransHdl.hifDevice),
&osDevInfo); &osDevInfo);
#else #else
status = HIFConfigureDevice(pHcidevInfo->ar->arHifDevice, status = HIFConfigureDevice(pHcidevInfo->ar->arHifDevice,
......
...@@ -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)
int ar6000_ReadRegDiag(HIF_DEVICE *hifDevice, u32 *address, u32 *data); int ar6000_ReadRegDiag(struct hif_device *hifDevice, u32 *address, u32 *data);
int ar6000_WriteRegDiag(HIF_DEVICE *hifDevice, u32 *address, u32 *data); int ar6000_WriteRegDiag(struct hif_device *hifDevice, u32 *address, u32 *data);
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
......
...@@ -63,9 +63,9 @@ extern int (*_HCI_TransportEnablePowerMgmt)(HCI_TRANSPORT_HANDLE HciTrans, bo ...@@ -63,9 +63,9 @@ extern int (*_HCI_TransportEnablePowerMgmt)(HCI_TRANSPORT_HANDLE HciTrans, bo
extern int ar6000_register_hci_transport(struct hci_transport_callbacks *hciTransCallbacks); extern int ar6000_register_hci_transport(struct hci_transport_callbacks *hciTransCallbacks);
extern int ar6000_get_hif_dev(HIF_DEVICE *device, void *config); extern int ar6000_get_hif_dev(struct hif_device *device, void *config);
extern int ar6000_set_uart_config(HIF_DEVICE *hifDevice, u32 scale, u32 step); extern int ar6000_set_uart_config(struct hif_device *hifDevice, u32 scale, u32 step);
/* get core clock register settings /* get core clock register settings
* data: 0 - 40/44MHz * data: 0 - 40/44MHz
...@@ -73,4 +73,4 @@ extern int ar6000_set_uart_config(HIF_DEVICE *hifDevice, u32 scale, u32 step); ...@@ -73,4 +73,4 @@ extern int ar6000_set_uart_config(HIF_DEVICE *hifDevice, u32 scale, u32 step);
* 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 int ar6000_get_core_clock_config(HIF_DEVICE *hifDevice, u32 *data); extern int ar6000_get_core_clock_config(struct hif_device *hifDevice, u32 *data);
...@@ -1865,7 +1865,7 @@ ar6000_ioctl_setkey(struct ar6_softc *ar, struct ieee80211req_key *ik) ...@@ -1865,7 +1865,7 @@ ar6000_ioctl_setkey(struct ar6_softc *ar, struct ieee80211req_key *ik)
int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
{ {
struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev);
HIF_DEVICE *hifDevice = ar->arHifDevice; struct hif_device *hifDevice = ar->arHifDevice;
int ret = 0, param; int ret = 0, param;
unsigned int address = 0; unsigned int address = 0;
unsigned int length = 0; unsigned int length = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册