Commit 1625d216 authored by Tony Cho's avatar Tony Cho Committed by Greg Kroah-Hartman

staging: wilc1000: remove unnecessary files

This patch removes the following files which are not used anymore.
	- fifo_buffer.c
	- fifo_buffer.h
	- coreconfigsimulator.h
	- wilc_wfi_netdevice.c
Signed-off-by: default avatarRobin Hwang <robin.hwang@atmel.com>
Signed-off-by: default avatarTony Cho <tony.cho@atmel.com>
Reviewed-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d10e0a63
......@@ -25,10 +25,10 @@ ccflags-$(CONFIG_WILC1000_PREALLOCATE_AT_LOADING_DRIVER) += -DMEMORY_STATIC \
ccflags-$(CONFIG_WILC1000_DYNAMICALLY_ALLOCATE_MEMROY) += -DWILC_NORMAL_ALLOC
wilc1000-objs := wilc_wfi_netdevice.o wilc_wfi_cfgoperations.o linux_wlan.o linux_mon.o \
wilc1000-objs := wilc_wfi_cfgoperations.o linux_wlan.o linux_mon.o \
wilc_memory.o wilc_msgqueue.o wilc_sleep.o wilc_strutils.o \
wilc_timer.o coreconfigurator.o host_interface.o \
fifo_buffer.o wilc_sdio.o wilc_spi.o wilc_wlan_cfg.o wilc_debugfs.o
wilc_sdio.o wilc_spi.o wilc_wlan_cfg.o wilc_debugfs.o
wilc1000-$(CONFIG_WILC1000_SDIO) += linux_wlan_sdio.o
wilc1000-$(CONFIG_WILC1000_SPI) += linux_wlan_spi.o
/*!
* @file coreconfigsimulator.h
* @brief
* @author
* @sa coreconfigsimulator.c
* @date 1 Mar 2012
* @version 1.0
*/
#ifndef CORECONFIGSIMULATOR_H
#define CORECONFIGSIMULATOR_H
extern s32 CoreConfigSimulatorInit(void);
extern s32 CoreConfigSimulatorDeInit(void);
#endif
#include "fifo_buffer.h"
u32 FIFO_InitBuffer(tHANDLE *hBuffer, u32 u32BufferLength)
{
u32 u32Error = 0;
tstrFifoHandler *pstrFifoHandler = WILC_MALLOC (sizeof (tstrFifoHandler));
if (pstrFifoHandler) {
WILC_memset (pstrFifoHandler, 0, sizeof (tstrFifoHandler));
pstrFifoHandler->pu8Buffer = WILC_MALLOC (u32BufferLength);
if (pstrFifoHandler->pu8Buffer) {
pstrFifoHandler->u32BufferLength = u32BufferLength;
WILC_memset (pstrFifoHandler->pu8Buffer, 0, u32BufferLength);
/* create semaphore */
sema_init(&pstrFifoHandler->SemBuffer, 1);
*hBuffer = pstrFifoHandler;
} else {
*hBuffer = NULL;
u32Error = 1;
}
} else {
u32Error = 1;
}
return u32Error;
}
u32 FIFO_DeInit(tHANDLE hFifo)
{
u32 u32Error = 0;
tstrFifoHandler *pstrFifoHandler = (tstrFifoHandler *) hFifo;
if (pstrFifoHandler) {
if (pstrFifoHandler->pu8Buffer)
WILC_FREE (pstrFifoHandler->pu8Buffer);
else
u32Error = 1;
WILC_FREE (pstrFifoHandler);
} else {
u32Error = 1;
}
return u32Error;
}
u32 FIFO_ReadBytes(tHANDLE hFifo, u8 *pu8Buffer, u32 u32BytesToRead, u32 *pu32BytesRead)
{
u32 u32Error = 0;
tstrFifoHandler *pstrFifoHandler = (tstrFifoHandler *) hFifo;
if (pstrFifoHandler && pu32BytesRead) {
if (pstrFifoHandler->u32TotalBytes) {
down(&pstrFifoHandler->SemBuffer);
if (u32BytesToRead > pstrFifoHandler->u32TotalBytes)
*pu32BytesRead = pstrFifoHandler->u32TotalBytes;
else
*pu32BytesRead = u32BytesToRead;
if ((pstrFifoHandler->u32ReadOffset + u32BytesToRead) <= pstrFifoHandler->u32BufferLength) {
WILC_memcpy(pu8Buffer, pstrFifoHandler->pu8Buffer + pstrFifoHandler->u32ReadOffset,
*pu32BytesRead);
/* update read offset and total bytes */
pstrFifoHandler->u32ReadOffset += u32BytesToRead;
pstrFifoHandler->u32TotalBytes -= u32BytesToRead;
} else {
u32 u32FirstPart =
pstrFifoHandler->u32BufferLength - pstrFifoHandler->u32ReadOffset;
WILC_memcpy(pu8Buffer, pstrFifoHandler->pu8Buffer + pstrFifoHandler->u32ReadOffset,
u32FirstPart);
WILC_memcpy(pu8Buffer + u32FirstPart, pstrFifoHandler->pu8Buffer,
u32BytesToRead - u32FirstPart);
/* update read offset and total bytes */
pstrFifoHandler->u32ReadOffset = u32BytesToRead - u32FirstPart;
pstrFifoHandler->u32TotalBytes -= u32BytesToRead;
}
up(&pstrFifoHandler->SemBuffer);
} else {
u32Error = 1;
}
} else {
u32Error = 1;
}
return u32Error;
}
u32 FIFO_WriteBytes(tHANDLE hFifo, u8 *pu8Buffer, u32 u32BytesToWrite, bool bForceOverWrite)
{
u32 u32Error = 0;
tstrFifoHandler *pstrFifoHandler = (tstrFifoHandler *) hFifo;
if (pstrFifoHandler) {
if (u32BytesToWrite < pstrFifoHandler->u32BufferLength) {
if ((pstrFifoHandler->u32TotalBytes + u32BytesToWrite) <= pstrFifoHandler->u32BufferLength ||
bForceOverWrite) {
down(&pstrFifoHandler->SemBuffer);
if ((pstrFifoHandler->u32WriteOffset + u32BytesToWrite) <= pstrFifoHandler->u32BufferLength) {
WILC_memcpy(pstrFifoHandler->pu8Buffer + pstrFifoHandler->u32WriteOffset, pu8Buffer,
u32BytesToWrite);
/* update read offset and total bytes */
pstrFifoHandler->u32WriteOffset += u32BytesToWrite;
pstrFifoHandler->u32TotalBytes += u32BytesToWrite;
} else {
u32 u32FirstPart =
pstrFifoHandler->u32BufferLength - pstrFifoHandler->u32WriteOffset;
WILC_memcpy(pstrFifoHandler->pu8Buffer + pstrFifoHandler->u32WriteOffset, pu8Buffer,
u32FirstPart);
WILC_memcpy(pstrFifoHandler->pu8Buffer, pu8Buffer + u32FirstPart,
u32BytesToWrite - u32FirstPart);
/* update read offset and total bytes */
pstrFifoHandler->u32WriteOffset = u32BytesToWrite - u32FirstPart;
pstrFifoHandler->u32TotalBytes += u32BytesToWrite;
}
/* if data overwriten */
if (pstrFifoHandler->u32TotalBytes > pstrFifoHandler->u32BufferLength) {
/* adjust read offset to the oldest data available */
pstrFifoHandler->u32ReadOffset = pstrFifoHandler->u32WriteOffset;
/* data availabe is the buffer length */
pstrFifoHandler->u32TotalBytes = pstrFifoHandler->u32BufferLength;
}
up(&pstrFifoHandler->SemBuffer);
} else {
u32Error = 1;
}
} else {
u32Error = 1;
}
} else {
u32Error = 1;
}
return u32Error;
}
#include <linux/types.h>
#include <linux/semaphore.h>
#include "wilc_memory.h"
#include "wilc_strutils.h"
#define tHANDLE void *
typedef struct {
u8 *pu8Buffer;
u32 u32BufferLength;
u32 u32WriteOffset;
u32 u32ReadOffset;
u32 u32TotalBytes;
struct semaphore SemBuffer;
} tstrFifoHandler;
extern u32 FIFO_InitBuffer(tHANDLE *hBuffer,
u32 u32BufferLength);
extern u32 FIFO_DeInit(tHANDLE hFifo);
extern u32 FIFO_ReadBytes(tHANDLE hFifo, u8 *pu8Buffer,
u32 u32BytesToRead, u32 *pu32BytesRead);
extern u32 FIFO_WriteBytes(tHANDLE hFifo, u8 *pu8Buffer,
u32 u32BytesToWrite, bool bForceOverWrite);
......@@ -11,7 +11,6 @@
#define HOST_INT_H
#include "coreconfigurator.h"
#include "coreconfigsimulator.h"
/*****************************************************************************/
/* Macros */
/*****************************************************************************/
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment