Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -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);
+20 −20
Original line number Original line Diff line number Diff line
@@ -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)
}
}


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)
}
}


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,
}
}


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,
}
}


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,
}
}


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,
}
}


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,
}
}


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,
}
}


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,
}
}


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,
}
}


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,
}
}


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,
}
}


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,
}
}


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,
}
}


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,


/* 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,
}
}


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,
}
}


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)
}
}


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);
}
}
+9 −9
Original line number Original line Diff line number Diff line
@@ -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);


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 {


#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;
}
}
+42 −42
Original line number Original line Diff line number Diff line
@@ -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;
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)
}
}


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,
    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)


/* 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,
/* 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)
    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
    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)
}
}


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)
}
}


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,
}
}


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
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)
/* 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)
#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)
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




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)
}
}


void
void
HIFUnMaskInterrupt(HIF_DEVICE *device)
HIFUnMaskInterrupt(struct hif_device *device)
{
{
    int ret;
    int ret;


@@ -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)
    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)
}
}


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)
    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)
    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)
{
{
    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)
{
{
    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)
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)
/*
/*
 * 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)
}
}
    
    


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)
    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)
{
{
}
}


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)
    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));
}
}
+6 −6
Original line number Original line Diff line number Diff line
@@ -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)
        
        
}
}


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)
}
}


    /* 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)
}
}


    /* 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)
}
}


    /* 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
}
}


    /* 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;
Loading