From 9c052f8895bdeca1e0fd0a28cf84fbdc04d7f6cd Mon Sep 17 00:00:00 2001 From: Javier Martinez Canillas Date: Sat, 26 Feb 2011 19:45:03 +0100 Subject: [PATCH 01/58] staging: ath6kl: Cast variable to size_t to avoid compile warning The min() macro does strict type-checking so use min_t() instead to silence a compile warning. Cc: Naveen Singh Signed-off-by: Javier Martinez Canillas Signed-off-by: Luis R. Rodriguez --- .../staging/ath6kl/miscdrv/ar3kps/ar3kpsconfig.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsconfig.c b/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsconfig.c index 67e6d5e..55b0633 100644 --- a/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsconfig.c +++ b/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsconfig.c @@ -360,7 +360,7 @@ int PSSendOps(void *arg) status = 1; goto complete; } - len = min(firmware->size, MAX_BDADDR_FORMAT_LENGTH - 1); + len = min_t(size_t, firmware->size, MAX_BDADDR_FORMAT_LENGTH - 1); memcpy(config_bdaddr, firmware->data, len); config_bdaddr[len] = '\0'; write_bdaddr(hdev,config_bdaddr,BDADDR_TYPE_STRING); -- 1.7.4.15.g7811d From 0dd90c9ba56fe801fd7a56c3d8a6edda0a09d2bc Mon Sep 17 00:00:00 2001 From: Luis R. Rodriguez Date: Mon, 28 Feb 2011 07:50:44 -0800 Subject: [PATCH 02/58] ath6kl: s|A_MEMCPY|memcpy|g for i in $(find ./drivers/staging/ath6kl/ -name \*.[ch]) ; do \ sed -r -i -e "s/A_MEMCPY/memcpy/g" $i; done Cc: Naveen Singh Signed-off-by: Luis R. Rodriguez --- drivers/staging/ath6kl/bmi/src/bmi.c | 74 +++++----- drivers/staging/ath6kl/htc2/AR6000/ar6k.c | 12 +- drivers/staging/ath6kl/htc2/AR6000/ar6k_events.c | 2 +- drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox.c | 8 +- .../ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c | 2 +- drivers/staging/ath6kl/htc2/htc.c | 4 +- drivers/staging/ath6kl/htc2/htc_recv.c | 6 +- drivers/staging/ath6kl/htc2/htc_services.c | 6 +- drivers/staging/ath6kl/miscdrv/ar3kconfig.c | 2 +- drivers/staging/ath6kl/os/linux/ar6000_drv.c | 56 ++++---- drivers/staging/ath6kl/os/linux/ar6k_pal.c | 2 +- drivers/staging/ath6kl/os/linux/cfg80211.c | 36 +++--- drivers/staging/ath6kl/os/linux/hci_bridge.c | 4 +- .../staging/ath6kl/os/linux/include/osapi_linux.h | 2 - drivers/staging/ath6kl/os/linux/ioctl.c | 30 ++-- drivers/staging/ath6kl/os/linux/netbuf.c | 8 +- drivers/staging/ath6kl/os/linux/wireless_ext.c | 26 ++-- drivers/staging/ath6kl/reorder/rcv_aggr.c | 2 +- drivers/staging/ath6kl/wlan/include/ieee80211.h | 2 +- drivers/staging/ath6kl/wlan/src/wlan_node.c | 2 +- drivers/staging/ath6kl/wmi/wmi.c | 146 ++++++++++---------- 21 files changed, 215 insertions(+), 217 deletions(-) diff --git a/drivers/staging/ath6kl/bmi/src/bmi.c b/drivers/staging/ath6kl/bmi/src/bmi.c index 49aed8a..1e1e6ee 100644 --- a/drivers/staging/ath6kl/bmi/src/bmi.c +++ b/drivers/staging/ath6kl/bmi/src/bmi.c @@ -231,11 +231,11 @@ BMIReadMemory(HIF_DEVICE *device, { rxlen = (remaining < BMI_DATASZ_MAX) ? remaining : BMI_DATASZ_MAX; offset = 0; - A_MEMCPY(&(pBMICmdBuf[offset]), &cid, sizeof(cid)); + memcpy(&(pBMICmdBuf[offset]), &cid, sizeof(cid)); offset += sizeof(cid); - A_MEMCPY(&(pBMICmdBuf[offset]), &address, sizeof(address)); + memcpy(&(pBMICmdBuf[offset]), &address, sizeof(address)); offset += sizeof(address); - A_MEMCPY(&(pBMICmdBuf[offset]), &rxlen, sizeof(rxlen)); + memcpy(&(pBMICmdBuf[offset]), &rxlen, sizeof(rxlen)); offset += sizeof(length); status = bmiBufferSend(device, pBMICmdBuf, offset); @@ -248,7 +248,7 @@ BMIReadMemory(HIF_DEVICE *device, AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("Unable to read from the device\n")); return A_ERROR; } - A_MEMCPY(&buffer[length - remaining], pBMICmdBuf, rxlen); + memcpy(&buffer[length - remaining], pBMICmdBuf, rxlen); remaining -= rxlen; address += rxlen; } @@ -300,13 +300,13 @@ BMIWriteMemory(HIF_DEVICE *device, txlen = (BMI_DATASZ_MAX - header); } offset = 0; - A_MEMCPY(&(pBMICmdBuf[offset]), &cid, sizeof(cid)); + memcpy(&(pBMICmdBuf[offset]), &cid, sizeof(cid)); offset += sizeof(cid); - A_MEMCPY(&(pBMICmdBuf[offset]), &address, sizeof(address)); + memcpy(&(pBMICmdBuf[offset]), &address, sizeof(address)); offset += sizeof(address); - A_MEMCPY(&(pBMICmdBuf[offset]), &txlen, sizeof(txlen)); + memcpy(&(pBMICmdBuf[offset]), &txlen, sizeof(txlen)); offset += sizeof(txlen); - A_MEMCPY(&(pBMICmdBuf[offset]), src, txlen); + memcpy(&(pBMICmdBuf[offset]), src, txlen); offset += txlen; status = bmiBufferSend(device, pBMICmdBuf, offset); if (status) { @@ -345,11 +345,11 @@ BMIExecute(HIF_DEVICE *device, cid = BMI_EXECUTE; offset = 0; - A_MEMCPY(&(pBMICmdBuf[offset]), &cid, sizeof(cid)); + memcpy(&(pBMICmdBuf[offset]), &cid, sizeof(cid)); offset += sizeof(cid); - A_MEMCPY(&(pBMICmdBuf[offset]), &address, sizeof(address)); + memcpy(&(pBMICmdBuf[offset]), &address, sizeof(address)); offset += sizeof(address); - A_MEMCPY(&(pBMICmdBuf[offset]), param, sizeof(*param)); + memcpy(&(pBMICmdBuf[offset]), param, sizeof(*param)); offset += sizeof(*param); status = bmiBufferSend(device, pBMICmdBuf, offset); if (status) { @@ -363,7 +363,7 @@ BMIExecute(HIF_DEVICE *device, return A_ERROR; } - A_MEMCPY(param, pBMICmdBuf, sizeof(*param)); + memcpy(param, pBMICmdBuf, sizeof(*param)); AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI Execute: Exit (param: %d)\n", *param)); return 0; @@ -392,9 +392,9 @@ BMISetAppStart(HIF_DEVICE *device, cid = BMI_SET_APP_START; offset = 0; - A_MEMCPY(&(pBMICmdBuf[offset]), &cid, sizeof(cid)); + memcpy(&(pBMICmdBuf[offset]), &cid, sizeof(cid)); offset += sizeof(cid); - A_MEMCPY(&(pBMICmdBuf[offset]), &address, sizeof(address)); + memcpy(&(pBMICmdBuf[offset]), &address, sizeof(address)); offset += sizeof(address); status = bmiBufferSend(device, pBMICmdBuf, offset); if (status) { @@ -430,9 +430,9 @@ BMIReadSOCRegister(HIF_DEVICE *device, cid = BMI_READ_SOC_REGISTER; offset = 0; - A_MEMCPY(&(pBMICmdBuf[offset]), &cid, sizeof(cid)); + memcpy(&(pBMICmdBuf[offset]), &cid, sizeof(cid)); offset += sizeof(cid); - A_MEMCPY(&(pBMICmdBuf[offset]), &address, sizeof(address)); + memcpy(&(pBMICmdBuf[offset]), &address, sizeof(address)); offset += sizeof(address); status = bmiBufferSend(device, pBMICmdBuf, offset); @@ -446,7 +446,7 @@ BMIReadSOCRegister(HIF_DEVICE *device, AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("Unable to read from the device\n")); return A_ERROR; } - A_MEMCPY(param, pBMICmdBuf, sizeof(*param)); + memcpy(param, pBMICmdBuf, sizeof(*param)); AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI Read SOC Register: Exit (value: %d)\n", *param)); return 0; @@ -476,11 +476,11 @@ BMIWriteSOCRegister(HIF_DEVICE *device, cid = BMI_WRITE_SOC_REGISTER; offset = 0; - A_MEMCPY(&(pBMICmdBuf[offset]), &cid, sizeof(cid)); + memcpy(&(pBMICmdBuf[offset]), &cid, sizeof(cid)); offset += sizeof(cid); - A_MEMCPY(&(pBMICmdBuf[offset]), &address, sizeof(address)); + memcpy(&(pBMICmdBuf[offset]), &address, sizeof(address)); offset += sizeof(address); - A_MEMCPY(&(pBMICmdBuf[offset]), ¶m, sizeof(param)); + memcpy(&(pBMICmdBuf[offset]), ¶m, sizeof(param)); offset += sizeof(param); status = bmiBufferSend(device, pBMICmdBuf, offset); if (status) { @@ -521,15 +521,15 @@ BMIrompatchInstall(HIF_DEVICE *device, cid = BMI_ROMPATCH_INSTALL; offset = 0; - A_MEMCPY(&(pBMICmdBuf[offset]), &cid, sizeof(cid)); + memcpy(&(pBMICmdBuf[offset]), &cid, sizeof(cid)); offset += sizeof(cid); - A_MEMCPY(&(pBMICmdBuf[offset]), &ROM_addr, sizeof(ROM_addr)); + memcpy(&(pBMICmdBuf[offset]), &ROM_addr, sizeof(ROM_addr)); offset += sizeof(ROM_addr); - A_MEMCPY(&(pBMICmdBuf[offset]), &RAM_addr, sizeof(RAM_addr)); + memcpy(&(pBMICmdBuf[offset]), &RAM_addr, sizeof(RAM_addr)); offset += sizeof(RAM_addr); - A_MEMCPY(&(pBMICmdBuf[offset]), &nbytes, sizeof(nbytes)); + memcpy(&(pBMICmdBuf[offset]), &nbytes, sizeof(nbytes)); offset += sizeof(nbytes); - A_MEMCPY(&(pBMICmdBuf[offset]), &do_activate, sizeof(do_activate)); + memcpy(&(pBMICmdBuf[offset]), &do_activate, sizeof(do_activate)); offset += sizeof(do_activate); status = bmiBufferSend(device, pBMICmdBuf, offset); if (status) { @@ -542,7 +542,7 @@ BMIrompatchInstall(HIF_DEVICE *device, AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("Unable to read from the device\n")); return A_ERROR; } - A_MEMCPY(rompatch_id, pBMICmdBuf, sizeof(*rompatch_id)); + memcpy(rompatch_id, pBMICmdBuf, sizeof(*rompatch_id)); AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI rompatch Install: (rompatch_id=%d)\n", *rompatch_id)); return 0; @@ -571,9 +571,9 @@ BMIrompatchUninstall(HIF_DEVICE *device, cid = BMI_ROMPATCH_UNINSTALL; offset = 0; - A_MEMCPY(&(pBMICmdBuf[offset]), &cid, sizeof(cid)); + memcpy(&(pBMICmdBuf[offset]), &cid, sizeof(cid)); offset += sizeof(cid); - A_MEMCPY(&(pBMICmdBuf[offset]), &rompatch_id, sizeof(rompatch_id)); + memcpy(&(pBMICmdBuf[offset]), &rompatch_id, sizeof(rompatch_id)); offset += sizeof(rompatch_id); status = bmiBufferSend(device, pBMICmdBuf, offset); if (status) { @@ -611,12 +611,12 @@ _BMIrompatchChangeActivation(HIF_DEVICE *device, cid = do_activate ? BMI_ROMPATCH_ACTIVATE : BMI_ROMPATCH_DEACTIVATE; offset = 0; - A_MEMCPY(&(pBMICmdBuf[offset]), &cid, sizeof(cid)); + memcpy(&(pBMICmdBuf[offset]), &cid, sizeof(cid)); offset += sizeof(cid); - A_MEMCPY(&(pBMICmdBuf[offset]), &rompatch_count, sizeof(rompatch_count)); + memcpy(&(pBMICmdBuf[offset]), &rompatch_count, sizeof(rompatch_count)); offset += sizeof(rompatch_count); length = rompatch_count * sizeof(*rompatch_list); - A_MEMCPY(&(pBMICmdBuf[offset]), rompatch_list, length); + memcpy(&(pBMICmdBuf[offset]), rompatch_list, length); offset += length; status = bmiBufferSend(device, pBMICmdBuf, offset); if (status) { @@ -676,11 +676,11 @@ BMILZData(HIF_DEVICE *device, txlen = (remaining < (BMI_DATASZ_MAX - header)) ? remaining : (BMI_DATASZ_MAX - header); offset = 0; - A_MEMCPY(&(pBMICmdBuf[offset]), &cid, sizeof(cid)); + memcpy(&(pBMICmdBuf[offset]), &cid, sizeof(cid)); offset += sizeof(cid); - A_MEMCPY(&(pBMICmdBuf[offset]), &txlen, sizeof(txlen)); + memcpy(&(pBMICmdBuf[offset]), &txlen, sizeof(txlen)); offset += sizeof(txlen); - A_MEMCPY(&(pBMICmdBuf[offset]), &buffer[length - remaining], txlen); + memcpy(&(pBMICmdBuf[offset]), &buffer[length - remaining], txlen); offset += txlen; status = bmiBufferSend(device, pBMICmdBuf, offset); if (status) { @@ -717,9 +717,9 @@ BMILZStreamStart(HIF_DEVICE *device, cid = BMI_LZ_STREAM_START; offset = 0; - A_MEMCPY(&(pBMICmdBuf[offset]), &cid, sizeof(cid)); + memcpy(&(pBMICmdBuf[offset]), &cid, sizeof(cid)); offset += sizeof(cid); - A_MEMCPY(&(pBMICmdBuf[offset]), &address, sizeof(address)); + memcpy(&(pBMICmdBuf[offset]), &address, sizeof(address)); offset += sizeof(address); status = bmiBufferSend(device, pBMICmdBuf, offset); if (status) { @@ -972,7 +972,7 @@ BMIFastDownload(HIF_DEVICE *device, u32 address, A_UCHAR *buffer, u32 length) if (unalignedBytes) { /* copy the last word into a zero padded buffer */ - A_MEMCPY(&lastWord, &buffer[lastWordOffset], unalignedBytes); + memcpy(&lastWord, &buffer[lastWordOffset], unalignedBytes); } status = BMILZData(device, buffer, lastWordOffset); diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k.c b/drivers/staging/ath6kl/htc2/AR6000/ar6k.c index ff0480b..cf75c20 100644 --- a/drivers/staging/ath6kl/htc2/AR6000/ar6k.c +++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k.c @@ -254,7 +254,7 @@ int DevEnableInterrupts(AR6K_DEVICE *pDev) COUNTER_INT_STATUS_ENABLE_BIT_SET(AR6K_TARGET_DEBUG_INTR_MASK); /* copy into our temp area */ - A_MEMCPY(®s,&pDev->IrqEnableRegisters,AR6K_IRQ_ENABLE_REGS_SIZE); + memcpy(®s,&pDev->IrqEnableRegisters,AR6K_IRQ_ENABLE_REGS_SIZE); UNLOCK_AR6K(pDev); @@ -287,7 +287,7 @@ int DevDisableInterrupts(AR6K_DEVICE *pDev) pDev->IrqEnableRegisters.error_status_enable = 0; pDev->IrqEnableRegisters.counter_int_status_enable = 0; /* copy into our temp area */ - A_MEMCPY(®s,&pDev->IrqEnableRegisters,AR6K_IRQ_ENABLE_REGS_SIZE); + memcpy(®s,&pDev->IrqEnableRegisters,AR6K_IRQ_ENABLE_REGS_SIZE); UNLOCK_AR6K(pDev); @@ -419,7 +419,7 @@ static int DevDoEnableDisableRecvNormal(AR6K_DEVICE *pDev, bool EnableRecv, bool } /* copy into our temp area */ - A_MEMCPY(®s,&pDev->IrqEnableRegisters,AR6K_IRQ_ENABLE_REGS_SIZE); + memcpy(®s,&pDev->IrqEnableRegisters,AR6K_IRQ_ENABLE_REGS_SIZE); UNLOCK_AR6K(pDev); do { @@ -435,7 +435,7 @@ static int DevDoEnableDisableRecvNormal(AR6K_DEVICE *pDev, bool EnableRecv, bool } /* copy values to write to our async I/O buffer */ - A_MEMCPY(pIOPacket->pBuffer,®s,AR6K_IRQ_ENABLE_REGS_SIZE); + memcpy(pIOPacket->pBuffer,®s,AR6K_IRQ_ENABLE_REGS_SIZE); /* stick in our completion routine when the I/O operation completes */ pIOPacket->Completion = DevDoEnableDisableRecvAsyncHandler; @@ -635,10 +635,10 @@ int DevCopyScatterListToFromDMABuffer(HIF_SCATTER_REQ *pReq, bool FromDMA) if (FromDMA) { /* from DMA buffer */ - A_MEMCPY(pReq->ScatterList[i].pBuffer, pDMABuffer , length); + memcpy(pReq->ScatterList[i].pBuffer, pDMABuffer , length); } else { /* to DMA buffer */ - A_MEMCPY(pDMABuffer, pReq->ScatterList[i].pBuffer, length); + memcpy(pDMABuffer, pReq->ScatterList[i].pBuffer, length); } pDMABuffer += length; diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k_events.c b/drivers/staging/ath6kl/htc2/AR6000/ar6k_events.c index 4517bef..bee4850 100644 --- a/drivers/staging/ath6kl/htc2/AR6000/ar6k_events.c +++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k_events.c @@ -752,7 +752,7 @@ void DumpAR6KDevState(AR6K_DEVICE *pDev) LOCK_AR6K(pDev); /* copy into our temp area */ - A_MEMCPY(®s,&pDev->IrqEnableRegisters,AR6K_IRQ_ENABLE_REGS_SIZE); + memcpy(®s,&pDev->IrqEnableRegisters,AR6K_IRQ_ENABLE_REGS_SIZE); UNLOCK_AR6K(pDev); /* load the register table from the device */ diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox.c b/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox.c index d58e418..46bcb27 100644 --- a/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox.c +++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox.c @@ -93,7 +93,7 @@ static int DevGMboxCounterEnableDisable(AR6K_DEVICE *pDev, GMBOX_IRQ_ACTION_TYPE ~(COUNTER_INT_STATUS_ENABLE_BIT_SET(1 << AR6K_GMBOX_CREDIT_COUNTER)); } /* copy into our temp area */ - A_MEMCPY(®s,&pDev->IrqEnableRegisters,AR6K_IRQ_ENABLE_REGS_SIZE); + memcpy(®s,&pDev->IrqEnableRegisters,AR6K_IRQ_ENABLE_REGS_SIZE); UNLOCK_AR6K(pDev); @@ -110,7 +110,7 @@ static int DevGMboxCounterEnableDisable(AR6K_DEVICE *pDev, GMBOX_IRQ_ACTION_TYPE } /* copy values to write to our async I/O buffer */ - A_MEMCPY(pIOPacket->pBuffer,&pDev->IrqEnableRegisters,AR6K_IRQ_ENABLE_REGS_SIZE); + memcpy(pIOPacket->pBuffer,&pDev->IrqEnableRegisters,AR6K_IRQ_ENABLE_REGS_SIZE); /* stick in our completion routine when the I/O operation completes */ pIOPacket->Completion = DevGMboxIRQActionAsyncHandler; @@ -216,7 +216,7 @@ int DevGMboxIRQAction(AR6K_DEVICE *pDev, GMBOX_IRQ_ACTION_TYPE IrqAction, bool A } /* copy values to write to our async I/O buffer */ - A_MEMCPY(pIOPacket->pBuffer,GMboxIntControl,sizeof(GMboxIntControl)); + memcpy(pIOPacket->pBuffer,GMboxIntControl,sizeof(GMboxIntControl)); /* stick in our completion routine when the I/O operation completes */ pIOPacket->Completion = DevGMboxIRQActionAsyncHandler; @@ -667,7 +667,7 @@ int DevGMboxRecvLookAheadPeek(AR6K_DEVICE *pDev, u8 *pLookAheadBuffer, int *pLoo if (procRegs.gmbox_rx_avail > 0) { int bytes = procRegs.gmbox_rx_avail > maxCopy ? maxCopy : procRegs.gmbox_rx_avail; - A_MEMCPY(pLookAheadBuffer,&procRegs.rx_gmbox_lookahead_alias[0],bytes); + memcpy(pLookAheadBuffer,&procRegs.rx_gmbox_lookahead_alias[0],bytes); *pLookAheadBytes = bytes; } diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c b/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c index cddb939..177f04d 100644 --- a/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c +++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c @@ -961,7 +961,7 @@ HCI_TRANSPORT_HANDLE HCI_TransportAttach(void *HTCHandle, HCI_TRANSPORT_CONFIG_I break; } - A_MEMCPY(&pProtocol->HCIConfig, pInfo, sizeof(HCI_TRANSPORT_CONFIG_INFO)); + memcpy(&pProtocol->HCIConfig, pInfo, sizeof(HCI_TRANSPORT_CONFIG_INFO)); A_ASSERT(pProtocol->HCIConfig.pHCIPktRecv != NULL); A_ASSERT(pProtocol->HCIConfig.pHCISendComplete != NULL); diff --git a/drivers/staging/ath6kl/htc2/htc.c b/drivers/staging/ath6kl/htc2/htc.c index e7adc45..c200cfd 100644 --- a/drivers/staging/ath6kl/htc2/htc.c +++ b/drivers/staging/ath6kl/htc2/htc.c @@ -130,7 +130,7 @@ HTC_HANDLE HTCCreate(void *hif_handle, HTC_INIT_INFO *pInfo) target->Device.MessagePendingCallback = HTCRecvMessagePendingHandler; target->EpWaitingForBuffers = ENDPOINT_MAX; - A_MEMCPY(&target->HTCInitInfo,pInfo,sizeof(HTC_INIT_INFO)); + memcpy(&target->HTCInitInfo,pInfo,sizeof(HTC_INIT_INFO)); ResetEndpointStates(target); @@ -556,7 +556,7 @@ bool HTCGetEndpointStatistics(HTC_HANDLE HTCHandle, if (sample) { A_ASSERT(pStats != NULL); /* return the stats to the caller */ - A_MEMCPY(pStats, &target->EndPoint[Endpoint].EndPointStats, sizeof(HTC_ENDPOINT_STATS)); + memcpy(pStats, &target->EndPoint[Endpoint].EndPointStats, sizeof(HTC_ENDPOINT_STATS)); } if (clearStats) { diff --git a/drivers/staging/ath6kl/htc2/htc_recv.c b/drivers/staging/ath6kl/htc2/htc_recv.c index 3445475..daa6efc 100644 --- a/drivers/staging/ath6kl/htc2/htc_recv.c +++ b/drivers/staging/ath6kl/htc2/htc_recv.c @@ -346,7 +346,7 @@ static int HTCProcessRecvHeader(HTC_TARGET *target, } #ifdef HTC_CAPTURE_LAST_FRAME - A_MEMCPY(target->LastTrailer, (pBuf + HTC_HDR_LENGTH + payloadLen - temp), temp); + memcpy(target->LastTrailer, (pBuf + HTC_HDR_LENGTH + payloadLen - temp), temp); target->LastTrailerLength = temp; #endif /* trim length by trailer bytes */ @@ -372,7 +372,7 @@ static int HTCProcessRecvHeader(HTC_TARGET *target, #endif } else { #ifdef HTC_CAPTURE_LAST_FRAME - A_MEMCPY(&target->LastFrameHdr,pBuf,sizeof(HTC_FRAME_HDR)); + memcpy(&target->LastFrameHdr,pBuf,sizeof(HTC_FRAME_HDR)); #endif if (AR_DEBUG_LVL_CHECK(ATH_DEBUG_RECV)) { if (pPacket->ActualLength > 0) { @@ -1155,7 +1155,7 @@ int HTCRecvMessagePendingHandler(void *Context, u32 MsgLookAheads[], int NumLook } /* on first entry copy the lookaheads into our temp array for processing */ - A_MEMCPY(lookAheads, MsgLookAheads, (sizeof(u32)) * NumLookAheads); + memcpy(lookAheads, MsgLookAheads, (sizeof(u32)) * NumLookAheads); while (true) { diff --git a/drivers/staging/ath6kl/htc2/htc_services.c b/drivers/staging/ath6kl/htc2/htc_services.c index 9ddf32c..61a332e 100644 --- a/drivers/staging/ath6kl/htc2/htc_services.c +++ b/drivers/staging/ath6kl/htc2/htc_services.c @@ -83,7 +83,7 @@ int HTCSendSetupComplete(HTC_TARGET *target) setupFlags |= HTC_SETUP_COMPLETE_FLAGS_ENABLE_BUNDLE_RECV; pSetupCompleteEx->MaxMsgsPerBundledRecv = target->MaxMsgPerBundle; } - A_MEMCPY(&pSetupCompleteEx->SetupFlags, &setupFlags, sizeof(pSetupCompleteEx->SetupFlags)); + memcpy(&pSetupCompleteEx->SetupFlags, &setupFlags, sizeof(pSetupCompleteEx->SetupFlags)); SET_HTC_PACKET_INFO_TX(pSendPacket, NULL, (u8 *)pSetupCompleteEx, @@ -166,7 +166,7 @@ int HTCConnectService(HTC_HANDLE HTCHandle, if ((pConnectReq->pMetaData != NULL) && (pConnectReq->MetaDataLength <= HTC_SERVICE_META_DATA_MAX_LENGTH)) { /* copy meta data into message buffer (after header ) */ - A_MEMCPY((u8 *)pConnectMsg + sizeof(HTC_CONNECT_SERVICE_MSG), + memcpy((u8 *)pConnectMsg + sizeof(HTC_CONNECT_SERVICE_MSG), pConnectReq->pMetaData, pConnectReq->MetaDataLength); pConnectMsg->ServiceMetaLength = pConnectReq->MetaDataLength; @@ -224,7 +224,7 @@ int HTCConnectService(HTC_HANDLE HTCHandle, /* caller supplied a buffer and the target responded with data */ int copyLength = min((int)pConnectResp->BufferLength, (int)pResponseMsg->ServiceMetaLength); /* copy the meta data */ - A_MEMCPY(pConnectResp->pMetaData, + memcpy(pConnectResp->pMetaData, ((u8 *)pResponseMsg) + sizeof(HTC_CONNECT_SERVICE_RESPONSE_MSG), copyLength); pConnectResp->ActualLength = copyLength; diff --git a/drivers/staging/ath6kl/miscdrv/ar3kconfig.c b/drivers/staging/ath6kl/miscdrv/ar3kconfig.c index 29873ac..005b3ba 100644 --- a/drivers/staging/ath6kl/miscdrv/ar3kconfig.c +++ b/drivers/staging/ath6kl/miscdrv/ar3kconfig.c @@ -153,7 +153,7 @@ int SendHCICommandWaitCommandComplete(AR3K_CONFIG_INFO *pConfig, opCodeBytes[1] = pHCICommand[HCI_CMD_OPCODE_BYTE_HI_OFFSET]; /* copy HCI command */ - A_MEMCPY(pBuffer + pConfig->pHCIProps->HeadRoom,pHCICommand,CmdLength); + memcpy(pBuffer + pConfig->pHCIProps->HeadRoom,pHCICommand,CmdLength); /* send command */ status = SendHCICommand(pConfig, pBuffer + pConfig->pHCIProps->HeadRoom, diff --git a/drivers/staging/ath6kl/os/linux/ar6000_drv.c b/drivers/staging/ath6kl/os/linux/ar6000_drv.c index 2148381..2111e99 100644 --- a/drivers/staging/ath6kl/os/linux/ar6000_drv.c +++ b/drivers/staging/ath6kl/os/linux/ar6000_drv.c @@ -2280,7 +2280,7 @@ ar6000_init_control_info(AR_SOFTC_T *ar) ar->ap_profile_flag = 0; A_NETBUF_QUEUE_INIT(&ar->mcastpsq); - A_MEMCPY(ar->ap_country_code, DEF_AP_COUNTRY_CODE, 3); + memcpy(ar->ap_country_code, DEF_AP_COUNTRY_CODE, 3); ar->ap_wmode = DEF_AP_WMODE_G; ar->ap_dtim_period = DEF_AP_DTIM; ar->ap_beacon_interval = DEF_BEACON_INTERVAL; @@ -2875,7 +2875,7 @@ ar6000_channelList_rx(void *devt, s8 numChan, u16 *chanList) { AR_SOFTC_T *ar = (AR_SOFTC_T *)devt; - A_MEMCPY(ar->arChannelList, chanList, numChan * sizeof (u16)); + memcpy(ar->arChannelList, chanList, numChan * sizeof (u16)); ar->arNumChannels = numChan; wake_up(&arEvent); @@ -2914,7 +2914,7 @@ u8 ar6000_ibss_map_epid(struct sk_buff *skb, struct net_device *dev, u32 *mapNo) A_ASSERT(ar->arNodeNum <= MAX_NODE_NUM); } - A_MEMCPY(ar->arNodeMap[eptMap].macAddress, macHdr->dstMac, IEEE80211_ADDR_LEN); + memcpy(ar->arNodeMap[eptMap].macAddress, macHdr->dstMac, IEEE80211_ADDR_LEN); for (i = ENDPOINT_2; i <= ENDPOINT_5; i ++) { if (!ar->arTxPending[i]) { @@ -3118,7 +3118,7 @@ ar6000_data_tx(struct sk_buff *skb, struct net_device *dev) break; } A_NETBUF_PUT(newbuf, len); - A_MEMCPY(A_NETBUF_DATA(newbuf), A_NETBUF_DATA(skb), len); + memcpy(A_NETBUF_DATA(newbuf), A_NETBUF_DATA(skb), len); A_NETBUF_FREE(skb); skb = newbuf; /* fall through and assemble header */ @@ -4239,7 +4239,7 @@ ar6000_ready_event(void *devt, u8 *datap, u8 phyCap, u32 sw_ver, u32 abi_ver) AR_SOFTC_T *ar = (AR_SOFTC_T *)devt; struct net_device *dev = ar->arNetDev; - A_MEMCPY(dev->dev_addr, datap, AR6000_ETH_ADDR_LEN); + memcpy(dev->dev_addr, datap, AR6000_ETH_ADDR_LEN); AR_DEBUG_PRINTF(ATH_DEBUG_INFO,("mac address = %2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x\n", dev->dev_addr[0], dev->dev_addr[1], dev->dev_addr[2], dev->dev_addr[3], @@ -4260,8 +4260,8 @@ add_new_sta(AR_SOFTC_T *ar, u8 *mac, u16 aid, u8 *wpaie, { u8 free_slot=aid-1; - A_MEMCPY(ar->sta_list[free_slot].mac, mac, ATH_MAC_LEN); - A_MEMCPY(ar->sta_list[free_slot].wpa_ie, wpaie, ielen); + memcpy(ar->sta_list[free_slot].mac, mac, ATH_MAC_LEN); + memcpy(ar->sta_list[free_slot].wpa_ie, wpaie, ielen); ar->sta_list[free_slot].aid = aid; ar->sta_list[free_slot].keymgmt = keymgmt; ar->sta_list[free_slot].ucipher = ucipher; @@ -4383,7 +4383,7 @@ skip_key: /* Send event to application */ A_MEMZERO(&wrqu, sizeof(wrqu)); - A_MEMCPY(wrqu.addr.sa_data, bssid, ATH_MAC_LEN); + memcpy(wrqu.addr.sa_data, bssid, ATH_MAC_LEN); wireless_send_event(ar->arNetDev, IWEVREGISTERED, &wrqu, NULL); /* In case the queue is stopped when we switch modes, this will * wake it up @@ -4400,7 +4400,7 @@ skip_key: assocInfo); #endif /* ATH6K_CONFIG_CFG80211 */ - A_MEMCPY(ar->arBssid, bssid, sizeof(ar->arBssid)); + memcpy(ar->arBssid, bssid, sizeof(ar->arBssid)); ar->arBssChannel = channel; A_PRINTF("AR6000 connected event on freq %d ", channel); @@ -4543,7 +4543,7 @@ skip_key: reconnect_flag = 0; A_MEMZERO(&wrqu, sizeof(wrqu)); - A_MEMCPY(wrqu.addr.sa_data, bssid, IEEE80211_ADDR_LEN); + memcpy(wrqu.addr.sa_data, bssid, IEEE80211_ADDR_LEN); wrqu.addr.sa_family = ARPHRD_ETHER; wireless_send_event(ar->arNetDev, SIOCGIWAP, &wrqu, NULL); if ((ar->arNetworkType == ADHOC_NETWORK) && ar->arIbssPsEnable) { @@ -4653,7 +4653,7 @@ ar6000_disconnect_event(AR_SOFTC_T *ar, u8 reason, u8 *bssid, if(!IS_MAC_BCAST(bssid)) { /* Send event to application */ A_MEMZERO(&wrqu, sizeof(wrqu)); - A_MEMCPY(wrqu.addr.sa_data, bssid, ATH_MAC_LEN); + memcpy(wrqu.addr.sa_data, bssid, ATH_MAC_LEN); wireless_send_event(ar->arNetDev, IWEVEXPIRED, &wrqu, NULL); } @@ -4826,7 +4826,7 @@ ar6000_hci_event_rcv_evt(struct ar6_softc *ar, WMI_HCI_EVENT *cmd) */ *((short *)buf) = WMI_HCI_EVENT_EVENTID; buf += sizeof(int); - A_MEMCPY(buf, cmd->buf, cmd->evt_buf_sz); + memcpy(buf, cmd->buf, cmd->evt_buf_sz); if(ar6k_pal_config_g.fpar6k_pal_recv_pkt) { @@ -4880,7 +4880,7 @@ ar6000_neighborReport_event(AR_SOFTC_T *ar, int numAps, WMI_NEIGHBOR_INFO *info) A_MEMZERO(pmkcand, sizeof(struct iw_pmkid_cand)); pmkcand->index = i; pmkcand->flags = info->bssFlags; - A_MEMCPY(pmkcand->bssid.sa_data, info->bssid, ATH_MAC_LEN); + memcpy(pmkcand->bssid.sa_data, info->bssid, ATH_MAC_LEN); wrqu.data.length = sizeof(struct iw_pmkid_cand); wireless_send_event(ar->arNetDev, IWEVPMKIDCAND, &wrqu, (char *)pmkcand); A_FREE(pmkcand); @@ -5302,9 +5302,9 @@ ar6000_bssInfo_event_rx(AR_SOFTC_T *ar, u8 *datap, int len) if ((skb = A_NETBUF_ALLOC_RAW(len)) != NULL) { A_NETBUF_PUT(skb, len); - A_MEMCPY(A_NETBUF_DATA(skb), datap, len); + memcpy(A_NETBUF_DATA(skb), datap, len); skb->dev = ar->arNetDev; - A_MEMCPY(skb_mac_header(skb), A_NETBUF_DATA(skb), 6); + memcpy(skb_mac_header(skb), A_NETBUF_DATA(skb), 6); skb->ip_summed = CHECKSUM_NONE; skb->pkt_type = PACKET_OTHERHOST; skb->protocol = __constant_htons(0x0019); @@ -5468,19 +5468,19 @@ ar6000_btcoex_config_event(struct ar6_softc *ar, u8 *ptr, u32 len) switch (pBtcoexConfig->btProfileType) { case WMI_BTCOEX_BT_PROFILE_SCO: - A_MEMCPY(&pArbtcoexConfig->info.scoConfigCmd, &pBtcoexConfig->info.scoConfigCmd, + memcpy(&pArbtcoexConfig->info.scoConfigCmd, &pBtcoexConfig->info.scoConfigCmd, sizeof(WMI_SET_BTCOEX_SCO_CONFIG_CMD)); break; case WMI_BTCOEX_BT_PROFILE_A2DP: - A_MEMCPY(&pArbtcoexConfig->info.a2dpConfigCmd, &pBtcoexConfig->info.a2dpConfigCmd, + memcpy(&pArbtcoexConfig->info.a2dpConfigCmd, &pBtcoexConfig->info.a2dpConfigCmd, sizeof(WMI_SET_BTCOEX_A2DP_CONFIG_CMD)); break; case WMI_BTCOEX_BT_PROFILE_ACLCOEX: - A_MEMCPY(&pArbtcoexConfig->info.aclcoexConfig, &pBtcoexConfig->info.aclcoexConfig, + memcpy(&pArbtcoexConfig->info.aclcoexConfig, &pBtcoexConfig->info.aclcoexConfig, sizeof(WMI_SET_BTCOEX_ACLCOEX_CONFIG_CMD)); break; case WMI_BTCOEX_BT_PROFILE_INQUIRY_PAGE: - A_MEMCPY(&pArbtcoexConfig->info.btinquiryPageConfigCmd, &pBtcoexConfig->info.btinquiryPageConfigCmd, + memcpy(&pArbtcoexConfig->info.btinquiryPageConfigCmd, &pBtcoexConfig->info.btinquiryPageConfigCmd, sizeof(WMI_SET_BTCOEX_ACLCOEX_CONFIG_CMD)); break; } @@ -5497,7 +5497,7 @@ ar6000_btcoex_stats_event(struct ar6_softc *ar, u8 *ptr, u32 len) AR_DEBUG_PRINTF(ATH_DEBUG_INFO,("AR6000 BTCOEX CONFIG EVENT \n")); - A_MEMCPY(&ar->arBtcoexStats, pBtcoexStats, sizeof(WMI_BTCOEX_STATS_EVENT)); + memcpy(&ar->arBtcoexStats, pBtcoexStats, sizeof(WMI_BTCOEX_STATS_EVENT)); if (ar->statsUpdatePending) { ar->statsUpdatePending = false; @@ -5596,8 +5596,8 @@ void ar6000_send_event_to_app(AR_SOFTC_T *ar, u16 eventId, } A_MEMZERO(buf, size); - A_MEMCPY(buf, &eventId, EVENT_ID_LEN); - A_MEMCPY(buf+EVENT_ID_LEN, datap, len); + memcpy(buf, &eventId, EVENT_ID_LEN); + memcpy(buf+EVENT_ID_LEN, datap, len); //AR_DEBUG_PRINTF(ATH_DEBUG_INFO,("event ID = %d,len = %d\n",*(u16 *)buf, size)); A_MEMZERO(&wrqu, sizeof(wrqu)); @@ -5641,8 +5641,8 @@ void ar6000_send_generic_event_to_app(AR_SOFTC_T *ar, u16 eventId, } A_MEMZERO(buf, size); - A_MEMCPY(buf, &eventId, EVENT_ID_LEN); - A_MEMCPY(buf+EVENT_ID_LEN, datap, len); + memcpy(buf, &eventId, EVENT_ID_LEN); + memcpy(buf+EVENT_ID_LEN, datap, len); A_MEMZERO(&wrqu, sizeof(wrqu)); wrqu.data.length = size; @@ -5989,7 +5989,7 @@ void ap_wapi_rekey_event(AR_SOFTC_T *ar, u8 type, u8 *mac) strcpy(buf, "WAPI_REKEY"); buf[10] = type; - A_MEMCPY(&buf[11], mac, ATH_MAC_LEN); + memcpy(&buf[11], mac, ATH_MAC_LEN); A_MEMZERO(&wrqu, sizeof(wrqu)); wrqu.data.length = 10+1+ATH_MAC_LEN; @@ -6121,7 +6121,7 @@ ar6000_ap_mode_profile_commit(struct ar6_softc *ar) A_MEMZERO(&p,sizeof(p)); p.ssidLength = ar->arSsidLen; - A_MEMCPY(p.ssid,ar->arSsid,p.ssidLength); + memcpy(p.ssid,ar->arSsid,p.ssidLength); p.channel = ar->arChannelHint; p.networkType = ar->arNetworkType; @@ -6238,7 +6238,7 @@ ar6000_ap_mode_get_wpa_ie(struct ar6_softc *ar, struct ieee80211req_wpaie *wpaie A_MEMZERO(wpaie->rsn_ie, IEEE80211_MAX_IE); if(conn) { - A_MEMCPY(wpaie->wpa_ie, conn->wpa_ie, IEEE80211_MAX_IE); + memcpy(wpaie->wpa_ie, conn->wpa_ie, IEEE80211_MAX_IE); } return 0; @@ -6453,7 +6453,7 @@ int ar6000_create_ap_interface(AR_SOFTC_T *ar, char *ap_ifname) arApNetDev = dev; /* Copy the MAC address */ - A_MEMCPY(dev->dev_addr, ar->arNetDev->dev_addr, AR6000_ETH_ADDR_LEN); + memcpy(dev->dev_addr, ar->arNetDev->dev_addr, AR6000_ETH_ADDR_LEN); return 0; } diff --git a/drivers/staging/ath6kl/os/linux/ar6k_pal.c b/drivers/staging/ath6kl/os/linux/ar6k_pal.c index 831b2e3..fee7cb9 100644 --- a/drivers/staging/ath6kl/os/linux/ar6k_pal.c +++ b/drivers/staging/ath6kl/os/linux/ar6k_pal.c @@ -215,7 +215,7 @@ static int btpal_send_frame(struct sk_buff *skb) bt_cb(txSkb)->pkt_type = bt_cb(skb)->pkt_type; txSkb->dev = (void *)pHciPalInfo->hdev; skb_reserve(txSkb, TX_PACKET_RSV_OFFSET + WMI_MAX_TX_META_SZ + sizeof(WMI_DATA_HDR)); - A_MEMCPY(txSkb->data, skb->data, skb->len); + memcpy(txSkb->data, skb->data, skb->len); skb_put(txSkb,skb->len); /* Add WMI packet type */ osbuf = (void *)txSkb; diff --git a/drivers/staging/ath6kl/os/linux/cfg80211.c b/drivers/staging/ath6kl/os/linux/cfg80211.c index 20b08c0..415b253 100644 --- a/drivers/staging/ath6kl/os/linux/cfg80211.c +++ b/drivers/staging/ath6kl/os/linux/cfg80211.c @@ -324,7 +324,7 @@ ar6k_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev, A_MEMZERO(ar->arSsid, sizeof(ar->arSsid)); ar->arSsidLen = sme->ssid_len; - A_MEMCPY(ar->arSsid, sme->ssid, sme->ssid_len); + memcpy(ar->arSsid, sme->ssid, sme->ssid_len); if(sme->channel){ ar->arChannelHint = sme->channel->center_freq; @@ -333,7 +333,7 @@ ar6k_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev, A_MEMZERO(ar->arReqBssid, sizeof(ar->arReqBssid)); if(sme->bssid){ if(A_MEMCMP(&sme->bssid, bcast_mac, AR6000_ETH_ADDR_LEN)) { - A_MEMCPY(ar->arReqBssid, sme->bssid, sizeof(ar->arReqBssid)); + memcpy(ar->arReqBssid, sme->bssid, sizeof(ar->arReqBssid)); } } @@ -365,7 +365,7 @@ ar6k_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev, key = &ar->keys[sme->key_idx]; key->key_len = sme->key_len; - A_MEMCPY(key->key, sme->key, key->key_len); + memcpy(key->key, sme->key, key->key_len); key->cipher = ar->arPairwiseCrypto; ar->arDefTxKeyIndex = sme->key_idx; @@ -493,7 +493,7 @@ ar6k_cfg80211_connect_event(AR_SOFTC_T *ar, u16 channel, if(ptr_ie_buf) { *ptr_ie_buf++ = WLAN_EID_SSID; *ptr_ie_buf++ = ar->arSsidLen; - A_MEMCPY(ptr_ie_buf, ar->arSsid, ar->arSsidLen); + memcpy(ptr_ie_buf, ar->arSsid, ar->arSsidLen); ptr_ie_buf +=ar->arSsidLen; *ptr_ie_buf++ = WLAN_EID_IBSS_PARAMS; @@ -511,11 +511,11 @@ ar6k_cfg80211_connect_event(AR_SOFTC_T *ar, u16 channel, if(WEP_CRYPT == ar->arPairwiseCrypto) { capability |= IEEE80211_CAPINFO_PRIVACY; } - A_MEMCPY(source_mac, ar->arNetDev->dev_addr, ATH_MAC_LEN); + memcpy(source_mac, ar->arNetDev->dev_addr, ATH_MAC_LEN); ptr_ie_buf = ie_buf; } else { capability = *(u16 *)(&assocInfo[beaconIeLen]); - A_MEMCPY(source_mac, bssid, ATH_MAC_LEN); + memcpy(source_mac, bssid, ATH_MAC_LEN); ptr_ie_buf = assocReqIe; ie_buf_len = assocReqLen; } @@ -534,12 +534,12 @@ ar6k_cfg80211_connect_event(AR_SOFTC_T *ar, u16 channel, A_MEMZERO(ieeemgmtbuf, size); mgmt = (struct ieee80211_mgmt *)ieeemgmtbuf; mgmt->frame_control = (IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_BEACON); - A_MEMCPY(mgmt->da, bcast_mac, ATH_MAC_LEN); - A_MEMCPY(mgmt->sa, source_mac, ATH_MAC_LEN); - A_MEMCPY(mgmt->bssid, bssid, ATH_MAC_LEN); + memcpy(mgmt->da, bcast_mac, ATH_MAC_LEN); + memcpy(mgmt->sa, source_mac, ATH_MAC_LEN); + memcpy(mgmt->bssid, bssid, ATH_MAC_LEN); mgmt->u.beacon.beacon_int = beaconInterval; mgmt->u.beacon.capab_info = capability; - A_MEMCPY(mgmt->u.beacon.variable, ptr_ie_buf, ie_buf_len); + memcpy(mgmt->u.beacon.variable, ptr_ie_buf, ie_buf_len); ibss_channel = ieee80211_get_channel(ar->wdev->wiphy, (int)channel); @@ -712,10 +712,10 @@ ar6k_cfg80211_scan_node(void *arg, bss_t *ni) cfg80211 needs it, for time being just filling the da, sa and bssid fields alone. */ mgmt = (struct ieee80211_mgmt *)ieeemgmtbuf; - A_MEMCPY(mgmt->da, bcast_mac, ATH_MAC_LEN); - A_MEMCPY(mgmt->sa, ni->ni_macaddr, ATH_MAC_LEN); - A_MEMCPY(mgmt->bssid, ni->ni_macaddr, ATH_MAC_LEN); - A_MEMCPY(ieeemgmtbuf + offsetof(struct ieee80211_mgmt, u), + memcpy(mgmt->da, bcast_mac, ATH_MAC_LEN); + memcpy(mgmt->sa, ni->ni_macaddr, ATH_MAC_LEN); + memcpy(mgmt->bssid, ni->ni_macaddr, ATH_MAC_LEN); + memcpy(ieeemgmtbuf + offsetof(struct ieee80211_mgmt, u), ni->ni_buf, ni->ni_framelen); freq = cie->ie_chan; @@ -862,9 +862,9 @@ ar6k_cfg80211_add_key(struct wiphy *wiphy, struct net_device *ndev, return -EINVAL; key->key_len = params->key_len; - A_MEMCPY(key->key, params->key, key->key_len); + memcpy(key->key, params->key, key->key_len); key->seq_len = params->seq_len; - A_MEMCPY(key->seq, params->seq, key->seq_len); + memcpy(key->seq, params->seq, key->seq_len); key->cipher = params->cipher; } @@ -1307,7 +1307,7 @@ ar6k_cfg80211_join_ibss(struct wiphy *wiphy, struct net_device *dev, } ar->arSsidLen = ibss_param->ssid_len; - A_MEMCPY(ar->arSsid, ibss_param->ssid, ar->arSsidLen); + memcpy(ar->arSsid, ibss_param->ssid, ar->arSsidLen); if(ibss_param->channel) { ar->arChannelHint = ibss_param->channel->center_freq; @@ -1322,7 +1322,7 @@ ar6k_cfg80211_join_ibss(struct wiphy *wiphy, struct net_device *dev, A_MEMZERO(ar->arReqBssid, sizeof(ar->arReqBssid)); if(ibss_param->bssid) { if(A_MEMCMP(&ibss_param->bssid, bcast_mac, AR6000_ETH_ADDR_LEN)) { - A_MEMCPY(ar->arReqBssid, ibss_param->bssid, sizeof(ar->arReqBssid)); + memcpy(ar->arReqBssid, ibss_param->bssid, sizeof(ar->arReqBssid)); } } diff --git a/drivers/staging/ath6kl/os/linux/hci_bridge.c b/drivers/staging/ath6kl/os/linux/hci_bridge.c index f170382..db38bbf 100644 --- a/drivers/staging/ath6kl/os/linux/hci_bridge.c +++ b/drivers/staging/ath6kl/os/linux/hci_bridge.c @@ -226,7 +226,7 @@ static int ar6000_hci_transport_ready(HCI_TRANSPORT_HANDLE HCIHandle, pHcidevInfo->pHCIDev = HCIHandle; - A_MEMCPY(&pHcidevInfo->HCIProps,pProps,sizeof(*pProps)); + memcpy(&pHcidevInfo->HCIProps,pProps,sizeof(*pProps)); AR_DEBUG_PRINTF(ATH_DEBUG_HCI_BRIDGE,("HCI ready (hci:0x%lX, headroom:%d, tailroom:%d blockpad:%d) \n", (unsigned long)HCIHandle, @@ -778,7 +778,7 @@ static int bt_send_frame(struct sk_buff *skb) bt_cb(txSkb)->pkt_type = bt_cb(skb)->pkt_type; txSkb->dev = (void *)pHcidevInfo->pBtStackHCIDev; skb_reserve(txSkb, TX_PACKET_RSV_OFFSET + pHcidevInfo->HCIProps.HeadRoom); - A_MEMCPY(txSkb->data, skb->data, skb->len); + memcpy(txSkb->data, skb->data, skb->len); skb_put(txSkb,skb->len); pPacket = AllocHTCStruct(pHcidevInfo); diff --git a/drivers/staging/ath6kl/os/linux/include/osapi_linux.h b/drivers/staging/ath6kl/os/linux/include/osapi_linux.h index 1957de0..cdb4195 100644 --- a/drivers/staging/ath6kl/os/linux/include/osapi_linux.h +++ b/drivers/staging/ath6kl/os/linux/include/osapi_linux.h @@ -76,7 +76,6 @@ #define A_CPU2BE16(x) htons(x) #define A_CPU2BE32(x) htonl(x) -#define A_MEMCPY(dst, src, len) memcpy((u8 *)(dst), (src), (len)) #define A_MEMZERO(addr, len) memset(addr, 0, len) #define A_MEMCMP(addr1, addr2, len) memcmp((addr1), (addr2), (len)) #define A_MALLOC(size) kmalloc((size), GFP_KERNEL) @@ -364,7 +363,6 @@ static inline void *A_ALIGN_TO_CACHE_LINE(void *ptr) { #define PREPACK #define POSTPACK __ATTRIB_PACK -#define A_MEMCPY(dst, src, len) memcpy((dst), (src), (len)) #define A_MEMZERO(addr, len) memset((addr), 0, (len)) #define A_MEMCMP(addr1, addr2, len) memcmp((addr1), (addr2), (len)) #define A_MALLOC(size) malloc(size) diff --git a/drivers/staging/ath6kl/os/linux/ioctl.c b/drivers/staging/ath6kl/os/linux/ioctl.c index 4f30b25..9a7f920 100644 --- a/drivers/staging/ath6kl/os/linux/ioctl.c +++ b/drivers/staging/ath6kl/os/linux/ioctl.c @@ -281,7 +281,7 @@ ar6000_ioctl_set_country(struct net_device *dev, struct ifreq *rq) ar->ap_profile_flag = 1; /* There is a change in profile */ ret = wmi_set_country(ar->arWmi, cmd.countryCode); - A_MEMCPY(ar->ap_country_code, cmd.countryCode, 3); + memcpy(ar->ap_country_code, cmd.countryCode, 3); switch (ret) { case 0: @@ -430,7 +430,7 @@ ar6000_ioctl_set_rssi_threshold(struct net_device *dev, struct ifreq *rq) cmd.weight = rssiParams.weight; cmd.pollTime = rssiParams.pollTime; - A_MEMCPY(ar->rssi_map, &rssiParams.tholds, sizeof(ar->rssi_map)); + memcpy(ar->rssi_map, &rssiParams.tholds, sizeof(ar->rssi_map)); /* * only 6 elements, so use bubble sorting, in ascending order */ @@ -702,8 +702,8 @@ ar6000_ioctl_tcmd_get_rx_report(struct net_device *dev, buf[1] = ar->tcmdRxRssi; buf[2] = ar->tcmdRxcrcErrPkt; buf[3] = ar->tcmdRxsecErrPkt; - A_MEMCPY(((A_UCHAR *)buf)+(4*sizeof(u32)), ar->tcmdRateCnt, sizeof(ar->tcmdRateCnt)); - A_MEMCPY(((A_UCHAR *)buf)+(4*sizeof(u32))+(TCMD_MAX_RATES *sizeof(u16)), ar->tcmdRateCntShortGuard, sizeof(ar->tcmdRateCntShortGuard)); + memcpy(((A_UCHAR *)buf)+(4*sizeof(u32)), ar->tcmdRateCnt, sizeof(ar->tcmdRateCnt)); + memcpy(((A_UCHAR *)buf)+(4*sizeof(u32))+(TCMD_MAX_RATES *sizeof(u16)), ar->tcmdRateCntShortGuard, sizeof(ar->tcmdRateCntShortGuard)); if (!ret && copy_to_user(rq->ifr_data, buf, sizeof(buf))) { ret = -EFAULT; @@ -732,8 +732,8 @@ ar6000_tcmd_rx_report_event(void *devt, u8 *results, int len) ar->tcmdRxReport = 1; A_MEMZERO(ar->tcmdRateCnt, sizeof(ar->tcmdRateCnt)); A_MEMZERO(ar->tcmdRateCntShortGuard, sizeof(ar->tcmdRateCntShortGuard)); - A_MEMCPY(ar->tcmdRateCnt, rx_rep->u.report.rateCnt, sizeof(ar->tcmdRateCnt)); - A_MEMCPY(ar->tcmdRateCntShortGuard, rx_rep->u.report.rateCntShortGuard, sizeof(ar->tcmdRateCntShortGuard)); + memcpy(ar->tcmdRateCnt, rx_rep->u.report.rateCnt, sizeof(ar->tcmdRateCnt)); + memcpy(ar->tcmdRateCntShortGuard, rx_rep->u.report.rateCntShortGuard, sizeof(ar->tcmdRateCntShortGuard)); wake_up(&arEvent); } @@ -1523,7 +1523,7 @@ ar6000_create_acl_data_osbuf(struct net_device *dev, u8 *userdata, void **p_osbu /* Real copy to osbuf */ acl = (HCI_ACL_DATA_PKT *)(datap); - A_MEMCPY(acl, tmp_space, hdr_size); + memcpy(acl, tmp_space, hdr_size); if (a_copy_from_user(acl->data, userdata + hdr_size, acl->data_len)) { ret = A_EFAULT; break; @@ -1770,7 +1770,7 @@ ar6000_ioctl_setkey(AR_SOFTC_T *ar, struct ieee80211req_key *ik) (0 == memcmp(ik->ik_macaddr, bcast_mac, IEEE80211_ADDR_LEN)) ) { keyUsage = GROUP_USAGE; if(ar->arNextMode == AP_NETWORK) { - A_MEMCPY(&ar->ap_mode_bkey, ik, + memcpy(&ar->ap_mode_bkey, ik, sizeof(struct ieee80211req_key)); #ifdef WAPI_ENABLE if(ar->arPairwiseCrypto == WAPI_CRYPT) { @@ -1779,13 +1779,13 @@ ar6000_ioctl_setkey(AR_SOFTC_T *ar, struct ieee80211req_key *ik) #endif } #ifdef USER_KEYS - A_MEMCPY(&ar->user_saved_keys.bcast_ik, ik, + memcpy(&ar->user_saved_keys.bcast_ik, ik, sizeof(struct ieee80211req_key)); #endif } else { keyUsage = PAIRWISE_USAGE; #ifdef USER_KEYS - A_MEMCPY(&ar->user_saved_keys.ucast_ik, ik, + memcpy(&ar->user_saved_keys.ucast_ik, ik, sizeof(struct ieee80211req_key)); #endif #ifdef WAPI_ENABLE @@ -1827,7 +1827,7 @@ ar6000_ioctl_setkey(AR_SOFTC_T *ar, struct ieee80211req_key *ik) A_MEMZERO(ar->arWepKeyList[index].arKey, sizeof(ar->arWepKeyList[index].arKey)); - A_MEMCPY(ar->arWepKeyList[index].arKey, ik->ik_keydata, ik->ik_keylen); + memcpy(ar->arWepKeyList[index].arKey, ik->ik_keydata, ik->ik_keylen); ar->arWepKeyList[index].arKeyLen = ik->ik_keylen; if(ik->ik_flags & IEEE80211_KEY_DEFAULT){ @@ -3133,7 +3133,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) ret = -EFAULT; } else { - A_MEMCPY(ar->arReqBssid, adhocBssid.bssid, sizeof(ar->arReqBssid)); + memcpy(ar->arReqBssid, adhocBssid.bssid, sizeof(ar->arReqBssid)); } break; } @@ -4114,7 +4114,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) ap_get_sta_t temp; A_MEMZERO(&temp, sizeof(temp)); for(i=0;ista_list[i].mac, ATH_MAC_LEN); + memcpy(temp.sta[i].mac, ar->sta_list[i].mac, ATH_MAC_LEN); temp.sta[i].aid = ar->sta_list[i].aid; temp.sta[i].keymgmt = ar->sta_list[i].keymgmt; temp.sta[i].ucipher = ar->sta_list[i].ucipher; @@ -4526,7 +4526,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) case AR6000_XIOCTL_AP_GET_COUNTRY: { WMI_AP_SET_COUNTRY_CMD cty; - A_MEMCPY(cty.countryCode, ar->ap_country_code, 3); + memcpy(cty.countryCode, ar->ap_country_code, 3); if (ar->arWmiReady == false) { ret = -EIO; @@ -4743,7 +4743,7 @@ u8 acl_add_del_mac(WMI_AP_ACL *a, WMI_AP_ACL_MAC_CMD *acl) if((already_avail >= 0) || (free_slot == -1)) return 0; - A_MEMCPY(a->acl_mac[free_slot], acl->mac, ATH_MAC_LEN); + memcpy(a->acl_mac[free_slot], acl->mac, ATH_MAC_LEN); a->index = a->index | (1 << free_slot); acl->index = free_slot; a->wildcard[free_slot] = acl->wildcard; diff --git a/drivers/staging/ath6kl/os/linux/netbuf.c b/drivers/staging/ath6kl/os/linux/netbuf.c index 0a41df0..63acedf 100644 --- a/drivers/staging/ath6kl/os/linux/netbuf.c +++ b/drivers/staging/ath6kl/os/linux/netbuf.c @@ -120,7 +120,7 @@ int a_netbuf_push_data(void *bufPtr, char *srcPtr, s32 len) { skb_push((struct sk_buff *) bufPtr, len); - A_MEMCPY(((struct sk_buff *)bufPtr)->data, srcPtr, len); + memcpy(((struct sk_buff *)bufPtr)->data, srcPtr, len); return 0; } @@ -147,7 +147,7 @@ a_netbuf_put_data(void *bufPtr, char *srcPtr, s32 len) char *start = (char*)(((struct sk_buff *)bufPtr)->data + ((struct sk_buff *)bufPtr)->len); skb_put((struct sk_buff *)bufPtr, len); - A_MEMCPY(start, srcPtr, len); + memcpy(start, srcPtr, len); return 0; } @@ -184,7 +184,7 @@ a_netbuf_trim_data(void *bufPtr, char *dstPtr, s32 len) char *start = (char*)(((struct sk_buff *)bufPtr)->data + (((struct sk_buff *)bufPtr)->len - len)); - A_MEMCPY(dstPtr, start, len); + memcpy(dstPtr, start, len); skb_trim((struct sk_buff *)bufPtr, ((struct sk_buff *)bufPtr)->len - len); return 0; @@ -217,7 +217,7 @@ a_netbuf_pull(void *bufPtr, s32 len) int a_netbuf_pull_data(void *bufPtr, char *dstPtr, s32 len) { - A_MEMCPY(dstPtr, ((struct sk_buff *)bufPtr)->data, len); + memcpy(dstPtr, ((struct sk_buff *)bufPtr)->data, len); skb_pull((struct sk_buff *)bufPtr, len); return 0; diff --git a/drivers/staging/ath6kl/os/linux/wireless_ext.c b/drivers/staging/ath6kl/os/linux/wireless_ext.c index baa8663..8262fde 100644 --- a/drivers/staging/ath6kl/os/linux/wireless_ext.c +++ b/drivers/staging/ath6kl/os/linux/wireless_ext.c @@ -112,7 +112,7 @@ ar6000_scan_node(void *arg, bss_t *ni) A_MEMZERO(&iwe, sizeof(iwe)); iwe.cmd = SIOCGIWAP; iwe.u.ap_addr.sa_family = ARPHRD_ETHER; - A_MEMCPY(iwe.u.ap_addr.sa_data, ni->ni_macaddr, 6); + memcpy(iwe.u.ap_addr.sa_data, ni->ni_macaddr, 6); current_ev = IWE_STREAM_ADD_EVENT(param->info, current_ev, end_buf, &iwe, IW_EV_ADDR_LEN); } @@ -506,7 +506,7 @@ ar6000_ioctl_siwessid(struct net_device *dev, /* SSID change for AP network - Will take effect on commit */ if(A_MEMCMP(ar->arSsid,ssid,32) != 0) { ar->arSsidLen = data->length - 1; - A_MEMCPY(ar->arSsid, ssid, ar->arSsidLen); + memcpy(ar->arSsid, ssid, ar->arSsidLen); ar->ap_profile_flag = 1; /* There is a change in profile */ } return 0; @@ -641,7 +641,7 @@ ar6000_ioctl_siwessid(struct net_device *dev, } ar->arSsidLen = data->length - 1; - A_MEMCPY(ar->arSsid, ssid, ar->arSsidLen); + memcpy(ar->arSsid, ssid, ar->arSsidLen); if (ar6000_connect_to_ap(ar)!= 0) { up(&ar->arSem); @@ -675,7 +675,7 @@ ar6000_ioctl_giwessid(struct net_device *dev, data->flags = 1; data->length = ar->arSsidLen; - A_MEMCPY(essid, ar->arSsid, ar->arSsidLen); + memcpy(essid, ar->arSsid, ar->arSsidLen); return 0; } @@ -1080,7 +1080,7 @@ ar6000_ioctl_siwencode(struct net_device *dev, A_MEMZERO(ar->arWepKeyList[index].arKey, sizeof(ar->arWepKeyList[index].arKey)); - A_MEMCPY(ar->arWepKeyList[index].arKey, keybuf, erq->length); + memcpy(ar->arWepKeyList[index].arKey, keybuf, erq->length); ar->arWepKeyList[index].arKeyLen = erq->length; ar->arDot11AuthMode = auth; } else { @@ -1158,14 +1158,14 @@ ar6000_ioctl_giwencode(struct net_device *dev, erq->length = wk->arKeyLen; } if (wk->arKeyLen) { - A_MEMCPY(key, wk->arKey, erq->length); + memcpy(key, wk->arKey, erq->length); } } else { erq->flags &= ~IW_ENCODE_DISABLED; if (ar->user_saved_keys.keyOk) { erq->length = ar->user_saved_keys.ucast_ik.ik_keylen; if (erq->length) { - A_MEMCPY(key, ar->user_saved_keys.ucast_ik.ik_keydata, erq->length); + memcpy(key, ar->user_saved_keys.ucast_ik.ik_keydata, erq->length); } } else { erq->length = 1; // not really printing any key but let iwconfig know enc is on @@ -1616,7 +1616,7 @@ static int ar6000_set_wapi_key(struct net_device *dev, } keyData = (u8 *)(ext + 1); keyLen = erq->length - sizeof(struct iw_encode_ext); - A_MEMCPY(wapiKeyRsc, ext->tx_seq, sizeof(wapiKeyRsc)); + memcpy(wapiKeyRsc, ext->tx_seq, sizeof(wapiKeyRsc)); if (A_MEMCMP(ext->addr.sa_data, broadcastMac, sizeof(broadcastMac)) == 0) { keyUsage |= GROUP_USAGE; @@ -1737,7 +1737,7 @@ ar6000_ioctl_siwencodeext(struct net_device *dev, if (!ar->arConnected) { A_MEMZERO(ar->arWepKeyList[index].arKey, sizeof(ar->arWepKeyList[index].arKey)); - A_MEMCPY(ar->arWepKeyList[index].arKey, keyData, keyLen); + memcpy(ar->arWepKeyList[index].arKey, keyData, keyLen); ar->arWepKeyList[index].arKeyLen = keyLen; return 0; @@ -1778,7 +1778,7 @@ ar6000_ioctl_siwencodeext(struct net_device *dev, } if (ext->ext_flags & IW_ENCODE_EXT_RX_SEQ_VALID) { - A_MEMCPY(keyRsc, ext->rx_seq, sizeof(keyRsc)); + memcpy(keyRsc, ext->rx_seq, sizeof(keyRsc)); } else { A_MEMZERO(keyRsc, sizeof(keyRsc)); } @@ -2318,7 +2318,7 @@ ar6000_ioctl_siwap(struct net_device *dev, if (A_MEMCMP(&ap_addr->sa_data, bcast_mac, AR6000_ETH_ADDR_LEN) == 0) { A_MEMZERO(ar->arReqBssid, sizeof(ar->arReqBssid)); } else { - A_MEMCPY(ar->arReqBssid, &ap_addr->sa_data, sizeof(ar->arReqBssid)); + memcpy(ar->arReqBssid, &ap_addr->sa_data, sizeof(ar->arReqBssid)); } return 0; @@ -2344,7 +2344,7 @@ ar6000_ioctl_giwap(struct net_device *dev, } if (ar->arNetworkType == AP_NETWORK) { - A_MEMCPY(&ap_addr->sa_data, dev->dev_addr, ATH_MAC_LEN); + memcpy(&ap_addr->sa_data, dev->dev_addr, ATH_MAC_LEN); ap_addr->sa_family = ARPHRD_ETHER; return 0; } @@ -2353,7 +2353,7 @@ ar6000_ioctl_giwap(struct net_device *dev, return -EINVAL; } - A_MEMCPY(&ap_addr->sa_data, ar->arBssid, sizeof(ar->arBssid)); + memcpy(&ap_addr->sa_data, ar->arBssid, sizeof(ar->arBssid)); ap_addr->sa_family = ARPHRD_ETHER; return 0; diff --git a/drivers/staging/ath6kl/reorder/rcv_aggr.c b/drivers/staging/ath6kl/reorder/rcv_aggr.c index 5cb4413..adb85eb 100644 --- a/drivers/staging/ath6kl/reorder/rcv_aggr.c +++ b/drivers/staging/ath6kl/reorder/rcv_aggr.c @@ -397,7 +397,7 @@ aggr_slice_amsdu(AGGR_INFO *p_aggr, RXTID *rxtid, void **osbuf) break; } - A_MEMCPY(A_NETBUF_DATA(new_buf), framep, frame_8023_len); + memcpy(A_NETBUF_DATA(new_buf), framep, frame_8023_len); A_NETBUF_PUT(new_buf, frame_8023_len); if (wmi_dot3_2_dix(new_buf) != 0) { A_PRINTF("dot3_2_dix err..\n"); diff --git a/drivers/staging/ath6kl/wlan/include/ieee80211.h b/drivers/staging/ath6kl/wlan/include/ieee80211.h index 0b5441f..dfad19a 100644 --- a/drivers/staging/ath6kl/wlan/include/ieee80211.h +++ b/drivers/staging/ath6kl/wlan/include/ieee80211.h @@ -70,7 +70,7 @@ #define IEEE80211_ADDR_EQ(addr1, addr2) \ (A_MEMCMP(addr1, addr2, IEEE80211_ADDR_LEN) == 0) -#define IEEE80211_ADDR_COPY(dst,src) A_MEMCPY(dst,src,IEEE80211_ADDR_LEN) +#define IEEE80211_ADDR_COPY(dst,src) memcpy(dst,src,IEEE80211_ADDR_LEN) #define IEEE80211_KEYBUF_SIZE 16 #define IEEE80211_MICBUF_SIZE (8+8) /* space for both tx and rx */ diff --git a/drivers/staging/ath6kl/wlan/src/wlan_node.c b/drivers/staging/ath6kl/wlan/src/wlan_node.c index d61cb6e..c99a330 100644 --- a/drivers/staging/ath6kl/wlan/src/wlan_node.c +++ b/drivers/staging/ath6kl/wlan/src/wlan_node.c @@ -116,7 +116,7 @@ wlan_setup_node(struct ieee80211_node_table *nt, bss_t *ni, int hash; u32 timeoutValue = 0; - A_MEMCPY(ni->ni_macaddr, macaddr, IEEE80211_ADDR_LEN); + memcpy(ni->ni_macaddr, macaddr, IEEE80211_ADDR_LEN); hash = IEEE80211_NODE_HASH (macaddr); ieee80211_node_initref (ni); /* mark referenced */ diff --git a/drivers/staging/ath6kl/wmi/wmi.c b/drivers/staging/ath6kl/wmi/wmi.c index acbf6ed..bf9dd0b 100644 --- a/drivers/staging/ath6kl/wmi/wmi.c +++ b/drivers/staging/ath6kl/wmi/wmi.c @@ -422,8 +422,8 @@ wmi_dix_2_dot3(struct wmi_t *wmip, void *osbuf) /* * Save mac fields and length to be inserted later */ - A_MEMCPY(macHdr.dstMac, datap, ATH_MAC_LEN); - A_MEMCPY(macHdr.srcMac, datap + ATH_MAC_LEN, ATH_MAC_LEN); + memcpy(macHdr.dstMac, datap, ATH_MAC_LEN); + memcpy(macHdr.srcMac, datap + ATH_MAC_LEN, ATH_MAC_LEN); macHdr.typeOrLen = A_CPU2BE16(A_NETBUF_LEN(osbuf) - sizeof(ATH_MAC_HDR) + sizeof(ATH_LLC_SNAP_HDR)); @@ -435,7 +435,7 @@ wmi_dix_2_dot3(struct wmi_t *wmip, void *osbuf) } datap = A_NETBUF_DATA(osbuf); - A_MEMCPY(datap, &macHdr, sizeof (ATH_MAC_HDR)); + memcpy(datap, &macHdr, sizeof (ATH_MAC_HDR)); llcHdr = (ATH_LLC_SNAP_HDR *)(datap + sizeof(ATH_MAC_HDR)); llcHdr->dsap = 0xAA; @@ -484,7 +484,7 @@ int wmi_meta_add(struct wmi_t *wmip, void *osbuf, u8 *pVersion,void *pTxMetaS) return A_NO_MEMORY; } pV2 = (WMI_TX_META_V2 *)A_NETBUF_DATA(osbuf); - A_MEMCPY(pV2,(WMI_TX_META_V2 *)pTxMetaS,sizeof(WMI_TX_META_V2)); + memcpy(pV2,(WMI_TX_META_V2 *)pTxMetaS,sizeof(WMI_TX_META_V2)); return (0); } #endif @@ -654,8 +654,8 @@ wmi_dot11_hdr_add (struct wmi_t *wmip, void *osbuf, NETWORK_TYPE mode) /* * Save mac fields and length to be inserted later */ - A_MEMCPY(macHdr.dstMac, datap, ATH_MAC_LEN); - A_MEMCPY(macHdr.srcMac, datap + ATH_MAC_LEN, ATH_MAC_LEN); + memcpy(macHdr.dstMac, datap, ATH_MAC_LEN); + memcpy(macHdr.srcMac, datap + ATH_MAC_LEN, ATH_MAC_LEN); macHdr.typeOrLen = A_CPU2BE16(A_NETBUF_LEN(osbuf) - sizeof(ATH_MAC_HDR) + sizeof(ATH_LLC_SNAP_HDR)); @@ -730,7 +730,7 @@ wmi_dot11_hdr_remove(struct wmi_t *wmip, void *osbuf) type = pwh->i_fc[0] & IEEE80211_FC0_TYPE_MASK; subtype = pwh->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK; - A_MEMCPY((u8 *)&wh, datap, sizeof(struct ieee80211_frame)); + memcpy((u8 *)&wh, datap, sizeof(struct ieee80211_frame)); /* strip off the 802.11 hdr*/ if (subtype == IEEE80211_FC0_SUBTYPE_QOS) { @@ -772,7 +772,7 @@ wmi_dot11_hdr_remove(struct wmi_t *wmip, void *osbuf) A_NETBUF_PUSH(osbuf, sizeof(ATH_MAC_HDR)); datap = A_NETBUF_DATA(osbuf); - A_MEMCPY (datap, &macHdr, sizeof(ATH_MAC_HDR)); + memcpy (datap, &macHdr, sizeof(ATH_MAC_HDR)); return 0; } @@ -791,7 +791,7 @@ wmi_dot3_2_dix(void *osbuf) A_ASSERT(osbuf != NULL); datap = A_NETBUF_DATA(osbuf); - A_MEMCPY(&macHdr, datap, sizeof(ATH_MAC_HDR)); + memcpy(&macHdr, datap, sizeof(ATH_MAC_HDR)); llcHdr = (ATH_LLC_SNAP_HDR *)(datap + sizeof(ATH_MAC_HDR)); macHdr.typeOrLen = llcHdr->etherType; @@ -801,7 +801,7 @@ wmi_dot3_2_dix(void *osbuf) datap = A_NETBUF_DATA(osbuf); - A_MEMCPY(datap, &macHdr, sizeof (ATH_MAC_HDR)); + memcpy(datap, &macHdr, sizeof (ATH_MAC_HDR)); return (0); } @@ -999,7 +999,7 @@ wmi_control_rx(struct wmi_t *wmip, void *osbuf) */ WMI_BSS_INFO_HDR2 bih2; WMI_BSS_INFO_HDR *bih; - A_MEMCPY(&bih2, datap, sizeof(WMI_BSS_INFO_HDR2)); + memcpy(&bih2, datap, sizeof(WMI_BSS_INFO_HDR2)); A_NETBUF_PUSH(osbuf, 4); datap = A_NETBUF_DATA(osbuf); @@ -1011,7 +1011,7 @@ wmi_control_rx(struct wmi_t *wmip, void *osbuf) bih->snr = bih2.snr; bih->rssi = bih2.snr - 95; bih->ieMask = bih2.ieMask; - A_MEMCPY(bih->bssid, bih2.bssid, ATH_MAC_LEN); + memcpy(bih->bssid, bih2.bssid, ATH_MAC_LEN); status = wmi_bssInfo_event_rx(wmip, datap, len); A_WMI_SEND_GENERIC_EVENT_TO_APP(wmip->wmi_devt, id, datap, len); @@ -1275,7 +1275,7 @@ wmi_connect_event_rx(struct wmi_t *wmip, u8 *datap, int len) ev->bssid[0], ev->bssid[1], ev->bssid[2], ev->bssid[3], ev->bssid[4], ev->bssid[5])); - A_MEMCPY(wmip->wmi_bssid, ev->bssid, ATH_MAC_LEN); + memcpy(wmip->wmi_bssid, ev->bssid, ATH_MAC_LEN); /* initialize pointer to start of assoc rsp IEs */ pie = ev->assocInfo + ev->beaconIeLen + ev->assocReqLen + @@ -1538,7 +1538,7 @@ wmi_bssInfo_event_rx(struct wmi_t *wmip, u8 *datap, int len) /* copy the first 14 bytes such as * time-stamp(8), beacon-interval(2), cap-info(2), ssid-id(1), ssid-len(1). */ - A_MEMCPY(ni_buf, buf, SSID_IE_LEN_INDEX + 1); + memcpy(ni_buf, buf, SSID_IE_LEN_INDEX + 1); ni_buf[SSID_IE_LEN_INDEX] = cached_ssid_len; ni_buf += (SSID_IE_LEN_INDEX + 1); @@ -1547,7 +1547,7 @@ wmi_bssInfo_event_rx(struct wmi_t *wmip, u8 *datap, int len) buf_len -= (SSID_IE_LEN_INDEX + 1); /* copy the cached ssid */ - A_MEMCPY(ni_buf, cached_ssid_buf, cached_ssid_len); + memcpy(ni_buf, cached_ssid_buf, cached_ssid_len); ni_buf += cached_ssid_len; buf += beacon_ssid_len; @@ -1557,10 +1557,10 @@ wmi_bssInfo_event_rx(struct wmi_t *wmip, u8 *datap, int len) buf_len -= (cached_ssid_len - beacon_ssid_len); /* now copy the rest of bytes */ - A_MEMCPY(ni_buf, buf, buf_len); + memcpy(ni_buf, buf, buf_len); } else - A_MEMCPY(bss->ni_buf, buf, len); + memcpy(bss->ni_buf, buf, len); bss->ni_framelen = len; if (wlan_parse_beacon(bss->ni_buf, len, &bss->ni_cie) != 0) { @@ -1614,7 +1614,7 @@ wmi_opt_frame_event_rx(struct wmi_t *wmip, u8 *datap, int len) bss->ni_snr = bih->snr; bss->ni_cie.ie_chan = bih->channel; A_ASSERT(bss->ni_buf != NULL); - A_MEMCPY(bss->ni_buf, buf, len); + memcpy(bss->ni_buf, buf, len); wlan_setup_node(&wmip->wmi_scan_table, bss, bih->bssid); return 0; @@ -2446,7 +2446,7 @@ wmi_connect_cmd(struct wmi_t *wmip, NETWORK_TYPE netType, if (ssidLength) { - A_MEMCPY(cc->ssid, ssid, ssidLength); + memcpy(cc->ssid, ssid, ssidLength); } cc->ssidLength = ssidLength; @@ -2461,7 +2461,7 @@ wmi_connect_cmd(struct wmi_t *wmip, NETWORK_TYPE netType, cc->ctrl_flags = ctrl_flags; if (bssid != NULL) { - A_MEMCPY(cc->bssid, bssid, ATH_MAC_LEN); + memcpy(cc->bssid, bssid, ATH_MAC_LEN); } wmip->wmi_pair_crypto_type = pairwiseCrypto; @@ -2490,7 +2490,7 @@ wmi_reconnect_cmd(struct wmi_t *wmip, u8 *bssid, u16 channel) cc->channel = channel; if (bssid != NULL) { - A_MEMCPY(cc->bssid, bssid, ATH_MAC_LEN); + memcpy(cc->bssid, bssid, ATH_MAC_LEN); } return (wmi_cmd_send(wmip, osbuf, WMI_RECONNECT_CMDID, NO_SYNC_WMIFLAG)); @@ -2547,7 +2547,7 @@ wmi_startscan_cmd(struct wmi_t *wmip, WMI_SCAN_TYPE scanType, sc->forceScanInterval = forceScanInterval; sc->numChannels = numChan; if (numChan) { - A_MEMCPY(sc->channelList, channelList, numChan * sizeof(u16)); + memcpy(sc->channelList, channelList, numChan * sizeof(u16)); } return (wmi_cmd_send(wmip, osbuf, WMI_START_SCAN_CMDID, NO_SYNC_WMIFLAG)); @@ -2650,7 +2650,7 @@ wmi_probedSsid_cmd(struct wmi_t *wmip, u8 index, u8 flag, cmd->entryIndex = index; cmd->flag = flag; cmd->ssidLength = ssidLength; - A_MEMCPY(cmd->ssid, ssid, ssidLength); + memcpy(cmd->ssid, ssid, ssidLength); return (wmi_cmd_send(wmip, osbuf, WMI_SET_PROBED_SSID_CMDID, NO_SYNC_WMIFLAG)); @@ -2720,7 +2720,7 @@ wmi_associnfo_cmd(struct wmi_t *wmip, u8 ieType, A_MEMZERO(cmd, cmdLen); cmd->ieType = ieType; cmd->bufferSize = ieLen; - A_MEMCPY(cmd->assocInfo, ieInfo, ieLen); + memcpy(cmd->assocInfo, ieInfo, ieLen); return (wmi_cmd_send(wmip, osbuf, WMI_SET_ASSOC_INFO_CMDID, NO_SYNC_WMIFLAG)); @@ -2880,18 +2880,18 @@ wmi_addKey_cmd(struct wmi_t *wmip, u8 keyIndex, CRYPTO_TYPE keyType, cmd->keyType = keyType; cmd->keyUsage = keyUsage; cmd->keyLength = keyLength; - A_MEMCPY(cmd->key, keyMaterial, keyLength); + memcpy(cmd->key, keyMaterial, keyLength); #ifdef WAPI_ENABLE if (NULL != keyRSC && key_op_ctrl != KEY_OP_INIT_WAPIPN) { #else if (NULL != keyRSC) { #endif // WAPI_ENABLE - A_MEMCPY(cmd->keyRSC, keyRSC, sizeof(cmd->keyRSC)); + memcpy(cmd->keyRSC, keyRSC, sizeof(cmd->keyRSC)); } cmd->key_op_ctrl = key_op_ctrl; if(macAddr) { - A_MEMCPY(cmd->key_macaddr,macAddr,IEEE80211_ADDR_LEN); + memcpy(cmd->key_macaddr,macAddr,IEEE80211_ADDR_LEN); } return (wmi_cmd_send(wmip, osbuf, WMI_ADD_CIPHER_KEY_CMDID, sync_flag)); @@ -2912,7 +2912,7 @@ wmi_add_krk_cmd(struct wmi_t *wmip, u8 *krk) cmd = (WMI_ADD_KRK_CMD *)(A_NETBUF_DATA(osbuf)); A_MEMZERO(cmd, sizeof(*cmd)); - A_MEMCPY(cmd->krk, krk, WMI_KRK_LEN); + memcpy(cmd->krk, krk, WMI_KRK_LEN); return (wmi_cmd_send(wmip, osbuf, WMI_ADD_KRK_CMDID, NO_SYNC_WMIFLAG)); } @@ -2971,9 +2971,9 @@ wmi_setPmkid_cmd(struct wmi_t *wmip, u8 *bssid, u8 *pmkId, A_NETBUF_PUT(osbuf, sizeof(*cmd)); cmd = (WMI_SET_PMKID_CMD *)(A_NETBUF_DATA(osbuf)); - A_MEMCPY(cmd->bssid, bssid, sizeof(cmd->bssid)); + memcpy(cmd->bssid, bssid, sizeof(cmd->bssid)); if (set == true) { - A_MEMCPY(cmd->pmkid, pmkId, sizeof(cmd->pmkid)); + memcpy(cmd->pmkid, pmkId, sizeof(cmd->pmkid)); cmd->enable = PMKID_ENABLE; } else { A_MEMZERO(cmd->pmkid, sizeof(cmd->pmkid)); @@ -3045,7 +3045,7 @@ wmi_set_pmkid_list_cmd(struct wmi_t *wmip, cmd->numPMKID = pmkInfo->numPMKID; for (i = 0; i < cmd->numPMKID; i++) { - A_MEMCPY(&cmd->pmkidList[i], &pmkInfo->pmkidList[i], + memcpy(&cmd->pmkidList[i], &pmkInfo->pmkidList[i], WMI_PMKID_LEN); } @@ -3258,7 +3258,7 @@ wmi_create_pstream_cmd(struct wmi_t *wmip, WMI_CREATE_PSTREAM_CMD *params) cmd = (WMI_CREATE_PSTREAM_CMD *)(A_NETBUF_DATA(osbuf)); A_MEMZERO(cmd, sizeof(*cmd)); - A_MEMCPY(cmd, params, sizeof(*cmd)); + memcpy(cmd, params, sizeof(*cmd)); /* this is an implicitly created Fat pipe */ if ((u32)params->tsid == (u32)WMI_IMPLICIT_PSTREAM) { @@ -3625,7 +3625,7 @@ wmi_set_channelParams_cmd(struct wmi_t *wmip, u8 scanParam, cmd->scanParam = scanParam; cmd->phyMode = mode; cmd->numChannels = numChan; - A_MEMCPY(cmd->channelList, channelList, numChan * sizeof(u16)); + memcpy(cmd->channelList, channelList, numChan * sizeof(u16)); return (wmi_cmd_send(wmip, osbuf, WMI_SET_CHANNEL_PARAMS_CMDID, NO_SYNC_WMIFLAG)); @@ -3724,7 +3724,7 @@ wmi_set_ip_cmd(struct wmi_t *wmip, WMI_SET_IP_CMD *ipCmd) A_NETBUF_PUT(osbuf, sizeof(WMI_SET_IP_CMD)); cmd = (WMI_SET_IP_CMD *)(A_NETBUF_DATA(osbuf)); - A_MEMCPY(cmd, ipCmd, sizeof(WMI_SET_IP_CMD)); + memcpy(cmd, ipCmd, sizeof(WMI_SET_IP_CMD)); return (wmi_cmd_send(wmip, osbuf, WMI_SET_IP_CMDID, NO_SYNC_WMIFLAG)); @@ -3756,7 +3756,7 @@ wmi_set_host_sleep_mode_cmd(struct wmi_t *wmip, cmd = (WMI_SET_HOST_SLEEP_MODE_CMD *)(A_NETBUF_DATA(osbuf)); A_MEMZERO(cmd, size); - A_MEMCPY(cmd, hostModeCmd, sizeof(WMI_SET_HOST_SLEEP_MODE_CMD)); + memcpy(cmd, hostModeCmd, sizeof(WMI_SET_HOST_SLEEP_MODE_CMD)); if(hostModeCmd->asleep) { /* @@ -3811,7 +3811,7 @@ wmi_set_wow_mode_cmd(struct wmi_t *wmip, cmd = (WMI_SET_WOW_MODE_CMD *)(A_NETBUF_DATA(osbuf)); A_MEMZERO(cmd, size); - A_MEMCPY(cmd, wowModeCmd, sizeof(WMI_SET_WOW_MODE_CMD)); + memcpy(cmd, wowModeCmd, sizeof(WMI_SET_WOW_MODE_CMD)); return (wmi_cmd_send(wmip, osbuf, WMI_SET_WOW_MODE_CMDID, NO_SYNC_WMIFLAG)); @@ -3837,7 +3837,7 @@ wmi_get_wow_list_cmd(struct wmi_t *wmip, cmd = (WMI_GET_WOW_LIST_CMD *)(A_NETBUF_DATA(osbuf)); A_MEMZERO(cmd, size); - A_MEMCPY(cmd, wowListCmd, sizeof(WMI_GET_WOW_LIST_CMD)); + memcpy(cmd, wowListCmd, sizeof(WMI_GET_WOW_LIST_CMD)); return (wmi_cmd_send(wmip, osbuf, WMI_GET_WOW_LIST_CMDID, NO_SYNC_WMIFLAG)); @@ -3885,10 +3885,10 @@ int wmi_add_wow_pattern_cmd(struct wmi_t *wmip, cmd->filter_offset = addWowCmd->filter_offset; cmd->filter_size = addWowCmd->filter_size; - A_MEMCPY(cmd->filter, pattern, addWowCmd->filter_size); + memcpy(cmd->filter, pattern, addWowCmd->filter_size); filter_mask = (u8 *)(cmd->filter + cmd->filter_size); - A_MEMCPY(filter_mask, mask, addWowCmd->filter_size); + memcpy(filter_mask, mask, addWowCmd->filter_size); return (wmi_cmd_send(wmip, osbuf, WMI_ADD_WOW_PATTERN_CMDID, @@ -3914,7 +3914,7 @@ wmi_del_wow_pattern_cmd(struct wmi_t *wmip, cmd = (WMI_DEL_WOW_PATTERN_CMD *)(A_NETBUF_DATA(osbuf)); A_MEMZERO(cmd, size); - A_MEMCPY(cmd, delWowCmd, sizeof(WMI_DEL_WOW_PATTERN_CMD)); + memcpy(cmd, delWowCmd, sizeof(WMI_DEL_WOW_PATTERN_CMD)); return (wmi_cmd_send(wmip, osbuf, WMI_DEL_WOW_PATTERN_CMDID, NO_SYNC_WMIFLAG)); @@ -4026,7 +4026,7 @@ wmi_set_lq_threshold_params(struct wmi_t *wmip, cmd = (WMI_LQ_THRESHOLD_PARAMS_CMD *)(A_NETBUF_DATA(osbuf)); A_MEMZERO(cmd, size); - A_MEMCPY(cmd, lqCmd, sizeof(WMI_LQ_THRESHOLD_PARAMS_CMD)); + memcpy(cmd, lqCmd, sizeof(WMI_LQ_THRESHOLD_PARAMS_CMD)); return (wmi_cmd_send(wmip, osbuf, WMI_LQ_THRESHOLD_PARAMS_CMDID, NO_SYNC_WMIFLAG)); @@ -4129,7 +4129,7 @@ wmi_addBadAp_cmd(struct wmi_t *wmip, u8 apIndex, u8 *bssid) cmd = (WMI_ADD_BAD_AP_CMD *)(A_NETBUF_DATA(osbuf)); cmd->badApIndex = apIndex; - A_MEMCPY(cmd->bssid, bssid, sizeof(cmd->bssid)); + memcpy(cmd->bssid, bssid, sizeof(cmd->bssid)); return (wmi_cmd_send(wmip, osbuf, WMI_ADD_BAD_AP_CMDID, SYNC_BEFORE_WMIFLAG)); } @@ -4244,7 +4244,7 @@ wmi_set_roam_ctrl_cmd(struct wmi_t *wmip, WMI_SET_ROAM_CTRL_CMD *p, cmd = (WMI_SET_ROAM_CTRL_CMD *)(A_NETBUF_DATA(osbuf)); A_MEMZERO(cmd, size); - A_MEMCPY(cmd, p, size); + memcpy(cmd, p, size); return (wmi_cmd_send(wmip, osbuf, WMI_SET_ROAM_CTRL_CMDID, NO_SYNC_WMIFLAG)); @@ -4276,7 +4276,7 @@ wmi_set_powersave_timers_cmd(struct wmi_t *wmip, cmd = (WMI_POWERSAVE_TIMERS_POLICY_CMD *)(A_NETBUF_DATA(osbuf)); A_MEMZERO(cmd, size); - A_MEMCPY(cmd, pCmd, size); + memcpy(cmd, pCmd, size); return (wmi_cmd_send(wmip, osbuf, WMI_SET_POWERSAVE_TIMERS_POLICY_CMDID, NO_SYNC_WMIFLAG)); @@ -4482,7 +4482,7 @@ void wmi_get_current_bssid(struct wmi_t *wmip, u8 *bssid) { if (bssid != NULL) { - A_MEMCPY(bssid, wmip->wmi_bssid, ATH_MAC_LEN); + memcpy(bssid, wmip->wmi_bssid, ATH_MAC_LEN); } } @@ -4530,9 +4530,9 @@ wmi_opt_tx_frame_cmd(struct wmi_t *wmip, cmd->frmType = frmType; cmd->optIEDataLen = optIEDataLen; //cmd->optIEData = (u8 *)((int)cmd + sizeof(*cmd)); - A_MEMCPY(cmd->bssid, bssid, sizeof(cmd->bssid)); - A_MEMCPY(cmd->dstAddr, dstMacAddr, sizeof(cmd->dstAddr)); - A_MEMCPY(&cmd->optIEData[0], optIEData, optIEDataLen); + memcpy(cmd->bssid, bssid, sizeof(cmd->bssid)); + memcpy(cmd->dstAddr, dstMacAddr, sizeof(cmd->dstAddr)); + memcpy(&cmd->optIEData[0], optIEData, optIEDataLen); return (wmi_cmd_send(wmip, osbuf, WMI_OPT_TX_FRAME_CMDID, NO_SYNC_WMIFLAG)); @@ -4858,7 +4858,7 @@ wmi_set_country(struct wmi_t *wmip, A_UCHAR *countryCode) cmd = (WMI_AP_SET_COUNTRY_CMD *)(A_NETBUF_DATA(osbuf)); A_MEMZERO(cmd, sizeof(*cmd)); - A_MEMCPY(cmd->countryCode,countryCode,3); + memcpy(cmd->countryCode,countryCode,3); return (wmi_cmd_send(wmip, osbuf, WMI_AP_SET_COUNTRY_CMDID, NO_SYNC_WMIFLAG)); @@ -4884,7 +4884,7 @@ wmi_test_cmd(struct wmi_t *wmip, u8 *buf, u32 len) } A_NETBUF_PUT(osbuf, len); data = A_NETBUF_DATA(osbuf); - A_MEMCPY(data, buf, len); + memcpy(data, buf, len); return(wmi_cmd_send(wmip, osbuf, WMI_TEST_CMDID, NO_SYNC_WMIFLAG)); @@ -4972,7 +4972,7 @@ wmi_set_bt_params_cmd(struct wmi_t *wmip, WMI_SET_BT_PARAMS_CMD* cmd) alloc_cmd = (WMI_SET_BT_PARAMS_CMD *)(A_NETBUF_DATA(osbuf)); A_MEMZERO(alloc_cmd, sizeof(*cmd)); - A_MEMCPY(alloc_cmd, cmd, sizeof(*cmd)); + memcpy(alloc_cmd, cmd, sizeof(*cmd)); return (wmi_cmd_send(wmip, osbuf, WMI_SET_BT_PARAMS_CMDID, NO_SYNC_WMIFLAG)); @@ -4991,7 +4991,7 @@ wmi_set_btcoex_fe_ant_cmd(struct wmi_t *wmip, WMI_SET_BTCOEX_FE_ANT_CMD * cmd) A_NETBUF_PUT(osbuf, sizeof(*cmd)); alloc_cmd = (WMI_SET_BTCOEX_FE_ANT_CMD *)(A_NETBUF_DATA(osbuf)); A_MEMZERO(alloc_cmd, sizeof(*cmd)); - A_MEMCPY(alloc_cmd,cmd,sizeof(WMI_SET_BTCOEX_FE_ANT_CMD)); + memcpy(alloc_cmd,cmd,sizeof(WMI_SET_BTCOEX_FE_ANT_CMD)); return (wmi_cmd_send(wmip, osbuf, WMI_SET_BTCOEX_FE_ANT_CMDID, NO_SYNC_WMIFLAG)); @@ -5012,7 +5012,7 @@ wmi_set_btcoex_colocated_bt_dev_cmd(struct wmi_t *wmip, A_NETBUF_PUT(osbuf, sizeof(*cmd)); alloc_cmd = (WMI_SET_BTCOEX_COLOCATED_BT_DEV_CMD *)(A_NETBUF_DATA(osbuf)); A_MEMZERO(alloc_cmd, sizeof(*cmd)); - A_MEMCPY(alloc_cmd,cmd,sizeof(WMI_SET_BTCOEX_COLOCATED_BT_DEV_CMD)); + memcpy(alloc_cmd,cmd,sizeof(WMI_SET_BTCOEX_COLOCATED_BT_DEV_CMD)); A_PRINTF("colocated bt = %d\n", alloc_cmd->btcoexCoLocatedBTdev); return (wmi_cmd_send(wmip, osbuf, WMI_SET_BTCOEX_COLOCATED_BT_DEV_CMDID, NO_SYNC_WMIFLAG)); @@ -5033,7 +5033,7 @@ wmi_set_btcoex_btinquiry_page_config_cmd(struct wmi_t *wmip, A_NETBUF_PUT(osbuf, sizeof(*cmd)); alloc_cmd = (WMI_SET_BTCOEX_BTINQUIRY_PAGE_CONFIG_CMD *)(A_NETBUF_DATA(osbuf)); A_MEMZERO(alloc_cmd, sizeof(*cmd)); - A_MEMCPY(alloc_cmd,cmd,sizeof(WMI_SET_BTCOEX_BTINQUIRY_PAGE_CONFIG_CMD)); + memcpy(alloc_cmd,cmd,sizeof(WMI_SET_BTCOEX_BTINQUIRY_PAGE_CONFIG_CMD)); return (wmi_cmd_send(wmip, osbuf, WMI_SET_BTCOEX_BTINQUIRY_PAGE_CONFIG_CMDID, NO_SYNC_WMIFLAG)); @@ -5053,7 +5053,7 @@ wmi_set_btcoex_sco_config_cmd(struct wmi_t *wmip, A_NETBUF_PUT(osbuf, sizeof(*cmd)); alloc_cmd = (WMI_SET_BTCOEX_SCO_CONFIG_CMD *)(A_NETBUF_DATA(osbuf)); A_MEMZERO(alloc_cmd, sizeof(*cmd)); - A_MEMCPY(alloc_cmd,cmd,sizeof(WMI_SET_BTCOEX_SCO_CONFIG_CMD)); + memcpy(alloc_cmd,cmd,sizeof(WMI_SET_BTCOEX_SCO_CONFIG_CMD)); return (wmi_cmd_send(wmip, osbuf, WMI_SET_BTCOEX_SCO_CONFIG_CMDID , NO_SYNC_WMIFLAG)); @@ -5073,7 +5073,7 @@ wmi_set_btcoex_a2dp_config_cmd(struct wmi_t *wmip, A_NETBUF_PUT(osbuf, sizeof(*cmd)); alloc_cmd = (WMI_SET_BTCOEX_A2DP_CONFIG_CMD *)(A_NETBUF_DATA(osbuf)); A_MEMZERO(alloc_cmd, sizeof(*cmd)); - A_MEMCPY(alloc_cmd,cmd,sizeof(WMI_SET_BTCOEX_A2DP_CONFIG_CMD)); + memcpy(alloc_cmd,cmd,sizeof(WMI_SET_BTCOEX_A2DP_CONFIG_CMD)); return (wmi_cmd_send(wmip, osbuf, WMI_SET_BTCOEX_A2DP_CONFIG_CMDID , NO_SYNC_WMIFLAG)); @@ -5093,7 +5093,7 @@ wmi_set_btcoex_aclcoex_config_cmd(struct wmi_t *wmip, A_NETBUF_PUT(osbuf, sizeof(*cmd)); alloc_cmd = (WMI_SET_BTCOEX_ACLCOEX_CONFIG_CMD *)(A_NETBUF_DATA(osbuf)); A_MEMZERO(alloc_cmd, sizeof(*cmd)); - A_MEMCPY(alloc_cmd,cmd,sizeof(WMI_SET_BTCOEX_ACLCOEX_CONFIG_CMD)); + memcpy(alloc_cmd,cmd,sizeof(WMI_SET_BTCOEX_ACLCOEX_CONFIG_CMD)); return (wmi_cmd_send(wmip, osbuf, WMI_SET_BTCOEX_ACLCOEX_CONFIG_CMDID , NO_SYNC_WMIFLAG)); @@ -5112,7 +5112,7 @@ wmi_set_btcoex_debug_cmd(struct wmi_t *wmip, WMI_SET_BTCOEX_DEBUG_CMD * cmd) A_NETBUF_PUT(osbuf, sizeof(*cmd)); alloc_cmd = (WMI_SET_BTCOEX_DEBUG_CMD *)(A_NETBUF_DATA(osbuf)); A_MEMZERO(alloc_cmd, sizeof(*cmd)); - A_MEMCPY(alloc_cmd,cmd,sizeof(WMI_SET_BTCOEX_DEBUG_CMD)); + memcpy(alloc_cmd,cmd,sizeof(WMI_SET_BTCOEX_DEBUG_CMD)); return (wmi_cmd_send(wmip, osbuf, WMI_SET_BTCOEX_DEBUG_CMDID , NO_SYNC_WMIFLAG)); @@ -5132,7 +5132,7 @@ wmi_set_btcoex_bt_operating_status_cmd(struct wmi_t * wmip, A_NETBUF_PUT(osbuf, sizeof(*cmd)); alloc_cmd = (WMI_SET_BTCOEX_BT_OPERATING_STATUS_CMD *)(A_NETBUF_DATA(osbuf)); A_MEMZERO(alloc_cmd, sizeof(*cmd)); - A_MEMCPY(alloc_cmd,cmd,sizeof(WMI_SET_BTCOEX_BT_OPERATING_STATUS_CMD)); + memcpy(alloc_cmd,cmd,sizeof(WMI_SET_BTCOEX_BT_OPERATING_STATUS_CMD)); return (wmi_cmd_send(wmip, osbuf, WMI_SET_BTCOEX_BT_OPERATING_STATUS_CMDID , NO_SYNC_WMIFLAG)); @@ -5151,7 +5151,7 @@ wmi_get_btcoex_config_cmd(struct wmi_t * wmip, WMI_GET_BTCOEX_CONFIG_CMD * cmd) A_NETBUF_PUT(osbuf, sizeof(*cmd)); alloc_cmd = (WMI_GET_BTCOEX_CONFIG_CMD *)(A_NETBUF_DATA(osbuf)); A_MEMZERO(alloc_cmd, sizeof(*cmd)); - A_MEMCPY(alloc_cmd,cmd,sizeof(WMI_GET_BTCOEX_CONFIG_CMD)); + memcpy(alloc_cmd,cmd,sizeof(WMI_GET_BTCOEX_CONFIG_CMD)); return (wmi_cmd_send(wmip, osbuf, WMI_GET_BTCOEX_CONFIG_CMDID , NO_SYNC_WMIFLAG)); @@ -5225,7 +5225,7 @@ wmi_set_params_cmd(struct wmi_t *wmip, u32 opcode, u32 length, char *buffer) A_MEMZERO(cmd, sizeof(*cmd)); cmd->opcode = opcode; cmd->length = length; - A_MEMCPY(cmd->buffer, buffer, length); + memcpy(cmd->buffer, buffer, length); return (wmi_cmd_send(wmip, osbuf, WMI_SET_PARAMS_CMDID, NO_SYNC_WMIFLAG)); @@ -5324,7 +5324,7 @@ wmi_set_appie_cmd(struct wmi_t *wmip, u8 mgmtFrmType, u8 ieLen, cmd->mgmtFrmType = mgmtFrmType; cmd->ieLen = ieLen; - A_MEMCPY(cmd->ieInfo, ieInfo, ieLen); + memcpy(cmd->ieInfo, ieInfo, ieLen); return (wmi_cmd_send(wmip, osbuf, WMI_SET_APPIE_CMDID, NO_SYNC_WMIFLAG)); } @@ -5344,7 +5344,7 @@ wmi_set_halparam_cmd(struct wmi_t *wmip, u8 *cmd, u16 dataLen) data = A_NETBUF_DATA(osbuf); - A_MEMCPY(data, cmd, dataLen); + memcpy(data, cmd, dataLen); return (wmi_cmd_send(wmip, osbuf, WMI_SET_WHALPARAM_CMDID, NO_SYNC_WMIFLAG)); } @@ -5933,7 +5933,7 @@ wmi_send_rssi_threshold_params(struct wmi_t *wmip, cmd = (WMI_RSSI_THRESHOLD_PARAMS_CMD *)(A_NETBUF_DATA(osbuf)); A_MEMZERO(cmd, size); - A_MEMCPY(cmd, rssiCmd, sizeof(WMI_RSSI_THRESHOLD_PARAMS_CMD)); + memcpy(cmd, rssiCmd, sizeof(WMI_RSSI_THRESHOLD_PARAMS_CMD)); return (wmi_cmd_send(wmip, osbuf, WMI_RSSI_THRESHOLD_PARAMS_CMDID, NO_SYNC_WMIFLAG)); @@ -5956,7 +5956,7 @@ wmi_send_snr_threshold_params(struct wmi_t *wmip, A_NETBUF_PUT(osbuf, size); cmd = (WMI_SNR_THRESHOLD_PARAMS_CMD *)(A_NETBUF_DATA(osbuf)); A_MEMZERO(cmd, size); - A_MEMCPY(cmd, snrCmd, sizeof(WMI_SNR_THRESHOLD_PARAMS_CMD)); + memcpy(cmd, snrCmd, sizeof(WMI_SNR_THRESHOLD_PARAMS_CMD)); return (wmi_cmd_send(wmip, osbuf, WMI_SNR_THRESHOLD_PARAMS_CMDID, NO_SYNC_WMIFLAG)); @@ -5977,7 +5977,7 @@ wmi_set_target_event_report_cmd(struct wmi_t *wmip, WMI_SET_TARGET_EVENT_REPORT_ alloc_cmd = (WMI_SET_TARGET_EVENT_REPORT_CMD *)(A_NETBUF_DATA(osbuf)); A_MEMZERO(alloc_cmd, sizeof(*cmd)); - A_MEMCPY(alloc_cmd, cmd, sizeof(*cmd)); + memcpy(alloc_cmd, cmd, sizeof(*cmd)); return (wmi_cmd_send(wmip, osbuf, WMI_SET_TARGET_EVENT_REPORT_CMDID, NO_SYNC_WMIFLAG)); @@ -6089,7 +6089,7 @@ wmi_ap_profile_commit(struct wmi_t *wmip, WMI_CONNECT_CMD *p) cm = (WMI_CONNECT_CMD *)(A_NETBUF_DATA(osbuf)); A_MEMZERO(cm, sizeof(*cm)); - A_MEMCPY(cm,p,sizeof(*cm)); + memcpy(cm,p,sizeof(*cm)); return (wmi_cmd_send(wmip, osbuf, WMI_AP_CONFIG_COMMIT_CMDID, NO_SYNC_WMIFLAG)); } @@ -6171,7 +6171,7 @@ wmi_ap_acl_mac_list(struct wmi_t *wmip, WMI_AP_ACL_MAC_CMD *acl) A_NETBUF_PUT(osbuf, sizeof(WMI_AP_ACL_MAC_CMD)); a = (WMI_AP_ACL_MAC_CMD *)(A_NETBUF_DATA(osbuf)); A_MEMZERO(a, sizeof(*a)); - A_MEMCPY(a,acl,sizeof(*acl)); + memcpy(a,acl,sizeof(*acl)); return (wmi_cmd_send(wmip, osbuf, WMI_AP_ACL_MAC_LIST_CMDID, NO_SYNC_WMIFLAG)); } @@ -6199,7 +6199,7 @@ wmi_ap_set_mlme(struct wmi_t *wmip, u8 cmd, u8 *mac, u16 reason) A_MEMZERO(mlme, sizeof(*mlme)); mlme->cmd = cmd; - A_MEMCPY(mlme->mac, mac, ATH_MAC_LEN); + memcpy(mlme->mac, mac, ATH_MAC_LEN); mlme->reason = reason; return (wmi_cmd_send(wmip, osbuf, WMI_AP_SET_MLME_CMDID, NO_SYNC_WMIFLAG)); @@ -6392,7 +6392,7 @@ wmi_set_ht_cap_cmd(struct wmi_t *wmip, WMI_SET_HT_CAP_CMD *cmd) htCap = (WMI_SET_HT_CAP_CMD *)(A_NETBUF_DATA(osbuf)); A_MEMZERO(htCap, sizeof(*htCap)); - A_MEMCPY(htCap, cmd, sizeof(*htCap)); + memcpy(htCap, cmd, sizeof(*htCap)); return (wmi_cmd_send(wmip, osbuf, WMI_SET_HT_CAP_CMDID, NO_SYNC_WMIFLAG)); @@ -6434,7 +6434,7 @@ wmi_set_tx_select_rates_cmd(struct wmi_t *wmip, u32 *pMaskArray) A_NETBUF_PUT(osbuf, sizeof(*pData)); pData = (WMI_SET_TX_SELECT_RATES_CMD *)(A_NETBUF_DATA(osbuf)); - A_MEMCPY(pData, pMaskArray, sizeof(*pData)); + memcpy(pData, pMaskArray, sizeof(*pData)); return (wmi_cmd_send(wmip, osbuf, WMI_SET_TX_SELECT_RATES_CMDID, NO_SYNC_WMIFLAG)); @@ -6456,7 +6456,7 @@ wmi_send_hci_cmd(struct wmi_t *wmip, u8 *buf, u16 sz) cmd = (WMI_HCI_CMD *)(A_NETBUF_DATA(osbuf)); cmd->cmd_buf_sz = sz; - A_MEMCPY(cmd->buf, buf, sz); + memcpy(cmd->buf, buf, sz); return (wmi_cmd_send(wmip, osbuf, WMI_HCI_CMD_CMDID, NO_SYNC_WMIFLAG)); } @@ -6604,7 +6604,7 @@ wmi_set_pmk_cmd(struct wmi_t *wmip, u8 *pmk) p = (WMI_SET_PMK_CMD *)(A_NETBUF_DATA(osbuf)); A_MEMZERO(p, sizeof(*p)); - A_MEMCPY(p->pmk, pmk, WMI_PMK_LEN); + memcpy(p->pmk, pmk, WMI_PMK_LEN); return (wmi_cmd_send(wmip, osbuf, WMI_SET_PMK_CMDID, NO_SYNC_WMIFLAG)); } -- 1.7.4.15.g7811d From fd508ddd13f0f44bbafcec9267de0387d0c84f4a Mon Sep 17 00:00:00 2001 From: Luis R. Rodriguez Date: Mon, 28 Feb 2011 07:54:19 -0800 Subject: [PATCH 03/58] ath6kl: s|A_MEMCMP|memcmp|g for i in $(find ./drivers/staging/ath6kl/ -name \*.[ch]) ; do \ sed -r -i -e "s/A_MEMCMP/memcmp/g" $i; done Cc: Naveen Singh Signed-off-by: Luis R. Rodriguez --- drivers/staging/ath6kl/miscdrv/common_drv.c | 4 ++-- drivers/staging/ath6kl/os/linux/ar6000_drv.c | 6 +++--- drivers/staging/ath6kl/os/linux/cfg80211.c | 8 ++++---- .../staging/ath6kl/os/linux/include/osapi_linux.h | 2 -- drivers/staging/ath6kl/os/linux/ioctl.c | 6 +++--- drivers/staging/ath6kl/os/linux/wireless_ext.c | 8 ++++---- drivers/staging/ath6kl/wlan/include/ieee80211.h | 2 +- drivers/staging/ath6kl/wlan/src/wlan_node.c | 8 ++++---- 8 files changed, 21 insertions(+), 23 deletions(-) diff --git a/drivers/staging/ath6kl/miscdrv/common_drv.c b/drivers/staging/ath6kl/miscdrv/common_drv.c index 7a77290..a01f5d7 100644 --- a/drivers/staging/ath6kl/miscdrv/common_drv.c +++ b/drivers/staging/ath6kl/miscdrv/common_drv.c @@ -877,7 +877,7 @@ static ATH_DEBUG_MODULE_DBG_INFO *FindModule(char *module_name) while (pInfo != NULL) { /* TODO: need to use something other than strlen */ - if (A_MEMCMP(pInfo->ModuleName,module_name,strlen(module_name)) == 0) { + if (memcmp(pInfo->ModuleName,module_name,strlen(module_name)) == 0) { break; } pInfo = pInfo->pNext; @@ -916,7 +916,7 @@ void a_dump_module_debug_info_by_name(char *module_name) return; } - if (A_MEMCMP(module_name,"all",3) == 0) { + if (memcmp(module_name,"all",3) == 0) { /* dump all */ while (pInfo != NULL) { a_dump_module_debug_info(pInfo); diff --git a/drivers/staging/ath6kl/os/linux/ar6000_drv.c b/drivers/staging/ath6kl/os/linux/ar6000_drv.c index 2111e99..e8277ff 100644 --- a/drivers/staging/ath6kl/os/linux/ar6000_drv.c +++ b/drivers/staging/ath6kl/os/linux/ar6000_drv.c @@ -4291,7 +4291,7 @@ ar6000_connect_event(AR_SOFTC_T *ar, u16 channel, u8 *bssid, if(ar->arNetworkType & AP_NETWORK) { struct net_device *dev = ar->arNetDev; - if(A_MEMCMP(dev->dev_addr, bssid, ATH_MAC_LEN)==0) { + if(memcmp(dev->dev_addr, bssid, ATH_MAC_LEN)==0) { ar->arACS = channel; ik = &ar->ap_mode_bkey; @@ -4605,7 +4605,7 @@ u8 remove_sta(AR_SOFTC_T *ar, u8 *mac, u16 reason) } } else { for(i=0; i < AP_MAX_NUM_STA; i++) { - if(A_MEMCMP(ar->sta_list[i].mac, mac, ATH_MAC_LEN)==0) { + if(memcmp(ar->sta_list[i].mac, mac, ATH_MAC_LEN)==0) { A_PRINTF("DEL STA %2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x " " aid=%d REASON=%d\n", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5], ar->sta_list[i].aid, reason); @@ -6281,7 +6281,7 @@ ap_set_wapi_key(struct ar6_softc *ar, void *ikey) KEY_USAGE keyUsage = 0; int status; - if (A_MEMCMP(ik->ik_macaddr, bcast_mac, IEEE80211_ADDR_LEN) == 0) { + if (memcmp(ik->ik_macaddr, bcast_mac, IEEE80211_ADDR_LEN) == 0) { keyUsage = GROUP_USAGE; } else { keyUsage = PAIRWISE_USAGE; diff --git a/drivers/staging/ath6kl/os/linux/cfg80211.c b/drivers/staging/ath6kl/os/linux/cfg80211.c index 415b253..2edac07 100644 --- a/drivers/staging/ath6kl/os/linux/cfg80211.c +++ b/drivers/staging/ath6kl/os/linux/cfg80211.c @@ -305,7 +305,7 @@ ar6k_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev, if(ar->arConnected == true && ar->arSsidLen == sme->ssid_len && - !A_MEMCMP(ar->arSsid, sme->ssid, ar->arSsidLen)) { + !memcmp(ar->arSsid, sme->ssid, ar->arSsidLen)) { reconnect_flag = true; status = wmi_reconnect_cmd(ar->arWmi, ar->arReqBssid, @@ -318,7 +318,7 @@ ar6k_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev, } return 0; } else if(ar->arSsidLen == sme->ssid_len && - !A_MEMCMP(ar->arSsid, sme->ssid, ar->arSsidLen)) { + !memcmp(ar->arSsid, sme->ssid, ar->arSsidLen)) { ar6000_disconnect(ar); } @@ -332,7 +332,7 @@ ar6k_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev, A_MEMZERO(ar->arReqBssid, sizeof(ar->arReqBssid)); if(sme->bssid){ - if(A_MEMCMP(&sme->bssid, bcast_mac, AR6000_ETH_ADDR_LEN)) { + if(memcmp(&sme->bssid, bcast_mac, AR6000_ETH_ADDR_LEN)) { memcpy(ar->arReqBssid, sme->bssid, sizeof(ar->arReqBssid)); } } @@ -1321,7 +1321,7 @@ ar6k_cfg80211_join_ibss(struct wiphy *wiphy, struct net_device *dev, A_MEMZERO(ar->arReqBssid, sizeof(ar->arReqBssid)); if(ibss_param->bssid) { - if(A_MEMCMP(&ibss_param->bssid, bcast_mac, AR6000_ETH_ADDR_LEN)) { + if(memcmp(&ibss_param->bssid, bcast_mac, AR6000_ETH_ADDR_LEN)) { memcpy(ar->arReqBssid, ibss_param->bssid, sizeof(ar->arReqBssid)); } } diff --git a/drivers/staging/ath6kl/os/linux/include/osapi_linux.h b/drivers/staging/ath6kl/os/linux/include/osapi_linux.h index cdb4195..53b500c 100644 --- a/drivers/staging/ath6kl/os/linux/include/osapi_linux.h +++ b/drivers/staging/ath6kl/os/linux/include/osapi_linux.h @@ -77,7 +77,6 @@ #define A_CPU2BE32(x) htonl(x) #define A_MEMZERO(addr, len) memset(addr, 0, len) -#define A_MEMCMP(addr1, addr2, len) memcmp((addr1), (addr2), (len)) #define A_MALLOC(size) kmalloc((size), GFP_KERNEL) #define A_MALLOC_NOWAIT(size) kmalloc((size), GFP_ATOMIC) #define A_FREE(addr) kfree(addr) @@ -364,7 +363,6 @@ static inline void *A_ALIGN_TO_CACHE_LINE(void *ptr) { #define POSTPACK __ATTRIB_PACK #define A_MEMZERO(addr, len) memset((addr), 0, (len)) -#define A_MEMCMP(addr1, addr2, len) memcmp((addr1), (addr2), (len)) #define A_MALLOC(size) malloc(size) #define A_FREE(addr) free(addr) diff --git a/drivers/staging/ath6kl/os/linux/ioctl.c b/drivers/staging/ath6kl/os/linux/ioctl.c index 9a7f920..a95b743 100644 --- a/drivers/staging/ath6kl/os/linux/ioctl.c +++ b/drivers/staging/ath6kl/os/linux/ioctl.c @@ -555,7 +555,7 @@ ar6000_ioctl_set_badAp(struct net_device *dev, struct ifreq *rq) return -EIO; } - if (A_MEMCMP(cmd.bssid, null_mac, AR6000_ETH_ADDR_LEN) == 0) { + if (memcmp(cmd.bssid, null_mac, AR6000_ETH_ADDR_LEN) == 0) { /* * This is a delete badAP. */ @@ -3127,7 +3127,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) sizeof(adhocBssid))) { ret = -EFAULT; - } else if (A_MEMCMP(adhocBssid.bssid, bcast_mac, + } else if (memcmp(adhocBssid.bssid, bcast_mac, AR6000_ETH_ADDR_LEN) == 0) { ret = -EFAULT; @@ -4714,7 +4714,7 @@ u8 mac_cmp_wild(u8 *mac, u8 *new_mac, u8 wild, u8 new_wild) if((wild & 1<arNextMode == AP_NETWORK) { /* SSID change for AP network - Will take effect on commit */ - if(A_MEMCMP(ar->arSsid,ssid,32) != 0) { + if(memcmp(ar->arSsid,ssid,32) != 0) { ar->arSsidLen = data->length - 1; memcpy(ar->arSsid, ssid, ar->arSsidLen); ar->ap_profile_flag = 1; /* There is a change in profile */ @@ -581,7 +581,7 @@ ar6000_ioctl_siwessid(struct net_device *dev, (!data->flags))) { if ((!data->flags) || - (A_MEMCMP(ar->arSsid, ssid, ar->arSsidLen) != 0) || + (memcmp(ar->arSsid, ssid, ar->arSsidLen) != 0) || (ar->arSsidLen != (data->length - 1))) { /* @@ -1618,7 +1618,7 @@ static int ar6000_set_wapi_key(struct net_device *dev, keyLen = erq->length - sizeof(struct iw_encode_ext); memcpy(wapiKeyRsc, ext->tx_seq, sizeof(wapiKeyRsc)); - if (A_MEMCMP(ext->addr.sa_data, broadcastMac, sizeof(broadcastMac)) == 0) { + if (memcmp(ext->addr.sa_data, broadcastMac, sizeof(broadcastMac)) == 0) { keyUsage |= GROUP_USAGE; PN = (u32 *)wapiKeyRsc; for (i = 0; i < 4; i++) { @@ -2315,7 +2315,7 @@ ar6000_ioctl_siwap(struct net_device *dev, return -EIO; } - if (A_MEMCMP(&ap_addr->sa_data, bcast_mac, AR6000_ETH_ADDR_LEN) == 0) { + if (memcmp(&ap_addr->sa_data, bcast_mac, AR6000_ETH_ADDR_LEN) == 0) { A_MEMZERO(ar->arReqBssid, sizeof(ar->arReqBssid)); } else { memcpy(ar->arReqBssid, &ap_addr->sa_data, sizeof(ar->arReqBssid)); diff --git a/drivers/staging/ath6kl/wlan/include/ieee80211.h b/drivers/staging/ath6kl/wlan/include/ieee80211.h index dfad19a..532ab0e 100644 --- a/drivers/staging/ath6kl/wlan/include/ieee80211.h +++ b/drivers/staging/ath6kl/wlan/include/ieee80211.h @@ -68,7 +68,7 @@ #define IEEE80211_ADDR_EQ(addr1, addr2) \ - (A_MEMCMP(addr1, addr2, IEEE80211_ADDR_LEN) == 0) + (memcmp(addr1, addr2, IEEE80211_ADDR_LEN) == 0) #define IEEE80211_ADDR_COPY(dst,src) memcpy(dst,src,IEEE80211_ADDR_LEN) diff --git a/drivers/staging/ath6kl/wlan/src/wlan_node.c b/drivers/staging/ath6kl/wlan/src/wlan_node.c index c99a330..0edf9c1 100644 --- a/drivers/staging/ath6kl/wlan/src/wlan_node.c +++ b/drivers/staging/ath6kl/wlan/src/wlan_node.c @@ -334,7 +334,7 @@ wlan_refresh_inactive_nodes (struct ieee80211_node_table *nt) while (bss != NULL) { nextBss = bss->ni_list_next; - if (A_MEMCMP(myBssid, bss->ni_macaddr, sizeof(myBssid)) != 0) + if (memcmp(myBssid, bss->ni_macaddr, sizeof(myBssid)) != 0) { /* * free up all but the current bss - if set @@ -357,7 +357,7 @@ wlan_refresh_inactive_nodes (struct ieee80211_node_table *nt) while (bss != NULL) { nextBss = bss->ni_list_next; - if (A_MEMCMP(myBssid, bss->ni_macaddr, sizeof(myBssid)) != 0) + if (memcmp(myBssid, bss->ni_macaddr, sizeof(myBssid)) != 0) { if (((now - bss->ni_tstamp) > timeoutValue) || --bss->ni_actcnt == 0) @@ -391,7 +391,7 @@ wlan_node_timeout (A_ATH_TIMER arg) while (bss != NULL) { nextBss = bss->ni_list_next; - if (A_MEMCMP(myBssid, bss->ni_macaddr, sizeof(myBssid)) != 0) + if (memcmp(myBssid, bss->ni_macaddr, sizeof(myBssid)) != 0) { if ((now - bss->ni_tstamp) > timeoutValue) @@ -539,7 +539,7 @@ wlan_node_remove(struct ieee80211_node_table *nt, u8 *bssid) { nextBss = bss->ni_list_next; - if (A_MEMCMP(bssid, bss->ni_macaddr, 6) == 0) + if (memcmp(bssid, bss->ni_macaddr, 6) == 0) { wlan_node_remove_core (nt, bss); IEEE80211_NODE_UNLOCK(nt); -- 1.7.4.15.g7811d From c7f42087a719be864d7cc032a6f8dc2be4fc15f9 Mon Sep 17 00:00:00 2001 From: Luis R. Rodriguez Date: Mon, 28 Feb 2011 08:14:10 -0800 Subject: [PATCH 04/58] ath6kl: remove-typedef: A_UCHAR remove-typedef -s A_UCHAR u8 drivers/staging/ath6kl/ This uses the remove-typedef utility: http://www.kernel.org/pub/linux/kernel/people/mcgrof/scripts/remove-typedef Cc: Naveen Singh Signed-off-by: Luis R. Rodriguez --- drivers/staging/ath6kl/bmi/include/bmi_internal.h | 4 +- drivers/staging/ath6kl/bmi/src/bmi.c | 34 ++++---- .../hif/sdio/linux_sdio/include/hif_internal.h | 2 +- .../staging/ath6kl/hif/sdio/linux_sdio/src/hif.c | 4 +- drivers/staging/ath6kl/htc2/AR6000/ar6k.c | 4 +- drivers/staging/ath6kl/htc2/htc_internal.h | 2 +- drivers/staging/ath6kl/include/a_debug.h | 2 +- drivers/staging/ath6kl/include/ar6000_diag.h | 4 +- drivers/staging/ath6kl/include/bmi.h | 12 ++-- .../include/common/regulatory/reg_dbschema.h | 2 +- drivers/staging/ath6kl/include/common/testcmd.h | 2 +- drivers/staging/ath6kl/include/common/wmi.h | 4 +- drivers/staging/ath6kl/include/common/wmi_thin.h | 2 +- drivers/staging/ath6kl/include/common_drv.h | 2 +- drivers/staging/ath6kl/include/hif.h | 2 +- drivers/staging/ath6kl/include/wlan_api.h | 4 +- drivers/staging/ath6kl/include/wmi_api.h | 10 +- .../staging/ath6kl/miscdrv/ar3kps/ar3kpsconfig.c | 34 ++++---- .../staging/ath6kl/miscdrv/ar3kps/ar3kpsconfig.h | 4 +- .../staging/ath6kl/miscdrv/ar3kps/ar3kpsparser.c | 36 ++++---- .../staging/ath6kl/miscdrv/ar3kps/ar3kpsparser.h | 13 +--- drivers/staging/ath6kl/miscdrv/common_drv.c | 32 ++++---- drivers/staging/ath6kl/os/linux/ar6000_drv.c | 82 ++++++++++---------- drivers/staging/ath6kl/os/linux/eeprom.c | 6 +- .../staging/ath6kl/os/linux/include/ar6000_drv.h | 2 +- .../ath6kl/os/linux/include/athtypes_linux.h | 1 - drivers/staging/ath6kl/os/linux/ioctl.c | 4 +- drivers/staging/ath6kl/wlan/src/wlan_node.c | 8 +- drivers/staging/ath6kl/wmi/wmi.c | 16 ++-- 29 files changed, 163 insertions(+), 171 deletions(-) diff --git a/drivers/staging/ath6kl/bmi/include/bmi_internal.h b/drivers/staging/ath6kl/bmi/include/bmi_internal.h index ebc037d..e13fb01 100644 --- a/drivers/staging/ath6kl/bmi/include/bmi_internal.h +++ b/drivers/staging/ath6kl/bmi/include/bmi_internal.h @@ -43,12 +43,12 @@ static bool bmiDone; int bmiBufferSend(HIF_DEVICE *device, - A_UCHAR *buffer, + u8 *buffer, u32 length); int bmiBufferReceive(HIF_DEVICE *device, - A_UCHAR *buffer, + u8 *buffer, u32 length, bool want_timeout); diff --git a/drivers/staging/ath6kl/bmi/src/bmi.c b/drivers/staging/ath6kl/bmi/src/bmi.c index 1e1e6ee..37f7cbc 100644 --- a/drivers/staging/ath6kl/bmi/src/bmi.c +++ b/drivers/staging/ath6kl/bmi/src/bmi.c @@ -55,7 +55,7 @@ very simple. static bool pendingEventsFuncCheck = false; static u32 *pBMICmdCredits; -static A_UCHAR *pBMICmdBuf; +static u8 *pBMICmdBuf; #define MAX_BMI_CMDBUF_SZ (BMI_DATASZ_MAX + \ sizeof(u32) /* cmd */ + \ sizeof(u32) /* addr */ + \ @@ -84,7 +84,7 @@ BMIInit(void) } if (!pBMICmdBuf) { - pBMICmdBuf = (A_UCHAR *)A_MALLOC_NOWAIT(MAX_BMI_CMDBUF_SZ); + pBMICmdBuf = (u8 *)A_MALLOC_NOWAIT(MAX_BMI_CMDBUF_SZ); A_ASSERT(pBMICmdBuf); } @@ -120,7 +120,7 @@ BMIDone(HIF_DEVICE *device) bmiDone = true; cid = BMI_DONE; - status = bmiBufferSend(device, (A_UCHAR *)&cid, sizeof(cid)); + status = bmiBufferSend(device, (u8 *)&cid, sizeof(cid)); if (status) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("Unable to write to the device\n")); return A_ERROR; @@ -155,13 +155,13 @@ BMIGetTargetInfo(HIF_DEVICE *device, struct bmi_target_info *targ_info) AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI Get Target Info: Enter (device: 0x%p)\n", device)); cid = BMI_GET_TARGET_INFO; - status = bmiBufferSend(device, (A_UCHAR *)&cid, sizeof(cid)); + status = bmiBufferSend(device, (u8 *)&cid, sizeof(cid)); if (status) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("Unable to write to the device\n")); return A_ERROR; } - status = bmiBufferReceive(device, (A_UCHAR *)&targ_info->target_ver, + status = bmiBufferReceive(device, (u8 *)&targ_info->target_ver, sizeof(targ_info->target_ver), true); if (status) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("Unable to read Target Version from the device\n")); @@ -170,7 +170,7 @@ BMIGetTargetInfo(HIF_DEVICE *device, struct bmi_target_info *targ_info) if (targ_info->target_ver == TARGET_VERSION_SENTINAL) { /* Determine how many bytes are in the Target's targ_info */ - status = bmiBufferReceive(device, (A_UCHAR *)&targ_info->target_info_byte_count, + status = bmiBufferReceive(device, (u8 *)&targ_info->target_info_byte_count, sizeof(targ_info->target_info_byte_count), true); if (status) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("Unable to read Target Info Byte Count from the device\n")); @@ -185,7 +185,7 @@ BMIGetTargetInfo(HIF_DEVICE *device, struct bmi_target_info *targ_info) /* Read the remainder of the targ_info */ status = bmiBufferReceive(device, - ((A_UCHAR *)targ_info)+sizeof(targ_info->target_info_byte_count), + ((u8 *)targ_info)+sizeof(targ_info->target_info_byte_count), sizeof(*targ_info)-sizeof(targ_info->target_info_byte_count), true); if (status) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("Unable to read Target Info (%d bytes) from the device\n", @@ -203,7 +203,7 @@ BMIGetTargetInfo(HIF_DEVICE *device, struct bmi_target_info *targ_info) int BMIReadMemory(HIF_DEVICE *device, u32 address, - A_UCHAR *buffer, + u8 *buffer, u32 length) { u32 cid; @@ -259,7 +259,7 @@ BMIReadMemory(HIF_DEVICE *device, int BMIWriteMemory(HIF_DEVICE *device, u32 address, - A_UCHAR *buffer, + u8 *buffer, u32 length) { u32 cid; @@ -267,8 +267,8 @@ BMIWriteMemory(HIF_DEVICE *device, u32 offset; u32 remaining, txlen; const u32 header = sizeof(cid) + sizeof(address) + sizeof(length); - A_UCHAR alignedBuffer[BMI_DATASZ_MAX]; - A_UCHAR *src; + u8 alignedBuffer[BMI_DATASZ_MAX]; + u8 *src; A_ASSERT(BMI_COMMAND_FITS(BMI_DATASZ_MAX + header)); memset (pBMICmdBuf, 0, BMI_DATASZ_MAX + header); @@ -647,7 +647,7 @@ BMIrompatchDeactivate(HIF_DEVICE *device, int BMILZData(HIF_DEVICE *device, - A_UCHAR *buffer, + u8 *buffer, u32 length) { u32 cid; @@ -735,7 +735,7 @@ BMILZStreamStart(HIF_DEVICE *device, /* BMI Access routines */ int bmiBufferSend(HIF_DEVICE *device, - A_UCHAR *buffer, + u8 *buffer, u32 length) { int status; @@ -783,7 +783,7 @@ bmiBufferSend(HIF_DEVICE *device, int bmiBufferReceive(HIF_DEVICE *device, - A_UCHAR *buffer, + u8 *buffer, u32 length, bool want_timeout) { @@ -958,7 +958,7 @@ bmiBufferReceive(HIF_DEVICE *device, } int -BMIFastDownload(HIF_DEVICE *device, u32 address, A_UCHAR *buffer, u32 length) +BMIFastDownload(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, A_UCHAR *buffer, u32 length) } int -BMIRawWrite(HIF_DEVICE *device, A_UCHAR *buffer, u32 length) +BMIRawWrite(HIF_DEVICE *device, u8 *buffer, u32 length) { return bmiBufferSend(device, buffer, length); } int -BMIRawRead(HIF_DEVICE *device, A_UCHAR *buffer, u32 length, bool want_timeout) +BMIRawRead(HIF_DEVICE *device, u8 *buffer, u32 length, bool want_timeout) { return bmiBufferReceive(device, buffer, length, want_timeout); } diff --git a/drivers/staging/ath6kl/hif/sdio/linux_sdio/include/hif_internal.h b/drivers/staging/ath6kl/hif/sdio/linux_sdio/include/hif_internal.h index 8ea3d02..87057e3 100644 --- a/drivers/staging/ath6kl/hif/sdio/linux_sdio/include/hif_internal.h +++ b/drivers/staging/ath6kl/hif/sdio/linux_sdio/include/hif_internal.h @@ -54,7 +54,7 @@ typedef struct bus_request { struct bus_request *inusenext; /* link list of in use requests */ struct semaphore sem_req; u32 address; /* request data */ - A_UCHAR *buffer; + u8 *buffer; u32 length; u32 request; void *context; diff --git a/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif.c b/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif.c index 8504724..b9f8c72 100644 --- a/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif.c +++ b/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif.c @@ -155,7 +155,7 @@ int HIFInit(OSDRV_CALLBACKS *callbacks) static int __HIFReadWrite(HIF_DEVICE *device, u32 address, - A_UCHAR *buffer, + u8 *buffer, u32 length, u32 request, void *context) @@ -332,7 +332,7 @@ void AddToAsyncList(HIF_DEVICE *device, BUS_REQUEST *busrequest) int HIFReadWrite(HIF_DEVICE *device, u32 address, - A_UCHAR *buffer, + u8 *buffer, u32 length, u32 request, void *context) diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k.c b/drivers/staging/ath6kl/htc2/AR6000/ar6k.c index cf75c20..9090a39 100644 --- a/drivers/staging/ath6kl/htc2/AR6000/ar6k.c +++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k.c @@ -491,7 +491,7 @@ int DevEnableRecv(AR6K_DEVICE *pDev, bool AsyncMode) int DevWaitForPendingRecv(AR6K_DEVICE *pDev,u32 TimeoutInMs,bool *pbIsRecvPending) { int status = 0; - A_UCHAR host_int_status = 0x0; + u8 host_int_status = 0x0; u32 counter = 0x0; if(TimeoutInMs < 100) @@ -507,7 +507,7 @@ int DevWaitForPendingRecv(AR6K_DEVICE *pDev,u32 TimeoutInMs,bool *pbIsRecvPendin status = HIFReadWrite(pDev->HIFDevice, HOST_INT_STATUS_ADDRESS, &host_int_status, - sizeof(A_UCHAR), + sizeof(u8), HIF_RD_SYNC_BYTE_INC, NULL); if (status) diff --git a/drivers/staging/ath6kl/htc2/htc_internal.h b/drivers/staging/ath6kl/htc2/htc_internal.h index 743469d..73f6ed9 100644 --- a/drivers/staging/ath6kl/htc2/htc_internal.h +++ b/drivers/staging/ath6kl/htc2/htc_internal.h @@ -178,7 +178,7 @@ void HTCFlushSendPkts(HTC_TARGET *target); #ifdef ATH_DEBUG_MODULE void DumpCreditDist(HTC_ENDPOINT_CREDIT_DIST *pEPDist); void DumpCreditDistStates(HTC_TARGET *target); -void DebugDumpBytes(A_UCHAR *buffer, u16 length, char *pDescription); +void DebugDumpBytes(u8 *buffer, u16 length, char *pDescription); #endif static INLINE HTC_PACKET *HTC_ALLOC_CONTROL_TX(HTC_TARGET *target) { diff --git a/drivers/staging/ath6kl/include/a_debug.h b/drivers/staging/ath6kl/include/a_debug.h index 57472cf..0e5430d 100644 --- a/drivers/staging/ath6kl/include/a_debug.h +++ b/drivers/staging/ath6kl/include/a_debug.h @@ -57,7 +57,7 @@ extern "C" { /* macro to make a module-specific masks */ #define ATH_DEBUG_MAKE_MODULE_MASK(index) (1 << (ATH_DEBUG_MODULE_MASK_SHIFT + (index))) -void DebugDumpBytes(A_UCHAR *buffer, u16 length, char *pDescription); +void DebugDumpBytes(u8 *buffer, u16 length, char *pDescription); /* Debug support on a per-module basis * diff --git a/drivers/staging/ath6kl/include/ar6000_diag.h b/drivers/staging/ath6kl/include/ar6000_diag.h index 78ac597..ca0961a 100644 --- a/drivers/staging/ath6kl/include/ar6000_diag.h +++ b/drivers/staging/ath6kl/include/ar6000_diag.h @@ -33,11 +33,11 @@ ar6000_WriteRegDiag(HIF_DEVICE *hifDevice, u32 *address, u32 *data); int ar6000_ReadDataDiag(HIF_DEVICE *hifDevice, u32 address, - A_UCHAR *data, u32 length); + u8 *data, u32 length); int ar6000_WriteDataDiag(HIF_DEVICE *hifDevice, u32 address, - A_UCHAR *data, u32 length); + u8 *data, u32 length); int ar6k_ReadTargetRegister(HIF_DEVICE *hifDevice, int regsel, u32 *regval); diff --git a/drivers/staging/ath6kl/include/bmi.h b/drivers/staging/ath6kl/include/bmi.h index 788f9af..b44988d 100644 --- a/drivers/staging/ath6kl/include/bmi.h +++ b/drivers/staging/ath6kl/include/bmi.h @@ -52,13 +52,13 @@ BMIGetTargetInfo(HIF_DEVICE *device, struct bmi_target_info *targ_info); int BMIReadMemory(HIF_DEVICE *device, u32 address, - A_UCHAR *buffer, + u8 *buffer, u32 length); int BMIWriteMemory(HIF_DEVICE *device, u32 address, - A_UCHAR *buffer, + u8 *buffer, u32 length); int @@ -108,23 +108,23 @@ BMILZStreamStart(HIF_DEVICE *device, int BMILZData(HIF_DEVICE *device, - A_UCHAR *buffer, + u8 *buffer, u32 length); int BMIFastDownload(HIF_DEVICE *device, u32 address, - A_UCHAR *buffer, + u8 *buffer, u32 length); int BMIRawWrite(HIF_DEVICE *device, - A_UCHAR *buffer, + u8 *buffer, u32 length); int BMIRawRead(HIF_DEVICE *device, - A_UCHAR *buffer, + u8 *buffer, u32 length, bool want_timeout); diff --git a/drivers/staging/ath6kl/include/common/regulatory/reg_dbschema.h b/drivers/staging/ath6kl/include/common/regulatory/reg_dbschema.h index 93d7c0b..4904040 100644 --- a/drivers/staging/ath6kl/include/common/regulatory/reg_dbschema.h +++ b/drivers/staging/ath6kl/include/common/regulatory/reg_dbschema.h @@ -124,7 +124,7 @@ enum searchType { * instance of table). */ typedef PREPACK struct dbMasterTable_t { /* Hold ptrs to Table data structures */ - A_UCHAR numOfEntries; + u8 numOfEntries; char entrySize; /* Entry size per table row */ char searchType; /* Index based access or key based */ char reserved[3]; /* for alignment */ diff --git a/drivers/staging/ath6kl/include/common/testcmd.h b/drivers/staging/ath6kl/include/common/testcmd.h index 3799b68..9ca1f2a 100644 --- a/drivers/staging/ath6kl/include/common/testcmd.h +++ b/drivers/staging/ath6kl/include/common/testcmd.h @@ -142,7 +142,7 @@ typedef PREPACK struct { u16 rateCntShortGuard[TCMD_MAX_RATES]; } POSTPACK report; struct PREPACK TCMD_CONT_RX_MAC { - A_UCHAR addr[ATH_MAC_LEN]; + u8 addr[ATH_MAC_LEN]; } POSTPACK mac; struct PREPACK TCMD_CONT_RX_ANT_SWITCH_TABLE { u32 antswitch1; diff --git a/drivers/staging/ath6kl/include/common/wmi.h b/drivers/staging/ath6kl/include/common/wmi.h index a8b143a..c645af3 100644 --- a/drivers/staging/ath6kl/include/common/wmi.h +++ b/drivers/staging/ath6kl/include/common/wmi.h @@ -537,7 +537,7 @@ typedef PREPACK struct { u8 groupCryptoType; u8 groupCryptoLen; u8 ssidLength; - A_UCHAR ssid[WMI_MAX_SSID_LEN]; + u8 ssid[WMI_MAX_SSID_LEN]; u16 channel; u8 bssid[ATH_MAC_LEN]; u32 ctrl_flags; @@ -3031,7 +3031,7 @@ typedef PREPACK struct { #define WMI_DISABLE_REGULATORY_CODE "FF" typedef PREPACK struct { - A_UCHAR countryCode[3]; + u8 countryCode[3]; } POSTPACK WMI_AP_SET_COUNTRY_CMD; typedef PREPACK struct { diff --git a/drivers/staging/ath6kl/include/common/wmi_thin.h b/drivers/staging/ath6kl/include/common/wmi_thin.h index 41f2b9b..0a8364c 100644 --- a/drivers/staging/ath6kl/include/common/wmi_thin.h +++ b/drivers/staging/ath6kl/include/common/wmi_thin.h @@ -309,7 +309,7 @@ typedef PREPACK struct { u8 ssidLength; /* 0 - 32 */ u8 probe; /* != 0 : issue probe req at start */ u8 reserved; /* alignment */ - A_UCHAR ssid[WMI_MAX_SSID_LEN]; + u8 ssid[WMI_MAX_SSID_LEN]; u8 bssid[ATH_MAC_LEN]; } POSTPACK WMI_THIN_JOIN_CMD; diff --git a/drivers/staging/ath6kl/include/common_drv.h b/drivers/staging/ath6kl/include/common_drv.h index 141b7ef..6ed4901 100644 --- a/drivers/staging/ath6kl/include/common_drv.h +++ b/drivers/staging/ath6kl/include/common_drv.h @@ -70,7 +70,7 @@ int ar6000_ReadRegDiag(HIF_DEVICE *hifDevice, u32 *address, u32 *data); int ar6000_WriteRegDiag(HIF_DEVICE *hifDevice, u32 *address, u32 *data); -int ar6000_ReadDataDiag(HIF_DEVICE *hifDevice, u32 address, A_UCHAR *data, u32 length); +int ar6000_ReadDataDiag(HIF_DEVICE *hifDevice, u32 address, u8 *data, u32 length); int ar6000_reset_device(HIF_DEVICE *hifDevice, u32 TargetType, bool waitForCompletion, bool coldReset); diff --git a/drivers/staging/ath6kl/include/hif.h b/drivers/staging/ath6kl/include/hif.h index 3906780..ab1f4c1 100644 --- a/drivers/staging/ath6kl/include/hif.h +++ b/drivers/staging/ath6kl/include/hif.h @@ -401,7 +401,7 @@ void HIFDetachHTC(HIF_DEVICE *device); int HIFReadWrite(HIF_DEVICE *device, u32 address, - A_UCHAR *buffer, + u8 *buffer, u32 length, u32 request, void *context); diff --git a/drivers/staging/ath6kl/include/wlan_api.h b/drivers/staging/ath6kl/include/wlan_api.h index ba5493c..9eea587 100644 --- a/drivers/staging/ath6kl/include/wlan_api.h +++ b/drivers/staging/ath6kl/include/wlan_api.h @@ -108,7 +108,7 @@ void wlan_refresh_inactive_nodes (struct ieee80211_node_table *nt); bss_t * -wlan_find_Ssidnode (struct ieee80211_node_table *nt, A_UCHAR *pSsid, +wlan_find_Ssidnode (struct ieee80211_node_table *nt, u8 *pSsid, u32 ssidLength, bool bIsWPA2, bool bMatchSSID); void @@ -117,7 +117,7 @@ wlan_node_return (struct ieee80211_node_table *nt, bss_t *ni); bss_t *wlan_node_remove(struct ieee80211_node_table *nt, u8 *bssid); bss_t * -wlan_find_matching_Ssidnode (struct ieee80211_node_table *nt, A_UCHAR *pSsid, +wlan_find_matching_Ssidnode (struct ieee80211_node_table *nt, u8 *pSsid, u32 ssidLength, u32 dot11AuthMode, u32 authMode, u32 pairwiseCryptoType, u32 grpwiseCryptoTyp); diff --git a/drivers/staging/ath6kl/include/wmi_api.h b/drivers/staging/ath6kl/include/wmi_api.h index 7ba8505..c8583e0 100644 --- a/drivers/staging/ath6kl/include/wmi_api.h +++ b/drivers/staging/ath6kl/include/wmi_api.h @@ -111,7 +111,7 @@ int wmi_connect_cmd(struct wmi_t *wmip, CRYPTO_TYPE groupCrypto, u8 groupCryptoLen, int ssidLength, - A_UCHAR *ssid, + u8 *ssid, u8 *bssid, u16 channel, u32 ctrl_flags); @@ -134,7 +134,7 @@ int wmi_scanparams_cmd(struct wmi_t *wmip, u16 fg_start_sec, u16 maxact_scan_per_ssid); int wmi_bssfilter_cmd(struct wmi_t *wmip, u8 filter, u32 ieMask); int wmi_probedSsid_cmd(struct wmi_t *wmip, u8 index, u8 flag, - u8 ssidLength, A_UCHAR *ssid); + u8 ssidLength, u8 *ssid); int wmi_listeninterval_cmd(struct wmi_t *wmip, u16 listenInterval, u16 listenBeacons); int wmi_bmisstime_cmd(struct wmi_t *wmip, u16 bmisstime, u16 bmissbeacons); int wmi_associnfo_cmd(struct wmi_t *wmip, u8 ieType, @@ -284,7 +284,7 @@ int wmi_set_reassocmode_cmd(struct wmi_t *wmip, u8 mode); int wmi_set_qos_supp_cmd(struct wmi_t *wmip,u8 status); int wmi_set_wmm_cmd(struct wmi_t *wmip, WMI_WMM_STATUS status); int wmi_set_wmm_txop(struct wmi_t *wmip, WMI_TXOP_CFG txEnable); -int wmi_set_country(struct wmi_t *wmip, A_UCHAR *countryCode); +int wmi_set_country(struct wmi_t *wmip, u8 *countryCode); int wmi_get_keepalive_configured(struct wmi_t *wmip); u8 wmi_get_keepalive_cmd(struct wmi_t *wmip); @@ -322,7 +322,7 @@ int wmi_mcast_filter_cmd(struct wmi_t *wmip, u8 enable); bss_t * -wmi_find_Ssidnode (struct wmi_t *wmip, A_UCHAR *pSsid, +wmi_find_Ssidnode (struct wmi_t *wmip, u8 *pSsid, u32 ssidLength, bool bIsWPA2, bool bMatchSSID); @@ -429,7 +429,7 @@ u16 wmi_ieee2freq (int chan); u32 wmi_freq2ieee (u16 freq); bss_t * -wmi_find_matching_Ssidnode (struct wmi_t *wmip, A_UCHAR *pSsid, +wmi_find_matching_Ssidnode (struct wmi_t *wmip, u8 *pSsid, u32 ssidLength, u32 dot11AuthMode, u32 authMode, u32 pairwiseCryptoType, u32 grpwiseCryptoTyp); diff --git a/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsconfig.c b/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsconfig.c index 55b0633..3dce6f5 100644 --- a/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsconfig.c +++ b/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsconfig.c @@ -62,20 +62,20 @@ int ReadVersionInfo(AR3K_CONFIG_INFO *pConfig); DECLARE_WAIT_QUEUE_HEAD(PsCompleteEvent); DECLARE_WAIT_QUEUE_HEAD(HciEvent); -A_UCHAR *HciEventpacket; +u8 *HciEventpacket; rwlock_t syncLock; wait_queue_t Eventwait; -int PSHciWritepacket(struct hci_dev*,A_UCHAR* Data, u32 len); +int PSHciWritepacket(struct hci_dev*,u8* Data, u32 len); extern char *bdaddr; #endif /* HCI_TRANSPORT_SDIO */ -int write_bdaddr(AR3K_CONFIG_INFO *pConfig,A_UCHAR *bdaddr,int type); +int write_bdaddr(AR3K_CONFIG_INFO *pConfig,u8 *bdaddr,int type); int PSSendOps(void *arg); #ifdef BT_PS_DEBUG -void Hci_log(A_UCHAR * log_string,A_UCHAR *data,u32 len) +void Hci_log(u8 * log_string,u8 *data,u32 len) { int i; AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("%s : ",log_string)); @@ -139,14 +139,14 @@ int PSSendOps(void *arg) u8 *event; u8 *bufferToFree; struct hci_dev *device; - A_UCHAR *buffer; + u8 *buffer; u32 len; u32 DevType; - A_UCHAR *PsFileName; - A_UCHAR *patchFileName; - A_UCHAR *path = NULL; - A_UCHAR *config_path = NULL; - A_UCHAR config_bdaddr[MAX_BDADDR_FORMAT_LENGTH]; + u8 *PsFileName; + u8 *patchFileName; + u8 *path = NULL; + u8 *config_path = NULL; + u8 config_bdaddr[MAX_BDADDR_FORMAT_LENGTH]; AR3K_CONFIG_INFO *hdev = (AR3K_CONFIG_INFO*)arg; struct device *firmwareDev = NULL; status = 0; @@ -162,12 +162,12 @@ int PSSendOps(void *arg) /* First verify if the controller is an FPGA or ASIC, so depending on the device type the PS file to be written will be different. */ - path =(A_UCHAR *)A_MALLOC(MAX_FW_PATH_LEN); + path =(u8 *)A_MALLOC(MAX_FW_PATH_LEN); if(path == NULL) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("Malloc failed to allocate %d bytes for path\n", MAX_FW_PATH_LEN)); goto complete; } - config_path = (A_UCHAR *) A_MALLOC(MAX_FW_PATH_LEN); + config_path = (u8 *) A_MALLOC(MAX_FW_PATH_LEN); if(config_path == NULL) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("Malloc failed to allocate %d bytes for config_path\n", MAX_FW_PATH_LEN)); goto complete; @@ -214,7 +214,7 @@ int PSSendOps(void *arg) status = 1; goto complete; } - buffer = (A_UCHAR *)A_MALLOC(firmware->size); + buffer = (u8 *)A_MALLOC(firmware->size); if(buffer != NULL) { /* Copy the read file to a local Dynamic buffer */ memcpy(buffer,firmware->data,firmware->size); @@ -248,7 +248,7 @@ int PSSendOps(void *arg) if(NULL == firmware || firmware->size == 0) { status = 0; } else { - buffer = (A_UCHAR *)A_MALLOC(firmware->size); + buffer = (u8 *)A_MALLOC(firmware->size); if(buffer != NULL) { /* Copy the read file to a local Dynamic buffer */ memcpy(buffer,firmware->data,firmware->size); @@ -419,7 +419,7 @@ int SendHCICommandWaitCommandComplete(AR3K_CONFIG_INFO *pConfig, } #endif /* HCI_TRANSPORT_SDIO */ -int ReadPSEvent(A_UCHAR* Data){ +int ReadPSEvent(u8* Data){ AR_DEBUG_PRINTF(ATH_DEBUG_ERR,(" PS Event %x %x %x\n",Data[4],Data[5],Data[3])); if(Data[4] == 0xFC && Data[5] == 0x00) @@ -481,9 +481,9 @@ int str2ba(unsigned char *str_bdaddr,unsigned char *bdaddr) return 0; } -int write_bdaddr(AR3K_CONFIG_INFO *pConfig,A_UCHAR *bdaddr,int type) +int write_bdaddr(AR3K_CONFIG_INFO *pConfig,u8 *bdaddr,int type) { - A_UCHAR bdaddr_cmd[] = { 0x0B, 0xFC, 0x0A, 0x01, 0x01, + u8 bdaddr_cmd[] = { 0x0B, 0xFC, 0x0A, 0x01, 0x01, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; u8 *event; diff --git a/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsconfig.h b/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsconfig.h index 975bf62..b97d91f 100644 --- a/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsconfig.h +++ b/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsconfig.h @@ -67,9 +67,9 @@ #define AR3K_CONFIG_INFO struct hci_dev extern wait_queue_head_t HciEvent; extern wait_queue_t Eventwait; -extern A_UCHAR *HciEventpacket; +extern u8 *HciEventpacket; #endif /* #ifndef HCI_TRANSPORT_SDIO */ int AthPSInitialize(AR3K_CONFIG_INFO *hdev); -int ReadPSEvent(A_UCHAR* Data); +int ReadPSEvent(u8* Data); #endif /* __AR3KPSCONFIG_H */ diff --git a/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsparser.c b/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsparser.c index 90ced22..300c501 100644 --- a/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsparser.c +++ b/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsparser.c @@ -127,13 +127,13 @@ tPsTagEntry PsTagEntry[RAMPS_MAX_PS_TAGS_PER_FILE]; tRamPatch RamPatch[MAX_NUM_PATCH_ENTRY]; -int AthParseFilesUnified(A_UCHAR *srcbuffer,u32 srclen, int FileFormat); -char AthReadChar(A_UCHAR *buffer, u32 len,u32 *pos); -char *AthGetLine(char *buffer, int maxlen, A_UCHAR *srcbuffer,u32 len,u32 *pos); -static int AthPSCreateHCICommand(A_UCHAR Opcode, u32 Param1,PSCmdPacket *PSPatchPacket,u32 *index); +int AthParseFilesUnified(u8 *srcbuffer,u32 srclen, int FileFormat); +char AthReadChar(u8 *buffer, u32 len,u32 *pos); +char *AthGetLine(char *buffer, int maxlen, u8 *srcbuffer,u32 len,u32 *pos); +static int AthPSCreateHCICommand(u8 Opcode, u32 Param1,PSCmdPacket *PSPatchPacket,u32 *index); /* Function to reads the next character from the input buffer */ -char AthReadChar(A_UCHAR *buffer, u32 len,u32 *pos) +char AthReadChar(u8 *buffer, u32 len,u32 *pos) { char Ch; if(buffer == NULL || *pos >=len ) @@ -315,7 +315,7 @@ unsigned int uReadDataInSection(char *pCharLine, ST_PS_DATA_FORMAT stPS_DataForm return (0x0FFF); } } -int AthParseFilesUnified(A_UCHAR *srcbuffer,u32 srclen, int FileFormat) +int AthParseFilesUnified(u8 *srcbuffer,u32 srclen, int FileFormat) { char *Buffer; char *pCharLine; @@ -558,7 +558,7 @@ int AthParseFilesUnified(A_UCHAR *srcbuffer,u32 srclen, int FileFormat) /********************/ -int GetNextTwoChar(A_UCHAR *srcbuffer,u32 len, u32 *pos, char *buffer) +int GetNextTwoChar(u8 *srcbuffer,u32 len, u32 *pos, char *buffer) { unsigned char ch; @@ -579,7 +579,7 @@ int GetNextTwoChar(A_UCHAR *srcbuffer,u32 len, u32 *pos, char *buffer) return 0; } -int AthDoParsePatch(A_UCHAR *patchbuffer, u32 patchlen) +int AthDoParsePatch(u8 *patchbuffer, u32 patchlen) { char Byte[3]; @@ -659,7 +659,7 @@ int AthDoParsePatch(A_UCHAR *patchbuffer, u32 patchlen) /********************/ -int AthDoParsePS(A_UCHAR *srcbuffer, u32 srclen) +int AthDoParsePS(u8 *srcbuffer, u32 srclen) { int status; int i; @@ -713,7 +713,7 @@ int AthDoParsePS(A_UCHAR *srcbuffer, u32 srclen) return status; } -char *AthGetLine(char *buffer, int maxlen, A_UCHAR *srcbuffer,u32 len,u32 *pos) +char *AthGetLine(char *buffer, int maxlen, u8 *srcbuffer,u32 len,u32 *pos) { int count; @@ -751,7 +751,7 @@ char *AthGetLine(char *buffer, int maxlen, A_UCHAR *srcbuffer,u32 len,u32 *pos) return buffer; } -static void LoadHeader(A_UCHAR *HCI_PS_Command,A_UCHAR opcode,int length,int index){ +static void LoadHeader(u8 *HCI_PS_Command,u8 opcode,int length,int index){ HCI_PS_Command[0]= 0x0B; HCI_PS_Command[1]= 0xFC; @@ -833,9 +833,9 @@ int AthCreateCommandList(PSCmdPacket **HciPacketList, u32 *numPackets) //////////////////////// ///////////// -static int AthPSCreateHCICommand(A_UCHAR Opcode, u32 Param1,PSCmdPacket *PSPatchPacket,u32 *index) +static int AthPSCreateHCICommand(u8 Opcode, u32 Param1,PSCmdPacket *PSPatchPacket,u32 *index) { - A_UCHAR *HCI_PS_Command; + u8 *HCI_PS_Command; u32 Length; int i,j; @@ -846,7 +846,7 @@ static int AthPSCreateHCICommand(A_UCHAR Opcode, u32 Param1,PSCmdPacket *PSPatch for(i=0;i< Param1;i++){ - HCI_PS_Command = (A_UCHAR *) A_MALLOC(RamPatch[i].Len+HCI_COMMAND_HEADER); + HCI_PS_Command = (u8 *) A_MALLOC(RamPatch[i].Len+HCI_COMMAND_HEADER); AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Allocated Buffer Size %d\n",RamPatch[i].Len+HCI_COMMAND_HEADER)); if(HCI_PS_Command == NULL){ AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("MALLOC Failed\r\n")); @@ -871,7 +871,7 @@ static int AthPSCreateHCICommand(A_UCHAR Opcode, u32 Param1,PSCmdPacket *PSPatch Length = 0; i= 0; - HCI_PS_Command = (A_UCHAR *) A_MALLOC(Length+HCI_COMMAND_HEADER); + HCI_PS_Command = (u8 *) A_MALLOC(Length+HCI_COMMAND_HEADER); if(HCI_PS_Command == NULL){ AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("MALLOC Failed\r\n")); return A_ERROR; @@ -888,7 +888,7 @@ static int AthPSCreateHCICommand(A_UCHAR Opcode, u32 Param1,PSCmdPacket *PSPatch case PS_RESET: Length = 0x06; i=0; - HCI_PS_Command = (A_UCHAR *) A_MALLOC(Length+HCI_COMMAND_HEADER); + HCI_PS_Command = (u8 *) A_MALLOC(Length+HCI_COMMAND_HEADER); if(HCI_PS_Command == NULL){ AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("MALLOC Failed\r\n")); return A_ERROR; @@ -909,7 +909,7 @@ static int AthPSCreateHCICommand(A_UCHAR Opcode, u32 Param1,PSCmdPacket *PSPatch if(PsTagEntry[i].TagId ==1) BDADDR = true; - HCI_PS_Command = (A_UCHAR *) A_MALLOC(PsTagEntry[i].TagLen+HCI_COMMAND_HEADER); + HCI_PS_Command = (u8 *) A_MALLOC(PsTagEntry[i].TagLen+HCI_COMMAND_HEADER); if(HCI_PS_Command == NULL){ AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("MALLOC Failed\r\n")); return A_ERROR; @@ -936,7 +936,7 @@ static int AthPSCreateHCICommand(A_UCHAR Opcode, u32 Param1,PSCmdPacket *PSPatch AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("VALUE of CRC:%d At index %d\r\n",Param1,*index)); - HCI_PS_Command = (A_UCHAR *) A_MALLOC(Length+HCI_COMMAND_HEADER); + HCI_PS_Command = (u8 *) A_MALLOC(Length+HCI_COMMAND_HEADER); if(HCI_PS_Command == NULL){ AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("MALLOC Failed\r\n")); return A_ERROR; diff --git a/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsparser.h b/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsparser.h index fdc1c94..62e298d 100644 --- a/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsparser.h +++ b/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsparser.h @@ -48,13 +48,6 @@ /* Helper data type declaration */ -#ifndef u32 #define A_UCHAR unsigned char -#define u32 unsigned long -#define u16 unsigned short -#define u8 unsigned char -#define bool unsigned char -#endif /* u32 */ - #define ATH_DEBUG_ERR (1 << 0) #define ATH_DEBUG_WARN (1 << 1) #define ATH_DEBUG_INFO (1 << 2) @@ -98,15 +91,15 @@ typedef struct PSCmdPacket { - A_UCHAR *Hcipacket; + u8 *Hcipacket; int packetLen; } PSCmdPacket; /* Parses a Patch information buffer and store it in global structure */ -int AthDoParsePatch(A_UCHAR *, u32 ); +int AthDoParsePatch(u8 *, u32 ); /* parses a PS information buffer and stores it in a global structure */ -int AthDoParsePS(A_UCHAR *, u32 ); +int AthDoParsePS(u8 *, u32 ); /* * Uses the output of Both AthDoParsePS and AthDoParsePatch APIs to form HCI command array with diff --git a/drivers/staging/ath6kl/miscdrv/common_drv.c b/drivers/staging/ath6kl/miscdrv/common_drv.c index a01f5d7..b5f74c5 100644 --- a/drivers/staging/ath6kl/miscdrv/common_drv.c +++ b/drivers/staging/ath6kl/miscdrv/common_drv.c @@ -123,7 +123,7 @@ int ar6000_SetAddressWindowRegister(HIF_DEVICE *hifDevice, u32 RegisterAddr, u32 * 3 byte write to bytes 1,2,3 has no effect since we are writing the same values again */ status = HIFReadWrite(hifDevice, RegisterAddr, - (A_UCHAR *)(&Address), + (u8 *)(&Address), 4, HIF_WR_SYNC_BYTE_INC, NULL); @@ -152,7 +152,7 @@ int ar6000_SetAddressWindowRegister(HIF_DEVICE *hifDevice, u32 RegisterAddr, u32 * last to initiate the access cycle */ status = HIFReadWrite(hifDevice, RegisterAddr+1, /* write upper 3 bytes */ - ((A_UCHAR *)(&Address))+1, + ((u8 *)(&Address))+1, sizeof(u32)-1, HIF_WR_SYNC_BYTE_INC, NULL); @@ -166,7 +166,7 @@ int ar6000_SetAddressWindowRegister(HIF_DEVICE *hifDevice, u32 RegisterAddr, u32 /* write the LSB of the register, this initiates the operation */ status = HIFReadWrite(hifDevice, RegisterAddr, - (A_UCHAR *)(&Address), + (u8 *)(&Address), sizeof(u8), HIF_WR_SYNC_BYTE_INC, NULL); @@ -203,7 +203,7 @@ ar6000_ReadRegDiag(HIF_DEVICE *hifDevice, u32 *address, u32 *data) /* read the data */ status = HIFReadWrite(hifDevice, WINDOW_DATA_ADDRESS, - (A_UCHAR *)data, + (u8 *)data, sizeof(u32), HIF_RD_SYNC_BYTE_INC, NULL); @@ -228,7 +228,7 @@ ar6000_WriteRegDiag(HIF_DEVICE *hifDevice, u32 *address, u32 *data) /* set write data */ status = HIFReadWrite(hifDevice, WINDOW_DATA_ADDRESS, - (A_UCHAR *)data, + (u8 *)data, sizeof(u32), HIF_WR_SYNC_BYTE_INC, NULL); @@ -245,7 +245,7 @@ ar6000_WriteRegDiag(HIF_DEVICE *hifDevice, u32 *address, u32 *data) int ar6000_ReadDataDiag(HIF_DEVICE *hifDevice, u32 address, - A_UCHAR *data, u32 length) + u8 *data, u32 length) { u32 count; int status = 0; @@ -263,7 +263,7 @@ ar6000_ReadDataDiag(HIF_DEVICE *hifDevice, u32 address, int ar6000_WriteDataDiag(HIF_DEVICE *hifDevice, u32 address, - A_UCHAR *data, u32 length) + u8 *data, u32 length) { u32 count; int status = 0; @@ -283,8 +283,8 @@ int ar6k_ReadTargetRegister(HIF_DEVICE *hifDevice, int regsel, u32 *regval) { int status; - A_UCHAR vals[4]; - A_UCHAR register_selection[4]; + u8 vals[4]; + u8 register_selection[4]; register_selection[0] = register_selection[1] = register_selection[2] = register_selection[3] = (regsel & 0xff); status = HIFReadWrite(hifDevice, @@ -301,7 +301,7 @@ ar6k_ReadTargetRegister(HIF_DEVICE *hifDevice, int regsel, u32 *regval) status = HIFReadWrite(hifDevice, CPU_DBG_ADDRESS, - (A_UCHAR *)vals, + (u8 *)vals, sizeof(vals), HIF_RD_SYNC_BYTE_INC, NULL); @@ -489,7 +489,7 @@ ar6000_copy_cust_data_from_target(HIF_DEVICE *hifDevice, u32 TargetType) if (BMIReadMemory(hifDevice, HOST_INTEREST_ITEM_ADDRESS(TargetType, hi_board_data), - (A_UCHAR *)&eepHeaderAddr, + (u8 *)&eepHeaderAddr, 4)!= 0) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("BMIReadMemory for reading board data address failed \n")); @@ -595,7 +595,7 @@ void ar6000_dump_target_assert_info(HIF_DEVICE *hifDevice, u32 TargetType) /* fetch register dump data */ status = ar6000_ReadDataDiag(hifDevice, regDumpArea, - (A_UCHAR *)®DumpValues[0], + (u8 *)®DumpValues[0], regDumpCount * (sizeof(u32))); if (status) { @@ -654,7 +654,7 @@ int ar6000_set_htc_params(HIF_DEVICE *hifDevice, /* set the host interest area for the block size */ status = BMIWriteMemory(hifDevice, HOST_INTEREST_ITEM_ADDRESS(TargetType, hi_mbox_io_block_sz), - (A_UCHAR *)&blocksizes[1], + (u8 *)&blocksizes[1], 4); if (status) { @@ -669,7 +669,7 @@ int ar6000_set_htc_params(HIF_DEVICE *hifDevice, /* set the host interest area for the mbox ISR yield limit */ status = BMIWriteMemory(hifDevice, HOST_INTEREST_ITEM_ADDRESS(TargetType, hi_mbox_isr_yield_limit), - (A_UCHAR *)&MboxIsrYieldValue, + (u8 *)&MboxIsrYieldValue, 4); if (status) { @@ -796,7 +796,7 @@ ar6002_REV1_reset_force_host (HIF_DEVICE *hifDevice) #endif /* CONFIG_AR6002_REV1_FORCE_HOST */ -void DebugDumpBytes(A_UCHAR *buffer, u16 length, char *pDescription) +void DebugDumpBytes(u8 *buffer, u16 length, char *pDescription) { char stream[60]; char byteOffsetStr[10]; @@ -1015,7 +1015,7 @@ int ar6000_set_hci_bridge_flags(HIF_DEVICE *hifDevice, /* set hci bridge flags */ status = BMIWriteMemory(hifDevice, HOST_INTEREST_ITEM_ADDRESS(TargetType, hi_hci_bridge_flags), - (A_UCHAR *)&Flags, + (u8 *)&Flags, 4); diff --git a/drivers/staging/ath6kl/os/linux/ar6000_drv.c b/drivers/staging/ath6kl/os/linux/ar6000_drv.c index e8277ff..f8d8999 100644 --- a/drivers/staging/ath6kl/os/linux/ar6000_drv.c +++ b/drivers/staging/ath6kl/os/linux/ar6000_drv.c @@ -416,7 +416,7 @@ ar6000_set_host_app_area(AR_SOFTC_T *ar) address = TARG_VTOP(ar->arTargetType, data); host_app_area.wmi_protocol_ver = WMI_PROTOCOL_VERSION; if (ar6000_WriteDataDiag(ar->arHifDevice, address, - (A_UCHAR *)&host_app_area, + (u8 *)&host_app_area, sizeof(struct host_app_area_s)) != 0) { return A_ERROR; @@ -433,7 +433,7 @@ u32 dbglog_get_debug_hdr_ptr(AR_SOFTC_T *ar) address = TARG_VTOP(ar->arTargetType, HOST_INTEREST_ITEM_ADDRESS(ar, hi_dbglog_hdr)); if ((status = ar6000_ReadDataDiag(ar->arHifDevice, address, - (A_UCHAR *)¶m, 4)) != 0) + (u8 *)¶m, 4)) != 0) { param = 0; } @@ -550,13 +550,13 @@ ar6000_dbglog_get_debug_logs(AR_SOFTC_T *ar) address = TARG_VTOP(ar->arTargetType, debug_hdr_ptr); length = 4 /* sizeof(dbuf) */ + 4 /* sizeof(dropped) */; A_MEMZERO(data, sizeof(data)); - ar6000_ReadDataDiag(ar->arHifDevice, address, (A_UCHAR *)data, length); + ar6000_ReadDataDiag(ar->arHifDevice, address, (u8 *)data, length); address = TARG_VTOP(ar->arTargetType, data[0] /* dbuf */); firstbuf = address; dropped = data[1]; /* dropped */ length = 4 /* sizeof(next) */ + 4 /* sizeof(buffer) */ + 4 /* sizeof(bufsize) */ + 4 /* sizeof(length) */ + 4 /* sizeof(count) */ + 4 /* sizeof(free) */; A_MEMZERO(data, sizeof(data)); - ar6000_ReadDataDiag(ar->arHifDevice, address, (A_UCHAR *)&data, length); + ar6000_ReadDataDiag(ar->arHifDevice, address, (u8 *)&data, length); do { address = TARG_VTOP(ar->arTargetType, data[1] /* buffer*/); @@ -567,7 +567,7 @@ ar6000_dbglog_get_debug_logs(AR_SOFTC_T *ar) ar->log_cnt = 0; } if(0 != ar6000_ReadDataDiag(ar->arHifDevice, address, - (A_UCHAR *)&ar->log_buffer[ar->log_cnt], length)) + (u8 *)&ar->log_buffer[ar->log_cnt], length)) { break; } @@ -582,7 +582,7 @@ ar6000_dbglog_get_debug_logs(AR_SOFTC_T *ar) length = 4 /* sizeof(next) */ + 4 /* sizeof(buffer) */ + 4 /* sizeof(bufsize) */ + 4 /* sizeof(length) */ + 4 /* sizeof(count) */ + 4 /* sizeof(free) */; A_MEMZERO(data, sizeof(data)); if(0 != ar6000_ReadDataDiag(ar->arHifDevice, address, - (A_UCHAR *)&data, length)) + (u8 *)&data, length)) { break; } @@ -816,7 +816,7 @@ ar6000_sysfs_bmi_read(struct file *fp, struct kobject *kobj, if (index == MAX_AR6000) return 0; - if ((BMIRawRead(ar->arHifDevice, (A_UCHAR*)buf, count, true)) != 0) { + if ((BMIRawRead(ar->arHifDevice, (u8*)buf, count, true)) != 0) { return 0; } @@ -843,7 +843,7 @@ ar6000_sysfs_bmi_write(struct file *fp, struct kobject *kobj, if (index == MAX_AR6000) return 0; - if ((BMIRawWrite(ar->arHifDevice, (A_UCHAR*)buf, count)) != 0) { + if ((BMIRawWrite(ar->arHifDevice, (u8*)buf, count)) != 0) { return 0; } @@ -900,7 +900,7 @@ ar6000_sysfs_bmi_deinit(AR_SOFTC_T *ar) #define AR6002_MAC_ADDRESS_OFFSET 0x0A #define AR6003_MAC_ADDRESS_OFFSET 0x16 static -void calculate_crc(u32 TargetType, A_UCHAR *eeprom_data) +void calculate_crc(u32 TargetType, u8 *eeprom_data) { u16 *ptr_crc; u16 *ptr16_eeprom; @@ -916,12 +916,12 @@ void calculate_crc(u32 TargetType, A_UCHAR *eeprom_data) else if (TargetType == TARGET_TYPE_AR6003) { eeprom_size = 1024; - ptr_crc = (u16 *)((A_UCHAR *)eeprom_data + 0x04); + ptr_crc = (u16 *)((u8 *)eeprom_data + 0x04); } else { eeprom_size = 768; - ptr_crc = (u16 *)((A_UCHAR *)eeprom_data + 0x04); + ptr_crc = (u16 *)((u8 *)eeprom_data + 0x04); } @@ -941,17 +941,17 @@ void calculate_crc(u32 TargetType, A_UCHAR *eeprom_data) } static void -ar6000_softmac_update(AR_SOFTC_T *ar, A_UCHAR *eeprom_data, size_t size) +ar6000_softmac_update(AR_SOFTC_T *ar, u8 *eeprom_data, size_t size) { const char *source = "random generated"; const struct firmware *softmac_entry; - A_UCHAR *ptr_mac; + u8 *ptr_mac; switch (ar->arTargetType) { case TARGET_TYPE_AR6002: - ptr_mac = (u8 *)((A_UCHAR *)eeprom_data + AR6002_MAC_ADDRESS_OFFSET); + ptr_mac = (u8 *)((u8 *)eeprom_data + AR6002_MAC_ADDRESS_OFFSET); break; case TARGET_TYPE_AR6003: - ptr_mac = (u8 *)((A_UCHAR *)eeprom_data + AR6003_MAC_ADDRESS_OFFSET); + ptr_mac = (u8 *)((u8 *)eeprom_data + AR6003_MAC_ADDRESS_OFFSET); break; default: AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("Invalid Target Type\n")); @@ -1097,7 +1097,7 @@ ar6000_transfer_bin_file(AR_SOFTC_T *ar, AR6K_BIN_FILE file, u32 address, bool c #ifdef SOFTMAC_FILE_USED if (file==AR6K_BOARD_DATA_FILE && fw_entry->data) { - ar6000_softmac_update(ar, (A_UCHAR *)fw_entry->data, fw_entry->size); + ar6000_softmac_update(ar, (u8 *)fw_entry->data, fw_entry->size); } #endif @@ -1117,14 +1117,14 @@ ar6000_transfer_bin_file(AR_SOFTC_T *ar, AR6K_BIN_FILE file, u32 address, bool c (((ar)->arTargetType == TARGET_TYPE_AR6003) ? AR6003_BOARD_DATA_SZ : 0)); /* Determine where in Target RAM to write Board Data */ - bmifn(BMIReadMemory(ar->arHifDevice, HOST_INTEREST_ITEM_ADDRESS(ar, hi_board_ext_data), (A_UCHAR *)&board_ext_address, 4)); + bmifn(BMIReadMemory(ar->arHifDevice, HOST_INTEREST_ITEM_ADDRESS(ar, hi_board_ext_data), (u8 *)&board_ext_address, 4)); AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("Board extended Data download address: 0x%x\n", board_ext_address)); /* check whether the target has allocated memory for extended board data and file contains extended board data */ if ((board_ext_address) && (fw_entry->size == (board_data_size + board_ext_data_size))) { u32 param; - status = BMIWriteMemory(ar->arHifDevice, board_ext_address, (A_UCHAR *)(fw_entry->data + board_data_size), board_ext_data_size); + status = BMIWriteMemory(ar->arHifDevice, board_ext_address, (u8 *)(fw_entry->data + board_data_size), board_ext_data_size); if (status) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("BMI operation failed: %d\n", __LINE__)); @@ -1134,15 +1134,15 @@ ar6000_transfer_bin_file(AR_SOFTC_T *ar, AR6K_BIN_FILE file, u32 address, bool c /* Record the fact that extended board Data IS initialized */ param = 1; - bmifn(BMIWriteMemory(ar->arHifDevice, HOST_INTEREST_ITEM_ADDRESS(ar, hi_board_ext_data_initialized), (A_UCHAR *)¶m, 4)); + bmifn(BMIWriteMemory(ar->arHifDevice, HOST_INTEREST_ITEM_ADDRESS(ar, hi_board_ext_data_initialized), (u8 *)¶m, 4)); } fw_entry_size = board_data_size; } if (compressed) { - status = BMIFastDownload(ar->arHifDevice, address, (A_UCHAR *)fw_entry->data, fw_entry_size); + status = BMIFastDownload(ar->arHifDevice, address, (u8 *)fw_entry->data, fw_entry_size); } else { - status = BMIWriteMemory(ar->arHifDevice, address, (A_UCHAR *)fw_entry->data, fw_entry_size); + status = BMIWriteMemory(ar->arHifDevice, address, (u8 *)fw_entry->data, fw_entry_size); } if (status) { @@ -1163,13 +1163,13 @@ ar6000_update_bdaddr(AR_SOFTC_T *ar) u32 address; if (BMIReadMemory(ar->arHifDevice, - HOST_INTEREST_ITEM_ADDRESS(ar, hi_board_data), (A_UCHAR *)&address, 4) != 0) + HOST_INTEREST_ITEM_ADDRESS(ar, hi_board_data), (u8 *)&address, 4) != 0) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("BMIReadMemory for hi_board_data failed\n")); return A_ERROR; } - if (BMIReadMemory(ar->arHifDevice, address + BDATA_BDADDR_OFFSET, (A_UCHAR *)ar->bdaddr, 6) != 0) + if (BMIReadMemory(ar->arHifDevice, address + BDATA_BDADDR_OFFSET, (u8 *)ar->bdaddr, 6) != 0) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("BMIReadMemory for BD address failed\n")); return A_ERROR; @@ -1234,7 +1234,7 @@ ar6000_sysfs_bmi_get_config(AR_SOFTC_T *ar, u32 mode) param = 0; if (ar->arTargetType == TARGET_TYPE_AR6002) { - bmifn(BMIReadMemory(ar->arHifDevice, HOST_INTEREST_ITEM_ADDRESS(ar, hi_ext_clk_detected), (A_UCHAR *)¶m, 4)); + bmifn(BMIReadMemory(ar->arHifDevice, HOST_INTEREST_ITEM_ADDRESS(ar, hi_ext_clk_detected), (u8 *)¶m, 4)); } /* LPO_CAL.ENABLE = 1 if no external clk is detected */ @@ -1267,7 +1267,7 @@ ar6000_sysfs_bmi_get_config(AR_SOFTC_T *ar, u32 mode) if (ar->arTargetType == TARGET_TYPE_AR6003) { /* hi_ext_clk_detected = 0 */ param = 0; - bmifn(BMIWriteMemory(ar->arHifDevice, HOST_INTEREST_ITEM_ADDRESS(ar, hi_ext_clk_detected), (A_UCHAR *)¶m, 4)); + bmifn(BMIWriteMemory(ar->arHifDevice, HOST_INTEREST_ITEM_ADDRESS(ar, hi_ext_clk_detected), (u8 *)¶m, 4)); /* CLOCK_CONTROL &= ~LF_CLK32 */ address = RTC_BASE_ADDRESS + CLOCK_CONTROL_ADDRESS; @@ -1280,7 +1280,7 @@ ar6000_sysfs_bmi_get_config(AR_SOFTC_T *ar, u32 mode) /* Transfer Board Data from Target EEPROM to Target RAM */ if (ar->arTargetType == TARGET_TYPE_AR6003) { /* Determine where in Target RAM to write Board Data */ - bmifn(BMIReadMemory(ar->arHifDevice, HOST_INTEREST_ITEM_ADDRESS(ar, hi_board_data), (A_UCHAR *)&address, 4)); + bmifn(BMIReadMemory(ar->arHifDevice, HOST_INTEREST_ITEM_ADDRESS(ar, hi_board_data), (u8 *)&address, 4)); AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("Board Data download address: 0x%x\n", address)); /* Write EEPROM data to Target RAM */ @@ -1290,7 +1290,7 @@ ar6000_sysfs_bmi_get_config(AR_SOFTC_T *ar, u32 mode) /* Record the fact that Board Data IS initialized */ param = 1; - bmifn(BMIWriteMemory(ar->arHifDevice, HOST_INTEREST_ITEM_ADDRESS(ar, hi_board_data_initialized), (A_UCHAR *)¶m, 4)); + bmifn(BMIWriteMemory(ar->arHifDevice, HOST_INTEREST_ITEM_ADDRESS(ar, hi_board_data_initialized), (u8 *)¶m, 4)); /* Transfer One time Programmable data */ AR6K_DATA_DOWNLOAD_ADDRESS(address, ar->arVersion.target_ver); @@ -1325,7 +1325,7 @@ ar6000_sysfs_bmi_get_config(AR_SOFTC_T *ar, u32 mode) } param = address; - bmifn(BMIWriteMemory(ar->arHifDevice, HOST_INTEREST_ITEM_ADDRESS(ar, hi_dset_list_head), (A_UCHAR *)¶m, 4)); + bmifn(BMIWriteMemory(ar->arHifDevice, HOST_INTEREST_ITEM_ADDRESS(ar, hi_dset_list_head), (u8 *)¶m, 4)); if (ar->arTargetType == TARGET_TYPE_AR6003) { if (ar->arVersion.target_ver == AR6003_REV1_VERSION) { @@ -1335,7 +1335,7 @@ ar6000_sysfs_bmi_get_config(AR_SOFTC_T *ar, u32 mode) /* Reserve 6.5K of RAM */ param = 6656; } - bmifn(BMIWriteMemory(ar->arHifDevice, HOST_INTEREST_ITEM_ADDRESS(ar, hi_end_RAM_reserve_sz), (A_UCHAR *)¶m, 4)); + bmifn(BMIWriteMemory(ar->arHifDevice, HOST_INTEREST_ITEM_ADDRESS(ar, hi_end_RAM_reserve_sz), (u8 *)¶m, 4)); } /* Restore system sleep */ @@ -1352,7 +1352,7 @@ ar6000_sysfs_bmi_get_config(AR_SOFTC_T *ar, u32 mode) #define CONFIG_AR600x_DEBUG_UART_TX_PIN 8 #endif param = CONFIG_AR600x_DEBUG_UART_TX_PIN; - bmifn(BMIWriteMemory(ar->arHifDevice, HOST_INTEREST_ITEM_ADDRESS(ar, hi_dbg_uart_txpin), (A_UCHAR *)¶m, 4)); + bmifn(BMIWriteMemory(ar->arHifDevice, HOST_INTEREST_ITEM_ADDRESS(ar, hi_dbg_uart_txpin), (u8 *)¶m, 4)); #if (CONFIG_AR600x_DEBUG_UART_TX_PIN == 23) { @@ -1367,7 +1367,7 @@ ar6000_sysfs_bmi_get_config(AR_SOFTC_T *ar, u32 mode) #ifdef ATH6KL_CONFIG_GPIO_BT_RESET #define CONFIG_AR600x_BT_RESET_PIN 0x16 param = CONFIG_AR600x_BT_RESET_PIN; - bmifn(BMIWriteMemory(ar->arHifDevice, HOST_INTEREST_ITEM_ADDRESS(ar, hi_hci_uart_support_pins), (A_UCHAR *)¶m, 4)); + bmifn(BMIWriteMemory(ar->arHifDevice, HOST_INTEREST_ITEM_ADDRESS(ar, hi_hci_uart_support_pins), (u8 *)¶m, 4)); #endif /* ATH6KL_CONFIG_GPIO_BT_RESET */ /* Configure UART flow control polarity */ @@ -1378,7 +1378,7 @@ ar6000_sysfs_bmi_get_config(AR_SOFTC_T *ar, u32 mode) #if (CONFIG_ATH6KL_BT_UART_FC_POLARITY == 1) if (ar->arVersion.target_ver == AR6003_REV2_VERSION) { param = ((CONFIG_ATH6KL_BT_UART_FC_POLARITY << 1) & 0x2); - bmifn(BMIWriteMemory(ar->arHifDevice, HOST_INTEREST_ITEM_ADDRESS(ar, hi_hci_uart_pwr_mgmt_params), (A_UCHAR *)¶m, 4)); + bmifn(BMIWriteMemory(ar->arHifDevice, HOST_INTEREST_ITEM_ADDRESS(ar, hi_hci_uart_pwr_mgmt_params), (u8 *)¶m, 4)); } #endif /* CONFIG_ATH6KL_BT_UART_FC_POLARITY */ } @@ -1405,7 +1405,7 @@ ar6000_configure_target(AR_SOFTC_T *ar) param = 1; if (BMIWriteMemory(ar->arHifDevice, HOST_INTEREST_ITEM_ADDRESS(ar, hi_serial_enable), - (A_UCHAR *)¶m, + (u8 *)¶m, 4)!= 0) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("BMIWriteMemory for enableuartprint failed \n")); @@ -1418,7 +1418,7 @@ ar6000_configure_target(AR_SOFTC_T *ar) param = HTC_PROTOCOL_VERSION; if (BMIWriteMemory(ar->arHifDevice, HOST_INTEREST_ITEM_ADDRESS(ar, hi_app_host_interest), - (A_UCHAR *)¶m, + (u8 *)¶m, 4)!= 0) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("BMIWriteMemory for htc version failed \n")); @@ -1437,7 +1437,7 @@ ar6000_configure_target(AR_SOFTC_T *ar) if (BMIReadMemory(ar->arHifDevice, HOST_INTEREST_ITEM_ADDRESS(ar, hi_option_flag), - (A_UCHAR *)¶m, + (u8 *)¶m, 4)!= 0) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("BMIReadMemory for enabletimerwar failed \n")); @@ -1448,7 +1448,7 @@ ar6000_configure_target(AR_SOFTC_T *ar) if (BMIWriteMemory(ar->arHifDevice, HOST_INTEREST_ITEM_ADDRESS(ar, hi_option_flag), - (A_UCHAR *)¶m, + (u8 *)¶m, 4) != 0) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("BMIWriteMemory for enabletimerwar failed \n")); @@ -1463,7 +1463,7 @@ ar6000_configure_target(AR_SOFTC_T *ar) if (BMIReadMemory(ar->arHifDevice, HOST_INTEREST_ITEM_ADDRESS(ar, hi_option_flag), - (A_UCHAR *)¶m, + (u8 *)¶m, 4)!= 0) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("BMIReadMemory for setting fwmode failed \n")); @@ -1474,7 +1474,7 @@ ar6000_configure_target(AR_SOFTC_T *ar) if (BMIWriteMemory(ar->arHifDevice, HOST_INTEREST_ITEM_ADDRESS(ar, hi_option_flag), - (A_UCHAR *)¶m, + (u8 *)¶m, 4) != 0) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("BMIWriteMemory for setting fwmode failed \n")); @@ -1489,7 +1489,7 @@ ar6000_configure_target(AR_SOFTC_T *ar) if (BMIReadMemory(ar->arHifDevice, HOST_INTEREST_ITEM_ADDRESS(ar, hi_option_flag), - (A_UCHAR *)¶m, + (u8 *)¶m, 4)!= 0) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("BMIReadMemory for disabling debug logs failed\n")); @@ -1500,7 +1500,7 @@ ar6000_configure_target(AR_SOFTC_T *ar) if (BMIWriteMemory(ar->arHifDevice, HOST_INTEREST_ITEM_ADDRESS(ar, hi_option_flag), - (A_UCHAR *)¶m, + (u8 *)¶m, 4) != 0) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("BMIWriteMemory for HI_OPTION_DISABLE_DBGLOG\n")); @@ -1522,7 +1522,7 @@ ar6000_configure_target(AR_SOFTC_T *ar) param = AR6003_BOARD_EXT_DATA_ADDRESS; if (BMIWriteMemory(ar->arHifDevice, HOST_INTEREST_ITEM_ADDRESS(ar, hi_board_ext_data), - (A_UCHAR *)¶m, + (u8 *)¶m, 4) != 0) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("BMIWriteMemory for hi_board_ext_data failed \n")); diff --git a/drivers/staging/ath6kl/os/linux/eeprom.c b/drivers/staging/ath6kl/os/linux/eeprom.c index 7d7a63d..7d049df 100644 --- a/drivers/staging/ath6kl/os/linux/eeprom.c +++ b/drivers/staging/ath6kl/os/linux/eeprom.c @@ -53,7 +53,7 @@ char *p_mac = NULL; // static variables // -static A_UCHAR eeprom_data[EEPROM_SZ]; +static u8 eeprom_data[EEPROM_SZ]; static u32 sys_sleep_reg; static HIF_DEVICE *p_bmi_device; @@ -143,14 +143,14 @@ BMI_write_reg(u32 address, u32 value) inline void BMI_read_mem(u32 address, u32 *pvalue) { - BMIReadMemory(p_bmi_device, address, (A_UCHAR*)(pvalue), 4); + BMIReadMemory(p_bmi_device, address, (u8*)(pvalue), 4); } /* Write a word to a Target memory. */ inline void BMI_write_mem(u32 address, u8 *p_data, u32 sz) { - BMIWriteMemory(p_bmi_device, address, (A_UCHAR*)(p_data), sz); + BMIWriteMemory(p_bmi_device, address, (u8*)(p_data), sz); } /* diff --git a/drivers/staging/ath6kl/os/linux/include/ar6000_drv.h b/drivers/staging/ath6kl/os/linux/include/ar6000_drv.h index f3b7344..0beba09 100644 --- a/drivers/staging/ath6kl/os/linux/include/ar6000_drv.h +++ b/drivers/staging/ath6kl/os/linux/include/ar6000_drv.h @@ -553,7 +553,7 @@ typedef struct ar6_softc { COMMON_CREDIT_STATE_INFO arCreditStateInfo; bool arWMIControlEpFull; bool dbgLogFetchInProgress; - A_UCHAR log_buffer[DBGLOG_HOST_LOG_BUFFER_SIZE]; + u8 log_buffer[DBGLOG_HOST_LOG_BUFFER_SIZE]; u32 log_cnt; u32 dbglog_init_done; u32 arConnectCtrlFlags; diff --git a/drivers/staging/ath6kl/os/linux/include/athtypes_linux.h b/drivers/staging/ath6kl/os/linux/include/athtypes_linux.h index 32bd29b..8cb5632 100644 --- a/drivers/staging/ath6kl/os/linux/include/athtypes_linux.h +++ b/drivers/staging/ath6kl/os/linux/include/athtypes_linux.h @@ -45,7 +45,6 @@ typedef u_int32_t A_UINT32; typedef u_int64_t A_UINT64; typedef char A_CHAR; -typedef unsigned char A_UCHAR; typedef unsigned long A_ATH_TIMER; diff --git a/drivers/staging/ath6kl/os/linux/ioctl.c b/drivers/staging/ath6kl/os/linux/ioctl.c index a95b743..1824475 100644 --- a/drivers/staging/ath6kl/os/linux/ioctl.c +++ b/drivers/staging/ath6kl/os/linux/ioctl.c @@ -702,8 +702,8 @@ ar6000_ioctl_tcmd_get_rx_report(struct net_device *dev, buf[1] = ar->tcmdRxRssi; buf[2] = ar->tcmdRxcrcErrPkt; buf[3] = ar->tcmdRxsecErrPkt; - memcpy(((A_UCHAR *)buf)+(4*sizeof(u32)), ar->tcmdRateCnt, sizeof(ar->tcmdRateCnt)); - memcpy(((A_UCHAR *)buf)+(4*sizeof(u32))+(TCMD_MAX_RATES *sizeof(u16)), ar->tcmdRateCntShortGuard, sizeof(ar->tcmdRateCntShortGuard)); + memcpy(((u8 *)buf)+(4*sizeof(u32)), ar->tcmdRateCnt, sizeof(ar->tcmdRateCnt)); + memcpy(((u8 *)buf)+(4*sizeof(u32))+(TCMD_MAX_RATES *sizeof(u16)), ar->tcmdRateCntShortGuard, sizeof(ar->tcmdRateCntShortGuard)); if (!ret && copy_to_user(rq->ifr_data, buf, sizeof(buf))) { ret = -EFAULT; diff --git a/drivers/staging/ath6kl/wlan/src/wlan_node.c b/drivers/staging/ath6kl/wlan/src/wlan_node.c index 0edf9c1..83c4dc3 100644 --- a/drivers/staging/ath6kl/wlan/src/wlan_node.c +++ b/drivers/staging/ath6kl/wlan/src/wlan_node.c @@ -432,11 +432,11 @@ wlan_node_table_cleanup(struct ieee80211_node_table *nt) } bss_t * -wlan_find_Ssidnode (struct ieee80211_node_table *nt, A_UCHAR *pSsid, +wlan_find_Ssidnode (struct ieee80211_node_table *nt, u8 *pSsid, u32 ssidLength, bool bIsWPA2, bool bMatchSSID) { bss_t *ni = NULL; - A_UCHAR *pIESsid = NULL; + u8 *pIESsid = NULL; IEEE80211_NODE_LOCK (nt); @@ -554,13 +554,13 @@ wlan_node_remove(struct ieee80211_node_table *nt, u8 *bssid) } bss_t * -wlan_find_matching_Ssidnode (struct ieee80211_node_table *nt, A_UCHAR *pSsid, +wlan_find_matching_Ssidnode (struct ieee80211_node_table *nt, u8 *pSsid, u32 ssidLength, u32 dot11AuthMode, u32 authMode, u32 pairwiseCryptoType, u32 grpwiseCryptoTyp) { bss_t *ni = NULL; bss_t *best_ni = NULL; - A_UCHAR *pIESsid = NULL; + u8 *pIESsid = NULL; IEEE80211_NODE_LOCK (nt); diff --git a/drivers/staging/ath6kl/wmi/wmi.c b/drivers/staging/ath6kl/wmi/wmi.c index bf9dd0b..80ba629 100644 --- a/drivers/staging/ath6kl/wmi/wmi.c +++ b/drivers/staging/ath6kl/wmi/wmi.c @@ -1421,8 +1421,8 @@ wmi_bssInfo_event_rx(struct wmi_t *wmip, u8 *datap, int len) WMI_BSS_INFO_HDR *bih; u8 *buf; u32 nodeCachingAllowed = 1; - A_UCHAR cached_ssid_len = 0; - A_UCHAR cached_ssid_buf[IEEE80211_NWID_LEN] = {0}; + u8 cached_ssid_len = 0; + u8 cached_ssid_buf[IEEE80211_NWID_LEN] = {0}; u8 beacon_ssid_len = 0; if (len <= sizeof(WMI_BSS_INFO_HDR)) { @@ -1477,7 +1477,7 @@ wmi_bssInfo_event_rx(struct wmi_t *wmip, u8 *datap, int len) * so cache the probe-resp-ssid if already present. */ if ((true == is_probe_ssid) && (BEACON_FTYPE == bih->frameType)) { - A_UCHAR *ie_ssid; + u8 *ie_ssid; ie_ssid = bss->ni_cie.ie_ssid; if(ie_ssid && (ie_ssid[1] <= IEEE80211_NWID_LEN) && (ie_ssid[2] != 0)) @@ -2420,7 +2420,7 @@ wmi_connect_cmd(struct wmi_t *wmip, NETWORK_TYPE netType, DOT11_AUTH_MODE dot11AuthMode, AUTH_MODE authMode, CRYPTO_TYPE pairwiseCrypto, u8 pairwiseCryptoLen, CRYPTO_TYPE groupCrypto, u8 groupCryptoLen, - int ssidLength, A_UCHAR *ssid, + int ssidLength, u8 *ssid, u8 *bssid, u16 channel, u32 ctrl_flags) { void *osbuf; @@ -2616,7 +2616,7 @@ wmi_bssfilter_cmd(struct wmi_t *wmip, u8 filter, u32 ieMask) int wmi_probedSsid_cmd(struct wmi_t *wmip, u8 index, u8 flag, - u8 ssidLength, A_UCHAR *ssid) + u8 ssidLength, u8 *ssid) { void *osbuf; WMI_PROBED_SSID_CMD *cmd; @@ -4844,7 +4844,7 @@ wmi_set_wmm_txop(struct wmi_t *wmip, WMI_TXOP_CFG cfg) } int -wmi_set_country(struct wmi_t *wmip, A_UCHAR *countryCode) +wmi_set_country(struct wmi_t *wmip, u8 *countryCode) { void *osbuf; WMI_AP_SET_COUNTRY_CMD *cmd; @@ -5374,7 +5374,7 @@ wmi_set_nodeage(struct wmi_t *wmip, u32 nodeAge) } bss_t * -wmi_find_Ssidnode (struct wmi_t *wmip, A_UCHAR *pSsid, +wmi_find_Ssidnode (struct wmi_t *wmip, u8 *pSsid, u32 ssidLength, bool bIsWPA2, bool bMatchSSID) { bss_t *node = NULL; @@ -6652,7 +6652,7 @@ wmi_SGI_cmd(struct wmi_t *wmip, u32 sgiMask, u8 sgiPERThreshold) } bss_t * -wmi_find_matching_Ssidnode (struct wmi_t *wmip, A_UCHAR *pSsid, +wmi_find_matching_Ssidnode (struct wmi_t *wmip, u8 *pSsid, u32 ssidLength, u32 dot11AuthMode, u32 authMode, u32 pairwiseCryptoType, u32 grpwiseCryptoTyp) -- 1.7.4.15.g7811d From 8ae879c8df500f66719f991bea7523c51eac2065 Mon Sep 17 00:00:00 2001 From: Luis R. Rodriguez Date: Mon, 28 Feb 2011 08:19:25 -0800 Subject: [PATCH 05/58] ath6kl: remove-typedef AGGR_INFO remove-typedef -s AGGR_INFO \ "struct aggr_info" drivers/staging/ath6kl/ Cc: Naveen Singh Signed-off-by: Luis R. Rodriguez --- drivers/staging/ath6kl/reorder/aggr_rx_internal.h | 4 +- drivers/staging/ath6kl/reorder/rcv_aggr.c | 42 ++++++++++---------- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/drivers/staging/ath6kl/reorder/aggr_rx_internal.h b/drivers/staging/ath6kl/reorder/aggr_rx_internal.h index 523a239..20c894d 100644 --- a/drivers/staging/ath6kl/reorder/aggr_rx_internal.h +++ b/drivers/staging/ath6kl/reorder/aggr_rx_internal.h @@ -100,7 +100,7 @@ typedef struct { u32 num_bar; /* num of resets of seq_num, via BAR */ }RXTID_STATS; -typedef struct { +struct aggr_info { u8 aggr_sz; /* config value of aggregation size */ u8 timerScheduled; A_TIMER timer; /* timer for returning held up pkts in re-order que */ @@ -111,6 +111,6 @@ typedef struct { A_NETBUF_QUEUE_T freeQ; /* pre-allocated buffers - for A_MSDU slicing */ RXTID_STATS stat[NUM_OF_TIDS]; /* Tid based statistics */ PACKET_LOG pkt_log; /* Log info of the packets */ -}AGGR_INFO; +}; #endif /* __AGGR_RX_INTERNAL_H__ */ diff --git a/drivers/staging/ath6kl/reorder/rcv_aggr.c b/drivers/staging/ath6kl/reorder/rcv_aggr.c index adb85eb..8beb00d 100644 --- a/drivers/staging/ath6kl/reorder/rcv_aggr.c +++ b/drivers/staging/ath6kl/reorder/rcv_aggr.c @@ -37,24 +37,24 @@ extern int wmi_dot3_2_dix(void *osbuf); static void -aggr_slice_amsdu(AGGR_INFO *p_aggr, RXTID *rxtid, void **osbuf); +aggr_slice_amsdu(struct aggr_info *p_aggr, RXTID *rxtid, void **osbuf); static void aggr_timeout(A_ATH_TIMER arg); static void -aggr_deque_frms(AGGR_INFO *p_aggr, u8 tid, u16 seq_no, u8 order); +aggr_deque_frms(struct aggr_info *p_aggr, u8 tid, u16 seq_no, u8 order); static void -aggr_dispatch_frames(AGGR_INFO *p_aggr, A_NETBUF_QUEUE_T *q); +aggr_dispatch_frames(struct aggr_info *p_aggr, A_NETBUF_QUEUE_T *q); static void * -aggr_get_osbuf(AGGR_INFO *p_aggr); +aggr_get_osbuf(struct aggr_info *p_aggr); void * aggr_init(ALLOC_NETBUFS netbuf_allocator) { - AGGR_INFO *p_aggr = NULL; + struct aggr_info *p_aggr = NULL; RXTID *rxtid; u8 i; int status = 0; @@ -62,7 +62,7 @@ aggr_init(ALLOC_NETBUFS netbuf_allocator) A_PRINTF("In aggr_init..\n"); do { - p_aggr = A_MALLOC(sizeof(AGGR_INFO)); + p_aggr = A_MALLOC(sizeof(struct aggr_info)); if(!p_aggr) { A_PRINTF("Failed to allocate memory for aggr_node\n"); status = A_ERROR; @@ -70,7 +70,7 @@ aggr_init(ALLOC_NETBUFS netbuf_allocator) } /* Init timer and data structures */ - A_MEMZERO(p_aggr, sizeof(AGGR_INFO)); + A_MEMZERO(p_aggr, sizeof(struct aggr_info)); p_aggr->aggr_sz = AGGR_SZ_DEFAULT; A_INIT_TIMER(&p_aggr->timer, aggr_timeout, p_aggr); p_aggr->timerScheduled = false; @@ -101,7 +101,7 @@ aggr_init(ALLOC_NETBUFS netbuf_allocator) /* utility function to clear rx hold_q for a tid */ static void -aggr_delete_tid_state(AGGR_INFO *p_aggr, u8 tid) +aggr_delete_tid_state(struct aggr_info *p_aggr, u8 tid) { RXTID *rxtid; RXTID_STATS *stats; @@ -133,7 +133,7 @@ aggr_delete_tid_state(AGGR_INFO *p_aggr, u8 tid) void aggr_module_destroy(void *cntxt) { - AGGR_INFO *p_aggr = (AGGR_INFO *)cntxt; + struct aggr_info *p_aggr = (struct aggr_info *)cntxt; RXTID *rxtid; u8 i, k; A_PRINTF("%s(): aggr = %p\n",_A_FUNCNAME_, p_aggr); @@ -177,7 +177,7 @@ aggr_module_destroy(void *cntxt) void aggr_register_rx_dispatcher(void *cntxt, void * dev, RX_CALLBACK fn) { - AGGR_INFO *p_aggr = (AGGR_INFO *)cntxt; + struct aggr_info *p_aggr = (struct aggr_info *)cntxt; A_ASSERT(p_aggr && fn && dev); @@ -189,7 +189,7 @@ aggr_register_rx_dispatcher(void *cntxt, void * dev, RX_CALLBACK fn) void aggr_process_bar(void *cntxt, u8 tid, u16 seq_no) { - AGGR_INFO *p_aggr = (AGGR_INFO *)cntxt; + struct aggr_info *p_aggr = (struct aggr_info *)cntxt; RXTID_STATS *stats; A_ASSERT(p_aggr); @@ -203,7 +203,7 @@ aggr_process_bar(void *cntxt, u8 tid, u16 seq_no) void aggr_recv_addba_req_evt(void *cntxt, u8 tid, u16 seq_no, u8 win_sz) { - AGGR_INFO *p_aggr = (AGGR_INFO *)cntxt; + struct aggr_info *p_aggr = (struct aggr_info *)cntxt; RXTID *rxtid; RXTID_STATS *stats; @@ -255,7 +255,7 @@ aggr_recv_addba_req_evt(void *cntxt, u8 tid, u16 seq_no, u8 win_sz) void aggr_recv_delba_req_evt(void *cntxt, u8 tid) { - AGGR_INFO *p_aggr = (AGGR_INFO *)cntxt; + struct aggr_info *p_aggr = (struct aggr_info *)cntxt; RXTID *rxtid; A_ASSERT(p_aggr); @@ -269,7 +269,7 @@ aggr_recv_delba_req_evt(void *cntxt, u8 tid) } static void -aggr_deque_frms(AGGR_INFO *p_aggr, u8 tid, u16 seq_no, u8 order) +aggr_deque_frms(struct aggr_info *p_aggr, u8 tid, u16 seq_no, u8 order) { RXTID *rxtid; OSBUF_HOLD_Q *node; @@ -334,7 +334,7 @@ aggr_deque_frms(AGGR_INFO *p_aggr, u8 tid, u16 seq_no, u8 order) } static void * -aggr_get_osbuf(AGGR_INFO *p_aggr) +aggr_get_osbuf(struct aggr_info *p_aggr) { void *buf = NULL; @@ -356,7 +356,7 @@ aggr_get_osbuf(AGGR_INFO *p_aggr) static void -aggr_slice_amsdu(AGGR_INFO *p_aggr, RXTID *rxtid, void **osbuf) +aggr_slice_amsdu(struct aggr_info *p_aggr, RXTID *rxtid, void **osbuf) { void *new_buf; u16 frame_8023_len, payload_8023_len, mac_hdr_len, amsdu_len; @@ -428,7 +428,7 @@ aggr_slice_amsdu(AGGR_INFO *p_aggr, RXTID *rxtid, void **osbuf) void aggr_process_recv_frm(void *cntxt, u8 tid, u16 seq_no, bool is_amsdu, void **osbuf) { - AGGR_INFO *p_aggr = (AGGR_INFO *)cntxt; + struct aggr_info *p_aggr = (struct aggr_info *)cntxt; RXTID *rxtid; RXTID_STATS *stats; u16 idx, st, cur, end; @@ -562,7 +562,7 @@ void aggr_reset_state(void *cntxt) { u8 tid; - AGGR_INFO *p_aggr = (AGGR_INFO *)cntxt; + struct aggr_info *p_aggr = (struct aggr_info *)cntxt; A_ASSERT(p_aggr); @@ -576,7 +576,7 @@ static void aggr_timeout(A_ATH_TIMER arg) { u8 i,j; - AGGR_INFO *p_aggr = (AGGR_INFO *)arg; + struct aggr_info *p_aggr = (struct aggr_info *)arg; RXTID *rxtid; RXTID_STATS *stats; /* @@ -630,7 +630,7 @@ aggr_timeout(A_ATH_TIMER arg) } static void -aggr_dispatch_frames(AGGR_INFO *p_aggr, A_NETBUF_QUEUE_T *q) +aggr_dispatch_frames(struct aggr_info *p_aggr, A_NETBUF_QUEUE_T *q) { void *osbuf; @@ -642,7 +642,7 @@ aggr_dispatch_frames(AGGR_INFO *p_aggr, A_NETBUF_QUEUE_T *q) void aggr_dump_stats(void *cntxt, PACKET_LOG **log_buf) { - AGGR_INFO *p_aggr = (AGGR_INFO *)cntxt; + struct aggr_info *p_aggr = (struct aggr_info *)cntxt; RXTID *rxtid; RXTID_STATS *stats; u8 i; -- 1.7.4.15.g7811d From b4add9c1bd94e2cbc6108470f918b9fee6a2fe5f Mon Sep 17 00:00:00 2001 From: Luis R. Rodriguez Date: Mon, 28 Feb 2011 08:21:50 -0800 Subject: [PATCH 06/58] ath6kl: remove-typedef AR3K_CONFIG_INFO remove-typedef -s AR3K_CONFIG_INFO \ "struct ar3k_config_info" drivers/staging/ath6kl/ Cc: Naveen Singh Signed-off-by: Luis R. Rodriguez --- drivers/staging/ath6kl/include/ar3kconfig.h | 6 ++-- drivers/staging/ath6kl/miscdrv/ar3kconfig.c | 20 +++++++++--------- .../staging/ath6kl/miscdrv/ar3kps/ar3kpsconfig.c | 22 ++++++++++---------- .../staging/ath6kl/miscdrv/ar3kps/ar3kpsconfig.h | 4 +- drivers/staging/ath6kl/os/linux/ar6000_drv.c | 2 +- drivers/staging/ath6kl/os/linux/hci_bridge.c | 6 ++-- 6 files changed, 30 insertions(+), 30 deletions(-) diff --git a/drivers/staging/ath6kl/include/ar3kconfig.h b/drivers/staging/ath6kl/include/ar3kconfig.h index 4d73201..20d295b 100644 --- a/drivers/staging/ath6kl/include/ar3kconfig.h +++ b/drivers/staging/ath6kl/include/ar3kconfig.h @@ -38,7 +38,7 @@ extern "C" { #define AR3K_CONFIG_FLAG_SET_AR6K_SCALE_STEP (1 << 3) -typedef struct { +struct ar3k_config_info { u32 Flags; /* config flags */ void *pHCIDev; /* HCI bridge device */ HCI_TRANSPORT_PROPERTIES *pHCIProps; /* HCI bridge props */ @@ -52,9 +52,9 @@ typedef struct { u16 IdleTimeout; /* TLPM idle timeout */ u16 WakeupTimeout; /* TLPM wakeup timeout */ u8 bdaddr[6]; /* Bluetooth device address */ -} AR3K_CONFIG_INFO; +}; -int AR3KConfigure(AR3K_CONFIG_INFO *pConfigInfo); +int AR3KConfigure(struct ar3k_config_info *pConfigInfo); int AR3KConfigureExit(void *config); diff --git a/drivers/staging/ath6kl/miscdrv/ar3kconfig.c b/drivers/staging/ath6kl/miscdrv/ar3kconfig.c index 005b3ba..3e9c95e 100644 --- a/drivers/staging/ath6kl/miscdrv/ar3kconfig.c +++ b/drivers/staging/ath6kl/miscdrv/ar3kconfig.c @@ -47,9 +47,9 @@ #define HCI_MAX_EVT_RECV_LENGTH 257 #define EXIT_MIN_BOOT_COMMAND_STATUS_OFFSET 5 -int AthPSInitialize(AR3K_CONFIG_INFO *hdev); +int AthPSInitialize(struct ar3k_config_info *hdev); -static int SendHCICommand(AR3K_CONFIG_INFO *pConfig, +static int SendHCICommand(struct ar3k_config_info *pConfig, u8 *pBuffer, int Length) { @@ -84,7 +84,7 @@ static int SendHCICommand(AR3K_CONFIG_INFO *pConfig, return status; } -static int RecvHCIEvent(AR3K_CONFIG_INFO *pConfig, +static int RecvHCIEvent(struct ar3k_config_info *pConfig, u8 *pBuffer, int *pLength) { @@ -122,7 +122,7 @@ static int RecvHCIEvent(AR3K_CONFIG_INFO *pConfig, return status; } -int SendHCICommandWaitCommandComplete(AR3K_CONFIG_INFO *pConfig, +int SendHCICommandWaitCommandComplete(struct ar3k_config_info *pConfig, u8 *pHCICommand, int CmdLength, u8 **ppEventBuffer, @@ -209,7 +209,7 @@ int SendHCICommandWaitCommandComplete(AR3K_CONFIG_INFO *pConfig, return status; } -static int AR3KConfigureHCIBaud(AR3K_CONFIG_INFO *pConfig) +static int AR3KConfigureHCIBaud(struct ar3k_config_info *pConfig) { int status = 0; u8 hciBaudChangeCommand[] = {0x0c,0xfc,0x2,0,0}; @@ -274,7 +274,7 @@ static int AR3KConfigureHCIBaud(AR3K_CONFIG_INFO *pConfig) return status; } -static int AR3KExitMinBoot(AR3K_CONFIG_INFO *pConfig) +static int AR3KExitMinBoot(struct ar3k_config_info *pConfig) { int status; char exitMinBootCmd[] = {0x25,0xFC,0x0c,0x03,0x00,0x00,0x00,0x00,0x00,0x00, @@ -310,7 +310,7 @@ static int AR3KExitMinBoot(AR3K_CONFIG_INFO *pConfig) return status; } -static int AR3KConfigureSendHCIReset(AR3K_CONFIG_INFO *pConfig) +static int AR3KConfigureSendHCIReset(struct ar3k_config_info *pConfig) { int status = 0; u8 hciResetCommand[] = {0x03,0x0c,0x0}; @@ -334,7 +334,7 @@ static int AR3KConfigureSendHCIReset(AR3K_CONFIG_INFO *pConfig) return status; } -static int AR3KEnableTLPM(AR3K_CONFIG_INFO *pConfig) +static int AR3KEnableTLPM(struct ar3k_config_info *pConfig) { int status; /* AR3K vendor specific command for Host Wakeup Config */ @@ -453,7 +453,7 @@ static int AR3KEnableTLPM(AR3K_CONFIG_INFO *pConfig) return status; } -int AR3KConfigure(AR3K_CONFIG_INFO *pConfig) +int AR3KConfigure(struct ar3k_config_info *pConfig) { int status = 0; @@ -524,7 +524,7 @@ int AR3KConfigure(AR3K_CONFIG_INFO *pConfig) int AR3KConfigureExit(void *config) { int status = 0; - AR3K_CONFIG_INFO *pConfig = (AR3K_CONFIG_INFO *)config; + struct ar3k_config_info *pConfig = (struct ar3k_config_info *)config; AR_DEBUG_PRINTF(ATH_DEBUG_INFO,("AR3K Config: Cleaning up AR3K ...\n")); diff --git a/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsconfig.c b/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsconfig.c index 3dce6f5..3436cbd 100644 --- a/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsconfig.c +++ b/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsconfig.c @@ -43,10 +43,10 @@ typedef struct { PSCmdPacket *HciCmdList; u32 num_packets; - AR3K_CONFIG_INFO *dev; + struct ar3k_config_info *dev; }HciCommandListParam; -int SendHCICommandWaitCommandComplete(AR3K_CONFIG_INFO *pConfig, +int SendHCICommandWaitCommandComplete(struct ar3k_config_info *pConfig, u8 *pHCICommand, int CmdLength, u8 **ppEventBuffer, @@ -56,8 +56,8 @@ u32 Rom_Version; u32 Build_Version; extern bool BDADDR; -int getDeviceType(AR3K_CONFIG_INFO *pConfig, u32 *code); -int ReadVersionInfo(AR3K_CONFIG_INFO *pConfig); +int getDeviceType(struct ar3k_config_info *pConfig, u32 *code); +int ReadVersionInfo(struct ar3k_config_info *pConfig); #ifndef HCI_TRANSPORT_SDIO DECLARE_WAIT_QUEUE_HEAD(PsCompleteEvent); @@ -70,7 +70,7 @@ int PSHciWritepacket(struct hci_dev*,u8* Data, u32 len); extern char *bdaddr; #endif /* HCI_TRANSPORT_SDIO */ -int write_bdaddr(AR3K_CONFIG_INFO *pConfig,u8 *bdaddr,int type); +int write_bdaddr(struct ar3k_config_info *pConfig,u8 *bdaddr,int type); int PSSendOps(void *arg); @@ -91,7 +91,7 @@ void Hci_log(u8 * log_string,u8 *data,u32 len) -int AthPSInitialize(AR3K_CONFIG_INFO *hdev) +int AthPSInitialize(struct ar3k_config_info *hdev) { int status = 0; if(hdev == NULL) { @@ -147,7 +147,7 @@ int PSSendOps(void *arg) u8 *path = NULL; u8 *config_path = NULL; u8 config_bdaddr[MAX_BDADDR_FORMAT_LENGTH]; - AR3K_CONFIG_INFO *hdev = (AR3K_CONFIG_INFO*)arg; + struct ar3k_config_info *hdev = (struct ar3k_config_info*)arg; struct device *firmwareDev = NULL; status = 0; HciCmdList = NULL; @@ -389,7 +389,7 @@ complete: * with a HCI Command Complete event. * For HCI SDIO transport, this will be internally defined. */ -int SendHCICommandWaitCommandComplete(AR3K_CONFIG_INFO *pConfig, +int SendHCICommandWaitCommandComplete(struct ar3k_config_info *pConfig, u8 *pHCICommand, int CmdLength, u8 **ppEventBuffer, @@ -481,7 +481,7 @@ int str2ba(unsigned char *str_bdaddr,unsigned char *bdaddr) return 0; } -int write_bdaddr(AR3K_CONFIG_INFO *pConfig,u8 *bdaddr,int type) +int write_bdaddr(struct ar3k_config_info *pConfig,u8 *bdaddr,int type) { u8 bdaddr_cmd[] = { 0x0B, 0xFC, 0x0A, 0x01, 0x01, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; @@ -516,7 +516,7 @@ int write_bdaddr(AR3K_CONFIG_INFO *pConfig,u8 *bdaddr,int type) return result; } -int ReadVersionInfo(AR3K_CONFIG_INFO *pConfig) +int ReadVersionInfo(struct ar3k_config_info *pConfig) { u8 hciCommand[] = {0x1E,0xfc,0x00}; u8 *event; @@ -531,7 +531,7 @@ int ReadVersionInfo(AR3K_CONFIG_INFO *pConfig) } return result; } -int getDeviceType(AR3K_CONFIG_INFO *pConfig, u32 *code) +int getDeviceType(struct ar3k_config_info *pConfig, u32 *code) { u8 hciCommand[] = {0x05,0xfc,0x05,0x00,0x00,0x00,0x00,0x04}; u8 *event; diff --git a/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsconfig.h b/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsconfig.h index b97d91f..d443513 100644 --- a/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsconfig.h +++ b/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsconfig.h @@ -64,12 +64,12 @@ #ifndef HCI_TRANSPORT_SDIO -#define AR3K_CONFIG_INFO struct hci_dev +#define struct ar3k_config_info struct hci_dev extern wait_queue_head_t HciEvent; extern wait_queue_t Eventwait; extern u8 *HciEventpacket; #endif /* #ifndef HCI_TRANSPORT_SDIO */ -int AthPSInitialize(AR3K_CONFIG_INFO *hdev); +int AthPSInitialize(struct ar3k_config_info *hdev); int ReadPSEvent(u8* Data); #endif /* __AR3KPSCONFIG_H */ diff --git a/drivers/staging/ath6kl/os/linux/ar6000_drv.c b/drivers/staging/ath6kl/os/linux/ar6000_drv.c index f8d8999..3397995 100644 --- a/drivers/staging/ath6kl/os/linux/ar6000_drv.c +++ b/drivers/staging/ath6kl/os/linux/ar6000_drv.c @@ -2011,7 +2011,7 @@ ar6000_stop_endpoint(struct net_device *dev, bool keepprofile, bool getdbglogs) #else // FIXME: workaround to reset BT's UART baud rate to default if (NULL != ar->exitCallback) { - AR3K_CONFIG_INFO ar3kconfig; + struct ar3k_config_info ar3kconfig; int status; A_MEMZERO(&ar3kconfig,sizeof(ar3kconfig)); diff --git a/drivers/staging/ath6kl/os/linux/hci_bridge.c b/drivers/staging/ath6kl/os/linux/hci_bridge.c index db38bbf..ee52d11 100644 --- a/drivers/staging/ath6kl/os/linux/hci_bridge.c +++ b/drivers/staging/ath6kl/os/linux/hci_bridge.c @@ -100,7 +100,7 @@ typedef struct { #define HCI_GET_OP_CODE(p) (((u16)((p)[1])) << 8) | ((u16)((p)[0])) extern unsigned int setupbtdev; -AR3K_CONFIG_INFO ar3kconfig; +struct ar3k_config_info ar3kconfig; #ifdef EXPORT_HCI_BRIDGE_INTERFACE AR6K_HCI_BRIDGE_INFO *g_pHcidevInfo; @@ -222,7 +222,7 @@ static int ar6000_hci_transport_ready(HCI_TRANSPORT_HANDLE HCIHandle, AR6K_HCI_BRIDGE_INFO *pHcidevInfo = (AR6K_HCI_BRIDGE_INFO *)pContext; int status; u32 address, hci_uart_pwr_mgmt_params; -// AR3K_CONFIG_INFO ar3kconfig; +// struct ar3k_config_info ar3kconfig; pHcidevInfo->pHCIDev = HCIHandle; @@ -667,7 +667,7 @@ int hci_test_send(AR_SOFTC_T *ar, struct sk_buff *skb) void ar6000_set_default_ar3kconfig(AR_SOFTC_T *ar, void *ar3kconfig) { AR6K_HCI_BRIDGE_INFO *pHcidevInfo = (AR6K_HCI_BRIDGE_INFO *)ar->hcidev_info; - AR3K_CONFIG_INFO *config = (AR3K_CONFIG_INFO *)ar3kconfig; + struct ar3k_config_info *config = (struct ar3k_config_info *)ar3kconfig; config->pHCIDev = pHcidevInfo->pHCIDev; config->pHCIProps = &pHcidevInfo->HCIProps; -- 1.7.4.15.g7811d From 8cbb8fb5f205165dde6019e4bf2f261470b42c6a Mon Sep 17 00:00:00 2001 From: Luis R. Rodriguez Date: Mon, 28 Feb 2011 08:25:49 -0800 Subject: [PATCH 07/58] ath6kl: remove-typedef AR6000_USER_SETKEYS_INFO remove-typedef -s AR6000_USER_SETKEYS_INFO \ "struct ar6000_user_setkeys_info" drivers/staging/ath6kl/ Cc: Naveen Singh Signed-off-by: Luis R. Rodriguez --- .../staging/ath6kl/os/linux/include/athdrv_linux.h | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/staging/ath6kl/os/linux/include/athdrv_linux.h b/drivers/staging/ath6kl/os/linux/include/athdrv_linux.h index 5a6c27e..66817c2 100644 --- a/drivers/staging/ath6kl/os/linux/include/athdrv_linux.h +++ b/drivers/staging/ath6kl/os/linux/include/athdrv_linux.h @@ -625,7 +625,7 @@ typedef enum { * arguments: * UINT32 cmd (AR6000_XIOCTL_USER_SETKEYS) * UINT32 keyOpCtrl - * uses AR6000_USER_SETKEYS_INFO + * uses struct ar6000_user_setkeys_info */ #define AR6000_XIOCTL_USER_SETKEYS 58 #endif /* USER_KEYS */ @@ -1098,10 +1098,9 @@ typedef struct targetStats_cmd_t { #define AR6000_XIOCTL_USER_SETKEYS_RSC_CTRL 1 #define AR6000_USER_SETKEYS_RSC_UNCHANGED 0x00000002 -typedef struct { +struct ar6000_user_setkeys_info { u32 keyOpCtrl; /* Bit Map of Key Mgmt Ctrl Flags */ -} AR6000_USER_SETKEYS_INFO; - +}; /* XXX: unused !? */ /* used by AR6000_XIOCTL_GPIO_OUTPUT_SET */ struct ar6000_gpio_output_set_cmd_s { -- 1.7.4.15.g7811d From e4ec3d9ee6ccc657e8ff22fbbc83a8e7ee88f8b4 Mon Sep 17 00:00:00 2001 From: Luis R. Rodriguez Date: Mon, 28 Feb 2011 08:29:48 -0800 Subject: [PATCH 08/58] ath6kl: remove-typedef AR6K_ASYNC_REG_IO_BUFFER remove-typedef -s AR6K_ASYNC_REG_IO_BUFFER \ "struct ar6k_async_reg_io_buffer" drivers/staging/ath6kl/ Cc: Naveen Singh Signed-off-by: Luis R. Rodriguez --- drivers/staging/ath6kl/htc2/AR6000/ar6k.h | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k.h b/drivers/staging/ath6kl/htc2/AR6000/ar6k.h index 19d8e70..e0c3926 100644 --- a/drivers/staging/ath6kl/htc2/AR6000/ar6k.h +++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k.h @@ -89,12 +89,12 @@ typedef PREPACK struct _AR6K_GMBOX_CTRL_REGISTERS { #define AR6K_MIN_TRANSFER_SIZE_PER_SCATTER 4*1024 /* buffers for ASYNC I/O */ -typedef struct AR6K_ASYNC_REG_IO_BUFFER { +struct ar6k_async_reg_io_buffer { HTC_PACKET HtcPacket; /* we use an HTC packet as a wrapper for our async register-based I/O */ u8 _Pad1[A_CACHE_LINE_PAD]; u8 Buffer[AR6K_REG_IO_BUFFER_SIZE]; /* cache-line safe with pads around */ u8 _Pad2[A_CACHE_LINE_PAD]; -} AR6K_ASYNC_REG_IO_BUFFER; +}; typedef struct _AR6K_GMBOX_INFO { void *pProtocolContext; @@ -119,7 +119,7 @@ typedef struct _AR6K_DEVICE { HIF_PENDING_EVENTS_FUNC GetPendingEventsFunc; void *HTCContext; HTC_PACKET_QUEUE RegisterIOList; - AR6K_ASYNC_REG_IO_BUFFER RegIOBuffers[AR6K_MAX_REG_IO_BUFFERS]; + struct ar6k_async_reg_io_buffer RegIOBuffers[AR6K_MAX_REG_IO_BUFFERS]; void (*TargetFailureCallback)(void *Context); int (*MessagePendingCallback)(void *Context, u32 LookAheads[], -- 1.7.4.15.g7811d From b2a2da2f4f633a67e341379f369a0605efc04f45 Mon Sep 17 00:00:00 2001 From: Luis R. Rodriguez Date: Mon, 28 Feb 2011 08:32:22 -0800 Subject: [PATCH 09/58] ath6kl: remove-typedef AR6K_DEVICE remove-typedef -s AR6K_DEVICE \ "struct ar6k_device" drivers/staging/ath6kl/ Cc: Naveen Singh Signed-off-by: Luis R. Rodriguez --- drivers/staging/ath6kl/htc2/AR6000/ar6k.c | 64 +++++++++--------- drivers/staging/ath6kl/htc2/AR6000/ar6k.h | 74 ++++++++++---------- drivers/staging/ath6kl/htc2/AR6000/ar6k_events.c | 28 ++++---- drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox.c | 32 ++++---- .../ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c | 10 ++-- drivers/staging/ath6kl/htc2/htc.c | 2 +- drivers/staging/ath6kl/htc2/htc_internal.h | 2 +- 7 files changed, 106 insertions(+), 106 deletions(-) diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k.c b/drivers/staging/ath6kl/htc2/AR6000/ar6k.c index 9090a39..85d45a7 100644 --- a/drivers/staging/ath6kl/htc2/AR6000/ar6k.c +++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k.c @@ -35,19 +35,19 @@ #define MAILBOX_FOR_BLOCK_SIZE 1 -int DevEnableInterrupts(AR6K_DEVICE *pDev); -int DevDisableInterrupts(AR6K_DEVICE *pDev); +int DevEnableInterrupts(struct ar6k_device *pDev); +int DevDisableInterrupts(struct ar6k_device *pDev); -static void DevCleanupVirtualScatterSupport(AR6K_DEVICE *pDev); +static void DevCleanupVirtualScatterSupport(struct ar6k_device *pDev); -void AR6KFreeIOPacket(AR6K_DEVICE *pDev, HTC_PACKET *pPacket) +void AR6KFreeIOPacket(struct ar6k_device *pDev, HTC_PACKET *pPacket) { LOCK_AR6K(pDev); HTC_PACKET_ENQUEUE(&pDev->RegisterIOList,pPacket); UNLOCK_AR6K(pDev); } -HTC_PACKET *AR6KAllocIOPacket(AR6K_DEVICE *pDev) +HTC_PACKET *AR6KAllocIOPacket(struct ar6k_device *pDev) { HTC_PACKET *pPacket; @@ -58,7 +58,7 @@ HTC_PACKET *AR6KAllocIOPacket(AR6K_DEVICE *pDev) return pPacket; } -void DevCleanup(AR6K_DEVICE *pDev) +void DevCleanup(struct ar6k_device *pDev) { DevCleanupGMbox(pDev); @@ -74,7 +74,7 @@ void DevCleanup(AR6K_DEVICE *pDev) } } -int DevSetup(AR6K_DEVICE *pDev) +int DevSetup(struct ar6k_device *pDev) { u32 blocksizes[AR6K_MAILBOXES]; int status = 0; @@ -216,7 +216,7 @@ int DevSetup(AR6K_DEVICE *pDev) } -int DevEnableInterrupts(AR6K_DEVICE *pDev) +int DevEnableInterrupts(struct ar6k_device *pDev) { int status; AR6K_IRQ_ENABLE_REGISTERS regs; @@ -276,7 +276,7 @@ int DevEnableInterrupts(AR6K_DEVICE *pDev) return status; } -int DevDisableInterrupts(AR6K_DEVICE *pDev) +int DevDisableInterrupts(struct ar6k_device *pDev) { AR6K_IRQ_ENABLE_REGISTERS regs; @@ -301,7 +301,7 @@ int DevDisableInterrupts(AR6K_DEVICE *pDev) } /* enable device interrupts */ -int DevUnmaskInterrupts(AR6K_DEVICE *pDev) +int DevUnmaskInterrupts(struct ar6k_device *pDev) { /* for good measure, make sure interrupt are disabled before unmasking at the HIF * layer. @@ -327,7 +327,7 @@ int DevUnmaskInterrupts(AR6K_DEVICE *pDev) } /* disable all device interrupts */ -int DevMaskInterrupts(AR6K_DEVICE *pDev) +int DevMaskInterrupts(struct ar6k_device *pDev) { /* mask the interrupt at the HIF layer, we don't want a stray interrupt taken while * we zero out our shadow registers in DevDisableInterrupts()*/ @@ -339,7 +339,7 @@ int DevMaskInterrupts(AR6K_DEVICE *pDev) /* callback when our fetch to enable/disable completes */ static void DevDoEnableDisableRecvAsyncHandler(void *Context, HTC_PACKET *pPacket) { - AR6K_DEVICE *pDev = (AR6K_DEVICE *)Context; + struct ar6k_device *pDev = (struct ar6k_device *)Context; AR_DEBUG_PRINTF(ATH_DEBUG_IRQ,("+DevDoEnableDisableRecvAsyncHandler: (dev: 0x%lX)\n", (unsigned long)pDev)); @@ -355,7 +355,7 @@ static void DevDoEnableDisableRecvAsyncHandler(void *Context, HTC_PACKET *pPacke /* disable packet reception (used in case the host runs out of buffers) * this is the "override" method when the HIF reports another methods to * disable recv events */ -static int DevDoEnableDisableRecvOverride(AR6K_DEVICE *pDev, bool EnableRecv, bool AsyncMode) +static int DevDoEnableDisableRecvOverride(struct ar6k_device *pDev, bool EnableRecv, bool AsyncMode) { int status = 0; HTC_PACKET *pIOPacket = NULL; @@ -403,7 +403,7 @@ static int DevDoEnableDisableRecvOverride(AR6K_DEVICE *pDev, bool EnableRecv, bo /* disable packet reception (used in case the host runs out of buffers) * this is the "normal" method using the interrupt enable registers through * the host I/F */ -static int DevDoEnableDisableRecvNormal(AR6K_DEVICE *pDev, bool EnableRecv, bool AsyncMode) +static int DevDoEnableDisableRecvNormal(struct ar6k_device *pDev, bool EnableRecv, bool AsyncMode) { int status = 0; HTC_PACKET *pIOPacket = NULL; @@ -470,7 +470,7 @@ static int DevDoEnableDisableRecvNormal(AR6K_DEVICE *pDev, bool EnableRecv, bool } -int DevStopRecv(AR6K_DEVICE *pDev, bool AsyncMode) +int DevStopRecv(struct ar6k_device *pDev, bool AsyncMode) { if (NULL == pDev->HifMaskUmaskRecvEvent) { return DevDoEnableDisableRecvNormal(pDev,false,AsyncMode); @@ -479,7 +479,7 @@ int DevStopRecv(AR6K_DEVICE *pDev, bool AsyncMode) } } -int DevEnableRecv(AR6K_DEVICE *pDev, bool AsyncMode) +int DevEnableRecv(struct ar6k_device *pDev, bool AsyncMode) { if (NULL == pDev->HifMaskUmaskRecvEvent) { return DevDoEnableDisableRecvNormal(pDev,true,AsyncMode); @@ -488,7 +488,7 @@ int DevEnableRecv(AR6K_DEVICE *pDev, bool AsyncMode) } } -int DevWaitForPendingRecv(AR6K_DEVICE *pDev,u32 TimeoutInMs,bool *pbIsRecvPending) +int DevWaitForPendingRecv(struct ar6k_device *pDev,u32 TimeoutInMs,bool *pbIsRecvPending) { int status = 0; u8 host_int_status = 0x0; @@ -536,7 +536,7 @@ int DevWaitForPendingRecv(AR6K_DEVICE *pDev,u32 TimeoutInMs,bool *pbIsRecvPendin return status; } -void DevDumpRegisters(AR6K_DEVICE *pDev, +void DevDumpRegisters(struct ar6k_device *pDev, AR6K_IRQ_PROC_REGISTERS *pIrqProcRegs, AR6K_IRQ_ENABLE_REGISTERS *pIrqEnableRegs) { @@ -590,7 +590,7 @@ void DevDumpRegisters(AR6K_DEVICE *pDev, static HIF_SCATTER_REQ *DevAllocScatterReq(HIF_DEVICE *Context) { DL_LIST *pItem; - AR6K_DEVICE *pDev = (AR6K_DEVICE *)Context; + struct ar6k_device *pDev = (struct ar6k_device *)Context; LOCK_AR6K(pDev); pItem = DL_ListRemoveItemFromHead(&pDev->ScatterReqHead); UNLOCK_AR6K(pDev); @@ -602,7 +602,7 @@ static HIF_SCATTER_REQ *DevAllocScatterReq(HIF_DEVICE *Context) static void DevFreeScatterReq(HIF_DEVICE *Context, HIF_SCATTER_REQ *pReq) { - AR6K_DEVICE *pDev = (AR6K_DEVICE *)Context; + struct ar6k_device *pDev = (struct ar6k_device *)Context; LOCK_AR6K(pDev); DL_ListInsertTail(&pDev->ScatterReqHead, &pReq->ListLink); UNLOCK_AR6K(pDev); @@ -650,7 +650,7 @@ int DevCopyScatterListToFromDMABuffer(HIF_SCATTER_REQ *pReq, bool FromDMA) static void DevReadWriteScatterAsyncHandler(void *Context, HTC_PACKET *pPacket) { - AR6K_DEVICE *pDev = (AR6K_DEVICE *)Context; + struct ar6k_device *pDev = (struct ar6k_device *)Context; HIF_SCATTER_REQ *pReq = (HIF_SCATTER_REQ *)pPacket->pPktContext; AR_DEBUG_PRINTF(ATH_DEBUG_RECV,("+DevReadWriteScatterAsyncHandler: (dev: 0x%lX)\n", (unsigned long)pDev)); @@ -666,7 +666,7 @@ static void DevReadWriteScatterAsyncHandler(void *Context, HTC_PACKET *pPacket) static int DevReadWriteScatter(HIF_DEVICE *Context, HIF_SCATTER_REQ *pReq) { - AR6K_DEVICE *pDev = (AR6K_DEVICE *)Context; + struct ar6k_device *pDev = (struct ar6k_device *)Context; int status = 0; HTC_PACKET *pIOPacket = NULL; u32 request = pReq->Request; @@ -734,7 +734,7 @@ static int DevReadWriteScatter(HIF_DEVICE *Context, HIF_SCATTER_REQ *pReq) } -static void DevCleanupVirtualScatterSupport(AR6K_DEVICE *pDev) +static void DevCleanupVirtualScatterSupport(struct ar6k_device *pDev) { HIF_SCATTER_REQ *pReq; @@ -749,7 +749,7 @@ static void DevCleanupVirtualScatterSupport(AR6K_DEVICE *pDev) } /* function to set up virtual scatter support if HIF layer has not implemented the interface */ -static int DevSetupVirtualScatterSupport(AR6K_DEVICE *pDev) +static int DevSetupVirtualScatterSupport(struct ar6k_device *pDev) { int status = 0; int bufferSize, sgreqSize; @@ -810,7 +810,7 @@ static int DevSetupVirtualScatterSupport(AR6K_DEVICE *pDev) return status; } -int DevCleanupMsgBundling(AR6K_DEVICE *pDev) +int DevCleanupMsgBundling(struct ar6k_device *pDev) { if(NULL != pDev) { @@ -820,7 +820,7 @@ int DevCleanupMsgBundling(AR6K_DEVICE *pDev) return 0; } -int DevSetupMsgBundling(AR6K_DEVICE *pDev, int MaxMsgsPerTransfer) +int DevSetupMsgBundling(struct ar6k_device *pDev, int MaxMsgsPerTransfer) { int status; @@ -885,7 +885,7 @@ int DevSetupMsgBundling(AR6K_DEVICE *pDev, int MaxMsgsPerTransfer) return status; } -int DevSubmitScatterRequest(AR6K_DEVICE *pDev, HIF_SCATTER_REQ *pScatterReq, bool Read, bool Async) +int DevSubmitScatterRequest(struct ar6k_device *pDev, HIF_SCATTER_REQ *pScatterReq, bool Read, bool Async) { int status; @@ -1134,7 +1134,7 @@ static u16 GetEndMarker(void) #define ATH_PRINT_OUT_ZONE ATH_DEBUG_ERR /* send the ordered buffers to the target */ -static int SendBuffers(AR6K_DEVICE *pDev, int mbox) +static int SendBuffers(struct ar6k_device *pDev, int mbox) { int status = 0; u32 request = HIF_WR_SYNC_BLOCK_INC; @@ -1178,7 +1178,7 @@ static int SendBuffers(AR6K_DEVICE *pDev, int mbox) } /* poll the mailbox credit counter until we get a credit or timeout */ -static int GetCredits(AR6K_DEVICE *pDev, int mbox, int *pCredits) +static int GetCredits(struct ar6k_device *pDev, int mbox, int *pCredits) { int status = 0; int timeout = TEST_CREDITS_RECV_TIMEOUT; @@ -1225,7 +1225,7 @@ static int GetCredits(AR6K_DEVICE *pDev, int mbox, int *pCredits) /* wait for the buffers to come back */ -static int RecvBuffers(AR6K_DEVICE *pDev, int mbox) +static int RecvBuffers(struct ar6k_device *pDev, int mbox) { int status = 0; u32 request = HIF_RD_SYNC_BLOCK_INC; @@ -1303,7 +1303,7 @@ static int RecvBuffers(AR6K_DEVICE *pDev, int mbox) } -static int DoOneMboxHWTest(AR6K_DEVICE *pDev, int mbox) +static int DoOneMboxHWTest(struct ar6k_device *pDev, int mbox) { int status; @@ -1339,7 +1339,7 @@ static int DoOneMboxHWTest(AR6K_DEVICE *pDev, int mbox) } /* here is where the test starts */ -int DoMboxHWTest(AR6K_DEVICE *pDev) +int DoMboxHWTest(struct ar6k_device *pDev) { int i; int status; diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k.h b/drivers/staging/ath6kl/htc2/AR6000/ar6k.h index e0c3926..ebcc82b 100644 --- a/drivers/staging/ath6kl/htc2/AR6000/ar6k.h +++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k.h @@ -105,7 +105,7 @@ typedef struct _AR6K_GMBOX_INFO { bool CreditCountIRQEnabled; } AR6K_GMBOX_INFO; -typedef struct _AR6K_DEVICE { +struct ar6k_device { A_MUTEX_T Lock; u8 _Pad1[A_CACHE_LINE_PAD]; AR6K_IRQ_PROC_REGISTERS IrqProcRegisters; /* cache-line safe with pads around */ @@ -141,24 +141,24 @@ typedef struct _AR6K_DEVICE { bool GMboxEnabled; AR6K_GMBOX_CTRL_REGISTERS GMboxControlRegisters; int RecheckIRQStatusCnt; -} AR6K_DEVICE; +}; #define LOCK_AR6K(p) A_MUTEX_LOCK(&(p)->Lock); #define UNLOCK_AR6K(p) A_MUTEX_UNLOCK(&(p)->Lock); #define REF_IRQ_STATUS_RECHECK(p) (p)->RecheckIRQStatusCnt = 1 /* note: no need to lock this, it only gets set */ -int DevSetup(AR6K_DEVICE *pDev); -void DevCleanup(AR6K_DEVICE *pDev); -int DevUnmaskInterrupts(AR6K_DEVICE *pDev); -int DevMaskInterrupts(AR6K_DEVICE *pDev); -int DevPollMboxMsgRecv(AR6K_DEVICE *pDev, +int DevSetup(struct ar6k_device *pDev); +void DevCleanup(struct ar6k_device *pDev); +int DevUnmaskInterrupts(struct ar6k_device *pDev); +int DevMaskInterrupts(struct ar6k_device *pDev); +int DevPollMboxMsgRecv(struct ar6k_device *pDev, u32 *pLookAhead, int TimeoutMS); int DevRWCompletionHandler(void *context, int status); int DevDsrHandler(void *context); int DevCheckPendingRecvMsgsAsync(void *context); -void DevAsyncIrqProcessComplete(AR6K_DEVICE *pDev); -void DevDumpRegisters(AR6K_DEVICE *pDev, +void DevAsyncIrqProcessComplete(struct ar6k_device *pDev); +void DevDumpRegisters(struct ar6k_device *pDev, AR6K_IRQ_PROC_REGISTERS *pIrqProcRegs, AR6K_IRQ_ENABLE_REGISTERS *pIrqEnableRegs); @@ -166,17 +166,17 @@ void DevDumpRegisters(AR6K_DEVICE *pDev, #define DEV_STOP_RECV_SYNC false #define DEV_ENABLE_RECV_ASYNC true #define DEV_ENABLE_RECV_SYNC false -int DevStopRecv(AR6K_DEVICE *pDev, bool ASyncMode); -int DevEnableRecv(AR6K_DEVICE *pDev, bool ASyncMode); -int DevEnableInterrupts(AR6K_DEVICE *pDev); -int DevDisableInterrupts(AR6K_DEVICE *pDev); -int DevWaitForPendingRecv(AR6K_DEVICE *pDev,u32 TimeoutInMs,bool *pbIsRecvPending); +int DevStopRecv(struct ar6k_device *pDev, bool ASyncMode); +int DevEnableRecv(struct ar6k_device *pDev, bool ASyncMode); +int DevEnableInterrupts(struct ar6k_device *pDev); +int DevDisableInterrupts(struct ar6k_device *pDev); +int DevWaitForPendingRecv(struct ar6k_device *pDev,u32 TimeoutInMs,bool *pbIsRecvPending); #define DEV_CALC_RECV_PADDED_LEN(pDev, length) (((length) + (pDev)->BlockMask) & (~((pDev)->BlockMask))) #define DEV_CALC_SEND_PADDED_LEN(pDev, length) DEV_CALC_RECV_PADDED_LEN(pDev,length) #define DEV_IS_LEN_BLOCK_ALIGNED(pDev, length) (((length) % (pDev)->BlockSize) == 0) -static INLINE int DevSendPacket(AR6K_DEVICE *pDev, HTC_PACKET *pPacket, u32 SendLength) { +static INLINE int DevSendPacket(struct ar6k_device *pDev, HTC_PACKET *pPacket, u32 SendLength) { u32 paddedLength; bool sync = (pPacket->Completion == NULL) ? true : false; int status; @@ -219,7 +219,7 @@ static INLINE int DevSendPacket(AR6K_DEVICE *pDev, HTC_PACKET *pPacket, u32 Send return status; } -static INLINE int DevRecvPacket(AR6K_DEVICE *pDev, HTC_PACKET *pPacket, u32 RecvLength) { +static INLINE int DevRecvPacket(struct ar6k_device *pDev, HTC_PACKET *pPacket, u32 RecvLength) { u32 paddedLength; int status; bool sync = (pPacket->Completion == NULL) ? true : false; @@ -296,9 +296,9 @@ static INLINE int DEV_PREPARE_SCATTER_OPERATION(HIF_SCATTER_REQ *pReq) { } -int DevSetupMsgBundling(AR6K_DEVICE *pDev, int MaxMsgsPerTransfer); +int DevSetupMsgBundling(struct ar6k_device *pDev, int MaxMsgsPerTransfer); -int DevCleanupMsgBundling(AR6K_DEVICE *pDev); +int DevCleanupMsgBundling(struct ar6k_device *pDev); #define DEV_GET_MAX_MSG_PER_BUNDLE(pDev) (pDev)->HifScatterInfo.MaxScatterEntries #define DEV_GET_MAX_BUNDLE_LENGTH(pDev) (pDev)->HifScatterInfo.MaxTransferSizePerScatterReq @@ -315,10 +315,10 @@ int DevCleanupMsgBundling(AR6K_DEVICE *pDev); #define DEV_SCATTER_WRITE false #define DEV_SCATTER_ASYNC true #define DEV_SCATTER_SYNC false -int DevSubmitScatterRequest(AR6K_DEVICE *pDev, HIF_SCATTER_REQ *pScatterReq, bool Read, bool Async); +int DevSubmitScatterRequest(struct ar6k_device *pDev, HIF_SCATTER_REQ *pScatterReq, bool Read, bool Async); #ifdef MBOXHW_UNIT_TEST -int DoMboxHWTest(AR6K_DEVICE *pDev); +int DoMboxHWTest(struct ar6k_device *pDev); #endif /* completely virtual */ @@ -329,7 +329,7 @@ typedef struct _DEV_SCATTER_DMA_VIRTUAL_INFO { -void DumpAR6KDevState(AR6K_DEVICE *pDev); +void DumpAR6KDevState(struct ar6k_device *pDev); /**************************************************/ /****** GMBOX functions and definitions @@ -339,10 +339,10 @@ void DumpAR6KDevState(AR6K_DEVICE *pDev); #ifdef ATH_AR6K_ENABLE_GMBOX -void DevCleanupGMbox(AR6K_DEVICE *pDev); -int DevSetupGMbox(AR6K_DEVICE *pDev); -int DevCheckGMboxInterrupts(AR6K_DEVICE *pDev); -void DevNotifyGMboxTargetFailure(AR6K_DEVICE *pDev); +void DevCleanupGMbox(struct ar6k_device *pDev); +int DevSetupGMbox(struct ar6k_device *pDev); +int DevCheckGMboxInterrupts(struct ar6k_device *pDev); +void DevNotifyGMboxTargetFailure(struct ar6k_device *pDev); #else @@ -351,7 +351,7 @@ void DevNotifyGMboxTargetFailure(AR6K_DEVICE *pDev); #define DevCheckGMboxInterrupts(p) 0 #define DevNotifyGMboxTargetFailure(p) -static INLINE int DevSetupGMbox(AR6K_DEVICE *pDev) { +static INLINE int DevSetupGMbox(struct ar6k_device *pDev) { pDev->GMboxEnabled = false; return 0; } @@ -361,12 +361,12 @@ static INLINE int DevSetupGMbox(AR6K_DEVICE *pDev) { #ifdef ATH_AR6K_ENABLE_GMBOX /* GMBOX protocol modules must expose each of these internal APIs */ -HCI_TRANSPORT_HANDLE GMboxAttachProtocol(AR6K_DEVICE *pDev, HCI_TRANSPORT_CONFIG_INFO *pInfo); -int GMboxProtocolInstall(AR6K_DEVICE *pDev); -void GMboxProtocolUninstall(AR6K_DEVICE *pDev); +HCI_TRANSPORT_HANDLE GMboxAttachProtocol(struct ar6k_device *pDev, HCI_TRANSPORT_CONFIG_INFO *pInfo); +int GMboxProtocolInstall(struct ar6k_device *pDev); +void GMboxProtocolUninstall(struct ar6k_device *pDev); /* API used by GMBOX protocol modules */ -AR6K_DEVICE *HTCGetAR6KDevice(void *HTCHandle); +struct ar6k_device *HTCGetAR6KDevice(void *HTCHandle); #define DEV_GMBOX_SET_PROTOCOL(pDev,recv_callback,credits_pending,failure,statedump,context) \ { \ (pDev)->GMboxInfo.pProtocolContext = (context); \ @@ -378,8 +378,8 @@ AR6K_DEVICE *HTCGetAR6KDevice(void *HTCHandle); #define DEV_GMBOX_GET_PROTOCOL(pDev) (pDev)->GMboxInfo.pProtocolContext -int DevGMboxWrite(AR6K_DEVICE *pDev, HTC_PACKET *pPacket, u32 WriteLength); -int DevGMboxRead(AR6K_DEVICE *pDev, HTC_PACKET *pPacket, u32 ReadLength); +int DevGMboxWrite(struct ar6k_device *pDev, HTC_PACKET *pPacket, u32 WriteLength); +int DevGMboxRead(struct ar6k_device *pDev, HTC_PACKET *pPacket, u32 ReadLength); #define PROC_IO_ASYNC true #define PROC_IO_SYNC false @@ -393,11 +393,11 @@ typedef enum GMBOX_IRQ_ACTION_TYPE { GMBOX_CREDIT_IRQ_DISABLE, } GMBOX_IRQ_ACTION_TYPE; -int DevGMboxIRQAction(AR6K_DEVICE *pDev, GMBOX_IRQ_ACTION_TYPE, bool AsyncMode); -int DevGMboxReadCreditCounter(AR6K_DEVICE *pDev, bool AsyncMode, int *pCredits); -int DevGMboxReadCreditSize(AR6K_DEVICE *pDev, int *pCreditSize); -int DevGMboxRecvLookAheadPeek(AR6K_DEVICE *pDev, u8 *pLookAheadBuffer, int *pLookAheadBytes); -int DevGMboxSetTargetInterrupt(AR6K_DEVICE *pDev, int SignalNumber, int AckTimeoutMS); +int DevGMboxIRQAction(struct ar6k_device *pDev, GMBOX_IRQ_ACTION_TYPE, bool AsyncMode); +int DevGMboxReadCreditCounter(struct ar6k_device *pDev, bool AsyncMode, int *pCredits); +int DevGMboxReadCreditSize(struct ar6k_device *pDev, int *pCreditSize); +int DevGMboxRecvLookAheadPeek(struct ar6k_device *pDev, u8 *pLookAheadBuffer, int *pLookAheadBytes); +int DevGMboxSetTargetInterrupt(struct ar6k_device *pDev, int SignalNumber, int AckTimeoutMS); #endif diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k_events.c b/drivers/staging/ath6kl/htc2/AR6000/ar6k_events.c index bee4850..aa45590 100644 --- a/drivers/staging/ath6kl/htc2/AR6000/ar6k_events.c +++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k_events.c @@ -33,10 +33,10 @@ #include "htc_packet.h" #include "ar6k.h" -extern void AR6KFreeIOPacket(AR6K_DEVICE *pDev, HTC_PACKET *pPacket); -extern HTC_PACKET *AR6KAllocIOPacket(AR6K_DEVICE *pDev); +extern void AR6KFreeIOPacket(struct ar6k_device *pDev, HTC_PACKET *pPacket); +extern HTC_PACKET *AR6KAllocIOPacket(struct ar6k_device *pDev); -static int DevServiceDebugInterrupt(AR6K_DEVICE *pDev); +static int DevServiceDebugInterrupt(struct ar6k_device *pDev); #define DELAY_PER_INTERVAL_MS 10 /* 10 MS delay per polling interval */ @@ -59,7 +59,7 @@ int DevRWCompletionHandler(void *context, int status) } /* mailbox recv message polling */ -int DevPollMboxMsgRecv(AR6K_DEVICE *pDev, +int DevPollMboxMsgRecv(struct ar6k_device *pDev, u32 *pLookAhead, int TimeoutMS) { @@ -152,7 +152,7 @@ int DevPollMboxMsgRecv(AR6K_DEVICE *pDev, return status; } -static int DevServiceCPUInterrupt(AR6K_DEVICE *pDev) +static int DevServiceCPUInterrupt(struct ar6k_device *pDev) { int status; u8 cpu_int_status; @@ -192,7 +192,7 @@ static int DevServiceCPUInterrupt(AR6K_DEVICE *pDev) } -static int DevServiceErrorInterrupt(AR6K_DEVICE *pDev) +static int DevServiceErrorInterrupt(struct ar6k_device *pDev) { int status; u8 error_int_status; @@ -245,7 +245,7 @@ static int DevServiceErrorInterrupt(AR6K_DEVICE *pDev) return status; } -static int DevServiceDebugInterrupt(AR6K_DEVICE *pDev) +static int DevServiceDebugInterrupt(struct ar6k_device *pDev) { u32 dummy; int status; @@ -275,7 +275,7 @@ static int DevServiceDebugInterrupt(AR6K_DEVICE *pDev) return status; } -static int DevServiceCounterInterrupt(AR6K_DEVICE *pDev) +static int DevServiceCounterInterrupt(struct ar6k_device *pDev) { u8 counter_int_status; @@ -302,7 +302,7 @@ static int DevServiceCounterInterrupt(AR6K_DEVICE *pDev) /* callback when our fetch to get interrupt status registers completes */ static void DevGetEventAsyncHandler(void *Context, HTC_PACKET *pPacket) { - AR6K_DEVICE *pDev = (AR6K_DEVICE *)Context; + struct ar6k_device *pDev = (struct ar6k_device *)Context; u32 lookAhead = 0; bool otherInts = false; @@ -390,7 +390,7 @@ static void DevGetEventAsyncHandler(void *Context, HTC_PACKET *pPacket) * recv messages, this starts off a series of async requests to read interrupt registers */ int DevCheckPendingRecvMsgsAsync(void *context) { - AR6K_DEVICE *pDev = (AR6K_DEVICE *)context; + struct ar6k_device *pDev = (struct ar6k_device *)context; int status = 0; HTC_PACKET *pIOPacket; @@ -460,14 +460,14 @@ int DevCheckPendingRecvMsgsAsync(void *context) return status; } -void DevAsyncIrqProcessComplete(AR6K_DEVICE *pDev) +void DevAsyncIrqProcessComplete(struct ar6k_device *pDev) { AR_DEBUG_PRINTF(ATH_DEBUG_IRQ,("DevAsyncIrqProcessComplete - forcing HIF IRQ ACK \n")); HIFAckInterrupt(pDev->HIFDevice); } /* process pending interrupts synchronously */ -static int ProcessPendingIRQs(AR6K_DEVICE *pDev, bool *pDone, bool *pASyncProcessing) +static int ProcessPendingIRQs(struct ar6k_device *pDev, bool *pDone, bool *pASyncProcessing) { int status = 0; u8 host_int_status = 0; @@ -683,7 +683,7 @@ static int ProcessPendingIRQs(AR6K_DEVICE *pDev, bool *pDone, bool *pASyncProces /* Synchronousinterrupt handler, this handler kicks off all interrupt processing.*/ int DevDsrHandler(void *context) { - AR6K_DEVICE *pDev = (AR6K_DEVICE *)context; + struct ar6k_device *pDev = (struct ar6k_device *)context; int status = 0; bool done = false; bool asyncProc = false; @@ -744,7 +744,7 @@ int DevDsrHandler(void *context) } #ifdef ATH_DEBUG_MODULE -void DumpAR6KDevState(AR6K_DEVICE *pDev) +void DumpAR6KDevState(struct ar6k_device *pDev) { int status; AR6K_IRQ_ENABLE_REGISTERS regs; diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox.c b/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox.c index 46bcb27..cbfbdea 100644 --- a/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox.c +++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox.c @@ -54,14 +54,14 @@ /* external APIs for allocating and freeing internal I/O packets to handle ASYNC I/O */ -extern void AR6KFreeIOPacket(AR6K_DEVICE *pDev, HTC_PACKET *pPacket); -extern HTC_PACKET *AR6KAllocIOPacket(AR6K_DEVICE *pDev); +extern void AR6KFreeIOPacket(struct ar6k_device *pDev, HTC_PACKET *pPacket); +extern HTC_PACKET *AR6KAllocIOPacket(struct ar6k_device *pDev); /* callback when our fetch to enable/disable completes */ static void DevGMboxIRQActionAsyncHandler(void *Context, HTC_PACKET *pPacket) { - AR6K_DEVICE *pDev = (AR6K_DEVICE *)Context; + struct ar6k_device *pDev = (struct ar6k_device *)Context; AR_DEBUG_PRINTF(ATH_DEBUG_IRQ,("+DevGMboxIRQActionAsyncHandler: (dev: 0x%lX)\n", (unsigned long)pDev)); @@ -74,7 +74,7 @@ static void DevGMboxIRQActionAsyncHandler(void *Context, HTC_PACKET *pPacket) AR_DEBUG_PRINTF(ATH_DEBUG_IRQ,("-DevGMboxIRQActionAsyncHandler \n")); } -static int DevGMboxCounterEnableDisable(AR6K_DEVICE *pDev, GMBOX_IRQ_ACTION_TYPE IrqAction, bool AsyncMode) +static int DevGMboxCounterEnableDisable(struct ar6k_device *pDev, GMBOX_IRQ_ACTION_TYPE IrqAction, bool AsyncMode) { int status = 0; AR6K_IRQ_ENABLE_REGISTERS regs; @@ -155,7 +155,7 @@ static int DevGMboxCounterEnableDisable(AR6K_DEVICE *pDev, GMBOX_IRQ_ACTION_TYPE } -int DevGMboxIRQAction(AR6K_DEVICE *pDev, GMBOX_IRQ_ACTION_TYPE IrqAction, bool AsyncMode) +int DevGMboxIRQAction(struct ar6k_device *pDev, GMBOX_IRQ_ACTION_TYPE IrqAction, bool AsyncMode) { int status = 0; HTC_PACKET *pIOPacket = NULL; @@ -261,7 +261,7 @@ int DevGMboxIRQAction(AR6K_DEVICE *pDev, GMBOX_IRQ_ACTION_TYPE IrqAction, bool A return status; } -void DevCleanupGMbox(AR6K_DEVICE *pDev) +void DevCleanupGMbox(struct ar6k_device *pDev) { if (pDev->GMboxEnabled) { pDev->GMboxEnabled = false; @@ -269,7 +269,7 @@ void DevCleanupGMbox(AR6K_DEVICE *pDev) } } -int DevSetupGMbox(AR6K_DEVICE *pDev) +int DevSetupGMbox(struct ar6k_device *pDev) { int status = 0; u8 muxControl[4]; @@ -322,7 +322,7 @@ int DevSetupGMbox(AR6K_DEVICE *pDev) return status; } -int DevCheckGMboxInterrupts(AR6K_DEVICE *pDev) +int DevCheckGMboxInterrupts(struct ar6k_device *pDev) { int status = 0; u8 counter_int_status; @@ -396,7 +396,7 @@ int DevCheckGMboxInterrupts(AR6K_DEVICE *pDev) } -int DevGMboxWrite(AR6K_DEVICE *pDev, HTC_PACKET *pPacket, u32 WriteLength) +int DevGMboxWrite(struct ar6k_device *pDev, HTC_PACKET *pPacket, u32 WriteLength) { u32 paddedLength; bool sync = (pPacket->Completion == NULL) ? true : false; @@ -433,7 +433,7 @@ int DevGMboxWrite(AR6K_DEVICE *pDev, HTC_PACKET *pPacket, u32 WriteLength) return status; } -int DevGMboxRead(AR6K_DEVICE *pDev, HTC_PACKET *pPacket, u32 ReadLength) +int DevGMboxRead(struct ar6k_device *pDev, HTC_PACKET *pPacket, u32 ReadLength) { u32 paddedLength; @@ -518,7 +518,7 @@ static int ProcessCreditCounterReadBuffer(u8 *pBuffer, int Length) /* callback when our fetch to enable/disable completes */ static void DevGMboxReadCreditsAsyncHandler(void *Context, HTC_PACKET *pPacket) { - AR6K_DEVICE *pDev = (AR6K_DEVICE *)Context; + struct ar6k_device *pDev = (struct ar6k_device *)Context; AR_DEBUG_PRINTF(ATH_DEBUG_IRQ,("+DevGMboxReadCreditsAsyncHandler: (dev: 0x%lX)\n", (unsigned long)pDev)); @@ -539,7 +539,7 @@ static void DevGMboxReadCreditsAsyncHandler(void *Context, HTC_PACKET *pPacket) AR_DEBUG_PRINTF(ATH_DEBUG_IRQ,("-DevGMboxReadCreditsAsyncHandler \n")); } -int DevGMboxReadCreditCounter(AR6K_DEVICE *pDev, bool AsyncMode, int *pCredits) +int DevGMboxReadCreditCounter(struct ar6k_device *pDev, bool AsyncMode, int *pCredits) { int status = 0; HTC_PACKET *pIOPacket = NULL; @@ -602,7 +602,7 @@ int DevGMboxReadCreditCounter(AR6K_DEVICE *pDev, bool AsyncMode, int *pCredits) return status; } -int DevGMboxReadCreditSize(AR6K_DEVICE *pDev, int *pCreditSize) +int DevGMboxReadCreditSize(struct ar6k_device *pDev, int *pCreditSize) { int status; u8 buffer[4]; @@ -626,7 +626,7 @@ int DevGMboxReadCreditSize(AR6K_DEVICE *pDev, int *pCreditSize) return status; } -void DevNotifyGMboxTargetFailure(AR6K_DEVICE *pDev) +void DevNotifyGMboxTargetFailure(struct ar6k_device *pDev) { /* Target ASSERTED!!! */ if (pDev->GMboxInfo.pTargetFailureCallback != NULL) { @@ -634,7 +634,7 @@ void DevNotifyGMboxTargetFailure(AR6K_DEVICE *pDev) } } -int DevGMboxRecvLookAheadPeek(AR6K_DEVICE *pDev, u8 *pLookAheadBuffer, int *pLookAheadBytes) +int DevGMboxRecvLookAheadPeek(struct ar6k_device *pDev, u8 *pLookAheadBuffer, int *pLookAheadBytes) { int status = 0; @@ -676,7 +676,7 @@ int DevGMboxRecvLookAheadPeek(AR6K_DEVICE *pDev, u8 *pLookAheadBuffer, int *pLoo return status; } -int DevGMboxSetTargetInterrupt(AR6K_DEVICE *pDev, int Signal, int AckTimeoutMS) +int DevGMboxSetTargetInterrupt(struct ar6k_device *pDev, int Signal, int AckTimeoutMS) { int status = 0; int i; diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c b/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c index 177f04d..3ee3d40 100644 --- a/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c +++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c @@ -66,7 +66,7 @@ typedef struct { HTC_PACKET_QUEUE SendQueue; /* write queue holding HCI Command and ACL packets */ HTC_PACKET_QUEUE HCIACLRecvBuffers; /* recv queue holding buffers for incomming ACL packets */ HTC_PACKET_QUEUE HCIEventBuffers; /* recv queue holding buffers for incomming event packets */ - AR6K_DEVICE *pDev; + struct ar6k_device *pDev; A_MUTEX_T HCIRxLock; A_MUTEX_T HCITxLock; int CreditsMax; @@ -846,7 +846,7 @@ static void FlushRecvBuffers(GMBOX_PROTO_HCI_UART *pProt) /*** protocol module install entry point ***/ -int GMboxProtocolInstall(AR6K_DEVICE *pDev) +int GMboxProtocolInstall(struct ar6k_device *pDev) { int status = 0; GMBOX_PROTO_HCI_UART *pProtocol = NULL; @@ -889,7 +889,7 @@ int GMboxProtocolInstall(AR6K_DEVICE *pDev) } /*** protocol module uninstall entry point ***/ -void GMboxProtocolUninstall(AR6K_DEVICE *pDev) +void GMboxProtocolUninstall(struct ar6k_device *pDev) { GMBOX_PROTO_HCI_UART *pProtocol = (GMBOX_PROTO_HCI_UART *)DEV_GMBOX_GET_PROTOCOL(pDev); @@ -939,7 +939,7 @@ static int NotifyTransportReady(GMBOX_PROTO_HCI_UART *pProt) HCI_TRANSPORT_HANDLE HCI_TransportAttach(void *HTCHandle, HCI_TRANSPORT_CONFIG_INFO *pInfo) { GMBOX_PROTO_HCI_UART *pProtocol = NULL; - AR6K_DEVICE *pDev; + struct ar6k_device *pDev; AR_DEBUG_PRINTF(ATH_DEBUG_TRC,("+HCI_TransportAttach \n")); @@ -984,7 +984,7 @@ HCI_TRANSPORT_HANDLE HCI_TransportAttach(void *HTCHandle, HCI_TRANSPORT_CONFIG_I void HCI_TransportDetach(HCI_TRANSPORT_HANDLE HciTrans) { GMBOX_PROTO_HCI_UART *pProtocol = (GMBOX_PROTO_HCI_UART *)HciTrans; - AR6K_DEVICE *pDev = pProtocol->pDev; + struct ar6k_device *pDev = pProtocol->pDev; AR_DEBUG_PRINTF(ATH_DEBUG_TRC,("+HCI_TransportDetach \n")); diff --git a/drivers/staging/ath6kl/htc2/htc.c b/drivers/staging/ath6kl/htc2/htc.c index c200cfd..8bde7bf 100644 --- a/drivers/staging/ath6kl/htc2/htc.c +++ b/drivers/staging/ath6kl/htc2/htc.c @@ -573,7 +573,7 @@ bool HTCGetEndpointStatistics(HTC_HANDLE HTCHandle, #endif } -AR6K_DEVICE *HTCGetAR6KDevice(void *HTCHandle) +struct ar6k_device *HTCGetAR6KDevice(void *HTCHandle) { HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); return &target->Device; diff --git a/drivers/staging/ath6kl/htc2/htc_internal.h b/drivers/staging/ath6kl/htc2/htc_internal.h index 73f6ed9..8bc3162 100644 --- a/drivers/staging/ath6kl/htc2/htc_internal.h +++ b/drivers/staging/ath6kl/htc2/htc_internal.h @@ -122,7 +122,7 @@ typedef struct _HTC_TARGET { A_MUTEX_T HTCLock; A_MUTEX_T HTCRxLock; A_MUTEX_T HTCTxLock; - AR6K_DEVICE Device; /* AR6K - specific state */ + struct ar6k_device Device; /* AR6K - specific state */ u32 OpStateFlags; u32 RecvStateFlags; HTC_ENDPOINT_ID EpWaitingForBuffers; -- 1.7.4.15.g7811d From 2b032d4c35b14822943066a71b70647357f0c9a2 Mon Sep 17 00:00:00 2001 From: Luis R. Rodriguez Date: Mon, 28 Feb 2011 08:37:39 -0800 Subject: [PATCH 10/58] ath6kl: remove-typedef AR6K_GMBOX_CTRL_REGISTERS remove-typedef -s AR6K_GMBOX_CTRL_REGISTERS \ "struct ar6k_gmbox_ctrl_registers" drivers/staging/ath6k Cc: Naveen Singh Signed-off-by: Luis R. Rodriguez --- drivers/staging/ath6kl/htc2/AR6000/ar6k.h | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k.h b/drivers/staging/ath6kl/htc2/AR6000/ar6k.h index ebcc82b..e8b638c 100644 --- a/drivers/staging/ath6kl/htc2/AR6000/ar6k.h +++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k.h @@ -65,9 +65,9 @@ typedef PREPACK struct _AR6K_IRQ_ENABLE_REGISTERS { u8 counter_int_status_enable; } POSTPACK AR6K_IRQ_ENABLE_REGISTERS; -typedef PREPACK struct _AR6K_GMBOX_CTRL_REGISTERS { +PREPACK struct ar6k_gmbox_ctrl_registers { u8 int_status_enable; -} POSTPACK AR6K_GMBOX_CTRL_REGISTERS; +} POSTPACK; #include "athendpack.h" @@ -139,7 +139,7 @@ struct ar6k_device { int MaxSendBundleSize; AR6K_GMBOX_INFO GMboxInfo; bool GMboxEnabled; - AR6K_GMBOX_CTRL_REGISTERS GMboxControlRegisters; + struct ar6k_gmbox_ctrl_registers GMboxControlRegisters; int RecheckIRQStatusCnt; }; -- 1.7.4.15.g7811d From 2788ca2e2f676ff4f30cc61d89fc14ae29f3eedb Mon Sep 17 00:00:00 2001 From: Luis R. Rodriguez Date: Mon, 28 Feb 2011 08:43:48 -0800 Subject: [PATCH 11/58] ath6kl: remove-typedef AR6K_GMBOX_INFO remove-typedef -s AR6K_GMBOX_INFO \ "struct ar6k_gmbox_info" drivers/staging/ath6kl/ Cc: Naveen Singh Signed-off-by: Luis R. Rodriguez --- drivers/staging/ath6kl/htc2/AR6000/ar6k.h | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k.h b/drivers/staging/ath6kl/htc2/AR6000/ar6k.h index e8b638c..0bee46a 100644 --- a/drivers/staging/ath6kl/htc2/AR6000/ar6k.h +++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k.h @@ -96,14 +96,14 @@ struct ar6k_async_reg_io_buffer { u8 _Pad2[A_CACHE_LINE_PAD]; }; -typedef struct _AR6K_GMBOX_INFO { +struct ar6k_gmbox_info { void *pProtocolContext; int (*pMessagePendingCallBack)(void *pContext, u8 LookAheadBytes[], int ValidBytes); int (*pCreditsPendingCallback)(void *pContext, int NumCredits, bool CreditIRQEnabled); void (*pTargetFailureCallback)(void *pContext, int Status); void (*pStateDumpCallback)(void *pContext); bool CreditCountIRQEnabled; -} AR6K_GMBOX_INFO; +}; struct ar6k_device { A_MUTEX_T Lock; @@ -137,7 +137,7 @@ struct ar6k_device { bool ScatterIsVirtual; int MaxRecvBundleSize; int MaxSendBundleSize; - AR6K_GMBOX_INFO GMboxInfo; + struct ar6k_gmbox_info GMboxInfo; bool GMboxEnabled; struct ar6k_gmbox_ctrl_registers GMboxControlRegisters; int RecheckIRQStatusCnt; -- 1.7.4.15.g7811d From d23c47b498362ffc037c622c840ded3e07467d74 Mon Sep 17 00:00:00 2001 From: Luis R. Rodriguez Date: Mon, 28 Feb 2011 09:22:10 -0800 Subject: [PATCH 12/58] ath6kl: remove-typedef AR6K_HCI_BRIDGE_INFO remove-typedef -s AR6K_HCI_BRIDGE_INFO \ "struct ar6k_hci_bridge_info" drivers/staging/ath6kl/ Cc: Naveen Singh Signed-off-by: Luis R. Rodriguez --- drivers/staging/ath6kl/os/linux/hci_bridge.c | 88 +++++++++++++------------- 1 files changed, 44 insertions(+), 44 deletions(-) diff --git a/drivers/staging/ath6kl/os/linux/hci_bridge.c b/drivers/staging/ath6kl/os/linux/hci_bridge.c index ee52d11..a02827b 100644 --- a/drivers/staging/ath6kl/os/linux/hci_bridge.c +++ b/drivers/staging/ath6kl/os/linux/hci_bridge.c @@ -73,7 +73,7 @@ extern unsigned int hciuartscale; extern unsigned int hciuartstep; #endif /* EXPORT_HCI_BRIDGE_INTERFACE */ -typedef struct { +struct ar6k_hci_bridge_info { void *pHCIDev; /* HCI bridge device */ HCI_TRANSPORT_PROPERTIES HCIProps; /* HCI bridge props */ struct hci_dev *pBtStackHCIDev; /* BT Stack HCI dev */ @@ -87,7 +87,7 @@ typedef struct { #else AR_SOFTC_T *ar; #endif /* EXPORT_HCI_BRIDGE_INTERFACE */ -} AR6K_HCI_BRIDGE_INFO; +}; #define MAX_ACL_RECV_BUFS 16 #define MAX_EVT_RECV_BUFS 8 @@ -103,17 +103,17 @@ extern unsigned int setupbtdev; struct ar3k_config_info ar3kconfig; #ifdef EXPORT_HCI_BRIDGE_INTERFACE -AR6K_HCI_BRIDGE_INFO *g_pHcidevInfo; +struct ar6k_hci_bridge_info *g_pHcidevInfo; #endif -static int bt_setup_hci(AR6K_HCI_BRIDGE_INFO *pHcidevInfo); -static void bt_cleanup_hci(AR6K_HCI_BRIDGE_INFO *pHcidevInfo); -static int bt_register_hci(AR6K_HCI_BRIDGE_INFO *pHcidevInfo); -static bool bt_indicate_recv(AR6K_HCI_BRIDGE_INFO *pHcidevInfo, +static int bt_setup_hci(struct ar6k_hci_bridge_info *pHcidevInfo); +static void bt_cleanup_hci(struct ar6k_hci_bridge_info *pHcidevInfo); +static int bt_register_hci(struct ar6k_hci_bridge_info *pHcidevInfo); +static bool bt_indicate_recv(struct ar6k_hci_bridge_info *pHcidevInfo, HCI_TRANSPORT_PACKET_TYPE Type, struct sk_buff *skb); -static struct sk_buff *bt_alloc_buffer(AR6K_HCI_BRIDGE_INFO *pHcidevInfo, int Length); -static void bt_free_buffer(AR6K_HCI_BRIDGE_INFO *pHcidevInfo, struct sk_buff *skb); +static struct sk_buff *bt_alloc_buffer(struct ar6k_hci_bridge_info *pHcidevInfo, int Length); +static void bt_free_buffer(struct ar6k_hci_bridge_info *pHcidevInfo, struct sk_buff *skb); #ifdef EXPORT_HCI_BRIDGE_INTERFACE int ar6000_setup_hci(void *ar); @@ -129,7 +129,7 @@ int hci_test_send(AR_SOFTC_T *ar, struct sk_buff *skb); #define LOCK_BRIDGE(dev) spin_lock_bh(&(dev)->BridgeLock) #define UNLOCK_BRIDGE(dev) spin_unlock_bh(&(dev)->BridgeLock) -static inline void FreeBtOsBuf(AR6K_HCI_BRIDGE_INFO *pHcidevInfo, void *osbuf) +static inline void FreeBtOsBuf(struct ar6k_hci_bridge_info *pHcidevInfo, void *osbuf) { if (pHcidevInfo->HciNormalMode) { bt_free_buffer(pHcidevInfo, (struct sk_buff *)osbuf); @@ -139,14 +139,14 @@ static inline void FreeBtOsBuf(AR6K_HCI_BRIDGE_INFO *pHcidevInfo, void *osbuf) } } -static void FreeHTCStruct(AR6K_HCI_BRIDGE_INFO *pHcidevInfo, HTC_PACKET *pPacket) +static void FreeHTCStruct(struct ar6k_hci_bridge_info *pHcidevInfo, HTC_PACKET *pPacket) { LOCK_BRIDGE(pHcidevInfo); HTC_PACKET_ENQUEUE(&pHcidevInfo->HTCPacketStructHead,pPacket); UNLOCK_BRIDGE(pHcidevInfo); } -static HTC_PACKET * AllocHTCStruct(AR6K_HCI_BRIDGE_INFO *pHcidevInfo) +static HTC_PACKET * AllocHTCStruct(struct ar6k_hci_bridge_info *pHcidevInfo) { HTC_PACKET *pPacket = NULL; LOCK_BRIDGE(pHcidevInfo); @@ -157,7 +157,7 @@ static HTC_PACKET * AllocHTCStruct(AR6K_HCI_BRIDGE_INFO *pHcidevInfo) #define BLOCK_ROUND_UP_PWR2(x, align) (((int) (x) + ((align)-1)) & ~((align)-1)) -static void RefillRecvBuffers(AR6K_HCI_BRIDGE_INFO *pHcidevInfo, +static void RefillRecvBuffers(struct ar6k_hci_bridge_info *pHcidevInfo, HCI_TRANSPORT_PACKET_TYPE Type, int NumBuffers) { @@ -219,7 +219,7 @@ static int ar6000_hci_transport_ready(HCI_TRANSPORT_HANDLE HCIHandle, HCI_TRANSPORT_PROPERTIES *pProps, void *pContext) { - AR6K_HCI_BRIDGE_INFO *pHcidevInfo = (AR6K_HCI_BRIDGE_INFO *)pContext; + struct ar6k_hci_bridge_info *pHcidevInfo = (struct ar6k_hci_bridge_info *)pContext; int status; u32 address, hci_uart_pwr_mgmt_params; // struct ar3k_config_info ar3kconfig; @@ -325,7 +325,7 @@ static int ar6000_hci_transport_ready(HCI_TRANSPORT_HANDLE HCIHandle, static void ar6000_hci_transport_failure(void *pContext, int Status) { - AR6K_HCI_BRIDGE_INFO *pHcidevInfo = (AR6K_HCI_BRIDGE_INFO *)pContext; + struct ar6k_hci_bridge_info *pHcidevInfo = (struct ar6k_hci_bridge_info *)pContext; AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("HCI Bridge: transport failure! \n")); @@ -336,7 +336,7 @@ static void ar6000_hci_transport_failure(void *pContext, int Status) static void ar6000_hci_transport_removed(void *pContext) { - AR6K_HCI_BRIDGE_INFO *pHcidevInfo = (AR6K_HCI_BRIDGE_INFO *)pContext; + struct ar6k_hci_bridge_info *pHcidevInfo = (struct ar6k_hci_bridge_info *)pContext; AR_DEBUG_PRINTF(ATH_DEBUG_HCI_BRIDGE, ("HCI Bridge: transport removed. \n")); @@ -349,7 +349,7 @@ static void ar6000_hci_transport_removed(void *pContext) static void ar6000_hci_send_complete(void *pContext, HTC_PACKET *pPacket) { - AR6K_HCI_BRIDGE_INFO *pHcidevInfo = (AR6K_HCI_BRIDGE_INFO *)pContext; + struct ar6k_hci_bridge_info *pHcidevInfo = (struct ar6k_hci_bridge_info *)pContext; void *osbuf = pPacket->pPktContext; A_ASSERT(osbuf != NULL); A_ASSERT(pHcidevInfo != NULL); @@ -367,7 +367,7 @@ static void ar6000_hci_send_complete(void *pContext, HTC_PACKET *pPacket) static void ar6000_hci_pkt_recv(void *pContext, HTC_PACKET *pPacket) { - AR6K_HCI_BRIDGE_INFO *pHcidevInfo = (AR6K_HCI_BRIDGE_INFO *)pContext; + struct ar6k_hci_bridge_info *pHcidevInfo = (struct ar6k_hci_bridge_info *)pContext; struct sk_buff *skb; A_ASSERT(pHcidevInfo != NULL); @@ -432,7 +432,7 @@ static void ar6000_hci_pkt_recv(void *pContext, HTC_PACKET *pPacket) static void ar6000_hci_pkt_refill(void *pContext, HCI_TRANSPORT_PACKET_TYPE Type, int BuffersAvailable) { - AR6K_HCI_BRIDGE_INFO *pHcidevInfo = (AR6K_HCI_BRIDGE_INFO *)pContext; + struct ar6k_hci_bridge_info *pHcidevInfo = (struct ar6k_hci_bridge_info *)pContext; int refillCount; if (Type == HCI_ACL_TYPE) { @@ -449,7 +449,7 @@ static void ar6000_hci_pkt_refill(void *pContext, HCI_TRANSPORT_PACKET_TYPE Typ static HCI_SEND_FULL_ACTION ar6000_hci_pkt_send_full(void *pContext, HTC_PACKET *pPacket) { - AR6K_HCI_BRIDGE_INFO *pHcidevInfo = (AR6K_HCI_BRIDGE_INFO *)pContext; + struct ar6k_hci_bridge_info *pHcidevInfo = (struct ar6k_hci_bridge_info *)pContext; HCI_SEND_FULL_ACTION action = HCI_SEND_FULL_KEEP; if (!pHcidevInfo->HciNormalMode) { @@ -473,19 +473,19 @@ int ar6000_setup_hci(AR_SOFTC_T *ar) int status = 0; int i; HTC_PACKET *pPacket; - AR6K_HCI_BRIDGE_INFO *pHcidevInfo; + struct ar6k_hci_bridge_info *pHcidevInfo; do { - pHcidevInfo = (AR6K_HCI_BRIDGE_INFO *)A_MALLOC(sizeof(AR6K_HCI_BRIDGE_INFO)); + pHcidevInfo = (struct ar6k_hci_bridge_info *)A_MALLOC(sizeof(struct ar6k_hci_bridge_info)); if (NULL == pHcidevInfo) { status = A_NO_MEMORY; break; } - A_MEMZERO(pHcidevInfo, sizeof(AR6K_HCI_BRIDGE_INFO)); + A_MEMZERO(pHcidevInfo, sizeof(struct ar6k_hci_bridge_info)); #ifdef EXPORT_HCI_BRIDGE_INTERFACE g_pHcidevInfo = pHcidevInfo; pHcidevInfo->HCITransHdl = *(HCI_TRANSPORT_MISC_HANDLES *)ar; @@ -567,9 +567,9 @@ void ar6000_cleanup_hci(AR_SOFTC_T *ar) #endif { #ifdef EXPORT_HCI_BRIDGE_INTERFACE - AR6K_HCI_BRIDGE_INFO *pHcidevInfo = g_pHcidevInfo; + struct ar6k_hci_bridge_info *pHcidevInfo = g_pHcidevInfo; #else - AR6K_HCI_BRIDGE_INFO *pHcidevInfo = (AR6K_HCI_BRIDGE_INFO *)ar->hcidev_info; + struct ar6k_hci_bridge_info *pHcidevInfo = (struct ar6k_hci_bridge_info *)ar->hcidev_info; #endif if (pHcidevInfo != NULL) { @@ -607,9 +607,9 @@ int hci_test_send(AR_SOFTC_T *ar, struct sk_buff *skb) HTC_PACKET *pPacket; HTC_TX_TAG htc_tag = AR6K_DATA_PKT_TAG; #ifdef EXPORT_HCI_BRIDGE_INTERFACE - AR6K_HCI_BRIDGE_INFO *pHcidevInfo = g_pHcidevInfo; + struct ar6k_hci_bridge_info *pHcidevInfo = g_pHcidevInfo; #else - AR6K_HCI_BRIDGE_INFO *pHcidevInfo = (AR6K_HCI_BRIDGE_INFO *)ar->hcidev_info; + struct ar6k_hci_bridge_info *pHcidevInfo = (struct ar6k_hci_bridge_info *)ar->hcidev_info; #endif do { @@ -666,7 +666,7 @@ int hci_test_send(AR_SOFTC_T *ar, struct sk_buff *skb) void ar6000_set_default_ar3kconfig(AR_SOFTC_T *ar, void *ar3kconfig) { - AR6K_HCI_BRIDGE_INFO *pHcidevInfo = (AR6K_HCI_BRIDGE_INFO *)ar->hcidev_info; + struct ar6k_hci_bridge_info *pHcidevInfo = (struct ar6k_hci_bridge_info *)ar->hcidev_info; struct ar3k_config_info *config = (struct ar3k_config_info *)ar3kconfig; config->pHCIDev = pHcidevInfo->pHCIDev; @@ -710,7 +710,7 @@ static int bt_send_frame(struct sk_buff *skb) { struct hci_dev *hdev = (struct hci_dev *)skb->dev; HCI_TRANSPORT_PACKET_TYPE type; - AR6K_HCI_BRIDGE_INFO *pHcidevInfo; + struct ar6k_hci_bridge_info *pHcidevInfo; HTC_PACKET *pPacket; int status = 0; struct sk_buff *txSkb = NULL; @@ -725,7 +725,7 @@ static int bt_send_frame(struct sk_buff *skb) return -EBUSY; } - pHcidevInfo = (AR6K_HCI_BRIDGE_INFO *)hdev->driver_data; + pHcidevInfo = (struct ar6k_hci_bridge_info *)hdev->driver_data; A_ASSERT(pHcidevInfo != NULL); AR_DEBUG_PRINTF(ATH_DEBUG_HCI_SEND, ("+bt_send_frame type: %d \n",bt_cb(skb)->pkt_type)); @@ -832,11 +832,11 @@ static int bt_ioctl(struct hci_dev *hdev, unsigned int cmd, unsigned long arg) */ static int bt_flush(struct hci_dev *hdev) { - AR6K_HCI_BRIDGE_INFO *pHcidevInfo; + struct ar6k_hci_bridge_info *pHcidevInfo; AR_DEBUG_PRINTF(ATH_DEBUG_TRC, ("HCI Bridge: bt_flush - enter\n")); - pHcidevInfo = (AR6K_HCI_BRIDGE_INFO *)hdev->driver_data; + pHcidevInfo = (struct ar6k_hci_bridge_info *)hdev->driver_data; /* TODO??? */ @@ -853,7 +853,7 @@ static void bt_destruct(struct hci_dev *hdev) /* nothing to do here */ } -static int bt_setup_hci(AR6K_HCI_BRIDGE_INFO *pHcidevInfo) +static int bt_setup_hci(struct ar6k_hci_bridge_info *pHcidevInfo) { int status = 0; struct hci_dev *pHciDev = NULL; @@ -913,7 +913,7 @@ static int bt_setup_hci(AR6K_HCI_BRIDGE_INFO *pHcidevInfo) return status; } -static void bt_cleanup_hci(AR6K_HCI_BRIDGE_INFO *pHcidevInfo) +static void bt_cleanup_hci(struct ar6k_hci_bridge_info *pHcidevInfo) { int err; @@ -935,7 +935,7 @@ static void bt_cleanup_hci(AR6K_HCI_BRIDGE_INFO *pHcidevInfo) } } -static int bt_register_hci(AR6K_HCI_BRIDGE_INFO *pHcidevInfo) +static int bt_register_hci(struct ar6k_hci_bridge_info *pHcidevInfo) { int err; int status = 0; @@ -959,7 +959,7 @@ static int bt_register_hci(AR6K_HCI_BRIDGE_INFO *pHcidevInfo) return status; } -static bool bt_indicate_recv(AR6K_HCI_BRIDGE_INFO *pHcidevInfo, +static bool bt_indicate_recv(struct ar6k_hci_bridge_info *pHcidevInfo, HCI_TRANSPORT_PACKET_TYPE Type, struct sk_buff *skb) { @@ -1022,7 +1022,7 @@ static bool bt_indicate_recv(AR6K_HCI_BRIDGE_INFO *pHcidevInfo, return success; } -static struct sk_buff* bt_alloc_buffer(AR6K_HCI_BRIDGE_INFO *pHcidevInfo, int Length) +static struct sk_buff* bt_alloc_buffer(struct ar6k_hci_bridge_info *pHcidevInfo, int Length) { struct sk_buff *skb; /* in normal HCI mode we need to alloc from the bt core APIs */ @@ -1033,7 +1033,7 @@ static struct sk_buff* bt_alloc_buffer(AR6K_HCI_BRIDGE_INFO *pHcidevInfo, int Le return skb; } -static void bt_free_buffer(AR6K_HCI_BRIDGE_INFO *pHcidevInfo, struct sk_buff *skb) +static void bt_free_buffer(struct ar6k_hci_bridge_info *pHcidevInfo, struct sk_buff *skb) { kfree_skb(skb); } @@ -1041,21 +1041,21 @@ static void bt_free_buffer(AR6K_HCI_BRIDGE_INFO *pHcidevInfo, struct sk_buff *sk #else // { CONFIG_BLUEZ_HCI_BRIDGE /* stubs when we only want to test the HCI bridging Interface without the HT stack */ -static int bt_setup_hci(AR6K_HCI_BRIDGE_INFO *pHcidevInfo) +static int bt_setup_hci(struct ar6k_hci_bridge_info *pHcidevInfo) { return 0; } -static void bt_cleanup_hci(AR6K_HCI_BRIDGE_INFO *pHcidevInfo) +static void bt_cleanup_hci(struct ar6k_hci_bridge_info *pHcidevInfo) { } -static int bt_register_hci(AR6K_HCI_BRIDGE_INFO *pHcidevInfo) +static int bt_register_hci(struct ar6k_hci_bridge_info *pHcidevInfo) { A_ASSERT(false); return A_ERROR; } -static bool bt_indicate_recv(AR6K_HCI_BRIDGE_INFO *pHcidevInfo, +static bool bt_indicate_recv(struct ar6k_hci_bridge_info *pHcidevInfo, HCI_TRANSPORT_PACKET_TYPE Type, struct sk_buff *skb) { @@ -1063,12 +1063,12 @@ static bool bt_indicate_recv(AR6K_HCI_BRIDGE_INFO *pHcidevInfo, return false; } -static struct sk_buff* bt_alloc_buffer(AR6K_HCI_BRIDGE_INFO *pHcidevInfo, int Length) +static struct sk_buff* bt_alloc_buffer(struct ar6k_hci_bridge_info *pHcidevInfo, int Length) { A_ASSERT(false); return NULL; } -static void bt_free_buffer(AR6K_HCI_BRIDGE_INFO *pHcidevInfo, struct sk_buff *skb) +static void bt_free_buffer(struct ar6k_hci_bridge_info *pHcidevInfo, struct sk_buff *skb) { A_ASSERT(false); } -- 1.7.4.15.g7811d From 259af34d8c2bb2feafd2c4bd6fea60e74b0992b8 Mon Sep 17 00:00:00 2001 From: Luis R. Rodriguez Date: Mon, 28 Feb 2011 10:47:29 -0800 Subject: [PATCH 13/58] ath6kl: remove-typedef AR6K_IRQ_ENABLE_REGISTERS remove-typedef -s AR6K_IRQ_ENABLE_REGISTERS \ "struct ar6k_irq_enable_registers" drivers/staging/ath6kl/ Cc: Naveen Singh Signed-off-by: Luis R. Rodriguez --- drivers/staging/ath6kl/htc2/AR6000/ar6k.c | 8 ++++---- drivers/staging/ath6kl/htc2/AR6000/ar6k.h | 10 +++++----- drivers/staging/ath6kl/htc2/AR6000/ar6k_events.c | 2 +- drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox.c | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k.c b/drivers/staging/ath6kl/htc2/AR6000/ar6k.c index 85d45a7..77fa618 100644 --- a/drivers/staging/ath6kl/htc2/AR6000/ar6k.c +++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k.c @@ -219,7 +219,7 @@ int DevSetup(struct ar6k_device *pDev) int DevEnableInterrupts(struct ar6k_device *pDev) { int status; - AR6K_IRQ_ENABLE_REGISTERS regs; + struct ar6k_irq_enable_registers regs; LOCK_AR6K(pDev); @@ -278,7 +278,7 @@ int DevEnableInterrupts(struct ar6k_device *pDev) int DevDisableInterrupts(struct ar6k_device *pDev) { - AR6K_IRQ_ENABLE_REGISTERS regs; + struct ar6k_irq_enable_registers regs; LOCK_AR6K(pDev); /* Disable all interrupts */ @@ -407,7 +407,7 @@ static int DevDoEnableDisableRecvNormal(struct ar6k_device *pDev, bool EnableRec { int status = 0; HTC_PACKET *pIOPacket = NULL; - AR6K_IRQ_ENABLE_REGISTERS regs; + struct ar6k_irq_enable_registers regs; /* take the lock to protect interrupt enable shadows */ LOCK_AR6K(pDev); @@ -538,7 +538,7 @@ int DevWaitForPendingRecv(struct ar6k_device *pDev,u32 TimeoutInMs,bool *pbIsRec void DevDumpRegisters(struct ar6k_device *pDev, AR6K_IRQ_PROC_REGISTERS *pIrqProcRegs, - AR6K_IRQ_ENABLE_REGISTERS *pIrqEnableRegs) + struct ar6k_irq_enable_registers *pIrqEnableRegs) { AR_DEBUG_PRINTF(ATH_DEBUG_ANY, ("\n<------- Register Table -------->\n")); diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k.h b/drivers/staging/ath6kl/htc2/AR6000/ar6k.h index 0bee46a..fc781d1 100644 --- a/drivers/staging/ath6kl/htc2/AR6000/ar6k.h +++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k.h @@ -58,12 +58,12 @@ typedef PREPACK struct _AR6K_IRQ_PROC_REGISTERS { #define AR6K_IRQ_PROC_REGS_SIZE sizeof(AR6K_IRQ_PROC_REGISTERS) -typedef PREPACK struct _AR6K_IRQ_ENABLE_REGISTERS { +PREPACK struct ar6k_irq_enable_registers { u8 int_status_enable; u8 cpu_int_status_enable; u8 error_status_enable; u8 counter_int_status_enable; -} POSTPACK AR6K_IRQ_ENABLE_REGISTERS; +} POSTPACK; PREPACK struct ar6k_gmbox_ctrl_registers { u8 int_status_enable; @@ -71,7 +71,7 @@ PREPACK struct ar6k_gmbox_ctrl_registers { #include "athendpack.h" -#define AR6K_IRQ_ENABLE_REGS_SIZE sizeof(AR6K_IRQ_ENABLE_REGISTERS) +#define AR6K_IRQ_ENABLE_REGS_SIZE sizeof(struct ar6k_irq_enable_registers) #define AR6K_REG_IO_BUFFER_SIZE 32 #define AR6K_MAX_REG_IO_BUFFERS 8 @@ -110,7 +110,7 @@ struct ar6k_device { u8 _Pad1[A_CACHE_LINE_PAD]; AR6K_IRQ_PROC_REGISTERS IrqProcRegisters; /* cache-line safe with pads around */ u8 _Pad2[A_CACHE_LINE_PAD]; - AR6K_IRQ_ENABLE_REGISTERS IrqEnableRegisters; /* cache-line safe with pads around */ + struct ar6k_irq_enable_registers IrqEnableRegisters; /* cache-line safe with pads around */ u8 _Pad3[A_CACHE_LINE_PAD]; void *HIFDevice; u32 BlockSize; @@ -160,7 +160,7 @@ int DevCheckPendingRecvMsgsAsync(void *context); void DevAsyncIrqProcessComplete(struct ar6k_device *pDev); void DevDumpRegisters(struct ar6k_device *pDev, AR6K_IRQ_PROC_REGISTERS *pIrqProcRegs, - AR6K_IRQ_ENABLE_REGISTERS *pIrqEnableRegs); + struct ar6k_irq_enable_registers *pIrqEnableRegs); #define DEV_STOP_RECV_ASYNC true #define DEV_STOP_RECV_SYNC false diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k_events.c b/drivers/staging/ath6kl/htc2/AR6000/ar6k_events.c index aa45590..3aafbea 100644 --- a/drivers/staging/ath6kl/htc2/AR6000/ar6k_events.c +++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k_events.c @@ -747,7 +747,7 @@ int DevDsrHandler(void *context) void DumpAR6KDevState(struct ar6k_device *pDev) { int status; - AR6K_IRQ_ENABLE_REGISTERS regs; + struct ar6k_irq_enable_registers regs; AR6K_IRQ_PROC_REGISTERS procRegs; LOCK_AR6K(pDev); diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox.c b/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox.c index cbfbdea..1b44d07 100644 --- a/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox.c +++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox.c @@ -77,7 +77,7 @@ static void DevGMboxIRQActionAsyncHandler(void *Context, HTC_PACKET *pPacket) static int DevGMboxCounterEnableDisable(struct ar6k_device *pDev, GMBOX_IRQ_ACTION_TYPE IrqAction, bool AsyncMode) { int status = 0; - AR6K_IRQ_ENABLE_REGISTERS regs; + struct ar6k_irq_enable_registers regs; HTC_PACKET *pIOPacket = NULL; LOCK_AR6K(pDev); -- 1.7.4.15.g7811d From 01079574d46fa86dcdda24571e72b93fb3b35fce Mon Sep 17 00:00:00 2001 From: Luis R. Rodriguez Date: Mon, 28 Feb 2011 10:53:33 -0800 Subject: [PATCH 14/58] ath6kl: remove-typedef AR6K_IRQ_PROC_REGISTERS remove-typedef -s AR6K_IRQ_PROC_REGISTERS \ "struct ar6k_irq_proc_registers" drivers/staging/ath6kl/ Cc: Naveen Singh Signed-off-by: Luis R. Rodriguez --- drivers/staging/ath6kl/htc2/AR6000/ar6k.c | 2 +- drivers/staging/ath6kl/htc2/AR6000/ar6k.h | 10 +++++----- drivers/staging/ath6kl/htc2/AR6000/ar6k_events.c | 4 ++-- drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox.c | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k.c b/drivers/staging/ath6kl/htc2/AR6000/ar6k.c index 77fa618..bdaffd7 100644 --- a/drivers/staging/ath6kl/htc2/AR6000/ar6k.c +++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k.c @@ -537,7 +537,7 @@ int DevWaitForPendingRecv(struct ar6k_device *pDev,u32 TimeoutInMs,bool *pbIsRec } void DevDumpRegisters(struct ar6k_device *pDev, - AR6K_IRQ_PROC_REGISTERS *pIrqProcRegs, + struct ar6k_irq_proc_registers *pIrqProcRegs, struct ar6k_irq_enable_registers *pIrqEnableRegs) { diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k.h b/drivers/staging/ath6kl/htc2/AR6000/ar6k.h index fc781d1..247cf56 100644 --- a/drivers/staging/ath6kl/htc2/AR6000/ar6k.h +++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k.h @@ -43,7 +43,7 @@ //#define MBOXHW_UNIT_TEST 1 #include "athstartpack.h" -typedef PREPACK struct _AR6K_IRQ_PROC_REGISTERS { +PREPACK struct ar6k_irq_proc_registers { u8 host_int_status; u8 cpu_int_status; u8 error_int_status; @@ -54,9 +54,9 @@ typedef PREPACK struct _AR6K_IRQ_PROC_REGISTERS { u8 gmbox_rx_avail; u32 rx_lookahead[2]; u32 rx_gmbox_lookahead_alias[2]; -} POSTPACK AR6K_IRQ_PROC_REGISTERS; +} POSTPACK; -#define AR6K_IRQ_PROC_REGS_SIZE sizeof(AR6K_IRQ_PROC_REGISTERS) +#define AR6K_IRQ_PROC_REGS_SIZE sizeof(struct ar6k_irq_proc_registers) PREPACK struct ar6k_irq_enable_registers { u8 int_status_enable; @@ -108,7 +108,7 @@ struct ar6k_gmbox_info { struct ar6k_device { A_MUTEX_T Lock; u8 _Pad1[A_CACHE_LINE_PAD]; - AR6K_IRQ_PROC_REGISTERS IrqProcRegisters; /* cache-line safe with pads around */ + struct ar6k_irq_proc_registers IrqProcRegisters; /* cache-line safe with pads around */ u8 _Pad2[A_CACHE_LINE_PAD]; struct ar6k_irq_enable_registers IrqEnableRegisters; /* cache-line safe with pads around */ u8 _Pad3[A_CACHE_LINE_PAD]; @@ -159,7 +159,7 @@ int DevDsrHandler(void *context); int DevCheckPendingRecvMsgsAsync(void *context); void DevAsyncIrqProcessComplete(struct ar6k_device *pDev); void DevDumpRegisters(struct ar6k_device *pDev, - AR6K_IRQ_PROC_REGISTERS *pIrqProcRegs, + struct ar6k_irq_proc_registers *pIrqProcRegs, struct ar6k_irq_enable_registers *pIrqEnableRegs); #define DEV_STOP_RECV_ASYNC true diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k_events.c b/drivers/staging/ath6kl/htc2/AR6000/ar6k_events.c index 3aafbea..bac4f93 100644 --- a/drivers/staging/ath6kl/htc2/AR6000/ar6k_events.c +++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k_events.c @@ -331,7 +331,7 @@ static void DevGetEventAsyncHandler(void *Context, HTC_PACKET *pPacket) } } else { /* standard interrupt table handling.... */ - AR6K_IRQ_PROC_REGISTERS *pReg = (AR6K_IRQ_PROC_REGISTERS *)pPacket->pBuffer; + struct ar6k_irq_proc_registers *pReg = (struct ar6k_irq_proc_registers *)pPacket->pBuffer; u8 host_int_status; host_int_status = pReg->host_int_status & pDev->IrqEnableRegisters.int_status_enable; @@ -748,7 +748,7 @@ void DumpAR6KDevState(struct ar6k_device *pDev) { int status; struct ar6k_irq_enable_registers regs; - AR6K_IRQ_PROC_REGISTERS procRegs; + struct ar6k_irq_proc_registers procRegs; LOCK_AR6K(pDev); /* copy into our temp area */ diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox.c b/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox.c index 1b44d07..106f9bf 100644 --- a/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox.c +++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox.c @@ -638,7 +638,7 @@ int DevGMboxRecvLookAheadPeek(struct ar6k_device *pDev, u8 *pLookAheadBuffer, in { int status = 0; - AR6K_IRQ_PROC_REGISTERS procRegs; + struct ar6k_irq_proc_registers procRegs; int maxCopy; do { -- 1.7.4.15.g7811d From db61060fb7953a5fbc6dcac3d731043bd21945cb Mon Sep 17 00:00:00 2001 From: Luis R. Rodriguez Date: Mon, 28 Feb 2011 10:56:25 -0800 Subject: [PATCH 15/58] ath6kl: remove-typedef AR_VIRTUAL_INTERFACE_T remove-typedef -s AR_VIRTUAL_INTERFACE_T \ "struct ar_virtual_interface" drivers/staging/ath6kl/ Cc: Naveen Singh Signed-off-by: Luis R. Rodriguez --- drivers/staging/ath6kl/os/linux/ar6000_drv.c | 12 ++++++------ .../staging/ath6kl/os/linux/include/ar6000_drv.h | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/staging/ath6kl/os/linux/ar6000_drv.c b/drivers/staging/ath6kl/os/linux/ar6000_drv.c index 3397995..e52a88a 100644 --- a/drivers/staging/ath6kl/os/linux/ar6000_drv.c +++ b/drivers/staging/ath6kl/os/linux/ar6000_drv.c @@ -6402,10 +6402,10 @@ static void DoHTCSendPktsTest(AR_SOFTC_T *ar, int MapNo, HTC_ENDPOINT_ID eid, st int ar6000_start_ap_interface(AR_SOFTC_T *ar) { - AR_VIRTUAL_INTERFACE_T *arApDev; + struct ar_virtual_interface *arApDev; /* Change net_device to point to AP instance */ - arApDev = (AR_VIRTUAL_INTERFACE_T *)ar->arApDev; + arApDev = (struct ar_virtual_interface *)ar->arApDev; ar->arNetDev = arApDev->arNetDev; return 0; @@ -6413,10 +6413,10 @@ int ar6000_start_ap_interface(AR_SOFTC_T *ar) int ar6000_stop_ap_interface(AR_SOFTC_T *ar) { - AR_VIRTUAL_INTERFACE_T *arApDev; + struct ar_virtual_interface *arApDev; /* Change net_device to point to sta instance */ - arApDev = (AR_VIRTUAL_INTERFACE_T *)ar->arApDev; + arApDev = (struct ar_virtual_interface *)ar->arApDev; if (arApDev) { ar->arNetDev = arApDev->arStaNetDev; } @@ -6428,9 +6428,9 @@ int ar6000_stop_ap_interface(AR_SOFTC_T *ar) int ar6000_create_ap_interface(AR_SOFTC_T *ar, char *ap_ifname) { struct net_device *dev; - AR_VIRTUAL_INTERFACE_T *arApDev; + struct ar_virtual_interface *arApDev; - dev = alloc_etherdev(sizeof(AR_VIRTUAL_INTERFACE_T)); + dev = alloc_etherdev(sizeof(struct ar_virtual_interface)); if (dev == NULL) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("ar6000_create_ap_interface: can't alloc etherdev\n")); return A_ERROR; diff --git a/drivers/staging/ath6kl/os/linux/include/ar6000_drv.h b/drivers/staging/ath6kl/os/linux/include/ar6000_drv.h index 0beba09..2c6f873 100644 --- a/drivers/staging/ath6kl/os/linux/include/ar6000_drv.h +++ b/drivers/staging/ath6kl/os/linux/include/ar6000_drv.h @@ -625,11 +625,11 @@ typedef struct ar6_softc { } AR_SOFTC_T; #ifdef CONFIG_AP_VIRTUAL_ADAPTER_SUPPORT -typedef struct { +struct ar_virtual_interface { struct net_device *arNetDev; /* net_device pointer */ AR_SOFTC_T *arDev; /* ar device pointer */ struct net_device *arStaNetDev; /* net_device pointer */ -} AR_VIRTUAL_INTERFACE_T; +}; #endif /* CONFIG_AP_VIRTUAL_ADAPTER_SUPPORT */ #ifdef ATH6K_CONFIG_CFG80211 @@ -645,7 +645,7 @@ static inline void *ar6k_priv(struct net_device *dev) if (arApNetDev == dev) { /* return arDev saved in virtual interface context */ - AR_VIRTUAL_INTERFACE_T *arVirDev; + struct ar_virtual_interface *arVirDev; arVirDev = netdev_priv(dev); return arVirDev->arDev; } else { -- 1.7.4.15.g7811d From 03db20e16504aabd376fab1555166bad5d9efac1 Mon Sep 17 00:00:00 2001 From: Luis R. Rodriguez Date: Mon, 28 Feb 2011 10:59:37 -0800 Subject: [PATCH 16/58] ath6kl: remove-typedef ATHBT_FILTER_INSTANCE We mark this as unused as well, given that I find no users, at a later time we can determine to nuke this or not... Cc: Naveen Singh Signed-off-by: Luis R. Rodriguez --- drivers/staging/ath6kl/include/athbtfilter.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/ath6kl/include/athbtfilter.h b/drivers/staging/ath6kl/include/athbtfilter.h index 378f967..81456ee 100644 --- a/drivers/staging/ath6kl/include/athbtfilter.h +++ b/drivers/staging/ath6kl/include/athbtfilter.h @@ -61,7 +61,7 @@ typedef enum _ATHBT_STATE { typedef void (*ATHBT_INDICATE_STATE_FN)(void *pContext, ATHBT_STATE_INDICATION Indication, ATHBT_STATE State, unsigned char LMPVersion); -typedef struct _ATHBT_FILTER_INSTANCE { +struct athbt_filter_instance { #ifdef UNDER_CE WCHAR *pWlanAdapterName; /* filled in by user */ #else @@ -74,7 +74,7 @@ typedef struct _ATHBT_FILTER_INSTANCE { ATHBT_FILTER_DATA_FN pFilterAclDataOut; /* function ptr to filter ACL data out (to radio) */ ATHBT_FILTER_DATA_FN pFilterAclDataIn; /* function ptr to filter ACL data in (from radio) */ ATHBT_INDICATE_STATE_FN pIndicateState; /* function ptr to indicate a state */ -} ATH_BT_FILTER_INSTANCE; +}; /* XXX: unused ? */ /* API MACROS */ -- 1.7.4.15.g7811d From 08b262ea38ab837d8e5c05b5e5e04186e753e766 Mon Sep 17 00:00:00 2001 From: Luis R. Rodriguez Date: Mon, 28 Feb 2011 11:01:54 -0800 Subject: [PATCH 17/58] ath6kl: remove-typedef ATH_DEBUG_MASK_DESCRIPTION remove-typedef -s ATH_DEBUG_MASK_DESCRIPTION \ "struct ath_debug_mask_description" drivers/staging/ath6kl/ Cc: Naveen Singh Signed-off-by: Luis R. Rodriguez --- drivers/staging/ath6kl/bmi/src/bmi.c | 2 +- drivers/staging/ath6kl/htc2/htc.c | 2 +- drivers/staging/ath6kl/include/a_debug.h | 10 +++++----- drivers/staging/ath6kl/miscdrv/common_drv.c | 2 +- drivers/staging/ath6kl/os/linux/ar6000_drv.c | 2 +- drivers/staging/ath6kl/os/linux/ar6000_pm.c | 2 +- drivers/staging/ath6kl/wlan/src/wlan_node.c | 2 +- drivers/staging/ath6kl/wmi/wmi.c | 2 +- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/staging/ath6kl/bmi/src/bmi.c b/drivers/staging/ath6kl/bmi/src/bmi.c index 37f7cbc..a9615b7 100644 --- a/drivers/staging/ath6kl/bmi/src/bmi.c +++ b/drivers/staging/ath6kl/bmi/src/bmi.c @@ -33,7 +33,7 @@ #include "bmi_internal.h" #ifdef ATH_DEBUG_MODULE -static ATH_DEBUG_MASK_DESCRIPTION bmi_debug_desc[] = { +static struct ath_debug_mask_description bmi_debug_desc[] = { { ATH_DEBUG_BMI , "BMI Tracing"}, }; diff --git a/drivers/staging/ath6kl/htc2/htc.c b/drivers/staging/ath6kl/htc2/htc.c index 8bde7bf..bb999b6 100644 --- a/drivers/staging/ath6kl/htc2/htc.c +++ b/drivers/staging/ath6kl/htc2/htc.c @@ -23,7 +23,7 @@ #include "htc_internal.h" #ifdef ATH_DEBUG_MODULE -static ATH_DEBUG_MASK_DESCRIPTION g_HTCDebugDescription[] = { +static struct ath_debug_mask_description g_HTCDebugDescription[] = { { ATH_DEBUG_SEND , "Send"}, { ATH_DEBUG_RECV , "Recv"}, { ATH_DEBUG_SYNC , "Sync"}, diff --git a/drivers/staging/ath6kl/include/a_debug.h b/drivers/staging/ath6kl/include/a_debug.h index 0e5430d..d433942 100644 --- a/drivers/staging/ath6kl/include/a_debug.h +++ b/drivers/staging/ath6kl/include/a_debug.h @@ -95,7 +95,7 @@ void DebugDumpBytes(u8 *buffer, u16 length, char *pDescription); * #define ATH_DEBUG_BMI ATH_DEBUG_MAKE_MODULE_MASK(0) * * #ifdef DEBUG - * static ATH_DEBUG_MASK_DESCRIPTION bmi_debug_desc[] = { + * static struct ath_debug_mask_description bmi_debug_desc[] = { * { ATH_DEBUG_BMI , "BMI Tracing"}, <== description of the module specific mask * }; * @@ -118,10 +118,10 @@ void DebugDumpBytes(u8 *buffer, u16 length, char *pDescription); #define ATH_DEBUG_MAX_MASK_DESC_LENGTH 32 #define ATH_DEBUG_MAX_MOD_DESC_LENGTH 64 -typedef struct { +struct ath_debug_mask_description { u32 Mask; char Description[ATH_DEBUG_MAX_MASK_DESC_LENGTH]; -} ATH_DEBUG_MASK_DESCRIPTION; +}; #define ATH_DEBUG_INFO_FLAGS_REGISTERED (1 << 0) @@ -132,10 +132,10 @@ typedef struct _ATH_DEBUG_MODULE_DBG_INFO{ u32 Flags; u32 CurrentMask; int MaxDescriptions; - ATH_DEBUG_MASK_DESCRIPTION *pMaskDescriptions; /* pointer to array of descriptions */ + struct ath_debug_mask_description *pMaskDescriptions; /* pointer to array of descriptions */ } ATH_DEBUG_MODULE_DBG_INFO; -#define ATH_DEBUG_DESCRIPTION_COUNT(d) (int)((sizeof((d))) / (sizeof(ATH_DEBUG_MASK_DESCRIPTION))) +#define ATH_DEBUG_DESCRIPTION_COUNT(d) (int)((sizeof((d))) / (sizeof(struct ath_debug_mask_description))) #define GET_ATH_MODULE_DEBUG_VAR_NAME(s) _XGET_ATH_MODULE_NAME_DEBUG_(s) #define GET_ATH_MODULE_DEBUG_VAR_MASK(s) _XGET_ATH_MODULE_NAME_DEBUG_(s).CurrentMask diff --git a/drivers/staging/ath6kl/miscdrv/common_drv.c b/drivers/staging/ath6kl/miscdrv/common_drv.c index b5f74c5..3ada331 100644 --- a/drivers/staging/ath6kl/miscdrv/common_drv.c +++ b/drivers/staging/ath6kl/miscdrv/common_drv.c @@ -834,7 +834,7 @@ void DebugDumpBytes(u8 *buffer, u16 length, char *pDescription) void a_dump_module_debug_info(ATH_DEBUG_MODULE_DBG_INFO *pInfo) { int i; - ATH_DEBUG_MASK_DESCRIPTION *pDesc; + struct ath_debug_mask_description *pDesc; if (pInfo == NULL) { return; diff --git a/drivers/staging/ath6kl/os/linux/ar6000_drv.c b/drivers/staging/ath6kl/os/linux/ar6000_drv.c index e52a88a..811235a 100644 --- a/drivers/staging/ath6kl/os/linux/ar6000_drv.c +++ b/drivers/staging/ath6kl/os/linux/ar6000_drv.c @@ -60,7 +60,7 @@ u8 null_mac[] = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0}; #define ATH_DEBUG_HTC_RAW ATH_DEBUG_MAKE_MODULE_MASK(5) #define ATH_DEBUG_HCI_BRIDGE ATH_DEBUG_MAKE_MODULE_MASK(6) -static ATH_DEBUG_MASK_DESCRIPTION driver_debug_desc[] = { +static struct ath_debug_mask_description driver_debug_desc[] = { { ATH_DEBUG_DBG_LOG , "Target Debug Logs"}, { ATH_DEBUG_WLAN_CONNECT , "WLAN connect"}, { ATH_DEBUG_WLAN_SCAN , "WLAN scan"}, diff --git a/drivers/staging/ath6kl/os/linux/ar6000_pm.c b/drivers/staging/ath6kl/os/linux/ar6000_pm.c index 46342d8..5659ad8 100644 --- a/drivers/staging/ath6kl/os/linux/ar6000_pm.c +++ b/drivers/staging/ath6kl/os/linux/ar6000_pm.c @@ -44,7 +44,7 @@ extern void android_ar6k_check_wow_status(AR_SOFTC_T *ar, struct sk_buff *skb, b #define ATH_DEBUG_PM ATH_DEBUG_MAKE_MODULE_MASK(0) #ifdef DEBUG -static ATH_DEBUG_MASK_DESCRIPTION pm_debug_desc[] = { +static struct ath_debug_mask_description pm_debug_desc[] = { { ATH_DEBUG_PM , "System power management"}, }; diff --git a/drivers/staging/ath6kl/wlan/src/wlan_node.c b/drivers/staging/ath6kl/wlan/src/wlan_node.c index 83c4dc3..1a3ac7d 100644 --- a/drivers/staging/ath6kl/wlan/src/wlan_node.c +++ b/drivers/staging/ath6kl/wlan/src/wlan_node.c @@ -40,7 +40,7 @@ #ifdef ATH_DEBUG_MODULE -static ATH_DEBUG_MASK_DESCRIPTION wlan_debug_desc[] = { +static struct ath_debug_mask_description wlan_debug_desc[] = { { ATH_DEBUG_WLAN , "General WLAN Node Tracing"}, }; diff --git a/drivers/staging/ath6kl/wmi/wmi.c b/drivers/staging/ath6kl/wmi/wmi.c index 80ba629..0ddaee2 100644 --- a/drivers/staging/ath6kl/wmi/wmi.c +++ b/drivers/staging/ath6kl/wmi/wmi.c @@ -48,7 +48,7 @@ #ifdef ATH_DEBUG_MODULE -static ATH_DEBUG_MASK_DESCRIPTION wmi_debug_desc[] = { +static struct ath_debug_mask_description wmi_debug_desc[] = { { ATH_DEBUG_WMI , "General WMI Tracing"}, }; -- 1.7.4.15.g7811d From b254de1f75e8342abe43bb50d75a179e64b1ba92 Mon Sep 17 00:00:00 2001 From: Luis R. Rodriguez Date: Mon, 28 Feb 2011 11:03:49 -0800 Subject: [PATCH 18/58] ath6kl: remove-typedef BUFFER_PROC_LIST remove-typedef -s BUFFER_PROC_LIST \ "struct buffer_proc_list" drivers/staging/ath6kl/ Cc: Naveen Singh Signed-off-by: Luis R. Rodriguez --- drivers/staging/ath6kl/htc2/AR6000/ar6k.c | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k.c b/drivers/staging/ath6kl/htc2/AR6000/ar6k.c index bdaffd7..2797b55 100644 --- a/drivers/staging/ath6kl/htc2/AR6000/ar6k.c +++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k.c @@ -1017,10 +1017,10 @@ static u32 g_BlockSizes[AR6K_MAILBOXES]; #define BUFFER_PROC_LIST_DEPTH 4 -typedef struct _BUFFER_PROC_LIST{ +struct buffer_proc_list { u8 *pBuffer; u32 length; -}BUFFER_PROC_LIST; +}; #define PUSH_BUFF_PROC_ENTRY(pList,len,pCurrpos) \ @@ -1032,7 +1032,7 @@ typedef struct _BUFFER_PROC_LIST{ } /* a simple and crude way to send different "message" sizes */ -static void AssembleBufferList(BUFFER_PROC_LIST *pList) +static void AssembleBufferList(struct buffer_proc_list *pList) { u8 *pBuffer = g_Buffer; @@ -1095,7 +1095,7 @@ static bool CheckBuffers(void) { int i; bool success = true; - BUFFER_PROC_LIST checkList[BUFFER_PROC_LIST_DEPTH]; + struct buffer_proc_list checkList[BUFFER_PROC_LIST_DEPTH]; /* assemble the list */ AssembleBufferList(checkList); @@ -1117,7 +1117,7 @@ static bool CheckBuffers(void) static u16 GetEndMarker(void) { u8 *pBuffer; - BUFFER_PROC_LIST checkList[BUFFER_PROC_LIST_DEPTH]; + struct buffer_proc_list checkList[BUFFER_PROC_LIST_DEPTH]; /* fill up buffers with the normal counting pattern */ InitBuffers(FILL_COUNTING); @@ -1138,7 +1138,7 @@ static int SendBuffers(struct ar6k_device *pDev, int mbox) { int status = 0; u32 request = HIF_WR_SYNC_BLOCK_INC; - BUFFER_PROC_LIST sendList[BUFFER_PROC_LIST_DEPTH]; + struct buffer_proc_list sendList[BUFFER_PROC_LIST_DEPTH]; int i; int totalBytes = 0; int paddedLength; @@ -1229,7 +1229,7 @@ static int RecvBuffers(struct ar6k_device *pDev, int mbox) { int status = 0; u32 request = HIF_RD_SYNC_BLOCK_INC; - BUFFER_PROC_LIST recvList[BUFFER_PROC_LIST_DEPTH]; + struct buffer_proc_list recvList[BUFFER_PROC_LIST_DEPTH]; int curBuffer; int credits; int i; -- 1.7.4.15.g7811d From f89f5f41d56c855ff91df1bd38054de3a66f3740 Mon Sep 17 00:00:00 2001 From: Luis R. Rodriguez Date: Mon, 28 Feb 2011 11:10:20 -0800 Subject: [PATCH 19/58] ath6kl: remove-typedef COMMON_CREDIT_STATE_INFO remove-typedef -s COMMON_CREDIT_STATE_INFO \ "struct common_credit_state_info" drivers/staging/ath6kl/ Cc: Naveen Singh Signed-off-by: Luis R. Rodriguez --- drivers/staging/ath6kl/include/common_drv.h | 6 +++--- drivers/staging/ath6kl/miscdrv/credit_dist.c | 18 +++++++++--------- .../staging/ath6kl/os/linux/include/ar6000_drv.h | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/staging/ath6kl/include/common_drv.h b/drivers/staging/ath6kl/include/common_drv.h index 6ed4901..f5bc9c3 100644 --- a/drivers/staging/ath6kl/include/common_drv.h +++ b/drivers/staging/ath6kl/include/common_drv.h @@ -29,12 +29,12 @@ /* structure that is the state information for the default credit distribution callback * drivers should instantiate (zero-init as well) this structure in their driver instance * and pass it as a context to the HTC credit distribution functions */ -typedef struct _COMMON_CREDIT_STATE_INFO { +struct common_credit_state_info { int TotalAvailableCredits; /* total credits in the system at startup */ int CurrentFreeCredits; /* credits available in the pool that have not been given out to endpoints */ HTC_ENDPOINT_CREDIT_DIST *pLowestPriEpDist; /* pointer to the lowest priority endpoint dist struct */ -} COMMON_CREDIT_STATE_INFO; +}; typedef struct { s32 (*setupTransport)(void *ar); @@ -64,7 +64,7 @@ extern "C" { #endif /* OS-independent APIs */ -int ar6000_setup_credit_dist(HTC_HANDLE HTCHandle, 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); diff --git a/drivers/staging/ath6kl/miscdrv/credit_dist.c b/drivers/staging/ath6kl/miscdrv/credit_dist.c index 68b1ed6..8c418d2 100644 --- a/drivers/staging/ath6kl/miscdrv/credit_dist.c +++ b/drivers/staging/ath6kl/miscdrv/credit_dist.c @@ -41,14 +41,14 @@ #define DATA_SVCS_USED 4 #endif -static void RedistributeCredits(COMMON_CREDIT_STATE_INFO *pCredInfo, +static void RedistributeCredits(struct common_credit_state_info *pCredInfo, HTC_ENDPOINT_CREDIT_DIST *pEPDistList); -static void SeekCredits(COMMON_CREDIT_STATE_INFO *pCredInfo, +static void SeekCredits(struct common_credit_state_info *pCredInfo, HTC_ENDPOINT_CREDIT_DIST *pEPDistList); /* reduce an ep's credits back to a set limit */ -static INLINE void ReduceCredits(COMMON_CREDIT_STATE_INFO *pCredInfo, +static INLINE void ReduceCredits(struct common_credit_state_info *pCredInfo, HTC_ENDPOINT_CREDIT_DIST *pEpDist, int Limit) { @@ -86,7 +86,7 @@ static void ar6000_credit_init(void *Context, { HTC_ENDPOINT_CREDIT_DIST *pCurEpDist; int count; - COMMON_CREDIT_STATE_INFO *pCredInfo = (COMMON_CREDIT_STATE_INFO *)Context; + struct common_credit_state_info *pCredInfo = (struct common_credit_state_info *)Context; pCredInfo->CurrentFreeCredits = TotalCredits; pCredInfo->TotalAvailableCredits = TotalCredits; @@ -179,7 +179,7 @@ static void ar6000_credit_distribute(void *Context, HTC_CREDIT_DIST_REASON Reason) { HTC_ENDPOINT_CREDIT_DIST *pCurEpDist; - COMMON_CREDIT_STATE_INFO *pCredInfo = (COMMON_CREDIT_STATE_INFO *)Context; + struct common_credit_state_info *pCredInfo = (struct common_credit_state_info *)Context; switch (Reason) { case HTC_CREDIT_DIST_SEND_COMPLETE : @@ -243,7 +243,7 @@ static void ar6000_credit_distribute(void *Context, } /* redistribute credits based on activity change */ -static void RedistributeCredits(COMMON_CREDIT_STATE_INFO *pCredInfo, +static void RedistributeCredits(struct common_credit_state_info *pCredInfo, HTC_ENDPOINT_CREDIT_DIST *pEPDistList) { HTC_ENDPOINT_CREDIT_DIST *pCurEpDist = pEPDistList; @@ -283,7 +283,7 @@ static void RedistributeCredits(COMMON_CREDIT_STATE_INFO *pCredInfo, } /* HTC has an endpoint that needs credits, pEPDist is the endpoint in question */ -static void SeekCredits(COMMON_CREDIT_STATE_INFO *pCredInfo, +static void SeekCredits(struct common_credit_state_info *pCredInfo, HTC_ENDPOINT_CREDIT_DIST *pEPDist) { HTC_ENDPOINT_CREDIT_DIST *pCurEpDist; @@ -393,11 +393,11 @@ static void SeekCredits(COMMON_CREDIT_STATE_INFO *pCredInfo, } /* initialize and setup credit distribution */ -int ar6000_setup_credit_dist(HTC_HANDLE HTCHandle, COMMON_CREDIT_STATE_INFO *pCredInfo) +int ar6000_setup_credit_dist(HTC_HANDLE HTCHandle, struct common_credit_state_info *pCredInfo) { HTC_SERVICE_ID servicepriority[5]; - A_MEMZERO(pCredInfo,sizeof(COMMON_CREDIT_STATE_INFO)); + A_MEMZERO(pCredInfo,sizeof(struct common_credit_state_info)); servicepriority[0] = WMI_CONTROL_SVC; /* highest */ servicepriority[1] = WMI_DATA_VO_SVC; diff --git a/drivers/staging/ath6kl/os/linux/include/ar6000_drv.h b/drivers/staging/ath6kl/os/linux/include/ar6000_drv.h index 2c6f873..2373ed5 100644 --- a/drivers/staging/ath6kl/os/linux/include/ar6000_drv.h +++ b/drivers/staging/ath6kl/os/linux/include/ar6000_drv.h @@ -550,7 +550,7 @@ typedef struct ar6_softc { bool arNetQueueStopped; bool arRawIfInit; int arDeviceIndex; - COMMON_CREDIT_STATE_INFO arCreditStateInfo; + struct common_credit_state_info arCreditStateInfo; bool arWMIControlEpFull; bool dbgLogFetchInProgress; u8 log_buffer[DBGLOG_HOST_LOG_BUFFER_SIZE]; -- 1.7.4.15.g7811d From f5ee145a424324557e67097762edcef35cb2d212 Mon Sep 17 00:00:00 2001 From: Luis R. Rodriguez Date: Mon, 28 Feb 2011 11:12:20 -0800 Subject: [PATCH 20/58] ath6kl: remove-typedef DEV_SCATTER_DMA_VIRTUAL_INFO remove-typedef -s DEV_SCATTER_DMA_VIRTUAL_INFO \ "struct dev_scatter_dma_virtual_info" drivers/staging/ath6kl/ Cc: Naveen Singh Signed-off-by: Luis R. Rodriguez --- drivers/staging/ath6kl/htc2/AR6000/ar6k.c | 10 +++++----- drivers/staging/ath6kl/htc2/AR6000/ar6k.h | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k.c b/drivers/staging/ath6kl/htc2/AR6000/ar6k.c index 2797b55..a41ed12 100644 --- a/drivers/staging/ath6kl/htc2/AR6000/ar6k.c +++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k.c @@ -585,7 +585,7 @@ void DevDumpRegisters(struct ar6k_device *pDev, } -#define DEV_GET_VIRT_DMA_INFO(p) ((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 HIF_SCATTER_REQ *DevAllocScatterReq(HIF_DEVICE *Context) { @@ -754,10 +754,10 @@ static int DevSetupVirtualScatterSupport(struct ar6k_device *pDev) int status = 0; int bufferSize, sgreqSize; int i; - DEV_SCATTER_DMA_VIRTUAL_INFO *pVirtualInfo; + struct dev_scatter_dma_virtual_info *pVirtualInfo; HIF_SCATTER_REQ *pReq; - bufferSize = sizeof(DEV_SCATTER_DMA_VIRTUAL_INFO) + + bufferSize = sizeof(struct dev_scatter_dma_virtual_info) + 2 * (A_GET_CACHE_LINE_BYTES()) + AR6K_MAX_TRANSFER_SIZE_PER_SCATTER; sgreqSize = sizeof(HIF_SCATTER_REQ) + @@ -775,8 +775,8 @@ static int DevSetupVirtualScatterSupport(struct ar6k_device *pDev) A_MEMZERO(pReq, sgreqSize); /* the virtual DMA starts after the scatter request struct */ - pVirtualInfo = (DEV_SCATTER_DMA_VIRTUAL_INFO *)((u8 *)pReq + sgreqSize); - A_MEMZERO(pVirtualInfo, sizeof(DEV_SCATTER_DMA_VIRTUAL_INFO)); + pVirtualInfo = (struct dev_scatter_dma_virtual_info *)((u8 *)pReq + sgreqSize); + A_MEMZERO(pVirtualInfo, sizeof(struct dev_scatter_dma_virtual_info)); pVirtualInfo->pVirtDmaBuffer = &pVirtualInfo->DataArea[0]; /* align buffer to cache line in case host controller can actually DMA this */ diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k.h b/drivers/staging/ath6kl/htc2/AR6000/ar6k.h index 247cf56..3e4ece8 100644 --- a/drivers/staging/ath6kl/htc2/AR6000/ar6k.h +++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k.h @@ -322,10 +322,10 @@ int DoMboxHWTest(struct ar6k_device *pDev); #endif /* completely virtual */ -typedef struct _DEV_SCATTER_DMA_VIRTUAL_INFO { +struct dev_scatter_dma_virtual_info { u8 *pVirtDmaBuffer; /* dma-able buffer - CPU accessible address */ u8 DataArea[1]; /* start of data area */ -} DEV_SCATTER_DMA_VIRTUAL_INFO; +}; -- 1.7.4.15.g7811d From c4721bf65f953b2dd76bf63496b3ca41517aeac4 Mon Sep 17 00:00:00 2001 From: Luis R. Rodriguez Date: Mon, 28 Feb 2011 11:21:56 -0800 Subject: [PATCH 21/58] ath6kl: remove-tyepdef DL_LIST and PDL_LIST pointer This required two passes: remove-typedef -s DL_LIST "struct dl_list" \ drivers/staging/ath6kl/ remove-typedef -s PDL_LIST "struct dl_list *" \ drivers/staging/ath6kl/ Cc: Naveen Singh Signed-off-by: Luis R. Rodriguez --- .../hif/sdio/linux_sdio/include/hif_internal.h | 2 +- .../ath6kl/hif/sdio/linux_sdio/src/hif_scatter.c | 2 +- drivers/staging/ath6kl/htc2/AR6000/ar6k.c | 2 +- drivers/staging/ath6kl/htc2/AR6000/ar6k.h | 2 +- drivers/staging/ath6kl/include/dl_list.h | 26 ++++++++++---------- drivers/staging/ath6kl/include/hif.h | 2 +- drivers/staging/ath6kl/include/htc_packet.h | 8 +++--- 7 files changed, 22 insertions(+), 22 deletions(-) diff --git a/drivers/staging/ath6kl/hif/sdio/linux_sdio/include/hif_internal.h b/drivers/staging/ath6kl/hif/sdio/linux_sdio/include/hif_internal.h index 87057e3..b5d1ad4 100644 --- a/drivers/staging/ath6kl/hif/sdio/linux_sdio/include/hif_internal.h +++ b/drivers/staging/ath6kl/hif/sdio/linux_sdio/include/hif_internal.h @@ -77,7 +77,7 @@ struct hif_device { void *claimedContext; HTC_CALLBACKS htcCallbacks; u8 *dma_buffer; - DL_LIST ScatterReqHead; /* scatter request list head */ + struct dl_list ScatterReqHead; /* scatter request list head */ bool scatter_enabled; /* scatter enabled flag */ bool is_suspend; bool is_disabled; diff --git a/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif_scatter.c b/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif_scatter.c index 78cbbb1..2a56a50 100644 --- a/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif_scatter.c +++ b/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif_scatter.c @@ -62,7 +62,7 @@ static void FreeScatterReq(HIF_DEVICE *device, HIF_SCATTER_REQ *pReq) static HIF_SCATTER_REQ *AllocScatterReq(HIF_DEVICE *device) { - DL_LIST *pItem; + struct dl_list *pItem; unsigned long flag; spin_lock_irqsave(&device->lock, flag); diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k.c b/drivers/staging/ath6kl/htc2/AR6000/ar6k.c index a41ed12..f9f411a 100644 --- a/drivers/staging/ath6kl/htc2/AR6000/ar6k.c +++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k.c @@ -589,7 +589,7 @@ void DevDumpRegisters(struct ar6k_device *pDev, static HIF_SCATTER_REQ *DevAllocScatterReq(HIF_DEVICE *Context) { - DL_LIST *pItem; + struct dl_list *pItem; struct ar6k_device *pDev = (struct ar6k_device *)Context; LOCK_AR6K(pDev); pItem = DL_ListRemoveItemFromHead(&pDev->ScatterReqHead); diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k.h b/drivers/staging/ath6kl/htc2/AR6000/ar6k.h index 3e4ece8..88ef25a 100644 --- a/drivers/staging/ath6kl/htc2/AR6000/ar6k.h +++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k.h @@ -133,7 +133,7 @@ struct ar6k_device { bool DSRCanYield; int CurrentDSRRecvCount; HIF_DEVICE_SCATTER_SUPPORT_INFO HifScatterInfo; - DL_LIST ScatterReqHead; + struct dl_list ScatterReqHead; bool ScatterIsVirtual; int MaxRecvBundleSize; int MaxSendBundleSize; diff --git a/drivers/staging/ath6kl/include/dl_list.h b/drivers/staging/ath6kl/include/dl_list.h index 110e1d8..13b1e69 100644 --- a/drivers/staging/ath6kl/include/dl_list.h +++ b/drivers/staging/ath6kl/include/dl_list.h @@ -32,10 +32,10 @@ /* list functions */ /* pointers for the list */ -typedef struct _DL_LIST { - struct _DL_LIST *pPrev; - struct _DL_LIST *pNext; -}DL_LIST, *PDL_LIST; +struct dl_list { + struct dl_list *pPrev; + struct dl_list *pNext; +}; /* * DL_LIST_INIT , initialize doubly linked list */ @@ -67,7 +67,7 @@ typedef struct _DL_LIST { */ #define ITERATE_OVER_LIST_ALLOW_REMOVE(pStart,pItem,st,offset) \ { \ - PDL_LIST pTemp; \ + struct dl_list * pTemp; \ pTemp = (pStart)->pNext; \ while (pTemp != (pStart)) { \ (pItem) = A_CONTAINING_STRUCT(pTemp,st,offset); \ @@ -78,7 +78,7 @@ typedef struct _DL_LIST { /* * DL_ListInsertTail - insert pAdd to the end of the list */ -static INLINE PDL_LIST DL_ListInsertTail(PDL_LIST pList, PDL_LIST pAdd) { +static INLINE struct dl_list *DL_ListInsertTail(struct dl_list *pList, struct dl_list *pAdd) { /* insert at tail */ pAdd->pPrev = pList->pPrev; pAdd->pNext = pList; @@ -90,7 +90,7 @@ static INLINE PDL_LIST DL_ListInsertTail(PDL_LIST pList, PDL_LIST pAdd) { /* * DL_ListInsertHead - insert pAdd into the head of the list */ -static INLINE PDL_LIST DL_ListInsertHead(PDL_LIST pList, PDL_LIST pAdd) { +static INLINE struct dl_list * DL_ListInsertHead(struct dl_list * pList, struct dl_list * pAdd) { /* insert at head */ pAdd->pPrev = pList; pAdd->pNext = pList->pNext; @@ -103,7 +103,7 @@ static INLINE PDL_LIST DL_ListInsertHead(PDL_LIST pList, PDL_LIST pAdd) { /* * DL_ListRemove - remove pDel from list */ -static INLINE PDL_LIST DL_ListRemove(PDL_LIST pDel) { +static INLINE struct dl_list * DL_ListRemove(struct dl_list * pDel) { pDel->pNext->pPrev = pDel->pPrev; pDel->pPrev->pNext = pDel->pNext; /* point back to itself just to be safe, incase remove is called again */ @@ -115,8 +115,8 @@ static INLINE PDL_LIST DL_ListRemove(PDL_LIST pDel) { /* * DL_ListRemoveItemFromHead - get a list item from the head */ -static INLINE PDL_LIST DL_ListRemoveItemFromHead(PDL_LIST pList) { - PDL_LIST pItem = NULL; +static INLINE struct dl_list * DL_ListRemoveItemFromHead(struct dl_list * pList) { + struct dl_list * pItem = NULL; if (pList->pNext != pList) { pItem = pList->pNext; /* remove the first item from head */ @@ -125,8 +125,8 @@ static INLINE PDL_LIST DL_ListRemoveItemFromHead(PDL_LIST pList) { return pItem; } -static INLINE PDL_LIST DL_ListRemoveItemFromTail(PDL_LIST pList) { - PDL_LIST pItem = NULL; +static INLINE struct dl_list * DL_ListRemoveItemFromTail(struct dl_list * pList) { + struct dl_list * pItem = NULL; if (pList->pPrev != pList) { pItem = pList->pPrev; /* remove the item from tail */ @@ -136,7 +136,7 @@ static INLINE PDL_LIST DL_ListRemoveItemFromTail(PDL_LIST pList) { } /* transfer src list items to the tail of the destination list */ -static INLINE void DL_ListTransferItemsToTail(PDL_LIST pDest, PDL_LIST pSrc) { +static INLINE void DL_ListTransferItemsToTail(struct dl_list * pDest, struct dl_list * pSrc) { /* only concatenate if src is not empty */ if (!DL_LIST_IS_EMPTY(pSrc)) { /* cut out circular list in src and re-attach to end of dest */ diff --git a/drivers/staging/ath6kl/include/hif.h b/drivers/staging/ath6kl/include/hif.h index ab1f4c1..3421a59 100644 --- a/drivers/staging/ath6kl/include/hif.h +++ b/drivers/staging/ath6kl/include/hif.h @@ -287,7 +287,7 @@ typedef enum _HIF_SCATTER_METHOD { } HIF_SCATTER_METHOD; typedef struct _HIF_SCATTER_REQ { - DL_LIST ListLink; /* link management */ + struct dl_list ListLink; /* link management */ u32 Address; /* address for the read/write operation */ u32 Request; /* request flags */ u32 TotalLength; /* total length of entire transfer */ diff --git a/drivers/staging/ath6kl/include/htc_packet.h b/drivers/staging/ath6kl/include/htc_packet.h index fcf0a0c..9282e90 100644 --- a/drivers/staging/ath6kl/include/htc_packet.h +++ b/drivers/staging/ath6kl/include/htc_packet.h @@ -69,7 +69,7 @@ typedef struct _HTC_RX_PACKET_INFO { /* wrapper around endpoint-specific packets */ typedef struct _HTC_PACKET { - DL_LIST ListLink; /* double link */ + struct dl_list ListLink; /* double link */ void *pPktContext; /* caller's per packet specific context */ u8 *pBufferStart; /* the true buffer start , the caller can @@ -140,7 +140,7 @@ typedef struct _HTC_PACKET { /* HTC Packet Queueing Macros */ typedef struct _HTC_PACKET_QUEUE { - DL_LIST QueueHead; + struct dl_list QueueHead; int Depth; } HTC_PACKET_QUEUE; @@ -180,7 +180,7 @@ static INLINE HTC_PACKET *HTC_GET_PKT_AT_HEAD(HTC_PACKET_QUEUE *queue) { /* dequeue an HTC packet from the head of the queue */ static INLINE HTC_PACKET *HTC_PACKET_DEQUEUE(HTC_PACKET_QUEUE *queue) { - DL_LIST *pItem = DL_ListRemoveItemFromHead(&queue->QueueHead); + struct dl_list *pItem = DL_ListRemoveItemFromHead(&queue->QueueHead); if (pItem != NULL) { queue->Depth--; return A_CONTAINING_STRUCT(pItem, HTC_PACKET, ListLink); @@ -190,7 +190,7 @@ static INLINE HTC_PACKET *HTC_PACKET_DEQUEUE(HTC_PACKET_QUEUE *queue) { /* dequeue an HTC packet from the tail of the queue */ static INLINE HTC_PACKET *HTC_PACKET_DEQUEUE_TAIL(HTC_PACKET_QUEUE *queue) { - DL_LIST *pItem = DL_ListRemoveItemFromTail(&queue->QueueHead); + struct dl_list *pItem = DL_ListRemoveItemFromTail(&queue->QueueHead); if (pItem != NULL) { queue->Depth--; return A_CONTAINING_STRUCT(pItem, HTC_PACKET, ListLink); -- 1.7.4.15.g7811d From 6e766c8872b02992ef20e8b830f7ccb06bd81780 Mon Sep 17 00:00:00 2001 From: Luis R. Rodriguez Date: Mon, 28 Feb 2011 12:28:54 -0800 Subject: [PATCH 22/58] ath6kl: remove-typedef GMBOX_PROTO_HCI_UART remove-typedef -s GMBOX_PROTO_HCI_UART \ "struct gmbox_proto_hci_uart" drivers/staging/ath6kl/ Cc: Naveen Singh Signed-off-by: Luis R. Rodriguez --- .../ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c | 60 ++++++++++---------- 1 files changed, 30 insertions(+), 30 deletions(-) diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c b/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c index 3ee3d40..78da8a1 100644 --- a/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c +++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c @@ -56,7 +56,7 @@ #define BAUD_TIMEOUT_MS 1 #define BTPWRSAV_TIMEOUT_MS 1 -typedef struct { +struct gmbox_proto_hci_uart { HCI_TRANSPORT_CONFIG_INFO HCIConfig; bool HCIAttached; bool HCIStopped; @@ -75,7 +75,7 @@ typedef struct { int CreditSize; int CreditsCurrentSeek; int SendProcessCount; -} GMBOX_PROTO_HCI_UART; +}; #define LOCK_HCI_RX(t) A_MUTEX_LOCK(&(t)->HCIRxLock); #define UNLOCK_HCI_RX(t) A_MUTEX_UNLOCK(&(t)->HCIRxLock); @@ -99,9 +99,9 @@ do { \ (p)->HCIConfig.pHCISendComplete((p)->HCIConfig.pContext, (pt)); \ } -static int HCITrySend(GMBOX_PROTO_HCI_UART *pProt, HTC_PACKET *pPacket, bool Synchronous); +static int HCITrySend(struct gmbox_proto_hci_uart *pProt, HTC_PACKET *pPacket, bool Synchronous); -static void HCIUartCleanup(GMBOX_PROTO_HCI_UART *pProtocol) +static void HCIUartCleanup(struct gmbox_proto_hci_uart *pProtocol) { A_ASSERT(pProtocol != NULL); @@ -111,7 +111,7 @@ static void HCIUartCleanup(GMBOX_PROTO_HCI_UART *pProtocol) A_FREE(pProtocol); } -static int InitTxCreditState(GMBOX_PROTO_HCI_UART *pProt) +static int InitTxCreditState(struct gmbox_proto_hci_uart *pProt) { int status; int credits; @@ -191,7 +191,7 @@ static int InitTxCreditState(GMBOX_PROTO_HCI_UART *pProt) static int CreditsAvailableCallback(void *pContext, int Credits, bool CreditIRQEnabled) { - GMBOX_PROTO_HCI_UART *pProt = (GMBOX_PROTO_HCI_UART *)pContext; + struct gmbox_proto_hci_uart *pProt = (struct gmbox_proto_hci_uart *)pContext; bool enableCreditIrq = false; bool disableCreditIrq = false; bool doPendingSends = false; @@ -274,7 +274,7 @@ static int CreditsAvailableCallback(void *pContext, int Credits, bool CreditIRQE return status; } -static INLINE void NotifyTransportFailure(GMBOX_PROTO_HCI_UART *pProt, int status) +static INLINE void NotifyTransportFailure(struct gmbox_proto_hci_uart *pProt, int status) { if (pProt->HCIConfig.TransportFailure != NULL) { pProt->HCIConfig.TransportFailure(pProt->HCIConfig.pContext, status); @@ -283,7 +283,7 @@ static INLINE void NotifyTransportFailure(GMBOX_PROTO_HCI_UART *pProt, int stat static void FailureCallback(void *pContext, int Status) { - GMBOX_PROTO_HCI_UART *pProt = (GMBOX_PROTO_HCI_UART *)pContext; + struct gmbox_proto_hci_uart *pProt = (struct gmbox_proto_hci_uart *)pContext; /* target assertion occured */ NotifyTransportFailure(pProt, Status); @@ -291,7 +291,7 @@ static void FailureCallback(void *pContext, int Status) static void StateDumpCallback(void *pContext) { - GMBOX_PROTO_HCI_UART *pProt = (GMBOX_PROTO_HCI_UART *)pContext; + struct gmbox_proto_hci_uart *pProt = (struct gmbox_proto_hci_uart *)pContext; AR_DEBUG_PRINTF(ATH_DEBUG_ANY,("============ HCIUart State ======================\n")); AR_DEBUG_PRINTF(ATH_DEBUG_ANY,("RecvStateFlags : 0x%X \n",pProt->RecvStateFlags)); @@ -306,7 +306,7 @@ static void StateDumpCallback(void *pContext) static int HCIUartMessagePending(void *pContext, u8 LookAheadBytes[], int ValidBytes) { - GMBOX_PROTO_HCI_UART *pProt = (GMBOX_PROTO_HCI_UART *)pContext; + struct gmbox_proto_hci_uart *pProt = (struct gmbox_proto_hci_uart *)pContext; int status = 0; int totalRecvLength = 0; HCI_TRANSPORT_PACKET_TYPE pktType = HCI_PACKET_INVALID; @@ -534,7 +534,7 @@ static int HCIUartMessagePending(void *pContext, u8 LookAheadBytes[], int ValidB static void HCISendPacketCompletion(void *Context, HTC_PACKET *pPacket) { - GMBOX_PROTO_HCI_UART *pProt = (GMBOX_PROTO_HCI_UART *)Context; + struct gmbox_proto_hci_uart *pProt = (struct gmbox_proto_hci_uart *)Context; AR_DEBUG_PRINTF(ATH_DEBUG_SEND,("+HCISendPacketCompletion (pPacket:0x%lX) \n",(unsigned long)pPacket)); if (pPacket->Status) { @@ -547,7 +547,7 @@ static void HCISendPacketCompletion(void *Context, HTC_PACKET *pPacket) AR_DEBUG_PRINTF(ATH_DEBUG_SEND,("+HCISendPacketCompletion \n")); } -static int SeekCreditsSynch(GMBOX_PROTO_HCI_UART *pProt) +static int SeekCreditsSynch(struct gmbox_proto_hci_uart *pProt) { int status = 0; int credits; @@ -579,7 +579,7 @@ static int SeekCreditsSynch(GMBOX_PROTO_HCI_UART *pProt) return status; } -static int HCITrySend(GMBOX_PROTO_HCI_UART *pProt, HTC_PACKET *pPacket, bool Synchronous) +static int HCITrySend(struct gmbox_proto_hci_uart *pProt, HTC_PACKET *pPacket, bool Synchronous) { int status = 0; int transferLength; @@ -794,7 +794,7 @@ static int HCITrySend(GMBOX_PROTO_HCI_UART *pProt, HTC_PACKET *pPacket, bool Syn return status; } -static void FlushSendQueue(GMBOX_PROTO_HCI_UART *pProt) +static void FlushSendQueue(struct gmbox_proto_hci_uart *pProt) { HTC_PACKET *pPacket; HTC_PACKET_QUEUE discardQueue; @@ -818,7 +818,7 @@ static void FlushSendQueue(GMBOX_PROTO_HCI_UART *pProt) } -static void FlushRecvBuffers(GMBOX_PROTO_HCI_UART *pProt) +static void FlushRecvBuffers(struct gmbox_proto_hci_uart *pProt) { HTC_PACKET_QUEUE discardQueue; HTC_PACKET *pPacket; @@ -849,11 +849,11 @@ static void FlushRecvBuffers(GMBOX_PROTO_HCI_UART *pProt) int GMboxProtocolInstall(struct ar6k_device *pDev) { int status = 0; - GMBOX_PROTO_HCI_UART *pProtocol = NULL; + struct gmbox_proto_hci_uart *pProtocol = NULL; do { - pProtocol = A_MALLOC(sizeof(GMBOX_PROTO_HCI_UART)); + pProtocol = A_MALLOC(sizeof(struct gmbox_proto_hci_uart)); if (NULL == pProtocol) { status = A_NO_MEMORY; @@ -891,7 +891,7 @@ int GMboxProtocolInstall(struct ar6k_device *pDev) /*** protocol module uninstall entry point ***/ void GMboxProtocolUninstall(struct ar6k_device *pDev) { - GMBOX_PROTO_HCI_UART *pProtocol = (GMBOX_PROTO_HCI_UART *)DEV_GMBOX_GET_PROTOCOL(pDev); + struct gmbox_proto_hci_uart *pProtocol = (struct gmbox_proto_hci_uart *)DEV_GMBOX_GET_PROTOCOL(pDev); if (pProtocol != NULL) { @@ -908,7 +908,7 @@ void GMboxProtocolUninstall(struct ar6k_device *pDev) } -static int NotifyTransportReady(GMBOX_PROTO_HCI_UART *pProt) +static int NotifyTransportReady(struct gmbox_proto_hci_uart *pProt) { HCI_TRANSPORT_PROPERTIES props; int status = 0; @@ -938,7 +938,7 @@ static int NotifyTransportReady(GMBOX_PROTO_HCI_UART *pProt) HCI_TRANSPORT_HANDLE HCI_TransportAttach(void *HTCHandle, HCI_TRANSPORT_CONFIG_INFO *pInfo) { - GMBOX_PROTO_HCI_UART *pProtocol = NULL; + struct gmbox_proto_hci_uart *pProtocol = NULL; struct ar6k_device *pDev; AR_DEBUG_PRINTF(ATH_DEBUG_TRC,("+HCI_TransportAttach \n")); @@ -949,7 +949,7 @@ HCI_TRANSPORT_HANDLE HCI_TransportAttach(void *HTCHandle, HCI_TRANSPORT_CONFIG_I do { - pProtocol = (GMBOX_PROTO_HCI_UART *)DEV_GMBOX_GET_PROTOCOL(pDev); + pProtocol = (struct gmbox_proto_hci_uart *)DEV_GMBOX_GET_PROTOCOL(pDev); if (NULL == pProtocol) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("GMBOX protocol not installed! \n")); @@ -983,7 +983,7 @@ HCI_TRANSPORT_HANDLE HCI_TransportAttach(void *HTCHandle, HCI_TRANSPORT_CONFIG_I void HCI_TransportDetach(HCI_TRANSPORT_HANDLE HciTrans) { - GMBOX_PROTO_HCI_UART *pProtocol = (GMBOX_PROTO_HCI_UART *)HciTrans; + struct gmbox_proto_hci_uart *pProtocol = (struct gmbox_proto_hci_uart *)HciTrans; struct ar6k_device *pDev = pProtocol->pDev; AR_DEBUG_PRINTF(ATH_DEBUG_TRC,("+HCI_TransportDetach \n")); @@ -1003,7 +1003,7 @@ void HCI_TransportDetach(HCI_TRANSPORT_HANDLE HciTrans) int HCI_TransportAddReceivePkts(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET_QUEUE *pQueue) { - GMBOX_PROTO_HCI_UART *pProt = (GMBOX_PROTO_HCI_UART *)HciTrans; + struct gmbox_proto_hci_uart *pProt = (struct gmbox_proto_hci_uart *)HciTrans; int status = 0; bool unblockRecv = false; HTC_PACKET *pPacket; @@ -1071,14 +1071,14 @@ int HCI_TransportAddReceivePkts(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET_QUEUE int HCI_TransportSendPkt(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET *pPacket, bool Synchronous) { - GMBOX_PROTO_HCI_UART *pProt = (GMBOX_PROTO_HCI_UART *)HciTrans; + struct gmbox_proto_hci_uart *pProt = (struct gmbox_proto_hci_uart *)HciTrans; return HCITrySend(pProt,pPacket,Synchronous); } void HCI_TransportStop(HCI_TRANSPORT_HANDLE HciTrans) { - GMBOX_PROTO_HCI_UART *pProt = (GMBOX_PROTO_HCI_UART *)HciTrans; + struct gmbox_proto_hci_uart *pProt = (struct gmbox_proto_hci_uart *)HciTrans; AR_DEBUG_PRINTF(ATH_DEBUG_TRC,("+HCI_TransportStop \n")); @@ -1105,7 +1105,7 @@ void HCI_TransportStop(HCI_TRANSPORT_HANDLE HciTrans) int HCI_TransportStart(HCI_TRANSPORT_HANDLE HciTrans) { int status; - GMBOX_PROTO_HCI_UART *pProt = (GMBOX_PROTO_HCI_UART *)HciTrans; + struct gmbox_proto_hci_uart *pProt = (struct gmbox_proto_hci_uart *)HciTrans; AR_DEBUG_PRINTF(ATH_DEBUG_TRC,("+HCI_TransportStart \n")); @@ -1151,7 +1151,7 @@ int HCI_TransportStart(HCI_TRANSPORT_HANDLE HciTrans) int HCI_TransportEnableDisableAsyncRecv(HCI_TRANSPORT_HANDLE HciTrans, bool Enable) { - GMBOX_PROTO_HCI_UART *pProt = (GMBOX_PROTO_HCI_UART *)HciTrans; + struct gmbox_proto_hci_uart *pProt = (struct gmbox_proto_hci_uart *)HciTrans; return DevGMboxIRQAction(pProt->pDev, Enable ? GMBOX_RECV_IRQ_ENABLE : GMBOX_RECV_IRQ_DISABLE, PROC_IO_SYNC); @@ -1162,7 +1162,7 @@ int HCI_TransportRecvHCIEventSync(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET *pPacket, int MaxPollMS) { - GMBOX_PROTO_HCI_UART *pProt = (GMBOX_PROTO_HCI_UART *)HciTrans; + struct gmbox_proto_hci_uart *pProt = (struct gmbox_proto_hci_uart *)HciTrans; int status = 0; u8 lookAhead[8]; int bytes; @@ -1232,7 +1232,7 @@ int HCI_TransportRecvHCIEventSync(HCI_TRANSPORT_HANDLE HciTrans, #define MSB_SCRATCH_IDX 5 int HCI_TransportSetBaudRate(HCI_TRANSPORT_HANDLE HciTrans, u32 Baud) { - GMBOX_PROTO_HCI_UART *pProt = (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); u32 scaledBaud, scratchAddr; int status = 0; @@ -1264,7 +1264,7 @@ int HCI_TransportSetBaudRate(HCI_TRANSPORT_HANDLE HciTrans, u32 Baud) int HCI_TransportEnablePowerMgmt(HCI_TRANSPORT_HANDLE HciTrans, bool Enable) { int status; - GMBOX_PROTO_HCI_UART *pProt = (GMBOX_PROTO_HCI_UART *)HciTrans; + struct gmbox_proto_hci_uart *pProt = (struct gmbox_proto_hci_uart *)HciTrans; if (Enable) { status = DevGMboxSetTargetInterrupt(pProt->pDev, MBOX_SIG_HCI_BRIDGE_PWR_SAV_ON, BTPWRSAV_TIMEOUT_MS); -- 1.7.4.15.g7811d From c7cfdec0572970dbebf2190f4cec599aa719c44e Mon Sep 17 00:00:00 2001 From: Luis R. Rodriguez Date: Mon, 28 Feb 2011 12:35:41 -0800 Subject: [PATCH 23/58] ath6kl: remove-typedef HCI_TRANSPORT_CALLBACKS remove-typedef -s HCI_TRANSPORT_CALLBACKS \ "struct hci_transport_callbacks" drivers/staging/ath6kl/ Cc: Naveen Singh Signed-off-by: Luis R. Rodriguez --- drivers/staging/ath6kl/include/common_drv.h | 4 ++-- drivers/staging/ath6kl/os/linux/ar6000_drv.c | 2 +- drivers/staging/ath6kl/os/linux/ar6k_pal.c | 4 ++-- .../staging/ath6kl/os/linux/export_hci_transport.c | 4 ++-- drivers/staging/ath6kl/os/linux/hci_bridge.c | 2 +- .../ath6kl/os/linux/include/export_hci_transport.h | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/staging/ath6kl/include/common_drv.h b/drivers/staging/ath6kl/include/common_drv.h index f5bc9c3..2b633d9 100644 --- a/drivers/staging/ath6kl/include/common_drv.h +++ b/drivers/staging/ath6kl/include/common_drv.h @@ -36,10 +36,10 @@ struct common_credit_state_info { HTC_ENDPOINT_CREDIT_DIST *pLowestPriEpDist; /* pointer to the lowest priority endpoint dist struct */ }; -typedef struct { +struct hci_transport_callbacks { s32 (*setupTransport)(void *ar); void (*cleanupTransport)(void *ar); -} HCI_TRANSPORT_CALLBACKS; +}; typedef struct { void *netDevice; diff --git a/drivers/staging/ath6kl/os/linux/ar6000_drv.c b/drivers/staging/ath6kl/os/linux/ar6000_drv.c index 811235a..add1ceb 100644 --- a/drivers/staging/ath6kl/os/linux/ar6000_drv.c +++ b/drivers/staging/ath6kl/os/linux/ar6000_drv.c @@ -114,7 +114,7 @@ APTC_TRAFFIC_RECORD aptcTR; #ifdef EXPORT_HCI_BRIDGE_INTERFACE // callbacks registered by HCI transport driver -HCI_TRANSPORT_CALLBACKS ar6kHciTransCallbacks = { NULL }; +struct hci_transport_callbacks ar6kHciTransCallbacks = { NULL }; #endif unsigned int processDot11Hdr = 0; diff --git a/drivers/staging/ath6kl/os/linux/ar6k_pal.c b/drivers/staging/ath6kl/os/linux/ar6k_pal.c index fee7cb9..e174efb 100644 --- a/drivers/staging/ath6kl/os/linux/ar6k_pal.c +++ b/drivers/staging/ath6kl/os/linux/ar6k_pal.c @@ -457,10 +457,10 @@ void ar6k_cleanup_hci_pal(void *ar_p) * Register init and callback function with ar6k * when PAL driver is a separate kernel module. ****************************************************/ -int ar6k_register_hci_pal(HCI_TRANSPORT_CALLBACKS *hciTransCallbacks); +int ar6k_register_hci_pal(struct hci_transport_callbacks *hciTransCallbacks); static int __init pal_init_module(void) { - HCI_TRANSPORT_CALLBACKS hciTransCallbacks; + struct hci_transport_callbacks hciTransCallbacks; hciTransCallbacks.setupTransport = ar6k_setup_hci_pal; hciTransCallbacks.cleanupTransport = ar6k_cleanup_hci_pal; diff --git a/drivers/staging/ath6kl/os/linux/export_hci_transport.c b/drivers/staging/ath6kl/os/linux/export_hci_transport.c index 9e8ca5c..168d6f7 100644 --- a/drivers/staging/ath6kl/os/linux/export_hci_transport.c +++ b/drivers/staging/ath6kl/os/linux/export_hci_transport.c @@ -49,9 +49,9 @@ int (*_HCI_TransportRecvHCIEventSync)(HCI_TRANSPORT_HANDLE HciTrans, int (*_HCI_TransportSetBaudRate)(HCI_TRANSPORT_HANDLE HciTrans, u32 Baud); int (*_HCI_TransportEnablePowerMgmt)(HCI_TRANSPORT_HANDLE HciTrans, bool Enable); -extern HCI_TRANSPORT_CALLBACKS ar6kHciTransCallbacks; +extern struct hci_transport_callbacks ar6kHciTransCallbacks; -int ar6000_register_hci_transport(HCI_TRANSPORT_CALLBACKS *hciTransCallbacks) +int ar6000_register_hci_transport(struct hci_transport_callbacks *hciTransCallbacks) { ar6kHciTransCallbacks = *hciTransCallbacks; diff --git a/drivers/staging/ath6kl/os/linux/hci_bridge.c b/drivers/staging/ath6kl/os/linux/hci_bridge.c index a02827b..4f1e8ea 100644 --- a/drivers/staging/ath6kl/os/linux/hci_bridge.c +++ b/drivers/staging/ath6kl/os/linux/hci_bridge.c @@ -1121,7 +1121,7 @@ static int __init hcibridge_init_module(void) { int status; - HCI_TRANSPORT_CALLBACKS hciTransCallbacks; + struct hci_transport_callbacks hciTransCallbacks; hciTransCallbacks.setupTransport = ar6000_setup_hci; hciTransCallbacks.cleanupTransport = ar6000_cleanup_hci; diff --git a/drivers/staging/ath6kl/os/linux/include/export_hci_transport.h b/drivers/staging/ath6kl/os/linux/include/export_hci_transport.h index 63d887c..51187f6 100644 --- a/drivers/staging/ath6kl/os/linux/include/export_hci_transport.h +++ b/drivers/staging/ath6kl/os/linux/include/export_hci_transport.h @@ -61,7 +61,7 @@ extern int (*_HCI_TransportEnablePowerMgmt)(HCI_TRANSPORT_HANDLE HciTrans, bo _HCI_TransportEnablePowerMgmt((HciTrans), (Enable)) -extern int ar6000_register_hci_transport(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); -- 1.7.4.15.g7811d From 25812b39613328ffdeb475f2d78936d11376d345 Mon Sep 17 00:00:00 2001 From: Luis R. Rodriguez Date: Mon, 28 Feb 2011 13:11:28 -0800 Subject: [PATCH 24/58] ath6kl: remove-typedef HCI_TRANSPORT_CONFIG_INFO remove-typedef -s HCI_TRANSPORT_CONFIG_INFO \ "struct hci_transport_config_info" drivers/staging/ath6kl/ Cc: Naveen Singh Signed-off-by: Luis R. Rodriguez --- drivers/staging/ath6kl/htc2/AR6000/ar6k.h | 2 +- .../ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c | 6 +++--- drivers/staging/ath6kl/include/hci_transport_api.h | 6 +++--- .../staging/ath6kl/os/linux/export_hci_transport.c | 2 +- drivers/staging/ath6kl/os/linux/hci_bridge.c | 4 ++-- .../ath6kl/os/linux/include/export_hci_transport.h | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k.h b/drivers/staging/ath6kl/htc2/AR6000/ar6k.h index 88ef25a..4b69f91 100644 --- a/drivers/staging/ath6kl/htc2/AR6000/ar6k.h +++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k.h @@ -361,7 +361,7 @@ static INLINE int DevSetupGMbox(struct ar6k_device *pDev) { #ifdef ATH_AR6K_ENABLE_GMBOX /* GMBOX protocol modules must expose each of these internal APIs */ -HCI_TRANSPORT_HANDLE GMboxAttachProtocol(struct ar6k_device *pDev, HCI_TRANSPORT_CONFIG_INFO *pInfo); +HCI_TRANSPORT_HANDLE GMboxAttachProtocol(struct ar6k_device *pDev, struct hci_transport_config_info *pInfo); int GMboxProtocolInstall(struct ar6k_device *pDev); void GMboxProtocolUninstall(struct ar6k_device *pDev); diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c b/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c index 78da8a1..c7e8f71 100644 --- a/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c +++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c @@ -57,7 +57,7 @@ #define BTPWRSAV_TIMEOUT_MS 1 struct gmbox_proto_hci_uart { - HCI_TRANSPORT_CONFIG_INFO HCIConfig; + struct hci_transport_config_info HCIConfig; bool HCIAttached; bool HCIStopped; u32 RecvStateFlags; @@ -936,7 +936,7 @@ static int NotifyTransportReady(struct gmbox_proto_hci_uart *pProt) /*********** HCI UART protocol implementation ************************************************/ -HCI_TRANSPORT_HANDLE HCI_TransportAttach(void *HTCHandle, HCI_TRANSPORT_CONFIG_INFO *pInfo) +HCI_TRANSPORT_HANDLE HCI_TransportAttach(void *HTCHandle, struct hci_transport_config_info *pInfo) { struct gmbox_proto_hci_uart *pProtocol = NULL; struct ar6k_device *pDev; @@ -961,7 +961,7 @@ HCI_TRANSPORT_HANDLE HCI_TransportAttach(void *HTCHandle, HCI_TRANSPORT_CONFIG_I break; } - memcpy(&pProtocol->HCIConfig, pInfo, sizeof(HCI_TRANSPORT_CONFIG_INFO)); + memcpy(&pProtocol->HCIConfig, pInfo, sizeof(struct hci_transport_config_info)); A_ASSERT(pProtocol->HCIConfig.pHCIPktRecv != NULL); A_ASSERT(pProtocol->HCIConfig.pHCISendComplete != NULL); diff --git a/drivers/staging/ath6kl/include/hci_transport_api.h b/drivers/staging/ath6kl/include/hci_transport_api.h index 8ab692d..7fa44f0 100644 --- a/drivers/staging/ath6kl/include/hci_transport_api.h +++ b/drivers/staging/ath6kl/include/hci_transport_api.h @@ -85,7 +85,7 @@ typedef struct { int IOBlockPad; /* I/O block padding required (always a power of 2) */ } HCI_TRANSPORT_PROPERTIES; -typedef struct _HCI_TRANSPORT_CONFIG_INFO { +struct hci_transport_config_info { int ACLRecvBufferWaterMark; /* low watermark to trigger recv refill */ int EventRecvBufferWaterMark; /* low watermark to trigger recv refill */ int MaxSendQueueDepth; /* max number of packets in the single send queue */ @@ -99,7 +99,7 @@ typedef struct _HCI_TRANSPORT_CONFIG_INFO { HCI_TRANSPORT_RECV_REFILL pHCIPktRecvRefill; HCI_TRANSPORT_RECV_ALLOC pHCIPktRecvAlloc; HCI_TRANSPORT_SEND_FULL pHCISendFull; -} HCI_TRANSPORT_CONFIG_INFO; +}; /* ------ Function Prototypes ------ */ /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @@ -113,7 +113,7 @@ typedef struct _HCI_TRANSPORT_CONFIG_INFO { @example: @see also: HCI_TransportDetach +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ -HCI_TRANSPORT_HANDLE HCI_TransportAttach(void *HTCHandle, HCI_TRANSPORT_CONFIG_INFO *pInfo); +HCI_TRANSPORT_HANDLE HCI_TransportAttach(void *HTCHandle, struct hci_transport_config_info *pInfo); /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @desc: Detach from the HCI transport module diff --git a/drivers/staging/ath6kl/os/linux/export_hci_transport.c b/drivers/staging/ath6kl/os/linux/export_hci_transport.c index 168d6f7..fd87526 100644 --- a/drivers/staging/ath6kl/os/linux/export_hci_transport.c +++ b/drivers/staging/ath6kl/os/linux/export_hci_transport.c @@ -36,7 +36,7 @@ #include "AR6002/hw4.0/hw/uart_reg.h" #include "AR6002/hw4.0/hw/rtc_wlan_reg.h" -HCI_TRANSPORT_HANDLE (*_HCI_TransportAttach)(void *HTCHandle, HCI_TRANSPORT_CONFIG_INFO *pInfo); +HCI_TRANSPORT_HANDLE (*_HCI_TransportAttach)(void *HTCHandle, struct hci_transport_config_info *pInfo); void (*_HCI_TransportDetach)(HCI_TRANSPORT_HANDLE HciTrans); int (*_HCI_TransportAddReceivePkts)(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET_QUEUE *pQueue); int (*_HCI_TransportSendPkt)(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET *pPacket, bool Synchronous); diff --git a/drivers/staging/ath6kl/os/linux/hci_bridge.c b/drivers/staging/ath6kl/os/linux/hci_bridge.c index 4f1e8ea..dfe7546 100644 --- a/drivers/staging/ath6kl/os/linux/hci_bridge.c +++ b/drivers/staging/ath6kl/os/linux/hci_bridge.c @@ -469,7 +469,7 @@ int ar6000_setup_hci(void *ar) int ar6000_setup_hci(AR_SOFTC_T *ar) #endif { - HCI_TRANSPORT_CONFIG_INFO config; + struct hci_transport_config_info config; int status = 0; int i; HTC_PACKET *pPacket; @@ -521,7 +521,7 @@ int ar6000_setup_hci(AR_SOFTC_T *ar) FreeHTCStruct(pHcidevInfo,pPacket); } - A_MEMZERO(&config,sizeof(HCI_TRANSPORT_CONFIG_INFO)); + A_MEMZERO(&config,sizeof(struct hci_transport_config_info)); config.ACLRecvBufferWaterMark = MAX_ACL_RECV_BUFS / 2; config.EventRecvBufferWaterMark = MAX_EVT_RECV_BUFS / 2; config.MaxSendQueueDepth = MAX_HCI_WRITE_QUEUE_DEPTH; diff --git a/drivers/staging/ath6kl/os/linux/include/export_hci_transport.h b/drivers/staging/ath6kl/os/linux/include/export_hci_transport.h index 51187f6..cf66717 100644 --- a/drivers/staging/ath6kl/os/linux/include/export_hci_transport.h +++ b/drivers/staging/ath6kl/os/linux/include/export_hci_transport.h @@ -25,7 +25,7 @@ #include "hci_transport_api.h" #include "common_drv.h" -extern HCI_TRANSPORT_HANDLE (*_HCI_TransportAttach)(void *HTCHandle, HCI_TRANSPORT_CONFIG_INFO *pInfo); +extern HCI_TRANSPORT_HANDLE (*_HCI_TransportAttach)(void *HTCHandle, struct hci_transport_config_info *pInfo); extern void (*_HCI_TransportDetach)(HCI_TRANSPORT_HANDLE HciTrans); extern int (*_HCI_TransportAddReceivePkts)(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET_QUEUE *pQueue); extern int (*_HCI_TransportSendPkt)(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET *pPacket, bool Synchronous); -- 1.7.4.15.g7811d From c0292fb9b80b00120bd8296a108b11eaf8ace8a7 Mon Sep 17 00:00:00 2001 From: Luis R. Rodriguez Date: Mon, 28 Feb 2011 13:14:48 -0800 Subject: [PATCH 25/58] ath6kl: remove-typedef HCI_TRANSPORT_MISC_HANDLES remove-typedef -s HCI_TRANSPORT_MISC_HANDLES \ "struct hci_transport_misc_handles" drivers/staging/ath6kl/ Cc: Naveen Singh Signed-off-by: Luis R. Rodriguez --- drivers/staging/ath6kl/include/common_drv.h | 4 ++-- drivers/staging/ath6kl/os/linux/ar6000_drv.c | 2 +- drivers/staging/ath6kl/os/linux/hci_bridge.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/ath6kl/include/common_drv.h b/drivers/staging/ath6kl/include/common_drv.h index 2b633d9..4c70a77 100644 --- a/drivers/staging/ath6kl/include/common_drv.h +++ b/drivers/staging/ath6kl/include/common_drv.h @@ -41,11 +41,11 @@ struct hci_transport_callbacks { void (*cleanupTransport)(void *ar); }; -typedef struct { +struct hci_transport_misc_handles { void *netDevice; void *hifDevice; void *htcHandle; -} HCI_TRANSPORT_MISC_HANDLES; +}; /* HTC TX packet tagging definitions */ #define AR6K_CONTROL_PKT_TAG HTC_TX_PACKET_TAG_USER_DEFINED diff --git a/drivers/staging/ath6kl/os/linux/ar6000_drv.c b/drivers/staging/ath6kl/os/linux/ar6000_drv.c index add1ceb..749e284 100644 --- a/drivers/staging/ath6kl/os/linux/ar6000_drv.c +++ b/drivers/staging/ath6kl/os/linux/ar6000_drv.c @@ -2723,7 +2723,7 @@ int ar6000_init(struct net_device *dev) #ifdef EXPORT_HCI_BRIDGE_INTERFACE if (setuphci && (NULL != ar6kHciTransCallbacks.setupTransport)) { - HCI_TRANSPORT_MISC_HANDLES hciHandles; + struct hci_transport_misc_handles hciHandles; hciHandles.netDevice = ar->arNetDev; hciHandles.hifDevice = ar->arHifDevice; diff --git a/drivers/staging/ath6kl/os/linux/hci_bridge.c b/drivers/staging/ath6kl/os/linux/hci_bridge.c index dfe7546..64aece8 100644 --- a/drivers/staging/ath6kl/os/linux/hci_bridge.c +++ b/drivers/staging/ath6kl/os/linux/hci_bridge.c @@ -83,7 +83,7 @@ struct ar6k_hci_bridge_info { u8 *pHTCStructAlloc; spinlock_t BridgeLock; #ifdef EXPORT_HCI_BRIDGE_INTERFACE - HCI_TRANSPORT_MISC_HANDLES HCITransHdl; + struct hci_transport_misc_handles HCITransHdl; #else AR_SOFTC_T *ar; #endif /* EXPORT_HCI_BRIDGE_INTERFACE */ @@ -488,7 +488,7 @@ int ar6000_setup_hci(AR_SOFTC_T *ar) A_MEMZERO(pHcidevInfo, sizeof(struct ar6k_hci_bridge_info)); #ifdef EXPORT_HCI_BRIDGE_INTERFACE g_pHcidevInfo = pHcidevInfo; - pHcidevInfo->HCITransHdl = *(HCI_TRANSPORT_MISC_HANDLES *)ar; + pHcidevInfo->HCITransHdl = *(struct hci_transport_misc_handles *)ar; #else ar->hcidev_info = pHcidevInfo; pHcidevInfo->ar = ar; -- 1.7.4.15.g7811d From 1a52ee1f1b75dfc35a534e8c993d651ac465f3e6 Mon Sep 17 00:00:00 2001 From: Luis R. Rodriguez Date: Mon, 28 Feb 2011 13:17:17 -0800 Subject: [PATCH 26/58] ath6kl: remove-typedef HCI_TRANSPORT_PROPERTIES remove-typedef -s HCI_TRANSPORT_PROPERTIES \ "struct hci_transport_properties" drivers/staging/ath6kl/ Cc: Naveen Singh Signed-off-by: Luis R. Rodriguez --- .../ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c | 2 +- drivers/staging/ath6kl/include/ar3kconfig.h | 2 +- drivers/staging/ath6kl/include/hci_transport_api.h | 6 +++--- drivers/staging/ath6kl/os/linux/hci_bridge.c | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c b/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c index c7e8f71..8e5abe8 100644 --- a/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c +++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c @@ -910,7 +910,7 @@ void GMboxProtocolUninstall(struct ar6k_device *pDev) static int NotifyTransportReady(struct gmbox_proto_hci_uart *pProt) { - HCI_TRANSPORT_PROPERTIES props; + struct hci_transport_properties props; int status = 0; do { diff --git a/drivers/staging/ath6kl/include/ar3kconfig.h b/drivers/staging/ath6kl/include/ar3kconfig.h index 20d295b..80f948e 100644 --- a/drivers/staging/ath6kl/include/ar3kconfig.h +++ b/drivers/staging/ath6kl/include/ar3kconfig.h @@ -41,7 +41,7 @@ extern "C" { struct ar3k_config_info { u32 Flags; /* config flags */ void *pHCIDev; /* HCI bridge device */ - HCI_TRANSPORT_PROPERTIES *pHCIProps; /* HCI bridge props */ + struct hci_transport_properties *pHCIProps; /* HCI bridge props */ HIF_DEVICE *pHIFDevice; /* HIF layer device */ u32 AR3KBaudRate; /* AR3K operational baud rate */ diff --git a/drivers/staging/ath6kl/include/hci_transport_api.h b/drivers/staging/ath6kl/include/hci_transport_api.h index 7fa44f0..ee25c6b 100644 --- a/drivers/staging/ath6kl/include/hci_transport_api.h +++ b/drivers/staging/ath6kl/include/hci_transport_api.h @@ -79,11 +79,11 @@ typedef enum _HCI_SEND_FULL_ACTION { * the callback must return the send full action to take (either DROP or KEEP) */ typedef HCI_SEND_FULL_ACTION (*HCI_TRANSPORT_SEND_FULL)(void *, HTC_PACKET *); -typedef struct { +struct hci_transport_properties { int HeadRoom; /* number of bytes in front of HCI packet for header space */ int TailRoom; /* number of bytes at the end of the HCI packet for tail space */ int IOBlockPad; /* I/O block padding required (always a power of 2) */ -} HCI_TRANSPORT_PROPERTIES; +}; struct hci_transport_config_info { int ACLRecvBufferWaterMark; /* low watermark to trigger recv refill */ @@ -91,7 +91,7 @@ struct hci_transport_config_info { int MaxSendQueueDepth; /* max number of packets in the single send queue */ void *pContext; /* context for all callbacks */ void (*TransportFailure)(void *pContext, int Status); /* transport failure callback */ - int (*TransportReady)(HCI_TRANSPORT_HANDLE, HCI_TRANSPORT_PROPERTIES *,void *pContext); /* transport is ready */ + int (*TransportReady)(HCI_TRANSPORT_HANDLE, struct hci_transport_properties *,void *pContext); /* transport is ready */ void (*TransportRemoved)(void *pContext); /* transport was removed */ /* packet processing callbacks */ HCI_TRANSPORT_SEND_PKT_COMPLETE pHCISendComplete; diff --git a/drivers/staging/ath6kl/os/linux/hci_bridge.c b/drivers/staging/ath6kl/os/linux/hci_bridge.c index 64aece8..036cd54 100644 --- a/drivers/staging/ath6kl/os/linux/hci_bridge.c +++ b/drivers/staging/ath6kl/os/linux/hci_bridge.c @@ -75,7 +75,7 @@ extern unsigned int hciuartstep; struct ar6k_hci_bridge_info { void *pHCIDev; /* HCI bridge device */ - HCI_TRANSPORT_PROPERTIES HCIProps; /* HCI bridge props */ + struct hci_transport_properties HCIProps; /* HCI bridge props */ struct hci_dev *pBtStackHCIDev; /* BT Stack HCI dev */ bool HciNormalMode; /* Actual HCI mode enabled (non-TEST)*/ bool HciRegistered; /* HCI device registered with stack */ @@ -216,7 +216,7 @@ static void RefillRecvBuffers(struct ar6k_hci_bridge_info *pHcidevInfo, (((ar)->arTargetType == TARGET_TYPE_AR6002) ? AR6002_HOST_INTEREST_ITEM_ADDRESS(item) : \ (((ar)->arTargetType == TARGET_TYPE_AR6003) ? AR6003_HOST_INTEREST_ITEM_ADDRESS(item) : 0)) static int ar6000_hci_transport_ready(HCI_TRANSPORT_HANDLE HCIHandle, - HCI_TRANSPORT_PROPERTIES *pProps, + struct hci_transport_properties *pProps, void *pContext) { struct ar6k_hci_bridge_info *pHcidevInfo = (struct ar6k_hci_bridge_info *)pContext; -- 1.7.4.15.g7811d From 7bfe72cdcbeb54d40c90c3daf8774a5fa167b982 Mon Sep 17 00:00:00 2001 From: Luis R. Rodriguez Date: Mon, 28 Feb 2011 13:19:32 -0800 Subject: [PATCH 27/58] ath6kl: remove-typedef HIF_DEVICE_IRQ_YIELD_PARAMS remove-typedef -s HIF_DEVICE_IRQ_YIELD_PARAMS \ "struct hif_device_irq_yield_params" drivers/staging/ath6kl/ Cc: Naveen Singh Signed-off-by: Luis R. Rodriguez --- drivers/staging/ath6kl/htc2/AR6000/ar6k.h | 2 +- drivers/staging/ath6kl/include/hif.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k.h b/drivers/staging/ath6kl/htc2/AR6000/ar6k.h index 4b69f91..e367288 100644 --- a/drivers/staging/ath6kl/htc2/AR6000/ar6k.h +++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k.h @@ -129,7 +129,7 @@ struct ar6k_device { HIF_DEVICE_IRQ_PROCESSING_MODE HifIRQProcessingMode; HIF_MASK_UNMASK_RECV_EVENT HifMaskUmaskRecvEvent; bool HifAttached; - HIF_DEVICE_IRQ_YIELD_PARAMS HifIRQYieldParams; + struct hif_device_irq_yield_params HifIRQYieldParams; bool DSRCanYield; int CurrentDSRRecvCount; HIF_DEVICE_SCATTER_SUPPORT_INFO HifScatterInfo; diff --git a/drivers/staging/ath6kl/include/hif.h b/drivers/staging/ath6kl/include/hif.h index 3421a59..044af7e 100644 --- a/drivers/staging/ath6kl/include/hif.h +++ b/drivers/staging/ath6kl/include/hif.h @@ -190,7 +190,7 @@ typedef enum { * HIF_DEVICE_GET_IRQ_YIELD_PARAMS * * input : none - * output : HIF_DEVICE_IRQ_YIELD_PARAMS + * output : struct hif_device_irq_yield_params * note: This query checks if the HIF layer wishes to impose a processing yield count for the DSR handler. * The DSR callback handler will exit after a fixed number of RX packets or events are processed. * This query is only made if the device reports an IRQ processing mode of HIF_DEVICE_IRQ_SYNC_ONLY. @@ -265,9 +265,9 @@ typedef enum { */ } HIF_DEVICE_POWER_CHANGE_TYPE; -typedef struct { +struct hif_device_irq_yield_params { int RecvPacketYieldCount; /* max number of packets to force DSR to return */ -} HIF_DEVICE_IRQ_YIELD_PARAMS; +}; typedef struct _HIF_SCATTER_ITEM { -- 1.7.4.15.g7811d From 14c156007889cf0f4e2188bac164933141b9d1d3 Mon Sep 17 00:00:00 2001 From: Luis R. Rodriguez Date: Mon, 28 Feb 2011 13:23:23 -0800 Subject: [PATCH 28/58] ath6kl: remove-typedef HIF_DEVICE_MBOX_INFO remove-typedef -s HIF_DEVICE_MBOX_INFO \ "struct hif_device_mbox_info" drivers/staging/ath6kl/ Cc: Naveen Singh Signed-off-by: Luis R. Rodriguez --- .../staging/ath6kl/hif/common/hif_sdio_common.h | 2 +- .../staging/ath6kl/hif/sdio/linux_sdio/src/hif.c | 4 ++-- drivers/staging/ath6kl/htc2/AR6000/ar6k.h | 2 +- drivers/staging/ath6kl/include/hif.h | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/staging/ath6kl/hif/common/hif_sdio_common.h b/drivers/staging/ath6kl/hif/common/hif_sdio_common.h index 9939a4a..93a2adc 100644 --- a/drivers/staging/ath6kl/hif/common/hif_sdio_common.h +++ b/drivers/staging/ath6kl/hif/common/hif_sdio_common.h @@ -58,7 +58,7 @@ #define HIF_DEFAULT_IO_BLOCK_SIZE 128 /* set extended MBOX window information for SDIO interconnects */ -static INLINE void SetExtendedMboxWindowInfo(u16 Manfid, HIF_DEVICE_MBOX_INFO *pInfo) +static INLINE void SetExtendedMboxWindowInfo(u16 Manfid, struct hif_device_mbox_info *pInfo) { switch (Manfid & MANUFACTURER_ID_AR6K_BASE_MASK) { case MANUFACTURER_ID_AR6002_BASE : diff --git a/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif.c b/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif.c index b9f8c72..3356b19 100644 --- a/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif.c +++ b/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif.c @@ -710,9 +710,9 @@ HIFConfigureDevice(HIF_DEVICE *device, HIF_DEVICE_CONFIG_OPCODE opcode, ((u32 *)config)[count] = HIF_MBOX_START_ADDR(count); } - if (configLen >= sizeof(HIF_DEVICE_MBOX_INFO)) { + if (configLen >= sizeof(struct hif_device_mbox_info)) { SetExtendedMboxWindowInfo((u16)device->func->device, - (HIF_DEVICE_MBOX_INFO *)config); + (struct hif_device_mbox_info *)config); } break; diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k.h b/drivers/staging/ath6kl/htc2/AR6000/ar6k.h index e367288..85c5915 100644 --- a/drivers/staging/ath6kl/htc2/AR6000/ar6k.h +++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k.h @@ -115,7 +115,7 @@ struct ar6k_device { void *HIFDevice; u32 BlockSize; u32 BlockMask; - HIF_DEVICE_MBOX_INFO MailBoxInfo; + struct hif_device_mbox_info MailBoxInfo; HIF_PENDING_EVENTS_FUNC GetPendingEventsFunc; void *HTCContext; HTC_PACKET_QUEUE RegisterIOList; diff --git a/drivers/staging/ath6kl/include/hif.h b/drivers/staging/ath6kl/include/hif.h index 044af7e..8df01b3 100644 --- a/drivers/staging/ath6kl/include/hif.h +++ b/drivers/staging/ath6kl/include/hif.h @@ -153,7 +153,7 @@ typedef enum { * * HIF_DEVICE_GET_MBOX_ADDR * input : none - * output : HIF_DEVICE_MBOX_INFO + * output : struct hif_device_mbox_info * notes: * * HIF_DEVICE_GET_PENDING_EVENTS_FUNC @@ -235,7 +235,7 @@ typedef enum _MBOX_BUF_IF_TYPE { MBOX_BUS_IF_SPI = 1, } MBOX_BUF_IF_TYPE; -typedef struct { +struct hif_device_mbox_info { u32 MboxAddresses[4]; /* must be first element for legacy HIFs that return the address in and ARRAY of 32-bit words */ @@ -247,7 +247,7 @@ typedef struct { u32 GMboxSize; u32 Flags; /* flags to describe mbox behavior or usage */ MBOX_BUF_IF_TYPE MboxBusIFType; /* mailbox bus interface type */ -} HIF_DEVICE_MBOX_INFO; +}; typedef enum { HIF_DEVICE_IRQ_SYNC_ONLY, /* for HIF implementations that require the DSR to process all -- 1.7.4.15.g7811d From b273896abae833aaf3d730cb64cff82ddc1986e5 Mon Sep 17 00:00:00 2001 From: Luis R. Rodriguez Date: Mon, 28 Feb 2011 13:25:12 -0800 Subject: [PATCH 29/58] ath6kl: remove-typedef HIF_DEVICE_OS_DEVICE_INFO remove-typedef -s HIF_DEVICE_OS_DEVICE_INFO \ "struct hif_device_os_device_info" drivers/staging/ath6kl/ Cc: Naveen Singh Signed-off-by: Luis R. Rodriguez --- .../staging/ath6kl/hif/sdio/linux_sdio/src/hif.c | 2 +- drivers/staging/ath6kl/include/hif.h | 6 +++--- drivers/staging/ath6kl/os/linux/ar6000_drv.c | 10 +++++----- .../staging/ath6kl/os/linux/export_hci_transport.c | 4 ++-- drivers/staging/ath6kl/os/linux/hci_bridge.c | 2 +- .../staging/ath6kl/os/linux/include/ar6000_drv.h | 2 +- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif.c b/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif.c index 3356b19..d9c9c1c 100644 --- a/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif.c +++ b/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif.c @@ -730,7 +730,7 @@ HIFConfigureDevice(HIF_DEVICE *device, HIF_DEVICE_CONFIG_OPCODE opcode, break; case HIF_DEVICE_GET_OS_DEVICE: /* pass back a pointer to the SDIO function's "dev" struct */ - ((HIF_DEVICE_OS_DEVICE_INFO *)config)->pOSDevice = &device->func->dev; + ((struct hif_device_os_device_info *)config)->pOSDevice = &device->func->dev; break; case HIF_DEVICE_POWER_STATE_CHANGE: status = PowerStateChangeNotify(device, *(HIF_DEVICE_POWER_CHANGE_TYPE *)config); diff --git a/drivers/staging/ath6kl/include/hif.h b/drivers/staging/ath6kl/include/hif.h index 8df01b3..2c0f490 100644 --- a/drivers/staging/ath6kl/include/hif.h +++ b/drivers/staging/ath6kl/include/hif.h @@ -211,7 +211,7 @@ typedef enum { * * HIF_DEVICE_GET_OS_DEVICE * intput : none - * output : HIF_DEVICE_OS_DEVICE_INFO; + * output : struct hif_device_os_device_info; * note: On some operating systems, the HIF layer has a parent device object for the bus. This object * may be required to register certain types of logical devices. * @@ -315,9 +315,9 @@ typedef struct _HIF_DEVICE_SCATTER_SUPPORT_INFO { int MaxTransferSizePerScatterReq; } HIF_DEVICE_SCATTER_SUPPORT_INFO; -typedef struct { +struct hif_device_os_device_info { void *pOSDevice; -} HIF_DEVICE_OS_DEVICE_INFO; +}; #define HIF_MAX_DEVICES 1 diff --git a/drivers/staging/ath6kl/os/linux/ar6000_drv.c b/drivers/staging/ath6kl/os/linux/ar6000_drv.c index 749e284..b739943 100644 --- a/drivers/staging/ath6kl/os/linux/ar6000_drv.c +++ b/drivers/staging/ath6kl/os/linux/ar6000_drv.c @@ -803,7 +803,7 @@ ar6000_sysfs_bmi_read(struct file *fp, struct kobject *kobj, { int index; AR_SOFTC_T *ar; - HIF_DEVICE_OS_DEVICE_INFO *osDevInfo; + struct hif_device_os_device_info *osDevInfo; AR_DEBUG_PRINTF(ATH_DEBUG_INFO,("BMI: Read %d bytes\n", (u32)count)); for (index=0; index < MAX_AR6000; index++) { @@ -830,7 +830,7 @@ ar6000_sysfs_bmi_write(struct file *fp, struct kobject *kobj, { int index; AR_SOFTC_T *ar; - HIF_DEVICE_OS_DEVICE_INFO *osDevInfo; + struct hif_device_os_device_info *osDevInfo; AR_DEBUG_PRINTF(ATH_DEBUG_INFO,("BMI: Write %d bytes\n", (u32)count)); for (index=0; index < MAX_AR6000; index++) { @@ -856,13 +856,13 @@ ar6000_sysfs_bmi_init(AR_SOFTC_T *ar) int status; AR_DEBUG_PRINTF(ATH_DEBUG_INFO,("BMI: Creating sysfs entry\n")); - A_MEMZERO(&ar->osDevInfo, sizeof(HIF_DEVICE_OS_DEVICE_INFO)); + A_MEMZERO(&ar->osDevInfo, sizeof(struct hif_device_os_device_info)); /* Get the underlying OS device */ status = HIFConfigureDevice(ar->arHifDevice, HIF_DEVICE_GET_OS_DEVICE, &ar->osDevInfo, - sizeof(HIF_DEVICE_OS_DEVICE_INFO)); + sizeof(struct hif_device_os_device_info)); if (status) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("BMI: Failed to get OS device info from HIF\n")); @@ -1604,7 +1604,7 @@ ar6000_avail_ev(void *context, void *hif_handle) struct wireless_dev *wdev; #endif /* ATH6K_CONFIG_CFG80211 */ int init_status = 0; - HIF_DEVICE_OS_DEVICE_INFO osDevInfo; + struct hif_device_os_device_info osDevInfo; memset(&osDevInfo, 0, sizeof(osDevInfo)); if (HIFConfigureDevice(hif_handle, HIF_DEVICE_GET_OS_DEVICE, diff --git a/drivers/staging/ath6kl/os/linux/export_hci_transport.c b/drivers/staging/ath6kl/os/linux/export_hci_transport.c index fd87526..79b30eb 100644 --- a/drivers/staging/ath6kl/os/linux/export_hci_transport.c +++ b/drivers/staging/ath6kl/os/linux/export_hci_transport.c @@ -76,8 +76,8 @@ ar6000_get_hif_dev(HIF_DEVICE *device, void *config) status = HIFConfigureDevice(device, HIF_DEVICE_GET_OS_DEVICE, - (HIF_DEVICE_OS_DEVICE_INFO *)config, - sizeof(HIF_DEVICE_OS_DEVICE_INFO)); + (struct hif_device_os_device_info *)config, + sizeof(struct hif_device_os_device_info)); return status; } diff --git a/drivers/staging/ath6kl/os/linux/hci_bridge.c b/drivers/staging/ath6kl/os/linux/hci_bridge.c index 036cd54..2fdf359 100644 --- a/drivers/staging/ath6kl/os/linux/hci_bridge.c +++ b/drivers/staging/ath6kl/os/linux/hci_bridge.c @@ -857,7 +857,7 @@ static int bt_setup_hci(struct ar6k_hci_bridge_info *pHcidevInfo) { int status = 0; struct hci_dev *pHciDev = NULL; - HIF_DEVICE_OS_DEVICE_INFO osDevInfo; + struct hif_device_os_device_info osDevInfo; if (!setupbtdev) { return 0; diff --git a/drivers/staging/ath6kl/os/linux/include/ar6000_drv.h b/drivers/staging/ath6kl/os/linux/include/ar6000_drv.h index 2373ed5..a209133 100644 --- a/drivers/staging/ath6kl/os/linux/include/ar6000_drv.h +++ b/drivers/staging/ath6kl/os/linux/include/ar6000_drv.h @@ -596,7 +596,7 @@ typedef struct ar6_softc { WMI_BTCOEX_CONFIG_EVENT arBtcoexConfig; WMI_BTCOEX_STATS_EVENT arBtcoexStats; s32 (*exitCallback)(void *config); /* generic callback at AR6K exit */ - HIF_DEVICE_OS_DEVICE_INFO osDevInfo; + struct hif_device_os_device_info osDevInfo; #ifdef ATH6K_CONFIG_CFG80211 struct wireless_dev *wdev; struct cfg80211_scan_request *scan_request; -- 1.7.4.15.g7811d From 360cd45f1e89617dd639699a5a31d913c42e690a Mon Sep 17 00:00:00 2001 From: Luis R. Rodriguez Date: Mon, 28 Feb 2011 13:27:13 -0800 Subject: [PATCH 30/58] ath6kl: remove-typedef HIF_DEVICE_SCATTER_SUPPORT_INFO remove-typedef -s HIF_DEVICE_SCATTER_SUPPORT_INFO \ "struct hif_device_scatter_support_info" drivers/staging/ath6kl/ Cc: Naveen Singh Signed-off-by: Luis R. Rodriguez --- .../hif/sdio/linux_sdio/include/hif_internal.h | 4 ++-- .../staging/ath6kl/hif/sdio/linux_sdio/src/hif.c | 2 +- .../ath6kl/hif/sdio/linux_sdio/src/hif_scatter.c | 2 +- drivers/staging/ath6kl/htc2/AR6000/ar6k.h | 2 +- drivers/staging/ath6kl/include/hif.h | 6 +++--- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/staging/ath6kl/hif/sdio/linux_sdio/include/hif_internal.h b/drivers/staging/ath6kl/hif/sdio/linux_sdio/include/hif_internal.h index b5d1ad4..e2d2266 100644 --- a/drivers/staging/ath6kl/hif/sdio/linux_sdio/include/hif_internal.h +++ b/drivers/staging/ath6kl/hif/sdio/linux_sdio/include/hif_internal.h @@ -110,13 +110,13 @@ typedef struct _HIF_SCATTER_REQ_PRIV { #define ATH_DEBUG_SCATTER ATH_DEBUG_MAKE_MODULE_MASK(0) -int SetupHIFScatterSupport(HIF_DEVICE *device, HIF_DEVICE_SCATTER_SUPPORT_INFO *pInfo); +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); #else // HIF_LINUX_MMC_SCATTER_SUPPORT -static inline int SetupHIFScatterSupport(HIF_DEVICE *device, HIF_DEVICE_SCATTER_SUPPORT_INFO *pInfo) +static inline int SetupHIFScatterSupport(HIF_DEVICE *device, struct hif_device_scatter_support_info *pInfo) { return A_ENOTSUP; } diff --git a/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif.c b/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif.c index d9c9c1c..011925d 100644 --- a/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif.c +++ b/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif.c @@ -723,7 +723,7 @@ HIFConfigureDevice(HIF_DEVICE *device, HIF_DEVICE_CONFIG_OPCODE opcode, if (!device->scatter_enabled) { return A_ENOTSUP; } - status = SetupHIFScatterSupport(device, (HIF_DEVICE_SCATTER_SUPPORT_INFO *)config); + status = SetupHIFScatterSupport(device, (struct hif_device_scatter_support_info *)config); if (status) { device->scatter_enabled = false; } diff --git a/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif_scatter.c b/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif_scatter.c index 2a56a50..567993f 100644 --- a/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif_scatter.c +++ b/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif_scatter.c @@ -275,7 +275,7 @@ static int HifReadWriteScatter(HIF_DEVICE *device, HIF_SCATTER_REQ *pReq) } /* setup of HIF scatter resources */ -int SetupHIFScatterSupport(HIF_DEVICE *device, HIF_DEVICE_SCATTER_SUPPORT_INFO *pInfo) +int SetupHIFScatterSupport(HIF_DEVICE *device, struct hif_device_scatter_support_info *pInfo) { int status = A_ERROR; int i; diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k.h b/drivers/staging/ath6kl/htc2/AR6000/ar6k.h index 85c5915..08e9ef2 100644 --- a/drivers/staging/ath6kl/htc2/AR6000/ar6k.h +++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k.h @@ -132,7 +132,7 @@ struct ar6k_device { struct hif_device_irq_yield_params HifIRQYieldParams; bool DSRCanYield; int CurrentDSRRecvCount; - HIF_DEVICE_SCATTER_SUPPORT_INFO HifScatterInfo; + struct hif_device_scatter_support_info HifScatterInfo; struct dl_list ScatterReqHead; bool ScatterIsVirtual; int MaxRecvBundleSize; diff --git a/drivers/staging/ath6kl/include/hif.h b/drivers/staging/ath6kl/include/hif.h index 2c0f490..61e4392 100644 --- a/drivers/staging/ath6kl/include/hif.h +++ b/drivers/staging/ath6kl/include/hif.h @@ -203,7 +203,7 @@ typedef enum { * * HIF_CONFIGURE_QUERY_SCATTER_REQUEST_SUPPORT * input : none - * output : HIF_DEVICE_SCATTER_SUPPORT_INFO + * output : struct hif_device_scatter_support_info * note: This query checks if the HIF layer implements the SCATTER request interface. Scatter requests * allows upper layers to submit mailbox I/O operations using a list of buffers. This is useful for * multi-message transfers that can better utilize the bus interconnect. @@ -306,14 +306,14 @@ typedef HIF_SCATTER_REQ * ( *HIF_ALLOCATE_SCATTER_REQUEST)(HIF_DEVICE *device); typedef void ( *HIF_FREE_SCATTER_REQUEST)(HIF_DEVICE *device, HIF_SCATTER_REQ *request); typedef int ( *HIF_READWRITE_SCATTER)(HIF_DEVICE *device, HIF_SCATTER_REQ *request); -typedef struct _HIF_DEVICE_SCATTER_SUPPORT_INFO { +struct hif_device_scatter_support_info { /* information returned from HIF layer */ HIF_ALLOCATE_SCATTER_REQUEST pAllocateReqFunc; HIF_FREE_SCATTER_REQUEST pFreeReqFunc; HIF_READWRITE_SCATTER pReadWriteScatterFunc; int MaxScatterEntries; int MaxTransferSizePerScatterReq; -} HIF_DEVICE_SCATTER_SUPPORT_INFO; +}; struct hif_device_os_device_info { void *pOSDevice; -- 1.7.4.15.g7811d From dfca0ae109f2a5247954308ef218da85f012c8de Mon Sep 17 00:00:00 2001 From: Luis R. Rodriguez Date: Mon, 28 Feb 2011 13:28:31 -0800 Subject: [PATCH 31/58] ath6kl: remove-typedef HIF_MBOX_PROPERTIES remove-typedef -s HIF_MBOX_PROPERTIES \ "struct hif_mbox_properties" drivers/staging/ath6kl/ Cc: Naveen Singh Signed-off-by: Luis R. Rodriguez --- drivers/staging/ath6kl/include/hif.h | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/ath6kl/include/hif.h b/drivers/staging/ath6kl/include/hif.h index 61e4392..4f9be8a 100644 --- a/drivers/staging/ath6kl/include/hif.h +++ b/drivers/staging/ath6kl/include/hif.h @@ -223,10 +223,10 @@ typedef enum { * */ -typedef struct { +struct hif_mbox_properties { u32 ExtendedAddress; /* extended address for larger writes */ u32 ExtendedSize; -} HIF_MBOX_PROPERTIES; +}; #define HIF_MBOX_FLAG_NO_BUNDLING (1 << 0) /* do not allow bundling over the mailbox */ @@ -240,7 +240,7 @@ struct hif_device_mbox_info { and ARRAY of 32-bit words */ /* the following describe extended mailbox properties */ - HIF_MBOX_PROPERTIES MboxProp[4]; + struct hif_mbox_properties MboxProp[4]; /* if the HIF supports the GMbox extended address region it can report it * here, some interfaces cannot support the GMBOX address range and not set this */ u32 GMboxAddress; -- 1.7.4.15.g7811d From 92b1fd51f0b19098cfede8ba6b9ce07c816d0d50 Mon Sep 17 00:00:00 2001 From: Luis R. Rodriguez Date: Mon, 28 Feb 2011 13:31:23 -0800 Subject: [PATCH 32/58] ath6kl: remove-typedef HIF_PENDING_EVENTS_INFO remove-typedef -s HIF_PENDING_EVENTS_INFO \ "struct hif_pending_events_info" drivers/staging/ath6kl/ Cc: Naveen Singh Signed-off-by: Luis R. Rodriguez --- drivers/staging/ath6kl/bmi/src/bmi.c | 2 +- drivers/staging/ath6kl/htc2/AR6000/ar6k_events.c | 8 ++++---- drivers/staging/ath6kl/include/hif.h | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/staging/ath6kl/bmi/src/bmi.c b/drivers/staging/ath6kl/bmi/src/bmi.c index a9615b7..34d1bef 100644 --- a/drivers/staging/ath6kl/bmi/src/bmi.c +++ b/drivers/staging/ath6kl/bmi/src/bmi.c @@ -790,7 +790,7 @@ bmiBufferReceive(HIF_DEVICE *device, int status; u32 address; u32 mboxAddress[HTC_MAILBOX_NUM_MAX]; - HIF_PENDING_EVENTS_INFO hifPendingEvents; + struct hif_pending_events_info hifPendingEvents; static HIF_PENDING_EVENTS_FUNC getPendingEventsFunc = NULL; if (!pendingEventsFuncCheck) { diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k_events.c b/drivers/staging/ath6kl/htc2/AR6000/ar6k_events.c index bac4f93..ca6abb4 100644 --- a/drivers/staging/ath6kl/htc2/AR6000/ar6k_events.c +++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k_events.c @@ -74,7 +74,7 @@ int DevPollMboxMsgRecv(struct ar6k_device *pDev, if (pDev->GetPendingEventsFunc != NULL) { - HIF_PENDING_EVENTS_INFO events; + struct hif_pending_events_info events; #ifdef THREAD_X events.Polling =1; @@ -319,7 +319,7 @@ static void DevGetEventAsyncHandler(void *Context, HTC_PACKET *pPacket) if (pDev->GetPendingEventsFunc != NULL) { /* the HIF layer collected the information for us */ - HIF_PENDING_EVENTS_INFO *pEvents = (HIF_PENDING_EVENTS_INFO *)pPacket->pBuffer; + struct hif_pending_events_info *pEvents = (struct hif_pending_events_info *)pPacket->pBuffer; if (pEvents->Events & HIF_RECV_MSG_AVAIL) { lookAhead = pEvents->LookAhead; if (0 == lookAhead) { @@ -439,7 +439,7 @@ int DevCheckPendingRecvMsgsAsync(void *context) if (pDev->GetPendingEventsFunc) { /* HIF layer has it's own mechanism, pass the IO to it.. */ status = pDev->GetPendingEventsFunc(pDev->HIFDevice, - (HIF_PENDING_EVENTS_INFO *)pIOPacket->pBuffer, + (struct hif_pending_events_info *)pIOPacket->pBuffer, pIOPacket); } else { @@ -490,7 +490,7 @@ static int ProcessPendingIRQs(struct ar6k_device *pDev, bool *pDone, bool *pASyn } if (pDev->GetPendingEventsFunc != NULL) { - HIF_PENDING_EVENTS_INFO events; + struct hif_pending_events_info events; #ifdef THREAD_X events.Polling= 0; diff --git a/drivers/staging/ath6kl/include/hif.h b/drivers/staging/ath6kl/include/hif.h index 4f9be8a..8d0c94e 100644 --- a/drivers/staging/ath6kl/include/hif.h +++ b/drivers/staging/ath6kl/include/hif.h @@ -343,7 +343,7 @@ typedef struct osdrv_callbacks { needs to read the register table to figure out what */ #define HIF_RECV_MSG_AVAIL (1 << 1) /* pending recv packet */ -typedef struct _HIF_PENDING_EVENTS_INFO { +struct hif_pending_events_info { u32 Events; u32 LookAhead; u32 AvailableRecvBytes; @@ -351,12 +351,12 @@ typedef struct _HIF_PENDING_EVENTS_INFO { u32 Polling; u32 INT_CAUSE_REG; #endif -} 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, - HIF_PENDING_EVENTS_INFO *pEvents, + struct hif_pending_events_info *pEvents, void *AsyncContext); #define HIF_MASK_RECV true -- 1.7.4.15.g7811d From c95123ff99eb0504d8f3e2000fe74483e118cdc0 Mon Sep 17 00:00:00 2001 From: Luis R. Rodriguez Date: Mon, 28 Feb 2011 13:34:22 -0800 Subject: [PATCH 33/58] ath6kl: remove-typedef HIF_SCATTER_ITEM remove-typedef -s HIF_SCATTER_ITEM \ "struct hif_scatter_item" drivers/staging/ath6kl/ Cc: Naveen Singh Signed-off-by: Luis R. Rodriguez --- .../ath6kl/hif/sdio/linux_sdio/src/hif_scatter.c | 2 +- drivers/staging/ath6kl/htc2/AR6000/ar6k.c | 2 +- drivers/staging/ath6kl/include/hif.h | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif_scatter.c b/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif_scatter.c index 567993f..196d33d 100644 --- a/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif_scatter.c +++ b/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif_scatter.c @@ -306,7 +306,7 @@ int SetupHIFScatterSupport(HIF_DEVICE *device, struct hif_device_scatter_support pReqPriv->device = device; /* allocate the scatter request */ pReqPriv->pHifScatterReq = (HIF_SCATTER_REQ *)A_MALLOC(sizeof(HIF_SCATTER_REQ) + - (MAX_SCATTER_ENTRIES_PER_REQ - 1) * (sizeof(HIF_SCATTER_ITEM))); + (MAX_SCATTER_ENTRIES_PER_REQ - 1) * (sizeof(struct hif_scatter_item))); if (NULL == pReqPriv->pHifScatterReq) { A_FREE(pReqPriv); diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k.c b/drivers/staging/ath6kl/htc2/AR6000/ar6k.c index f9f411a..3ebf630 100644 --- a/drivers/staging/ath6kl/htc2/AR6000/ar6k.c +++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k.c @@ -761,7 +761,7 @@ static int DevSetupVirtualScatterSupport(struct ar6k_device *pDev) 2 * (A_GET_CACHE_LINE_BYTES()) + AR6K_MAX_TRANSFER_SIZE_PER_SCATTER; sgreqSize = sizeof(HIF_SCATTER_REQ) + - (AR6K_SCATTER_ENTRIES_PER_REQ - 1) * (sizeof(HIF_SCATTER_ITEM)); + (AR6K_SCATTER_ENTRIES_PER_REQ - 1) * (sizeof(struct hif_scatter_item)); for (i = 0; i < AR6K_SCATTER_REQS; i++) { /* allocate the scatter request, buffer info and the actual virtual buffer itself */ diff --git a/drivers/staging/ath6kl/include/hif.h b/drivers/staging/ath6kl/include/hif.h index 8d0c94e..427e7b8 100644 --- a/drivers/staging/ath6kl/include/hif.h +++ b/drivers/staging/ath6kl/include/hif.h @@ -270,11 +270,11 @@ struct hif_device_irq_yield_params { }; -typedef struct _HIF_SCATTER_ITEM { +struct hif_scatter_item { u8 *pBuffer; /* CPU accessible address of buffer */ int Length; /* length of transfer to/from this buffer */ void *pCallerContexts[2]; /* space for caller to insert a context associated with this item */ -} HIF_SCATTER_ITEM; +}; struct _HIF_SCATTER_REQ; @@ -299,7 +299,7 @@ typedef struct _HIF_SCATTER_REQ { HIF_SCATTER_METHOD ScatterMethod; /* scatter method handled by HIF */ void *HIFPrivate[4]; /* HIF private area */ u8 *pScatterBounceBuffer; /* bounce buffer for upper layers to copy to/from */ - HIF_SCATTER_ITEM ScatterList[1]; /* start of scatter list */ + struct hif_scatter_item ScatterList[1]; /* start of scatter list */ } HIF_SCATTER_REQ; typedef HIF_SCATTER_REQ * ( *HIF_ALLOCATE_SCATTER_REQUEST)(HIF_DEVICE *device); -- 1.7.4.15.g7811d From 5adf66fd476247365402fc89c1aae0177e1231dd Mon Sep 17 00:00:00 2001 From: Luis R. Rodriguez Date: Mon, 28 Feb 2011 13:47:05 -0800 Subject: [PATCH 34/58] ath6kl: remove-typedef HIF_SCATTER_REQ_PRIV remove-typedef -s HIF_SCATTER_REQ_PRIV \ "struct hif_scatter_req_priv" drivers/staging/ath6kl/ Cc: Naveen Singh Signed-off-by: Luis R. Rodriguez --- .../hif/sdio/linux_sdio/include/hif_internal.h | 8 +++----- .../ath6kl/hif/sdio/linux_sdio/src/hif_scatter.c | 14 +++++++------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/drivers/staging/ath6kl/hif/sdio/linux_sdio/include/hif_internal.h b/drivers/staging/ath6kl/hif/sdio/linux_sdio/include/hif_internal.h index e2d2266..99885e3 100644 --- a/drivers/staging/ath6kl/hif/sdio/linux_sdio/include/hif_internal.h +++ b/drivers/staging/ath6kl/hif/sdio/linux_sdio/include/hif_internal.h @@ -47,8 +47,6 @@ #define HIF_MBOX2_BLOCK_SIZE HIF_MBOX_BLOCK_SIZE #define HIF_MBOX3_BLOCK_SIZE HIF_MBOX_BLOCK_SIZE -struct _HIF_SCATTER_REQ_PRIV; - typedef struct bus_request { struct bus_request *next; /* link list of available requests */ struct bus_request *inusenext; /* link list of in use requests */ @@ -59,7 +57,7 @@ typedef struct bus_request { u32 request; void *context; int status; - struct _HIF_SCATTER_REQ_PRIV *pScatterReq; /* this request is a scatter request */ + struct hif_scatter_req_priv *pScatterReq; /* this request is a scatter request */ } BUS_REQUEST; struct hif_device { @@ -100,13 +98,13 @@ void AddToAsyncList(HIF_DEVICE *device, BUS_REQUEST *busrequest); #define MAX_SCATTER_ENTRIES_PER_REQ 16 #define MAX_SCATTER_REQ_TRANSFER_SIZE 32*1024 -typedef struct _HIF_SCATTER_REQ_PRIV { +struct hif_scatter_req_priv { HIF_SCATTER_REQ *pHifScatterReq; /* HIF scatter request with allocated entries */ HIF_DEVICE *device; /* this device */ BUS_REQUEST *busrequest; /* request associated with request */ /* scatter list for linux */ struct scatterlist sgentries[MAX_SCATTER_ENTRIES_PER_REQ]; -} HIF_SCATTER_REQ_PRIV; +}; #define ATH_DEBUG_SCATTER ATH_DEBUG_MAKE_MODULE_MASK(0) diff --git a/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif_scatter.c b/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif_scatter.c index 196d33d..9f07040 100644 --- a/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif_scatter.c +++ b/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif_scatter.c @@ -87,7 +87,7 @@ int DoHifReadWriteScatter(HIF_DEVICE *device, BUS_REQUEST *busrequest) struct mmc_request mmcreq; struct mmc_command cmd; struct mmc_data data; - HIF_SCATTER_REQ_PRIV *pReqPriv; + struct hif_scatter_req_priv *pReqPriv; HIF_SCATTER_REQ *pReq; int status = 0; struct scatterlist *pSg; @@ -203,7 +203,7 @@ static int HifReadWriteScatter(HIF_DEVICE *device, HIF_SCATTER_REQ *pReq) { int status = A_EINVAL; u32 request = pReq->Request; - HIF_SCATTER_REQ_PRIV *pReqPriv = (HIF_SCATTER_REQ_PRIV *)pReq->HIFPrivate[0]; + struct hif_scatter_req_priv *pReqPriv = (struct hif_scatter_req_priv *)pReq->HIFPrivate[0]; do { @@ -279,7 +279,7 @@ int SetupHIFScatterSupport(HIF_DEVICE *device, struct hif_device_scatter_support { int status = A_ERROR; int i; - HIF_SCATTER_REQ_PRIV *pReqPriv; + struct hif_scatter_req_priv *pReqPriv; BUS_REQUEST *busrequest; do { @@ -297,11 +297,11 @@ int SetupHIFScatterSupport(HIF_DEVICE *device, struct hif_device_scatter_support for (i = 0; i < MAX_SCATTER_REQUESTS; i++) { /* allocate the private request blob */ - pReqPriv = (HIF_SCATTER_REQ_PRIV *)A_MALLOC(sizeof(HIF_SCATTER_REQ_PRIV)); + pReqPriv = (struct hif_scatter_req_priv *)A_MALLOC(sizeof(struct hif_scatter_req_priv)); if (NULL == pReqPriv) { break; } - A_MEMZERO(pReqPriv, sizeof(HIF_SCATTER_REQ_PRIV)); + A_MEMZERO(pReqPriv, sizeof(struct hif_scatter_req_priv)); /* save the device instance*/ pReqPriv->device = device; /* allocate the scatter request */ @@ -358,7 +358,7 @@ int SetupHIFScatterSupport(HIF_DEVICE *device, struct hif_device_scatter_support /* clean up scatter support */ void CleanupHIFScatterResources(HIF_DEVICE *device) { - HIF_SCATTER_REQ_PRIV *pReqPriv; + struct hif_scatter_req_priv *pReqPriv; HIF_SCATTER_REQ *pReq; /* empty the free list */ @@ -371,7 +371,7 @@ void CleanupHIFScatterResources(HIF_DEVICE *device) break; } - pReqPriv = (HIF_SCATTER_REQ_PRIV *)pReq->HIFPrivate[0]; + pReqPriv = (struct hif_scatter_req_priv *)pReq->HIFPrivate[0]; A_ASSERT(pReqPriv != NULL); if (pReqPriv->busrequest != NULL) { -- 1.7.4.15.g7811d From 661d840f55eb235a8799670bbb5454d1b0061c79 Mon Sep 17 00:00:00 2001 From: Luis R. Rodriguez Date: Mon, 28 Feb 2011 13:53:11 -0800 Subject: [PATCH 35/58] ath6kl: remove-typedef HIF_SCATTER_REQ This requird two passes: remove-typedef -s HIF_SCATTER_REQ \ "struct hif_scatter_req" drivers/staging/ath6kl/ remove-typedef -s _HIF_SCATTER_REQ \ "struct hif_scatter_req" drivers/staging/ath6kl/ Cc: Naveen Singh Signed-off-by: Luis R. Rodriguez --- .../hif/sdio/linux_sdio/include/hif_internal.h | 2 +- .../ath6kl/hif/sdio/linux_sdio/src/hif_scatter.c | 16 +++++++------- drivers/staging/ath6kl/htc2/AR6000/ar6k.c | 22 ++++++++++---------- drivers/staging/ath6kl/htc2/AR6000/ar6k.h | 6 ++-- drivers/staging/ath6kl/htc2/htc_recv.c | 4 +- drivers/staging/ath6kl/htc2/htc_send.c | 4 +- drivers/staging/ath6kl/include/hif.h | 15 ++++++------- 7 files changed, 34 insertions(+), 35 deletions(-) diff --git a/drivers/staging/ath6kl/hif/sdio/linux_sdio/include/hif_internal.h b/drivers/staging/ath6kl/hif/sdio/linux_sdio/include/hif_internal.h index 99885e3..04fc284 100644 --- a/drivers/staging/ath6kl/hif/sdio/linux_sdio/include/hif_internal.h +++ b/drivers/staging/ath6kl/hif/sdio/linux_sdio/include/hif_internal.h @@ -99,7 +99,7 @@ void AddToAsyncList(HIF_DEVICE *device, BUS_REQUEST *busrequest); #define MAX_SCATTER_REQ_TRANSFER_SIZE 32*1024 struct hif_scatter_req_priv { - 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 */ BUS_REQUEST *busrequest; /* request associated with request */ /* scatter list for linux */ diff --git a/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif_scatter.c b/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif_scatter.c index 9f07040..2c64abe 100644 --- a/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif_scatter.c +++ b/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif_scatter.c @@ -48,7 +48,7 @@ (((address) & 0x1FFFF) << 9) | \ ((bytes_blocks) & 0x1FF) -static void FreeScatterReq(HIF_DEVICE *device, HIF_SCATTER_REQ *pReq) +static void FreeScatterReq(HIF_DEVICE *device, struct hif_scatter_req *pReq) { unsigned long flag; @@ -60,7 +60,7 @@ static void FreeScatterReq(HIF_DEVICE *device, HIF_SCATTER_REQ *pReq) } -static HIF_SCATTER_REQ *AllocScatterReq(HIF_DEVICE *device) +static struct hif_scatter_req *AllocScatterReq(HIF_DEVICE *device) { struct dl_list *pItem; unsigned long flag; @@ -72,7 +72,7 @@ static HIF_SCATTER_REQ *AllocScatterReq(HIF_DEVICE *device) spin_unlock_irqrestore(&device->lock, flag); if (pItem != NULL) { - return A_CONTAINING_STRUCT(pItem, HIF_SCATTER_REQ, ListLink); + return A_CONTAINING_STRUCT(pItem, struct hif_scatter_req, ListLink); } return NULL; @@ -88,7 +88,7 @@ int DoHifReadWriteScatter(HIF_DEVICE *device, BUS_REQUEST *busrequest) struct mmc_command cmd; struct mmc_data data; struct hif_scatter_req_priv *pReqPriv; - HIF_SCATTER_REQ *pReq; + struct hif_scatter_req *pReq; int status = 0; struct scatterlist *pSg; @@ -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, HIF_SCATTER_REQ *pReq) +static int HifReadWriteScatter(HIF_DEVICE *device, struct hif_scatter_req *pReq) { int status = A_EINVAL; u32 request = pReq->Request; @@ -305,7 +305,7 @@ int SetupHIFScatterSupport(HIF_DEVICE *device, struct hif_device_scatter_support /* save the device instance*/ pReqPriv->device = device; /* allocate the scatter request */ - pReqPriv->pHifScatterReq = (HIF_SCATTER_REQ *)A_MALLOC(sizeof(HIF_SCATTER_REQ) + + pReqPriv->pHifScatterReq = (struct hif_scatter_req *)A_MALLOC(sizeof(struct hif_scatter_req) + (MAX_SCATTER_ENTRIES_PER_REQ - 1) * (sizeof(struct hif_scatter_item))); if (NULL == pReqPriv->pHifScatterReq) { @@ -313,7 +313,7 @@ int SetupHIFScatterSupport(HIF_DEVICE *device, struct hif_device_scatter_support break; } /* just zero the main part of the scatter request */ - A_MEMZERO(pReqPriv->pHifScatterReq, sizeof(HIF_SCATTER_REQ)); + A_MEMZERO(pReqPriv->pHifScatterReq, sizeof(struct hif_scatter_req)); /* back pointer to the private struct */ pReqPriv->pHifScatterReq->HIFPrivate[0] = pReqPriv; /* allocate a bus request for this scatter request */ @@ -359,7 +359,7 @@ int SetupHIFScatterSupport(HIF_DEVICE *device, struct hif_device_scatter_support void CleanupHIFScatterResources(HIF_DEVICE *device) { struct hif_scatter_req_priv *pReqPriv; - HIF_SCATTER_REQ *pReq; + struct hif_scatter_req *pReq; /* empty the free list */ diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k.c b/drivers/staging/ath6kl/htc2/AR6000/ar6k.c index 3ebf630..c780e4f 100644 --- a/drivers/staging/ath6kl/htc2/AR6000/ar6k.c +++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k.c @@ -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 HIF_SCATTER_REQ *DevAllocScatterReq(HIF_DEVICE *Context) +static struct hif_scatter_req *DevAllocScatterReq(HIF_DEVICE *Context) { struct dl_list *pItem; struct ar6k_device *pDev = (struct ar6k_device *)Context; @@ -595,12 +595,12 @@ static HIF_SCATTER_REQ *DevAllocScatterReq(HIF_DEVICE *Context) pItem = DL_ListRemoveItemFromHead(&pDev->ScatterReqHead); UNLOCK_AR6K(pDev); if (pItem != NULL) { - return A_CONTAINING_STRUCT(pItem, HIF_SCATTER_REQ, ListLink); + return A_CONTAINING_STRUCT(pItem, struct hif_scatter_req, ListLink); } return NULL; } -static void DevFreeScatterReq(HIF_DEVICE *Context, HIF_SCATTER_REQ *pReq) +static void DevFreeScatterReq(HIF_DEVICE *Context, struct hif_scatter_req *pReq) { struct ar6k_device *pDev = (struct ar6k_device *)Context; LOCK_AR6K(pDev); @@ -608,7 +608,7 @@ static void DevFreeScatterReq(HIF_DEVICE *Context, HIF_SCATTER_REQ *pReq) UNLOCK_AR6K(pDev); } -int DevCopyScatterListToFromDMABuffer(HIF_SCATTER_REQ *pReq, bool FromDMA) +int DevCopyScatterListToFromDMABuffer(struct hif_scatter_req *pReq, bool FromDMA) { u8 *pDMABuffer = NULL; int i, remaining; @@ -651,7 +651,7 @@ int DevCopyScatterListToFromDMABuffer(HIF_SCATTER_REQ *pReq, bool FromDMA) static void DevReadWriteScatterAsyncHandler(void *Context, HTC_PACKET *pPacket) { struct ar6k_device *pDev = (struct ar6k_device *)Context; - HIF_SCATTER_REQ *pReq = (HIF_SCATTER_REQ *)pPacket->pPktContext; + struct hif_scatter_req *pReq = (struct hif_scatter_req *)pPacket->pPktContext; AR_DEBUG_PRINTF(ATH_DEBUG_RECV,("+DevReadWriteScatterAsyncHandler: (dev: 0x%lX)\n", (unsigned long)pDev)); @@ -664,7 +664,7 @@ static void DevReadWriteScatterAsyncHandler(void *Context, HTC_PACKET *pPacket) AR_DEBUG_PRINTF(ATH_DEBUG_RECV,("-DevReadWriteScatterAsyncHandler \n")); } -static int DevReadWriteScatter(HIF_DEVICE *Context, HIF_SCATTER_REQ *pReq) +static int DevReadWriteScatter(HIF_DEVICE *Context, struct hif_scatter_req *pReq) { struct ar6k_device *pDev = (struct ar6k_device *)Context; int status = 0; @@ -736,7 +736,7 @@ static int DevReadWriteScatter(HIF_DEVICE *Context, HIF_SCATTER_REQ *pReq) static void DevCleanupVirtualScatterSupport(struct ar6k_device *pDev) { - HIF_SCATTER_REQ *pReq; + struct hif_scatter_req *pReq; while (1) { pReq = DevAllocScatterReq((HIF_DEVICE *)pDev); @@ -755,17 +755,17 @@ static int DevSetupVirtualScatterSupport(struct ar6k_device *pDev) int bufferSize, sgreqSize; int i; struct dev_scatter_dma_virtual_info *pVirtualInfo; - HIF_SCATTER_REQ *pReq; + struct hif_scatter_req *pReq; bufferSize = sizeof(struct dev_scatter_dma_virtual_info) + 2 * (A_GET_CACHE_LINE_BYTES()) + AR6K_MAX_TRANSFER_SIZE_PER_SCATTER; - sgreqSize = sizeof(HIF_SCATTER_REQ) + + sgreqSize = sizeof(struct hif_scatter_req) + (AR6K_SCATTER_ENTRIES_PER_REQ - 1) * (sizeof(struct hif_scatter_item)); for (i = 0; i < AR6K_SCATTER_REQS; i++) { /* allocate the scatter request, buffer info and the actual virtual buffer itself */ - pReq = (HIF_SCATTER_REQ *)A_MALLOC(sgreqSize + bufferSize); + pReq = (struct hif_scatter_req *)A_MALLOC(sgreqSize + bufferSize); if (NULL == pReq) { status = A_NO_MEMORY; @@ -885,7 +885,7 @@ int DevSetupMsgBundling(struct ar6k_device *pDev, int MaxMsgsPerTransfer) return status; } -int DevSubmitScatterRequest(struct ar6k_device *pDev, HIF_SCATTER_REQ *pScatterReq, bool Read, bool Async) +int DevSubmitScatterRequest(struct ar6k_device *pDev, struct hif_scatter_req *pScatterReq, bool Read, bool Async) { int status; diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k.h b/drivers/staging/ath6kl/htc2/AR6000/ar6k.h index 08e9ef2..baad0bf 100644 --- a/drivers/staging/ath6kl/htc2/AR6000/ar6k.h +++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k.h @@ -272,7 +272,7 @@ static INLINE int DevRecvPacket(struct ar6k_device *pDev, HTC_PACKET *pPacket, u * */ -int DevCopyScatterListToFromDMABuffer(HIF_SCATTER_REQ *pReq, bool FromDMA); +int DevCopyScatterListToFromDMABuffer(struct hif_scatter_req *pReq, bool FromDMA); /* copy any READ data back into scatter list */ #define DEV_FINISH_SCATTER_OPERATION(pR) \ @@ -287,7 +287,7 @@ do { \ } while (0) /* copy any WRITE data to bounce buffer */ -static INLINE int DEV_PREPARE_SCATTER_OPERATION(HIF_SCATTER_REQ *pReq) { +static INLINE int DEV_PREPARE_SCATTER_OPERATION(struct hif_scatter_req *pReq) { if ((pReq->Request & HIF_WRITE) && (pReq->ScatterMethod == HIF_SCATTER_DMA_BOUNCE)) { return DevCopyScatterListToFromDMABuffer(pReq,TO_DMA_BUFFER); } else { @@ -315,7 +315,7 @@ int DevCleanupMsgBundling(struct ar6k_device *pDev); #define DEV_SCATTER_WRITE false #define DEV_SCATTER_ASYNC true #define DEV_SCATTER_SYNC false -int DevSubmitScatterRequest(struct ar6k_device *pDev, HIF_SCATTER_REQ *pScatterReq, bool Read, bool Async); +int DevSubmitScatterRequest(struct ar6k_device *pDev, struct hif_scatter_req *pScatterReq, bool Read, bool Async); #ifdef MBOXHW_UNIT_TEST int DoMboxHWTest(struct ar6k_device *pDev); diff --git a/drivers/staging/ath6kl/htc2/htc_recv.c b/drivers/staging/ath6kl/htc2/htc_recv.c index daa6efc..7a333ed 100644 --- a/drivers/staging/ath6kl/htc2/htc_recv.c +++ b/drivers/staging/ath6kl/htc2/htc_recv.c @@ -879,7 +879,7 @@ static int AllocAndPrepareRxPackets(HTC_TARGET *target, return status; } -static void HTCAsyncRecvScatterCompletion(HIF_SCATTER_REQ *pScatterReq) +static void HTCAsyncRecvScatterCompletion(struct hif_scatter_req *pScatterReq) { int i; HTC_PACKET *pPacket; @@ -991,7 +991,7 @@ static int HTCIssueRecvPacketBundle(HTC_TARGET *target, bool PartialBundle) { int status = 0; - HIF_SCATTER_REQ *pScatterReq; + struct hif_scatter_req *pScatterReq; int i, totalLength; int pktsToScatter; HTC_PACKET *pPacket; diff --git a/drivers/staging/ath6kl/htc2/htc_send.c b/drivers/staging/ath6kl/htc2/htc_send.c index a31acae..f133d93 100644 --- a/drivers/staging/ath6kl/htc2/htc_send.c +++ b/drivers/staging/ath6kl/htc2/htc_send.c @@ -264,7 +264,7 @@ static INLINE void GetHTCSendPackets(HTC_TARGET *target, } -static void HTCAsyncSendScatterCompletion(HIF_SCATTER_REQ *pScatterReq) +static void HTCAsyncSendScatterCompletion(struct hif_scatter_req *pScatterReq) { int i; HTC_PACKET *pPacket; @@ -316,7 +316,7 @@ static void HTCIssueSendBundle(HTC_ENDPOINT *pEndpoint, { int pktsToScatter; unsigned int scatterSpaceRemaining; - HIF_SCATTER_REQ *pScatterReq = NULL; + struct hif_scatter_req *pScatterReq = NULL; int i, packetsInScatterReq; unsigned int transferLength; HTC_PACKET *pPacket; diff --git a/drivers/staging/ath6kl/include/hif.h b/drivers/staging/ath6kl/include/hif.h index 427e7b8..3dcb787 100644 --- a/drivers/staging/ath6kl/include/hif.h +++ b/drivers/staging/ath6kl/include/hif.h @@ -276,9 +276,8 @@ struct hif_scatter_item { void *pCallerContexts[2]; /* space for caller to insert a context associated with this item */ }; -struct _HIF_SCATTER_REQ; - -typedef void ( *HIF_SCATTER_COMP_CB)(struct _HIF_SCATTER_REQ *); +struct hif_scatter_req; +typedef void ( *HIF_SCATTER_COMP_CB)(struct hif_scatter_req *); typedef enum _HIF_SCATTER_METHOD { HIF_SCATTER_NONE = 0, @@ -286,7 +285,7 @@ typedef enum _HIF_SCATTER_METHOD { HIF_SCATTER_DMA_BOUNCE, /* Uses SG DMA but HIF layer uses an internal bounce buffer */ } HIF_SCATTER_METHOD; -typedef struct _HIF_SCATTER_REQ { +struct hif_scatter_req { struct dl_list ListLink; /* link management */ u32 Address; /* address for the read/write operation */ u32 Request; /* request flags */ @@ -300,11 +299,11 @@ typedef struct _HIF_SCATTER_REQ { void *HIFPrivate[4]; /* HIF private area */ u8 *pScatterBounceBuffer; /* bounce buffer for upper layers to copy to/from */ struct hif_scatter_item ScatterList[1]; /* start of scatter list */ -} HIF_SCATTER_REQ; +}; -typedef HIF_SCATTER_REQ * ( *HIF_ALLOCATE_SCATTER_REQUEST)(HIF_DEVICE *device); -typedef void ( *HIF_FREE_SCATTER_REQUEST)(HIF_DEVICE *device, HIF_SCATTER_REQ *request); -typedef int ( *HIF_READWRITE_SCATTER)(HIF_DEVICE *device, HIF_SCATTER_REQ *request); +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); struct hif_device_scatter_support_info { /* information returned from HIF layer */ -- 1.7.4.15.g7811d From c21cdf9604d75ad431eac4f5431568aa20c88ccc Mon Sep 17 00:00:00 2001 From: Luis R. Rodriguez Date: Mon, 28 Feb 2011 13:55:16 -0800 Subject: [PATCH 36/58] ath6kl: remove-typedef HTC_CONTROL_BUFFER remove-typedef -s HTC_CONTROL_BUFFER \ "struct htc_control_buffer" drivers/staging/ath6kl/ Cc: Naveen Singh Signed-off-by: Luis R. Rodriguez --- drivers/staging/ath6kl/htc2/htc_internal.h | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/ath6kl/htc2/htc_internal.h b/drivers/staging/ath6kl/htc2/htc_internal.h index 8bc3162..e3857cf 100644 --- a/drivers/staging/ath6kl/htc2/htc_internal.h +++ b/drivers/staging/ath6kl/htc2/htc_internal.h @@ -99,10 +99,10 @@ typedef struct _HTC_ENDPOINT { #define NUM_CONTROL_TX_BUFFERS 2 #define NUM_CONTROL_RX_BUFFERS (NUM_CONTROL_BUFFERS - NUM_CONTROL_TX_BUFFERS) -typedef struct HTC_CONTROL_BUFFER { +struct htc_control_buffer { HTC_PACKET HtcPacket; u8 *Buffer; -} HTC_CONTROL_BUFFER; +}; #define HTC_RECV_WAIT_BUFFERS (1 << 0) #define HTC_OP_STATE_STOPPING (1 << 0) @@ -110,7 +110,7 @@ typedef struct HTC_CONTROL_BUFFER { /* our HTC target state */ typedef struct _HTC_TARGET { HTC_ENDPOINT EndPoint[ENDPOINT_MAX]; - HTC_CONTROL_BUFFER HTCControlBuffers[NUM_CONTROL_BUFFERS]; + struct htc_control_buffer HTCControlBuffers[NUM_CONTROL_BUFFERS]; HTC_ENDPOINT_CREDIT_DIST *EpCreditDistributionListHead; HTC_PACKET_QUEUE ControlBufferTXFreeList; HTC_PACKET_QUEUE ControlBufferRXFreeList; -- 1.7.4.15.g7811d From a43fef56d8099b77c5233d7ddbdfb891df9c0156 Mon Sep 17 00:00:00 2001 From: Luis R. Rodriguez Date: Mon, 28 Feb 2011 13:56:17 -0800 Subject: [PATCH 37/58] ath6kl: remove-typedef HTC_ENDPOINT remove-typedef -s HTC_ENDPOINT \ "struct htc_endpoint" drivers/staging/ath6kl/ Cc: Naveen Singh Signed-off-by: Luis R. Rodriguez --- drivers/staging/ath6kl/htc2/htc.c | 2 +- drivers/staging/ath6kl/htc2/htc_internal.h | 6 ++-- drivers/staging/ath6kl/htc2/htc_recv.c | 24 ++++++++++---------- drivers/staging/ath6kl/htc2/htc_send.c | 34 ++++++++++++++-------------- drivers/staging/ath6kl/htc2/htc_services.c | 2 +- 5 files changed, 34 insertions(+), 34 deletions(-) diff --git a/drivers/staging/ath6kl/htc2/htc.c b/drivers/staging/ath6kl/htc2/htc.c index bb999b6..e897c0c 100644 --- a/drivers/staging/ath6kl/htc2/htc.c +++ b/drivers/staging/ath6kl/htc2/htc.c @@ -438,7 +438,7 @@ int HTCStart(HTC_HANDLE HTCHandle) static void ResetEndpointStates(HTC_TARGET *target) { - HTC_ENDPOINT *pEndpoint; + struct htc_endpoint *pEndpoint; int i; for (i = ENDPOINT_0; i < ENDPOINT_MAX; i++) { diff --git a/drivers/staging/ath6kl/htc2/htc_internal.h b/drivers/staging/ath6kl/htc2/htc_internal.h index e3857cf..a6eaa1b 100644 --- a/drivers/staging/ath6kl/htc2/htc_internal.h +++ b/drivers/staging/ath6kl/htc2/htc_internal.h @@ -65,7 +65,7 @@ extern "C" { #define HTC_SCATTER_REQ_FLAGS_PARTIAL_BUNDLE (1 << 0) -typedef struct _HTC_ENDPOINT { +struct htc_endpoint { HTC_ENDPOINT_ID Id; HTC_SERVICE_ID ServiceID; /* service ID this endpoint is bound to non-zero value means this endpoint is in use */ @@ -85,7 +85,7 @@ typedef struct _HTC_ENDPOINT { #ifdef HTC_EP_STAT_PROFILING HTC_ENDPOINT_STATS EndPointStats; /* endpoint statistics */ #endif -} HTC_ENDPOINT; +}; #ifdef HTC_EP_STAT_PROFILING #define INC_HTC_EP_STAT(p,stat,count) (p)->EndPointStats.stat += (count); @@ -109,7 +109,7 @@ struct htc_control_buffer { /* our HTC target state */ typedef struct _HTC_TARGET { - HTC_ENDPOINT EndPoint[ENDPOINT_MAX]; + struct htc_endpoint EndPoint[ENDPOINT_MAX]; struct htc_control_buffer HTCControlBuffers[NUM_CONTROL_BUFFERS]; HTC_ENDPOINT_CREDIT_DIST *EpCreditDistributionListHead; HTC_PACKET_QUEUE ControlBufferTXFreeList; diff --git a/drivers/staging/ath6kl/htc2/htc_recv.c b/drivers/staging/ath6kl/htc2/htc_recv.c index 7a333ed..4095f8e 100644 --- a/drivers/staging/ath6kl/htc2/htc_recv.c +++ b/drivers/staging/ath6kl/htc2/htc_recv.c @@ -50,7 +50,7 @@ #define HTC_RX_STAT_PROFILE(t,ep,lookAhead) #endif -static void DoRecvCompletion(HTC_ENDPOINT *pEndpoint, +static void DoRecvCompletion(struct htc_endpoint *pEndpoint, HTC_PACKET_QUEUE *pQueueToIndicate) { @@ -432,7 +432,7 @@ static INLINE void HTCAsyncRecvCheckMorePackets(HTC_TARGET *target, } /* unload the recv completion queue */ -static INLINE void DrainRecvIndicationQueue(HTC_TARGET *target, HTC_ENDPOINT *pEndpoint) +static INLINE void DrainRecvIndicationQueue(HTC_TARGET *target, struct htc_endpoint *pEndpoint) { HTC_PACKET_QUEUE recvCompletions; @@ -497,7 +497,7 @@ static INLINE void DrainRecvIndicationQueue(HTC_TARGET *target, HTC_ENDPOINT *pE /* note: this function can be called with the RX lock held */ static INLINE void SetRxPacketIndicationFlags(u32 LookAhead, - HTC_ENDPOINT *pEndpoint, + struct htc_endpoint *pEndpoint, HTC_PACKET *pPacket) { HTC_FRAME_HDR *pHdr = (HTC_FRAME_HDR *)&LookAhead; @@ -518,7 +518,7 @@ static INLINE void SetRxPacketIndicationFlags(u32 LookAhead, void HTCRecvCompleteHandler(void *Context, HTC_PACKET *pPacket) { HTC_TARGET *target = (HTC_TARGET *)Context; - HTC_ENDPOINT *pEndpoint; + struct htc_endpoint *pEndpoint; u32 nextLookAheads[HTC_HOST_MAX_MSG_PER_BUNDLE]; int numLookAheads = 0; int status; @@ -689,7 +689,7 @@ int HTCWaitforControlMessage(HTC_TARGET *target, HTC_PACKET **ppControlPacket) static int AllocAndPrepareRxPackets(HTC_TARGET *target, u32 LookAheads[], int Messages, - HTC_ENDPOINT *pEndpoint, + struct htc_endpoint *pEndpoint, HTC_PACKET_QUEUE *pQueue) { int status = 0; @@ -883,7 +883,7 @@ static void HTCAsyncRecvScatterCompletion(struct hif_scatter_req *pScatterReq) { int i; HTC_PACKET *pPacket; - HTC_ENDPOINT *pEndpoint; + struct htc_endpoint *pEndpoint; u32 lookAheads[HTC_HOST_MAX_MSG_PER_BUNDLE]; int numLookAheads = 0; HTC_TARGET *target = (HTC_TARGET *)pScatterReq->Context; @@ -1102,7 +1102,7 @@ static int HTCIssueRecvPacketBundle(HTC_TARGET *target, return status; } -static INLINE void CheckRecvWaterMark(HTC_ENDPOINT *pEndpoint) +static INLINE void CheckRecvWaterMark(struct htc_endpoint *pEndpoint) { /* see if endpoint is using a refill watermark * ** no need to use a lock here, since we are only inspecting... @@ -1122,7 +1122,7 @@ int HTCRecvMessagePendingHandler(void *Context, u32 MsgLookAheads[], int NumLook HTC_TARGET *target = (HTC_TARGET *)Context; int status = 0; HTC_PACKET *pPacket; - HTC_ENDPOINT *pEndpoint; + struct htc_endpoint *pEndpoint; bool asyncProc = false; u32 lookAheads[HTC_HOST_MAX_MSG_PER_BUNDLE]; int pktsFetched; @@ -1388,7 +1388,7 @@ int HTCRecvMessagePendingHandler(void *Context, u32 MsgLookAheads[], int NumLook int HTCAddReceivePktMultiple(HTC_HANDLE HTCHandle, HTC_PACKET_QUEUE *pPktQueue) { HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); - HTC_ENDPOINT *pEndpoint; + struct htc_endpoint *pEndpoint; bool unblockRecv = false; int status = 0; HTC_PACKET *pFirstPacket; @@ -1486,7 +1486,7 @@ void HTCUnblockRecv(HTC_HANDLE HTCHandle) } } -static void HTCFlushRxQueue(HTC_TARGET *target, HTC_ENDPOINT *pEndpoint, HTC_PACKET_QUEUE *pQueue) +static void HTCFlushRxQueue(HTC_TARGET *target, struct htc_endpoint *pEndpoint, HTC_PACKET_QUEUE *pQueue) { HTC_PACKET *pPacket; HTC_PACKET_QUEUE container; @@ -1512,7 +1512,7 @@ static void HTCFlushRxQueue(HTC_TARGET *target, HTC_ENDPOINT *pEndpoint, HTC_PAC UNLOCK_HTC_RX(target); } -static void HTCFlushEndpointRX(HTC_TARGET *target, HTC_ENDPOINT *pEndpoint) +static void HTCFlushEndpointRX(HTC_TARGET *target, struct htc_endpoint *pEndpoint) { /* flush any recv indications not already made */ HTCFlushRxQueue(target,pEndpoint,&pEndpoint->RecvIndicationQueue); @@ -1522,7 +1522,7 @@ static void HTCFlushEndpointRX(HTC_TARGET *target, HTC_ENDPOINT *pEndpoint) void HTCFlushRecvBuffers(HTC_TARGET *target) { - HTC_ENDPOINT *pEndpoint; + struct htc_endpoint *pEndpoint; int i; for (i = ENDPOINT_0; i < ENDPOINT_MAX; i++) { diff --git a/drivers/staging/ath6kl/htc2/htc_send.c b/drivers/staging/ath6kl/htc2/htc_send.c index f133d93..4e1d9bc7 100644 --- a/drivers/staging/ath6kl/htc2/htc_send.c +++ b/drivers/staging/ath6kl/htc2/htc_send.c @@ -43,7 +43,7 @@ typedef enum _HTC_SEND_QUEUE_RESULT { (reason)); \ } -static void DoSendCompletion(HTC_ENDPOINT *pEndpoint, +static void DoSendCompletion(struct htc_endpoint *pEndpoint, HTC_PACKET_QUEUE *pQueueToIndicate) { do { @@ -77,7 +77,7 @@ static void DoSendCompletion(HTC_ENDPOINT *pEndpoint, } /* do final completion on sent packet */ -static INLINE void CompleteSentPacket(HTC_TARGET *target, HTC_ENDPOINT *pEndpoint, HTC_PACKET *pPacket) +static INLINE void CompleteSentPacket(HTC_TARGET *target, struct htc_endpoint *pEndpoint, HTC_PACKET *pPacket) { pPacket->Completion = NULL; @@ -104,7 +104,7 @@ static INLINE void CompleteSentPacket(HTC_TARGET *target, HTC_ENDPOINT *pEndpoin static void HTCSendPktCompletionHandler(void *Context, HTC_PACKET *pPacket) { HTC_TARGET *target = (HTC_TARGET *)Context; - HTC_ENDPOINT *pEndpoint = &target->EndPoint[pPacket->Endpoint]; + struct htc_endpoint *pEndpoint = &target->EndPoint[pPacket->Endpoint]; HTC_PACKET_QUEUE container; CompleteSentPacket(target,pEndpoint,pPacket); @@ -147,7 +147,7 @@ int HTCIssueSend(HTC_TARGET *target, HTC_PACKET *pPacket) /* get HTC send packets from the TX queue on an endpoint */ static INLINE void GetHTCSendPackets(HTC_TARGET *target, - HTC_ENDPOINT *pEndpoint, + struct htc_endpoint *pEndpoint, HTC_PACKET_QUEUE *pQueue) { int creditsRequired; @@ -268,7 +268,7 @@ static void HTCAsyncSendScatterCompletion(struct hif_scatter_req *pScatterReq) { int i; HTC_PACKET *pPacket; - HTC_ENDPOINT *pEndpoint = (HTC_ENDPOINT *)pScatterReq->Context; + struct htc_endpoint *pEndpoint = (struct htc_endpoint *)pScatterReq->Context; HTC_TARGET *target = (HTC_TARGET *)pEndpoint->target; int status = 0; HTC_PACKET_QUEUE sendCompletes; @@ -309,7 +309,7 @@ static void HTCAsyncSendScatterCompletion(struct hif_scatter_req *pScatterReq) * - a message that will consume a partial credit will stop the bundling process early * - we drop below the minimum number of messages for a bundle * */ -static void HTCIssueSendBundle(HTC_ENDPOINT *pEndpoint, +static void HTCIssueSendBundle(struct htc_endpoint *pEndpoint, HTC_PACKET_QUEUE *pQueue, int *pBundlesSent, int *pTotalBundlesPkts) @@ -478,7 +478,7 @@ static void HTCIssueSendBundle(HTC_ENDPOINT *pEndpoint, * if there are no credits, the packet(s) remains in the queue. * this function returns the result of the attempt to send a queue of HTC packets */ static HTC_SEND_QUEUE_RESULT HTCTrySend(HTC_TARGET *target, - HTC_ENDPOINT *pEndpoint, + struct htc_endpoint *pEndpoint, HTC_PACKET_QUEUE *pCallersSendQueue) { HTC_PACKET_QUEUE sendQueue; /* temp queue to hold packets at various stages */ @@ -671,7 +671,7 @@ static HTC_SEND_QUEUE_RESULT HTCTrySend(HTC_TARGET *target, int HTCSendPktsMultiple(HTC_HANDLE HTCHandle, HTC_PACKET_QUEUE *pPktQueue) { HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); - HTC_ENDPOINT *pEndpoint; + struct htc_endpoint *pEndpoint; HTC_PACKET *pPacket; AR_DEBUG_PRINTF(ATH_DEBUG_SEND, ("+HTCSendPktsMultiple: Queue: 0x%lX, Pkts %d \n", @@ -723,7 +723,7 @@ int HTCSendPkt(HTC_HANDLE HTCHandle, HTC_PACKET *pPacket) /* check TX queues to drain because of credit distribution update */ static INLINE void HTCCheckEndpointTxQueues(HTC_TARGET *target) { - HTC_ENDPOINT *pEndpoint; + struct htc_endpoint *pEndpoint; HTC_ENDPOINT_CREDIT_DIST *pDistItem; AR_DEBUG_PRINTF(ATH_DEBUG_SEND, ("+HTCCheckEndpointTxQueues \n")); @@ -734,7 +734,7 @@ static INLINE void HTCCheckEndpointTxQueues(HTC_TARGET *target) * NOTE: no locks need to be taken since the distribution list * is not dynamic (cannot be re-ordered) and we are not modifying any state */ while (pDistItem != NULL) { - pEndpoint = (HTC_ENDPOINT *)pDistItem->pHTCReserved; + pEndpoint = (struct htc_endpoint *)pDistItem->pHTCReserved; if (HTC_PACKET_QUEUE_DEPTH(&pEndpoint->TxQueue) > 0) { AR_DEBUG_PRINTF(ATH_DEBUG_SEND, (" Ep %d has %d credits and %d Packets in TX Queue \n", @@ -756,7 +756,7 @@ static INLINE void HTCCheckEndpointTxQueues(HTC_TARGET *target) void HTCProcessCreditRpt(HTC_TARGET *target, HTC_CREDIT_REPORT *pRpt, int NumEntries, HTC_ENDPOINT_ID FromEndpoint) { int i; - HTC_ENDPOINT *pEndpoint; + struct htc_endpoint *pEndpoint; int totalCredits = 0; bool doDist = false; @@ -838,7 +838,7 @@ void HTCProcessCreditRpt(HTC_TARGET *target, HTC_CREDIT_REPORT *pRpt, int NumEnt } /* flush endpoint TX queue */ -static void HTCFlushEndpointTX(HTC_TARGET *target, HTC_ENDPOINT *pEndpoint, HTC_TX_TAG Tag) +static void HTCFlushEndpointTX(HTC_TARGET *target, struct htc_endpoint *pEndpoint, HTC_TX_TAG Tag) { HTC_PACKET *pPacket; HTC_PACKET_QUEUE discardQueue; @@ -895,7 +895,7 @@ void DumpCreditDist(HTC_ENDPOINT_CREDIT_DIST *pEPDist) AR_DEBUG_PRINTF(ATH_DEBUG_ANY, (" TxCreditsPerMaxMsg : %d \n", pEPDist->TxCreditsPerMaxMsg)); AR_DEBUG_PRINTF(ATH_DEBUG_ANY, (" TxCreditsToDist : %d \n", pEPDist->TxCreditsToDist)); AR_DEBUG_PRINTF(ATH_DEBUG_ANY, (" TxQueueDepth : %d \n", - HTC_PACKET_QUEUE_DEPTH(&((HTC_ENDPOINT *)pEPDist->pHTCReserved)->TxQueue))); + HTC_PACKET_QUEUE_DEPTH(&((struct htc_endpoint *)pEPDist->pHTCReserved)->TxQueue))); AR_DEBUG_PRINTF(ATH_DEBUG_ANY, ("----------------------------------------------------\n")); } @@ -919,7 +919,7 @@ void DumpCreditDistStates(HTC_TARGET *target) /* flush all send packets from all endpoint queues */ void HTCFlushSendPkts(HTC_TARGET *target) { - HTC_ENDPOINT *pEndpoint; + struct htc_endpoint *pEndpoint; int i; if (AR_DEBUG_LVL_CHECK(ATH_DEBUG_TRC)) { @@ -942,7 +942,7 @@ void HTCFlushSendPkts(HTC_TARGET *target) void HTCFlushEndpoint(HTC_HANDLE HTCHandle, HTC_ENDPOINT_ID Endpoint, HTC_TX_TAG Tag) { HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); - HTC_ENDPOINT *pEndpoint = &target->EndPoint[Endpoint]; + struct htc_endpoint *pEndpoint = &target->EndPoint[Endpoint]; if (pEndpoint->ServiceID == 0) { AR_DEBUG_ASSERT(false); @@ -959,7 +959,7 @@ void HTCIndicateActivityChange(HTC_HANDLE HTCHandle, bool Active) { HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); - HTC_ENDPOINT *pEndpoint = &target->EndPoint[Endpoint]; + struct htc_endpoint *pEndpoint = &target->EndPoint[Endpoint]; bool doDist = false; if (pEndpoint->ServiceID == 0) { @@ -1009,7 +1009,7 @@ bool HTCIsEndpointActive(HTC_HANDLE HTCHandle, HTC_ENDPOINT_ID Endpoint) { HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); - HTC_ENDPOINT *pEndpoint = &target->EndPoint[Endpoint]; + struct htc_endpoint *pEndpoint = &target->EndPoint[Endpoint]; if (pEndpoint->ServiceID == 0) { return false; diff --git a/drivers/staging/ath6kl/htc2/htc_services.c b/drivers/staging/ath6kl/htc2/htc_services.c index 61a332e..2f99989 100644 --- a/drivers/staging/ath6kl/htc2/htc_services.c +++ b/drivers/staging/ath6kl/htc2/htc_services.c @@ -132,7 +132,7 @@ int HTCConnectService(HTC_HANDLE HTCHandle, HTC_CONNECT_SERVICE_RESPONSE_MSG *pResponseMsg; HTC_CONNECT_SERVICE_MSG *pConnectMsg; HTC_ENDPOINT_ID assignedEndpoint = ENDPOINT_MAX; - HTC_ENDPOINT *pEndpoint; + struct htc_endpoint *pEndpoint; unsigned int maxMsgSize = 0; AR_DEBUG_PRINTF(ATH_DEBUG_TRC, ("+HTCConnectService, target:0x%lX SvcID:0x%X \n", -- 1.7.4.15.g7811d From 9104a0f89fec9903a9831cf76ae0fb7a088030f4 Mon Sep 17 00:00:00 2001 From: Luis R. Rodriguez Date: Mon, 28 Feb 2011 13:59:57 -0800 Subject: [PATCH 38/58] ath6kl: remove-typedef HTC_ENDPOINT_CREDIT_DIST This required two passes: remove-typedef -s HTC_ENDPOINT_CREDIT_DIST \ "struct htc_endpoint_credit_dist" drivers/staging/ath6kl/ remove-typedef -s _HTC_ENDPOINT_CREDIT_DIST \ "struct htc_endpoint_credit_dist" drivers/staging/ath6kl/ Cc: Naveen Singh Signed-off-by: Luis R. Rodriguez --- drivers/staging/ath6kl/htc2/htc_internal.h | 6 +++--- drivers/staging/ath6kl/htc2/htc_send.c | 6 +++--- drivers/staging/ath6kl/htc2/htc_services.c | 12 ++++++------ drivers/staging/ath6kl/include/common_drv.h | 2 +- drivers/staging/ath6kl/include/htc_api.h | 12 ++++++------ drivers/staging/ath6kl/miscdrv/credit_dist.c | 22 +++++++++++----------- 6 files changed, 30 insertions(+), 30 deletions(-) diff --git a/drivers/staging/ath6kl/htc2/htc_internal.h b/drivers/staging/ath6kl/htc2/htc_internal.h index a6eaa1b..d726a02 100644 --- a/drivers/staging/ath6kl/htc2/htc_internal.h +++ b/drivers/staging/ath6kl/htc2/htc_internal.h @@ -71,7 +71,7 @@ struct htc_endpoint { non-zero value means this endpoint is in use */ HTC_PACKET_QUEUE TxQueue; /* HTC frame buffer TX queue */ HTC_PACKET_QUEUE RxBuffers; /* HTC frame buffer RX list */ - HTC_ENDPOINT_CREDIT_DIST CreditDist; /* credit distribution structure (exposed to driver layer) */ + struct htc_endpoint_credit_dist CreditDist; /* credit distribution structure (exposed to driver layer) */ HTC_EP_CALLBACKS EpCallBacks; /* callbacks associated with this endpoint */ int MaxTxQueueDepth; /* max depth of the TX queue before we need to call driver's full handler */ @@ -111,7 +111,7 @@ struct htc_control_buffer { typedef struct _HTC_TARGET { struct htc_endpoint EndPoint[ENDPOINT_MAX]; struct htc_control_buffer HTCControlBuffers[NUM_CONTROL_BUFFERS]; - HTC_ENDPOINT_CREDIT_DIST *EpCreditDistributionListHead; + struct htc_endpoint_credit_dist *EpCreditDistributionListHead; HTC_PACKET_QUEUE ControlBufferTXFreeList; HTC_PACKET_QUEUE ControlBufferRXFreeList; HTC_CREDIT_DIST_CALLBACK DistributeCredits; @@ -176,7 +176,7 @@ void HTCFlushRecvBuffers(HTC_TARGET *target); void HTCFlushSendPkts(HTC_TARGET *target); #ifdef ATH_DEBUG_MODULE -void DumpCreditDist(HTC_ENDPOINT_CREDIT_DIST *pEPDist); +void DumpCreditDist(struct htc_endpoint_credit_dist *pEPDist); void DumpCreditDistStates(HTC_TARGET *target); void DebugDumpBytes(u8 *buffer, u16 length, char *pDescription); #endif diff --git a/drivers/staging/ath6kl/htc2/htc_send.c b/drivers/staging/ath6kl/htc2/htc_send.c index 4e1d9bc7..b313573 100644 --- a/drivers/staging/ath6kl/htc2/htc_send.c +++ b/drivers/staging/ath6kl/htc2/htc_send.c @@ -724,7 +724,7 @@ int HTCSendPkt(HTC_HANDLE HTCHandle, HTC_PACKET *pPacket) static INLINE void HTCCheckEndpointTxQueues(HTC_TARGET *target) { struct htc_endpoint *pEndpoint; - HTC_ENDPOINT_CREDIT_DIST *pDistItem; + struct htc_endpoint_credit_dist *pDistItem; AR_DEBUG_PRINTF(ATH_DEBUG_SEND, ("+HTCCheckEndpointTxQueues \n")); pDistItem = target->EpCreditDistributionListHead; @@ -879,7 +879,7 @@ static void HTCFlushEndpointTX(HTC_TARGET *target, struct htc_endpoint *pEndpoin } -void DumpCreditDist(HTC_ENDPOINT_CREDIT_DIST *pEPDist) +void DumpCreditDist(struct htc_endpoint_credit_dist *pEPDist) { AR_DEBUG_PRINTF(ATH_DEBUG_ANY, ("--- EP : %d ServiceID: 0x%X --------------\n", pEPDist->Endpoint, pEPDist->ServiceID)); @@ -901,7 +901,7 @@ void DumpCreditDist(HTC_ENDPOINT_CREDIT_DIST *pEPDist) void DumpCreditDistStates(HTC_TARGET *target) { - HTC_ENDPOINT_CREDIT_DIST *pEPList = target->EpCreditDistributionListHead; + struct htc_endpoint_credit_dist *pEPList = target->EpCreditDistributionListHead; while (pEPList != NULL) { DumpCreditDist(pEPList); diff --git a/drivers/staging/ath6kl/htc2/htc_services.c b/drivers/staging/ath6kl/htc2/htc_services.c index 2f99989..34bba7e 100644 --- a/drivers/staging/ath6kl/htc2/htc_services.c +++ b/drivers/staging/ath6kl/htc2/htc_services.c @@ -307,9 +307,9 @@ int HTCConnectService(HTC_HANDLE HTCHandle, return status; } -static void AddToEndpointDistList(HTC_TARGET *target, HTC_ENDPOINT_CREDIT_DIST *pEpDist) +static void AddToEndpointDistList(HTC_TARGET *target, struct htc_endpoint_credit_dist *pEpDist) { - HTC_ENDPOINT_CREDIT_DIST *pCurEntry,*pLastEntry; + struct htc_endpoint_credit_dist *pCurEntry,*pLastEntry; if (NULL == target->EpCreditDistributionListHead) { target->EpCreditDistributionListHead = pEpDist; @@ -336,10 +336,10 @@ static void AddToEndpointDistList(HTC_TARGET *target, HTC_ENDPOINT_CREDIT_DIST * /* default credit init callback */ static void HTCDefaultCreditInit(void *Context, - HTC_ENDPOINT_CREDIT_DIST *pEPList, + struct htc_endpoint_credit_dist *pEPList, int TotalCredits) { - HTC_ENDPOINT_CREDIT_DIST *pCurEpDist; + struct htc_endpoint_credit_dist *pCurEpDist; int totalEps = 0; int creditsPerEndpoint; @@ -379,10 +379,10 @@ static void HTCDefaultCreditInit(void *Context, /* default credit distribution callback, NOTE, this callback holds the TX lock */ void HTCDefaultCreditDist(void *Context, - HTC_ENDPOINT_CREDIT_DIST *pEPDistList, + struct htc_endpoint_credit_dist *pEPDistList, HTC_CREDIT_DIST_REASON Reason) { - HTC_ENDPOINT_CREDIT_DIST *pCurEpDist; + struct htc_endpoint_credit_dist *pCurEpDist; if (Reason == HTC_CREDIT_DIST_SEND_COMPLETE) { pCurEpDist = pEPDistList; diff --git a/drivers/staging/ath6kl/include/common_drv.h b/drivers/staging/ath6kl/include/common_drv.h index 4c70a77..3508df4 100644 --- a/drivers/staging/ath6kl/include/common_drv.h +++ b/drivers/staging/ath6kl/include/common_drv.h @@ -33,7 +33,7 @@ struct common_credit_state_info { int TotalAvailableCredits; /* total credits in the system at startup */ int CurrentFreeCredits; /* credits available in the pool that have not been given out to endpoints */ - HTC_ENDPOINT_CREDIT_DIST *pLowestPriEpDist; /* pointer to the lowest priority endpoint dist struct */ + struct htc_endpoint_credit_dist *pLowestPriEpDist; /* pointer to the lowest priority endpoint dist struct */ }; struct hci_transport_callbacks { diff --git a/drivers/staging/ath6kl/include/htc_api.h b/drivers/staging/ath6kl/include/htc_api.h index c5c9fed..f5baf74 100644 --- a/drivers/staging/ath6kl/include/htc_api.h +++ b/drivers/staging/ath6kl/include/htc_api.h @@ -163,9 +163,9 @@ typedef struct _HTC_SERVICE_CONNECT_RESP { } HTC_SERVICE_CONNECT_RESP; /* endpoint distribution structure */ -typedef struct _HTC_ENDPOINT_CREDIT_DIST { - struct _HTC_ENDPOINT_CREDIT_DIST *pNext; - struct _HTC_ENDPOINT_CREDIT_DIST *pPrev; +struct htc_endpoint_credit_dist { + struct htc_endpoint_credit_dist *pNext; + struct htc_endpoint_credit_dist *pPrev; HTC_SERVICE_ID ServiceID; /* Service ID (set by HTC) */ HTC_ENDPOINT_ID Endpoint; /* endpoint for this distribution struct (set by HTC) */ u32 DistFlags; /* distribution flags, distribution function can @@ -195,7 +195,7 @@ typedef struct _HTC_ENDPOINT_CREDIT_DIST { or HTC_CREDIT_DIST_SEND_COMPLETE is indicated on an endpoint that has non-zero credits to recover */ -} HTC_ENDPOINT_CREDIT_DIST; +}; #define HTC_EP_ACTIVE ((u32) (1u << 31)) @@ -216,11 +216,11 @@ typedef enum _HTC_CREDIT_DIST_REASON { } HTC_CREDIT_DIST_REASON; typedef void (*HTC_CREDIT_DIST_CALLBACK)(void *Context, - HTC_ENDPOINT_CREDIT_DIST *pEPList, + struct htc_endpoint_credit_dist *pEPList, HTC_CREDIT_DIST_REASON Reason); typedef void (*HTC_CREDIT_INIT_CALLBACK)(void *Context, - HTC_ENDPOINT_CREDIT_DIST *pEPList, + struct htc_endpoint_credit_dist *pEPList, int TotalCredits); /* endpoint statistics action */ diff --git a/drivers/staging/ath6kl/miscdrv/credit_dist.c b/drivers/staging/ath6kl/miscdrv/credit_dist.c index 8c418d2..ae54e1f 100644 --- a/drivers/staging/ath6kl/miscdrv/credit_dist.c +++ b/drivers/staging/ath6kl/miscdrv/credit_dist.c @@ -42,14 +42,14 @@ #endif static void RedistributeCredits(struct common_credit_state_info *pCredInfo, - HTC_ENDPOINT_CREDIT_DIST *pEPDistList); + struct htc_endpoint_credit_dist *pEPDistList); static void SeekCredits(struct common_credit_state_info *pCredInfo, - HTC_ENDPOINT_CREDIT_DIST *pEPDistList); + struct htc_endpoint_credit_dist *pEPDistList); /* reduce an ep's credits back to a set limit */ static INLINE void ReduceCredits(struct common_credit_state_info *pCredInfo, - HTC_ENDPOINT_CREDIT_DIST *pEpDist, + struct htc_endpoint_credit_dist *pEpDist, int Limit) { int credits; @@ -81,10 +81,10 @@ static INLINE void ReduceCredits(struct common_credit_state_info *pCredInfo, * This function is called in the context of HTCStart() to setup initial (application-specific) * credit distributions */ static void ar6000_credit_init(void *Context, - HTC_ENDPOINT_CREDIT_DIST *pEPList, + struct htc_endpoint_credit_dist *pEPList, int TotalCredits) { - HTC_ENDPOINT_CREDIT_DIST *pCurEpDist; + struct htc_endpoint_credit_dist *pCurEpDist; int count; struct common_credit_state_info *pCredInfo = (struct common_credit_state_info *)Context; @@ -175,10 +175,10 @@ static void ar6000_credit_init(void *Context, * */ static void ar6000_credit_distribute(void *Context, - HTC_ENDPOINT_CREDIT_DIST *pEPDistList, + struct htc_endpoint_credit_dist *pEPDistList, HTC_CREDIT_DIST_REASON Reason) { - HTC_ENDPOINT_CREDIT_DIST *pCurEpDist; + struct htc_endpoint_credit_dist *pCurEpDist; struct common_credit_state_info *pCredInfo = (struct common_credit_state_info *)Context; switch (Reason) { @@ -244,9 +244,9 @@ static void ar6000_credit_distribute(void *Context, /* redistribute credits based on activity change */ static void RedistributeCredits(struct common_credit_state_info *pCredInfo, - HTC_ENDPOINT_CREDIT_DIST *pEPDistList) + struct htc_endpoint_credit_dist *pEPDistList) { - HTC_ENDPOINT_CREDIT_DIST *pCurEpDist = pEPDistList; + struct htc_endpoint_credit_dist *pCurEpDist = pEPDistList; /* walk through the list and remove credits from inactive endpoints */ while (pCurEpDist != NULL) { @@ -284,9 +284,9 @@ static void RedistributeCredits(struct common_credit_state_info *pCredInfo, /* HTC has an endpoint that needs credits, pEPDist is the endpoint in question */ static void SeekCredits(struct common_credit_state_info *pCredInfo, - HTC_ENDPOINT_CREDIT_DIST *pEPDist) + struct htc_endpoint_credit_dist *pEPDist) { - HTC_ENDPOINT_CREDIT_DIST *pCurEpDist; + struct htc_endpoint_credit_dist *pCurEpDist; int credits = 0; int need; -- 1.7.4.15.g7811d From 7013baf79a775987ee7647cf930d425d7ea5ead2 Mon Sep 17 00:00:00 2001 From: Luis R. Rodriguez Date: Mon, 28 Feb 2011 14:02:40 -0800 Subject: [PATCH 39/58] ath6kl: remove-typedef HTC_ENDPOINT_STATS remove-typedef -s HTC_ENDPOINT_STATS \ "struct htc_endpoint_stats" drivers/staging/ath6kl/ Cc: Naveen Singh Signed-off-by: Luis R. Rodriguez --- drivers/staging/ath6kl/htc2/htc.c | 6 +++--- drivers/staging/ath6kl/htc2/htc_internal.h | 2 +- drivers/staging/ath6kl/include/htc_api.h | 6 +++--- drivers/staging/ath6kl/os/linux/ioctl.c | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/staging/ath6kl/htc2/htc.c b/drivers/staging/ath6kl/htc2/htc.c index e897c0c..2a065b4 100644 --- a/drivers/staging/ath6kl/htc2/htc.c +++ b/drivers/staging/ath6kl/htc2/htc.c @@ -524,7 +524,7 @@ static void HTCReportFailure(void *Context) bool HTCGetEndpointStatistics(HTC_HANDLE HTCHandle, HTC_ENDPOINT_ID Endpoint, HTC_ENDPOINT_STAT_ACTION Action, - HTC_ENDPOINT_STATS *pStats) + struct htc_endpoint_stats *pStats) { #ifdef HTC_EP_STAT_PROFILING @@ -556,12 +556,12 @@ bool HTCGetEndpointStatistics(HTC_HANDLE HTCHandle, if (sample) { A_ASSERT(pStats != NULL); /* return the stats to the caller */ - memcpy(pStats, &target->EndPoint[Endpoint].EndPointStats, sizeof(HTC_ENDPOINT_STATS)); + memcpy(pStats, &target->EndPoint[Endpoint].EndPointStats, sizeof(struct htc_endpoint_stats)); } if (clearStats) { /* reset stats */ - A_MEMZERO(&target->EndPoint[Endpoint].EndPointStats, sizeof(HTC_ENDPOINT_STATS)); + A_MEMZERO(&target->EndPoint[Endpoint].EndPointStats, sizeof(struct htc_endpoint_stats)); } UNLOCK_HTC_RX(target); diff --git a/drivers/staging/ath6kl/htc2/htc_internal.h b/drivers/staging/ath6kl/htc2/htc_internal.h index d726a02..0e363a8 100644 --- a/drivers/staging/ath6kl/htc2/htc_internal.h +++ b/drivers/staging/ath6kl/htc2/htc_internal.h @@ -83,7 +83,7 @@ struct htc_endpoint { u8 SeqNo; /* TX seq no (helpful) for debugging */ u32 LocalConnectionFlags; /* local connection flags */ #ifdef HTC_EP_STAT_PROFILING - HTC_ENDPOINT_STATS EndPointStats; /* endpoint statistics */ + struct htc_endpoint_stats EndPointStats; /* endpoint statistics */ #endif }; diff --git a/drivers/staging/ath6kl/include/htc_api.h b/drivers/staging/ath6kl/include/htc_api.h index f5baf74..db3cbcf9 100644 --- a/drivers/staging/ath6kl/include/htc_api.h +++ b/drivers/staging/ath6kl/include/htc_api.h @@ -231,7 +231,7 @@ typedef enum _HTC_ENDPOINT_STAT_ACTION { } HTC_ENDPOINT_STAT_ACTION; /* endpoint statistics */ -typedef struct _HTC_ENDPOINT_STATS { +struct htc_endpoint_stats { u32 TxCreditLowIndications; /* number of times the host set the credit-low flag in a send message on this endpoint */ u32 TxIssued; /* running count of total TX packets issued */ @@ -255,7 +255,7 @@ typedef struct _HTC_ENDPOINT_STATS { u32 RxBundleIndFromHdr; /* count of the number of bundle indications from the HTC header */ u32 RxAllocThreshHit; /* count of the number of times the recv allocation threshhold was hit */ u32 RxAllocThreshBytes; /* total number of bytes */ -} HTC_ENDPOINT_STATS; +}; /* ------ Function Prototypes ------ */ /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @@ -472,7 +472,7 @@ void HTCIndicateActivityChange(HTC_HANDLE HTCHandle, bool HTCGetEndpointStatistics(HTC_HANDLE HTCHandle, HTC_ENDPOINT_ID Endpoint, HTC_ENDPOINT_STAT_ACTION Action, - HTC_ENDPOINT_STATS *pStats); + struct htc_endpoint_stats *pStats); /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @desc: Unblock HTC message reception diff --git a/drivers/staging/ath6kl/os/linux/ioctl.c b/drivers/staging/ath6kl/os/linux/ioctl.c index 1824475..2c0d4fd 100644 --- a/drivers/staging/ath6kl/os/linux/ioctl.c +++ b/drivers/staging/ath6kl/os/linux/ioctl.c @@ -3976,7 +3976,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) #endif /* ATH_DEBUG_MODULE */ #ifdef HTC_EP_STAT_PROFILING { - HTC_ENDPOINT_STATS stats; + struct htc_endpoint_stats stats; int i; for (i = 0; i < 5; i++) { -- 1.7.4.15.g7811d From 6f32113a0cc8bb90d40dbc62f682dee7cc426fef Mon Sep 17 00:00:00 2001 From: Luis R. Rodriguez Date: Mon, 28 Feb 2011 14:04:26 -0800 Subject: [PATCH 40/58] ath6kl: remove-typedef HTC_EP_CALLBACKS remove-typedef -s HTC_EP_CALLBACKS \ "struct htc_ep_callbacks" drivers/staging/ath6kl/ Cc: Naveen Singh Signed-off-by: Luis R. Rodriguez --- drivers/staging/ath6kl/htc2/htc_internal.h | 2 +- drivers/staging/ath6kl/include/htc_api.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/ath6kl/htc2/htc_internal.h b/drivers/staging/ath6kl/htc2/htc_internal.h index 0e363a8..d574015 100644 --- a/drivers/staging/ath6kl/htc2/htc_internal.h +++ b/drivers/staging/ath6kl/htc2/htc_internal.h @@ -72,7 +72,7 @@ struct htc_endpoint { HTC_PACKET_QUEUE TxQueue; /* HTC frame buffer TX queue */ HTC_PACKET_QUEUE RxBuffers; /* HTC frame buffer RX list */ struct htc_endpoint_credit_dist CreditDist; /* credit distribution structure (exposed to driver layer) */ - HTC_EP_CALLBACKS EpCallBacks; /* callbacks associated with this endpoint */ + struct htc_ep_callbacks EpCallBacks; /* callbacks associated with this endpoint */ int MaxTxQueueDepth; /* max depth of the TX queue before we need to call driver's full handler */ int MaxMsgLength; /* max length of endpoint message */ diff --git a/drivers/staging/ath6kl/include/htc_api.h b/drivers/staging/ath6kl/include/htc_api.h index db3cbcf9..ad25d3e 100644 --- a/drivers/staging/ath6kl/include/htc_api.h +++ b/drivers/staging/ath6kl/include/htc_api.h @@ -116,7 +116,7 @@ typedef enum _HTC_SEND_FULL_ACTION { * must ONLY inspect the packet, it may not free or reclaim the packet. */ typedef HTC_SEND_FULL_ACTION (*HTC_EP_SEND_QUEUE_FULL)(void *, HTC_PACKET *pPacket); -typedef struct _HTC_EP_CALLBACKS { +struct htc_ep_callbacks { void *pContext; /* context for each callback */ HTC_EP_SEND_PKT_COMPLETE EpTxComplete; /* tx completion callback for connected endpoint */ HTC_EP_RECV_PKT EpRecv; /* receive callback for connected endpoint */ @@ -136,7 +136,7 @@ typedef struct _HTC_EP_CALLBACKS { when the recv queue drops below this value if set to 0, the refill is only called when packets are empty */ -} HTC_EP_CALLBACKS; +}; /* service connection information */ typedef struct _HTC_SERVICE_CONNECT_REQ { @@ -144,7 +144,7 @@ typedef struct _HTC_SERVICE_CONNECT_REQ { u16 ConnectionFlags; /* connection flags, see htc protocol definition */ u8 *pMetaData; /* ptr to optional service-specific meta-data */ u8 MetaDataLength; /* optional meta data length */ - HTC_EP_CALLBACKS EpCallbacks; /* endpoint callbacks */ + struct htc_ep_callbacks EpCallbacks; /* endpoint callbacks */ int MaxSendQueueDepth; /* maximum depth of any send queue */ u32 LocalConnectionFlags; /* HTC flags for the host-side (local) connection */ unsigned int MaxSendMsgSize; /* override max message size in send direction */ -- 1.7.4.15.g7811d From 25abbe4184e0087a8dc8a783ec4d6a86538d293c Mon Sep 17 00:00:00 2001 From: Luis R. Rodriguez Date: Mon, 28 Feb 2011 14:06:43 -0800 Subject: [PATCH 41/58] ath6kl: remove-typedef HTC_FRAME_HDR remove-typedef -s HTC_FRAME_HDR \ "struct htc_frame_hdr" drivers/staging/ath6kl/ Cc: Naveen Singh Signed-off-by: Luis R. Rodriguez --- drivers/staging/ath6kl/htc2/htc_internal.h | 12 ++++---- drivers/staging/ath6kl/htc2/htc_recv.c | 30 ++++++++++---------- .../staging/ath6kl/include/common/epping_test.h | 2 +- drivers/staging/ath6kl/include/common/htc.h | 8 ++-- 4 files changed, 26 insertions(+), 26 deletions(-) diff --git a/drivers/staging/ath6kl/htc2/htc_internal.h b/drivers/staging/ath6kl/htc2/htc_internal.h index d574015..deff62a 100644 --- a/drivers/staging/ath6kl/htc2/htc_internal.h +++ b/drivers/staging/ath6kl/htc2/htc_internal.h @@ -128,7 +128,7 @@ typedef struct _HTC_TARGET { HTC_ENDPOINT_ID EpWaitingForBuffers; bool TargetFailure; #ifdef HTC_CAPTURE_LAST_FRAME - HTC_FRAME_HDR LastFrameHdr; /* useful for debugging */ + struct htc_frame_hdr LastFrameHdr; /* useful for debugging */ u8 LastTrailer[256]; u8 LastTrailerLength; #endif @@ -203,11 +203,11 @@ static INLINE HTC_PACKET *HTC_ALLOC_CONTROL_TX(HTC_TARGET *target) { u8 *pHdrBuf; \ (pP)->pBuffer -= HTC_HDR_LENGTH; \ pHdrBuf = (pP)->pBuffer; \ - A_SET_UINT16_FIELD(pHdrBuf,HTC_FRAME_HDR,PayloadLen,(u16)(pP)->ActualLength); \ - A_SET_UINT8_FIELD(pHdrBuf,HTC_FRAME_HDR,Flags,(sendflags)); \ - A_SET_UINT8_FIELD(pHdrBuf,HTC_FRAME_HDR,EndpointID, (u8)(pP)->Endpoint); \ - A_SET_UINT8_FIELD(pHdrBuf,HTC_FRAME_HDR,ControlBytes[0], (u8)(ctrl0)); \ - A_SET_UINT8_FIELD(pHdrBuf,HTC_FRAME_HDR,ControlBytes[1], (u8)(ctrl1)); \ + A_SET_UINT16_FIELD(pHdrBuf,struct htc_frame_hdr,PayloadLen,(u16)(pP)->ActualLength); \ + A_SET_UINT8_FIELD(pHdrBuf,struct htc_frame_hdr,Flags,(sendflags)); \ + A_SET_UINT8_FIELD(pHdrBuf,struct htc_frame_hdr,EndpointID, (u8)(pP)->Endpoint); \ + A_SET_UINT8_FIELD(pHdrBuf,struct htc_frame_hdr,ControlBytes[0], (u8)(ctrl0)); \ + A_SET_UINT8_FIELD(pHdrBuf,struct htc_frame_hdr,ControlBytes[1], (u8)(ctrl1)); \ } #define HTC_UNPREPARE_SEND_PKT(pP) \ diff --git a/drivers/staging/ath6kl/htc2/htc_recv.c b/drivers/staging/ath6kl/htc2/htc_recv.c index 4095f8e..771dc5e 100644 --- a/drivers/staging/ath6kl/htc2/htc_recv.c +++ b/drivers/staging/ath6kl/htc2/htc_recv.c @@ -252,7 +252,7 @@ static int HTCProcessRecvHeader(HTC_TARGET *target, do { /* note, we cannot assume the alignment of pBuffer, so we use the safe macros to * retrieve 16 bit fields */ - payloadLen = A_GET_UINT16_FIELD(pBuf, HTC_FRAME_HDR, PayloadLen); + payloadLen = A_GET_UINT16_FIELD(pBuf, struct htc_frame_hdr, PayloadLen); ((u8 *)&lookAhead)[0] = pBuf[0]; ((u8 *)&lookAhead)[1] = pBuf[1]; @@ -277,10 +277,10 @@ static int HTCProcessRecvHeader(HTC_TARGET *target, break; } - if (pPacket->Endpoint != A_GET_UINT8_FIELD(pBuf, HTC_FRAME_HDR, EndpointID)) { + if (pPacket->Endpoint != A_GET_UINT8_FIELD(pBuf, struct htc_frame_hdr, EndpointID)) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("Refreshed HDR endpoint (%d) does not match expected endpoint (%d) \n", - A_GET_UINT8_FIELD(pBuf, HTC_FRAME_HDR, EndpointID), pPacket->Endpoint)); + A_GET_UINT8_FIELD(pBuf, struct htc_frame_hdr, EndpointID), pPacket->Endpoint)); status = A_EPROTO; break; } @@ -294,9 +294,9 @@ static int HTCProcessRecvHeader(HTC_TARGET *target, (unsigned long)pPacket, pPacket->PktInfo.AsRx.HTCRxFlags)); #ifdef ATH_DEBUG_MODULE DebugDumpBytes((u8 *)&pPacket->PktInfo.AsRx.ExpectedHdr,4,"Expected Message LookAhead"); - DebugDumpBytes(pBuf,sizeof(HTC_FRAME_HDR),"Current Frame Header"); + DebugDumpBytes(pBuf,sizeof(struct htc_frame_hdr),"Current Frame Header"); #ifdef HTC_CAPTURE_LAST_FRAME - DebugDumpBytes((u8 *)&target->LastFrameHdr,sizeof(HTC_FRAME_HDR),"Last Frame Header"); + DebugDumpBytes((u8 *)&target->LastFrameHdr,sizeof(struct htc_frame_hdr),"Last Frame Header"); if (target->LastTrailerLength != 0) { DebugDumpBytes(target->LastTrailer, target->LastTrailerLength, @@ -309,13 +309,13 @@ static int HTCProcessRecvHeader(HTC_TARGET *target, } /* get flags */ - temp = A_GET_UINT8_FIELD(pBuf, HTC_FRAME_HDR, Flags); + temp = A_GET_UINT8_FIELD(pBuf, struct htc_frame_hdr, Flags); if (temp & HTC_FLAGS_RECV_TRAILER) { /* this packet has a trailer */ /* extract the trailer length in control byte 0 */ - temp = A_GET_UINT8_FIELD(pBuf, HTC_FRAME_HDR, ControlBytes[0]); + temp = A_GET_UINT8_FIELD(pBuf, struct htc_frame_hdr, ControlBytes[0]); if ((temp < sizeof(HTC_RECORD_HDR)) || (temp > payloadLen)) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR, @@ -372,7 +372,7 @@ static int HTCProcessRecvHeader(HTC_TARGET *target, #endif } else { #ifdef HTC_CAPTURE_LAST_FRAME - memcpy(&target->LastFrameHdr,pBuf,sizeof(HTC_FRAME_HDR)); + memcpy(&target->LastFrameHdr,pBuf,sizeof(struct htc_frame_hdr)); #endif if (AR_DEBUG_LVL_CHECK(ATH_DEBUG_RECV)) { if (pPacket->ActualLength > 0) { @@ -500,7 +500,7 @@ static INLINE void SetRxPacketIndicationFlags(u32 LookAhead, struct htc_endpoint *pEndpoint, HTC_PACKET *pPacket) { - HTC_FRAME_HDR *pHdr = (HTC_FRAME_HDR *)&LookAhead; + struct htc_frame_hdr *pHdr = (struct htc_frame_hdr *)&LookAhead; /* check to see if the "next" packet is from the same endpoint of the completing packet */ if (pHdr->EndpointID == pPacket->Endpoint) { @@ -592,7 +592,7 @@ int HTCWaitforControlMessage(HTC_TARGET *target, HTC_PACKET **ppControlPacket) int status; u32 lookAhead; HTC_PACKET *pPacket = NULL; - HTC_FRAME_HDR *pHdr; + struct htc_frame_hdr *pHdr; AR_DEBUG_PRINTF(ATH_DEBUG_RECV,("+HTCWaitforControlMessage \n")); @@ -613,7 +613,7 @@ int HTCWaitforControlMessage(HTC_TARGET *target, HTC_PACKET **ppControlPacket) ("HTCWaitforControlMessage : lookAhead : 0x%X \n", lookAhead)); /* check the lookahead */ - pHdr = (HTC_FRAME_HDR *)&lookAhead; + pHdr = (struct htc_frame_hdr *)&lookAhead; if (pHdr->EndpointID != ENDPOINT_0) { /* unexpected endpoint number, should be zero */ @@ -694,7 +694,7 @@ static int AllocAndPrepareRxPackets(HTC_TARGET *target, { int status = 0; HTC_PACKET *pPacket; - HTC_FRAME_HDR *pHdr; + struct htc_frame_hdr *pHdr; int i,j; int numMessages; int fullLength; @@ -705,7 +705,7 @@ static int AllocAndPrepareRxPackets(HTC_TARGET *target, for (i = 0; i < Messages; i++) { - pHdr = (HTC_FRAME_HDR *)&LookAheads[i]; + pHdr = (struct htc_frame_hdr *)&LookAheads[i]; if (pHdr->EndpointID >= ENDPOINT_MAX) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Invalid Endpoint in look-ahead: %d \n",pHdr->EndpointID)); @@ -751,7 +751,7 @@ static int AllocAndPrepareRxPackets(HTC_TARGET *target, ("HTC header indicates :%d messages can be fetched as a bundle \n",numMessages)); } - fullLength = DEV_CALC_RECV_PADDED_LEN(&target->Device,pHdr->PayloadLen + sizeof(HTC_FRAME_HDR)); + fullLength = DEV_CALC_RECV_PADDED_LEN(&target->Device,pHdr->PayloadLen + sizeof(struct htc_frame_hdr)); /* get packet buffers for each message, if there was a bundle detected in the header, * use pHdr as a template to fetch all packets in the bundle */ @@ -1170,7 +1170,7 @@ int HTCRecvMessagePendingHandler(void *Context, u32 MsgLookAheads[], int NumLook } /* first lookahead sets the expected endpoint IDs for all packets in a bundle */ - id = ((HTC_FRAME_HDR *)&lookAheads[0])->EndpointID; + id = ((struct htc_frame_hdr *)&lookAheads[0])->EndpointID; pEndpoint = &target->EndPoint[id]; if (id >= ENDPOINT_MAX) { diff --git a/drivers/staging/ath6kl/include/common/epping_test.h b/drivers/staging/ath6kl/include/common/epping_test.h index 2cd43c4..5c40d8a 100644 --- a/drivers/staging/ath6kl/include/common/epping_test.h +++ b/drivers/staging/ath6kl/include/common/epping_test.h @@ -30,7 +30,7 @@ #endif /* alignment to 4-bytes */ -#define EPPING_ALIGNMENT_PAD (((sizeof(HTC_FRAME_HDR) + 3) & (~0x3)) - sizeof(HTC_FRAME_HDR)) +#define EPPING_ALIGNMENT_PAD (((sizeof(struct htc_frame_hdr) + 3) & (~0x3)) - sizeof(struct htc_frame_hdr)) #ifndef A_OFFSETOF #define A_OFFSETOF(type,field) (int)(&(((type *)NULL)->field)) diff --git a/drivers/staging/ath6kl/include/common/htc.h b/drivers/staging/ath6kl/include/common/htc.h index bed8e26..b9d4495 100644 --- a/drivers/staging/ath6kl/include/common/htc.h +++ b/drivers/staging/ath6kl/include/common/htc.h @@ -66,7 +66,7 @@ */ /* HTC frame header */ -typedef PREPACK struct _HTC_FRAME_HDR{ +PREPACK struct htc_frame_hdr { /* do not remove or re-arrange these fields, these are minimally required * to take advantage of 4-byte lookaheads in some hardware implementations */ u8 EndpointID; @@ -79,7 +79,7 @@ typedef PREPACK struct _HTC_FRAME_HDR{ /* message payload starts after the header */ -} POSTPACK HTC_FRAME_HDR; +} POSTPACK; /* frame header flags */ @@ -94,9 +94,9 @@ typedef PREPACK struct _HTC_FRAME_HDR{ #define HTC_FLAGS_RECV_BUNDLE_CNT_MASK (0xF0) /* bits 7..4 */ #define HTC_FLAGS_RECV_BUNDLE_CNT_SHIFT 4 -#define HTC_HDR_LENGTH (sizeof(HTC_FRAME_HDR)) +#define HTC_HDR_LENGTH (sizeof(struct htc_frame_hdr)) #define HTC_MAX_TRAILER_LENGTH 255 -#define HTC_MAX_PAYLOAD_LENGTH (4096 - sizeof(HTC_FRAME_HDR)) +#define HTC_MAX_PAYLOAD_LENGTH (4096 - sizeof(struct htc_frame_hdr)) /* HTC control message IDs */ -- 1.7.4.15.g7811d From 16ebd5654a7c9ba9e0e12e7deb2f45536a383c48 Mon Sep 17 00:00:00 2001 From: Luis R. Rodriguez Date: Mon, 28 Feb 2011 14:09:09 -0800 Subject: [PATCH 42/58] ath6kl: remove-typedef HTC_INIT_INFO remove-typedef -s HTC_INIT_INFO \ "struct htc_init_info" drivers/staging/ath6kl/ Cc: Naveen Singh Signed-off-by: Luis R. Rodriguez --- drivers/staging/ath6kl/htc2/htc.c | 4 ++-- drivers/staging/ath6kl/htc2/htc_internal.h | 2 +- drivers/staging/ath6kl/include/htc_api.h | 6 +++--- drivers/staging/ath6kl/os/linux/ar6000_drv.c | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/staging/ath6kl/htc2/htc.c b/drivers/staging/ath6kl/htc2/htc.c index 2a065b4..810fe7b 100644 --- a/drivers/staging/ath6kl/htc2/htc.c +++ b/drivers/staging/ath6kl/htc2/htc.c @@ -90,7 +90,7 @@ static void HTCCleanup(HTC_TARGET *target) } /* registered target arrival callback from the HIF layer */ -HTC_HANDLE HTCCreate(void *hif_handle, HTC_INIT_INFO *pInfo) +HTC_HANDLE HTCCreate(void *hif_handle, struct htc_init_info *pInfo) { HTC_TARGET *target = NULL; int status = 0; @@ -130,7 +130,7 @@ HTC_HANDLE HTCCreate(void *hif_handle, HTC_INIT_INFO *pInfo) target->Device.MessagePendingCallback = HTCRecvMessagePendingHandler; target->EpWaitingForBuffers = ENDPOINT_MAX; - memcpy(&target->HTCInitInfo,pInfo,sizeof(HTC_INIT_INFO)); + memcpy(&target->HTCInitInfo,pInfo,sizeof(struct htc_init_info)); ResetEndpointStates(target); diff --git a/drivers/staging/ath6kl/htc2/htc_internal.h b/drivers/staging/ath6kl/htc2/htc_internal.h index deff62a..c5727ca 100644 --- a/drivers/staging/ath6kl/htc2/htc_internal.h +++ b/drivers/staging/ath6kl/htc2/htc_internal.h @@ -132,7 +132,7 @@ typedef struct _HTC_TARGET { u8 LastTrailer[256]; u8 LastTrailerLength; #endif - HTC_INIT_INFO HTCInitInfo; + struct htc_init_info HTCInitInfo; u8 HTCTargetVersion; int MaxMsgPerBundle; /* max messages per bundle for HTC */ bool SendBundlingEnabled; /* run time enable for send bundling (dynamic) */ diff --git a/drivers/staging/ath6kl/include/htc_api.h b/drivers/staging/ath6kl/include/htc_api.h index ad25d3e..5878417 100644 --- a/drivers/staging/ath6kl/include/htc_api.h +++ b/drivers/staging/ath6kl/include/htc_api.h @@ -43,10 +43,10 @@ typedef void *HTC_HANDLE; typedef u16 HTC_SERVICE_ID; -typedef struct _HTC_INIT_INFO { +struct htc_init_info { void *pContext; /* context for target failure notification */ void (*TargetFailure)(void *Instance, int Status); -} HTC_INIT_INFO; +}; /* per service connection send completion */ typedef void (*HTC_EP_SEND_PKT_COMPLETE)(void *,HTC_PACKET *); @@ -269,7 +269,7 @@ struct htc_endpoint_stats { @example: @see also: HTCDestroy +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ -HTC_HANDLE HTCCreate(void *HifDevice, HTC_INIT_INFO *pInfo); +HTC_HANDLE HTCCreate(void *HifDevice, struct htc_init_info *pInfo); /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @desc: Get the underlying HIF device handle @function name: HTCGetHifDevice diff --git a/drivers/staging/ath6kl/os/linux/ar6000_drv.c b/drivers/staging/ath6kl/os/linux/ar6000_drv.c index b739943..ebfe1e8 100644 --- a/drivers/staging/ath6kl/os/linux/ar6000_drv.c +++ b/drivers/staging/ath6kl/os/linux/ar6000_drv.c @@ -1599,7 +1599,7 @@ ar6000_avail_ev(void *context, void *hif_handle) void *ar_netif; AR_SOFTC_T *ar; int device_index = 0; - HTC_INIT_INFO htcInfo; + struct htc_init_info htcInfo; #ifdef ATH6K_CONFIG_CFG80211 struct wireless_dev *wdev; #endif /* ATH6K_CONFIG_CFG80211 */ -- 1.7.4.15.g7811d From 695868304cabc4766b5d34d00799dfd04db1bbc1 Mon Sep 17 00:00:00 2001 From: Luis R. Rodriguez Date: Mon, 28 Feb 2011 14:12:45 -0800 Subject: [PATCH 43/58] ath6kl: remove-typedef HTC_PACKET This required two passes: remove-typedef -s HTC_PACKET \ "struct htc_packet" drivers/staging/ath6kl/ remove-typedef -s _HTC_PACKET \ "struct htc_packet" drivers/staging/ath6kl/ Cc: Naveen Singh Signed-off-by: Luis R. Rodriguez --- drivers/staging/ath6kl/htc2/AR6000/ar6k.c | 18 +++++----- drivers/staging/ath6kl/htc2/AR6000/ar6k.h | 10 +++--- drivers/staging/ath6kl/htc2/AR6000/ar6k_events.c | 10 +++--- drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox.c | 18 +++++----- .../ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c | 18 +++++----- drivers/staging/ath6kl/htc2/htc.c | 14 ++++---- drivers/staging/ath6kl/htc2/htc_internal.h | 20 ++++++------ drivers/staging/ath6kl/htc2/htc_recv.c | 32 ++++++++++---------- drivers/staging/ath6kl/htc2/htc_send.c | 30 +++++++++--------- drivers/staging/ath6kl/htc2/htc_services.c | 10 +++--- drivers/staging/ath6kl/include/hci_transport_api.h | 12 ++++---- drivers/staging/ath6kl/include/htc_api.h | 12 ++++---- drivers/staging/ath6kl/include/htc_packet.h | 22 +++++++------- drivers/staging/ath6kl/miscdrv/ar3kconfig.c | 12 ++++---- drivers/staging/ath6kl/os/linux/ar6000_drv.c | 26 ++++++++-------- drivers/staging/ath6kl/os/linux/ar6000_raw_if.c | 4 +- .../staging/ath6kl/os/linux/export_hci_transport.c | 4 +- drivers/staging/ath6kl/os/linux/hci_bridge.c | 24 +++++++------- .../staging/ath6kl/os/linux/include/ar6000_drv.h | 4 +- .../ath6kl/os/linux/include/export_hci_transport.h | 4 +- drivers/staging/ath6kl/os/linux/netbuf.c | 4 +- 21 files changed, 154 insertions(+), 154 deletions(-) diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k.c b/drivers/staging/ath6kl/htc2/AR6000/ar6k.c index c780e4f..91e763a 100644 --- a/drivers/staging/ath6kl/htc2/AR6000/ar6k.c +++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k.c @@ -40,16 +40,16 @@ int DevDisableInterrupts(struct ar6k_device *pDev); static void DevCleanupVirtualScatterSupport(struct ar6k_device *pDev); -void AR6KFreeIOPacket(struct ar6k_device *pDev, HTC_PACKET *pPacket) +void AR6KFreeIOPacket(struct ar6k_device *pDev, struct htc_packet *pPacket) { LOCK_AR6K(pDev); HTC_PACKET_ENQUEUE(&pDev->RegisterIOList,pPacket); UNLOCK_AR6K(pDev); } -HTC_PACKET *AR6KAllocIOPacket(struct ar6k_device *pDev) +struct htc_packet *AR6KAllocIOPacket(struct ar6k_device *pDev) { - HTC_PACKET *pPacket; + struct htc_packet *pPacket; LOCK_AR6K(pDev); pPacket = HTC_PACKET_DEQUEUE(&pDev->RegisterIOList); @@ -113,7 +113,7 @@ int DevSetup(struct ar6k_device *pDev) /* carve up register I/O packets (these are for ASYNC register I/O ) */ for (i = 0; i < AR6K_MAX_REG_IO_BUFFERS; i++) { - HTC_PACKET *pIOPacket; + struct htc_packet *pIOPacket; pIOPacket = &pDev->RegIOBuffers[i].HtcPacket; SET_HTC_PACKET_INFO_RX_REFILL(pIOPacket, pDev, @@ -337,7 +337,7 @@ int DevMaskInterrupts(struct ar6k_device *pDev) } /* callback when our fetch to enable/disable completes */ -static void DevDoEnableDisableRecvAsyncHandler(void *Context, HTC_PACKET *pPacket) +static void DevDoEnableDisableRecvAsyncHandler(void *Context, struct htc_packet *pPacket) { struct ar6k_device *pDev = (struct ar6k_device *)Context; @@ -358,7 +358,7 @@ static void DevDoEnableDisableRecvAsyncHandler(void *Context, HTC_PACKET *pPacke static int DevDoEnableDisableRecvOverride(struct ar6k_device *pDev, bool EnableRecv, bool AsyncMode) { int status = 0; - HTC_PACKET *pIOPacket = NULL; + struct htc_packet *pIOPacket = NULL; AR_DEBUG_PRINTF(ATH_DEBUG_TRC,("DevDoEnableDisableRecvOverride: Enable:%d Mode:%d\n", EnableRecv,AsyncMode)); @@ -406,7 +406,7 @@ static int DevDoEnableDisableRecvOverride(struct ar6k_device *pDev, bool EnableR static int DevDoEnableDisableRecvNormal(struct ar6k_device *pDev, bool EnableRecv, bool AsyncMode) { int status = 0; - HTC_PACKET *pIOPacket = NULL; + struct htc_packet *pIOPacket = NULL; struct ar6k_irq_enable_registers regs; /* take the lock to protect interrupt enable shadows */ @@ -648,7 +648,7 @@ int DevCopyScatterListToFromDMABuffer(struct hif_scatter_req *pReq, bool FromDMA return 0; } -static void DevReadWriteScatterAsyncHandler(void *Context, HTC_PACKET *pPacket) +static void DevReadWriteScatterAsyncHandler(void *Context, struct htc_packet *pPacket) { struct ar6k_device *pDev = (struct ar6k_device *)Context; struct hif_scatter_req *pReq = (struct hif_scatter_req *)pPacket->pPktContext; @@ -668,7 +668,7 @@ static int DevReadWriteScatter(HIF_DEVICE *Context, struct hif_scatter_req *pReq { struct ar6k_device *pDev = (struct ar6k_device *)Context; int status = 0; - HTC_PACKET *pIOPacket = NULL; + struct htc_packet *pIOPacket = NULL; u32 request = pReq->Request; do { diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k.h b/drivers/staging/ath6kl/htc2/AR6000/ar6k.h index baad0bf..b01542e 100644 --- a/drivers/staging/ath6kl/htc2/AR6000/ar6k.h +++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k.h @@ -90,7 +90,7 @@ PREPACK struct ar6k_gmbox_ctrl_registers { /* buffers for ASYNC I/O */ struct ar6k_async_reg_io_buffer { - HTC_PACKET HtcPacket; /* we use an HTC packet as a wrapper for our async register-based I/O */ + struct htc_packet HtcPacket; /* we use an HTC packet as a wrapper for our async register-based I/O */ u8 _Pad1[A_CACHE_LINE_PAD]; u8 Buffer[AR6K_REG_IO_BUFFER_SIZE]; /* cache-line safe with pads around */ u8 _Pad2[A_CACHE_LINE_PAD]; @@ -176,7 +176,7 @@ int DevWaitForPendingRecv(struct ar6k_device *pDev,u32 TimeoutInMs,bool *pbIsRec #define DEV_CALC_SEND_PADDED_LEN(pDev, length) DEV_CALC_RECV_PADDED_LEN(pDev,length) #define DEV_IS_LEN_BLOCK_ALIGNED(pDev, length) (((length) % (pDev)->BlockSize) == 0) -static INLINE int DevSendPacket(struct ar6k_device *pDev, HTC_PACKET *pPacket, u32 SendLength) { +static INLINE int DevSendPacket(struct ar6k_device *pDev, struct htc_packet *pPacket, u32 SendLength) { u32 paddedLength; bool sync = (pPacket->Completion == NULL) ? true : false; int status; @@ -219,7 +219,7 @@ static INLINE int DevSendPacket(struct ar6k_device *pDev, HTC_PACKET *pPacket, u return status; } -static INLINE int DevRecvPacket(struct ar6k_device *pDev, HTC_PACKET *pPacket, u32 RecvLength) { +static INLINE int DevRecvPacket(struct ar6k_device *pDev, struct htc_packet *pPacket, u32 RecvLength) { u32 paddedLength; int status; bool sync = (pPacket->Completion == NULL) ? true : false; @@ -378,8 +378,8 @@ struct ar6k_device *HTCGetAR6KDevice(void *HTCHandle); #define DEV_GMBOX_GET_PROTOCOL(pDev) (pDev)->GMboxInfo.pProtocolContext -int DevGMboxWrite(struct ar6k_device *pDev, HTC_PACKET *pPacket, u32 WriteLength); -int DevGMboxRead(struct ar6k_device *pDev, HTC_PACKET *pPacket, u32 ReadLength); +int DevGMboxWrite(struct ar6k_device *pDev, struct htc_packet *pPacket, u32 WriteLength); +int DevGMboxRead(struct ar6k_device *pDev, struct htc_packet *pPacket, u32 ReadLength); #define PROC_IO_ASYNC true #define PROC_IO_SYNC false diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k_events.c b/drivers/staging/ath6kl/htc2/AR6000/ar6k_events.c index ca6abb4..5e6d1e0 100644 --- a/drivers/staging/ath6kl/htc2/AR6000/ar6k_events.c +++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k_events.c @@ -33,8 +33,8 @@ #include "htc_packet.h" #include "ar6k.h" -extern void AR6KFreeIOPacket(struct ar6k_device *pDev, HTC_PACKET *pPacket); -extern HTC_PACKET *AR6KAllocIOPacket(struct ar6k_device *pDev); +extern void AR6KFreeIOPacket(struct ar6k_device *pDev, struct htc_packet *pPacket); +extern struct htc_packet *AR6KAllocIOPacket(struct ar6k_device *pDev); static int DevServiceDebugInterrupt(struct ar6k_device *pDev); @@ -43,7 +43,7 @@ static int DevServiceDebugInterrupt(struct ar6k_device *pDev); /* completion routine for ALL HIF layer async I/O */ int DevRWCompletionHandler(void *context, int status) { - HTC_PACKET *pPacket = (HTC_PACKET *)context; + struct htc_packet *pPacket = (struct htc_packet *)context; AR_DEBUG_PRINTF(ATH_DEBUG_RECV, ("+DevRWCompletionHandler (Pkt:0x%lX) , Status: %d \n", @@ -300,7 +300,7 @@ static int DevServiceCounterInterrupt(struct ar6k_device *pDev) } /* callback when our fetch to get interrupt status registers completes */ -static void DevGetEventAsyncHandler(void *Context, HTC_PACKET *pPacket) +static void DevGetEventAsyncHandler(void *Context, struct htc_packet *pPacket) { struct ar6k_device *pDev = (struct ar6k_device *)Context; u32 lookAhead = 0; @@ -392,7 +392,7 @@ int DevCheckPendingRecvMsgsAsync(void *context) { struct ar6k_device *pDev = (struct ar6k_device *)context; int status = 0; - HTC_PACKET *pIOPacket; + struct htc_packet *pIOPacket; /* this is called in an ASYNC only context, we may NOT block, sleep or call any apis that can * cause us to switch contexts */ diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox.c b/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox.c index 106f9bf..3740011 100644 --- a/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox.c +++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox.c @@ -54,12 +54,12 @@ /* external APIs for allocating and freeing internal I/O packets to handle ASYNC I/O */ -extern void AR6KFreeIOPacket(struct ar6k_device *pDev, HTC_PACKET *pPacket); -extern HTC_PACKET *AR6KAllocIOPacket(struct ar6k_device *pDev); +extern void AR6KFreeIOPacket(struct ar6k_device *pDev, struct htc_packet *pPacket); +extern struct htc_packet *AR6KAllocIOPacket(struct ar6k_device *pDev); /* callback when our fetch to enable/disable completes */ -static void DevGMboxIRQActionAsyncHandler(void *Context, HTC_PACKET *pPacket) +static void DevGMboxIRQActionAsyncHandler(void *Context, struct htc_packet *pPacket) { struct ar6k_device *pDev = (struct ar6k_device *)Context; @@ -78,7 +78,7 @@ static int DevGMboxCounterEnableDisable(struct ar6k_device *pDev, GMBOX_IRQ_ACTI { int status = 0; struct ar6k_irq_enable_registers regs; - HTC_PACKET *pIOPacket = NULL; + struct htc_packet *pIOPacket = NULL; LOCK_AR6K(pDev); @@ -158,7 +158,7 @@ static int DevGMboxCounterEnableDisable(struct ar6k_device *pDev, GMBOX_IRQ_ACTI int DevGMboxIRQAction(struct ar6k_device *pDev, GMBOX_IRQ_ACTION_TYPE IrqAction, bool AsyncMode) { int status = 0; - HTC_PACKET *pIOPacket = NULL; + struct htc_packet *pIOPacket = NULL; u8 GMboxIntControl[4]; if (GMBOX_CREDIT_IRQ_ENABLE == IrqAction) { @@ -396,7 +396,7 @@ int DevCheckGMboxInterrupts(struct ar6k_device *pDev) } -int DevGMboxWrite(struct ar6k_device *pDev, HTC_PACKET *pPacket, u32 WriteLength) +int DevGMboxWrite(struct ar6k_device *pDev, struct htc_packet *pPacket, u32 WriteLength) { u32 paddedLength; bool sync = (pPacket->Completion == NULL) ? true : false; @@ -433,7 +433,7 @@ int DevGMboxWrite(struct ar6k_device *pDev, HTC_PACKET *pPacket, u32 WriteLength return status; } -int DevGMboxRead(struct ar6k_device *pDev, HTC_PACKET *pPacket, u32 ReadLength) +int DevGMboxRead(struct ar6k_device *pDev, struct htc_packet *pPacket, u32 ReadLength) { u32 paddedLength; @@ -516,7 +516,7 @@ static int ProcessCreditCounterReadBuffer(u8 *pBuffer, int Length) /* callback when our fetch to enable/disable completes */ -static void DevGMboxReadCreditsAsyncHandler(void *Context, HTC_PACKET *pPacket) +static void DevGMboxReadCreditsAsyncHandler(void *Context, struct htc_packet *pPacket) { struct ar6k_device *pDev = (struct ar6k_device *)Context; @@ -542,7 +542,7 @@ static void DevGMboxReadCreditsAsyncHandler(void *Context, HTC_PACKET *pPacket) int DevGMboxReadCreditCounter(struct ar6k_device *pDev, bool AsyncMode, int *pCredits) { int status = 0; - HTC_PACKET *pIOPacket = NULL; + struct htc_packet *pIOPacket = NULL; AR_DEBUG_PRINTF(ATH_DEBUG_SEND,("+DevGMboxReadCreditCounter (%s) \n", AsyncMode ? "ASYNC" : "SYNC")); diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c b/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c index 8e5abe8..90e303f 100644 --- a/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c +++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c @@ -99,7 +99,7 @@ do { \ (p)->HCIConfig.pHCISendComplete((p)->HCIConfig.pContext, (pt)); \ } -static int HCITrySend(struct gmbox_proto_hci_uart *pProt, HTC_PACKET *pPacket, bool Synchronous); +static int HCITrySend(struct gmbox_proto_hci_uart *pProt, struct htc_packet *pPacket, bool Synchronous); static void HCIUartCleanup(struct gmbox_proto_hci_uart *pProtocol) { @@ -312,7 +312,7 @@ static int HCIUartMessagePending(void *pContext, u8 LookAheadBytes[], int ValidB HCI_TRANSPORT_PACKET_TYPE pktType = HCI_PACKET_INVALID; bool recvRefillCalled = false; bool blockRecv = false; - HTC_PACKET *pPacket = NULL; + struct htc_packet *pPacket = NULL; /** caller guarantees that this is a fully block-able context (synch I/O is allowed) */ @@ -532,7 +532,7 @@ static int HCIUartMessagePending(void *pContext, u8 LookAheadBytes[], int ValidB return status; } -static void HCISendPacketCompletion(void *Context, HTC_PACKET *pPacket) +static void HCISendPacketCompletion(void *Context, struct htc_packet *pPacket) { struct gmbox_proto_hci_uart *pProt = (struct gmbox_proto_hci_uart *)Context; AR_DEBUG_PRINTF(ATH_DEBUG_SEND,("+HCISendPacketCompletion (pPacket:0x%lX) \n",(unsigned long)pPacket)); @@ -579,7 +579,7 @@ static int SeekCreditsSynch(struct gmbox_proto_hci_uart *pProt) return status; } -static int HCITrySend(struct gmbox_proto_hci_uart *pProt, HTC_PACKET *pPacket, bool Synchronous) +static int HCITrySend(struct gmbox_proto_hci_uart *pProt, struct htc_packet *pPacket, bool Synchronous) { int status = 0; int transferLength; @@ -796,7 +796,7 @@ static int HCITrySend(struct gmbox_proto_hci_uart *pProt, HTC_PACKET *pPacket, b static void FlushSendQueue(struct gmbox_proto_hci_uart *pProt) { - HTC_PACKET *pPacket; + struct htc_packet *pPacket; HTC_PACKET_QUEUE discardQueue; INIT_HTC_PACKET_QUEUE(&discardQueue); @@ -821,7 +821,7 @@ static void FlushSendQueue(struct gmbox_proto_hci_uart *pProt) static void FlushRecvBuffers(struct gmbox_proto_hci_uart *pProt) { HTC_PACKET_QUEUE discardQueue; - HTC_PACKET *pPacket; + struct htc_packet *pPacket; INIT_HTC_PACKET_QUEUE(&discardQueue); @@ -1006,7 +1006,7 @@ int HCI_TransportAddReceivePkts(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET_QUEUE struct gmbox_proto_hci_uart *pProt = (struct gmbox_proto_hci_uart *)HciTrans; int status = 0; bool unblockRecv = false; - HTC_PACKET *pPacket; + struct htc_packet *pPacket; AR_DEBUG_PRINTF(ATH_DEBUG_RECV,("+HCI_TransportAddReceivePkt \n")); @@ -1069,7 +1069,7 @@ int HCI_TransportAddReceivePkts(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET_QUEUE return 0; } -int HCI_TransportSendPkt(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET *pPacket, bool Synchronous) +int HCI_TransportSendPkt(HCI_TRANSPORT_HANDLE HciTrans, struct htc_packet *pPacket, bool Synchronous) { struct gmbox_proto_hci_uart *pProt = (struct gmbox_proto_hci_uart *)HciTrans; @@ -1159,7 +1159,7 @@ int HCI_TransportEnableDisableAsyncRecv(HCI_TRANSPORT_HANDLE HciTrans, bool Enab } int HCI_TransportRecvHCIEventSync(HCI_TRANSPORT_HANDLE HciTrans, - HTC_PACKET *pPacket, + struct htc_packet *pPacket, int MaxPollMS) { struct gmbox_proto_hci_uart *pProt = (struct gmbox_proto_hci_uart *)HciTrans; diff --git a/drivers/staging/ath6kl/htc2/htc.c b/drivers/staging/ath6kl/htc2/htc.c index 810fe7b..04ba80e 100644 --- a/drivers/staging/ath6kl/htc2/htc.c +++ b/drivers/staging/ath6kl/htc2/htc.c @@ -43,16 +43,16 @@ ATH_DEBUG_INSTANTIATE_MODULE_VAR(htc, static void HTCReportFailure(void *Context); static void ResetEndpointStates(HTC_TARGET *target); -void HTCFreeControlBuffer(HTC_TARGET *target, HTC_PACKET *pPacket, HTC_PACKET_QUEUE *pList) +void HTCFreeControlBuffer(HTC_TARGET *target, struct htc_packet *pPacket, HTC_PACKET_QUEUE *pList) { LOCK_HTC(target); HTC_PACKET_ENQUEUE(pList,pPacket); UNLOCK_HTC(target); } -HTC_PACKET *HTCAllocControlBuffer(HTC_TARGET *target, HTC_PACKET_QUEUE *pList) +struct htc_packet *HTCAllocControlBuffer(HTC_TARGET *target, HTC_PACKET_QUEUE *pList) { - HTC_PACKET *pPacket; + struct htc_packet *pPacket; LOCK_HTC(target); pPacket = HTC_PACKET_DEQUEUE(pList); @@ -171,7 +171,7 @@ HTC_HANDLE HTCCreate(void *hif_handle, struct htc_init_info *pInfo) /* carve up buffers/packets for control messages */ for (i = 0; i < NUM_CONTROL_RX_BUFFERS; i++) { - HTC_PACKET *pControlPacket; + struct htc_packet *pControlPacket; pControlPacket = &target->HTCControlBuffers[i].HtcPacket; SET_HTC_PACKET_INFO_RX_REFILL(pControlPacket, target, @@ -182,7 +182,7 @@ HTC_HANDLE HTCCreate(void *hif_handle, struct htc_init_info *pInfo) } for (;i < NUM_CONTROL_BUFFERS;i++) { - HTC_PACKET *pControlPacket; + struct htc_packet *pControlPacket; pControlPacket = &target->HTCControlBuffers[i].HtcPacket; INIT_HTC_PACKET_INFO(pControlPacket, target->HTCControlBuffers[i].Buffer, @@ -226,7 +226,7 @@ int HTCWaitTarget(HTC_HANDLE HTCHandle) { HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); int status; - HTC_PACKET *pPacket = NULL; + struct htc_packet *pPacket = NULL; HTC_READY_EX_MSG *pRdyMsg; HTC_SERVICE_CONNECT_REQ connect; @@ -372,7 +372,7 @@ int HTCWaitTarget(HTC_HANDLE HTCHandle) int HTCStart(HTC_HANDLE HTCHandle) { HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); - HTC_PACKET *pPacket; + struct htc_packet *pPacket; int status; AR_DEBUG_PRINTF(ATH_DEBUG_TRC, ("HTCStart Enter\n")); diff --git a/drivers/staging/ath6kl/htc2/htc_internal.h b/drivers/staging/ath6kl/htc2/htc_internal.h index c5727ca..5f85350 100644 --- a/drivers/staging/ath6kl/htc2/htc_internal.h +++ b/drivers/staging/ath6kl/htc2/htc_internal.h @@ -100,7 +100,7 @@ struct htc_endpoint { #define NUM_CONTROL_RX_BUFFERS (NUM_CONTROL_BUFFERS - NUM_CONTROL_TX_BUFFERS) struct htc_control_buffer { - HTC_PACKET HtcPacket; + struct htc_packet HtcPacket; u8 *Buffer; }; @@ -162,13 +162,13 @@ typedef struct _HTC_TARGET { } /* internal HTC functions */ -void HTCControlTxComplete(void *Context, HTC_PACKET *pPacket); -void HTCControlRecv(void *Context, HTC_PACKET *pPacket); -int HTCWaitforControlMessage(HTC_TARGET *target, HTC_PACKET **ppControlPacket); -HTC_PACKET *HTCAllocControlBuffer(HTC_TARGET *target, HTC_PACKET_QUEUE *pList); -void HTCFreeControlBuffer(HTC_TARGET *target, HTC_PACKET *pPacket, HTC_PACKET_QUEUE *pList); -int HTCIssueSend(HTC_TARGET *target, HTC_PACKET *pPacket); -void HTCRecvCompleteHandler(void *Context, HTC_PACKET *pPacket); +void HTCControlTxComplete(void *Context, struct htc_packet *pPacket); +void HTCControlRecv(void *Context, struct htc_packet *pPacket); +int HTCWaitforControlMessage(HTC_TARGET *target, struct htc_packet **ppControlPacket); +struct htc_packet *HTCAllocControlBuffer(HTC_TARGET *target, HTC_PACKET_QUEUE *pList); +void HTCFreeControlBuffer(HTC_TARGET *target, struct htc_packet *pPacket, HTC_PACKET_QUEUE *pList); +int HTCIssueSend(HTC_TARGET *target, struct htc_packet *pPacket); +void HTCRecvCompleteHandler(void *Context, struct htc_packet *pPacket); int HTCRecvMessagePendingHandler(void *Context, u32 MsgLookAheads[], int NumLookAheads, bool *pAsyncProc, int *pNumPktsFetched); void HTCProcessCreditRpt(HTC_TARGET *target, HTC_CREDIT_REPORT *pRpt, int NumEntries, HTC_ENDPOINT_ID FromEndpoint); int HTCSendSetupComplete(HTC_TARGET *target); @@ -181,8 +181,8 @@ void DumpCreditDistStates(HTC_TARGET *target); void DebugDumpBytes(u8 *buffer, u16 length, char *pDescription); #endif -static INLINE HTC_PACKET *HTC_ALLOC_CONTROL_TX(HTC_TARGET *target) { - HTC_PACKET *pPacket = HTCAllocControlBuffer(target,&target->ControlBufferTXFreeList); +static INLINE struct htc_packet *HTC_ALLOC_CONTROL_TX(HTC_TARGET *target) { + struct htc_packet *pPacket = HTCAllocControlBuffer(target,&target->ControlBufferTXFreeList); if (pPacket != NULL) { /* set payload pointer area with some headroom */ pPacket->pBuffer = pPacket->pBufferStart + HTC_HDR_LENGTH; diff --git a/drivers/staging/ath6kl/htc2/htc_recv.c b/drivers/staging/ath6kl/htc2/htc_recv.c index 771dc5e..f702963 100644 --- a/drivers/staging/ath6kl/htc2/htc_recv.c +++ b/drivers/staging/ath6kl/htc2/htc_recv.c @@ -69,7 +69,7 @@ static void DoRecvCompletion(struct htc_endpoint *pEndpoint, pQueueToIndicate); INIT_HTC_PACKET_QUEUE(pQueueToIndicate); } else { - HTC_PACKET *pPacket; + struct htc_packet *pPacket; /* using legacy EpRecv */ do { pPacket = HTC_PACKET_DEQUEUE(pQueueToIndicate); @@ -227,7 +227,7 @@ static INLINE int HTCProcessTrailer(HTC_TARGET *target, /* process a received message (i.e. strip off header, process any trailer data) * note : locks must be released when this function is called */ static int HTCProcessRecvHeader(HTC_TARGET *target, - HTC_PACKET *pPacket, + struct htc_packet *pPacket, u32 *pNextLookAheads, int *pNumLookAheads) { @@ -498,7 +498,7 @@ static INLINE void DrainRecvIndicationQueue(HTC_TARGET *target, struct htc_endpo /* note: this function can be called with the RX lock held */ static INLINE void SetRxPacketIndicationFlags(u32 LookAhead, struct htc_endpoint *pEndpoint, - HTC_PACKET *pPacket) + struct htc_packet *pPacket) { struct htc_frame_hdr *pHdr = (struct htc_frame_hdr *)&LookAhead; /* check to see if the "next" packet is from the same endpoint of the @@ -515,7 +515,7 @@ static INLINE void SetRxPacketIndicationFlags(u32 LookAhead, /* asynchronous completion handler for recv packet fetching, when the device layer * completes a read request, it will call this completion handler */ -void HTCRecvCompleteHandler(void *Context, HTC_PACKET *pPacket) +void HTCRecvCompleteHandler(void *Context, struct htc_packet *pPacket) { HTC_TARGET *target = (HTC_TARGET *)Context; struct htc_endpoint *pEndpoint; @@ -587,11 +587,11 @@ void HTCRecvCompleteHandler(void *Context, HTC_PACKET *pPacket) /* synchronously wait for a control message from the target, * This function is used at initialization time ONLY. At init messages * on ENDPOINT 0 are expected. */ -int HTCWaitforControlMessage(HTC_TARGET *target, HTC_PACKET **ppControlPacket) +int HTCWaitforControlMessage(HTC_TARGET *target, struct htc_packet **ppControlPacket) { int status; u32 lookAhead; - HTC_PACKET *pPacket = NULL; + struct htc_packet *pPacket = NULL; struct htc_frame_hdr *pHdr; AR_DEBUG_PRINTF(ATH_DEBUG_RECV,("+HTCWaitforControlMessage \n")); @@ -693,7 +693,7 @@ static int AllocAndPrepareRxPackets(HTC_TARGET *target, HTC_PACKET_QUEUE *pQueue) { int status = 0; - HTC_PACKET *pPacket; + struct htc_packet *pPacket; struct htc_frame_hdr *pHdr; int i,j; int numMessages; @@ -882,7 +882,7 @@ static int AllocAndPrepareRxPackets(HTC_TARGET *target, static void HTCAsyncRecvScatterCompletion(struct hif_scatter_req *pScatterReq) { int i; - HTC_PACKET *pPacket; + struct htc_packet *pPacket; struct htc_endpoint *pEndpoint; u32 lookAheads[HTC_HOST_MAX_MSG_PER_BUNDLE]; int numLookAheads = 0; @@ -909,7 +909,7 @@ static void HTCAsyncRecvScatterCompletion(struct hif_scatter_req *pScatterReq) INIT_HTC_PACKET_QUEUE(&localRecvQueue); - pPacket = (HTC_PACKET *)pScatterReq->ScatterList[0].pCallerContexts[0]; + pPacket = (struct htc_packet *)pScatterReq->ScatterList[0].pCallerContexts[0]; /* note: all packets in a scatter req are for the same endpoint ! */ pEndpoint = &target->EndPoint[pPacket->Endpoint]; @@ -917,7 +917,7 @@ static void HTCAsyncRecvScatterCompletion(struct hif_scatter_req *pScatterReq) /* **** NOTE: DO NOT HOLD ANY LOCKS here, HTCProcessRecvHeader can take the TX lock * as it processes credit reports */ for (i = 0; i < pScatterReq->ValidScatterEntries; i++) { - pPacket = (HTC_PACKET *)pScatterReq->ScatterList[i].pCallerContexts[0]; + pPacket = (struct htc_packet *)pScatterReq->ScatterList[i].pCallerContexts[0]; A_ASSERT(pPacket != NULL); /* reset count, we are only interested in the look ahead in the last packet when we * break out of this loop */ @@ -994,7 +994,7 @@ static int HTCIssueRecvPacketBundle(HTC_TARGET *target, struct hif_scatter_req *pScatterReq; int i, totalLength; int pktsToScatter; - HTC_PACKET *pPacket; + struct htc_packet *pPacket; bool asyncMode = (pSyncCompletionQueue == NULL) ? true : false; int scatterSpaceRemaining = DEV_GET_MAX_BUNDLE_RECV_LENGTH(&target->Device); @@ -1121,7 +1121,7 @@ int HTCRecvMessagePendingHandler(void *Context, u32 MsgLookAheads[], int NumLook { HTC_TARGET *target = (HTC_TARGET *)Context; int status = 0; - HTC_PACKET *pPacket; + struct htc_packet *pPacket; struct htc_endpoint *pEndpoint; bool asyncProc = false; u32 lookAheads[HTC_HOST_MAX_MSG_PER_BUNDLE]; @@ -1391,7 +1391,7 @@ int HTCAddReceivePktMultiple(HTC_HANDLE HTCHandle, HTC_PACKET_QUEUE *pPktQueue) struct htc_endpoint *pEndpoint; bool unblockRecv = false; int status = 0; - HTC_PACKET *pFirstPacket; + struct htc_packet *pFirstPacket; pFirstPacket = HTC_GET_PKT_AT_HEAD(pPktQueue); @@ -1415,7 +1415,7 @@ int HTCAddReceivePktMultiple(HTC_HANDLE HTCHandle, HTC_PACKET_QUEUE *pPktQueue) LOCK_HTC_RX(target); if (HTC_STOPPING(target)) { - HTC_PACKET *pPacket; + struct htc_packet *pPacket; UNLOCK_HTC_RX(target); @@ -1455,7 +1455,7 @@ int HTCAddReceivePktMultiple(HTC_HANDLE HTCHandle, HTC_PACKET_QUEUE *pPktQueue) } /* Makes a buffer available to the HTC module */ -int HTCAddReceivePkt(HTC_HANDLE HTCHandle, HTC_PACKET *pPacket) +int HTCAddReceivePkt(HTC_HANDLE HTCHandle, struct htc_packet *pPacket) { HTC_PACKET_QUEUE queue; INIT_HTC_PACKET_QUEUE_AND_ADD(&queue,pPacket); @@ -1488,7 +1488,7 @@ void HTCUnblockRecv(HTC_HANDLE HTCHandle) static void HTCFlushRxQueue(HTC_TARGET *target, struct htc_endpoint *pEndpoint, HTC_PACKET_QUEUE *pQueue) { - HTC_PACKET *pPacket; + struct htc_packet *pPacket; HTC_PACKET_QUEUE container; LOCK_HTC_RX(target); diff --git a/drivers/staging/ath6kl/htc2/htc_send.c b/drivers/staging/ath6kl/htc2/htc_send.c index b313573..8fb05d9 100644 --- a/drivers/staging/ath6kl/htc2/htc_send.c +++ b/drivers/staging/ath6kl/htc2/htc_send.c @@ -62,7 +62,7 @@ static void DoSendCompletion(struct htc_endpoint *pEndpoint, /* all packets are now owned by the callback, reset queue to be safe */ INIT_HTC_PACKET_QUEUE(pQueueToIndicate); } else { - HTC_PACKET *pPacket; + struct htc_packet *pPacket; /* using legacy EpTxComplete */ do { pPacket = HTC_PACKET_DEQUEUE(pQueueToIndicate); @@ -77,7 +77,7 @@ static void DoSendCompletion(struct htc_endpoint *pEndpoint, } /* do final completion on sent packet */ -static INLINE void CompleteSentPacket(HTC_TARGET *target, struct htc_endpoint *pEndpoint, HTC_PACKET *pPacket) +static INLINE void CompleteSentPacket(HTC_TARGET *target, struct htc_endpoint *pEndpoint, struct htc_packet *pPacket) { pPacket->Completion = NULL; @@ -101,7 +101,7 @@ static INLINE void CompleteSentPacket(HTC_TARGET *target, struct htc_endpoint *p /* our internal send packet completion handler when packets are submited to the AR6K device * layer */ -static void HTCSendPktCompletionHandler(void *Context, HTC_PACKET *pPacket) +static void HTCSendPktCompletionHandler(void *Context, struct htc_packet *pPacket) { HTC_TARGET *target = (HTC_TARGET *)Context; struct htc_endpoint *pEndpoint = &target->EndPoint[pPacket->Endpoint]; @@ -113,7 +113,7 @@ static void HTCSendPktCompletionHandler(void *Context, HTC_PACKET *pPacket) DO_EP_TX_COMPLETION(pEndpoint,&container); } -int HTCIssueSend(HTC_TARGET *target, HTC_PACKET *pPacket) +int HTCIssueSend(HTC_TARGET *target, struct htc_packet *pPacket) { int status; bool sync = false; @@ -153,7 +153,7 @@ static INLINE void GetHTCSendPackets(HTC_TARGET *target, int creditsRequired; int remainder; u8 sendFlags; - HTC_PACKET *pPacket; + struct htc_packet *pPacket; unsigned int transferLength; /****** NOTE : the TX lock is held when this function is called *****************/ @@ -267,7 +267,7 @@ static INLINE void GetHTCSendPackets(HTC_TARGET *target, static void HTCAsyncSendScatterCompletion(struct hif_scatter_req *pScatterReq) { int i; - HTC_PACKET *pPacket; + struct htc_packet *pPacket; struct htc_endpoint *pEndpoint = (struct htc_endpoint *)pScatterReq->Context; HTC_TARGET *target = (HTC_TARGET *)pEndpoint->target; int status = 0; @@ -287,7 +287,7 @@ static void HTCAsyncSendScatterCompletion(struct hif_scatter_req *pScatterReq) /* walk through the scatter list and process */ for (i = 0; i < pScatterReq->ValidScatterEntries; i++) { - pPacket = (HTC_PACKET *)(pScatterReq->ScatterList[i].pCallerContexts[0]); + pPacket = (struct htc_packet *)(pScatterReq->ScatterList[i].pCallerContexts[0]); A_ASSERT(pPacket != NULL); pPacket->Status = status; CompleteSentPacket(target,pEndpoint,pPacket); @@ -319,7 +319,7 @@ static void HTCIssueSendBundle(struct htc_endpoint *pEndpoint, struct hif_scatter_req *pScatterReq = NULL; int i, packetsInScatterReq; unsigned int transferLength; - HTC_PACKET *pPacket; + struct htc_packet *pPacket; bool done = false; int bundlesSent = 0; int totalPktsInBundle = 0; @@ -450,7 +450,7 @@ static void HTCIssueSendBundle(struct htc_endpoint *pEndpoint, if (packetsInScatterReq > 0) { /* work backwards to requeue requests */ for (i = (packetsInScatterReq - 1); i >= 0; i--) { - pPacket = (HTC_PACKET *)(pScatterReq->ScatterList[i].pCallerContexts[0]); + pPacket = (struct htc_packet *)(pScatterReq->ScatterList[i].pCallerContexts[0]); if (pPacket != NULL) { /* undo any prep */ HTC_UNPREPARE_SEND_PKT(pPacket); @@ -482,7 +482,7 @@ static HTC_SEND_QUEUE_RESULT HTCTrySend(HTC_TARGET *target, HTC_PACKET_QUEUE *pCallersSendQueue) { HTC_PACKET_QUEUE sendQueue; /* temp queue to hold packets at various stages */ - HTC_PACKET *pPacket; + struct htc_packet *pPacket; int bundlesSent; int pktsInBundles; int overflow; @@ -546,7 +546,7 @@ static HTC_SEND_QUEUE_RESULT HTCTrySend(HTC_TARGET *target, /* the caller's queue has all the packets that won't fit*/ /* walk through the caller's queue and indicate each one to the send full handler */ - ITERATE_OVER_LIST_ALLOW_REMOVE(&pCallersSendQueue->QueueHead, pPacket, HTC_PACKET, ListLink) { + ITERATE_OVER_LIST_ALLOW_REMOVE(&pCallersSendQueue->QueueHead, pPacket, struct htc_packet, ListLink) { AR_DEBUG_PRINTF(ATH_DEBUG_SEND, (" Indicating overflowed TX packet: 0x%lX \n", (unsigned long)pPacket)); @@ -672,7 +672,7 @@ int HTCSendPktsMultiple(HTC_HANDLE HTCHandle, HTC_PACKET_QUEUE *pPktQueue) { HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); struct htc_endpoint *pEndpoint; - HTC_PACKET *pPacket; + struct htc_packet *pPacket; AR_DEBUG_PRINTF(ATH_DEBUG_SEND, ("+HTCSendPktsMultiple: Queue: 0x%lX, Pkts %d \n", (unsigned long)pPktQueue, HTC_PACKET_QUEUE_DEPTH(pPktQueue))); @@ -709,7 +709,7 @@ int HTCSendPktsMultiple(HTC_HANDLE HTCHandle, HTC_PACKET_QUEUE *pPktQueue) } /* HTC API - HTCSendPkt */ -int HTCSendPkt(HTC_HANDLE HTCHandle, HTC_PACKET *pPacket) +int HTCSendPkt(HTC_HANDLE HTCHandle, struct htc_packet *pPacket) { HTC_PACKET_QUEUE queue; @@ -840,7 +840,7 @@ void HTCProcessCreditRpt(HTC_TARGET *target, HTC_CREDIT_REPORT *pRpt, int NumEnt /* flush endpoint TX queue */ static void HTCFlushEndpointTX(HTC_TARGET *target, struct htc_endpoint *pEndpoint, HTC_TX_TAG Tag) { - HTC_PACKET *pPacket; + struct htc_packet *pPacket; HTC_PACKET_QUEUE discardQueue; HTC_PACKET_QUEUE container; @@ -850,7 +850,7 @@ static void HTCFlushEndpointTX(HTC_TARGET *target, struct htc_endpoint *pEndpoin LOCK_HTC_TX(target); /* interate from the front of the TX queue and flush out packets */ - ITERATE_OVER_LIST_ALLOW_REMOVE(&pEndpoint->TxQueue.QueueHead, pPacket, HTC_PACKET, ListLink) { + ITERATE_OVER_LIST_ALLOW_REMOVE(&pEndpoint->TxQueue.QueueHead, pPacket, struct htc_packet, ListLink) { /* check for removal */ if ((HTC_TX_PACKET_TAG_ALL == Tag) || (Tag == pPacket->PktInfo.AsTx.Tag)) { diff --git a/drivers/staging/ath6kl/htc2/htc_services.c b/drivers/staging/ath6kl/htc2/htc_services.c index 34bba7e..cb0731f 100644 --- a/drivers/staging/ath6kl/htc2/htc_services.c +++ b/drivers/staging/ath6kl/htc2/htc_services.c @@ -22,7 +22,7 @@ //============================================================================== #include "htc_internal.h" -void HTCControlTxComplete(void *Context, HTC_PACKET *pPacket) +void HTCControlTxComplete(void *Context, struct htc_packet *pPacket) { /* not implemented * we do not send control TX frames during normal runtime, only during setup */ @@ -30,7 +30,7 @@ void HTCControlTxComplete(void *Context, HTC_PACKET *pPacket) } /* callback when a control message arrives on this endpoint */ -void HTCControlRecv(void *Context, HTC_PACKET *pPacket) +void HTCControlRecv(void *Context, struct htc_packet *pPacket) { AR_DEBUG_ASSERT(pPacket->Endpoint == ENDPOINT_0); @@ -59,7 +59,7 @@ void HTCControlRecv(void *Context, HTC_PACKET *pPacket) int HTCSendSetupComplete(HTC_TARGET *target) { - HTC_PACKET *pSendPacket = NULL; + struct htc_packet *pSendPacket = NULL; int status; do { @@ -127,8 +127,8 @@ int HTCConnectService(HTC_HANDLE HTCHandle, { HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); int status = 0; - HTC_PACKET *pRecvPacket = NULL; - HTC_PACKET *pSendPacket = NULL; + struct htc_packet *pRecvPacket = NULL; + struct htc_packet *pSendPacket = NULL; HTC_CONNECT_SERVICE_RESPONSE_MSG *pResponseMsg; HTC_CONNECT_SERVICE_MSG *pConnectMsg; HTC_ENDPOINT_ID assignedEndpoint = ENDPOINT_MAX; diff --git a/drivers/staging/ath6kl/include/hci_transport_api.h b/drivers/staging/ath6kl/include/hci_transport_api.h index ee25c6b..3eac192 100644 --- a/drivers/staging/ath6kl/include/hci_transport_api.h +++ b/drivers/staging/ath6kl/include/hci_transport_api.h @@ -43,9 +43,9 @@ typedef HTC_ENDPOINT_ID HCI_TRANSPORT_PACKET_TYPE; #define HCI_SET_PACKET_TYPE(pP,s) (pP)->Endpoint = (s) /* callback when an HCI packet was completely sent */ -typedef void (*HCI_TRANSPORT_SEND_PKT_COMPLETE)(void *, HTC_PACKET *); +typedef void (*HCI_TRANSPORT_SEND_PKT_COMPLETE)(void *, struct htc_packet *); /* callback when an HCI packet is received */ -typedef void (*HCI_TRANSPORT_RECV_PKT)(void *, HTC_PACKET *); +typedef void (*HCI_TRANSPORT_RECV_PKT)(void *, struct htc_packet *); /* Optional receive buffer re-fill callback, * On some OSes (like Linux) packets are allocated from a global pool and indicated up * to the network stack. The driver never gets the packets back from the OS. For these OSes @@ -68,7 +68,7 @@ typedef void (*HCI_TRANSPORT_RECV_REFILL)(void *, HCI_TRANSPORT_PACKET_TYPE Ty * NOTE*** This callback is mutually exclusive with the the refill callback above. * * */ -typedef HTC_PACKET *(*HCI_TRANSPORT_RECV_ALLOC)(void *, HCI_TRANSPORT_PACKET_TYPE Type, int Length); +typedef struct htc_packet *(*HCI_TRANSPORT_RECV_ALLOC)(void *, HCI_TRANSPORT_PACKET_TYPE Type, int Length); typedef enum _HCI_SEND_FULL_ACTION { HCI_SEND_FULL_KEEP = 0, /* packet that overflowed should be kept in the queue */ @@ -77,7 +77,7 @@ typedef enum _HCI_SEND_FULL_ACTION { /* callback when an HCI send queue exceeds the caller's MaxSendQueueDepth threshold, * the callback must return the send full action to take (either DROP or KEEP) */ -typedef HCI_SEND_FULL_ACTION (*HCI_TRANSPORT_SEND_FULL)(void *, HTC_PACKET *); +typedef HCI_SEND_FULL_ACTION (*HCI_TRANSPORT_SEND_FULL)(void *, struct htc_packet *); struct hci_transport_properties { int HeadRoom; /* number of bytes in front of HCI packet for header space */ @@ -166,7 +166,7 @@ int HCI_TransportAddReceivePkts(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET_QUE @example: @see also: +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ -int HCI_TransportSendPkt(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET *pPacket, bool Synchronous); +int HCI_TransportSendPkt(HCI_TRANSPORT_HANDLE HciTrans, struct htc_packet *pPacket, bool Synchronous); /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @@ -223,7 +223,7 @@ int HCI_TransportEnableDisableAsyncRecv(HCI_TRANSPORT_HANDLE HciTrans, bool E @see also: HCI_TransportEnableDisableAsyncRecv +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ int HCI_TransportRecvHCIEventSync(HCI_TRANSPORT_HANDLE HciTrans, - HTC_PACKET *pPacket, + struct htc_packet *pPacket, int MaxPollMS); /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ diff --git a/drivers/staging/ath6kl/include/htc_api.h b/drivers/staging/ath6kl/include/htc_api.h index 5878417..ca85bad 100644 --- a/drivers/staging/ath6kl/include/htc_api.h +++ b/drivers/staging/ath6kl/include/htc_api.h @@ -49,7 +49,7 @@ struct htc_init_info { }; /* per service connection send completion */ -typedef void (*HTC_EP_SEND_PKT_COMPLETE)(void *,HTC_PACKET *); +typedef void (*HTC_EP_SEND_PKT_COMPLETE)(void *,struct htc_packet *); /* per service connection callback when a plurality of packets have been sent * The HTC_PACKET_QUEUE is a temporary queue object (e.g. freed on return from the callback) * to hold a list of completed send packets. @@ -58,7 +58,7 @@ typedef void (*HTC_EP_SEND_PKT_COMPLETE)(void *,HTC_PACKET *); * HTC_PACKET_ENQUEUE() */ typedef void (*HTC_EP_SEND_PKT_COMP_MULTIPLE)(void *,HTC_PACKET_QUEUE *); /* per service connection pkt received */ -typedef void (*HTC_EP_RECV_PKT)(void *,HTC_PACKET *); +typedef void (*HTC_EP_RECV_PKT)(void *,struct htc_packet *); /* per service connection callback when a plurality of packets are received * The HTC_PACKET_QUEUE is a temporary queue object (e.g. freed on return from the callback) * to hold a list of recv packets. @@ -94,7 +94,7 @@ typedef void (*HTC_EP_RECV_REFILL)(void *, HTC_ENDPOINT_ID Endpoint); * amount of "committed" memory used to receive packets. * * */ -typedef HTC_PACKET *(*HTC_EP_RECV_ALLOC)(void *, HTC_ENDPOINT_ID Endpoint, int Length); +typedef struct htc_packet *(*HTC_EP_RECV_ALLOC)(void *, HTC_ENDPOINT_ID Endpoint, int Length); typedef enum _HTC_SEND_FULL_ACTION { HTC_SEND_FULL_KEEP = 0, /* packet that overflowed should be kept in the queue */ @@ -114,7 +114,7 @@ typedef enum _HTC_SEND_FULL_ACTION { * closed loop mechanism will prevent the network stack from overunning the NIC * The packet to keep or drop is passed for inspection to the registered handler the handler * must ONLY inspect the packet, it may not free or reclaim the packet. */ -typedef HTC_SEND_FULL_ACTION (*HTC_EP_SEND_QUEUE_FULL)(void *, HTC_PACKET *pPacket); +typedef HTC_SEND_FULL_ACTION (*HTC_EP_SEND_QUEUE_FULL)(void *, struct htc_packet *pPacket); struct htc_ep_callbacks { void *pContext; /* context for each callback */ @@ -348,7 +348,7 @@ int HTCStart(HTC_HANDLE HTCHandle); @example: @see also: +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ -int HTCAddReceivePkt(HTC_HANDLE HTCHandle, HTC_PACKET *pPacket); +int HTCAddReceivePkt(HTC_HANDLE HTCHandle, struct htc_packet *pPacket); /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @desc: Connect to an HTC service @function name: HTCConnectService @@ -377,7 +377,7 @@ int HTCConnectService(HTC_HANDLE HTCHandle, @example: @see also: HTCFlushEndpoint +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ -int HTCSendPkt(HTC_HANDLE HTCHandle, HTC_PACKET *pPacket); +int HTCSendPkt(HTC_HANDLE HTCHandle, struct htc_packet *pPacket); /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @desc: Stop HTC service communications @function name: HTCStop diff --git a/drivers/staging/ath6kl/include/htc_packet.h b/drivers/staging/ath6kl/include/htc_packet.h index 9282e90..4311c93 100644 --- a/drivers/staging/ath6kl/include/htc_packet.h +++ b/drivers/staging/ath6kl/include/htc_packet.h @@ -42,9 +42,9 @@ typedef enum ENDPOINT_MAX, } HTC_ENDPOINT_ID; -struct _HTC_PACKET; +struct htc_packet; -typedef void (* HTC_PACKET_COMPLETION)(void *,struct _HTC_PACKET *); +typedef void (* HTC_PACKET_COMPLETION)(void *,struct htc_packet *); typedef u16 HTC_TX_TAG; @@ -68,7 +68,7 @@ typedef struct _HTC_RX_PACKET_INFO { #define HTC_RX_FLAGS_INDICATE_MORE_PKTS (1 << 0) /* more packets on this endpoint are being fetched */ /* wrapper around endpoint-specific packets */ -typedef struct _HTC_PACKET { +struct htc_packet { struct dl_list ListLink; /* double link */ void *pPktContext; /* caller's per packet specific context */ @@ -98,7 +98,7 @@ typedef struct _HTC_PACKET { /* the following fields are for internal HTC use */ HTC_PACKET_COMPLETION Completion; /* completion */ void *pContext; /* HTC private completion context */ -} HTC_PACKET; +}; @@ -165,11 +165,11 @@ typedef struct _HTC_PACKET_QUEUE { /* test if a queue is empty */ #define HTC_QUEUE_EMPTY(pQ) ((pQ)->Depth == 0) /* get packet at head without removing it */ -static INLINE HTC_PACKET *HTC_GET_PKT_AT_HEAD(HTC_PACKET_QUEUE *queue) { +static INLINE struct htc_packet *HTC_GET_PKT_AT_HEAD(HTC_PACKET_QUEUE *queue) { if (queue->Depth == 0) { return NULL; } - return A_CONTAINING_STRUCT((DL_LIST_GET_ITEM_AT_HEAD(&queue->QueueHead)),HTC_PACKET,ListLink); + return A_CONTAINING_STRUCT((DL_LIST_GET_ITEM_AT_HEAD(&queue->QueueHead)),struct htc_packet,ListLink); } /* remove a packet from a queue, where-ever it is in the queue */ #define HTC_PACKET_REMOVE(pQ,p) \ @@ -179,21 +179,21 @@ static INLINE HTC_PACKET *HTC_GET_PKT_AT_HEAD(HTC_PACKET_QUEUE *queue) { } /* dequeue an HTC packet from the head of the queue */ -static INLINE HTC_PACKET *HTC_PACKET_DEQUEUE(HTC_PACKET_QUEUE *queue) { +static INLINE struct htc_packet *HTC_PACKET_DEQUEUE(HTC_PACKET_QUEUE *queue) { struct dl_list *pItem = DL_ListRemoveItemFromHead(&queue->QueueHead); if (pItem != NULL) { queue->Depth--; - return A_CONTAINING_STRUCT(pItem, HTC_PACKET, ListLink); + return A_CONTAINING_STRUCT(pItem, struct htc_packet, ListLink); } return NULL; } /* dequeue an HTC packet from the tail of the queue */ -static INLINE HTC_PACKET *HTC_PACKET_DEQUEUE_TAIL(HTC_PACKET_QUEUE *queue) { +static INLINE struct htc_packet *HTC_PACKET_DEQUEUE_TAIL(HTC_PACKET_QUEUE *queue) { struct dl_list *pItem = DL_ListRemoveItemFromTail(&queue->QueueHead); if (pItem != NULL) { queue->Depth--; - return A_CONTAINING_STRUCT(pItem, HTC_PACKET, ListLink); + return A_CONTAINING_STRUCT(pItem, struct htc_packet, ListLink); } return NULL; } @@ -220,7 +220,7 @@ static INLINE HTC_PACKET *HTC_PACKET_DEQUEUE_TAIL(HTC_PACKET_QUEUE *queue) { } #define HTC_PACKET_QUEUE_ITERATE_ALLOW_REMOVE(pQ, pPTemp) \ - ITERATE_OVER_LIST_ALLOW_REMOVE(&(pQ)->QueueHead,(pPTemp), HTC_PACKET, ListLink) + ITERATE_OVER_LIST_ALLOW_REMOVE(&(pQ)->QueueHead,(pPTemp), struct htc_packet, ListLink) #define HTC_PACKET_QUEUE_ITERATE_END ITERATE_END diff --git a/drivers/staging/ath6kl/miscdrv/ar3kconfig.c b/drivers/staging/ath6kl/miscdrv/ar3kconfig.c index 3e9c95e..4f18f43 100644 --- a/drivers/staging/ath6kl/miscdrv/ar3kconfig.c +++ b/drivers/staging/ath6kl/miscdrv/ar3kconfig.c @@ -53,18 +53,18 @@ static int SendHCICommand(struct ar3k_config_info *pConfig, u8 *pBuffer, int Length) { - HTC_PACKET *pPacket = NULL; + struct htc_packet *pPacket = NULL; int status = 0; do { - pPacket = (HTC_PACKET *)A_MALLOC(sizeof(HTC_PACKET)); + pPacket = (struct htc_packet *)A_MALLOC(sizeof(struct htc_packet)); if (NULL == pPacket) { status = A_NO_MEMORY; break; } - A_MEMZERO(pPacket,sizeof(HTC_PACKET)); + A_MEMZERO(pPacket,sizeof(struct htc_packet)); SET_HTC_PACKET_INFO_TX(pPacket, NULL, pBuffer, @@ -89,18 +89,18 @@ static int RecvHCIEvent(struct ar3k_config_info *pConfig, int *pLength) { int status = 0; - HTC_PACKET *pRecvPacket = NULL; + struct htc_packet *pRecvPacket = NULL; do { - pRecvPacket = (HTC_PACKET *)A_MALLOC(sizeof(HTC_PACKET)); + pRecvPacket = (struct htc_packet *)A_MALLOC(sizeof(struct htc_packet)); if (NULL == pRecvPacket) { status = A_NO_MEMORY; AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Failed to alloc HTC struct \n")); break; } - A_MEMZERO(pRecvPacket,sizeof(HTC_PACKET)); + A_MEMZERO(pRecvPacket,sizeof(struct htc_packet)); SET_HTC_PACKET_INFO_RX_REFILL(pRecvPacket,NULL,pBuffer,*pLength,HCI_EVENT_TYPE); diff --git a/drivers/staging/ath6kl/os/linux/ar6000_drv.c b/drivers/staging/ath6kl/os/linux/ar6000_drv.c index ebfe1e8..ebfc7fd 100644 --- a/drivers/staging/ath6kl/os/linux/ar6000_drv.c +++ b/drivers/staging/ath6kl/os/linux/ar6000_drv.c @@ -313,13 +313,13 @@ int ar6000_configure_target(AR_SOFTC_T *ar); static void ar6000_target_failure(void *Instance, int Status); -static void ar6000_rx(void *Context, HTC_PACKET *pPacket); +static void ar6000_rx(void *Context, struct htc_packet *pPacket); static void ar6000_rx_refill(void *Context,HTC_ENDPOINT_ID Endpoint); static void ar6000_tx_complete(void *Context, HTC_PACKET_QUEUE *pPackets); -static HTC_SEND_FULL_ACTION ar6000_tx_queue_full(void *Context, HTC_PACKET *pPacket); +static HTC_SEND_FULL_ACTION ar6000_tx_queue_full(void *Context, struct htc_packet *pPacket); #ifdef ATH_AR6K_11N_SUPPORT static void ar6000_alloc_netbufs(A_NETBUF_QUEUE_T *q, u16 num); @@ -327,7 +327,7 @@ static void ar6000_alloc_netbufs(A_NETBUF_QUEUE_T *q, u16 num); static void ar6000_deliver_frames_to_nw_stack(void * dev, void *osbuf); //static void ar6000_deliver_frames_to_bt_stack(void * dev, void *osbuf); -static HTC_PACKET *ar6000_alloc_amsdu_rxbuf(void *Context, HTC_ENDPOINT_ID Endpoint, int Length); +static struct htc_packet *ar6000_alloc_amsdu_rxbuf(void *Context, HTC_ENDPOINT_ID Endpoint, int Length); static void ar6000_refill_amsdu_rxbufs(AR_SOFTC_T *ar, int Count); @@ -3376,7 +3376,7 @@ applyAPTCHeuristics(AR_SOFTC_T *ar) } #endif /* ADAPTIVE_POWER_THROUGHPUT_CONTROL */ -static HTC_SEND_FULL_ACTION ar6000_tx_queue_full(void *Context, HTC_PACKET *pPacket) +static HTC_SEND_FULL_ACTION ar6000_tx_queue_full(void *Context, struct htc_packet *pPacket) { AR_SOFTC_T *ar = (AR_SOFTC_T *)Context; HTC_SEND_FULL_ACTION action = HTC_SEND_FULL_KEEP; @@ -3470,7 +3470,7 @@ ar6000_tx_complete(void *Context, HTC_PACKET_QUEUE *pPacketQueue) HTC_ENDPOINT_ID eid; bool wakeEvent = false; struct sk_buff_head skb_queue; - HTC_PACKET *pPacket; + struct htc_packet *pPacket; struct sk_buff *pktSkb; bool flushing = false; @@ -3642,7 +3642,7 @@ sta_t *ieee80211_find_conn_for_aid(AR_SOFTC_T *ar, u8 aid) */ int pktcount; static void -ar6000_rx(void *Context, HTC_PACKET *pPacket) +ar6000_rx(void *Context, struct htc_packet *pPacket) { AR_SOFTC_T *ar = (AR_SOFTC_T *)Context; struct sk_buff *skb = (struct sk_buff *)pPacket->pPktContext; @@ -3991,7 +3991,7 @@ ar6000_rx_refill(void *Context, HTC_ENDPOINT_ID Endpoint) void *osBuf; int RxBuffers; int buffersToRefill; - HTC_PACKET *pPacket; + struct htc_packet *pPacket; HTC_PACKET_QUEUE queue; buffersToRefill = (int)AR6000_MAX_RX_BUFFERS - @@ -4014,7 +4014,7 @@ ar6000_rx_refill(void *Context, HTC_ENDPOINT_ID Endpoint) } /* the HTC packet wrapper is at the head of the reserved area * in the skb */ - pPacket = (HTC_PACKET *)(A_NETBUF_HEAD(osBuf)); + pPacket = (struct htc_packet *)(A_NETBUF_HEAD(osBuf)); /* set re-fill info */ SET_HTC_PACKET_INFO_RX_REFILL(pPacket,osBuf,A_NETBUF_DATA(osBuf),AR6000_BUFFER_SIZE,Endpoint); /* add to queue */ @@ -4031,7 +4031,7 @@ ar6000_rx_refill(void *Context, HTC_ENDPOINT_ID Endpoint) /* clean up our amsdu buffer list */ static void ar6000_cleanup_amsdu_rxbufs(AR_SOFTC_T *ar) { - HTC_PACKET *pPacket; + struct htc_packet *pPacket; void *osBuf; /* empty AMSDU buffer queue and free OS bufs */ @@ -4060,7 +4060,7 @@ static void ar6000_cleanup_amsdu_rxbufs(AR_SOFTC_T *ar) /* refill the amsdu buffer list */ static void ar6000_refill_amsdu_rxbufs(AR_SOFTC_T *ar, int Count) { - HTC_PACKET *pPacket; + struct htc_packet *pPacket; void *osBuf; while (Count > 0) { @@ -4070,7 +4070,7 @@ static void ar6000_refill_amsdu_rxbufs(AR_SOFTC_T *ar, int Count) } /* the HTC packet wrapper is at the head of the reserved area * in the skb */ - pPacket = (HTC_PACKET *)(A_NETBUF_HEAD(osBuf)); + pPacket = (struct htc_packet *)(A_NETBUF_HEAD(osBuf)); /* set re-fill info */ SET_HTC_PACKET_INFO_RX_REFILL(pPacket,osBuf,A_NETBUF_DATA(osBuf),AR6000_AMSDU_BUFFER_SIZE,0); @@ -4090,9 +4090,9 @@ static void ar6000_refill_amsdu_rxbufs(AR_SOFTC_T *ar, int Count) * keep the allocation size the same to optimize cached-slab allocations. * * */ -static HTC_PACKET *ar6000_alloc_amsdu_rxbuf(void *Context, HTC_ENDPOINT_ID Endpoint, int Length) +static struct htc_packet *ar6000_alloc_amsdu_rxbuf(void *Context, HTC_ENDPOINT_ID Endpoint, int Length) { - HTC_PACKET *pPacket = NULL; + struct htc_packet *pPacket = NULL; AR_SOFTC_T *ar = (AR_SOFTC_T *)Context; int refillCount = 0; diff --git a/drivers/staging/ath6kl/os/linux/ar6000_raw_if.c b/drivers/staging/ath6kl/os/linux/ar6000_raw_if.c index 8a197ff..f8637f6 100644 --- a/drivers/staging/ath6kl/os/linux/ar6000_raw_if.c +++ b/drivers/staging/ath6kl/os/linux/ar6000_raw_if.c @@ -26,7 +26,7 @@ #ifdef HTC_RAW_INTERFACE static void -ar6000_htc_raw_read_cb(void *Context, HTC_PACKET *pPacket) +ar6000_htc_raw_read_cb(void *Context, struct htc_packet *pPacket) { AR_SOFTC_T *ar = (AR_SOFTC_T *)Context; raw_htc_buffer *busy; @@ -70,7 +70,7 @@ ar6000_htc_raw_read_cb(void *Context, HTC_PACKET *pPacket) } static void -ar6000_htc_raw_write_cb(void *Context, HTC_PACKET *pPacket) +ar6000_htc_raw_write_cb(void *Context, struct htc_packet *pPacket) { AR_SOFTC_T *ar = (AR_SOFTC_T *)Context; raw_htc_buffer *free; diff --git a/drivers/staging/ath6kl/os/linux/export_hci_transport.c b/drivers/staging/ath6kl/os/linux/export_hci_transport.c index 79b30eb..319dc2e 100644 --- a/drivers/staging/ath6kl/os/linux/export_hci_transport.c +++ b/drivers/staging/ath6kl/os/linux/export_hci_transport.c @@ -39,12 +39,12 @@ HCI_TRANSPORT_HANDLE (*_HCI_TransportAttach)(void *HTCHandle, struct hci_transport_config_info *pInfo); void (*_HCI_TransportDetach)(HCI_TRANSPORT_HANDLE HciTrans); int (*_HCI_TransportAddReceivePkts)(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET_QUEUE *pQueue); -int (*_HCI_TransportSendPkt)(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET *pPacket, bool Synchronous); +int (*_HCI_TransportSendPkt)(HCI_TRANSPORT_HANDLE HciTrans, struct htc_packet *pPacket, bool Synchronous); void (*_HCI_TransportStop)(HCI_TRANSPORT_HANDLE HciTrans); int (*_HCI_TransportStart)(HCI_TRANSPORT_HANDLE HciTrans); int (*_HCI_TransportEnableDisableAsyncRecv)(HCI_TRANSPORT_HANDLE HciTrans, bool Enable); int (*_HCI_TransportRecvHCIEventSync)(HCI_TRANSPORT_HANDLE HciTrans, - HTC_PACKET *pPacket, + struct htc_packet *pPacket, int MaxPollMS); int (*_HCI_TransportSetBaudRate)(HCI_TRANSPORT_HANDLE HciTrans, u32 Baud); int (*_HCI_TransportEnablePowerMgmt)(HCI_TRANSPORT_HANDLE HciTrans, bool Enable); diff --git a/drivers/staging/ath6kl/os/linux/hci_bridge.c b/drivers/staging/ath6kl/os/linux/hci_bridge.c index 2fdf359..4192284 100644 --- a/drivers/staging/ath6kl/os/linux/hci_bridge.c +++ b/drivers/staging/ath6kl/os/linux/hci_bridge.c @@ -139,16 +139,16 @@ static inline void FreeBtOsBuf(struct ar6k_hci_bridge_info *pHcidevInfo, void *o } } -static void FreeHTCStruct(struct ar6k_hci_bridge_info *pHcidevInfo, HTC_PACKET *pPacket) +static void FreeHTCStruct(struct ar6k_hci_bridge_info *pHcidevInfo, struct htc_packet *pPacket) { LOCK_BRIDGE(pHcidevInfo); HTC_PACKET_ENQUEUE(&pHcidevInfo->HTCPacketStructHead,pPacket); UNLOCK_BRIDGE(pHcidevInfo); } -static HTC_PACKET * AllocHTCStruct(struct ar6k_hci_bridge_info *pHcidevInfo) +static struct htc_packet * AllocHTCStruct(struct ar6k_hci_bridge_info *pHcidevInfo) { - HTC_PACKET *pPacket = NULL; + struct htc_packet *pPacket = NULL; LOCK_BRIDGE(pHcidevInfo); pPacket = HTC_PACKET_DEQUEUE(&pHcidevInfo->HTCPacketStructHead); UNLOCK_BRIDGE(pHcidevInfo); @@ -164,7 +164,7 @@ static void RefillRecvBuffers(struct ar6k_hci_bridge_info *pHcidevInfo, int length, i; void *osBuf = NULL; HTC_PACKET_QUEUE queue; - HTC_PACKET *pPacket; + struct htc_packet *pPacket; INIT_HTC_PACKET_QUEUE(&queue); @@ -347,7 +347,7 @@ static void ar6000_hci_transport_removed(void *pContext) pHcidevInfo->pHCIDev = NULL; } -static void ar6000_hci_send_complete(void *pContext, HTC_PACKET *pPacket) +static void ar6000_hci_send_complete(void *pContext, struct htc_packet *pPacket) { struct ar6k_hci_bridge_info *pHcidevInfo = (struct ar6k_hci_bridge_info *)pContext; void *osbuf = pPacket->pPktContext; @@ -365,7 +365,7 @@ static void ar6000_hci_send_complete(void *pContext, HTC_PACKET *pPacket) } -static void ar6000_hci_pkt_recv(void *pContext, HTC_PACKET *pPacket) +static void ar6000_hci_pkt_recv(void *pContext, struct htc_packet *pPacket) { struct ar6k_hci_bridge_info *pHcidevInfo = (struct ar6k_hci_bridge_info *)pContext; struct sk_buff *skb; @@ -447,7 +447,7 @@ static void ar6000_hci_pkt_refill(void *pContext, HCI_TRANSPORT_PACKET_TYPE Typ } -static HCI_SEND_FULL_ACTION ar6000_hci_pkt_send_full(void *pContext, HTC_PACKET *pPacket) +static HCI_SEND_FULL_ACTION ar6000_hci_pkt_send_full(void *pContext, struct htc_packet *pPacket) { struct ar6k_hci_bridge_info *pHcidevInfo = (struct ar6k_hci_bridge_info *)pContext; HCI_SEND_FULL_ACTION action = HCI_SEND_FULL_KEEP; @@ -472,7 +472,7 @@ int ar6000_setup_hci(AR_SOFTC_T *ar) struct hci_transport_config_info config; int status = 0; int i; - HTC_PACKET *pPacket; + struct htc_packet *pPacket; struct ar6k_hci_bridge_info *pHcidevInfo; @@ -509,14 +509,14 @@ int ar6000_setup_hci(AR_SOFTC_T *ar) AR_DEBUG_PRINTF(ATH_DEBUG_HCI_BRIDGE, ("HCI Bridge: running in test mode... \n")); } - pHcidevInfo->pHTCStructAlloc = (u8 *)A_MALLOC((sizeof(HTC_PACKET)) * NUM_HTC_PACKET_STRUCTS); + pHcidevInfo->pHTCStructAlloc = (u8 *)A_MALLOC((sizeof(struct htc_packet)) * NUM_HTC_PACKET_STRUCTS); if (NULL == pHcidevInfo->pHTCStructAlloc) { status = A_NO_MEMORY; break; } - pPacket = (HTC_PACKET *)pHcidevInfo->pHTCStructAlloc; + pPacket = (struct htc_packet *)pHcidevInfo->pHTCStructAlloc; for (i = 0; i < NUM_HTC_PACKET_STRUCTS; i++,pPacket++) { FreeHTCStruct(pHcidevInfo,pPacket); } @@ -604,7 +604,7 @@ int hci_test_send(AR_SOFTC_T *ar, struct sk_buff *skb) int status = 0; int length; EPPING_HEADER *pHeader; - HTC_PACKET *pPacket; + struct htc_packet *pPacket; HTC_TX_TAG htc_tag = AR6K_DATA_PKT_TAG; #ifdef EXPORT_HCI_BRIDGE_INTERFACE struct ar6k_hci_bridge_info *pHcidevInfo = g_pHcidevInfo; @@ -711,7 +711,7 @@ static int bt_send_frame(struct sk_buff *skb) struct hci_dev *hdev = (struct hci_dev *)skb->dev; HCI_TRANSPORT_PACKET_TYPE type; struct ar6k_hci_bridge_info *pHcidevInfo; - HTC_PACKET *pPacket; + struct htc_packet *pPacket; int status = 0; struct sk_buff *txSkb = NULL; diff --git a/drivers/staging/ath6kl/os/linux/include/ar6000_drv.h b/drivers/staging/ath6kl/os/linux/include/ar6000_drv.h index a209133..29ac830 100644 --- a/drivers/staging/ath6kl/os/linux/include/ar6000_drv.h +++ b/drivers/staging/ath6kl/os/linux/include/ar6000_drv.h @@ -362,7 +362,7 @@ typedef struct { int currPtr; int length; unsigned char data[HTC_RAW_BUFFER_SIZE]; - HTC_PACKET HTCPacket; + struct htc_packet HTCPacket; } raw_htc_buffer; #ifdef CONFIG_HOST_TCMD_SUPPORT @@ -410,7 +410,7 @@ struct ar_node_mapping { struct ar_cookie { unsigned long arc_bp[2]; /* Must be first field */ - HTC_PACKET HtcPkt; /* HTC packet wrapper */ + struct htc_packet HtcPkt; /* HTC packet wrapper */ struct ar_cookie *arc_list_next; }; diff --git a/drivers/staging/ath6kl/os/linux/include/export_hci_transport.h b/drivers/staging/ath6kl/os/linux/include/export_hci_transport.h index cf66717..8e52de7 100644 --- a/drivers/staging/ath6kl/os/linux/include/export_hci_transport.h +++ b/drivers/staging/ath6kl/os/linux/include/export_hci_transport.h @@ -28,12 +28,12 @@ extern HCI_TRANSPORT_HANDLE (*_HCI_TransportAttach)(void *HTCHandle, struct hci_transport_config_info *pInfo); extern void (*_HCI_TransportDetach)(HCI_TRANSPORT_HANDLE HciTrans); extern int (*_HCI_TransportAddReceivePkts)(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET_QUEUE *pQueue); -extern int (*_HCI_TransportSendPkt)(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET *pPacket, bool Synchronous); +extern int (*_HCI_TransportSendPkt)(HCI_TRANSPORT_HANDLE HciTrans, struct htc_packet *pPacket, bool Synchronous); extern void (*_HCI_TransportStop)(HCI_TRANSPORT_HANDLE HciTrans); extern int (*_HCI_TransportStart)(HCI_TRANSPORT_HANDLE HciTrans); extern int (*_HCI_TransportEnableDisableAsyncRecv)(HCI_TRANSPORT_HANDLE HciTrans, bool Enable); extern int (*_HCI_TransportRecvHCIEventSync)(HCI_TRANSPORT_HANDLE HciTrans, - HTC_PACKET *pPacket, + struct htc_packet *pPacket, int MaxPollMS); extern int (*_HCI_TransportSetBaudRate)(HCI_TRANSPORT_HANDLE HciTrans, u32 Baud); extern int (*_HCI_TransportEnablePowerMgmt)(HCI_TRANSPORT_HANDLE HciTrans, bool Enable); diff --git a/drivers/staging/ath6kl/os/linux/netbuf.c b/drivers/staging/ath6kl/os/linux/netbuf.c index 63acedf..a9c96b3 100644 --- a/drivers/staging/ath6kl/os/linux/netbuf.c +++ b/drivers/staging/ath6kl/os/linux/netbuf.c @@ -63,8 +63,8 @@ a_netbuf_alloc(int size) { struct sk_buff *skb; size += 2 * (A_GET_CACHE_LINE_BYTES()); /* add some cacheline space at front and back of buffer */ - skb = dev_alloc_skb(AR6000_DATA_OFFSET + sizeof(HTC_PACKET) + size); - skb_reserve(skb, AR6000_DATA_OFFSET + sizeof(HTC_PACKET) + A_GET_CACHE_LINE_BYTES()); + skb = dev_alloc_skb(AR6000_DATA_OFFSET + sizeof(struct htc_packet) + size); + skb_reserve(skb, AR6000_DATA_OFFSET + sizeof(struct htc_packet) + A_GET_CACHE_LINE_BYTES()); return ((void *)skb); } -- 1.7.4.15.g7811d From b6cb2bcf0a79bd77b748185202318880c2c16aae Mon Sep 17 00:00:00 2001 From: Luis R. Rodriguez Date: Mon, 28 Feb 2011 14:15:02 -0800 Subject: [PATCH 44/58] ath6kl: remove-typedef HTC_PACKET_QUEUE remove-typedef -s HTC_PACKET_QUEUE \ "struct htc_packet_queue" drivers/staging/ath6kl/ Cc: Naveen Singh Signed-off-by: Luis R. Rodriguez --- drivers/staging/ath6kl/htc2/AR6000/ar6k.h | 2 +- .../ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c | 18 +++++++------- drivers/staging/ath6kl/htc2/htc.c | 4 +- drivers/staging/ath6kl/htc2/htc_internal.h | 14 +++++----- drivers/staging/ath6kl/htc2/htc_recv.c | 24 ++++++++++---------- drivers/staging/ath6kl/htc2/htc_send.c | 22 +++++++++--------- drivers/staging/ath6kl/include/hci_transport_api.h | 2 +- drivers/staging/ath6kl/include/htc_api.h | 16 ++++++------ drivers/staging/ath6kl/include/htc_packet.h | 10 ++++---- drivers/staging/ath6kl/os/linux/ar6000_drv.c | 8 +++--- .../staging/ath6kl/os/linux/export_hci_transport.c | 2 +- drivers/staging/ath6kl/os/linux/hci_bridge.c | 4 +- .../staging/ath6kl/os/linux/include/ar6000_drv.h | 2 +- .../ath6kl/os/linux/include/export_hci_transport.h | 2 +- 14 files changed, 65 insertions(+), 65 deletions(-) diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k.h b/drivers/staging/ath6kl/htc2/AR6000/ar6k.h index b01542e..1ff2218 100644 --- a/drivers/staging/ath6kl/htc2/AR6000/ar6k.h +++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k.h @@ -118,7 +118,7 @@ struct ar6k_device { struct hif_device_mbox_info MailBoxInfo; HIF_PENDING_EVENTS_FUNC GetPendingEventsFunc; void *HTCContext; - HTC_PACKET_QUEUE RegisterIOList; + struct htc_packet_queue RegisterIOList; struct ar6k_async_reg_io_buffer RegIOBuffers[AR6K_MAX_REG_IO_BUFFERS]; void (*TargetFailureCallback)(void *Context); int (*MessagePendingCallback)(void *Context, diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c b/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c index 90e303f..8cf46b1 100644 --- a/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c +++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c @@ -63,9 +63,9 @@ struct gmbox_proto_hci_uart { u32 RecvStateFlags; u32 SendStateFlags; HCI_TRANSPORT_PACKET_TYPE WaitBufferType; - HTC_PACKET_QUEUE SendQueue; /* write queue holding HCI Command and ACL packets */ - HTC_PACKET_QUEUE HCIACLRecvBuffers; /* recv queue holding buffers for incomming ACL packets */ - HTC_PACKET_QUEUE HCIEventBuffers; /* recv queue holding buffers for incomming event packets */ + struct htc_packet_queue SendQueue; /* write queue holding HCI Command and ACL packets */ + struct htc_packet_queue HCIACLRecvBuffers; /* recv queue holding buffers for incomming ACL packets */ + struct htc_packet_queue HCIEventBuffers; /* recv queue holding buffers for incomming event packets */ struct ar6k_device *pDev; A_MUTEX_T HCIRxLock; A_MUTEX_T HCITxLock; @@ -366,7 +366,7 @@ static int HCIUartMessagePending(void *pContext, u8 LookAheadBytes[], int ValidB LOCK_HCI_RX(pProt); } else { - HTC_PACKET_QUEUE *pQueue; + struct htc_packet_queue *pQueue; /* user is using a refill handler that can refill multiple HTC buffers */ /* select buffer queue */ @@ -483,7 +483,7 @@ static int HCIUartMessagePending(void *pContext, u8 LookAheadBytes[], int ValidB /* check if we need to refill recv buffers */ if ((pProt->HCIConfig.pHCIPktRecvRefill != NULL) && !recvRefillCalled) { - HTC_PACKET_QUEUE *pQueue; + struct htc_packet_queue *pQueue; int watermark; if (pktType == HCI_ACL_TYPE) { @@ -514,7 +514,7 @@ static int HCIUartMessagePending(void *pContext, u8 LookAheadBytes[], int ValidB /* see if we need to recycle the recv buffer */ if (status && (pPacket != NULL)) { - HTC_PACKET_QUEUE queue; + struct htc_packet_queue queue; if (A_EPROTO == status) { DebugDumpBytes(pPacket->pBuffer, totalRecvLength, "Bad HCI-UART Recv packet"); @@ -797,7 +797,7 @@ static int HCITrySend(struct gmbox_proto_hci_uart *pProt, struct htc_packet *pPa static void FlushSendQueue(struct gmbox_proto_hci_uart *pProt) { struct htc_packet *pPacket; - HTC_PACKET_QUEUE discardQueue; + struct htc_packet_queue discardQueue; INIT_HTC_PACKET_QUEUE(&discardQueue); @@ -820,7 +820,7 @@ static void FlushSendQueue(struct gmbox_proto_hci_uart *pProt) static void FlushRecvBuffers(struct gmbox_proto_hci_uart *pProt) { - HTC_PACKET_QUEUE discardQueue; + struct htc_packet_queue discardQueue; struct htc_packet *pPacket; INIT_HTC_PACKET_QUEUE(&discardQueue); @@ -1001,7 +1001,7 @@ void HCI_TransportDetach(HCI_TRANSPORT_HANDLE HciTrans) AR_DEBUG_PRINTF(ATH_DEBUG_TRC,("-HCI_TransportAttach \n")); } -int HCI_TransportAddReceivePkts(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET_QUEUE *pQueue) +int HCI_TransportAddReceivePkts(HCI_TRANSPORT_HANDLE HciTrans, struct htc_packet_queue *pQueue) { struct gmbox_proto_hci_uart *pProt = (struct gmbox_proto_hci_uart *)HciTrans; int status = 0; diff --git a/drivers/staging/ath6kl/htc2/htc.c b/drivers/staging/ath6kl/htc2/htc.c index 04ba80e..bf4fdb3 100644 --- a/drivers/staging/ath6kl/htc2/htc.c +++ b/drivers/staging/ath6kl/htc2/htc.c @@ -43,14 +43,14 @@ ATH_DEBUG_INSTANTIATE_MODULE_VAR(htc, static void HTCReportFailure(void *Context); static void ResetEndpointStates(HTC_TARGET *target); -void HTCFreeControlBuffer(HTC_TARGET *target, struct htc_packet *pPacket, HTC_PACKET_QUEUE *pList) +void HTCFreeControlBuffer(HTC_TARGET *target, struct htc_packet *pPacket, struct htc_packet_queue *pList) { LOCK_HTC(target); HTC_PACKET_ENQUEUE(pList,pPacket); UNLOCK_HTC(target); } -struct htc_packet *HTCAllocControlBuffer(HTC_TARGET *target, HTC_PACKET_QUEUE *pList) +struct htc_packet *HTCAllocControlBuffer(HTC_TARGET *target, struct htc_packet_queue *pList) { struct htc_packet *pPacket; diff --git a/drivers/staging/ath6kl/htc2/htc_internal.h b/drivers/staging/ath6kl/htc2/htc_internal.h index 5f85350..67de917 100644 --- a/drivers/staging/ath6kl/htc2/htc_internal.h +++ b/drivers/staging/ath6kl/htc2/htc_internal.h @@ -69,15 +69,15 @@ struct htc_endpoint { HTC_ENDPOINT_ID Id; HTC_SERVICE_ID ServiceID; /* service ID this endpoint is bound to non-zero value means this endpoint is in use */ - HTC_PACKET_QUEUE TxQueue; /* HTC frame buffer TX queue */ - HTC_PACKET_QUEUE RxBuffers; /* HTC frame buffer RX list */ + struct htc_packet_queue TxQueue; /* HTC frame buffer TX queue */ + struct htc_packet_queue RxBuffers; /* HTC frame buffer RX list */ struct htc_endpoint_credit_dist CreditDist; /* credit distribution structure (exposed to driver layer) */ struct htc_ep_callbacks EpCallBacks; /* callbacks associated with this endpoint */ int MaxTxQueueDepth; /* max depth of the TX queue before we need to call driver's full handler */ int MaxMsgLength; /* max length of endpoint message */ int TxProcessCount; /* reference count to continue tx processing */ - HTC_PACKET_QUEUE RecvIndicationQueue; /* recv packets ready to be indicated */ + struct htc_packet_queue RecvIndicationQueue; /* recv packets ready to be indicated */ int RxProcessCount; /* reference count to allow single processing context */ struct _HTC_TARGET *target; /* back pointer to target */ u8 SeqNo; /* TX seq no (helpful) for debugging */ @@ -112,8 +112,8 @@ typedef struct _HTC_TARGET { struct htc_endpoint EndPoint[ENDPOINT_MAX]; struct htc_control_buffer HTCControlBuffers[NUM_CONTROL_BUFFERS]; struct htc_endpoint_credit_dist *EpCreditDistributionListHead; - HTC_PACKET_QUEUE ControlBufferTXFreeList; - HTC_PACKET_QUEUE ControlBufferRXFreeList; + struct htc_packet_queue ControlBufferTXFreeList; + struct htc_packet_queue ControlBufferRXFreeList; HTC_CREDIT_DIST_CALLBACK DistributeCredits; HTC_CREDIT_INIT_CALLBACK InitCredits; void *pCredDistContext; @@ -165,8 +165,8 @@ typedef struct _HTC_TARGET { void HTCControlTxComplete(void *Context, struct htc_packet *pPacket); void HTCControlRecv(void *Context, struct htc_packet *pPacket); int HTCWaitforControlMessage(HTC_TARGET *target, struct htc_packet **ppControlPacket); -struct htc_packet *HTCAllocControlBuffer(HTC_TARGET *target, HTC_PACKET_QUEUE *pList); -void HTCFreeControlBuffer(HTC_TARGET *target, struct htc_packet *pPacket, HTC_PACKET_QUEUE *pList); +struct htc_packet *HTCAllocControlBuffer(HTC_TARGET *target, struct htc_packet_queue *pList); +void HTCFreeControlBuffer(HTC_TARGET *target, struct htc_packet *pPacket, struct htc_packet_queue *pList); int HTCIssueSend(HTC_TARGET *target, struct htc_packet *pPacket); void HTCRecvCompleteHandler(void *Context, struct htc_packet *pPacket); int HTCRecvMessagePendingHandler(void *Context, u32 MsgLookAheads[], int NumLookAheads, bool *pAsyncProc, int *pNumPktsFetched); diff --git a/drivers/staging/ath6kl/htc2/htc_recv.c b/drivers/staging/ath6kl/htc2/htc_recv.c index f702963..8ad1d03 100644 --- a/drivers/staging/ath6kl/htc2/htc_recv.c +++ b/drivers/staging/ath6kl/htc2/htc_recv.c @@ -51,7 +51,7 @@ #endif static void DoRecvCompletion(struct htc_endpoint *pEndpoint, - HTC_PACKET_QUEUE *pQueueToIndicate) + struct htc_packet_queue *pQueueToIndicate) { do { @@ -434,7 +434,7 @@ static INLINE void HTCAsyncRecvCheckMorePackets(HTC_TARGET *target, /* unload the recv completion queue */ static INLINE void DrainRecvIndicationQueue(HTC_TARGET *target, struct htc_endpoint *pEndpoint) { - HTC_PACKET_QUEUE recvCompletions; + struct htc_packet_queue recvCompletions; AR_DEBUG_PRINTF(ATH_DEBUG_RECV, ("+DrainRecvIndicationQueue \n")); @@ -690,7 +690,7 @@ static int AllocAndPrepareRxPackets(HTC_TARGET *target, u32 LookAheads[], int Messages, struct htc_endpoint *pEndpoint, - HTC_PACKET_QUEUE *pQueue) + struct htc_packet_queue *pQueue) { int status = 0; struct htc_packet *pPacket; @@ -889,7 +889,7 @@ static void HTCAsyncRecvScatterCompletion(struct hif_scatter_req *pScatterReq) HTC_TARGET *target = (HTC_TARGET *)pScatterReq->Context; int status; bool partialBundle = false; - HTC_PACKET_QUEUE localRecvQueue; + struct htc_packet_queue localRecvQueue; bool procError = false; AR_DEBUG_PRINTF(ATH_DEBUG_RECV,("+HTCAsyncRecvScatterCompletion TotLen: %d Entries: %d\n", @@ -985,8 +985,8 @@ static void HTCAsyncRecvScatterCompletion(struct hif_scatter_req *pScatterReq) } static int HTCIssueRecvPacketBundle(HTC_TARGET *target, - HTC_PACKET_QUEUE *pRecvPktQueue, - HTC_PACKET_QUEUE *pSyncCompletionQueue, + struct htc_packet_queue *pRecvPktQueue, + struct htc_packet_queue *pSyncCompletionQueue, int *pNumPacketsFetched, bool PartialBundle) { @@ -1126,7 +1126,7 @@ int HTCRecvMessagePendingHandler(void *Context, u32 MsgLookAheads[], int NumLook bool asyncProc = false; u32 lookAheads[HTC_HOST_MAX_MSG_PER_BUNDLE]; int pktsFetched; - HTC_PACKET_QUEUE recvPktQueue, syncCompletedPktsQueue; + struct htc_packet_queue recvPktQueue, syncCompletedPktsQueue; bool partialBundle; HTC_ENDPOINT_ID id; int totalFetched = 0; @@ -1283,7 +1283,7 @@ int HTCRecvMessagePendingHandler(void *Context, u32 MsgLookAheads[], int NumLook /* unload sync completion queue */ while (!HTC_QUEUE_EMPTY(&syncCompletedPktsQueue)) { - HTC_PACKET_QUEUE container; + struct htc_packet_queue container; pPacket = HTC_PACKET_DEQUEUE(&syncCompletedPktsQueue); A_ASSERT(pPacket != NULL); @@ -1385,7 +1385,7 @@ int HTCRecvMessagePendingHandler(void *Context, u32 MsgLookAheads[], int NumLook return status; } -int HTCAddReceivePktMultiple(HTC_HANDLE HTCHandle, HTC_PACKET_QUEUE *pPktQueue) +int HTCAddReceivePktMultiple(HTC_HANDLE HTCHandle, struct htc_packet_queue *pPktQueue) { HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); struct htc_endpoint *pEndpoint; @@ -1457,7 +1457,7 @@ int HTCAddReceivePktMultiple(HTC_HANDLE HTCHandle, HTC_PACKET_QUEUE *pPktQueue) /* Makes a buffer available to the HTC module */ int HTCAddReceivePkt(HTC_HANDLE HTCHandle, struct htc_packet *pPacket) { - HTC_PACKET_QUEUE queue; + struct htc_packet_queue queue; INIT_HTC_PACKET_QUEUE_AND_ADD(&queue,pPacket); return HTCAddReceivePktMultiple(HTCHandle, &queue); } @@ -1486,10 +1486,10 @@ void HTCUnblockRecv(HTC_HANDLE HTCHandle) } } -static void HTCFlushRxQueue(HTC_TARGET *target, struct htc_endpoint *pEndpoint, HTC_PACKET_QUEUE *pQueue) +static void HTCFlushRxQueue(HTC_TARGET *target, struct htc_endpoint *pEndpoint, struct htc_packet_queue *pQueue) { struct htc_packet *pPacket; - HTC_PACKET_QUEUE container; + struct htc_packet_queue container; LOCK_HTC_RX(target); diff --git a/drivers/staging/ath6kl/htc2/htc_send.c b/drivers/staging/ath6kl/htc2/htc_send.c index 8fb05d9..8052658 100644 --- a/drivers/staging/ath6kl/htc2/htc_send.c +++ b/drivers/staging/ath6kl/htc2/htc_send.c @@ -44,7 +44,7 @@ typedef enum _HTC_SEND_QUEUE_RESULT { } static void DoSendCompletion(struct htc_endpoint *pEndpoint, - HTC_PACKET_QUEUE *pQueueToIndicate) + struct htc_packet_queue *pQueueToIndicate) { do { @@ -105,7 +105,7 @@ static void HTCSendPktCompletionHandler(void *Context, struct htc_packet *pPacke { HTC_TARGET *target = (HTC_TARGET *)Context; struct htc_endpoint *pEndpoint = &target->EndPoint[pPacket->Endpoint]; - HTC_PACKET_QUEUE container; + struct htc_packet_queue container; CompleteSentPacket(target,pEndpoint,pPacket); INIT_HTC_PACKET_QUEUE_AND_ADD(&container,pPacket); @@ -148,7 +148,7 @@ int HTCIssueSend(HTC_TARGET *target, struct htc_packet *pPacket) /* get HTC send packets from the TX queue on an endpoint */ static INLINE void GetHTCSendPackets(HTC_TARGET *target, struct htc_endpoint *pEndpoint, - HTC_PACKET_QUEUE *pQueue) + struct htc_packet_queue *pQueue) { int creditsRequired; int remainder; @@ -271,7 +271,7 @@ static void HTCAsyncSendScatterCompletion(struct hif_scatter_req *pScatterReq) struct htc_endpoint *pEndpoint = (struct htc_endpoint *)pScatterReq->Context; HTC_TARGET *target = (HTC_TARGET *)pEndpoint->target; int status = 0; - HTC_PACKET_QUEUE sendCompletes; + struct htc_packet_queue sendCompletes; INIT_HTC_PACKET_QUEUE(&sendCompletes); @@ -310,7 +310,7 @@ static void HTCAsyncSendScatterCompletion(struct hif_scatter_req *pScatterReq) * - we drop below the minimum number of messages for a bundle * */ static void HTCIssueSendBundle(struct htc_endpoint *pEndpoint, - HTC_PACKET_QUEUE *pQueue, + struct htc_packet_queue *pQueue, int *pBundlesSent, int *pTotalBundlesPkts) { @@ -479,9 +479,9 @@ static void HTCIssueSendBundle(struct htc_endpoint *pEndpoint, * this function returns the result of the attempt to send a queue of HTC packets */ static HTC_SEND_QUEUE_RESULT HTCTrySend(HTC_TARGET *target, struct htc_endpoint *pEndpoint, - HTC_PACKET_QUEUE *pCallersSendQueue) + struct htc_packet_queue *pCallersSendQueue) { - HTC_PACKET_QUEUE sendQueue; /* temp queue to hold packets at various stages */ + struct htc_packet_queue sendQueue; /* temp queue to hold packets at various stages */ struct htc_packet *pPacket; int bundlesSent; int pktsInBundles; @@ -668,7 +668,7 @@ static HTC_SEND_QUEUE_RESULT HTCTrySend(HTC_TARGET *target, return HTC_SEND_QUEUE_OK; } -int HTCSendPktsMultiple(HTC_HANDLE HTCHandle, HTC_PACKET_QUEUE *pPktQueue) +int HTCSendPktsMultiple(HTC_HANDLE HTCHandle, struct htc_packet_queue *pPktQueue) { HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); struct htc_endpoint *pEndpoint; @@ -711,7 +711,7 @@ int HTCSendPktsMultiple(HTC_HANDLE HTCHandle, HTC_PACKET_QUEUE *pPktQueue) /* HTC API - HTCSendPkt */ int HTCSendPkt(HTC_HANDLE HTCHandle, struct htc_packet *pPacket) { - HTC_PACKET_QUEUE queue; + struct htc_packet_queue queue; AR_DEBUG_PRINTF(ATH_DEBUG_SEND, ("+-HTCSendPkt: Enter endPointId: %d, buffer: 0x%lX, length: %d \n", @@ -841,8 +841,8 @@ void HTCProcessCreditRpt(HTC_TARGET *target, HTC_CREDIT_REPORT *pRpt, int NumEnt static void HTCFlushEndpointTX(HTC_TARGET *target, struct htc_endpoint *pEndpoint, HTC_TX_TAG Tag) { struct htc_packet *pPacket; - HTC_PACKET_QUEUE discardQueue; - HTC_PACKET_QUEUE container; + struct htc_packet_queue discardQueue; + struct htc_packet_queue container; /* initialize the discard queue */ INIT_HTC_PACKET_QUEUE(&discardQueue); diff --git a/drivers/staging/ath6kl/include/hci_transport_api.h b/drivers/staging/ath6kl/include/hci_transport_api.h index 3eac192..5e903fa 100644 --- a/drivers/staging/ath6kl/include/hci_transport_api.h +++ b/drivers/staging/ath6kl/include/hci_transport_api.h @@ -141,7 +141,7 @@ void HCI_TransportDetach(HCI_TRANSPORT_HANDLE HciTrans); @example: @see also: +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ -int HCI_TransportAddReceivePkts(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET_QUEUE *pQueue); +int HCI_TransportAddReceivePkts(HCI_TRANSPORT_HANDLE HciTrans, struct htc_packet_queue *pQueue); /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @desc: Send an HCI packet packet diff --git a/drivers/staging/ath6kl/include/htc_api.h b/drivers/staging/ath6kl/include/htc_api.h index ca85bad..ae41f98 100644 --- a/drivers/staging/ath6kl/include/htc_api.h +++ b/drivers/staging/ath6kl/include/htc_api.h @@ -51,21 +51,21 @@ struct htc_init_info { /* per service connection send completion */ typedef void (*HTC_EP_SEND_PKT_COMPLETE)(void *,struct htc_packet *); /* per service connection callback when a plurality of packets have been sent - * The HTC_PACKET_QUEUE is a temporary queue object (e.g. freed on return from the callback) + * The struct htc_packet_queue is a temporary queue object (e.g. freed on return from the callback) * to hold a list of completed send packets. * If the handler cannot fully traverse the packet queue before returning, it should * transfer the items of the queue into the caller's private queue using: * HTC_PACKET_ENQUEUE() */ -typedef void (*HTC_EP_SEND_PKT_COMP_MULTIPLE)(void *,HTC_PACKET_QUEUE *); +typedef void (*HTC_EP_SEND_PKT_COMP_MULTIPLE)(void *,struct htc_packet_queue *); /* per service connection pkt received */ typedef void (*HTC_EP_RECV_PKT)(void *,struct htc_packet *); /* per service connection callback when a plurality of packets are received - * The HTC_PACKET_QUEUE is a temporary queue object (e.g. freed on return from the callback) + * The struct htc_packet_queue is a temporary queue object (e.g. freed on return from the callback) * to hold a list of recv packets. * If the handler cannot fully traverse the packet queue before returning, it should * transfer the items of the queue into the caller's private queue using: * HTC_PACKET_ENQUEUE() */ -typedef void (*HTC_EP_RECV_PKT_MULTIPLE)(void *,HTC_PACKET_QUEUE *); +typedef void (*HTC_EP_RECV_PKT_MULTIPLE)(void *,struct htc_packet_queue *); /* Optional per service connection receive buffer re-fill callback, * On some OSes (like Linux) packets are allocated from a global pool and indicated up @@ -502,7 +502,7 @@ void HTCUnblockRecv(HTC_HANDLE HTCHandle); @return: 0 @notes: Caller must initialize each packet using SET_HTC_PACKET_INFO_TX() macro. The queue must only contain packets directed at the same endpoint. - Caller supplies a pointer to an HTC_PACKET_QUEUE structure holding the TX packets in FIFO order. + Caller supplies a pointer to an struct htc_packet_queue structure holding the TX packets in FIFO order. This API will remove the packets from the pkt queue and place them into the HTC Tx Queue and bundle messages where possible. The caller may allocate the pkt queue on the stack to hold the packets. @@ -511,7 +511,7 @@ void HTCUnblockRecv(HTC_HANDLE HTCHandle); @example: @see also: HTCFlushEndpoint +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ -int HTCSendPktsMultiple(HTC_HANDLE HTCHandle, HTC_PACKET_QUEUE *pPktQueue); +int HTCSendPktsMultiple(HTC_HANDLE HTCHandle, struct htc_packet_queue *pPktQueue); /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @desc: Add multiple receive packets to HTC @@ -523,14 +523,14 @@ int HTCSendPktsMultiple(HTC_HANDLE HTCHandle, HTC_PACKET_QUEUE *pPktQueue); @notes: user must supply HTC packets for capturing incomming HTC frames. The caller must initialize each HTC packet using the SET_HTC_PACKET_INFO_RX_REFILL() macro. The queue must only contain recv packets for the same endpoint. - Caller supplies a pointer to an HTC_PACKET_QUEUE structure holding the recv packet. + Caller supplies a pointer to an struct htc_packet_queue structure holding the recv packet. This API will remove the packets from the pkt queue and place them into internal recv packet list. The caller may allocate the pkt queue on the stack to hold the packets. @example: @see also: +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ -int HTCAddReceivePktMultiple(HTC_HANDLE HTCHandle, HTC_PACKET_QUEUE *pPktQueue); +int HTCAddReceivePktMultiple(HTC_HANDLE HTCHandle, struct htc_packet_queue *pPktQueue); /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @desc: Check if an endpoint is marked active diff --git a/drivers/staging/ath6kl/include/htc_packet.h b/drivers/staging/ath6kl/include/htc_packet.h index 4311c93..ca23efd 100644 --- a/drivers/staging/ath6kl/include/htc_packet.h +++ b/drivers/staging/ath6kl/include/htc_packet.h @@ -139,10 +139,10 @@ struct htc_packet { } /* HTC Packet Queueing Macros */ -typedef struct _HTC_PACKET_QUEUE { +struct htc_packet_queue { struct dl_list QueueHead; int Depth; -} HTC_PACKET_QUEUE; +}; /* initialize queue */ #define INIT_HTC_PACKET_QUEUE(pQ) \ @@ -165,7 +165,7 @@ typedef struct _HTC_PACKET_QUEUE { /* test if a queue is empty */ #define HTC_QUEUE_EMPTY(pQ) ((pQ)->Depth == 0) /* get packet at head without removing it */ -static INLINE struct htc_packet *HTC_GET_PKT_AT_HEAD(HTC_PACKET_QUEUE *queue) { +static INLINE struct htc_packet *HTC_GET_PKT_AT_HEAD(struct htc_packet_queue *queue) { if (queue->Depth == 0) { return NULL; } @@ -179,7 +179,7 @@ static INLINE struct htc_packet *HTC_GET_PKT_AT_HEAD(HTC_PACKET_QUEUE *queue) } /* dequeue an HTC packet from the head of the queue */ -static INLINE struct htc_packet *HTC_PACKET_DEQUEUE(HTC_PACKET_QUEUE *queue) { +static INLINE struct htc_packet *HTC_PACKET_DEQUEUE(struct htc_packet_queue *queue) { struct dl_list *pItem = DL_ListRemoveItemFromHead(&queue->QueueHead); if (pItem != NULL) { queue->Depth--; @@ -189,7 +189,7 @@ static INLINE struct htc_packet *HTC_PACKET_DEQUEUE(HTC_PACKET_QUEUE *queue) { } /* dequeue an HTC packet from the tail of the queue */ -static INLINE struct htc_packet *HTC_PACKET_DEQUEUE_TAIL(HTC_PACKET_QUEUE *queue) { +static INLINE struct htc_packet *HTC_PACKET_DEQUEUE_TAIL(struct htc_packet_queue *queue) { struct dl_list *pItem = DL_ListRemoveItemFromTail(&queue->QueueHead); if (pItem != NULL) { queue->Depth--; diff --git a/drivers/staging/ath6kl/os/linux/ar6000_drv.c b/drivers/staging/ath6kl/os/linux/ar6000_drv.c index ebfc7fd..fab1e02 100644 --- a/drivers/staging/ath6kl/os/linux/ar6000_drv.c +++ b/drivers/staging/ath6kl/os/linux/ar6000_drv.c @@ -317,7 +317,7 @@ static void ar6000_rx(void *Context, struct htc_packet *pPacket); static void ar6000_rx_refill(void *Context,HTC_ENDPOINT_ID Endpoint); -static void ar6000_tx_complete(void *Context, HTC_PACKET_QUEUE *pPackets); +static void ar6000_tx_complete(void *Context, struct htc_packet_queue *pPackets); static HTC_SEND_FULL_ACTION ar6000_tx_queue_full(void *Context, struct htc_packet *pPacket); @@ -3461,7 +3461,7 @@ static HTC_SEND_FULL_ACTION ar6000_tx_queue_full(void *Context, struct htc_packe static void -ar6000_tx_complete(void *Context, HTC_PACKET_QUEUE *pPacketQueue) +ar6000_tx_complete(void *Context, struct htc_packet_queue *pPacketQueue) { AR_SOFTC_T *ar = (AR_SOFTC_T *)Context; u32 mapNo = 0; @@ -3992,7 +3992,7 @@ ar6000_rx_refill(void *Context, HTC_ENDPOINT_ID Endpoint) int RxBuffers; int buffersToRefill; struct htc_packet *pPacket; - HTC_PACKET_QUEUE queue; + struct htc_packet_queue queue; buffersToRefill = (int)AR6000_MAX_RX_BUFFERS - HTCGetNumRecvBuffers(ar->arHtcTarget, Endpoint); @@ -6323,7 +6323,7 @@ static void DoHTCSendPktsTest(AR_SOFTC_T *ar, int MapNo, HTC_ENDPOINT_ID eid, st struct sk_buff *new_skb; int i; int pkts = 0; - HTC_PACKET_QUEUE pktQueue; + struct htc_packet_queue pktQueue; EPPING_HEADER *eppingHdr; eppingHdr = A_NETBUF_DATA(dupskb); diff --git a/drivers/staging/ath6kl/os/linux/export_hci_transport.c b/drivers/staging/ath6kl/os/linux/export_hci_transport.c index 319dc2e..787a8bd 100644 --- a/drivers/staging/ath6kl/os/linux/export_hci_transport.c +++ b/drivers/staging/ath6kl/os/linux/export_hci_transport.c @@ -38,7 +38,7 @@ HCI_TRANSPORT_HANDLE (*_HCI_TransportAttach)(void *HTCHandle, struct hci_transport_config_info *pInfo); void (*_HCI_TransportDetach)(HCI_TRANSPORT_HANDLE HciTrans); -int (*_HCI_TransportAddReceivePkts)(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET_QUEUE *pQueue); +int (*_HCI_TransportAddReceivePkts)(HCI_TRANSPORT_HANDLE HciTrans, struct htc_packet_queue *pQueue); int (*_HCI_TransportSendPkt)(HCI_TRANSPORT_HANDLE HciTrans, struct htc_packet *pPacket, bool Synchronous); void (*_HCI_TransportStop)(HCI_TRANSPORT_HANDLE HciTrans); int (*_HCI_TransportStart)(HCI_TRANSPORT_HANDLE HciTrans); diff --git a/drivers/staging/ath6kl/os/linux/hci_bridge.c b/drivers/staging/ath6kl/os/linux/hci_bridge.c index 4192284..04b7fd2 100644 --- a/drivers/staging/ath6kl/os/linux/hci_bridge.c +++ b/drivers/staging/ath6kl/os/linux/hci_bridge.c @@ -79,7 +79,7 @@ struct ar6k_hci_bridge_info { struct hci_dev *pBtStackHCIDev; /* BT Stack HCI dev */ bool HciNormalMode; /* Actual HCI mode enabled (non-TEST)*/ bool HciRegistered; /* HCI device registered with stack */ - HTC_PACKET_QUEUE HTCPacketStructHead; + struct htc_packet_queue HTCPacketStructHead; u8 *pHTCStructAlloc; spinlock_t BridgeLock; #ifdef EXPORT_HCI_BRIDGE_INTERFACE @@ -163,7 +163,7 @@ static void RefillRecvBuffers(struct ar6k_hci_bridge_info *pHcidevInfo, { int length, i; void *osBuf = NULL; - HTC_PACKET_QUEUE queue; + struct htc_packet_queue queue; struct htc_packet *pPacket; INIT_HTC_PACKET_QUEUE(&queue); diff --git a/drivers/staging/ath6kl/os/linux/include/ar6000_drv.h b/drivers/staging/ath6kl/os/linux/include/ar6000_drv.h index 29ac830..8d8a964 100644 --- a/drivers/staging/ath6kl/os/linux/include/ar6000_drv.h +++ b/drivers/staging/ath6kl/os/linux/include/ar6000_drv.h @@ -586,7 +586,7 @@ typedef struct ar6_softc { u16 ap_beacon_interval; u16 arRTS; u16 arACS; /* AP mode - Auto Channel Selection */ - HTC_PACKET_QUEUE amsdu_rx_buffer_queue; + struct htc_packet_queue amsdu_rx_buffer_queue; bool bIsDestroyProgress; /* flag to indicate ar6k destroy is in progress */ A_TIMER disconnect_timer; u8 rxMetaVersion; diff --git a/drivers/staging/ath6kl/os/linux/include/export_hci_transport.h b/drivers/staging/ath6kl/os/linux/include/export_hci_transport.h index 8e52de7..31f4f78 100644 --- a/drivers/staging/ath6kl/os/linux/include/export_hci_transport.h +++ b/drivers/staging/ath6kl/os/linux/include/export_hci_transport.h @@ -27,7 +27,7 @@ extern HCI_TRANSPORT_HANDLE (*_HCI_TransportAttach)(void *HTCHandle, struct hci_transport_config_info *pInfo); extern void (*_HCI_TransportDetach)(HCI_TRANSPORT_HANDLE HciTrans); -extern int (*_HCI_TransportAddReceivePkts)(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET_QUEUE *pQueue); +extern int (*_HCI_TransportAddReceivePkts)(HCI_TRANSPORT_HANDLE HciTrans, struct htc_packet_queue *pQueue); extern int (*_HCI_TransportSendPkt)(HCI_TRANSPORT_HANDLE HciTrans, struct htc_packet *pPacket, bool Synchronous); extern void (*_HCI_TransportStop)(HCI_TRANSPORT_HANDLE HciTrans); extern int (*_HCI_TransportStart)(HCI_TRANSPORT_HANDLE HciTrans); -- 1.7.4.15.g7811d From ad4a7db4d51e665073cd6d03175c785462ab5513 Mon Sep 17 00:00:00 2001 From: Luis R. Rodriguez Date: Mon, 28 Feb 2011 14:16:49 -0800 Subject: [PATCH 45/58] ath6kl: remove-typedef HTC_RX_PACKET_INFO remove-typedef -s HTC_RX_PACKET_INFO \ "struct htc_rx_packet_info" drivers/staging/ath6kl/ Cc: Naveen Singh Signed-off-by: Luis R. Rodriguez --- drivers/staging/ath6kl/include/htc_packet.h | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/ath6kl/include/htc_packet.h b/drivers/staging/ath6kl/include/htc_packet.h index ca23efd..b6ecf7e 100644 --- a/drivers/staging/ath6kl/include/htc_packet.h +++ b/drivers/staging/ath6kl/include/htc_packet.h @@ -59,11 +59,11 @@ typedef struct _HTC_TX_PACKET_INFO { #define HTC_TX_PACKET_TAG_INTERNAL 1 /* internal tags start here */ #define HTC_TX_PACKET_TAG_USER_DEFINED (HTC_TX_PACKET_TAG_INTERNAL + 9) /* user-defined tags start here */ -typedef struct _HTC_RX_PACKET_INFO { +struct htc_rx_packet_info { u32 ExpectedHdr; /* HTC internal use */ u32 HTCRxFlags; /* HTC internal use */ u32 IndicationFlags; /* indication flags set on each RX packet indication */ -} HTC_RX_PACKET_INFO; +}; #define HTC_RX_FLAGS_INDICATE_MORE_PKTS (1 << 0) /* more packets on this endpoint are being fetched */ @@ -92,7 +92,7 @@ struct htc_packet { int Status; /* completion status */ union { HTC_TX_PACKET_INFO AsTx; /* Tx Packet specific info */ - HTC_RX_PACKET_INFO AsRx; /* Rx Packet specific info */ + struct htc_rx_packet_info AsRx; /* Rx Packet specific info */ } PktInfo; /* the following fields are for internal HTC use */ -- 1.7.4.15.g7811d From 38eb8f596e2fbb10a1811d4734425134e69e9dc9 Mon Sep 17 00:00:00 2001 From: Luis R. Rodriguez Date: Mon, 28 Feb 2011 14:19:13 -0800 Subject: [PATCH 46/58] ath6kl: remove-typedef HTC_SERVICE_CONNECT_REQ remove-typedef -s HTC_SERVICE_CONNECT_REQ \ "struct htc_service_connect_req" drivers/staging/ath6kl/ Cc: Naveen Singh Signed-off-by: Luis R. Rodriguez --- drivers/staging/ath6kl/htc2/htc.c | 2 +- drivers/staging/ath6kl/htc2/htc_services.c | 2 +- drivers/staging/ath6kl/include/htc_api.h | 6 +++--- drivers/staging/ath6kl/os/linux/ar6000_drv.c | 4 ++-- drivers/staging/ath6kl/os/linux/ar6000_raw_if.c | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/staging/ath6kl/htc2/htc.c b/drivers/staging/ath6kl/htc2/htc.c index bf4fdb3..887a687 100644 --- a/drivers/staging/ath6kl/htc2/htc.c +++ b/drivers/staging/ath6kl/htc2/htc.c @@ -229,7 +229,7 @@ int HTCWaitTarget(HTC_HANDLE HTCHandle) struct htc_packet *pPacket = NULL; HTC_READY_EX_MSG *pRdyMsg; - HTC_SERVICE_CONNECT_REQ connect; + struct htc_service_connect_req connect; HTC_SERVICE_CONNECT_RESP resp; AR_DEBUG_PRINTF(ATH_DEBUG_TRC, ("HTCWaitTarget - Enter (target:0x%lX) \n", (unsigned long)target)); diff --git a/drivers/staging/ath6kl/htc2/htc_services.c b/drivers/staging/ath6kl/htc2/htc_services.c index cb0731f..5c092fd 100644 --- a/drivers/staging/ath6kl/htc2/htc_services.c +++ b/drivers/staging/ath6kl/htc2/htc_services.c @@ -122,7 +122,7 @@ int HTCSendSetupComplete(HTC_TARGET *target) int HTCConnectService(HTC_HANDLE HTCHandle, - HTC_SERVICE_CONNECT_REQ *pConnectReq, + struct htc_service_connect_req *pConnectReq, HTC_SERVICE_CONNECT_RESP *pConnectResp) { HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); diff --git a/drivers/staging/ath6kl/include/htc_api.h b/drivers/staging/ath6kl/include/htc_api.h index ae41f98..f8f00a0 100644 --- a/drivers/staging/ath6kl/include/htc_api.h +++ b/drivers/staging/ath6kl/include/htc_api.h @@ -139,7 +139,7 @@ struct htc_ep_callbacks { }; /* service connection information */ -typedef struct _HTC_SERVICE_CONNECT_REQ { +struct htc_service_connect_req { HTC_SERVICE_ID ServiceID; /* service ID to connect to */ u16 ConnectionFlags; /* connection flags, see htc protocol definition */ u8 *pMetaData; /* ptr to optional service-specific meta-data */ @@ -148,7 +148,7 @@ typedef struct _HTC_SERVICE_CONNECT_REQ { int MaxSendQueueDepth; /* maximum depth of any send queue */ u32 LocalConnectionFlags; /* HTC flags for the host-side (local) connection */ unsigned int MaxSendMsgSize; /* override max message size in send direction */ -} HTC_SERVICE_CONNECT_REQ; +}; #define HTC_LOCAL_CONN_FLAGS_ENABLE_SEND_BUNDLE_PADDING (1 << 0) /* enable send bundle padding for this endpoint */ @@ -362,7 +362,7 @@ int HTCAddReceivePkt(HTC_HANDLE HTCHandle, struct htc_packet *pPacket); @see also: HTCStart +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ int HTCConnectService(HTC_HANDLE HTCHandle, - HTC_SERVICE_CONNECT_REQ *pReq, + struct htc_service_connect_req *pReq, HTC_SERVICE_CONNECT_RESP *pResp); /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @desc: Send an HTC packet diff --git a/drivers/staging/ath6kl/os/linux/ar6000_drv.c b/drivers/staging/ath6kl/os/linux/ar6000_drv.c index fab1e02..a7c57e3 100644 --- a/drivers/staging/ath6kl/os/linux/ar6000_drv.c +++ b/drivers/staging/ath6kl/os/linux/ar6000_drv.c @@ -2339,7 +2339,7 @@ ar6000_close(struct net_device *dev) /* connect to a service */ static int ar6000_connectservice(AR_SOFTC_T *ar, - HTC_SERVICE_CONNECT_REQ *pConnect, + struct htc_service_connect_req *pConnect, char *pDesc) { int status; @@ -2605,7 +2605,7 @@ int ar6000_init(struct net_device *dev) } do { - HTC_SERVICE_CONNECT_REQ connect; + struct htc_service_connect_req connect; /* the reason we have to wait for the target here is that the driver layer * has to init BMI in order to set the host block size, diff --git a/drivers/staging/ath6kl/os/linux/ar6000_raw_if.c b/drivers/staging/ath6kl/os/linux/ar6000_raw_if.c index f8637f6..35de2fb 100644 --- a/drivers/staging/ath6kl/os/linux/ar6000_raw_if.c +++ b/drivers/staging/ath6kl/os/linux/ar6000_raw_if.c @@ -117,7 +117,7 @@ static int ar6000_connect_raw_service(AR_SOFTC_T *ar, int status; HTC_SERVICE_CONNECT_RESP response; u8 streamNo; - HTC_SERVICE_CONNECT_REQ connect; + struct htc_service_connect_req connect; do { -- 1.7.4.15.g7811d From c9f8b85ff205e271792096a7a72039a0fc780393 Mon Sep 17 00:00:00 2001 From: Luis R. Rodriguez Date: Mon, 28 Feb 2011 14:21:12 -0800 Subject: [PATCH 47/58] ath6kl: remove-typedef HTC_SERVICE_CONNECT_RESP remove-typedef -s HTC_SERVICE_CONNECT_RESP \ "struct htc_service_connect_resp" drivers/staging/ath6kl/ Cc: Naveen Singh Signed-off-by: Luis R. Rodriguez --- drivers/staging/ath6kl/htc2/htc.c | 2 +- drivers/staging/ath6kl/htc2/htc_services.c | 2 +- drivers/staging/ath6kl/include/htc_api.h | 6 +++--- drivers/staging/ath6kl/os/linux/ar6000_drv.c | 2 +- drivers/staging/ath6kl/os/linux/ar6000_raw_if.c | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/staging/ath6kl/htc2/htc.c b/drivers/staging/ath6kl/htc2/htc.c index 887a687..b08fd82 100644 --- a/drivers/staging/ath6kl/htc2/htc.c +++ b/drivers/staging/ath6kl/htc2/htc.c @@ -230,7 +230,7 @@ int HTCWaitTarget(HTC_HANDLE HTCHandle) HTC_READY_EX_MSG *pRdyMsg; struct htc_service_connect_req connect; - HTC_SERVICE_CONNECT_RESP resp; + struct htc_service_connect_resp resp; AR_DEBUG_PRINTF(ATH_DEBUG_TRC, ("HTCWaitTarget - Enter (target:0x%lX) \n", (unsigned long)target)); diff --git a/drivers/staging/ath6kl/htc2/htc_services.c b/drivers/staging/ath6kl/htc2/htc_services.c index 5c092fd..d1f1c54 100644 --- a/drivers/staging/ath6kl/htc2/htc_services.c +++ b/drivers/staging/ath6kl/htc2/htc_services.c @@ -123,7 +123,7 @@ int HTCSendSetupComplete(HTC_TARGET *target) int HTCConnectService(HTC_HANDLE HTCHandle, struct htc_service_connect_req *pConnectReq, - HTC_SERVICE_CONNECT_RESP *pConnectResp) + struct htc_service_connect_resp *pConnectResp) { HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); int status = 0; diff --git a/drivers/staging/ath6kl/include/htc_api.h b/drivers/staging/ath6kl/include/htc_api.h index f8f00a0..1bc2488 100644 --- a/drivers/staging/ath6kl/include/htc_api.h +++ b/drivers/staging/ath6kl/include/htc_api.h @@ -153,14 +153,14 @@ struct htc_service_connect_req { #define HTC_LOCAL_CONN_FLAGS_ENABLE_SEND_BUNDLE_PADDING (1 << 0) /* enable send bundle padding for this endpoint */ /* service connection response information */ -typedef struct _HTC_SERVICE_CONNECT_RESP { +struct htc_service_connect_resp { u8 *pMetaData; /* caller supplied buffer to optional meta-data */ u8 BufferLength; /* length of caller supplied buffer */ u8 ActualLength; /* actual length of meta data */ HTC_ENDPOINT_ID Endpoint; /* endpoint to communicate over */ unsigned int MaxMsgLength; /* max length of all messages over this endpoint */ u8 ConnectRespCode; /* connect response code from target */ -} HTC_SERVICE_CONNECT_RESP; +}; /* endpoint distribution structure */ struct htc_endpoint_credit_dist { @@ -363,7 +363,7 @@ int HTCAddReceivePkt(HTC_HANDLE HTCHandle, struct htc_packet *pPacket); +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ int HTCConnectService(HTC_HANDLE HTCHandle, struct htc_service_connect_req *pReq, - HTC_SERVICE_CONNECT_RESP *pResp); + struct htc_service_connect_resp *pResp); /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @desc: Send an HTC packet @function name: HTCSendPkt diff --git a/drivers/staging/ath6kl/os/linux/ar6000_drv.c b/drivers/staging/ath6kl/os/linux/ar6000_drv.c index a7c57e3..41c66b7 100644 --- a/drivers/staging/ath6kl/os/linux/ar6000_drv.c +++ b/drivers/staging/ath6kl/os/linux/ar6000_drv.c @@ -2343,7 +2343,7 @@ static int ar6000_connectservice(AR_SOFTC_T *ar, char *pDesc) { int status; - HTC_SERVICE_CONNECT_RESP response; + struct htc_service_connect_resp response; do { diff --git a/drivers/staging/ath6kl/os/linux/ar6000_raw_if.c b/drivers/staging/ath6kl/os/linux/ar6000_raw_if.c index 35de2fb..7b6339c 100644 --- a/drivers/staging/ath6kl/os/linux/ar6000_raw_if.c +++ b/drivers/staging/ath6kl/os/linux/ar6000_raw_if.c @@ -115,7 +115,7 @@ static int ar6000_connect_raw_service(AR_SOFTC_T *ar, HTC_RAW_STREAM_ID StreamID) { int status; - HTC_SERVICE_CONNECT_RESP response; + struct htc_service_connect_resp response; u8 streamNo; struct htc_service_connect_req connect; -- 1.7.4.15.g7811d From 1f81123fc9916aa73ae2c052dd3610c53bf56a66 Mon Sep 17 00:00:00 2001 From: Luis R. Rodriguez Date: Mon, 28 Feb 2011 14:23:52 -0800 Subject: [PATCH 48/58] ath6kl: remove-typedef HTC_TARGET This required two passes: remove-typedef -s _HTC_TARGET \ "struct htc_target" drivers/staging/ath6kl/ remove-typedef -s HTC_TARGET \ "struct htc_target" drivers/staging/ath6kl/ Cc: Naveen Singh Signed-off-by: Luis R. Rodriguez --- drivers/staging/ath6kl/htc2/htc.c | 34 ++++++++++++------------ drivers/staging/ath6kl/htc2/htc_internal.h | 28 ++++++++++---------- drivers/staging/ath6kl/htc2/htc_recv.c | 38 ++++++++++++++-------------- drivers/staging/ath6kl/htc2/htc_send.c | 32 +++++++++++----------- drivers/staging/ath6kl/htc2/htc_services.c | 12 ++++---- 5 files changed, 72 insertions(+), 72 deletions(-) diff --git a/drivers/staging/ath6kl/htc2/htc.c b/drivers/staging/ath6kl/htc2/htc.c index b08fd82..d40bb14 100644 --- a/drivers/staging/ath6kl/htc2/htc.c +++ b/drivers/staging/ath6kl/htc2/htc.c @@ -41,16 +41,16 @@ ATH_DEBUG_INSTANTIATE_MODULE_VAR(htc, #endif static void HTCReportFailure(void *Context); -static void ResetEndpointStates(HTC_TARGET *target); +static void ResetEndpointStates(struct htc_target *target); -void HTCFreeControlBuffer(HTC_TARGET *target, struct htc_packet *pPacket, struct htc_packet_queue *pList) +void HTCFreeControlBuffer(struct htc_target *target, struct htc_packet *pPacket, struct htc_packet_queue *pList) { LOCK_HTC(target); HTC_PACKET_ENQUEUE(pList,pPacket); UNLOCK_HTC(target); } -struct htc_packet *HTCAllocControlBuffer(HTC_TARGET *target, struct htc_packet_queue *pList) +struct htc_packet *HTCAllocControlBuffer(struct htc_target *target, struct htc_packet_queue *pList) { struct htc_packet *pPacket; @@ -62,7 +62,7 @@ struct htc_packet *HTCAllocControlBuffer(HTC_TARGET *target, struct htc_packet_ } /* cleanup the HTC instance */ -static void HTCCleanup(HTC_TARGET *target) +static void HTCCleanup(struct htc_target *target) { s32 i; @@ -92,7 +92,7 @@ static void HTCCleanup(HTC_TARGET *target) /* registered target arrival callback from the HIF layer */ HTC_HANDLE HTCCreate(void *hif_handle, struct htc_init_info *pInfo) { - HTC_TARGET *target = NULL; + struct htc_target *target = NULL; int status = 0; int i; u32 ctrl_bufsz; @@ -105,13 +105,13 @@ HTC_HANDLE HTCCreate(void *hif_handle, struct htc_init_info *pInfo) do { /* allocate target memory */ - if ((target = (HTC_TARGET *)A_MALLOC(sizeof(HTC_TARGET))) == NULL) { + if ((target = (struct htc_target *)A_MALLOC(sizeof(struct htc_target))) == NULL) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("Unable to allocate memory\n")); status = A_ERROR; break; } - A_MEMZERO(target, sizeof(HTC_TARGET)); + A_MEMZERO(target, sizeof(struct htc_target)); A_MUTEX_INIT(&target->HTCLock); A_MUTEX_INIT(&target->HTCRxLock); A_MUTEX_INIT(&target->HTCTxLock); @@ -206,7 +206,7 @@ HTC_HANDLE HTCCreate(void *hif_handle, struct htc_init_info *pInfo) void HTCDestroy(HTC_HANDLE HTCHandle) { - HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); + struct htc_target *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); AR_DEBUG_PRINTF(ATH_DEBUG_TRC, ("+HTCDestroy .. Destroying :0x%lX \n",(unsigned long)target)); HTCCleanup(target); AR_DEBUG_PRINTF(ATH_DEBUG_TRC, ("-HTCDestroy \n")); @@ -216,7 +216,7 @@ void HTCDestroy(HTC_HANDLE HTCHandle) * HIF requests */ void *HTCGetHifDevice(HTC_HANDLE HTCHandle) { - HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); + struct htc_target *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); return target->Device.HIFDevice; } @@ -224,7 +224,7 @@ void *HTCGetHifDevice(HTC_HANDLE HTCHandle) * this operation is fully synchronous and the message is polled for */ int HTCWaitTarget(HTC_HANDLE HTCHandle) { - HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); + struct htc_target *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); int status; struct htc_packet *pPacket = NULL; HTC_READY_EX_MSG *pRdyMsg; @@ -371,7 +371,7 @@ int HTCWaitTarget(HTC_HANDLE HTCHandle) /* Start HTC, enable interrupts and let the target know host has finished setup */ int HTCStart(HTC_HANDLE HTCHandle) { - HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); + struct htc_target *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); struct htc_packet *pPacket; int status; @@ -436,7 +436,7 @@ int HTCStart(HTC_HANDLE HTCHandle) return status; } -static void ResetEndpointStates(HTC_TARGET *target) +static void ResetEndpointStates(struct htc_target *target) { struct htc_endpoint *pEndpoint; int i; @@ -463,7 +463,7 @@ static void ResetEndpointStates(HTC_TARGET *target) /* stop HTC communications, i.e. stop interrupt reception, and flush all queued buffers */ void HTCStop(HTC_HANDLE HTCHandle) { - HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); + struct htc_target *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); AR_DEBUG_PRINTF(ATH_DEBUG_TRC, ("+HTCStop \n")); LOCK_HTC(target); @@ -496,7 +496,7 @@ void HTCStop(HTC_HANDLE HTCHandle) #ifdef ATH_DEBUG_MODULE void HTCDumpCreditStates(HTC_HANDLE HTCHandle) { - HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); + struct htc_target *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); LOCK_HTC_TX(target); @@ -511,7 +511,7 @@ void HTCDumpCreditStates(HTC_HANDLE HTCHandle) * which uses a mechanism to report errors from the target (i.e. special interrupts) */ static void HTCReportFailure(void *Context) { - HTC_TARGET *target = (HTC_TARGET *)Context; + struct htc_target *target = (struct htc_target *)Context; target->TargetFailure = true; @@ -528,7 +528,7 @@ bool HTCGetEndpointStatistics(HTC_HANDLE HTCHandle, { #ifdef HTC_EP_STAT_PROFILING - HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); + struct htc_target *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); bool clearStats = false; bool sample = false; @@ -575,7 +575,7 @@ bool HTCGetEndpointStatistics(HTC_HANDLE HTCHandle, struct ar6k_device *HTCGetAR6KDevice(void *HTCHandle) { - HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); + struct htc_target *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); return &target->Device; } diff --git a/drivers/staging/ath6kl/htc2/htc_internal.h b/drivers/staging/ath6kl/htc2/htc_internal.h index 67de917..9425ed9 100644 --- a/drivers/staging/ath6kl/htc2/htc_internal.h +++ b/drivers/staging/ath6kl/htc2/htc_internal.h @@ -79,7 +79,7 @@ struct htc_endpoint { int TxProcessCount; /* reference count to continue tx processing */ struct htc_packet_queue RecvIndicationQueue; /* recv packets ready to be indicated */ int RxProcessCount; /* reference count to allow single processing context */ - struct _HTC_TARGET *target; /* back pointer to target */ + struct htc_target *target; /* back pointer to target */ u8 SeqNo; /* TX seq no (helpful) for debugging */ u32 LocalConnectionFlags; /* local connection flags */ #ifdef HTC_EP_STAT_PROFILING @@ -108,7 +108,7 @@ struct htc_control_buffer { #define HTC_OP_STATE_STOPPING (1 << 0) /* our HTC target state */ -typedef struct _HTC_TARGET { +struct htc_target { struct htc_endpoint EndPoint[ENDPOINT_MAX]; struct htc_control_buffer HTCControlBuffers[NUM_CONTROL_BUFFERS]; struct htc_endpoint_credit_dist *EpCreditDistributionListHead; @@ -137,7 +137,7 @@ typedef struct _HTC_TARGET { int MaxMsgPerBundle; /* max messages per bundle for HTC */ bool SendBundlingEnabled; /* run time enable for send bundling (dynamic) */ int RecvBundlingEnabled; /* run time enable for recv bundling (dynamic) */ -} HTC_TARGET; +}; #define HTC_STOPPING(t) ((t)->OpStateFlags & HTC_OP_STATE_STOPPING) #define LOCK_HTC(t) A_MUTEX_LOCK(&(t)->HTCLock); @@ -147,7 +147,7 @@ typedef struct _HTC_TARGET { #define LOCK_HTC_TX(t) A_MUTEX_LOCK(&(t)->HTCTxLock); #define UNLOCK_HTC_TX(t) A_MUTEX_UNLOCK(&(t)->HTCTxLock); -#define GET_HTC_TARGET_FROM_HANDLE(hnd) ((HTC_TARGET *)(hnd)) +#define GET_HTC_TARGET_FROM_HANDLE(hnd) ((struct htc_target *)(hnd)) #define HTC_RECYCLE_RX_PKT(target,p,e) \ { \ if ((p)->PktInfo.AsRx.HTCRxFlags & HTC_RX_PKT_NO_RECYCLE) { \ @@ -164,24 +164,24 @@ typedef struct _HTC_TARGET { /* internal HTC functions */ void HTCControlTxComplete(void *Context, struct htc_packet *pPacket); void HTCControlRecv(void *Context, struct htc_packet *pPacket); -int HTCWaitforControlMessage(HTC_TARGET *target, struct htc_packet **ppControlPacket); -struct htc_packet *HTCAllocControlBuffer(HTC_TARGET *target, struct htc_packet_queue *pList); -void HTCFreeControlBuffer(HTC_TARGET *target, struct htc_packet *pPacket, struct htc_packet_queue *pList); -int HTCIssueSend(HTC_TARGET *target, struct htc_packet *pPacket); +int HTCWaitforControlMessage(struct htc_target *target, struct htc_packet **ppControlPacket); +struct htc_packet *HTCAllocControlBuffer(struct htc_target *target, struct htc_packet_queue *pList); +void HTCFreeControlBuffer(struct htc_target *target, struct htc_packet *pPacket, struct htc_packet_queue *pList); +int HTCIssueSend(struct htc_target *target, struct htc_packet *pPacket); void HTCRecvCompleteHandler(void *Context, struct htc_packet *pPacket); int HTCRecvMessagePendingHandler(void *Context, u32 MsgLookAheads[], int NumLookAheads, bool *pAsyncProc, int *pNumPktsFetched); -void HTCProcessCreditRpt(HTC_TARGET *target, HTC_CREDIT_REPORT *pRpt, int NumEntries, HTC_ENDPOINT_ID FromEndpoint); -int HTCSendSetupComplete(HTC_TARGET *target); -void HTCFlushRecvBuffers(HTC_TARGET *target); -void HTCFlushSendPkts(HTC_TARGET *target); +void HTCProcessCreditRpt(struct htc_target *target, HTC_CREDIT_REPORT *pRpt, int NumEntries, HTC_ENDPOINT_ID FromEndpoint); +int HTCSendSetupComplete(struct htc_target *target); +void HTCFlushRecvBuffers(struct htc_target *target); +void HTCFlushSendPkts(struct htc_target *target); #ifdef ATH_DEBUG_MODULE void DumpCreditDist(struct htc_endpoint_credit_dist *pEPDist); -void DumpCreditDistStates(HTC_TARGET *target); +void DumpCreditDistStates(struct htc_target *target); void DebugDumpBytes(u8 *buffer, u16 length, char *pDescription); #endif -static INLINE struct htc_packet *HTC_ALLOC_CONTROL_TX(HTC_TARGET *target) { +static INLINE struct htc_packet *HTC_ALLOC_CONTROL_TX(struct htc_target *target) { struct htc_packet *pPacket = HTCAllocControlBuffer(target,&target->ControlBufferTXFreeList); if (pPacket != NULL) { /* set payload pointer area with some headroom */ diff --git a/drivers/staging/ath6kl/htc2/htc_recv.c b/drivers/staging/ath6kl/htc2/htc_recv.c index 8ad1d03..c208801 100644 --- a/drivers/staging/ath6kl/htc2/htc_recv.c +++ b/drivers/staging/ath6kl/htc2/htc_recv.c @@ -83,7 +83,7 @@ static void DoRecvCompletion(struct htc_endpoint *pEndpoint, } -static INLINE int HTCProcessTrailer(HTC_TARGET *target, +static INLINE int HTCProcessTrailer(struct htc_target *target, u8 *pBuffer, int Length, u32 *pNextLookAheads, @@ -226,7 +226,7 @@ static INLINE int HTCProcessTrailer(HTC_TARGET *target, /* process a received message (i.e. strip off header, process any trailer data) * note : locks must be released when this function is called */ -static int HTCProcessRecvHeader(HTC_TARGET *target, +static int HTCProcessRecvHeader(struct htc_target *target, struct htc_packet *pPacket, u32 *pNextLookAheads, int *pNumLookAheads) @@ -385,7 +385,7 @@ static int HTCProcessRecvHeader(HTC_TARGET *target, return status; } -static INLINE void HTCAsyncRecvCheckMorePackets(HTC_TARGET *target, +static INLINE void HTCAsyncRecvCheckMorePackets(struct htc_target *target, u32 NextLookAheads[], int NumLookAheads, bool CheckMoreMsgs) @@ -432,7 +432,7 @@ static INLINE void HTCAsyncRecvCheckMorePackets(HTC_TARGET *target, } /* unload the recv completion queue */ -static INLINE void DrainRecvIndicationQueue(HTC_TARGET *target, struct htc_endpoint *pEndpoint) +static INLINE void DrainRecvIndicationQueue(struct htc_target *target, struct htc_endpoint *pEndpoint) { struct htc_packet_queue recvCompletions; @@ -517,7 +517,7 @@ static INLINE void SetRxPacketIndicationFlags(u32 LookAhead, * completes a read request, it will call this completion handler */ void HTCRecvCompleteHandler(void *Context, struct htc_packet *pPacket) { - HTC_TARGET *target = (HTC_TARGET *)Context; + struct htc_target *target = (struct htc_target *)Context; struct htc_endpoint *pEndpoint; u32 nextLookAheads[HTC_HOST_MAX_MSG_PER_BUNDLE]; int numLookAheads = 0; @@ -587,7 +587,7 @@ void HTCRecvCompleteHandler(void *Context, struct htc_packet *pPacket) /* synchronously wait for a control message from the target, * This function is used at initialization time ONLY. At init messages * on ENDPOINT 0 are expected. */ -int HTCWaitforControlMessage(HTC_TARGET *target, struct htc_packet **ppControlPacket) +int HTCWaitforControlMessage(struct htc_target *target, struct htc_packet **ppControlPacket) { int status; u32 lookAhead; @@ -686,7 +686,7 @@ int HTCWaitforControlMessage(HTC_TARGET *target, struct htc_packet **ppControlPa return status; } -static int AllocAndPrepareRxPackets(HTC_TARGET *target, +static int AllocAndPrepareRxPackets(struct htc_target *target, u32 LookAheads[], int Messages, struct htc_endpoint *pEndpoint, @@ -886,7 +886,7 @@ static void HTCAsyncRecvScatterCompletion(struct hif_scatter_req *pScatterReq) struct htc_endpoint *pEndpoint; u32 lookAheads[HTC_HOST_MAX_MSG_PER_BUNDLE]; int numLookAheads = 0; - HTC_TARGET *target = (HTC_TARGET *)pScatterReq->Context; + struct htc_target *target = (struct htc_target *)pScatterReq->Context; int status; bool partialBundle = false; struct htc_packet_queue localRecvQueue; @@ -984,7 +984,7 @@ static void HTCAsyncRecvScatterCompletion(struct hif_scatter_req *pScatterReq) AR_DEBUG_PRINTF(ATH_DEBUG_RECV,("-HTCAsyncRecvScatterCompletion \n")); } -static int HTCIssueRecvPacketBundle(HTC_TARGET *target, +static int HTCIssueRecvPacketBundle(struct htc_target *target, struct htc_packet_queue *pRecvPktQueue, struct htc_packet_queue *pSyncCompletionQueue, int *pNumPacketsFetched, @@ -1119,7 +1119,7 @@ static INLINE void CheckRecvWaterMark(struct htc_endpoint *pEndpoint) /* callback when device layer or lookahead report parsing detects a pending message */ int HTCRecvMessagePendingHandler(void *Context, u32 MsgLookAheads[], int NumLookAheads, bool *pAsyncProc, int *pNumPktsFetched) { - HTC_TARGET *target = (HTC_TARGET *)Context; + struct htc_target *target = (struct htc_target *)Context; int status = 0; struct htc_packet *pPacket; struct htc_endpoint *pEndpoint; @@ -1387,7 +1387,7 @@ int HTCRecvMessagePendingHandler(void *Context, u32 MsgLookAheads[], int NumLook int HTCAddReceivePktMultiple(HTC_HANDLE HTCHandle, struct htc_packet_queue *pPktQueue) { - HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); + struct htc_target *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); struct htc_endpoint *pEndpoint; bool unblockRecv = false; int status = 0; @@ -1464,7 +1464,7 @@ int HTCAddReceivePkt(HTC_HANDLE HTCHandle, struct htc_packet *pPacket) void HTCUnblockRecv(HTC_HANDLE HTCHandle) { - HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); + struct htc_target *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); bool unblockRecv = false; LOCK_HTC_RX(target); @@ -1486,7 +1486,7 @@ void HTCUnblockRecv(HTC_HANDLE HTCHandle) } } -static void HTCFlushRxQueue(HTC_TARGET *target, struct htc_endpoint *pEndpoint, struct htc_packet_queue *pQueue) +static void HTCFlushRxQueue(struct htc_target *target, struct htc_endpoint *pEndpoint, struct htc_packet_queue *pQueue) { struct htc_packet *pPacket; struct htc_packet_queue container; @@ -1512,7 +1512,7 @@ static void HTCFlushRxQueue(HTC_TARGET *target, struct htc_endpoint *pEndpoint, UNLOCK_HTC_RX(target); } -static void HTCFlushEndpointRX(HTC_TARGET *target, struct htc_endpoint *pEndpoint) +static void HTCFlushEndpointRX(struct htc_target *target, struct htc_endpoint *pEndpoint) { /* flush any recv indications not already made */ HTCFlushRxQueue(target,pEndpoint,&pEndpoint->RecvIndicationQueue); @@ -1520,7 +1520,7 @@ static void HTCFlushEndpointRX(HTC_TARGET *target, struct htc_endpoint *pEndpoin HTCFlushRxQueue(target,pEndpoint,&pEndpoint->RxBuffers); } -void HTCFlushRecvBuffers(HTC_TARGET *target) +void HTCFlushRecvBuffers(struct htc_target *target) { struct htc_endpoint *pEndpoint; int i; @@ -1538,7 +1538,7 @@ void HTCFlushRecvBuffers(HTC_TARGET *target) void HTCEnableRecv(HTC_HANDLE HTCHandle) { - HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); + struct htc_target *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); if (!HTC_STOPPING(target)) { /* re-enable */ @@ -1548,7 +1548,7 @@ void HTCEnableRecv(HTC_HANDLE HTCHandle) void HTCDisableRecv(HTC_HANDLE HTCHandle) { - HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); + struct htc_target *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); if (!HTC_STOPPING(target)) { /* disable */ @@ -1559,7 +1559,7 @@ void HTCDisableRecv(HTC_HANDLE HTCHandle) int HTCGetNumRecvBuffers(HTC_HANDLE HTCHandle, HTC_ENDPOINT_ID Endpoint) { - HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); + struct htc_target *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); return HTC_PACKET_QUEUE_DEPTH(&(target->EndPoint[Endpoint].RxBuffers)); } @@ -1568,7 +1568,7 @@ int HTCWaitForPendingRecv(HTC_HANDLE HTCHandle, bool *pbIsRecvPending) { int status = 0; - HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); + struct htc_target *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); status = DevWaitForPendingRecv(&target->Device, TimeoutInMs, diff --git a/drivers/staging/ath6kl/htc2/htc_send.c b/drivers/staging/ath6kl/htc2/htc_send.c index 8052658..6f4050a 100644 --- a/drivers/staging/ath6kl/htc2/htc_send.c +++ b/drivers/staging/ath6kl/htc2/htc_send.c @@ -77,7 +77,7 @@ static void DoSendCompletion(struct htc_endpoint *pEndpoint, } /* do final completion on sent packet */ -static INLINE void CompleteSentPacket(HTC_TARGET *target, struct htc_endpoint *pEndpoint, struct htc_packet *pPacket) +static INLINE void CompleteSentPacket(struct htc_target *target, struct htc_endpoint *pEndpoint, struct htc_packet *pPacket) { pPacket->Completion = NULL; @@ -103,7 +103,7 @@ static INLINE void CompleteSentPacket(HTC_TARGET *target, struct htc_endpoint *p * layer */ static void HTCSendPktCompletionHandler(void *Context, struct htc_packet *pPacket) { - HTC_TARGET *target = (HTC_TARGET *)Context; + struct htc_target *target = (struct htc_target *)Context; struct htc_endpoint *pEndpoint = &target->EndPoint[pPacket->Endpoint]; struct htc_packet_queue container; @@ -113,7 +113,7 @@ static void HTCSendPktCompletionHandler(void *Context, struct htc_packet *pPacke DO_EP_TX_COMPLETION(pEndpoint,&container); } -int HTCIssueSend(HTC_TARGET *target, struct htc_packet *pPacket) +int HTCIssueSend(struct htc_target *target, struct htc_packet *pPacket) { int status; bool sync = false; @@ -146,7 +146,7 @@ int HTCIssueSend(HTC_TARGET *target, struct htc_packet *pPacket) } /* get HTC send packets from the TX queue on an endpoint */ -static INLINE void GetHTCSendPackets(HTC_TARGET *target, +static INLINE void GetHTCSendPackets(struct htc_target *target, struct htc_endpoint *pEndpoint, struct htc_packet_queue *pQueue) { @@ -269,7 +269,7 @@ static void HTCAsyncSendScatterCompletion(struct hif_scatter_req *pScatterReq) int i; struct htc_packet *pPacket; struct htc_endpoint *pEndpoint = (struct htc_endpoint *)pScatterReq->Context; - HTC_TARGET *target = (HTC_TARGET *)pEndpoint->target; + struct htc_target *target = (struct htc_target *)pEndpoint->target; int status = 0; struct htc_packet_queue sendCompletes; @@ -323,7 +323,7 @@ static void HTCIssueSendBundle(struct htc_endpoint *pEndpoint, bool done = false; int bundlesSent = 0; int totalPktsInBundle = 0; - HTC_TARGET *target = pEndpoint->target; + struct htc_target *target = pEndpoint->target; int creditRemainder = 0; int creditPad; @@ -477,7 +477,7 @@ static void HTCIssueSendBundle(struct htc_endpoint *pEndpoint, /* * if there are no credits, the packet(s) remains in the queue. * this function returns the result of the attempt to send a queue of HTC packets */ -static HTC_SEND_QUEUE_RESULT HTCTrySend(HTC_TARGET *target, +static HTC_SEND_QUEUE_RESULT HTCTrySend(struct htc_target *target, struct htc_endpoint *pEndpoint, struct htc_packet_queue *pCallersSendQueue) { @@ -670,7 +670,7 @@ static HTC_SEND_QUEUE_RESULT HTCTrySend(HTC_TARGET *target, int HTCSendPktsMultiple(HTC_HANDLE HTCHandle, struct htc_packet_queue *pPktQueue) { - HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); + struct htc_target *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); struct htc_endpoint *pEndpoint; struct htc_packet *pPacket; @@ -721,7 +721,7 @@ int HTCSendPkt(HTC_HANDLE HTCHandle, struct htc_packet *pPacket) } /* check TX queues to drain because of credit distribution update */ -static INLINE void HTCCheckEndpointTxQueues(HTC_TARGET *target) +static INLINE void HTCCheckEndpointTxQueues(struct htc_target *target) { struct htc_endpoint *pEndpoint; struct htc_endpoint_credit_dist *pDistItem; @@ -753,7 +753,7 @@ static INLINE void HTCCheckEndpointTxQueues(HTC_TARGET *target) } /* process credit reports and call distribution function */ -void HTCProcessCreditRpt(HTC_TARGET *target, HTC_CREDIT_REPORT *pRpt, int NumEntries, HTC_ENDPOINT_ID FromEndpoint) +void HTCProcessCreditRpt(struct htc_target *target, HTC_CREDIT_REPORT *pRpt, int NumEntries, HTC_ENDPOINT_ID FromEndpoint) { int i; struct htc_endpoint *pEndpoint; @@ -838,7 +838,7 @@ void HTCProcessCreditRpt(HTC_TARGET *target, HTC_CREDIT_REPORT *pRpt, int NumEnt } /* flush endpoint TX queue */ -static void HTCFlushEndpointTX(HTC_TARGET *target, struct htc_endpoint *pEndpoint, HTC_TX_TAG Tag) +static void HTCFlushEndpointTX(struct htc_target *target, struct htc_endpoint *pEndpoint, HTC_TX_TAG Tag) { struct htc_packet *pPacket; struct htc_packet_queue discardQueue; @@ -899,7 +899,7 @@ void DumpCreditDist(struct htc_endpoint_credit_dist *pEPDist) AR_DEBUG_PRINTF(ATH_DEBUG_ANY, ("----------------------------------------------------\n")); } -void DumpCreditDistStates(HTC_TARGET *target) +void DumpCreditDistStates(struct htc_target *target) { struct htc_endpoint_credit_dist *pEPList = target->EpCreditDistributionListHead; @@ -917,7 +917,7 @@ void DumpCreditDistStates(HTC_TARGET *target) } /* flush all send packets from all endpoint queues */ -void HTCFlushSendPkts(HTC_TARGET *target) +void HTCFlushSendPkts(struct htc_target *target) { struct htc_endpoint *pEndpoint; int i; @@ -941,7 +941,7 @@ void HTCFlushSendPkts(HTC_TARGET *target) /* HTC API to flush an endpoint's TX queue*/ void HTCFlushEndpoint(HTC_HANDLE HTCHandle, HTC_ENDPOINT_ID Endpoint, HTC_TX_TAG Tag) { - HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); + struct htc_target *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); struct htc_endpoint *pEndpoint = &target->EndPoint[Endpoint]; if (pEndpoint->ServiceID == 0) { @@ -958,7 +958,7 @@ void HTCIndicateActivityChange(HTC_HANDLE HTCHandle, HTC_ENDPOINT_ID Endpoint, bool Active) { - HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); + struct htc_target *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); struct htc_endpoint *pEndpoint = &target->EndPoint[Endpoint]; bool doDist = false; @@ -1008,7 +1008,7 @@ void HTCIndicateActivityChange(HTC_HANDLE HTCHandle, bool HTCIsEndpointActive(HTC_HANDLE HTCHandle, HTC_ENDPOINT_ID Endpoint) { - HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); + struct htc_target *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); struct htc_endpoint *pEndpoint = &target->EndPoint[Endpoint]; if (pEndpoint->ServiceID == 0) { diff --git a/drivers/staging/ath6kl/htc2/htc_services.c b/drivers/staging/ath6kl/htc2/htc_services.c index d1f1c54..c48070c 100644 --- a/drivers/staging/ath6kl/htc2/htc_services.c +++ b/drivers/staging/ath6kl/htc2/htc_services.c @@ -36,7 +36,7 @@ void HTCControlRecv(void *Context, struct htc_packet *pPacket) if (pPacket->Status == A_ECANCELED) { /* this is a flush operation, return the control packet back to the pool */ - HTC_FREE_CONTROL_RX((HTC_TARGET*)Context,pPacket); + HTC_FREE_CONTROL_RX((struct htc_target*)Context,pPacket); return; } @@ -54,10 +54,10 @@ void HTCControlRecv(void *Context, struct htc_packet *pPacket) #endif } - HTC_RECYCLE_RX_PKT((HTC_TARGET*)Context,pPacket,&((HTC_TARGET*)Context)->EndPoint[0]); + HTC_RECYCLE_RX_PKT((struct htc_target*)Context,pPacket,&((struct htc_target*)Context)->EndPoint[0]); } -int HTCSendSetupComplete(HTC_TARGET *target) +int HTCSendSetupComplete(struct htc_target *target) { struct htc_packet *pSendPacket = NULL; int status; @@ -125,7 +125,7 @@ int HTCConnectService(HTC_HANDLE HTCHandle, struct htc_service_connect_req *pConnectReq, struct htc_service_connect_resp *pConnectResp) { - HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); + struct htc_target *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); int status = 0; struct htc_packet *pRecvPacket = NULL; struct htc_packet *pSendPacket = NULL; @@ -307,7 +307,7 @@ int HTCConnectService(HTC_HANDLE HTCHandle, return status; } -static void AddToEndpointDistList(HTC_TARGET *target, struct htc_endpoint_credit_dist *pEpDist) +static void AddToEndpointDistList(struct htc_target *target, struct htc_endpoint_credit_dist *pEpDist) { struct htc_endpoint_credit_dist *pCurEntry,*pLastEntry; @@ -408,7 +408,7 @@ void HTCSetCreditDistribution(HTC_HANDLE HTCHandle, HTC_SERVICE_ID ServicePriorityOrder[], int ListLength) { - HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); + struct htc_target *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); int i; int ep; -- 1.7.4.15.g7811d From fbafee33d8eff97f541fba29ca8f6990179fc431 Mon Sep 17 00:00:00 2001 From: Luis R. Rodriguez Date: Mon, 28 Feb 2011 14:26:12 -0800 Subject: [PATCH 49/58] ath6kl: remove-typedef HTC_TX_PACKET_INFO remove-typedef -s HTC_TX_PACKET_INFO \ "struct htc_tx_packet_info" drivers/staging/ath6kl/ Cc: Naveen Singh Signed-off-by: Luis R. Rodriguez --- drivers/staging/ath6kl/include/htc_packet.h | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/ath6kl/include/htc_packet.h b/drivers/staging/ath6kl/include/htc_packet.h index b6ecf7e..ba65c34 100644 --- a/drivers/staging/ath6kl/include/htc_packet.h +++ b/drivers/staging/ath6kl/include/htc_packet.h @@ -48,12 +48,12 @@ typedef void (* HTC_PACKET_COMPLETION)(void *,struct htc_packet *); typedef u16 HTC_TX_TAG; -typedef struct _HTC_TX_PACKET_INFO { +struct htc_tx_packet_info { HTC_TX_TAG Tag; /* tag used to selective flush packets */ int CreditsUsed; /* number of credits used for this TX packet (HTC internal) */ u8 SendFlags; /* send flags (HTC internal) */ int SeqNo; /* internal seq no for debugging (HTC internal) */ -} HTC_TX_PACKET_INFO; +}; #define HTC_TX_PACKET_TAG_ALL 0 /* a tag of zero is reserved and used to flush ALL packets */ #define HTC_TX_PACKET_TAG_INTERNAL 1 /* internal tags start here */ @@ -91,7 +91,7 @@ struct htc_packet { HTC_ENDPOINT_ID Endpoint; /* endpoint that this packet was sent/recv'd from */ int Status; /* completion status */ union { - HTC_TX_PACKET_INFO AsTx; /* Tx Packet specific info */ + struct htc_tx_packet_info AsTx; /* Tx Packet specific info */ struct htc_rx_packet_info AsRx; /* Rx Packet specific info */ } PktInfo; -- 1.7.4.15.g7811d From 850f9119dde43ab55e03d3f4755d970d7734dbb5 Mon Sep 17 00:00:00 2001 From: Luis R. Rodriguez Date: Mon, 28 Feb 2011 14:28:59 -0800 Subject: [PATCH 50/58] ath6kl: remove-typedef OSBUF_HOLD_Q remove-typedef -s OSBUF_HOLD_Q \ "struct osbuf_hold_q" drivers/staging/ath6kl/ Cc: Naveen Singh Signed-off-by: Luis R. Rodriguez --- drivers/staging/ath6kl/reorder/aggr_rx_internal.h | 8 ++++---- drivers/staging/ath6kl/reorder/rcv_aggr.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/ath6kl/reorder/aggr_rx_internal.h b/drivers/staging/ath6kl/reorder/aggr_rx_internal.h index 20c894d..082a8da 100644 --- a/drivers/staging/ath6kl/reorder/aggr_rx_internal.h +++ b/drivers/staging/ath6kl/reorder/aggr_rx_internal.h @@ -48,7 +48,7 @@ #define AGGR_GET_RXTID(_p, _x) (&(_p->RxTid[(_x)])) /* Hold q is a function of win_sz, which is negotiated per tid */ -#define HOLD_Q_SZ(_x) (TID_WINDOW_SZ((_x))*sizeof(OSBUF_HOLD_Q)) +#define HOLD_Q_SZ(_x) (TID_WINDOW_SZ((_x))*sizeof(struct osbuf_hold_q)) /* AGGR_RX_TIMEOUT value is important as a (too) small value can cause frames to be * delivered out of order and a (too) large value can cause undesirable latency in * certain situations. */ @@ -59,11 +59,11 @@ typedef enum { CONTIGUOUS_SEQNO = 1, }DELIVERY_ORDER; -typedef struct { +struct osbuf_hold_q { void *osbuf; bool is_amsdu; u16 seq_no; -}OSBUF_HOLD_Q; +}; #if 0 @@ -80,7 +80,7 @@ typedef struct { u16 win_sz; /* negotiated window size */ u16 seq_next; /* Next seq no, in current window */ u32 hold_q_sz; /* Num of frames that can be held in hold q */ - OSBUF_HOLD_Q *hold_q; /* Hold q for re-order */ + struct osbuf_hold_q *hold_q; /* Hold q for re-order */ #if 0 WINDOW_SNAPSHOT old_win; /* Sliding window snapshot - for timeout */ #endif diff --git a/drivers/staging/ath6kl/reorder/rcv_aggr.c b/drivers/staging/ath6kl/reorder/rcv_aggr.c index 8beb00d..c54d492 100644 --- a/drivers/staging/ath6kl/reorder/rcv_aggr.c +++ b/drivers/staging/ath6kl/reorder/rcv_aggr.c @@ -272,7 +272,7 @@ static void aggr_deque_frms(struct aggr_info *p_aggr, u8 tid, u16 seq_no, u8 order) { RXTID *rxtid; - OSBUF_HOLD_Q *node; + struct osbuf_hold_q *node; u16 idx, idx_end, seq_end; RXTID_STATS *stats; @@ -433,7 +433,7 @@ aggr_process_recv_frm(void *cntxt, u8 tid, u16 seq_no, bool is_amsdu, void **osb RXTID_STATS *stats; u16 idx, st, cur, end; u16 *log_idx; - OSBUF_HOLD_Q *node; + struct osbuf_hold_q *node; PACKET_LOG *log; A_ASSERT(p_aggr); -- 1.7.4.15.g7811d From 7bde370cb9925f90c88a9f1975ca0fdee6e88344 Mon Sep 17 00:00:00 2001 From: Luis R. Rodriguez Date: Mon, 28 Feb 2011 14:30:42 -0800 Subject: [PATCH 51/58] ath6kl: remove-typedef PSCmdPacket remove-typedef -s PSCmdPacket \ "struct ps_cmd_packet" drivers/staging/ath6kl/ Cc: Naveen Singh Signed-off-by: Luis R. Rodriguez --- .../staging/ath6kl/miscdrv/ar3kps/ar3kpsconfig.c | 4 ++-- .../staging/ath6kl/miscdrv/ar3kps/ar3kpsparser.c | 12 ++++++------ .../staging/ath6kl/miscdrv/ar3kps/ar3kpsparser.h | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsconfig.c b/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsconfig.c index 3436cbd..8393efe 100644 --- a/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsconfig.c +++ b/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsconfig.c @@ -41,7 +41,7 @@ */ typedef struct { - PSCmdPacket *HciCmdList; + struct ps_cmd_packet *HciCmdList; u32 num_packets; struct ar3k_config_info *dev; }HciCommandListParam; @@ -133,7 +133,7 @@ int PSSendOps(void *arg) { int i; int status = 0; - PSCmdPacket *HciCmdList; /* List storing the commands */ + struct ps_cmd_packet *HciCmdList; /* List storing the commands */ const struct firmware* firmware; u32 numCmds; u8 *event; diff --git a/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsparser.c b/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsparser.c index 300c501..b334a3d 100644 --- a/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsparser.c +++ b/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsparser.c @@ -130,7 +130,7 @@ tRamPatch RamPatch[MAX_NUM_PATCH_ENTRY]; int AthParseFilesUnified(u8 *srcbuffer,u32 srclen, int FileFormat); char AthReadChar(u8 *buffer, u32 len,u32 *pos); char *AthGetLine(char *buffer, int maxlen, u8 *srcbuffer,u32 len,u32 *pos); -static int AthPSCreateHCICommand(u8 Opcode, u32 Param1,PSCmdPacket *PSPatchPacket,u32 *index); +static int AthPSCreateHCICommand(u8 Opcode, u32 Param1,struct ps_cmd_packet *PSPatchPacket,u32 *index); /* Function to reads the next character from the input buffer */ char AthReadChar(u8 *buffer, u32 len,u32 *pos) @@ -764,7 +764,7 @@ static void LoadHeader(u8 *HCI_PS_Command,u8 opcode,int length,int index){ ///////////////////////// // -int AthCreateCommandList(PSCmdPacket **HciPacketList, u32 *numPackets) +int AthCreateCommandList(struct ps_cmd_packet **HciPacketList, u32 *numPackets) { u8 count; @@ -785,8 +785,8 @@ int AthCreateCommandList(PSCmdPacket **HciPacketList, u32 *numPackets) if(Patch_Count > 0) { NumcmdEntry++; /* Patch Enable Command */ } - AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Num Cmd Entries %d Size %d \r\n",NumcmdEntry,(u32)sizeof(PSCmdPacket) * NumcmdEntry)); - (*HciPacketList) = A_MALLOC(sizeof(PSCmdPacket) * NumcmdEntry); + AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Num Cmd Entries %d Size %d \r\n",NumcmdEntry,(u32)sizeof(struct ps_cmd_packet) * NumcmdEntry)); + (*HciPacketList) = A_MALLOC(sizeof(struct ps_cmd_packet) * NumcmdEntry); if(NULL == *HciPacketList) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("memory allocation failed \r\n")); } @@ -833,7 +833,7 @@ int AthCreateCommandList(PSCmdPacket **HciPacketList, u32 *numPackets) //////////////////////// ///////////// -static int AthPSCreateHCICommand(u8 Opcode, u32 Param1,PSCmdPacket *PSPatchPacket,u32 *index) +static int AthPSCreateHCICommand(u8 Opcode, u32 Param1,struct ps_cmd_packet *PSPatchPacket,u32 *index) { u8 *HCI_PS_Command; u32 Length; @@ -955,7 +955,7 @@ static int AthPSCreateHCICommand(u8 Opcode, u32 Param1,PSCmdPacket *PSPatchPacke } return 0; } -int AthFreeCommandList(PSCmdPacket **HciPacketList, u32 numPackets) +int AthFreeCommandList(struct ps_cmd_packet **HciPacketList, u32 numPackets) { int i; if(*HciPacketList == NULL) { diff --git a/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsparser.h b/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsparser.h index 62e298d..9378efc 100644 --- a/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsparser.h +++ b/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsparser.h @@ -89,11 +89,11 @@ -typedef struct PSCmdPacket +struct ps_cmd_packet { u8 *Hcipacket; int packetLen; -} PSCmdPacket; +}; /* Parses a Patch information buffer and store it in global structure */ int AthDoParsePatch(u8 *, u32 ); @@ -112,8 +112,8 @@ int AthDoParsePS(u8 *, u32 ); * PS Tag Command(s) * */ -int AthCreateCommandList(PSCmdPacket **, u32 *); +int AthCreateCommandList(struct ps_cmd_packet **, u32 *); /* Cleanup the dynamically allicated HCI command list */ -int AthFreeCommandList(PSCmdPacket **HciPacketList, u32 numPackets); +int AthFreeCommandList(struct ps_cmd_packet **HciPacketList, u32 numPackets); #endif /* __AR3KPSPARSER_H */ -- 1.7.4.15.g7811d From 19378f0640be88088d4be37c6c7f7a0499020ae3 Mon Sep 17 00:00:00 2001 From: Luis R. Rodriguez Date: Mon, 28 Feb 2011 14:32:36 -0800 Subject: [PATCH 52/58] ath6kl: remove-typedef RXTID remove-typedef -s RXTID \ "struct rxtid" drivers/staging/ath6kl/ Cc: Naveen Singh Signed-off-by: Luis R. Rodriguez --- drivers/staging/ath6kl/reorder/aggr_rx_internal.h | 6 ++-- drivers/staging/ath6kl/reorder/rcv_aggr.c | 22 ++++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/staging/ath6kl/reorder/aggr_rx_internal.h b/drivers/staging/ath6kl/reorder/aggr_rx_internal.h index 082a8da..8b091df 100644 --- a/drivers/staging/ath6kl/reorder/aggr_rx_internal.h +++ b/drivers/staging/ath6kl/reorder/aggr_rx_internal.h @@ -73,7 +73,7 @@ typedef struct { }WINDOW_SNAPSHOT; #endif -typedef struct { +struct rxtid { bool aggr; /* is it ON or OFF */ bool progress; /* true when frames have arrived after a timer start */ bool timerMon; /* true if the timer started for the sake of this TID */ @@ -86,7 +86,7 @@ typedef struct { #endif A_NETBUF_QUEUE_T q; /* q head for enqueuing frames for dispatch */ A_MUTEX_T lock; -}RXTID; +}; typedef struct { u32 num_into_aggr; /* hitting at the input of this module */ @@ -106,7 +106,7 @@ struct aggr_info { A_TIMER timer; /* timer for returning held up pkts in re-order que */ void *dev; /* dev handle */ RX_CALLBACK rx_fn; /* callback function to return frames; to upper layer */ - RXTID RxTid[NUM_OF_TIDS]; /* Per tid window */ + struct rxtid RxTid[NUM_OF_TIDS]; /* Per tid window */ ALLOC_NETBUFS netbuf_allocator; /* OS netbuf alloc fn */ A_NETBUF_QUEUE_T freeQ; /* pre-allocated buffers - for A_MSDU slicing */ RXTID_STATS stat[NUM_OF_TIDS]; /* Tid based statistics */ diff --git a/drivers/staging/ath6kl/reorder/rcv_aggr.c b/drivers/staging/ath6kl/reorder/rcv_aggr.c index c54d492..8d13489 100644 --- a/drivers/staging/ath6kl/reorder/rcv_aggr.c +++ b/drivers/staging/ath6kl/reorder/rcv_aggr.c @@ -37,7 +37,7 @@ extern int wmi_dot3_2_dix(void *osbuf); static void -aggr_slice_amsdu(struct aggr_info *p_aggr, RXTID *rxtid, void **osbuf); +aggr_slice_amsdu(struct aggr_info *p_aggr, struct rxtid *rxtid, void **osbuf); static void aggr_timeout(A_ATH_TIMER arg); @@ -55,7 +55,7 @@ void * aggr_init(ALLOC_NETBUFS netbuf_allocator) { struct aggr_info *p_aggr = NULL; - RXTID *rxtid; + struct rxtid *rxtid; u8 i; int status = 0; @@ -103,7 +103,7 @@ aggr_init(ALLOC_NETBUFS netbuf_allocator) static void aggr_delete_tid_state(struct aggr_info *p_aggr, u8 tid) { - RXTID *rxtid; + struct rxtid *rxtid; RXTID_STATS *stats; A_ASSERT(tid < NUM_OF_TIDS && p_aggr); @@ -134,7 +134,7 @@ void aggr_module_destroy(void *cntxt) { struct aggr_info *p_aggr = (struct aggr_info *)cntxt; - RXTID *rxtid; + struct rxtid *rxtid; u8 i, k; A_PRINTF("%s(): aggr = %p\n",_A_FUNCNAME_, p_aggr); A_ASSERT(p_aggr); @@ -204,7 +204,7 @@ void aggr_recv_addba_req_evt(void *cntxt, u8 tid, u16 seq_no, u8 win_sz) { struct aggr_info *p_aggr = (struct aggr_info *)cntxt; - RXTID *rxtid; + struct rxtid *rxtid; RXTID_STATS *stats; A_ASSERT(p_aggr); @@ -256,7 +256,7 @@ void aggr_recv_delba_req_evt(void *cntxt, u8 tid) { struct aggr_info *p_aggr = (struct aggr_info *)cntxt; - RXTID *rxtid; + struct rxtid *rxtid; A_ASSERT(p_aggr); A_PRINTF("%s(): tid %d\n", _A_FUNCNAME_, tid); @@ -271,7 +271,7 @@ aggr_recv_delba_req_evt(void *cntxt, u8 tid) static void aggr_deque_frms(struct aggr_info *p_aggr, u8 tid, u16 seq_no, u8 order) { - RXTID *rxtid; + struct rxtid *rxtid; struct osbuf_hold_q *node; u16 idx, idx_end, seq_end; RXTID_STATS *stats; @@ -356,7 +356,7 @@ aggr_get_osbuf(struct aggr_info *p_aggr) static void -aggr_slice_amsdu(struct aggr_info *p_aggr, RXTID *rxtid, void **osbuf) +aggr_slice_amsdu(struct aggr_info *p_aggr, struct rxtid *rxtid, void **osbuf) { void *new_buf; u16 frame_8023_len, payload_8023_len, mac_hdr_len, amsdu_len; @@ -429,7 +429,7 @@ void aggr_process_recv_frm(void *cntxt, u8 tid, u16 seq_no, bool is_amsdu, void **osbuf) { struct aggr_info *p_aggr = (struct aggr_info *)cntxt; - RXTID *rxtid; + struct rxtid *rxtid; RXTID_STATS *stats; u16 idx, st, cur, end; u16 *log_idx; @@ -577,7 +577,7 @@ aggr_timeout(A_ATH_TIMER arg) { u8 i,j; struct aggr_info *p_aggr = (struct aggr_info *)arg; - RXTID *rxtid; + struct rxtid *rxtid; RXTID_STATS *stats; /* * If the q for which the timer was originally started has @@ -643,7 +643,7 @@ void aggr_dump_stats(void *cntxt, PACKET_LOG **log_buf) { struct aggr_info *p_aggr = (struct aggr_info *)cntxt; - RXTID *rxtid; + struct rxtid *rxtid; RXTID_STATS *stats; u8 i; -- 1.7.4.15.g7811d From 938a143d884446ecc7c66d0a29cb27689dc70800 Mon Sep 17 00:00:00 2001 From: Luis R. Rodriguez Date: Mon, 28 Feb 2011 14:33:58 -0800 Subject: [PATCH 53/58] ath6kl: remove-typedef RXTID_STATS remove-typedef -s RXTID_STATS \ "struct rxtid_stats" drivers/staging/ath6kl/ Cc: Naveen Singh Signed-off-by: Luis R. Rodriguez --- drivers/staging/ath6kl/reorder/aggr_rx_internal.h | 6 +++--- drivers/staging/ath6kl/reorder/rcv_aggr.c | 16 ++++++++-------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/staging/ath6kl/reorder/aggr_rx_internal.h b/drivers/staging/ath6kl/reorder/aggr_rx_internal.h index 8b091df..becbab9 100644 --- a/drivers/staging/ath6kl/reorder/aggr_rx_internal.h +++ b/drivers/staging/ath6kl/reorder/aggr_rx_internal.h @@ -88,7 +88,7 @@ struct rxtid { A_MUTEX_T lock; }; -typedef struct { +struct rxtid_stats { u32 num_into_aggr; /* hitting at the input of this module */ u32 num_dups; /* duplicate */ u32 num_oow; /* out of window */ @@ -98,7 +98,7 @@ typedef struct { u32 num_timeouts; /* num of timeouts, during which frames delivered */ u32 num_hole; /* frame not present, when window moved over */ u32 num_bar; /* num of resets of seq_num, via BAR */ -}RXTID_STATS; +}; struct aggr_info { u8 aggr_sz; /* config value of aggregation size */ @@ -109,7 +109,7 @@ struct aggr_info { struct rxtid RxTid[NUM_OF_TIDS]; /* Per tid window */ ALLOC_NETBUFS netbuf_allocator; /* OS netbuf alloc fn */ A_NETBUF_QUEUE_T freeQ; /* pre-allocated buffers - for A_MSDU slicing */ - RXTID_STATS stat[NUM_OF_TIDS]; /* Tid based statistics */ + struct rxtid_stats stat[NUM_OF_TIDS]; /* Tid based statistics */ PACKET_LOG pkt_log; /* Log info of the packets */ }; diff --git a/drivers/staging/ath6kl/reorder/rcv_aggr.c b/drivers/staging/ath6kl/reorder/rcv_aggr.c index 8d13489..094b227 100644 --- a/drivers/staging/ath6kl/reorder/rcv_aggr.c +++ b/drivers/staging/ath6kl/reorder/rcv_aggr.c @@ -104,7 +104,7 @@ static void aggr_delete_tid_state(struct aggr_info *p_aggr, u8 tid) { struct rxtid *rxtid; - RXTID_STATS *stats; + struct rxtid_stats *stats; A_ASSERT(tid < NUM_OF_TIDS && p_aggr); @@ -127,7 +127,7 @@ aggr_delete_tid_state(struct aggr_info *p_aggr, u8 tid) rxtid->hold_q = NULL; } - A_MEMZERO(stats, sizeof(RXTID_STATS)); + A_MEMZERO(stats, sizeof(struct rxtid_stats)); } void @@ -190,7 +190,7 @@ void aggr_process_bar(void *cntxt, u8 tid, u16 seq_no) { struct aggr_info *p_aggr = (struct aggr_info *)cntxt; - RXTID_STATS *stats; + struct rxtid_stats *stats; A_ASSERT(p_aggr); stats = AGGR_GET_RXTID_STATS(p_aggr, tid); @@ -205,7 +205,7 @@ aggr_recv_addba_req_evt(void *cntxt, u8 tid, u16 seq_no, u8 win_sz) { struct aggr_info *p_aggr = (struct aggr_info *)cntxt; struct rxtid *rxtid; - RXTID_STATS *stats; + struct rxtid_stats *stats; A_ASSERT(p_aggr); rxtid = AGGR_GET_RXTID(p_aggr, tid); @@ -274,7 +274,7 @@ aggr_deque_frms(struct aggr_info *p_aggr, u8 tid, u16 seq_no, u8 order) struct rxtid *rxtid; struct osbuf_hold_q *node; u16 idx, idx_end, seq_end; - RXTID_STATS *stats; + struct rxtid_stats *stats; A_ASSERT(p_aggr); rxtid = AGGR_GET_RXTID(p_aggr, tid); @@ -430,7 +430,7 @@ aggr_process_recv_frm(void *cntxt, u8 tid, u16 seq_no, bool is_amsdu, void **osb { struct aggr_info *p_aggr = (struct aggr_info *)cntxt; struct rxtid *rxtid; - RXTID_STATS *stats; + struct rxtid_stats *stats; u16 idx, st, cur, end; u16 *log_idx; struct osbuf_hold_q *node; @@ -578,7 +578,7 @@ aggr_timeout(A_ATH_TIMER arg) u8 i,j; struct aggr_info *p_aggr = (struct aggr_info *)arg; struct rxtid *rxtid; - RXTID_STATS *stats; + struct rxtid_stats *stats; /* * If the q for which the timer was originally started has * not progressed then it is necessary to dequeue all the @@ -644,7 +644,7 @@ aggr_dump_stats(void *cntxt, PACKET_LOG **log_buf) { struct aggr_info *p_aggr = (struct aggr_info *)cntxt; struct rxtid *rxtid; - RXTID_STATS *stats; + struct rxtid_stats *stats; u8 i; *log_buf = &p_aggr->pkt_log; -- 1.7.4.15.g7811d From fc227c9a71fbf16a8bc945e9d10f731966764734 Mon Sep 17 00:00:00 2001 From: Luis R. Rodriguez Date: Mon, 28 Feb 2011 14:35:32 -0800 Subject: [PATCH 54/58] ath6kl: remove-typedef ST_PS_DATA_FORMAT remove-typedef -s ST_PS_DATA_FORMAT \ "struct st_ps_data_format" drivers/staging/ath6kl/ Cc: Naveen Singh Signed-off-by: Luis R. Rodriguez --- .../staging/ath6kl/miscdrv/ar3kps/ar3kpsparser.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsparser.c b/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsparser.c index b334a3d..7c9d4a8 100644 --- a/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsparser.c +++ b/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsparser.c @@ -100,10 +100,10 @@ typedef struct tRamPatch -typedef struct ST_PS_DATA_FORMAT { +struct st_ps_data_format { enum eType eDataType; bool bIsArray; -}ST_PS_DATA_FORMAT; +}; typedef struct ST_READ_STATUS { unsigned uTagID; @@ -146,7 +146,7 @@ char AthReadChar(u8 *buffer, u32 len,u32 *pos) } } /* PS parser helper function */ -unsigned int uGetInputDataFormat(char *pCharLine, ST_PS_DATA_FORMAT *pstFormat) +unsigned int uGetInputDataFormat(char *pCharLine, struct st_ps_data_format *pstFormat) { if(pCharLine[0] != '[') { pstFormat->eDataType = eHex; @@ -286,7 +286,7 @@ unsigned int uGetInputDataFormat(char *pCharLine, ST_PS_DATA_FORMAT *pstFormat) } } -unsigned int uReadDataInSection(char *pCharLine, ST_PS_DATA_FORMAT stPS_DataFormat) +unsigned int uReadDataInSection(char *pCharLine, struct st_ps_data_format stPS_DataFormat) { char *pTokenPtr = pCharLine; @@ -327,7 +327,7 @@ int AthParseFilesUnified(u8 *srcbuffer,u32 srclen, int FileFormat) int uReadCount; - ST_PS_DATA_FORMAT stPS_DataFormat; + struct st_ps_data_format stPS_DataFormat; ST_READ_STATUS stReadStatus = {0, 0, 0,0}; pos = 0; Buffer = NULL; -- 1.7.4.15.g7811d From a4d7eeb29bcbfd5b97062f1474b9ddb47e0fb46e Mon Sep 17 00:00:00 2001 From: Luis R. Rodriguez Date: Mon, 28 Feb 2011 14:36:45 -0800 Subject: [PATCH 55/58] ath6kl: remove-typedef ST_READ_STATUS remove-typedef -s ST_READ_STATUS \ "struct st_read_status" drivers/staging/ath6kl/ Cc: Naveen Singh Signed-off-by: Luis R. Rodriguez --- .../staging/ath6kl/miscdrv/ar3kps/ar3kpsparser.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsparser.c b/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsparser.c index 7c9d4a8..94a0939 100644 --- a/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsparser.c +++ b/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsparser.c @@ -105,13 +105,13 @@ struct st_ps_data_format { bool bIsArray; }; -typedef struct ST_READ_STATUS { +struct st_read_status { unsigned uTagID; unsigned uSection; unsigned uLineCount; unsigned uCharCount; unsigned uByteCount; -}ST_READ_STATUS; +}; /* Stores the number of PS Tags */ @@ -328,7 +328,7 @@ int AthParseFilesUnified(u8 *srcbuffer,u32 srclen, int FileFormat) int uReadCount; struct st_ps_data_format stPS_DataFormat; - ST_READ_STATUS stReadStatus = {0, 0, 0,0}; + struct st_read_status stReadStatus = {0, 0, 0,0}; pos = 0; Buffer = NULL; -- 1.7.4.15.g7811d From a4c10b614c785766694c7663acbdf2d6bd406c49 Mon Sep 17 00:00:00 2001 From: Luis R. Rodriguez Date: Mon, 28 Feb 2011 14:38:23 -0800 Subject: [PATCH 56/58] ath6kl: remove-typedef WINDOW_SNAPSHOT remove-typedef -s WINDOW_SNAPSHOT \ "struct window_snapshot" drivers/staging/ath6kl/ Cc: Naveen Singh Signed-off-by: Luis R. Rodriguez --- drivers/staging/ath6kl/reorder/aggr_rx_internal.h | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/staging/ath6kl/reorder/aggr_rx_internal.h b/drivers/staging/ath6kl/reorder/aggr_rx_internal.h index becbab9..1112596 100644 --- a/drivers/staging/ath6kl/reorder/aggr_rx_internal.h +++ b/drivers/staging/ath6kl/reorder/aggr_rx_internal.h @@ -67,10 +67,11 @@ struct osbuf_hold_q { #if 0 -typedef struct { +/* XXX: unused ? */ +struct window_snapshot { u16 seqno_st; u16 seqno_end; -}WINDOW_SNAPSHOT; +}; #endif struct rxtid { @@ -82,7 +83,7 @@ struct rxtid { u32 hold_q_sz; /* Num of frames that can be held in hold q */ struct osbuf_hold_q *hold_q; /* Hold q for re-order */ #if 0 - WINDOW_SNAPSHOT old_win; /* Sliding window snapshot - for timeout */ + struct window_snapshot old_win; /* Sliding window snapshot - for timeout */ #endif A_NETBUF_QUEUE_T q; /* q head for enqueuing frames for dispatch */ A_MUTEX_T lock; -- 1.7.4.15.g7811d From d9c06ee7c9da0a8c0e677c53ffa368b0f879fcce Mon Sep 17 00:00:00 2001 From: Luis R. Rodriguez Date: Mon, 28 Feb 2011 14:40:16 -0800 Subject: [PATCH 57/58] ath6kl: remove-typedef AR_SOFTC_T remove-typedef -s AR_SOFTC_T \ "struct ar6_softc" drivers/staging/ath6kl/ Cc: Naveen Singh Signed-off-by: Luis R. Rodriguez --- drivers/staging/ath6kl/os/linux/ar6000_android.c | 2 +- drivers/staging/ath6kl/os/linux/ar6000_drv.c | 242 ++++++++++---------- drivers/staging/ath6kl/os/linux/ar6000_pm.c | 18 +- drivers/staging/ath6kl/os/linux/ar6000_raw_if.c | 18 +- drivers/staging/ath6kl/os/linux/ar6k_pal.c | 8 +- drivers/staging/ath6kl/os/linux/cfg80211.c | 50 ++-- drivers/staging/ath6kl/os/linux/hci_bridge.c | 24 +- .../staging/ath6kl/os/linux/include/ar6000_drv.h | 36 ++-- drivers/staging/ath6kl/os/linux/include/cfg80211.h | 10 +- drivers/staging/ath6kl/os/linux/ioctl.c | 112 +++++----- drivers/staging/ath6kl/os/linux/wireless_ext.c | 66 +++--- 11 files changed, 293 insertions(+), 293 deletions(-) diff --git a/drivers/staging/ath6kl/os/linux/ar6000_android.c b/drivers/staging/ath6kl/os/linux/ar6000_android.c index f7d1069..f40ec8f 100644 --- a/drivers/staging/ath6kl/os/linux/ar6000_android.c +++ b/drivers/staging/ath6kl/os/linux/ar6000_android.c @@ -336,7 +336,7 @@ void android_module_exit(void) } #ifdef CONFIG_PM -void android_ar6k_check_wow_status(AR_SOFTC_T *ar, struct sk_buff *skb, bool isEvent) +void android_ar6k_check_wow_status(struct ar6_softc *ar, struct sk_buff *skb, bool isEvent) { if ( #ifdef CONFIG_HAS_EARLYSUSPEND diff --git a/drivers/staging/ath6kl/os/linux/ar6000_drv.c b/drivers/staging/ath6kl/os/linux/ar6000_drv.c index 41c66b7..27cb02d 100644 --- a/drivers/staging/ath6kl/os/linux/ar6000_drv.c +++ b/drivers/staging/ath6kl/os/linux/ar6000_drv.c @@ -281,7 +281,7 @@ static void ar6000_cleanup_module(void); int ar6000_init(struct net_device *dev); static int ar6000_open(struct net_device *dev); static int ar6000_close(struct net_device *dev); -static void ar6000_init_control_info(AR_SOFTC_T *ar); +static void ar6000_init_control_info(struct ar6_softc *ar); static int ar6000_data_tx(struct sk_buff *skb, struct net_device *dev); void ar6000_destroy(struct net_device *dev, unsigned int unregister); @@ -292,7 +292,7 @@ static struct iw_statistics *ar6000_get_iwstats(struct net_device * dev); static void disconnect_timer_handler(unsigned long ptr); -void read_rssi_compensation_param(AR_SOFTC_T *ar); +void read_rssi_compensation_param(struct ar6_softc *ar); /* for android builds we call external APIs that handle firmware download and configuration */ #ifdef ANDROID_ENV @@ -309,7 +309,7 @@ static int ar6000_avail_ev(void *context, void *hif_handle); static int ar6000_unavail_ev(void *context, void *hif_handle); -int ar6000_configure_target(AR_SOFTC_T *ar); +int ar6000_configure_target(struct ar6_softc *ar); static void ar6000_target_failure(void *Instance, int Status); @@ -329,9 +329,9 @@ static void ar6000_deliver_frames_to_nw_stack(void * dev, void *osbuf); static struct htc_packet *ar6000_alloc_amsdu_rxbuf(void *Context, HTC_ENDPOINT_ID Endpoint, int Length); -static void ar6000_refill_amsdu_rxbufs(AR_SOFTC_T *ar, int Count); +static void ar6000_refill_amsdu_rxbufs(struct ar6_softc *ar, int Count); -static void ar6000_cleanup_amsdu_rxbufs(AR_SOFTC_T *ar); +static void ar6000_cleanup_amsdu_rxbufs(struct ar6_softc *ar); static ssize_t ar6000_sysfs_bmi_read(struct file *fp, struct kobject *kobj, @@ -344,17 +344,17 @@ ar6000_sysfs_bmi_write(struct file *fp, struct kobject *kobj, char *buf, loff_t pos, size_t count); static int -ar6000_sysfs_bmi_init(AR_SOFTC_T *ar); +ar6000_sysfs_bmi_init(struct ar6_softc *ar); /* HCI PAL callback function declarations */ -int ar6k_setup_hci_pal(AR_SOFTC_T *ar); -void ar6k_cleanup_hci_pal(AR_SOFTC_T *ar); +int ar6k_setup_hci_pal(struct ar6_softc *ar); +void ar6k_cleanup_hci_pal(struct ar6_softc *ar); static void -ar6000_sysfs_bmi_deinit(AR_SOFTC_T *ar); +ar6000_sysfs_bmi_deinit(struct ar6_softc *ar); int -ar6000_sysfs_bmi_get_config(AR_SOFTC_T *ar, u32 mode); +ar6000_sysfs_bmi_get_config(struct ar6_softc *ar, u32 mode); /* * Static variables @@ -364,13 +364,13 @@ struct net_device *ar6000_devices[MAX_AR6000]; static int is_netdev_registered; extern struct iw_handler_def ath_iw_handler_def; DECLARE_WAIT_QUEUE_HEAD(arEvent); -static void ar6000_cookie_init(AR_SOFTC_T *ar); -static void ar6000_cookie_cleanup(AR_SOFTC_T *ar); -static void ar6000_free_cookie(AR_SOFTC_T *ar, struct ar_cookie * cookie); -static struct ar_cookie *ar6000_alloc_cookie(AR_SOFTC_T *ar); +static void ar6000_cookie_init(struct ar6_softc *ar); +static void ar6000_cookie_cleanup(struct ar6_softc *ar); +static void ar6000_free_cookie(struct ar6_softc *ar, struct ar_cookie * cookie); +static struct ar_cookie *ar6000_alloc_cookie(struct ar6_softc *ar); #ifdef USER_KEYS -static int ar6000_reinstall_keys(AR_SOFTC_T *ar,u8 key_op_ctrl); +static int ar6000_reinstall_keys(struct ar6_softc *ar,u8 key_op_ctrl); #endif #ifdef CONFIG_AP_VIRTUAL_ADAPTER_SUPPORT @@ -403,7 +403,7 @@ static struct net_device_ops ar6000_netdev_ops = { #define REPORT_DEBUG_LOGS_TO_APP int -ar6000_set_host_app_area(AR_SOFTC_T *ar) +ar6000_set_host_app_area(struct ar6_softc *ar) { u32 address, data; struct host_app_area_s host_app_area; @@ -425,7 +425,7 @@ ar6000_set_host_app_area(AR_SOFTC_T *ar) return 0; } -u32 dbglog_get_debug_hdr_ptr(AR_SOFTC_T *ar) +u32 dbglog_get_debug_hdr_ptr(struct ar6_softc *ar) { u32 param; u32 address; @@ -446,7 +446,7 @@ u32 dbglog_get_debug_hdr_ptr(AR_SOFTC_T *ar) * data stuctures over the diagnostic window. */ void -ar6000_dbglog_init_done(AR_SOFTC_T *ar) +ar6000_dbglog_init_done(struct ar6_softc *ar) { ar->dbglog_init_done = true; } @@ -518,7 +518,7 @@ dbglog_parse_debug_logs(s8 *datap, u32 len) } int -ar6000_dbglog_get_debug_logs(AR_SOFTC_T *ar) +ar6000_dbglog_get_debug_logs(struct ar6_softc *ar) { u32 data[8]; /* Should be able to accomodate struct dbglog_buf_s */ u32 address; @@ -596,7 +596,7 @@ ar6000_dbglog_get_debug_logs(AR_SOFTC_T *ar) } void -ar6000_dbglog_event(AR_SOFTC_T *ar, u32 dropped, +ar6000_dbglog_event(struct ar6_softc *ar, u32 dropped, s8 *buffer, u32 length) { #ifdef REPORT_DEBUG_LOGS_TO_APP @@ -738,10 +738,10 @@ aptcTimerHandler(unsigned long arg) { u32 numbytes; u32 throughput; - AR_SOFTC_T *ar; + struct ar6_softc *ar; int status; - ar = (AR_SOFTC_T *)arg; + ar = (struct ar6_softc *)arg; A_ASSERT(ar != NULL); A_ASSERT(!timer_pending(&aptcTimer)); @@ -802,12 +802,12 @@ ar6000_sysfs_bmi_read(struct file *fp, struct kobject *kobj, char *buf, loff_t pos, size_t count) { int index; - AR_SOFTC_T *ar; + struct ar6_softc *ar; struct hif_device_os_device_info *osDevInfo; AR_DEBUG_PRINTF(ATH_DEBUG_INFO,("BMI: Read %d bytes\n", (u32)count)); for (index=0; index < MAX_AR6000; index++) { - ar = (AR_SOFTC_T *)ar6k_priv(ar6000_devices[index]); + ar = (struct ar6_softc *)ar6k_priv(ar6000_devices[index]); osDevInfo = &ar->osDevInfo; if (kobj == (&(((struct device *)osDevInfo->pOSDevice)->kobj))) { break; @@ -829,12 +829,12 @@ ar6000_sysfs_bmi_write(struct file *fp, struct kobject *kobj, char *buf, loff_t pos, size_t count) { int index; - AR_SOFTC_T *ar; + struct ar6_softc *ar; struct hif_device_os_device_info *osDevInfo; AR_DEBUG_PRINTF(ATH_DEBUG_INFO,("BMI: Write %d bytes\n", (u32)count)); for (index=0; index < MAX_AR6000; index++) { - ar = (AR_SOFTC_T *)ar6k_priv(ar6000_devices[index]); + ar = (struct ar6_softc *)ar6k_priv(ar6000_devices[index]); osDevInfo = &ar->osDevInfo; if (kobj == (&(((struct device *)osDevInfo->pOSDevice)->kobj))) { break; @@ -851,7 +851,7 @@ ar6000_sysfs_bmi_write(struct file *fp, struct kobject *kobj, } static int -ar6000_sysfs_bmi_init(AR_SOFTC_T *ar) +ar6000_sysfs_bmi_init(struct ar6_softc *ar) { int status; @@ -880,7 +880,7 @@ ar6000_sysfs_bmi_init(AR_SOFTC_T *ar) } static void -ar6000_sysfs_bmi_deinit(AR_SOFTC_T *ar) +ar6000_sysfs_bmi_deinit(struct ar6_softc *ar) { AR_DEBUG_PRINTF(ATH_DEBUG_INFO,("BMI: Deleting sysfs entry\n")); @@ -941,7 +941,7 @@ void calculate_crc(u32 TargetType, u8 *eeprom_data) } static void -ar6000_softmac_update(AR_SOFTC_T *ar, u8 *eeprom_data, size_t size) +ar6000_softmac_update(struct ar6_softc *ar, u8 *eeprom_data, size_t size) { const char *source = "random generated"; const struct firmware *softmac_entry; @@ -992,7 +992,7 @@ ar6000_softmac_update(AR_SOFTC_T *ar, u8 *eeprom_data, size_t size) #endif /* SOFTMAC_FILE_USED */ static int -ar6000_transfer_bin_file(AR_SOFTC_T *ar, AR6K_BIN_FILE file, u32 address, bool compressed) +ar6000_transfer_bin_file(struct ar6_softc *ar, AR6K_BIN_FILE file, u32 address, bool compressed) { int status; const char *filename; @@ -1156,7 +1156,7 @@ ar6000_transfer_bin_file(AR_SOFTC_T *ar, AR6K_BIN_FILE file, u32 address, bool c #endif /* INIT_MODE_DRV_ENABLED */ int -ar6000_update_bdaddr(AR_SOFTC_T *ar) +ar6000_update_bdaddr(struct ar6_softc *ar) { if (setupbtdev != 0) { @@ -1183,7 +1183,7 @@ return 0; } int -ar6000_sysfs_bmi_get_config(AR_SOFTC_T *ar, u32 mode) +ar6000_sysfs_bmi_get_config(struct ar6_softc *ar, u32 mode) { AR_DEBUG_PRINTF(ATH_DEBUG_INFO,("BMI: Requesting device specific configuration\n")); @@ -1398,7 +1398,7 @@ ar6000_sysfs_bmi_get_config(AR_SOFTC_T *ar, u32 mode) } int -ar6000_configure_target(AR_SOFTC_T *ar) +ar6000_configure_target(struct ar6_softc *ar) { u32 param; if (enableuartprint) { @@ -1597,7 +1597,7 @@ ar6000_avail_ev(void *context, void *hif_handle) int i; struct net_device *dev; void *ar_netif; - AR_SOFTC_T *ar; + struct ar6_softc *ar; int device_index = 0; struct htc_init_info htcInfo; #ifdef ATH6K_CONFIG_CFG80211 @@ -1638,7 +1638,7 @@ ar6000_avail_ev(void *context, void *hif_handle) } ar_netif = wdev_priv(wdev); #else - dev = alloc_etherdev(sizeof(AR_SOFTC_T)); + dev = alloc_etherdev(sizeof(struct ar6_softc)); if (dev == NULL) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("ar6000_available: can't alloc etherdev\n")); return A_ERROR; @@ -1652,8 +1652,8 @@ ar6000_avail_ev(void *context, void *hif_handle) return A_ERROR; } - A_MEMZERO(ar_netif, sizeof(AR_SOFTC_T)); - ar = (AR_SOFTC_T *)ar_netif; + A_MEMZERO(ar_netif, sizeof(struct ar6_softc)); + ar = (struct ar6_softc *)ar_netif; #ifdef ATH6K_CONFIG_CFG80211 ar->wdev = wdev; @@ -1854,7 +1854,7 @@ avail_ev_failed : static void ar6000_target_failure(void *Instance, int Status) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)Instance; + struct ar6_softc *ar = (struct ar6_softc *)Instance; WMI_TARGET_ERROR_REPORT_EVENT errEvent; static bool sip = false; @@ -1890,7 +1890,7 @@ static void ar6000_target_failure(void *Instance, int Status) static int ar6000_unavail_ev(void *context, void *hif_handle) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)context; + struct ar6_softc *ar = (struct ar6_softc *)context; /* NULL out it's entry in the global list */ ar6000_devices[ar->arDeviceIndex] = NULL; ar6000_destroy(ar->arNetDev, 1); @@ -1902,7 +1902,7 @@ void ar6000_restart_endpoint(struct net_device *dev) { int status = 0; - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); BMIInit(); do { @@ -1936,7 +1936,7 @@ ar6000_restart_endpoint(struct net_device *dev) void ar6000_stop_endpoint(struct net_device *dev, bool keepprofile, bool getdbglogs) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); /* Stop the transmit queues */ netif_stop_queue(dev); @@ -2074,7 +2074,7 @@ ar6000_stop_endpoint(struct net_device *dev, bool keepprofile, bool getdbglogs) void ar6000_destroy(struct net_device *dev, unsigned int unregister) { - AR_SOFTC_T *ar; + struct ar6_softc *ar; AR_DEBUG_PRINTF(ATH_DEBUG_INFO,("+ar6000_destroy \n")); @@ -2159,7 +2159,7 @@ ar6000_destroy(struct net_device *dev, unsigned int unregister) static void disconnect_timer_handler(unsigned long ptr) { struct net_device *dev = (struct net_device *)ptr; - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); A_UNTIMEOUT(&ar->disconnect_timer); @@ -2170,7 +2170,7 @@ static void disconnect_timer_handler(unsigned long ptr) static void ar6000_detect_error(unsigned long ptr) { struct net_device *dev = (struct net_device *)ptr; - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); WMI_TARGET_ERROR_REPORT_EVENT errEvent; AR6000_SPIN_LOCK(&ar->arLock, 0); @@ -2209,7 +2209,7 @@ static void ar6000_detect_error(unsigned long ptr) A_TIMEOUT_MS(&ar->arHBChallengeResp.timer, ar->arHBChallengeResp.frequency * 1000, 0); } -void ar6000_init_profile_info(AR_SOFTC_T *ar) +void ar6000_init_profile_info(struct ar6_softc *ar) { ar->arSsidLen = 0; A_MEMZERO(ar->arSsid, sizeof(ar->arSsid)); @@ -2239,7 +2239,7 @@ void ar6000_init_profile_info(AR_SOFTC_T *ar) } static void -ar6000_init_control_info(AR_SOFTC_T *ar) +ar6000_init_control_info(struct ar6_softc *ar) { ar->arWmiEnabled = false; ar6000_init_profile_info(ar); @@ -2291,7 +2291,7 @@ static int ar6000_open(struct net_device *dev) { unsigned long flags; - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); spin_lock_irqsave(&ar->arLock, flags); @@ -2317,7 +2317,7 @@ static int ar6000_close(struct net_device *dev) { #ifdef ATH6K_CONFIG_CFG80211 - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); #endif /* ATH6K_CONFIG_CFG80211 */ netif_stop_queue(dev); @@ -2338,7 +2338,7 @@ ar6000_close(struct net_device *dev) } /* connect to a service */ -static int ar6000_connectservice(AR_SOFTC_T *ar, +static int ar6000_connectservice(struct ar6_softc *ar, struct htc_service_connect_req *pConnect, char *pDesc) { @@ -2390,7 +2390,7 @@ static int ar6000_connectservice(AR_SOFTC_T *ar, return status; } -void ar6000_TxDataCleanup(AR_SOFTC_T *ar) +void ar6000_TxDataCleanup(struct ar6_softc *ar) { /* flush all the data (non-control) streams * we only flush packets that are tagged as data, we leave any control packets that @@ -2412,20 +2412,20 @@ void ar6000_TxDataCleanup(AR_SOFTC_T *ar) HTC_ENDPOINT_ID ar6000_ac2_endpoint_id ( void * devt, u8 ac) { - AR_SOFTC_T *ar = (AR_SOFTC_T *) devt; + struct ar6_softc *ar = (struct ar6_softc *) devt; return(arAc2EndpointID(ar, ac)); } u8 ar6000_endpoint_id2_ac(void * devt, HTC_ENDPOINT_ID ep ) { - AR_SOFTC_T *ar = (AR_SOFTC_T *) devt; + struct ar6_softc *ar = (struct ar6_softc *) devt; return(arEndpoint2Ac(ar, ep )); } /* * This function applies WLAN specific configuration defined in wlan_config.h */ -int ar6000_target_config_wlan_params(AR_SOFTC_T *ar) +int ar6000_target_config_wlan_params(struct ar6_softc *ar) { int status = 0; #if defined(INIT_MODE_DRV_ENABLED) && defined(ENABLE_COEXISTENCE) @@ -2546,7 +2546,7 @@ int ar6000_target_config_wlan_params(AR_SOFTC_T *ar) /* This function does one time initialization for the lifetime of the device */ int ar6000_init(struct net_device *dev) { - AR_SOFTC_T *ar; + struct ar6_softc *ar; int status; s32 timeleft; s16 i; @@ -2845,7 +2845,7 @@ ar6000_init_done: void ar6000_bitrate_rx(void *devt, s32 rateKbps) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)devt; + struct ar6_softc *ar = (struct ar6_softc *)devt; ar->arBitRate = rateKbps; wake_up(&arEvent); @@ -2854,7 +2854,7 @@ ar6000_bitrate_rx(void *devt, s32 rateKbps) void ar6000_ratemask_rx(void *devt, u32 ratemask) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)devt; + struct ar6_softc *ar = (struct ar6_softc *)devt; ar->arRateMask = ratemask; wake_up(&arEvent); @@ -2863,7 +2863,7 @@ ar6000_ratemask_rx(void *devt, u32 ratemask) void ar6000_txPwr_rx(void *devt, u8 txPwr) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)devt; + struct ar6_softc *ar = (struct ar6_softc *)devt; ar->arTxPwr = txPwr; wake_up(&arEvent); @@ -2873,7 +2873,7 @@ ar6000_txPwr_rx(void *devt, u8 txPwr) void ar6000_channelList_rx(void *devt, s8 numChan, u16 *chanList) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)devt; + struct ar6_softc *ar = (struct ar6_softc *)devt; memcpy(ar->arChannelList, chanList, numChan * sizeof (u16)); ar->arNumChannels = numChan; @@ -2883,7 +2883,7 @@ ar6000_channelList_rx(void *devt, s8 numChan, u16 *chanList) u8 ar6000_ibss_map_epid(struct sk_buff *skb, struct net_device *dev, u32 *mapNo) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); u8 *datap; ATH_MAC_HDR *macHdr; u32 i, eptMap; @@ -2952,14 +2952,14 @@ static void ar6000_dump_skb(struct sk_buff *skb) #endif #ifdef HTC_TEST_SEND_PKTS -static void DoHTCSendPktsTest(AR_SOFTC_T *ar, int MapNo, HTC_ENDPOINT_ID eid, struct sk_buff *skb); +static void DoHTCSendPktsTest(struct ar6_softc *ar, int MapNo, HTC_ENDPOINT_ID eid, struct sk_buff *skb); #endif static int ar6000_data_tx(struct sk_buff *skb, struct net_device *dev) { #define AC_NOT_MAPPED 99 - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); u8 ac = AC_NOT_MAPPED; HTC_ENDPOINT_ID eid = ENDPOINT_UNUSED; u32 mapNo = 0; @@ -3281,7 +3281,7 @@ ar6000_data_tx(struct sk_buff *skb, struct net_device *dev) int ar6000_acl_data_tx(struct sk_buff *skb, struct net_device *dev) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); struct ar_cookie *cookie; HTC_ENDPOINT_ID eid = ENDPOINT_UNUSED; @@ -3337,7 +3337,7 @@ tvsub(register struct timeval *out, register struct timeval *in) } void -applyAPTCHeuristics(AR_SOFTC_T *ar) +applyAPTCHeuristics(struct ar6_softc *ar) { u32 duration; u32 numbytes; @@ -3378,7 +3378,7 @@ applyAPTCHeuristics(AR_SOFTC_T *ar) static HTC_SEND_FULL_ACTION ar6000_tx_queue_full(void *Context, struct htc_packet *pPacket) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)Context; + struct ar6_softc *ar = (struct ar6_softc *)Context; HTC_SEND_FULL_ACTION action = HTC_SEND_FULL_KEEP; bool stopNet = false; HTC_ENDPOINT_ID Endpoint = HTC_GET_ENDPOINT_FROM_PKT(pPacket); @@ -3463,7 +3463,7 @@ static HTC_SEND_FULL_ACTION ar6000_tx_queue_full(void *Context, struct htc_packe static void ar6000_tx_complete(void *Context, struct htc_packet_queue *pPacketQueue) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)Context; + struct ar6_softc *ar = (struct ar6_softc *)Context; u32 mapNo = 0; int status; struct ar_cookie * ar_cookie; @@ -3599,7 +3599,7 @@ ar6000_tx_complete(void *Context, struct htc_packet_queue *pPacketQueue) } sta_t * -ieee80211_find_conn(AR_SOFTC_T *ar, u8 *node_addr) +ieee80211_find_conn(struct ar6_softc *ar, u8 *node_addr) { sta_t *conn = NULL; u8 i, max_conn; @@ -3623,7 +3623,7 @@ ieee80211_find_conn(AR_SOFTC_T *ar, u8 *node_addr) return conn; } -sta_t *ieee80211_find_conn_for_aid(AR_SOFTC_T *ar, u8 aid) +sta_t *ieee80211_find_conn_for_aid(struct ar6_softc *ar, u8 aid) { sta_t *conn = NULL; u8 ctr; @@ -3644,7 +3644,7 @@ int pktcount; static void ar6000_rx(void *Context, struct htc_packet *pPacket) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)Context; + struct ar6_softc *ar = (struct ar6_softc *)Context; struct sk_buff *skb = (struct sk_buff *)pPacket->pPktContext; int minHdrLen; u8 containsDot11Hdr = 0; @@ -3942,7 +3942,7 @@ ar6000_deliver_frames_to_nw_stack(void *dev, void *osbuf) skb->dev = dev; if ((skb->dev->flags & IFF_UP) == IFF_UP) { #ifdef CONFIG_PM - ar6000_check_wow_status((AR_SOFTC_T *)ar6k_priv(dev), skb, false); + ar6000_check_wow_status((struct ar6_softc *)ar6k_priv(dev), skb, false); #endif /* CONFIG_PM */ skb->protocol = eth_type_trans(skb, skb->dev); /* @@ -3987,7 +3987,7 @@ ar6000_deliver_frames_to_bt_stack(void *dev, void *osbuf) static void ar6000_rx_refill(void *Context, HTC_ENDPOINT_ID Endpoint) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)Context; + struct ar6_softc *ar = (struct ar6_softc *)Context; void *osBuf; int RxBuffers; int buffersToRefill; @@ -4029,7 +4029,7 @@ ar6000_rx_refill(void *Context, HTC_ENDPOINT_ID Endpoint) } /* clean up our amsdu buffer list */ -static void ar6000_cleanup_amsdu_rxbufs(AR_SOFTC_T *ar) +static void ar6000_cleanup_amsdu_rxbufs(struct ar6_softc *ar) { struct htc_packet *pPacket; void *osBuf; @@ -4058,7 +4058,7 @@ static void ar6000_cleanup_amsdu_rxbufs(AR_SOFTC_T *ar) /* refill the amsdu buffer list */ -static void ar6000_refill_amsdu_rxbufs(AR_SOFTC_T *ar, int Count) +static void ar6000_refill_amsdu_rxbufs(struct ar6_softc *ar, int Count) { struct htc_packet *pPacket; void *osBuf; @@ -4093,7 +4093,7 @@ static void ar6000_refill_amsdu_rxbufs(AR_SOFTC_T *ar, int Count) static struct htc_packet *ar6000_alloc_amsdu_rxbuf(void *Context, HTC_ENDPOINT_ID Endpoint, int Length) { struct htc_packet *pPacket = NULL; - AR_SOFTC_T *ar = (AR_SOFTC_T *)Context; + struct ar6_softc *ar = (struct ar6_softc *)Context; int refillCount = 0; AR_DEBUG_PRINTF(ATH_DEBUG_WLAN_RX,("ar6000_alloc_amsdu_rxbuf: eid=%d, Length:%d\n",Endpoint,Length)); @@ -4142,14 +4142,14 @@ ar6000_set_multicast_list(struct net_device *dev) static struct net_device_stats * ar6000_get_stats(struct net_device *dev) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); return &ar->arNetStats; } static struct iw_statistics * ar6000_get_iwstats(struct net_device * dev) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); TARGET_STATS *pStats = &ar->arTargetStats; struct iw_statistics * pIwStats = &ar->arIwStats; int rtnllocked; @@ -4236,7 +4236,7 @@ err_exit: void ar6000_ready_event(void *devt, u8 *datap, u8 phyCap, u32 sw_ver, u32 abi_ver) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)devt; + struct ar6_softc *ar = (struct ar6_softc *)devt; struct net_device *dev = ar->arNetDev; memcpy(dev->dev_addr, datap, AR6000_ETH_ADDR_LEN); @@ -4255,7 +4255,7 @@ ar6000_ready_event(void *devt, u8 *datap, u8 phyCap, u32 sw_ver, u32 abi_ver) } void -add_new_sta(AR_SOFTC_T *ar, u8 *mac, u16 aid, u8 *wpaie, +add_new_sta(struct ar6_softc *ar, u8 *mac, u16 aid, u8 *wpaie, u8 ielen, u8 keymgmt, u8 ucipher, u8 auth) { u8 free_slot=aid-1; @@ -4271,7 +4271,7 @@ add_new_sta(AR_SOFTC_T *ar, u8 *mac, u16 aid, u8 *wpaie, } void -ar6000_connect_event(AR_SOFTC_T *ar, u16 channel, u8 *bssid, +ar6000_connect_event(struct ar6_softc *ar, u16 channel, u8 *bssid, u16 listenInterval, u16 beaconInterval, NETWORK_TYPE networkType, u8 beaconIeLen, u8 assocReqLen, u8 assocRespLen, @@ -4557,14 +4557,14 @@ skip_key: } -void ar6000_set_numdataendpts(AR_SOFTC_T *ar, u32 num) +void ar6000_set_numdataendpts(struct ar6_softc *ar, u32 num) { A_ASSERT(num <= (HTC_MAILBOX_NUM_MAX - 1)); ar->arNumDataEndPts = num; } void -sta_cleanup(AR_SOFTC_T *ar, u8 i) +sta_cleanup(struct ar6_softc *ar, u8 i) { struct sk_buff *skb; @@ -4587,7 +4587,7 @@ sta_cleanup(AR_SOFTC_T *ar, u8 i) } -u8 remove_sta(AR_SOFTC_T *ar, u8 *mac, u16 reason) +u8 remove_sta(struct ar6_softc *ar, u8 *mac, u16 reason) { u8 i, removed=0; @@ -4620,7 +4620,7 @@ u8 remove_sta(AR_SOFTC_T *ar, u8 *mac, u16 reason) } void -ar6000_disconnect_event(AR_SOFTC_T *ar, u8 reason, u8 *bssid, +ar6000_disconnect_event(struct ar6_softc *ar, u8 reason, u8 *bssid, u8 assocRespLen, u8 *assocInfo, u16 protocolReasonStatus) { u8 i; @@ -4768,7 +4768,7 @@ ar6000_disconnect_event(AR_SOFTC_T *ar, u8 reason, u8 *bssid, } void -ar6000_regDomain_event(AR_SOFTC_T *ar, u32 regCode) +ar6000_regDomain_event(struct ar6_softc *ar, u32 regCode) { A_PRINTF("AR6000 Reg Code = 0x%x\n", regCode); ar->arRegCode = regCode; @@ -4776,7 +4776,7 @@ ar6000_regDomain_event(AR_SOFTC_T *ar, u32 regCode) #ifdef ATH_AR6K_11N_SUPPORT void -ar6000_aggr_rcv_addba_req_evt(AR_SOFTC_T *ar, WMI_ADDBA_REQ_EVENT *evt) +ar6000_aggr_rcv_addba_req_evt(struct ar6_softc *ar, WMI_ADDBA_REQ_EVENT *evt) { if(evt->status == 0) { aggr_recv_addba_req_evt(ar->aggr_cntxt, evt->tid, evt->st_seq_no, evt->win_sz); @@ -4784,7 +4784,7 @@ ar6000_aggr_rcv_addba_req_evt(AR_SOFTC_T *ar, WMI_ADDBA_REQ_EVENT *evt) } void -ar6000_aggr_rcv_addba_resp_evt(AR_SOFTC_T *ar, WMI_ADDBA_RESP_EVENT *evt) +ar6000_aggr_rcv_addba_resp_evt(struct ar6_softc *ar, WMI_ADDBA_RESP_EVENT *evt) { A_PRINTF("ADDBA RESP. tid %d status %d, sz %d\n", evt->tid, evt->status, evt->amsdu_sz); if(evt->status == 0) { @@ -4792,7 +4792,7 @@ ar6000_aggr_rcv_addba_resp_evt(AR_SOFTC_T *ar, WMI_ADDBA_RESP_EVENT *evt) } void -ar6000_aggr_rcv_delba_req_evt(AR_SOFTC_T *ar, WMI_DELBA_EVENT *evt) +ar6000_aggr_rcv_delba_req_evt(struct ar6_softc *ar, WMI_DELBA_EVENT *evt) { aggr_recv_delba_req_evt(ar->aggr_cntxt, evt->tid); } @@ -4849,7 +4849,7 @@ ar6000_hci_event_rcv_evt(struct ar6_softc *ar, WMI_HCI_EVENT *cmd) } void -ar6000_neighborReport_event(AR_SOFTC_T *ar, int numAps, WMI_NEIGHBOR_INFO *info) +ar6000_neighborReport_event(struct ar6_softc *ar, int numAps, WMI_NEIGHBOR_INFO *info) { #if WIRELESS_EXT >= 18 struct iw_pmkid_cand *pmkcand; @@ -4897,7 +4897,7 @@ ar6000_neighborReport_event(AR_SOFTC_T *ar, int numAps, WMI_NEIGHBOR_INFO *info) } void -ar6000_tkip_micerr_event(AR_SOFTC_T *ar, u8 keyid, bool ismcast) +ar6000_tkip_micerr_event(struct ar6_softc *ar, u8 keyid, bool ismcast) { static const char *tag = "MLME-MICHAELMICFAILURE.indication"; char buf[128]; @@ -4934,7 +4934,7 @@ ar6000_tkip_micerr_event(AR_SOFTC_T *ar, u8 keyid, bool ismcast) } void -ar6000_scanComplete_event(AR_SOFTC_T *ar, int status) +ar6000_scanComplete_event(struct ar6_softc *ar, int status) { #ifdef ATH6K_CONFIG_CFG80211 @@ -4957,7 +4957,7 @@ ar6000_scanComplete_event(AR_SOFTC_T *ar, int status) } void -ar6000_targetStats_event(AR_SOFTC_T *ar, u8 *ptr, u32 len) +ar6000_targetStats_event(struct ar6_softc *ar, u8 *ptr, u32 len) { u8 ac; @@ -5082,7 +5082,7 @@ ar6000_targetStats_event(AR_SOFTC_T *ar, u8 *ptr, u32 len) } void -ar6000_rssiThreshold_event(AR_SOFTC_T *ar, WMI_RSSI_THRESHOLD_VAL newThreshold, s16 rssi) +ar6000_rssiThreshold_event(struct ar6_softc *ar, WMI_RSSI_THRESHOLD_VAL newThreshold, s16 rssi) { USER_RSSI_THOLD userRssiThold; @@ -5103,7 +5103,7 @@ ar6000_rssiThreshold_event(AR_SOFTC_T *ar, WMI_RSSI_THRESHOLD_VAL newThreshold, void -ar6000_hbChallengeResp_event(AR_SOFTC_T *ar, u32 cookie, u32 source) +ar6000_hbChallengeResp_event(struct ar6_softc *ar, u32 cookie, u32 source) { if (source == APP_HB_CHALLENGE) { /* Report it to the app in case it wants a positive acknowledgement */ @@ -5119,7 +5119,7 @@ ar6000_hbChallengeResp_event(AR_SOFTC_T *ar, u32 cookie, u32 source) void -ar6000_reportError_event(AR_SOFTC_T *ar, WMI_TARGET_ERROR_VAL errorVal) +ar6000_reportError_event(struct ar6_softc *ar, WMI_TARGET_ERROR_VAL errorVal) { static const char * const errString[] = { [WMI_TARGET_PM_ERR_FAIL] "WMI_TARGET_PM_ERR_FAIL", @@ -5154,7 +5154,7 @@ ar6000_reportError_event(AR_SOFTC_T *ar, WMI_TARGET_ERROR_VAL errorVal) void -ar6000_cac_event(AR_SOFTC_T *ar, u8 ac, u8 cacIndication, +ar6000_cac_event(struct ar6_softc *ar, u8 ac, u8 cacIndication, u8 statusCode, u8 *tspecSuggestion) { WMM_TSPEC_IE *tspecIe; @@ -5177,7 +5177,7 @@ ar6000_cac_event(AR_SOFTC_T *ar, u8 ac, u8 cacIndication, } void -ar6000_channel_change_event(AR_SOFTC_T *ar, u16 oldChannel, +ar6000_channel_change_event(struct ar6_softc *ar, u16 oldChannel, u16 newChannel) { A_PRINTF("Channel Change notification\nOld Channel: %d, New Channel: %d\n", @@ -5191,7 +5191,7 @@ ar6000_channel_change_event(AR_SOFTC_T *ar, u16 oldChannel, } while(0) void -ar6000_roam_tbl_event(AR_SOFTC_T *ar, WMI_TARGET_ROAM_TBL *pTbl) +ar6000_roam_tbl_event(struct ar6_softc *ar, WMI_TARGET_ROAM_TBL *pTbl) { u8 i; @@ -5270,7 +5270,7 @@ ar6000_display_roam_time(WMI_TARGET_ROAM_TIME *p) } void -ar6000_roam_data_event(AR_SOFTC_T *ar, WMI_TARGET_ROAM_DATA *p) +ar6000_roam_data_event(struct ar6_softc *ar, WMI_TARGET_ROAM_DATA *p) { switch (p->roamDataType) { case ROAM_DATA_TIME: @@ -5282,7 +5282,7 @@ ar6000_roam_data_event(AR_SOFTC_T *ar, WMI_TARGET_ROAM_DATA *p) } void -ar6000_bssInfo_event_rx(AR_SOFTC_T *ar, u8 *datap, int len) +ar6000_bssInfo_event_rx(struct ar6_softc *ar, u8 *datap, int len) { struct sk_buff *skb; WMI_BSS_INFO_HDR *bih = (WMI_BSS_INFO_HDR *)datap; @@ -5317,7 +5317,7 @@ u32 wmiSendCmdNum; int ar6000_control_tx(void *devt, void *osbuf, HTC_ENDPOINT_ID eid) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)devt; + struct ar6_softc *ar = (struct ar6_softc *)devt; int status = 0; struct ar_cookie *cookie = NULL; int i; @@ -5396,7 +5396,7 @@ ar6000_control_tx(void *devt, void *osbuf, HTC_ENDPOINT_ID eid) /* indicate tx activity or inactivity on a WMI stream */ void ar6000_indicate_tx_activity(void *devt, u8 TrafficClass, bool Active) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)devt; + struct ar6_softc *ar = (struct ar6_softc *)devt; HTC_ENDPOINT_ID eid ; int i; @@ -5510,7 +5510,7 @@ module_exit(ar6000_cleanup_module); /* Init cookie queue */ static void -ar6000_cookie_init(AR_SOFTC_T *ar) +ar6000_cookie_init(struct ar6_softc *ar) { u32 i; @@ -5526,7 +5526,7 @@ ar6000_cookie_init(AR_SOFTC_T *ar) /* cleanup cookie queue */ static void -ar6000_cookie_cleanup(AR_SOFTC_T *ar) +ar6000_cookie_cleanup(struct ar6_softc *ar) { /* It is gone .... */ ar->arCookieList = NULL; @@ -5535,7 +5535,7 @@ ar6000_cookie_cleanup(AR_SOFTC_T *ar) /* Init cookie queue */ static void -ar6000_free_cookie(AR_SOFTC_T *ar, struct ar_cookie * cookie) +ar6000_free_cookie(struct ar6_softc *ar, struct ar_cookie * cookie) { /* Insert first */ A_ASSERT(ar != NULL); @@ -5548,7 +5548,7 @@ ar6000_free_cookie(AR_SOFTC_T *ar, struct ar_cookie * cookie) /* cleanup cookie queue */ static struct ar_cookie * -ar6000_alloc_cookie(AR_SOFTC_T *ar) +ar6000_alloc_cookie(struct ar6_softc *ar) { struct ar_cookie *cookie; @@ -5569,7 +5569,7 @@ ar6000_alloc_cookie(AR_SOFTC_T *ar) * the event ID and event content. */ #define EVENT_ID_LEN 2 -void ar6000_send_event_to_app(AR_SOFTC_T *ar, u16 eventId, +void ar6000_send_event_to_app(struct ar6_softc *ar, u16 eventId, u8 *datap, int len) { @@ -5614,7 +5614,7 @@ void ar6000_send_event_to_app(AR_SOFTC_T *ar, u16 eventId, * to the application. The buf which is sent to application * includes the event ID and event content. */ -void ar6000_send_generic_event_to_app(AR_SOFTC_T *ar, u16 eventId, +void ar6000_send_generic_event_to_app(struct ar6_softc *ar, u16 eventId, u8 *datap, int len) { @@ -5666,7 +5666,7 @@ void ar6000_snrThresholdEvent_rx(void *devt, WMI_SNR_THRESHOLD_VAL newThreshold, u8 snr) { WMI_SNR_THRESHOLD_EVENT event; - AR_SOFTC_T *ar = (AR_SOFTC_T *)devt; + struct ar6_softc *ar = (struct ar6_softc *)devt; event.range = newThreshold; event.snr = snr; @@ -5721,7 +5721,7 @@ ar6000_get_driver_cfg(struct net_device *dev, void ar6000_keepalive_rx(void *devt, u8 configured) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)devt; + struct ar6_softc *ar = (struct ar6_softc *)devt; ar->arKeepaliveConfigured = configured; wake_up(&arEvent); @@ -5750,7 +5750,7 @@ ar6000_pmkid_list_event(void *devt, u8 numPMKID, WMI_PMKID *pmkidList, } } -void ar6000_pspoll_event(AR_SOFTC_T *ar,u8 aid) +void ar6000_pspoll_event(struct ar6_softc *ar,u8 aid) { sta_t *conn=NULL; bool isPsqEmpty = false; @@ -5790,7 +5790,7 @@ void ar6000_pspoll_event(AR_SOFTC_T *ar,u8 aid) } } -void ar6000_dtimexpiry_event(AR_SOFTC_T *ar) +void ar6000_dtimexpiry_event(struct ar6_softc *ar) { bool isMcastQueued = false; struct sk_buff *skb = NULL; @@ -5836,7 +5836,7 @@ void ar6000_dtimexpiry_event(AR_SOFTC_T *ar) } void -read_rssi_compensation_param(AR_SOFTC_T *ar) +read_rssi_compensation_param(struct ar6_softc *ar) { u8 *cust_data_ptr; @@ -5907,7 +5907,7 @@ s32 rssi_compensation_calc_tcmd(u32 freq, s32 rssi, u32 totalPkt) return rssi; } -s16 rssi_compensation_calc(AR_SOFTC_T *ar, s16 rssi) +s16 rssi_compensation_calc(struct ar6_softc *ar, s16 rssi) { if (ar->arBssChannel > 5000) { @@ -5935,7 +5935,7 @@ s16 rssi_compensation_calc(AR_SOFTC_T *ar, s16 rssi) return rssi; } -s16 rssi_compensation_reverse_calc(AR_SOFTC_T *ar, s16 rssi, bool Above) +s16 rssi_compensation_reverse_calc(struct ar6_softc *ar, s16 rssi, bool Above) { s16 i; @@ -5980,7 +5980,7 @@ s16 rssi_compensation_reverse_calc(AR_SOFTC_T *ar, s16 rssi, bool Above) } #ifdef WAPI_ENABLE -void ap_wapi_rekey_event(AR_SOFTC_T *ar, u8 type, u8 *mac) +void ap_wapi_rekey_event(struct ar6_softc *ar, u8 type, u8 *mac) { union iwreq_data wrqu; char buf[20]; @@ -6002,7 +6002,7 @@ void ap_wapi_rekey_event(AR_SOFTC_T *ar, u8 type, u8 *mac) #ifdef USER_KEYS static int -ar6000_reinstall_keys(AR_SOFTC_T *ar, u8 key_op_ctrl) +ar6000_reinstall_keys(struct ar6_softc *ar, u8 key_op_ctrl) { int status = 0; struct ieee80211req_key *uik = &ar->user_saved_keys.ucast_ik; @@ -6316,7 +6316,7 @@ void ar6000_peer_event( #ifdef HTC_TEST_SEND_PKTS #define HTC_TEST_DUPLICATE 8 -static void DoHTCSendPktsTest(AR_SOFTC_T *ar, int MapNo, HTC_ENDPOINT_ID eid, struct sk_buff *dupskb) +static void DoHTCSendPktsTest(struct ar6_softc *ar, int MapNo, HTC_ENDPOINT_ID eid, struct sk_buff *dupskb) { struct ar_cookie *cookie; struct ar_cookie *cookieArray[HTC_TEST_DUPLICATE]; @@ -6400,7 +6400,7 @@ static void DoHTCSendPktsTest(AR_SOFTC_T *ar, int MapNo, HTC_ENDPOINT_ID eid, st * AP mode. */ -int ar6000_start_ap_interface(AR_SOFTC_T *ar) +int ar6000_start_ap_interface(struct ar6_softc *ar) { struct ar_virtual_interface *arApDev; @@ -6411,7 +6411,7 @@ int ar6000_start_ap_interface(AR_SOFTC_T *ar) return 0; } -int ar6000_stop_ap_interface(AR_SOFTC_T *ar) +int ar6000_stop_ap_interface(struct ar6_softc *ar) { struct ar_virtual_interface *arApDev; @@ -6425,7 +6425,7 @@ int ar6000_stop_ap_interface(AR_SOFTC_T *ar) } -int ar6000_create_ap_interface(AR_SOFTC_T *ar, char *ap_ifname) +int ar6000_create_ap_interface(struct ar6_softc *ar, char *ap_ifname) { struct net_device *dev; struct ar_virtual_interface *arApDev; @@ -6458,7 +6458,7 @@ int ar6000_create_ap_interface(AR_SOFTC_T *ar, char *ap_ifname) return 0; } -int ar6000_add_ap_interface(AR_SOFTC_T *ar, char *ap_ifname) +int ar6000_add_ap_interface(struct ar6_softc *ar, char *ap_ifname) { /* Interface already added, need not proceed further */ if (ar->arApDev != NULL) { @@ -6475,7 +6475,7 @@ int ar6000_add_ap_interface(AR_SOFTC_T *ar, char *ap_ifname) return ar6000_start_ap_interface(ar); } -int ar6000_remove_ap_interface(AR_SOFTC_T *ar) +int ar6000_remove_ap_interface(struct ar6_softc *ar) { if (arApNetDev) { ar6000_stop_ap_interface(ar); diff --git a/drivers/staging/ath6kl/os/linux/ar6000_pm.c b/drivers/staging/ath6kl/os/linux/ar6000_pm.c index 5659ad8..1a90424 100644 --- a/drivers/staging/ath6kl/os/linux/ar6000_pm.c +++ b/drivers/staging/ath6kl/os/linux/ar6000_pm.c @@ -37,7 +37,7 @@ extern unsigned int wmitimeout; extern wait_queue_head_t arEvent; #ifdef ANDROID_ENV -extern void android_ar6k_check_wow_status(AR_SOFTC_T *ar, struct sk_buff *skb, bool isEvent); +extern void android_ar6k_check_wow_status(struct ar6_softc *ar, struct sk_buff *skb, bool isEvent); #endif #undef ATH_MODULE_NAME #define ATH_MODULE_NAME pm @@ -57,10 +57,10 @@ ATH_DEBUG_INSTANTIATE_MODULE_VAR(pm, #endif /* DEBUG */ -int ar6000_exit_cut_power_state(AR_SOFTC_T *ar); +int ar6000_exit_cut_power_state(struct ar6_softc *ar); #ifdef CONFIG_PM -static void ar6k_send_asleep_event_to_app(AR_SOFTC_T *ar, bool asleep) +static void ar6k_send_asleep_event_to_app(struct ar6_softc *ar, bool asleep) { char buf[128]; union iwreq_data wrqu; @@ -71,7 +71,7 @@ static void ar6k_send_asleep_event_to_app(AR_SOFTC_T *ar, bool asleep) wireless_send_event(ar->arNetDev, IWEVCUSTOM, &wrqu, buf); } -static void ar6000_wow_resume(AR_SOFTC_T *ar) +static void ar6000_wow_resume(struct ar6_softc *ar) { if (ar->arWowState!= WLAN_WOW_STATE_NONE) { u16 fg_start_period = (ar->scParams.fg_start_period==0) ? 1 : ar->scParams.fg_start_period; @@ -110,7 +110,7 @@ static void ar6000_wow_resume(AR_SOFTC_T *ar) ar->arWlanPowerState = WLAN_POWER_STATE_ON; } -static void ar6000_wow_suspend(AR_SOFTC_T *ar) +static void ar6000_wow_suspend(struct ar6_softc *ar) { #define WOW_LIST_ID 1 if (ar->arNetworkType != AP_NETWORK) { @@ -214,7 +214,7 @@ static void ar6000_wow_suspend(AR_SOFTC_T *ar) int ar6000_suspend_ev(void *context) { int status = 0; - AR_SOFTC_T *ar = (AR_SOFTC_T *)context; + struct ar6_softc *ar = (struct ar6_softc *)context; s16 pmmode = ar->arSuspendConfig; wow_not_connected: switch (pmmode) { @@ -250,7 +250,7 @@ wow_not_connected: int ar6000_resume_ev(void *context) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)context; + struct ar6_softc *ar = (struct ar6_softc *)context; u16 powerState = ar->arWlanPowerState; AR_DEBUG_PRINTF(ATH_DEBUG_PM, ("%s: enter previous state %d wowState %d\n", __func__, powerState, ar->arWowState)); @@ -273,7 +273,7 @@ int ar6000_resume_ev(void *context) return 0; } -void ar6000_check_wow_status(AR_SOFTC_T *ar, struct sk_buff *skb, bool isEvent) +void ar6000_check_wow_status(struct ar6_softc *ar, struct sk_buff *skb, bool isEvent) { if (ar->arWowState!=WLAN_WOW_STATE_NONE) { if (ar->arWowState==WLAN_WOW_STATE_SUSPENDING) { @@ -292,7 +292,7 @@ void ar6000_check_wow_status(AR_SOFTC_T *ar, struct sk_buff *skb, bool isEvent) int ar6000_power_change_ev(void *context, u32 config) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)context; + struct ar6_softc *ar = (struct ar6_softc *)context; int status = 0; AR_DEBUG_PRINTF(ATH_DEBUG_PM, ("%s: power change event callback %d \n", __func__, config)); diff --git a/drivers/staging/ath6kl/os/linux/ar6000_raw_if.c b/drivers/staging/ath6kl/os/linux/ar6000_raw_if.c index 7b6339c..ae7c1dd 100644 --- a/drivers/staging/ath6kl/os/linux/ar6000_raw_if.c +++ b/drivers/staging/ath6kl/os/linux/ar6000_raw_if.c @@ -28,7 +28,7 @@ static void ar6000_htc_raw_read_cb(void *Context, struct htc_packet *pPacket) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)Context; + struct ar6_softc *ar = (struct ar6_softc *)Context; raw_htc_buffer *busy; HTC_RAW_STREAM_ID streamID; AR_RAW_HTC_T *arRaw = ar->arRawHtc; @@ -72,7 +72,7 @@ ar6000_htc_raw_read_cb(void *Context, struct htc_packet *pPacket) static void ar6000_htc_raw_write_cb(void *Context, struct htc_packet *pPacket) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)Context; + struct ar6_softc *ar = (struct ar6_softc *)Context; raw_htc_buffer *free; HTC_RAW_STREAM_ID streamID; AR_RAW_HTC_T *arRaw = ar->arRawHtc; @@ -111,7 +111,7 @@ ar6000_htc_raw_write_cb(void *Context, struct htc_packet *pPacket) } /* connect to a service */ -static int ar6000_connect_raw_service(AR_SOFTC_T *ar, +static int ar6000_connect_raw_service(struct ar6_softc *ar, HTC_RAW_STREAM_ID StreamID) { int status; @@ -166,7 +166,7 @@ static int ar6000_connect_raw_service(AR_SOFTC_T *ar, return status; } -int ar6000_htc_raw_open(AR_SOFTC_T *ar) +int ar6000_htc_raw_open(struct ar6_softc *ar) { int status; int streamID, endPt, count2; @@ -272,7 +272,7 @@ int ar6000_htc_raw_open(AR_SOFTC_T *ar) return 0; } -int ar6000_htc_raw_close(AR_SOFTC_T *ar) +int ar6000_htc_raw_close(struct ar6_softc *ar) { A_PRINTF("ar6000_htc_raw_close called \n"); HTCStop(ar->arHtcTarget); @@ -286,7 +286,7 @@ int ar6000_htc_raw_close(AR_SOFTC_T *ar) } raw_htc_buffer * -get_filled_buffer(AR_SOFTC_T *ar, HTC_RAW_STREAM_ID StreamID) +get_filled_buffer(struct ar6_softc *ar, HTC_RAW_STREAM_ID StreamID) { int count; raw_htc_buffer *busy; @@ -308,7 +308,7 @@ get_filled_buffer(AR_SOFTC_T *ar, HTC_RAW_STREAM_ID StreamID) return busy; } -ssize_t ar6000_htc_raw_read(AR_SOFTC_T *ar, HTC_RAW_STREAM_ID StreamID, +ssize_t ar6000_htc_raw_read(struct ar6_softc *ar, HTC_RAW_STREAM_ID StreamID, char __user *buffer, size_t length) { int readPtr; @@ -368,7 +368,7 @@ ssize_t ar6000_htc_raw_read(AR_SOFTC_T *ar, HTC_RAW_STREAM_ID StreamID, } static raw_htc_buffer * -get_free_buffer(AR_SOFTC_T *ar, HTC_ENDPOINT_ID StreamID) +get_free_buffer(struct ar6_softc *ar, HTC_ENDPOINT_ID StreamID) { int count; raw_htc_buffer *free; @@ -390,7 +390,7 @@ get_free_buffer(AR_SOFTC_T *ar, HTC_ENDPOINT_ID StreamID) return free; } -ssize_t ar6000_htc_raw_write(AR_SOFTC_T *ar, HTC_RAW_STREAM_ID StreamID, +ssize_t ar6000_htc_raw_write(struct ar6_softc *ar, HTC_RAW_STREAM_ID StreamID, char __user *buffer, size_t length) { int writePtr; diff --git a/drivers/staging/ath6kl/os/linux/ar6k_pal.c b/drivers/staging/ath6kl/os/linux/ar6k_pal.c index e174efb..ac3c740 100644 --- a/drivers/staging/ath6kl/os/linux/ar6k_pal.c +++ b/drivers/staging/ath6kl/os/linux/ar6k_pal.c @@ -49,7 +49,7 @@ typedef struct ar6k_hci_pal_info_s{ #define HCI_NORMAL_MODE (1) #define HCI_REGISTERED (1<<1) struct hci_dev *hdev; /* BT Stack HCI dev */ - AR_SOFTC_T *ar; + struct ar6_softc *ar; }ar6k_hci_pal_info_t; @@ -122,7 +122,7 @@ static int btpal_send_frame(struct sk_buff *skb) ar6k_hci_pal_info_t *pHciPalInfo; int status = 0; struct sk_buff *txSkb = NULL; - AR_SOFTC_T *ar; + struct ar6_softc *ar; if (!hdev) { PRIN_LOG("HCI PAL: btpal_send_frame - no device\n"); @@ -315,7 +315,7 @@ static int bt_setup_hci_pal(ar6k_hci_pal_info_t *pHciPalInfo) *********************************************/ void ar6k_cleanup_hci_pal(void *ar_p) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar_p; + struct ar6_softc *ar = (struct ar6_softc *)ar_p; ar6k_hci_pal_info_t *pHciPalInfo = (ar6k_hci_pal_info_t *)ar->hcipal_info; if (pHciPalInfo != NULL) { @@ -407,7 +407,7 @@ int ar6k_setup_hci_pal(void *ar_p) int status = 0; ar6k_hci_pal_info_t *pHciPalInfo; ar6k_pal_config_t ar6k_pal_config; - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar_p; + struct ar6_softc *ar = (struct ar6_softc *)ar_p; do { diff --git a/drivers/staging/ath6kl/os/linux/cfg80211.c b/drivers/staging/ath6kl/os/linux/cfg80211.c index 2edac07..bcca394 100644 --- a/drivers/staging/ath6kl/os/linux/cfg80211.c +++ b/drivers/staging/ath6kl/os/linux/cfg80211.c @@ -136,7 +136,7 @@ ieee80211_supported_band ar6k_band_5ghz = { }; static int -ar6k_set_wpa_version(AR_SOFTC_T *ar, enum nl80211_wpa_versions wpa_version) +ar6k_set_wpa_version(struct ar6_softc *ar, enum nl80211_wpa_versions wpa_version) { AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("%s: %u\n", __func__, wpa_version)); @@ -157,7 +157,7 @@ ar6k_set_wpa_version(AR_SOFTC_T *ar, enum nl80211_wpa_versions wpa_version) } static int -ar6k_set_auth_type(AR_SOFTC_T *ar, enum nl80211_auth_type auth_type) +ar6k_set_auth_type(struct ar6_softc *ar, enum nl80211_auth_type auth_type) { AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("%s: 0x%x\n", __func__, auth_type)); @@ -183,7 +183,7 @@ ar6k_set_auth_type(AR_SOFTC_T *ar, enum nl80211_auth_type auth_type) } static int -ar6k_set_cipher(AR_SOFTC_T *ar, u32 cipher, bool ucast) +ar6k_set_cipher(struct ar6_softc *ar, u32 cipher, bool ucast) { u8 *ar_cipher = ucast ? &ar->arPairwiseCrypto : &ar->arGroupCrypto; @@ -225,7 +225,7 @@ ar6k_set_cipher(AR_SOFTC_T *ar, u32 cipher, bool ucast) } static void -ar6k_set_key_mgmt(AR_SOFTC_T *ar, u32 key_mgmt) +ar6k_set_key_mgmt(struct ar6_softc *ar, u32 key_mgmt) { AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("%s: 0x%x\n", __func__, key_mgmt)); @@ -244,7 +244,7 @@ static int ar6k_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev, struct cfg80211_connect_params *sme) { - AR_SOFTC_T *ar = ar6k_priv(dev); + struct ar6_softc *ar = ar6k_priv(dev); int status; AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("%s: \n", __func__)); @@ -429,7 +429,7 @@ ar6k_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev, } void -ar6k_cfg80211_connect_event(AR_SOFTC_T *ar, u16 channel, +ar6k_cfg80211_connect_event(struct ar6_softc *ar, u16 channel, u8 *bssid, u16 listenInterval, u16 beaconInterval,NETWORK_TYPE networkType, u8 beaconIeLen, u8 assocReqLen, @@ -581,7 +581,7 @@ static int ar6k_cfg80211_disconnect(struct wiphy *wiphy, struct net_device *dev, u16 reason_code) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("%s: reason=%u\n", __func__, reason_code)); @@ -620,7 +620,7 @@ ar6k_cfg80211_disconnect(struct wiphy *wiphy, struct net_device *dev, } void -ar6k_cfg80211_disconnect_event(AR_SOFTC_T *ar, u8 reason, +ar6k_cfg80211_disconnect_event(struct ar6_softc *ar, u8 reason, u8 *bssid, u8 assocRespLen, u8 *assocInfo, u16 protocolReasonStatus) { @@ -736,7 +736,7 @@ static int ar6k_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev, struct cfg80211_scan_request *request) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(ndev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(ndev); int ret = 0; u32 forceFgScan = 0; @@ -792,7 +792,7 @@ ar6k_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev, } void -ar6k_cfg80211_scanComplete_event(AR_SOFTC_T *ar, int status) +ar6k_cfg80211_scanComplete_event(struct ar6_softc *ar, int status) { AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("%s: status %d\n", __func__, status)); @@ -823,7 +823,7 @@ ar6k_cfg80211_add_key(struct wiphy *wiphy, struct net_device *ndev, u8 key_index, bool pairwise, const u8 *mac_addr, struct key_params *params) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(ndev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(ndev); struct ar_key *key = NULL; u8 key_usage; u8 key_type; @@ -915,7 +915,7 @@ static int ar6k_cfg80211_del_key(struct wiphy *wiphy, struct net_device *ndev, u8 key_index, bool pairwise, const u8 *mac_addr) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(ndev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(ndev); AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("%s: index %d\n", __func__, key_index)); @@ -952,7 +952,7 @@ ar6k_cfg80211_get_key(struct wiphy *wiphy, struct net_device *ndev, void *cookie, void (*callback)(void *cookie, struct key_params*)) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(ndev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(ndev); struct ar_key *key = NULL; struct key_params params; @@ -992,7 +992,7 @@ static int ar6k_cfg80211_set_default_key(struct wiphy *wiphy, struct net_device *ndev, u8 key_index, bool unicast, bool multicast) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(ndev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(ndev); struct ar_key *key = NULL; int status = 0; u8 key_usage; @@ -1044,7 +1044,7 @@ static int ar6k_cfg80211_set_default_mgmt_key(struct wiphy *wiphy, struct net_device *ndev, u8 key_index) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(ndev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(ndev); AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("%s: index %d\n", __func__, key_index)); @@ -1063,7 +1063,7 @@ ar6k_cfg80211_set_default_mgmt_key(struct wiphy *wiphy, struct net_device *ndev, } void -ar6k_cfg80211_tkip_micerr_event(AR_SOFTC_T *ar, u8 keyid, bool ismcast) +ar6k_cfg80211_tkip_micerr_event(struct ar6_softc *ar, u8 keyid, bool ismcast) { AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("%s: keyid %d, ismcast %d\n", __func__, keyid, ismcast)); @@ -1076,7 +1076,7 @@ ar6k_cfg80211_tkip_micerr_event(AR_SOFTC_T *ar, u8 keyid, bool ismcast) static int ar6k_cfg80211_set_wiphy_params(struct wiphy *wiphy, u32 changed) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)wiphy_priv(wiphy); + struct ar6_softc *ar = (struct ar6_softc *)wiphy_priv(wiphy); AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("%s: changed 0x%x\n", __func__, changed)); @@ -1113,7 +1113,7 @@ ar6k_cfg80211_set_bitrate_mask(struct wiphy *wiphy, struct net_device *dev, static int ar6k_cfg80211_set_txpower(struct wiphy *wiphy, enum nl80211_tx_power_setting type, int dbm) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)wiphy_priv(wiphy); + struct ar6_softc *ar = (struct ar6_softc *)wiphy_priv(wiphy); u8 ar_dbm; AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("%s: type 0x%x, dbm %d\n", __func__, type, dbm)); @@ -1149,7 +1149,7 @@ ar6k_cfg80211_set_txpower(struct wiphy *wiphy, enum nl80211_tx_power_setting typ static int ar6k_cfg80211_get_txpower(struct wiphy *wiphy, int *dbm) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)wiphy_priv(wiphy); + struct ar6_softc *ar = (struct ar6_softc *)wiphy_priv(wiphy); AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("%s: \n", __func__)); @@ -1188,7 +1188,7 @@ ar6k_cfg80211_set_power_mgmt(struct wiphy *wiphy, struct net_device *dev, bool pmgmt, int timeout) { - AR_SOFTC_T *ar = ar6k_priv(dev); + struct ar6_softc *ar = ar6k_priv(dev); WMI_POWER_MODE_CMD pwrMode; AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("%s: pmgmt %d, timeout %d\n", __func__, pmgmt, timeout)); @@ -1250,7 +1250,7 @@ ar6k_cfg80211_change_iface(struct wiphy *wiphy, struct net_device *ndev, enum nl80211_iftype type, u32 *flags, struct vif_params *params) { - AR_SOFTC_T *ar = ar6k_priv(ndev); + struct ar6_softc *ar = ar6k_priv(ndev); struct wireless_dev *wdev = ar->wdev; AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("%s: type %u\n", __func__, type)); @@ -1286,7 +1286,7 @@ static int ar6k_cfg80211_join_ibss(struct wiphy *wiphy, struct net_device *dev, struct cfg80211_ibss_params *ibss_param) { - AR_SOFTC_T *ar = ar6k_priv(dev); + struct ar6_softc *ar = ar6k_priv(dev); int status; AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("%s: \n", __func__)); @@ -1361,7 +1361,7 @@ ar6k_cfg80211_join_ibss(struct wiphy *wiphy, struct net_device *dev, static int ar6k_cfg80211_leave_ibss(struct wiphy *wiphy, struct net_device *dev) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("%s: \n", __func__)); @@ -1429,7 +1429,7 @@ ar6k_cfg80211_init(struct device *dev) } /* create a new wiphy for use with cfg80211 */ - wdev->wiphy = wiphy_new(&ar6k_cfg80211_ops, sizeof(AR_SOFTC_T)); + wdev->wiphy = wiphy_new(&ar6k_cfg80211_ops, sizeof(struct ar6_softc)); if(!wdev->wiphy) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("%s: Couldn't allocate wiphy device\n", __func__)); @@ -1463,7 +1463,7 @@ ar6k_cfg80211_init(struct device *dev) } void -ar6k_cfg80211_deinit(AR_SOFTC_T *ar) +ar6k_cfg80211_deinit(struct ar6_softc *ar) { struct wireless_dev *wdev = ar->wdev; diff --git a/drivers/staging/ath6kl/os/linux/hci_bridge.c b/drivers/staging/ath6kl/os/linux/hci_bridge.c index 04b7fd2..e566329 100644 --- a/drivers/staging/ath6kl/os/linux/hci_bridge.c +++ b/drivers/staging/ath6kl/os/linux/hci_bridge.c @@ -85,7 +85,7 @@ struct ar6k_hci_bridge_info { #ifdef EXPORT_HCI_BRIDGE_INTERFACE struct hci_transport_misc_handles HCITransHdl; #else - AR_SOFTC_T *ar; + struct ar6_softc *ar; #endif /* EXPORT_HCI_BRIDGE_INTERFACE */ }; @@ -120,10 +120,10 @@ int ar6000_setup_hci(void *ar); void ar6000_cleanup_hci(void *ar); int hci_test_send(void *ar, struct sk_buff *skb); #else -int ar6000_setup_hci(AR_SOFTC_T *ar); -void ar6000_cleanup_hci(AR_SOFTC_T *ar); +int ar6000_setup_hci(struct ar6_softc *ar); +void ar6000_cleanup_hci(struct ar6_softc *ar); /* HCI bridge testing */ -int hci_test_send(AR_SOFTC_T *ar, struct sk_buff *skb); +int hci_test_send(struct ar6_softc *ar, struct sk_buff *skb); #endif /* EXPORT_HCI_BRIDGE_INTERFACE */ #define LOCK_BRIDGE(dev) spin_lock_bh(&(dev)->BridgeLock) @@ -466,7 +466,7 @@ static HCI_SEND_FULL_ACTION ar6000_hci_pkt_send_full(void *pContext, struct htc #ifdef EXPORT_HCI_BRIDGE_INTERFACE int ar6000_setup_hci(void *ar) #else -int ar6000_setup_hci(AR_SOFTC_T *ar) +int ar6000_setup_hci(struct ar6_softc *ar) #endif { struct hci_transport_config_info config; @@ -563,7 +563,7 @@ int ar6000_setup_hci(AR_SOFTC_T *ar) #ifdef EXPORT_HCI_BRIDGE_INTERFACE void ar6000_cleanup_hci(void *ar) #else -void ar6000_cleanup_hci(AR_SOFTC_T *ar) +void ar6000_cleanup_hci(struct ar6_softc *ar) #endif { #ifdef EXPORT_HCI_BRIDGE_INTERFACE @@ -598,7 +598,7 @@ void ar6000_cleanup_hci(AR_SOFTC_T *ar) #ifdef EXPORT_HCI_BRIDGE_INTERFACE int hci_test_send(void *ar, struct sk_buff *skb) #else -int hci_test_send(AR_SOFTC_T *ar, struct sk_buff *skb) +int hci_test_send(struct ar6_softc *ar, struct sk_buff *skb) #endif { int status = 0; @@ -664,7 +664,7 @@ int hci_test_send(AR_SOFTC_T *ar, struct sk_buff *skb) return status; } -void ar6000_set_default_ar3kconfig(AR_SOFTC_T *ar, void *ar3kconfig) +void ar6000_set_default_ar3kconfig(struct ar6_softc *ar, void *ar3kconfig) { struct ar6k_hci_bridge_info *pHcidevInfo = (struct ar6k_hci_bridge_info *)ar->hcidev_info; struct ar3k_config_info *config = (struct ar3k_config_info *)ar3kconfig; @@ -1082,7 +1082,7 @@ static void bt_free_buffer(struct ar6k_hci_bridge_info *pHcidevInfo, struct sk_b #ifdef EXPORT_HCI_BRIDGE_INTERFACE int ar6000_setup_hci(void *ar) #else -int ar6000_setup_hci(AR_SOFTC_T *ar) +int ar6000_setup_hci(struct ar6_softc *ar) #endif { return 0; @@ -1091,14 +1091,14 @@ int ar6000_setup_hci(AR_SOFTC_T *ar) #ifdef EXPORT_HCI_BRIDGE_INTERFACE void ar6000_cleanup_hci(void *ar) #else -void ar6000_cleanup_hci(AR_SOFTC_T *ar) +void ar6000_cleanup_hci(struct ar6_softc *ar) #endif { return; } #ifndef EXPORT_HCI_BRIDGE_INTERFACE -void ar6000_set_default_ar3kconfig(AR_SOFTC_T *ar, void *ar3kconfig) +void ar6000_set_default_ar3kconfig(struct ar6_softc *ar, void *ar3kconfig) { return; } @@ -1107,7 +1107,7 @@ void ar6000_set_default_ar3kconfig(AR_SOFTC_T *ar, void *ar3kconfig) #ifdef EXPORT_HCI_BRIDGE_INTERFACE int hci_test_send(void *ar, struct sk_buff *skb) #else -int hci_test_send(AR_SOFTC_T *ar, struct sk_buff *skb) +int hci_test_send(struct ar6_softc *ar, struct sk_buff *skb) #endif { return -EOPNOTSUPP; diff --git a/drivers/staging/ath6kl/os/linux/include/ar6000_drv.h b/drivers/staging/ath6kl/os/linux/include/ar6000_drv.h index 8d8a964..9b5c0a3 100644 --- a/drivers/staging/ath6kl/os/linux/include/ar6000_drv.h +++ b/drivers/staging/ath6kl/os/linux/include/ar6000_drv.h @@ -466,7 +466,7 @@ typedef struct ar6_raw_htc { bool read_buffer_available[HTC_RAW_STREAM_NUM_MAX]; } AR_RAW_HTC_T; -typedef struct ar6_softc { +struct ar6_softc { struct net_device *arNetDev; /* net_device pointer */ void *arWmi; int arTxPending[ENDPOINT_MAX]; @@ -622,12 +622,12 @@ typedef struct ar6_softc { #ifdef CONFIG_AP_VIRTUAL_ADAPTER_SUPPORT void *arApDev; #endif -} AR_SOFTC_T; +}; #ifdef CONFIG_AP_VIRTUAL_ADAPTER_SUPPORT struct ar_virtual_interface { struct net_device *arNetDev; /* net_device pointer */ - AR_SOFTC_T *arDev; /* ar device pointer */ + struct ar6_softc *arDev; /* ar device pointer */ struct net_device *arStaNetDev; /* net_device pointer */ }; #endif /* CONFIG_AP_VIRTUAL_ADAPTER_SUPPORT */ @@ -704,11 +704,11 @@ struct ar_giwscan_param { int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd); int ar6000_ioctl_dispatcher(struct net_device *dev, struct ifreq *rq, int cmd); void ar6000_gpio_init(void); -void ar6000_init_profile_info(AR_SOFTC_T *ar); -void ar6000_install_static_wep_keys(AR_SOFTC_T *ar); +void ar6000_init_profile_info(struct ar6_softc *ar); +void ar6000_install_static_wep_keys(struct ar6_softc *ar); int ar6000_init(struct net_device *dev); -int ar6000_dbglog_get_debug_logs(AR_SOFTC_T *ar); -void ar6000_TxDataCleanup(AR_SOFTC_T *ar); +int ar6000_dbglog_get_debug_logs(struct ar6_softc *ar); +void ar6000_TxDataCleanup(struct ar6_softc *ar); int ar6000_acl_data_tx(struct sk_buff *skb, struct net_device *dev); void ar6000_restart_endpoint(struct net_device *dev); void ar6000_stop_endpoint(struct net_device *dev, bool keepprofile, bool getdbglogs); @@ -719,12 +719,12 @@ void ar6000_stop_endpoint(struct net_device *dev, bool keepprofile, bool getdbgl #define __user #endif -int ar6000_htc_raw_open(AR_SOFTC_T *ar); -int ar6000_htc_raw_close(AR_SOFTC_T *ar); -ssize_t ar6000_htc_raw_read(AR_SOFTC_T *ar, +int ar6000_htc_raw_open(struct ar6_softc *ar); +int ar6000_htc_raw_close(struct ar6_softc *ar); +ssize_t ar6000_htc_raw_read(struct ar6_softc *ar, HTC_RAW_STREAM_ID StreamID, char __user *buffer, size_t count); -ssize_t ar6000_htc_raw_write(AR_SOFTC_T *ar, +ssize_t ar6000_htc_raw_write(struct ar6_softc *ar, HTC_RAW_STREAM_ID StreamID, char __user *buffer, size_t count); @@ -733,22 +733,22 @@ ssize_t ar6000_htc_raw_write(AR_SOFTC_T *ar, /* AP mode */ /*TODO: These routines should be moved to a file that is common across OS */ sta_t * -ieee80211_find_conn(AR_SOFTC_T *ar, u8 *node_addr); +ieee80211_find_conn(struct ar6_softc *ar, u8 *node_addr); sta_t * -ieee80211_find_conn_for_aid(AR_SOFTC_T *ar, u8 aid); +ieee80211_find_conn_for_aid(struct ar6_softc *ar, u8 aid); -u8 remove_sta(AR_SOFTC_T *ar, u8 *mac, u16 reason); +u8 remove_sta(struct ar6_softc *ar, u8 *mac, u16 reason); /* HCI support */ #ifndef EXPORT_HCI_BRIDGE_INTERFACE -int ar6000_setup_hci(AR_SOFTC_T *ar); -void ar6000_cleanup_hci(AR_SOFTC_T *ar); -void ar6000_set_default_ar3kconfig(AR_SOFTC_T *ar, void *ar3kconfig); +int ar6000_setup_hci(struct ar6_softc *ar); +void ar6000_cleanup_hci(struct ar6_softc *ar); +void ar6000_set_default_ar3kconfig(struct ar6_softc *ar, void *ar3kconfig); /* HCI bridge testing */ -int hci_test_send(AR_SOFTC_T *ar, struct sk_buff *skb); +int hci_test_send(struct ar6_softc *ar, struct sk_buff *skb); #endif ATH_DEBUG_DECLARE_EXTERN(htc); diff --git a/drivers/staging/ath6kl/os/linux/include/cfg80211.h b/drivers/staging/ath6kl/os/linux/include/cfg80211.h index c2e4fa2..1a6ae97 100644 --- a/drivers/staging/ath6kl/os/linux/include/cfg80211.h +++ b/drivers/staging/ath6kl/os/linux/include/cfg80211.h @@ -25,21 +25,21 @@ #define _AR6K_CFG80211_H_ struct wireless_dev *ar6k_cfg80211_init(struct device *dev); -void ar6k_cfg80211_deinit(AR_SOFTC_T *ar); +void ar6k_cfg80211_deinit(struct ar6_softc *ar); -void ar6k_cfg80211_scanComplete_event(AR_SOFTC_T *ar, int status); +void ar6k_cfg80211_scanComplete_event(struct ar6_softc *ar, int status); -void ar6k_cfg80211_connect_event(AR_SOFTC_T *ar, u16 channel, +void ar6k_cfg80211_connect_event(struct ar6_softc *ar, u16 channel, u8 *bssid, u16 listenInterval, u16 beaconInterval,NETWORK_TYPE networkType, u8 beaconIeLen, u8 assocReqLen, u8 assocRespLen, u8 *assocInfo); -void ar6k_cfg80211_disconnect_event(AR_SOFTC_T *ar, u8 reason, +void ar6k_cfg80211_disconnect_event(struct ar6_softc *ar, u8 reason, u8 *bssid, u8 assocRespLen, u8 *assocInfo, u16 protocolReasonStatus); -void ar6k_cfg80211_tkip_micerr_event(AR_SOFTC_T *ar, u8 keyid, bool ismcast); +void ar6k_cfg80211_tkip_micerr_event(struct ar6_softc *ar, u8 keyid, bool ismcast); #endif /* _AR6K_CFG80211_H_ */ diff --git a/drivers/staging/ath6kl/os/linux/ioctl.c b/drivers/staging/ath6kl/os/linux/ioctl.c index 2c0d4fd..c650faa 100644 --- a/drivers/staging/ath6kl/os/linux/ioctl.c +++ b/drivers/staging/ath6kl/os/linux/ioctl.c @@ -39,7 +39,7 @@ extern int loghci; static int ar6000_ioctl_get_roam_tbl(struct net_device *dev, struct ifreq *rq) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); if (ar->arWmiReady == false) { return -EIO; @@ -55,7 +55,7 @@ ar6000_ioctl_get_roam_tbl(struct net_device *dev, struct ifreq *rq) static int ar6000_ioctl_get_roam_data(struct net_device *dev, struct ifreq *rq) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); if (ar->arWmiReady == false) { return -EIO; @@ -74,7 +74,7 @@ ar6000_ioctl_get_roam_data(struct net_device *dev, struct ifreq *rq) static int ar6000_ioctl_set_roam_ctrl(struct net_device *dev, char *userdata) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); WMI_SET_ROAM_CTRL_CMD cmd; u8 size = sizeof(cmd); @@ -107,7 +107,7 @@ ar6000_ioctl_set_roam_ctrl(struct net_device *dev, char *userdata) static int ar6000_ioctl_set_powersave_timers(struct net_device *dev, char *userdata) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); WMI_POWERSAVE_TIMERS_POLICY_CMD cmd; u8 size = sizeof(cmd); @@ -133,7 +133,7 @@ ar6000_ioctl_set_powersave_timers(struct net_device *dev, char *userdata) static int ar6000_ioctl_set_qos_supp(struct net_device *dev, struct ifreq *rq) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); WMI_SET_QOS_SUPP_CMD cmd; int ret; @@ -168,7 +168,7 @@ ar6000_ioctl_set_qos_supp(struct net_device *dev, struct ifreq *rq) static int ar6000_ioctl_set_wmm(struct net_device *dev, struct ifreq *rq) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); WMI_SET_WMM_CMD cmd; int ret; @@ -209,7 +209,7 @@ ar6000_ioctl_set_wmm(struct net_device *dev, struct ifreq *rq) static int ar6000_ioctl_set_txop(struct net_device *dev, struct ifreq *rq) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); WMI_SET_WMM_TXOP_CMD cmd; int ret; @@ -244,7 +244,7 @@ ar6000_ioctl_set_txop(struct net_device *dev, struct ifreq *rq) static int ar6000_ioctl_get_rd(struct net_device *dev, struct ifreq *rq) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); int ret = 0; if ((dev->flags & IFF_UP) != IFF_UP || ar->arWmiReady == false) { @@ -261,7 +261,7 @@ ar6000_ioctl_get_rd(struct net_device *dev, struct ifreq *rq) static int ar6000_ioctl_set_country(struct net_device *dev, struct ifreq *rq) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); WMI_AP_SET_COUNTRY_CMD cmd; int ret; @@ -301,7 +301,7 @@ ar6000_ioctl_set_country(struct net_device *dev, struct ifreq *rq) static int ar6000_ioctl_get_power_mode(struct net_device *dev, struct ifreq *rq) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); WMI_POWER_MODE_CMD power_mode; int ret = 0; @@ -321,7 +321,7 @@ ar6000_ioctl_get_power_mode(struct net_device *dev, struct ifreq *rq) static int ar6000_ioctl_set_channelParams(struct net_device *dev, struct ifreq *rq) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); WMI_CHANNEL_PARAMS_CMD cmd, *cmdp; int ret = 0; @@ -382,7 +382,7 @@ static int ar6000_ioctl_set_snr_threshold(struct net_device *dev, struct ifreq *rq) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); WMI_SNR_THRESHOLD_PARAMS_CMD cmd; int ret = 0; @@ -414,7 +414,7 @@ ar6000_ioctl_set_rssi_threshold(struct net_device *dev, struct ifreq *rq) thold2.rssi = tmpThold.rssi; \ } while (0) - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); WMI_RSSI_THRESHOLD_PARAMS_CMD cmd; USER_RSSI_PARAMS rssiParams; s32 i, j; @@ -491,7 +491,7 @@ static int ar6000_ioctl_set_lq_threshold(struct net_device *dev, struct ifreq *rq) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); WMI_LQ_THRESHOLD_PARAMS_CMD cmd; int ret = 0; @@ -514,7 +514,7 @@ ar6000_ioctl_set_lq_threshold(struct net_device *dev, struct ifreq *rq) static int ar6000_ioctl_set_probedSsid(struct net_device *dev, struct ifreq *rq) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); WMI_PROBED_SSID_CMD cmd; int ret = 0; @@ -538,7 +538,7 @@ ar6000_ioctl_set_probedSsid(struct net_device *dev, struct ifreq *rq) static int ar6000_ioctl_set_badAp(struct net_device *dev, struct ifreq *rq) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); WMI_ADD_BAD_AP_CMD cmd; int ret = 0; @@ -574,7 +574,7 @@ ar6000_ioctl_set_badAp(struct net_device *dev, struct ifreq *rq) static int ar6000_ioctl_create_qos(struct net_device *dev, struct ifreq *rq) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); WMI_CREATE_PSTREAM_CMD cmd; int ret; @@ -607,7 +607,7 @@ ar6000_ioctl_create_qos(struct net_device *dev, struct ifreq *rq) static int ar6000_ioctl_delete_qos(struct net_device *dev, struct ifreq *rq) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); WMI_DELETE_PSTREAM_CMD cmd; int ret = 0; @@ -637,7 +637,7 @@ ar6000_ioctl_delete_qos(struct net_device *dev, struct ifreq *rq) static int ar6000_ioctl_get_qos_queue(struct net_device *dev, struct ifreq *rq) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); struct ar6000_queuereq qreq; int ret = 0; @@ -665,7 +665,7 @@ static int ar6000_ioctl_tcmd_get_rx_report(struct net_device *dev, struct ifreq *rq, u8 *data, u32 len) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); u32 buf[4+TCMD_MAX_RATES]; int ret = 0; @@ -717,7 +717,7 @@ ar6000_ioctl_tcmd_get_rx_report(struct net_device *dev, void ar6000_tcmd_rx_report_event(void *devt, u8 *results, int len) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)devt; + struct ar6_softc *ar = (struct ar6_softc *)devt; TCMD_CONT_RX * rx_rep = (TCMD_CONT_RX *)results; if (enablerssicompensation) { @@ -742,7 +742,7 @@ ar6000_tcmd_rx_report_event(void *devt, u8 *results, int len) static int ar6000_ioctl_set_error_report_bitmask(struct net_device *dev, struct ifreq *rq) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); WMI_TARGET_ERROR_REPORT_BITMASK cmd; int ret = 0; @@ -762,7 +762,7 @@ ar6000_ioctl_set_error_report_bitmask(struct net_device *dev, struct ifreq *rq) static int ar6000_clear_target_stats(struct net_device *dev) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); TARGET_STATS *pStats = &ar->arTargetStats; int ret = 0; @@ -778,7 +778,7 @@ ar6000_clear_target_stats(struct net_device *dev) static int ar6000_ioctl_get_target_stats(struct net_device *dev, struct ifreq *rq) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); TARGET_STATS_CMD cmd; TARGET_STATS *pStats = &ar->arTargetStats; int ret = 0; @@ -829,7 +829,7 @@ ar6000_ioctl_get_target_stats(struct net_device *dev, struct ifreq *rq) static int ar6000_ioctl_get_ap_stats(struct net_device *dev, struct ifreq *rq) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); u32 action; /* Allocating only the desired space on the frame. Declaring is as a WMI_AP_MODE_STAT variable results in exceeding the compiler imposed limit on the maximum frame size */ WMI_AP_MODE_STAT *pStats = &ar->arAPStats; int ret = 0; @@ -888,7 +888,7 @@ ar6000_ioctl_get_ap_stats(struct net_device *dev, struct ifreq *rq) static int ar6000_ioctl_set_access_params(struct net_device *dev, struct ifreq *rq) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); WMI_SET_ACCESS_PARAMS_CMD cmd; int ret = 0; @@ -914,7 +914,7 @@ ar6000_ioctl_set_access_params(struct net_device *dev, struct ifreq *rq) static int ar6000_ioctl_set_disconnect_timeout(struct net_device *dev, struct ifreq *rq) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); WMI_DISC_TIMEOUT_CMD cmd; int ret = 0; @@ -939,7 +939,7 @@ ar6000_ioctl_set_disconnect_timeout(struct net_device *dev, struct ifreq *rq) static int ar6000_xioctl_set_voice_pkt_size(struct net_device *dev, char *userdata) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); WMI_SET_VOICE_PKT_SIZE_CMD cmd; int ret = 0; @@ -965,7 +965,7 @@ ar6000_xioctl_set_voice_pkt_size(struct net_device *dev, char *userdata) static int ar6000_xioctl_set_max_sp_len(struct net_device *dev, char *userdata) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); WMI_SET_MAX_SP_LEN_CMD cmd; int ret = 0; @@ -991,7 +991,7 @@ ar6000_xioctl_set_max_sp_len(struct net_device *dev, char *userdata) static int ar6000_xioctl_set_bt_status_cmd(struct net_device *dev, char *userdata) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); WMI_SET_BT_STATUS_CMD cmd; int ret = 0; @@ -1016,7 +1016,7 @@ ar6000_xioctl_set_bt_status_cmd(struct net_device *dev, char *userdata) static int ar6000_xioctl_set_bt_params_cmd(struct net_device *dev, char *userdata) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); WMI_SET_BT_PARAMS_CMD cmd; int ret = 0; @@ -1041,7 +1041,7 @@ ar6000_xioctl_set_bt_params_cmd(struct net_device *dev, char *userdata) static int ar6000_xioctl_set_btcoex_fe_ant_cmd(struct net_device * dev, char *userdata) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); WMI_SET_BTCOEX_FE_ANT_CMD cmd; int ret = 0; @@ -1065,7 +1065,7 @@ ar6000_xioctl_set_btcoex_fe_ant_cmd(struct net_device * dev, char *userdata) static int ar6000_xioctl_set_btcoex_colocated_bt_dev_cmd(struct net_device * dev, char *userdata) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); WMI_SET_BTCOEX_COLOCATED_BT_DEV_CMD cmd; int ret = 0; @@ -1090,7 +1090,7 @@ ar6000_xioctl_set_btcoex_colocated_bt_dev_cmd(struct net_device * dev, char *use static int ar6000_xioctl_set_btcoex_btinquiry_page_config_cmd(struct net_device * dev, char *userdata) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); WMI_SET_BTCOEX_BTINQUIRY_PAGE_CONFIG_CMD cmd; int ret = 0; @@ -1115,7 +1115,7 @@ ar6000_xioctl_set_btcoex_btinquiry_page_config_cmd(struct net_device * dev, cha static int ar6000_xioctl_set_btcoex_sco_config_cmd(struct net_device * dev, char *userdata) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); WMI_SET_BTCOEX_SCO_CONFIG_CMD cmd; int ret = 0; @@ -1141,7 +1141,7 @@ static int ar6000_xioctl_set_btcoex_a2dp_config_cmd(struct net_device * dev, char *userdata) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); WMI_SET_BTCOEX_A2DP_CONFIG_CMD cmd; int ret = 0; @@ -1166,7 +1166,7 @@ ar6000_xioctl_set_btcoex_a2dp_config_cmd(struct net_device * dev, static int ar6000_xioctl_set_btcoex_aclcoex_config_cmd(struct net_device * dev, char *userdata) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); WMI_SET_BTCOEX_ACLCOEX_CONFIG_CMD cmd; int ret = 0; @@ -1191,7 +1191,7 @@ ar6000_xioctl_set_btcoex_aclcoex_config_cmd(struct net_device * dev, char *userd static int ar60000_xioctl_set_btcoex_debug_cmd(struct net_device * dev, char *userdata) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); WMI_SET_BTCOEX_DEBUG_CMD cmd; int ret = 0; @@ -1216,7 +1216,7 @@ ar60000_xioctl_set_btcoex_debug_cmd(struct net_device * dev, char *userdata) static int ar6000_xioctl_set_btcoex_bt_operating_status_cmd(struct net_device * dev, char *userdata) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); WMI_SET_BTCOEX_BT_OPERATING_STATUS_CMD cmd; int ret = 0; @@ -1242,7 +1242,7 @@ ar6000_xioctl_get_btcoex_config_cmd(struct net_device * dev, char *userdata, struct ifreq *rq) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); AR6000_BTCOEX_CONFIG btcoexConfig; WMI_BTCOEX_CONFIG_EVENT *pbtcoexConfigEv = &ar->arBtcoexConfig; @@ -1285,7 +1285,7 @@ ar6000_xioctl_get_btcoex_config_cmd(struct net_device * dev, char *userdata, static int ar6000_xioctl_get_btcoex_stats_cmd(struct net_device * dev, char *userdata, struct ifreq *rq) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); AR6000_BTCOEX_STATS btcoexStats; WMI_BTCOEX_STATS_EVENT *pbtcoexStats = &ar->arBtcoexStats; int ret = 0; @@ -1332,7 +1332,7 @@ ar6000_xioctl_get_btcoex_stats_cmd(struct net_device * dev, char *userdata, stru static int ar6000_xioctl_set_excess_tx_retry_thres_cmd(struct net_device * dev, char * userdata) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); WMI_SET_EXCESS_TX_RETRY_THRES_CMD cmd; int ret = 0; @@ -1414,7 +1414,7 @@ ar6000_gpio_output_set(struct net_device *dev, u32 enable_mask, u32 disable_mask) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); gpio_ack_received = false; return wmi_gpio_output_set(ar->arWmi, @@ -1424,7 +1424,7 @@ ar6000_gpio_output_set(struct net_device *dev, static int ar6000_gpio_input_get(struct net_device *dev) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); *((volatile bool *)&gpio_data_available) = false; return wmi_gpio_input_get(ar->arWmi); @@ -1435,7 +1435,7 @@ ar6000_gpio_register_set(struct net_device *dev, u32 gpioreg_id, u32 value) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); gpio_ack_received = false; return wmi_gpio_register_set(ar->arWmi, gpioreg_id, value); @@ -1445,7 +1445,7 @@ static int ar6000_gpio_register_get(struct net_device *dev, u32 gpioreg_id) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); *((volatile bool *)&gpio_data_available) = false; return wmi_gpio_register_get(ar->arWmi, gpioreg_id); @@ -1455,7 +1455,7 @@ static int ar6000_gpio_intr_ack(struct net_device *dev, u32 ack_mask) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); gpio_intr_available = false; return wmi_gpio_intr_ack(ar->arWmi, ack_mask); @@ -1469,7 +1469,7 @@ static bool prof_count_available; /* Requested GPIO data available */ static int prof_count_get(struct net_device *dev) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); *((volatile bool *)&prof_count_available) = false; return wmi_prof_count_get_cmd(ar->arWmi); @@ -1541,7 +1541,7 @@ ar6000_create_acl_data_osbuf(struct net_device *dev, u8 *userdata, void **p_osbu int -ar6000_ioctl_ap_setparam(AR_SOFTC_T *ar, int param, int value) +ar6000_ioctl_ap_setparam(struct ar6_softc *ar, int param, int value) { int ret=0; @@ -1621,7 +1621,7 @@ ar6000_ioctl_ap_setparam(AR_SOFTC_T *ar, int param, int value) } int -ar6000_ioctl_setparam(AR_SOFTC_T *ar, int param, int value) +ar6000_ioctl_setparam(struct ar6_softc *ar, int param, int value) { bool profChanged = false; int ret=0; @@ -1757,7 +1757,7 @@ ar6000_ioctl_setparam(AR_SOFTC_T *ar, int param, int value) } int -ar6000_ioctl_setkey(AR_SOFTC_T *ar, struct ieee80211req_key *ik) +ar6000_ioctl_setkey(struct ar6_softc *ar, struct ieee80211req_key *ik) { KEY_USAGE keyUsage; int status; @@ -1864,7 +1864,7 @@ ar6000_ioctl_setkey(AR_SOFTC_T *ar, struct ieee80211req_key *ik) int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); HIF_DEVICE *hifDevice = ar->arHifDevice; int ret = 0, param; unsigned int address = 0; @@ -3141,7 +3141,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) case AR6000_XIOCTL_SET_OPT_MODE: { WMI_SET_OPT_MODE_CMD optModeCmd; - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); if (ar->arWmiReady == false) { ret = -EIO; @@ -3242,7 +3242,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) } case IEEE80211_IOCTL_SETAUTHALG: { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); struct ieee80211req_authalg req; if (ar->arWmiReady == false) { @@ -3417,7 +3417,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) case AR6000_XIOCTL_WMI_GETFIXRATES: { WMI_FIX_RATES_CMD getFixRatesCmd; - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); int ret = 0; if (ar->bIsDestroyProgress) { @@ -3627,7 +3627,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) } case AR6000_XIOCTL_WMI_GET_KEEPALIVE: { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); WMI_GET_KEEPALIVE_CMD getKeepAlive; int ret = 0; if (ar->bIsDestroyProgress) { diff --git a/drivers/staging/ath6kl/os/linux/wireless_ext.c b/drivers/staging/ath6kl/os/linux/wireless_ext.c index 824f1be..4b77943 100644 --- a/drivers/staging/ath6kl/os/linux/wireless_ext.c +++ b/drivers/staging/ath6kl/os/linux/wireless_ext.c @@ -416,7 +416,7 @@ ar6000_ioctl_giwscan(struct net_device *dev, struct iw_request_info *info, struct iw_point *data, char *extra) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); struct ar_giwscan_param param; if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != 0) { @@ -461,7 +461,7 @@ ar6000_ioctl_siwessid(struct net_device *dev, struct iw_request_info *info, struct iw_point *data, char *ssid) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); int status; u8 arNetworkType; u8 prevMode = ar->arNetworkType; @@ -658,7 +658,7 @@ ar6000_ioctl_giwessid(struct net_device *dev, struct iw_request_info *info, struct iw_point *data, char *essid) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != 0) { A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd); @@ -681,7 +681,7 @@ ar6000_ioctl_giwessid(struct net_device *dev, } -void ar6000_install_static_wep_keys(AR_SOFTC_T *ar) +void ar6000_install_static_wep_keys(struct ar6_softc *ar) { u8 index; u8 keyUsage; @@ -712,7 +712,7 @@ ar6000_ioctl_siwrate(struct net_device *dev, struct iw_request_info *info, struct iw_param *rrq, char *extra) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); u32 kbps; s8 rate_idx; @@ -749,7 +749,7 @@ ar6000_ioctl_giwrate(struct net_device *dev, struct iw_request_info *info, struct iw_param *rrq, char *extra) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); int ret = 0; if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != 0) { @@ -812,7 +812,7 @@ ar6000_ioctl_siwtxpow(struct net_device *dev, struct iw_request_info *info, struct iw_param *rrq, char *extra) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); u8 dbM; if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != 0) { @@ -854,7 +854,7 @@ ar6000_ioctl_giwtxpow(struct net_device *dev, struct iw_request_info *info, struct iw_param *rrq, char *extra) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); int ret = 0; if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != 0) { @@ -924,7 +924,7 @@ ar6000_ioctl_siwretry(struct net_device *dev, struct iw_request_info *info, struct iw_param *rrq, char *extra) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != 0) { A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd); @@ -965,7 +965,7 @@ ar6000_ioctl_giwretry(struct net_device *dev, struct iw_request_info *info, struct iw_param *rrq, char *extra) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != 0) { A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd); @@ -1006,7 +1006,7 @@ ar6000_ioctl_siwencode(struct net_device *dev, struct iw_request_info *info, struct iw_point *erq, char *keybuf) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); int index; s32 auth = 0; @@ -1122,7 +1122,7 @@ ar6000_ioctl_giwencode(struct net_device *dev, struct iw_request_info *info, struct iw_point *erq, char *key) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); u8 keyIndex; struct ar_wep_key *wk; @@ -1192,7 +1192,7 @@ ar6000_ioctl_siwgenie(struct net_device *dev, struct iw_request_info *info, struct iw_point *erq, char *extra) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); #ifdef WAPI_ENABLE u8 *ie = erq->pointer; @@ -1228,7 +1228,7 @@ ar6000_ioctl_giwgenie(struct net_device *dev, struct iw_request_info *info, struct iw_point *erq, char *extra) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); if (ar->arWmiReady == false) { return -EIO; @@ -1247,7 +1247,7 @@ ar6000_ioctl_siwauth(struct net_device *dev, struct iw_request_info *info, struct iw_param *data, char *extra) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); bool profChanged; u16 param; @@ -1418,7 +1418,7 @@ ar6000_ioctl_giwauth(struct net_device *dev, struct iw_request_info *info, struct iw_param *data, char *extra) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); u16 param; s32 ret; @@ -1546,7 +1546,7 @@ ar6000_ioctl_siwpmksa(struct net_device *dev, struct iw_request_info *info, struct iw_point *data, char *extra) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); s32 ret; int status; struct iw_pmksa *pmksa; @@ -1591,7 +1591,7 @@ static int ar6000_set_wapi_key(struct net_device *dev, struct iw_request_info *info, struct iw_point *erq, char *extra) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); struct iw_encode_ext *ext = (struct iw_encode_ext *)extra; KEY_USAGE keyUsage = 0; s32 keyLen; @@ -1653,7 +1653,7 @@ ar6000_ioctl_siwencodeext(struct net_device *dev, struct iw_request_info *info, struct iw_point *erq, char *extra) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); s32 index; struct iw_encode_ext *ext; KEY_USAGE keyUsage; @@ -1827,7 +1827,7 @@ ar6000_ioctl_giwencodeext(struct net_device *dev, struct iw_request_info *info, struct iw_point *erq, char *extra) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); if (ar->arWlanState == WLAN_DISABLED) { return -EIO; @@ -1850,7 +1850,7 @@ static int ar6000_ioctl_siwpower(struct net_device *dev, union iwreq_data *wrqu, char *extra) { #ifndef ATH6K_CONFIG_OTA_MODE - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); WMI_POWER_MODE power_mode; if (ar->arWmiReady == false) { @@ -1876,7 +1876,7 @@ static int ar6000_ioctl_giwpower(struct net_device *dev, struct iw_request_info *info, union iwreq_data *wrqu, char *extra) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); WMI_POWER_MODE power_mode; if (ar->arWmiReady == false) { @@ -1907,7 +1907,7 @@ ar6000_ioctl_giwname(struct net_device *dev, char *name, char *extra) { u8 capability; - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != 0) { A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd); @@ -1961,7 +1961,7 @@ ar6000_ioctl_siwfreq(struct net_device *dev, struct iw_request_info *info, struct iw_freq *freq, char *extra) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != 0) { A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd); @@ -2006,7 +2006,7 @@ ar6000_ioctl_giwfreq(struct net_device *dev, struct iw_request_info *info, struct iw_freq *freq, char *extra) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != 0) { A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd); @@ -2046,7 +2046,7 @@ ar6000_ioctl_siwmode(struct net_device *dev, struct iw_request_info *info, __u32 *mode, char *extra) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != 0) { A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd); @@ -2117,7 +2117,7 @@ ar6000_ioctl_giwmode(struct net_device *dev, struct iw_request_info *info, __u32 *mode, char *extra) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != 0) { A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd); @@ -2177,7 +2177,7 @@ ar6000_ioctl_giwrange(struct net_device *dev, struct iw_request_info *info, struct iw_point *data, char *extra) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); struct iw_range *range = (struct iw_range *) extra; int i, ret = 0; @@ -2300,7 +2300,7 @@ ar6000_ioctl_siwap(struct net_device *dev, struct iw_request_info *info, struct sockaddr *ap_addr, char *extra) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != 0) { A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd); @@ -2332,7 +2332,7 @@ ar6000_ioctl_giwap(struct net_device *dev, struct iw_request_info *info, struct sockaddr *ap_addr, char *extra) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != 0) { A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd); @@ -2368,7 +2368,7 @@ ar6000_ioctl_siwmlme(struct net_device *dev, struct iw_request_info *info, struct iw_point *data, char *extra) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != 0) { A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd); @@ -2460,7 +2460,7 @@ ar6000_ioctl_siwscan(struct net_device *dev, #define ACT_DWELLTIME_DEFAULT 105 #define HOME_TXDRAIN_TIME 100 #define SCAN_INT HOME_TXDRAIN_TIME + ACT_DWELLTIME_DEFAULT - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); int ret = 0; if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != 0) { @@ -2588,7 +2588,7 @@ ar6000_ioctl_siwcommit(struct net_device *dev, struct iw_request_info *info, struct iw_point *data, char *extra) { - AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); + struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev); if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != 0) { A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd); -- 1.7.4.15.g7811d From e610ad1e81f039ea8a591dae66e11d0c791622b7 Mon Sep 17 00:00:00 2001 From: Luis R. Rodriguez Date: Mon, 28 Feb 2011 14:42:00 -0800 Subject: [PATCH 58/58] ath6kl: remove-typedef HIF_DEVICE remove-typedef -s HIF_DEVICE \ "struct hif_device" drivers/staging/ath6kl/ Cc: Naveen Singh Signed-off-by: Luis R. Rodriguez --- drivers/staging/ath6kl/bmi/include/bmi_internal.h | 4 +- drivers/staging/ath6kl/bmi/src/bmi.c | 40 +++++----- .../hif/sdio/linux_sdio/include/hif_internal.h | 18 ++-- .../staging/ath6kl/hif/sdio/linux_sdio/src/hif.c | 84 ++++++++++---------- .../ath6kl/hif/sdio/linux_sdio/src/hif_scatter.c | 12 ++-- drivers/staging/ath6kl/htc2/AR6000/ar6k.c | 10 +- .../ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c | 2 +- drivers/staging/ath6kl/include/ar3kconfig.h | 2 +- drivers/staging/ath6kl/include/ar6000_diag.h | 12 ++-- drivers/staging/ath6kl/include/bmi.h | 34 ++++---- drivers/staging/ath6kl/include/common_drv.h | 18 ++-- drivers/staging/ath6kl/include/hif.h | 34 ++++---- drivers/staging/ath6kl/miscdrv/common_drv.c | 38 +++++----- drivers/staging/ath6kl/os/linux/eeprom.c | 6 +- .../staging/ath6kl/os/linux/export_hci_transport.c | 6 +- drivers/staging/ath6kl/os/linux/hci_bridge.c | 4 +- .../staging/ath6kl/os/linux/include/ar6000_drv.h | 4 +- .../ath6kl/os/linux/include/export_hci_transport.h | 6 +- drivers/staging/ath6kl/os/linux/ioctl.c | 2 +- 19 files changed, 168 insertions(+), 168 deletions(-) diff --git a/drivers/staging/ath6kl/bmi/include/bmi_internal.h b/drivers/staging/ath6kl/bmi/include/bmi_internal.h index e13fb01..6ae2ea7 100644 --- a/drivers/staging/ath6kl/bmi/include/bmi_internal.h +++ b/drivers/staging/ath6kl/bmi/include/bmi_internal.h @@ -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); diff --git a/drivers/staging/ath6kl/bmi/src/bmi.c b/drivers/staging/ath6kl/bmi/src/bmi.c index 34d1bef..9268bf3 100644 --- a/drivers/staging/ath6kl/bmi/src/bmi.c +++ b/drivers/staging/ath6kl/bmi/src/bmi.c @@ -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); } diff --git a/drivers/staging/ath6kl/hif/sdio/linux_sdio/include/hif_internal.h b/drivers/staging/ath6kl/hif/sdio/linux_sdio/include/hif_internal.h index 04fc284..6341560 100644 --- a/drivers/staging/ath6kl/hif/sdio/linux_sdio/include/hif_internal.h +++ b/drivers/staging/ath6kl/hif/sdio/linux_sdio/include/hif_internal.h @@ -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; } diff --git a/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif.c b/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif.c index 011925d..e118388 100644 --- a/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif.c +++ b/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif.c @@ -58,9 +58,9 @@ static int hifDeviceResume(struct device *dev); #endif /* CONFIG_PM */ static int hifDeviceInserted(struct sdio_func *func, const struct sdio_device_id *id); static void hifDeviceRemoved(struct sdio_func *func); -static HIF_DEVICE *addHifDevice(struct sdio_func *func); -static HIF_DEVICE *getHifDevice(struct sdio_func *func); -static void delHifDevice(HIF_DEVICE * device); +static struct hif_device *addHifDevice(struct sdio_func *func); +static struct hif_device *getHifDevice(struct sdio_func *func); +static void delHifDevice(struct hif_device * device); 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); @@ -107,8 +107,8 @@ extern u32 busspeedlow; extern u32 debughif; static void ResetAllCards(void); -static int hifDisableFunc(HIF_DEVICE *device, struct sdio_func *func); -static int hifEnableFunc(HIF_DEVICE *device, struct sdio_func *func); +static int hifDisableFunc(struct hif_device *device, struct sdio_func *func); +static int hifEnableFunc(struct hif_device *device, struct sdio_func *func); #ifdef DEBUG @@ -153,7 +153,7 @@ int HIFInit(OSDRV_CALLBACKS *callbacks) } static int -__HIFReadWrite(HIF_DEVICE *device, +__HIFReadWrite(struct hif_device *device, u32 address, u8 *buffer, u32 length, @@ -304,7 +304,7 @@ __HIFReadWrite(HIF_DEVICE *device, return status; } -void AddToAsyncList(HIF_DEVICE *device, BUS_REQUEST *busrequest) +void AddToAsyncList(struct hif_device *device, BUS_REQUEST *busrequest) { unsigned long flags; BUS_REQUEST *async; @@ -330,7 +330,7 @@ void AddToAsyncList(HIF_DEVICE *device, BUS_REQUEST *busrequest) /* queue a read/write request */ int -HIFReadWrite(HIF_DEVICE *device, +HIFReadWrite(struct hif_device *device, u32 address, u8 *buffer, u32 length, @@ -400,12 +400,12 @@ HIFReadWrite(HIF_DEVICE *device, /* thread to serialize all requests, both sync and async */ static int async_task(void *param) { - HIF_DEVICE *device; + struct hif_device *device; BUS_REQUEST *request; int status; unsigned long flags; - device = (HIF_DEVICE *)param; + device = (struct hif_device *)param; AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: async task\n")); set_current_state(TASK_INTERRUPTIBLE); while(!device->async_shutdown) { @@ -465,7 +465,7 @@ static int async_task(void *param) 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; s32 err; @@ -488,7 +488,7 @@ static s32 IssueSDCommand(HIF_DEVICE *device, u32 opcode, u32 arg, u32 flags, u3 return err; } -int ReinitSDIO(HIF_DEVICE *device) +int ReinitSDIO(struct hif_device *device) { s32 err; struct mmc_host *host; @@ -648,7 +648,7 @@ int ReinitSDIO(HIF_DEVICE *device) } 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; #if defined(CONFIG_PM) @@ -691,7 +691,7 @@ PowerStateChangeNotify(HIF_DEVICE *device, HIF_DEVICE_POWER_CHANGE_TYPE config) } int -HIFConfigureDevice(HIF_DEVICE *device, HIF_DEVICE_CONFIG_OPCODE opcode, +HIFConfigureDevice(struct hif_device *device, HIF_DEVICE_CONFIG_OPCODE opcode, void *config, u32 configLen) { u32 count; @@ -745,7 +745,7 @@ HIFConfigureDevice(HIF_DEVICE *device, HIF_DEVICE_CONFIG_OPCODE opcode, } void -HIFShutDownDevice(HIF_DEVICE *device) +HIFShutDownDevice(struct hif_device *device) { AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: +HIFShutDownDevice\n")); if (device != NULL) { @@ -775,7 +775,7 @@ static void hifIRQHandler(struct sdio_func *func) { int status; - HIF_DEVICE *device; + struct hif_device *device; AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: +hifIRQHandler\n")); device = getHifDevice(func); @@ -792,9 +792,9 @@ hifIRQHandler(struct sdio_func *func) /* handle HTC startup via thread*/ 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")); /* start up inform DRV layer */ if ((osdrvCallbacks.deviceInsertedHandler(osdrvCallbacks.context,device)) != 0) { @@ -806,8 +806,8 @@ static int startup_task(void *param) #if defined(CONFIG_PM) static int enable_task(void *param) { - HIF_DEVICE *device; - device = (HIF_DEVICE *)param; + struct hif_device *device; + device = (struct hif_device *)param; AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: call from resume_task\n")); /* 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) { int ret; - HIF_DEVICE * device; + struct hif_device * device; int count; AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, @@ -866,7 +866,7 @@ static int hifDeviceInserted(struct sdio_func *func, const struct sdio_device_id void -HIFAckInterrupt(HIF_DEVICE *device) +HIFAckInterrupt(struct hif_device *device) { AR_DEBUG_ASSERT(device != NULL); @@ -874,7 +874,7 @@ HIFAckInterrupt(HIF_DEVICE *device) } void -HIFUnMaskInterrupt(HIF_DEVICE *device) +HIFUnMaskInterrupt(struct hif_device *device) { int ret; @@ -890,7 +890,7 @@ HIFUnMaskInterrupt(HIF_DEVICE *device) AR_DEBUG_ASSERT(ret == 0); } -void HIFMaskInterrupt(HIF_DEVICE *device) +void HIFMaskInterrupt(struct hif_device *device) { int ret; AR_DEBUG_ASSERT(device != NULL); @@ -910,7 +910,7 @@ void HIFMaskInterrupt(HIF_DEVICE *device) AR_DEBUG_ASSERT(ret == 0); } -BUS_REQUEST *hifAllocateBusRequest(HIF_DEVICE *device) +BUS_REQUEST *hifAllocateBusRequest(struct hif_device *device) { BUS_REQUEST *busrequest; unsigned long flag; @@ -930,7 +930,7 @@ BUS_REQUEST *hifAllocateBusRequest(HIF_DEVICE *device) } void -hifFreeBusRequest(HIF_DEVICE *device, BUS_REQUEST *busrequest) +hifFreeBusRequest(struct hif_device *device, BUS_REQUEST *busrequest) { unsigned long flag; @@ -949,7 +949,7 @@ hifFreeBusRequest(HIF_DEVICE *device, BUS_REQUEST *busrequest) 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 status = 0; @@ -996,7 +996,7 @@ static int hifDisableFunc(HIF_DEVICE *device, struct sdio_func *func) 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; const char *taskName = NULL; @@ -1081,7 +1081,7 @@ static int hifDeviceSuspend(struct device *dev) { struct sdio_func *func=dev_to_sdio_func(dev); int status = 0; - HIF_DEVICE *device; + struct hif_device *device; device = getHifDevice(func); 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); int status = 0; - HIF_DEVICE *device; + struct hif_device *device; device = getHifDevice(func); 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) { int status = 0; - HIF_DEVICE *device; + struct hif_device *device; AR_DEBUG_ASSERT(func != NULL); 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. */ -int hifWaitForPendingRecv(HIF_DEVICE *device) +int hifWaitForPendingRecv(struct hif_device *device) { s32 cnt = 10; 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) { - HIF_DEVICE *hifdevice; + struct hif_device *hifdevice; AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: addHifDevice\n")); 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); #if HIF_USE_DMA_BOUNCE_BUFFER hifdevice->dma_buffer = kmalloc(HIF_DMA_BUFFER_SIZE, GFP_KERNEL); @@ -1202,15 +1202,15 @@ addHifDevice(struct sdio_func *func) return hifdevice; } -static HIF_DEVICE * +static struct hif_device * getHifDevice(struct sdio_func *func) { AR_DEBUG_ASSERT(func != NULL); - return (HIF_DEVICE *)sdio_get_drvdata(func); + return (struct hif_device *)sdio_get_drvdata(func); } static void -delHifDevice(HIF_DEVICE * device) +delHifDevice(struct hif_device * device) { AR_DEBUG_ASSERT(device!= NULL); AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: delHifDevice; 0x%p\n", device)); @@ -1224,17 +1224,17 @@ static void ResetAllCards(void) { } -void HIFClaimDevice(HIF_DEVICE *device, void *context) +void HIFClaimDevice(struct hif_device *device, void *context) { device->claimedContext = context; } -void HIFReleaseDevice(HIF_DEVICE *device) +void HIFReleaseDevice(struct hif_device *device) { 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) { /* already in use! */ @@ -1244,7 +1244,7 @@ int HIFAttachHTC(HIF_DEVICE *device, HTC_CALLBACKS *callbacks) return 0; } -void HIFDetachHTC(HIF_DEVICE *device) +void HIFDetachHTC(struct hif_device *device) { A_MEMZERO(&device->htcCallbacks,sizeof(device->htcCallbacks)); } diff --git a/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif_scatter.c b/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif_scatter.c index 2c64abe..a1fdcc1 100644 --- a/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif_scatter.c +++ b/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif_scatter.c @@ -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; diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k.c b/drivers/staging/ath6kl/htc2/AR6000/ar6k.c index 91e763a..eeddf60 100644 --- a/drivers/staging/ath6kl/htc2/AR6000/ar6k.c +++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k.c @@ -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) { diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c b/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c index 8cf46b1..c6488e0 100644 --- a/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c +++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c @@ -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; diff --git a/drivers/staging/ath6kl/include/ar3kconfig.h b/drivers/staging/ath6kl/include/ar3kconfig.h index 80f948e..91bc4ee 100644 --- a/drivers/staging/ath6kl/include/ar3kconfig.h +++ b/drivers/staging/ath6kl/include/ar3kconfig.h @@ -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 */ diff --git a/drivers/staging/ath6kl/include/ar6000_diag.h b/drivers/staging/ath6kl/include/ar6000_diag.h index ca0961a..739c01c 100644 --- a/drivers/staging/ath6kl/include/ar6000_diag.h +++ b/drivers/staging/ath6kl/include/ar6000_diag.h @@ -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_*/ diff --git a/drivers/staging/ath6kl/include/bmi.h b/drivers/staging/ath6kl/include/bmi.h index b44988d..eb1e756 100644 --- a/drivers/staging/ath6kl/include/bmi.h +++ b/drivers/staging/ath6kl/include/bmi.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); diff --git a/drivers/staging/ath6kl/include/common_drv.h b/drivers/staging/ath6kl/include/common_drv.h index 3508df4..b606334 100644 --- a/drivers/staging/ath6kl/include/common_drv.h +++ b/drivers/staging/ath6kl/include/common_drv.h @@ -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); diff --git a/drivers/staging/ath6kl/include/hif.h b/drivers/staging/ath6kl/include/hif.h index 3dcb787..83650d5 100644 --- a/drivers/staging/ath6kl/include/hif.h +++ b/drivers/staging/ath6kl/include/hif.h @@ -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 } diff --git a/drivers/staging/ath6kl/miscdrv/common_drv.c b/drivers/staging/ath6kl/miscdrv/common_drv.c index 3ada331..a23a524 100644 --- a/drivers/staging/ath6kl/miscdrv/common_drv.c +++ b/drivers/staging/ath6kl/miscdrv/common_drv.c @@ -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) { diff --git a/drivers/staging/ath6kl/os/linux/eeprom.c b/drivers/staging/ath6kl/os/linux/eeprom.c index 7d049df..4cff9da 100644 --- a/drivers/staging/ath6kl/os/linux/eeprom.c +++ b/drivers/staging/ath6kl/os/linux/eeprom.c @@ -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; diff --git a/drivers/staging/ath6kl/os/linux/export_hci_transport.c b/drivers/staging/ath6kl/os/linux/export_hci_transport.c index 787a8bd..442a286 100644 --- a/drivers/staging/ath6kl/os/linux/export_hci_transport.c +++ b/drivers/staging/ath6kl/os/linux/export_hci_transport.c @@ -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; diff --git a/drivers/staging/ath6kl/os/linux/hci_bridge.c b/drivers/staging/ath6kl/os/linux/hci_bridge.c index e566329..2e68ac2 100644 --- a/drivers/staging/ath6kl/os/linux/hci_bridge.c +++ b/drivers/staging/ath6kl/os/linux/hci_bridge.c @@ -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, diff --git a/drivers/staging/ath6kl/os/linux/include/ar6000_drv.h b/drivers/staging/ath6kl/os/linux/include/ar6000_drv.h index 9b5c0a3..89fd80a 100644 --- a/drivers/staging/ath6kl/os/linux/include/ar6000_drv.h +++ b/drivers/staging/ath6kl/os/linux/include/ar6000_drv.h @@ -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" { diff --git a/drivers/staging/ath6kl/os/linux/include/export_hci_transport.h b/drivers/staging/ath6kl/os/linux/include/export_hci_transport.h index 31f4f78..74f9861 100644 --- a/drivers/staging/ath6kl/os/linux/include/export_hci_transport.h +++ b/drivers/staging/ath6kl/os/linux/include/export_hci_transport.h @@ -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); diff --git a/drivers/staging/ath6kl/os/linux/ioctl.c b/drivers/staging/ath6kl/os/linux/ioctl.c index c650faa..0daa201 100644 --- a/drivers/staging/ath6kl/os/linux/ioctl.c +++ b/drivers/staging/ath6kl/os/linux/ioctl.c @@ -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; -- 1.7.4.15.g7811d