Commit 9dabb722 authored by Luis R. Rodriguez's avatar Luis R. Rodriguez Committed by Greg Kroah-Hartman

ath6kl: remove-typedef HIF_DEVICE

remove-typedef -s HIF_DEVICE \
	"struct hif_device" drivers/staging/ath6kl/
Tested-by: default avatarNaveen Singh <nsingh@atheros.com>
Signed-off-by: default avatarLuis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent a71f0bf6
......@@ -42,12 +42,12 @@
static bool bmiDone;
int
bmiBufferSend(HIF_DEVICE *device,
bmiBufferSend(struct hif_device *device,
u8 *buffer,
u32 length);
int
bmiBufferReceive(HIF_DEVICE *device,
bmiBufferReceive(struct hif_device *device,
u8 *buffer,
u32 length,
bool want_timeout);
......
......@@ -106,7 +106,7 @@ BMICleanup(void)
}
int
BMIDone(HIF_DEVICE *device)
BMIDone(struct hif_device *device)
{
int status;
u32 cid;
......@@ -142,7 +142,7 @@ BMIDone(HIF_DEVICE *device)
}
int
BMIGetTargetInfo(HIF_DEVICE *device, struct bmi_target_info *targ_info)
BMIGetTargetInfo(struct hif_device *device, struct bmi_target_info *targ_info)
{
int status;
u32 cid;
......@@ -201,7 +201,7 @@ BMIGetTargetInfo(HIF_DEVICE *device, struct bmi_target_info *targ_info)
}
int
BMIReadMemory(HIF_DEVICE *device,
BMIReadMemory(struct hif_device *device,
u32 address,
u8 *buffer,
u32 length)
......@@ -257,7 +257,7 @@ BMIReadMemory(HIF_DEVICE *device,
}
int
BMIWriteMemory(HIF_DEVICE *device,
BMIWriteMemory(struct hif_device *device,
u32 address,
u8 *buffer,
u32 length)
......@@ -322,7 +322,7 @@ BMIWriteMemory(HIF_DEVICE *device,
}
int
BMIExecute(HIF_DEVICE *device,
BMIExecute(struct hif_device *device,
u32 address,
u32 *param)
{
......@@ -370,7 +370,7 @@ BMIExecute(HIF_DEVICE *device,
}
int
BMISetAppStart(HIF_DEVICE *device,
BMISetAppStart(struct hif_device *device,
u32 address)
{
u32 cid;
......@@ -407,7 +407,7 @@ BMISetAppStart(HIF_DEVICE *device,
}
int
BMIReadSOCRegister(HIF_DEVICE *device,
BMIReadSOCRegister(struct hif_device *device,
u32 address,
u32 *param)
{
......@@ -453,7 +453,7 @@ BMIReadSOCRegister(HIF_DEVICE *device,
}
int
BMIWriteSOCRegister(HIF_DEVICE *device,
BMIWriteSOCRegister(struct hif_device *device,
u32 address,
u32 param)
{
......@@ -493,7 +493,7 @@ BMIWriteSOCRegister(HIF_DEVICE *device,
}
int
BMIrompatchInstall(HIF_DEVICE *device,
BMIrompatchInstall(struct hif_device *device,
u32 ROM_addr,
u32 RAM_addr,
u32 nbytes,
......@@ -549,7 +549,7 @@ BMIrompatchInstall(HIF_DEVICE *device,
}
int
BMIrompatchUninstall(HIF_DEVICE *device,
BMIrompatchUninstall(struct hif_device *device,
u32 rompatch_id)
{
u32 cid;
......@@ -586,7 +586,7 @@ BMIrompatchUninstall(HIF_DEVICE *device,
}
static int
_BMIrompatchChangeActivation(HIF_DEVICE *device,
_BMIrompatchChangeActivation(struct hif_device *device,
u32 rompatch_count,
u32 *rompatch_list,
u32 do_activate)
......@@ -630,7 +630,7 @@ _BMIrompatchChangeActivation(HIF_DEVICE *device,
}
int
BMIrompatchActivate(HIF_DEVICE *device,
BMIrompatchActivate(struct hif_device *device,
u32 rompatch_count,
u32 *rompatch_list)
{
......@@ -638,7 +638,7 @@ BMIrompatchActivate(HIF_DEVICE *device,
}
int
BMIrompatchDeactivate(HIF_DEVICE *device,
BMIrompatchDeactivate(struct hif_device *device,
u32 rompatch_count,
u32 *rompatch_list)
{
......@@ -646,7 +646,7 @@ BMIrompatchDeactivate(HIF_DEVICE *device,
}
int
BMILZData(HIF_DEVICE *device,
BMILZData(struct hif_device *device,
u8 *buffer,
u32 length)
{
......@@ -696,7 +696,7 @@ BMILZData(HIF_DEVICE *device,
}
int
BMILZStreamStart(HIF_DEVICE *device,
BMILZStreamStart(struct hif_device *device,
u32 address)
{
u32 cid;
......@@ -734,7 +734,7 @@ BMILZStreamStart(HIF_DEVICE *device,
/* BMI Access routines */
int
bmiBufferSend(HIF_DEVICE *device,
bmiBufferSend(struct hif_device *device,
u8 *buffer,
u32 length)
{
......@@ -782,7 +782,7 @@ bmiBufferSend(HIF_DEVICE *device,
}
int
bmiBufferReceive(HIF_DEVICE *device,
bmiBufferReceive(struct hif_device *device,
u8 *buffer,
u32 length,
bool want_timeout)
......@@ -958,7 +958,7 @@ bmiBufferReceive(HIF_DEVICE *device,
}
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;
u32 lastWord = 0;
......@@ -998,13 +998,13 @@ BMIFastDownload(HIF_DEVICE *device, u32 address, u8 *buffer, u32 length)
}
int
BMIRawWrite(HIF_DEVICE *device, u8 *buffer, u32 length)
BMIRawWrite(struct hif_device *device, u8 *buffer, u32 length)
{
return bmiBufferSend(device, buffer, length);
}
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);
}
......@@ -88,9 +88,9 @@ struct hif_device {
#define CMD53_FIXED_ADDRESS 1
#define CMD53_INCR_ADDRESS 2
BUS_REQUEST *hifAllocateBusRequest(HIF_DEVICE *device);
void hifFreeBusRequest(HIF_DEVICE *device, BUS_REQUEST *busrequest);
void AddToAsyncList(HIF_DEVICE *device, BUS_REQUEST *busrequest);
BUS_REQUEST *hifAllocateBusRequest(struct hif_device *device);
void hifFreeBusRequest(struct hif_device *device, BUS_REQUEST *busrequest);
void AddToAsyncList(struct hif_device *device, BUS_REQUEST *busrequest);
#ifdef HIF_LINUX_MMC_SCATTER_SUPPORT
......@@ -100,7 +100,7 @@ void AddToAsyncList(HIF_DEVICE *device, BUS_REQUEST *busrequest);
struct hif_scatter_req_priv {
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 */
/* scatter list for linux */
struct scatterlist sgentries[MAX_SCATTER_ENTRIES_PER_REQ];
......@@ -108,18 +108,18 @@ struct hif_scatter_req_priv {
#define ATH_DEBUG_SCATTER ATH_DEBUG_MAKE_MODULE_MASK(0)
int SetupHIFScatterSupport(HIF_DEVICE *device, struct hif_device_scatter_support_info *pInfo);
void CleanupHIFScatterResources(HIF_DEVICE *device);
int DoHifReadWriteScatter(HIF_DEVICE *device, BUS_REQUEST *busrequest);
int SetupHIFScatterSupport(struct hif_device *device, struct hif_device_scatter_support_info *pInfo);
void CleanupHIFScatterResources(struct hif_device *device);
int DoHifReadWriteScatter(struct hif_device *device, BUS_REQUEST *busrequest);
#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;
}
static inline int DoHifReadWriteScatter(HIF_DEVICE *device, BUS_REQUEST *busrequest)
static inline int DoHifReadWriteScatter(struct hif_device *device, BUS_REQUEST *busrequest)
{
return A_ENOTSUP;
}
......
......@@ -48,7 +48,7 @@
(((address) & 0x1FFFF) << 9) | \
((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;
......@@ -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;
unsigned long flag;
......@@ -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 */
int DoHifReadWriteScatter(HIF_DEVICE *device, BUS_REQUEST *busrequest)
int DoHifReadWriteScatter(struct hif_device *device, BUS_REQUEST *busrequest)
{
int i;
u8 rw;
......@@ -199,7 +199,7 @@ int DoHifReadWriteScatter(HIF_DEVICE *device, BUS_REQUEST *busrequest)
}
/* 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;
u32 request = pReq->Request;
......@@ -275,7 +275,7 @@ static int HifReadWriteScatter(HIF_DEVICE *device, struct hif_scatter_req *pReq)
}
/* 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 i;
......@@ -356,7 +356,7 @@ int SetupHIFScatterSupport(HIF_DEVICE *device, struct hif_device_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 *pReq;
......
......@@ -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]))
static struct hif_scatter_req *DevAllocScatterReq(HIF_DEVICE *Context)
static struct hif_scatter_req *DevAllocScatterReq(struct hif_device *Context)
{
struct dl_list *pItem;
struct ar6k_device *pDev = (struct ar6k_device *)Context;
......@@ -600,7 +600,7 @@ static struct hif_scatter_req *DevAllocScatterReq(HIF_DEVICE *Context)
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;
LOCK_AR6K(pDev);
......@@ -664,7 +664,7 @@ static void DevReadWriteScatterAsyncHandler(void *Context, struct htc_packet *pP
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;
int status = 0;
......@@ -739,7 +739,7 @@ static void DevCleanupVirtualScatterSupport(struct ar6k_device *pDev)
struct hif_scatter_req *pReq;
while (1) {
pReq = DevAllocScatterReq((HIF_DEVICE *)pDev);
pReq = DevAllocScatterReq((struct hif_device *)pDev);
if (NULL == pReq) {
break;
}
......@@ -787,7 +787,7 @@ static int DevSetupVirtualScatterSupport(struct ar6k_device *pDev)
pReq->ScatterMethod = HIF_SCATTER_DMA_BOUNCE;
pReq->pScatterBounceBuffer = pVirtualInfo->pVirtDmaBuffer;
/* free request to the list */
DevFreeScatterReq((HIF_DEVICE *)pDev,pReq);
DevFreeScatterReq((struct hif_device *)pDev,pReq);
}
if (status) {
......
......@@ -1233,7 +1233,7 @@ int HCI_TransportRecvHCIEventSync(HCI_TRANSPORT_HANDLE HciTrans,
int HCI_TransportSetBaudRate(HCI_TRANSPORT_HANDLE HciTrans, u32 Baud)
{
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;
int status = 0;
......
......@@ -42,7 +42,7 @@ struct ar3k_config_info {
u32 Flags; /* config flags */
void *pHCIDev; /* HCI bridge device */
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 */
u16 AR6KScale; /* AR6K UART scale value */
......
......@@ -26,23 +26,23 @@
int
ar6000_ReadRegDiag(HIF_DEVICE *hifDevice, u32 *address, u32 *data);
ar6000_ReadRegDiag(struct hif_device *hifDevice, u32 *address, u32 *data);
int
ar6000_WriteRegDiag(HIF_DEVICE *hifDevice, u32 *address, u32 *data);
ar6000_WriteRegDiag(struct hif_device *hifDevice, u32 *address, u32 *data);
int
ar6000_ReadDataDiag(HIF_DEVICE *hifDevice, u32 address,
ar6000_ReadDataDiag(struct hif_device *hifDevice, u32 address,
u8 *data, u32 length);
int
ar6000_WriteDataDiag(HIF_DEVICE *hifDevice, u32 address,
ar6000_WriteDataDiag(struct hif_device *hifDevice, u32 address,
u8 *data, u32 length);
int
ar6k_ReadTargetRegister(HIF_DEVICE *hifDevice, int regsel, u32 *regval);
ar6k_ReadTargetRegister(struct hif_device *hifDevice, int regsel, u32 *regval);
void
ar6k_FetchTargetRegs(HIF_DEVICE *hifDevice, u32 *targregs);
ar6k_FetchTargetRegs(struct hif_device *hifDevice, u32 *targregs);
#endif /*AR6000_DIAG_H_*/
......@@ -44,44 +44,44 @@ void
BMICleanup(void);
int
BMIDone(HIF_DEVICE *device);
BMIDone(struct hif_device *device);
int
BMIGetTargetInfo(HIF_DEVICE *device, struct bmi_target_info *targ_info);
BMIGetTargetInfo(struct hif_device *device, struct bmi_target_info *targ_info);
int
BMIReadMemory(HIF_DEVICE *device,
BMIReadMemory(struct hif_device *device,
u32 address,
u8 *buffer,
u32 length);
int
BMIWriteMemory(HIF_DEVICE *device,
BMIWriteMemory(struct hif_device *device,
u32 address,
u8 *buffer,
u32 length);
int
BMIExecute(HIF_DEVICE *device,
BMIExecute(struct hif_device *device,
u32 address,
u32 *param);
int
BMISetAppStart(HIF_DEVICE *device,
BMISetAppStart(struct hif_device *device,
u32 address);
int
BMIReadSOCRegister(HIF_DEVICE *device,
BMIReadSOCRegister(struct hif_device *device,
u32 address,
u32 *param);
int
BMIWriteSOCRegister(HIF_DEVICE *device,
BMIWriteSOCRegister(struct hif_device *device,
u32 address,
u32 param);
int
BMIrompatchInstall(HIF_DEVICE *device,
BMIrompatchInstall(struct hif_device *device,
u32 ROM_addr,
u32 RAM_addr,
u32 nbytes,
......@@ -89,41 +89,41 @@ BMIrompatchInstall(HIF_DEVICE *device,
u32 *patch_id);
int
BMIrompatchUninstall(HIF_DEVICE *device,
BMIrompatchUninstall(struct hif_device *device,
u32 rompatch_id);
int
BMIrompatchActivate(HIF_DEVICE *device,
BMIrompatchActivate(struct hif_device *device,
u32 rompatch_count,
u32 *rompatch_list);
int
BMIrompatchDeactivate(HIF_DEVICE *device,
BMIrompatchDeactivate(struct hif_device *device,
u32 rompatch_count,
u32 *rompatch_list);
int
BMILZStreamStart(HIF_DEVICE *device,
BMILZStreamStart(struct hif_device *device,
u32 address);
int
BMILZData(HIF_DEVICE *device,
BMILZData(struct hif_device *device,
u8 *buffer,
u32 length);
int
BMIFastDownload(HIF_DEVICE *device,
BMIFastDownload(struct hif_device *device,
u32 address,
u8 *buffer,
u32 length);
int
BMIRawWrite(HIF_DEVICE *device,
BMIRawWrite(struct hif_device *device,
u8 *buffer,
u32 length);
int
BMIRawRead(HIF_DEVICE *device,
BMIRawRead(struct hif_device *device,
u8 *buffer,
u32 length,
bool want_timeout);
......
......@@ -66,30 +66,30 @@ extern "C" {
/* OS-independent APIs */
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 MboxIsrYieldValue,
u8 HtcControlBuffers);
int ar6000_prepare_target(HIF_DEVICE *hifDevice,
int ar6000_prepare_target(struct hif_device *hifDevice,
u32 TargetType,
u32 TargetVersion);
int ar6000_set_hci_bridge_flags(HIF_DEVICE *hifDevice,
int ar6000_set_hci_bridge_flags(struct hif_device *hifDevice,
u32 TargetType,
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);
......
......@@ -38,7 +38,7 @@ extern "C" {
typedef struct htc_callbacks HTC_CALLBACKS;
typedef struct hif_device HIF_DEVICE;
struct hif_device;
/*
* direction - Direction of transfer (HIF_READ/HIF_WRITE).
......@@ -301,9 +301,9 @@ struct hif_scatter_req {
struct hif_scatter_item ScatterList[1]; /* start of scatter list */
};
typedef struct hif_scatter_req * ( *HIF_ALLOCATE_SCATTER_REQUEST)(HIF_DEVICE *device);
typedef void ( *HIF_FREE_SCATTER_REQUEST)(HIF_DEVICE *device, struct hif_scatter_req *request);
typedef int ( *HIF_READWRITE_SCATTER)(HIF_DEVICE *device, struct hif_scatter_req *request);
typedef struct hif_scatter_req * ( *HIF_ALLOCATE_SCATTER_REQUEST)(struct hif_device *device);
typedef void ( *HIF_FREE_SCATTER_REQUEST)(struct 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 {
/* information returned from HIF layer */
......@@ -354,14 +354,14 @@ struct hif_pending_events_info {
/* function to get pending events , some HIF modules use special mechanisms
* 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,
void *AsyncContext);
#define HIF_MASK_RECV true
#define HIF_UNMASK_RECV false
/* 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,
void *AsyncContext);
......@@ -376,14 +376,14 @@ int HIFInit(OSDRV_CALLBACKS *callbacks);
/* 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
* 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 */
void HIFReleaseDevice(HIF_DEVICE *device);
void HIFReleaseDevice(struct hif_device *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 */
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
......@@ -398,7 +398,7 @@ void HIFDetachHTC(HIF_DEVICE *device);
* request - Characterizes the attributes of the command.
*/
int
HIFReadWrite(HIF_DEVICE *device,
HIFReadWrite(struct hif_device *device,
u32 address,
u8 *buffer,
u32 length,
......@@ -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
* 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
......@@ -418,11 +418,11 @@ void HIFShutDownDevice(HIF_DEVICE *device);
* This should prevent the bus driver from raising an interrupt unless the
* 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
/*
......@@ -441,14 +441,14 @@ int HIFRWCompleteEventNotify(void);
#endif
int
HIFConfigureDevice(HIF_DEVICE *device, HIF_DEVICE_CONFIG_OPCODE opcode,
HIFConfigureDevice(struct hif_device *device, HIF_DEVICE_CONFIG_OPCODE opcode,
void *config, u32 configLen);
/*
* This API wait for the remaining MBOX messages to be drained
* This should be moved to HTC AR6K layer
*/
int hifWaitForPendingRecv(HIF_DEVICE *device);
int hifWaitForPendingRecv(struct hif_device *device);
#ifdef __cplusplus
}
......
......@@ -83,7 +83,7 @@ static u8 custDataAR6003[AR6003_CUST_DATA_SIZE];
#ifdef USE_4BYTE_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;
u8 addrValue[4];
......@@ -144,7 +144,7 @@ int ar6000_SetAddressWindowRegister(HIF_DEVICE *hifDevice, u32 RegisterAddr, u32
#else
/* 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;
......@@ -187,7 +187,7 @@ int ar6000_SetAddressWindowRegister(HIF_DEVICE *hifDevice, u32 RegisterAddr, u32
* No cooperation from the Target is required for this.
*/
int
ar6000_ReadRegDiag(HIF_DEVICE *hifDevice, u32 *address, u32 *data)
ar6000_ReadRegDiag(struct hif_device *hifDevice, u32 *address, u32 *data)
{
int status;
......@@ -221,7 +221,7 @@ ar6000_ReadRegDiag(HIF_DEVICE *hifDevice, u32 *address, u32 *data)
* No cooperation from the Target is required for this.
*/
int
ar6000_WriteRegDiag(HIF_DEVICE *hifDevice, u32 *address, u32 *data)
ar6000_WriteRegDiag(struct hif_device *hifDevice, u32 *address, u32 *data)
{
int status;
......@@ -244,7 +244,7 @@ ar6000_WriteRegDiag(HIF_DEVICE *hifDevice, u32 *address, u32 *data)
}
int
ar6000_ReadDataDiag(HIF_DEVICE *hifDevice, u32 address,
ar6000_ReadDataDiag(struct hif_device *hifDevice, u32 address,
u8 *data, u32 length)
{
u32 count;
......@@ -262,7 +262,7 @@ ar6000_ReadDataDiag(HIF_DEVICE *hifDevice, u32 address,
}
int
ar6000_WriteDataDiag(HIF_DEVICE *hifDevice, u32 address,
ar6000_WriteDataDiag(struct hif_device *hifDevice, u32 address,
u8 *data, u32 length)
{
u32 count;
......@@ -280,7 +280,7 @@ ar6000_WriteDataDiag(HIF_DEVICE *hifDevice, u32 address,
}
int
ar6k_ReadTargetRegister(HIF_DEVICE *hifDevice, int regsel, u32 *regval)
ar6k_ReadTargetRegister(struct hif_device *hifDevice, int regsel, u32 *regval)
{
int status;
u8 vals[4];
......@@ -316,7 +316,7 @@ ar6k_ReadTargetRegister(HIF_DEVICE *hifDevice, int regsel, u32 *regval)
}
void
ar6k_FetchTargetRegs(HIF_DEVICE *hifDevice, u32 *targregs)
ar6k_FetchTargetRegs(struct hif_device *hifDevice, u32 *targregs)
{
int i;
u32 val;
......@@ -330,7 +330,7 @@ ar6k_FetchTargetRegs(HIF_DEVICE *hifDevice, u32 *targregs)
#if 0
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;
......@@ -358,7 +358,7 @@ _do_write_diag(HIF_DEVICE *hifDevice, u32 addr, u32 value)
*/
#if 0
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 i;
......@@ -399,7 +399,7 @@ _delay_until_target_alive(HIF_DEVICE *hifDevice, s32 wait_msecs, u32 TargetType)
#define AR6002_RESET_CONTROL_ADDRESS 0x00004000
#define AR6003_RESET_CONTROL_ADDRESS 0x00004000
/* 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;
u32 address;
......@@ -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 */
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;
u8 AR6003CustDataShadow[AR6003_CUST_DATA_SIZE+4];
......@@ -552,7 +552,7 @@ u8 *ar6000_get_cust_data_buffer(u32 TargetType)
#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 regDumpArea = 0;
......@@ -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
* BMI phase */
int ar6000_set_htc_params(HIF_DEVICE *hifDevice,
int ar6000_set_htc_params(struct hif_device *hifDevice,
u32 TargetType,
u32 MboxIsrYieldValue,
u8 HtcControlBuffers)
......@@ -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;
......@@ -693,7 +693,7 @@ static int prepare_ar6002(HIF_DEVICE *hifDevice, u32 TargetVersion)
return status;
}
static int prepare_ar6003(HIF_DEVICE *hifDevice, u32 TargetVersion)
static int prepare_ar6003(struct hif_device *hifDevice, u32 TargetVersion)
{
int status = 0;
......@@ -703,7 +703,7 @@ static int prepare_ar6003(HIF_DEVICE *hifDevice, u32 TargetVersion)
}
/* 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 TargetVersion)
{
......@@ -725,7 +725,7 @@ int ar6000_prepare_target(HIF_DEVICE *hifDevice,
* TBDXXX: Remove this function when REV 1.x is desupported.
*/
int
ar6002_REV1_reset_force_host (HIF_DEVICE *hifDevice)
ar6002_REV1_reset_force_host (struct hif_device *hifDevice)
{
s32 i;
struct forceROM_s {
......@@ -998,7 +998,7 @@ void a_module_debug_support_cleanup(void)
}
/* 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 Flags)
{
......
......@@ -55,7 +55,7 @@ char *p_mac = NULL;
static u8 eeprom_data[EEPROM_SZ];
static u32 sys_sleep_reg;
static HIF_DEVICE *p_bmi_device;
static struct hif_device *p_bmi_device;
//
// Functions
......@@ -158,7 +158,7 @@ BMI_write_mem(u32 address, u8 *p_data, u32 sz)
* so we can access the EEPROM.
*/
static void
enable_SI(HIF_DEVICE *p_device)
enable_SI(struct hif_device *p_device)
{
u32 regval;
......@@ -361,7 +361,7 @@ commit_4bytes(int offset, u32 data)
}
/* ATHENV */
#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 board_data_addr;
......
......@@ -70,7 +70,7 @@ int ar6000_register_hci_transport(struct hci_transport_callbacks *hciTransCallba
}
int
ar6000_get_hif_dev(HIF_DEVICE *device, void *config)
ar6000_get_hif_dev(struct hif_device *device, void *config)
{
int status;
......@@ -81,7 +81,7 @@ ar6000_get_hif_dev(HIF_DEVICE *device, void *config)
return status;
}
int ar6000_set_uart_config(HIF_DEVICE *hifDevice,
int ar6000_set_uart_config(struct hif_device *hifDevice,
u32 scale,
u32 step)
{
......@@ -97,7 +97,7 @@ int ar6000_set_uart_config(HIF_DEVICE *hifDevice,
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;
int status;
......
......@@ -270,7 +270,7 @@ static int ar6000_hci_transport_ready(HCI_TRANSPORT_HANDLE HCIHandle,
ar3kconfig.pHCIDev = pHcidevInfo->pHCIDev;
ar3kconfig.pHCIProps = &pHcidevInfo->HCIProps;
#ifdef EXPORT_HCI_BRIDGE_INTERFACE
ar3kconfig.pHIFDevice = (HIF_DEVICE *)(pHcidevInfo->HCITransHdl.hifDevice);
ar3kconfig.pHIFDevice = (struct hif_device *)(pHcidevInfo->HCITransHdl.hifDevice);
#else
ar3kconfig.pHIFDevice = pHcidevInfo->ar->arHifDevice;
#endif
......@@ -868,7 +868,7 @@ static int bt_setup_hci(struct ar6k_hci_bridge_info *pHcidevInfo)
A_MEMZERO(&osDevInfo,sizeof(osDevInfo));
/* get the underlying OS device */
#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);
#else
status = HIFConfigureDevice(pHcidevInfo->ar->arHifDevice,
......
......@@ -121,8 +121,8 @@ struct USER_SAVEDKEYS {
#define DBG_DEFAULTS (DBG_ERROR|DBG_WARNING)
int ar6000_ReadRegDiag(HIF_DEVICE *hifDevice, u32 *address, u32 *data);
int ar6000_WriteRegDiag(HIF_DEVICE *hifDevice, u32 *address, u32 *data);
int ar6000_ReadRegDiag(struct hif_device *hifDevice, u32 *address, u32 *data);
int ar6000_WriteRegDiag(struct hif_device *hifDevice, u32 *address, u32 *data);
#ifdef __cplusplus
extern "C" {
......
......@@ -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_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
* data: 0 - 40/44MHz
......@@ -73,4 +73,4 @@ extern int ar6000_set_uart_config(HIF_DEVICE *hifDevice, u32 scale, u32 step);
* where (5G band/2.4G band)
* 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)
int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
{
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;
unsigned int address = 0;
unsigned int length = 0;
......
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