rtl8188eu: Remove all trailing spaces from code

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
Larry Finger 2014-12-19 00:59:46 -06:00
parent 8db176767f
commit bb33327257
190 changed files with 53569 additions and 53764 deletions

View file

@ -1,7 +1,7 @@
/******************************************************************************
*
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
*
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
@ -77,12 +77,12 @@ BOOLEAN
Efuse_Write1ByteToFakeContent(
IN struct adapter *pAdapter,
IN u16 Offset,
IN u8 Value );
IN u8 Value );
BOOLEAN
Efuse_Write1ByteToFakeContent(
IN struct adapter *pAdapter,
IN u16 Offset,
IN u8 Value )
IN u8 Value )
{
if(Offset >= EFUSE_MAX_HW_SIZE)
{
@ -100,7 +100,7 @@ Efuse_Write1ByteToFakeContent(
/*-----------------------------------------------------------------------------
* Function: Efuse_PowerSwitch
*
* Overview: When we want to enable write operation, we should change to
* Overview: When we want to enable write operation, we should change to
* pwr on state. When we stop write, we should switch to 500k mode
* and disable LDO 2.5V.
*
@ -112,7 +112,7 @@ Efuse_Write1ByteToFakeContent(
*
* Revised History:
* When Who Remark
* 11/17/2008 MHC Create Version 0.
* 11/17/2008 MHC Create Version 0.
*
*---------------------------------------------------------------------------*/
VOID
@ -122,7 +122,7 @@ Efuse_PowerSwitch(
IN u8 PwrState)
{
pAdapter->HalFunc.EfusePowerSwitch(pAdapter, bWrite, PwrState);
}
}
/*-----------------------------------------------------------------------------
* Function: efuse_GetCurrentSize
@ -137,7 +137,7 @@ Efuse_PowerSwitch(
*
* Revised History:
* When Who Remark
* 11/16/2008 MHC Create Version 0.
* 11/16/2008 MHC Create Version 0.
*
*---------------------------------------------------------------------------*/
u16
@ -179,9 +179,9 @@ Efuse_CalculateWordCnts(IN u8 word_en)
VOID
ReadEFuseByte(
struct adapter *Adapter,
u16 _offset,
u8 *pbuf,
IN BOOLEAN bPseudoTest)
u16 _offset,
u8 *pbuf,
IN BOOLEAN bPseudoTest)
{
u32 value32;
u8 readbyte;
@ -195,14 +195,14 @@ ReadEFuseByte(
}
//Write Address
rtw_write8(Adapter, EFUSE_CTRL+1, (_offset & 0xff));
rtw_write8(Adapter, EFUSE_CTRL+1, (_offset & 0xff));
readbyte = rtw_read8(Adapter, EFUSE_CTRL+2);
rtw_write8(Adapter, EFUSE_CTRL+2, ((_offset >> 8) & 0x03) | (readbyte & 0xfc));
rtw_write8(Adapter, EFUSE_CTRL+2, ((_offset >> 8) & 0x03) | (readbyte & 0xfc));
//Write bit 32 0
readbyte = rtw_read8(Adapter, EFUSE_CTRL+3);
rtw_write8(Adapter, EFUSE_CTRL+3, (readbyte & 0x7f));
readbyte = rtw_read8(Adapter, EFUSE_CTRL+3);
rtw_write8(Adapter, EFUSE_CTRL+3, (readbyte & 0x7f));
//Check bit 32 read-ready
retry = 0;
value32 = rtw_read32(Adapter, EFUSE_CTRL);
@ -219,16 +219,16 @@ ReadEFuseByte(
// result will always stay on last data we read.
rtw_udelay_os(50);
value32 = rtw_read32(Adapter, EFUSE_CTRL);
*pbuf = (u8)(value32 & 0xff);
//DBG_871X("ReadEFuseByte _offset:%08u, in %d ms\n",_offset ,rtw_get_passing_time_ms(start));
}
//
// Description:
// 1. Execute E-Fuse read byte operation according as map offset and
// 1. Execute E-Fuse read byte operation according as map offset and
// save to E-Fuse table.
// 2. Refered from SD1 Richard.
//
@ -238,7 +238,7 @@ ReadEFuseByte(
//
// Created by Roger, 2008.10.21.
//
// 2008/12/12 MH 1. Reorganize code flow and reserve bytes. and add description.
// 2008/12/12 MH 1. Reorganize code flow and reserve bytes. and add description.
// 2. Add efuse utilization collect.
// 2008/12/22 MH Read Efuse must check if we write section 1 data again!!! Sec1
// write addr must be after sec5.
@ -249,8 +249,8 @@ efuse_ReadEFuse(
struct adapter *Adapter,
u8 efuseType,
u16 _offset,
u16 _size_byte,
u8 *pbuf,
u16 _size_byte,
u8 *pbuf,
IN BOOLEAN bPseudoTest
);
VOID
@ -258,8 +258,8 @@ efuse_ReadEFuse(
struct adapter *Adapter,
u8 efuseType,
u16 _offset,
u16 _size_byte,
u8 *pbuf,
u16 _size_byte,
u8 *pbuf,
IN BOOLEAN bPseudoTest
)
{
@ -291,12 +291,12 @@ EFUSE_GetEfuseDefinition(
*
* Revised History:
* When Who Remark
* 09/23/2008 MHC Copy from WMAC.
* 09/23/2008 MHC Copy from WMAC.
*
*---------------------------------------------------------------------------*/
u8
EFUSE_Read1Byte(
IN struct adapter *Adapter,
EFUSE_Read1Byte(
IN struct adapter *Adapter,
IN u16 Address)
{
u8 data;
@ -310,12 +310,12 @@ EFUSE_Read1Byte(
if (Address < contentLen) //E-fuse 512Byte
{
//Write E-fuse Register address bit0~7
temp = Address & 0xFF;
rtw_write8(Adapter, EFUSE_CTRL+1, temp);
Bytetemp = rtw_read8(Adapter, EFUSE_CTRL+2);
temp = Address & 0xFF;
rtw_write8(Adapter, EFUSE_CTRL+1, temp);
Bytetemp = rtw_read8(Adapter, EFUSE_CTRL+2);
//Write E-fuse Register address bit8~9
temp = ((Address >> 8) & 0x03) | (Bytetemp & 0xFC);
rtw_write8(Adapter, EFUSE_CTRL+2, temp);
temp = ((Address >> 8) & 0x03) | (Bytetemp & 0xFC);
rtw_write8(Adapter, EFUSE_CTRL+2, temp);
//Write 0x30[31]=0
Bytetemp = rtw_read8(Adapter, EFUSE_CTRL+3);
@ -325,7 +325,7 @@ EFUSE_Read1Byte(
//Wait Write-ready (0x30[31]=1)
Bytetemp = rtw_read8(Adapter, EFUSE_CTRL+3);
while(!(Bytetemp & 0x80))
{
{
Bytetemp = rtw_read8(Adapter, EFUSE_CTRL+3);
k++;
if(k==1000)
@ -339,7 +339,7 @@ EFUSE_Read1Byte(
}
else
return 0xFF;
}/* EFUSE_Read1Byte */
/*-----------------------------------------------------------------------------
@ -355,18 +355,18 @@ EFUSE_Read1Byte(
*
* Revised History:
* When Who Remark
* 09/23/2008 MHC Copy from WMAC.
* 09/23/2008 MHC Copy from WMAC.
*
*---------------------------------------------------------------------------*/
void
EFUSE_Write1Byte(
IN struct adapter *Adapter,
void
EFUSE_Write1Byte(
IN struct adapter *Adapter,
IN u16 Address,
IN u8 Value);
void
EFUSE_Write1Byte(
IN struct adapter *Adapter,
void
EFUSE_Write1Byte(
IN struct adapter *Adapter,
IN u16 Address,
IN u8 Value)
{
@ -383,13 +383,13 @@ EFUSE_Write1Byte(
rtw_write8(Adapter, EFUSE_CTRL, Value);
//Write E-fuse Register address bit0~7
temp = Address & 0xFF;
rtw_write8(Adapter, EFUSE_CTRL+1, temp);
Bytetemp = rtw_read8(Adapter, EFUSE_CTRL+2);
temp = Address & 0xFF;
rtw_write8(Adapter, EFUSE_CTRL+1, temp);
Bytetemp = rtw_read8(Adapter, EFUSE_CTRL+2);
//Write E-fuse Register address bit8~9
temp = ((Address >> 8) & 0x03) | (Bytetemp & 0xFC);
rtw_write8(Adapter, EFUSE_CTRL+2, temp);
temp = ((Address >> 8) & 0x03) | (Bytetemp & 0xFC);
rtw_write8(Adapter, EFUSE_CTRL+2, temp);
//Write 0x30[31]=1
Bytetemp = rtw_read8(Adapter, EFUSE_CTRL+3);
@ -400,7 +400,7 @@ EFUSE_Write1Byte(
Bytetemp = rtw_read8(Adapter, EFUSE_CTRL+3);
while(Bytetemp & 0x80)
{
Bytetemp = rtw_read8(Adapter, EFUSE_CTRL+3);
Bytetemp = rtw_read8(Adapter, EFUSE_CTRL+3);
k++;
if(k==100)
{
@ -414,7 +414,7 @@ EFUSE_Write1Byte(
/* 11/16/2008 MH Read one byte from real Efuse. */
u8
efuse_OneByteRead(
IN struct adapter *pAdapter,
IN struct adapter *pAdapter,
IN u16 addr,
IN u8 *data,
IN BOOLEAN bPseudoTest)
@ -428,35 +428,35 @@ efuse_OneByteRead(
return bResult;
}
// -----------------e-fuse reg ctrl ---------------------------------
//address
rtw_write8(pAdapter, EFUSE_CTRL+1, (u8)(addr&0xff));
rtw_write8(pAdapter, EFUSE_CTRL+2, ((u8)((addr>>8) &0x03) ) |
(rtw_read8(pAdapter, EFUSE_CTRL+2)&0xFC ));
//address
rtw_write8(pAdapter, EFUSE_CTRL+1, (u8)(addr&0xff));
rtw_write8(pAdapter, EFUSE_CTRL+2, ((u8)((addr>>8) &0x03) ) |
(rtw_read8(pAdapter, EFUSE_CTRL+2)&0xFC ));
rtw_write8(pAdapter, EFUSE_CTRL+3, 0x72);//read cmd
rtw_write8(pAdapter, EFUSE_CTRL+3, 0x72);//read cmd
while(!(0x80 &rtw_read8(pAdapter, EFUSE_CTRL+3))&&(tmpidx<100))
{
tmpidx++;
}
if(tmpidx<100)
{
*data=rtw_read8(pAdapter, EFUSE_CTRL);
{
*data=rtw_read8(pAdapter, EFUSE_CTRL);
bResult = _TRUE;
}
else
{
*data = 0xff;
*data = 0xff;
bResult = _FALSE;
}
return bResult;
}
/* 11/16/2008 MH Write one byte to reald Efuse. */
u8
efuse_OneByteWrite(
IN struct adapter *pAdapter,
IN u16 addr,
IN struct adapter *pAdapter,
IN u16 addr,
IN u8 data,
IN BOOLEAN bPseudoTest)
{
@ -472,29 +472,29 @@ efuse_OneByteWrite(
//return 0;
// -----------------e-fuse reg ctrl ---------------------------------
//address
// -----------------e-fuse reg ctrl ---------------------------------
//address
rtw_write8(pAdapter, EFUSE_CTRL+1, (u8)(addr&0xff));
rtw_write8(pAdapter, EFUSE_CTRL+2,
(rtw_read8(pAdapter, EFUSE_CTRL+2)&0xFC )|(u8)((addr>>8)&0x03) );
rtw_write8(pAdapter, EFUSE_CTRL, data);//data
rtw_write8(pAdapter, EFUSE_CTRL+2,
(rtw_read8(pAdapter, EFUSE_CTRL+2)&0xFC )|(u8)((addr>>8)&0x03) );
rtw_write8(pAdapter, EFUSE_CTRL, data);//data
rtw_write8(pAdapter, EFUSE_CTRL+3, 0xF2);//write cmd
while((0x80 & rtw_read8(pAdapter, EFUSE_CTRL+3)) && (tmpidx<100) ){
tmpidx++;
}
if(tmpidx<100)
{
{
bResult = _TRUE;
}
else
{
{
bResult = _FALSE;
}
return bResult;
}
return bResult;
}
int
@ -510,9 +510,9 @@ Efuse_PgPacketRead( IN struct adapter *pAdapter,
return ret;
}
int
Efuse_PgPacketWrite(IN struct adapter *pAdapter,
IN u8 offset,
int
Efuse_PgPacketWrite(IN struct adapter *pAdapter,
IN u8 offset,
IN u8 word_en,
IN u8 *data,
IN BOOLEAN bPseudoTest)
@ -525,9 +525,9 @@ Efuse_PgPacketWrite(IN struct adapter *pAdapter,
}
int
Efuse_PgPacketWrite_BT(IN struct adapter *pAdapter,
IN u8 offset,
int
Efuse_PgPacketWrite_BT(IN struct adapter *pAdapter,
IN u8 offset,
IN u8 word_en,
IN u8 *data,
IN BOOLEAN bPseudoTest)
@ -552,15 +552,15 @@ Efuse_PgPacketWrite_BT(IN struct adapter *pAdapter,
*
* Revised History:
* When Who Remark
* 11/16/2008 MHC Create Version 0.
* 11/21/2008 MHC Fix Write bug when we only enable late word.
* 11/16/2008 MHC Create Version 0.
* 11/21/2008 MHC Fix Write bug when we only enable late word.
*
*---------------------------------------------------------------------------*/
void
efuse_WordEnableDataRead(IN u8 word_en,
IN u8 *sourdata,
IN u8 *targetdata)
{
{
if (!(word_en&BIT(0)))
{
targetdata[0] = sourdata[0];
@ -587,14 +587,14 @@ efuse_WordEnableDataRead(IN u8 word_en,
u8
Efuse_WordEnableDataWrite( IN struct adapter *pAdapter,
IN u16 efuse_addr,
IN u8 word_en,
IN u8 word_en,
IN u8 *data,
IN BOOLEAN bPseudoTest)
{
u8 ret=0;
ret = pAdapter->HalFunc.Efuse_WordEnableDataWrite(pAdapter, efuse_addr, word_en, data, bPseudoTest);
return ret;
}
@ -911,18 +911,18 @@ exit:
*
* Revised History:
* When Who Remark
* 11/11/2008 MHC Create Version 0.
* 11/11/2008 MHC Create Version 0.
*
*---------------------------------------------------------------------------*/
VOID
VOID
Efuse_ReadAllMap(
IN struct adapter *pAdapter,
IN struct adapter *pAdapter,
IN u8 efuseType,
IN OUT u8 *Efuse,
IN BOOLEAN bPseudoTest);
VOID
VOID
Efuse_ReadAllMap(
IN struct adapter *pAdapter,
IN struct adapter *pAdapter,
IN u8 efuseType,
IN OUT u8 *Efuse,
IN BOOLEAN bPseudoTest)
@ -953,7 +953,7 @@ Efuse_ReadAllMap(
*
* Revised History:
* When Who Remark
* 11/12/2008 MHC Create Version 0.
* 11/12/2008 MHC Create Version 0.
*
*---------------------------------------------------------------------------*/
static VOID
@ -1014,7 +1014,7 @@ efuse_ShadowRead4Byte(
*
* Revised History:
* When Who Remark
* 11/12/2008 MHC Create Version 0.
* 11/12/2008 MHC Create Version 0.
*
*---------------------------------------------------------------------------*/
#ifdef PLATFORM
@ -1022,13 +1022,13 @@ static VOID
efuse_ShadowWrite1Byte(
IN struct adapter *pAdapter,
IN u16 Offset,
IN u8 Value);
IN u8 Value);
#endif //PLATFORM
static VOID
efuse_ShadowWrite1Byte(
IN struct adapter *pAdapter,
IN u16 Offset,
IN u8 Value)
IN u8 Value)
{
EEPROM_EFUSE_PRIV *pEEPROM = GET_EEPROM_EFUSE_PRIV(pAdapter);
@ -1041,7 +1041,7 @@ static VOID
efuse_ShadowWrite2Byte(
IN struct adapter *pAdapter,
IN u16 Offset,
IN u16 Value)
IN u16 Value)
{
EEPROM_EFUSE_PRIV *pEEPROM = GET_EEPROM_EFUSE_PRIV(pAdapter);
@ -1079,7 +1079,7 @@ efuse_ShadowWrite4Byte(
*
* Revised History:
* When Who Remark
* 11/13/2008 MHC Create Version 0.
* 11/13/2008 MHC Create Version 0.
*
*---------------------------------------------------------------------------*/
void EFUSE_ShadowMapUpdate(
@ -1098,19 +1098,19 @@ void EFUSE_ShadowMapUpdate(
}
else
{
#ifdef CONFIG_ADAPTOR_INFO_CACHING_FILE
#ifdef CONFIG_ADAPTOR_INFO_CACHING_FILE
if(_SUCCESS != retriveAdaptorInfoFile(pAdapter->registrypriv.adaptor_info_caching_file_path, pEEPROM)) {
#endif
Efuse_ReadAllMap(pAdapter, efuseType, pEEPROM->efuse_eeprom_data, bPseudoTest);
#ifdef CONFIG_ADAPTOR_INFO_CACHING_FILE
storeAdaptorInfoFile(pAdapter->registrypriv.adaptor_info_caching_file_path, pEEPROM);
}
#endif
}
//PlatformMoveMemory((PVOID)&pHalData->EfuseMap[EFUSE_MODIFY_MAP][0],
//PlatformMoveMemory((PVOID)&pHalData->EfuseMap[EFUSE_MODIFY_MAP][0],
//(PVOID)&pHalData->EfuseMap[EFUSE_INIT_MAP][0], mapLen);
}// EFUSE_ShadowMapUpdate
@ -1128,7 +1128,7 @@ void EFUSE_ShadowMapUpdate(
*
* Revised History:
* When Who Remark
* 11/12/2008 MHC Create Version 0.
* 11/12/2008 MHC Create Version 0.
*
*---------------------------------------------------------------------------*/
void
@ -1144,7 +1144,7 @@ EFUSE_ShadowRead(
efuse_ShadowRead2Byte(pAdapter, Offset, (u16 *)Value);
else if (Type == 4)
efuse_ShadowRead4Byte(pAdapter, Offset, (u32 *)Value);
} // EFUSE_ShadowRead
/*-----------------------------------------------------------------------------
@ -1160,7 +1160,7 @@ EFUSE_ShadowRead(
*
* Revised History:
* When Who Remark
* 11/12/2008 MHC Create Version 0.
* 11/12/2008 MHC Create Version 0.
*
*---------------------------------------------------------------------------*/
VOID
@ -1202,7 +1202,7 @@ Efuse_InitSomeVar(
)
{
u8 i;
_rtw_memset((PVOID)&fakeEfuseContent[0], 0xff, EFUSE_MAX_HW_SIZE);
_rtw_memset((PVOID)&fakeEfuseInitMap[0], 0xff, EFUSE_MAX_MAP_LEN);
_rtw_memset((PVOID)&fakeEfuseModifiedMap[0], 0xff, EFUSE_MAX_MAP_LEN);
@ -1252,24 +1252,24 @@ int retriveAdaptorInfoFile(char *path, struct eeprom_priv * eeprom_priv)
int ret = _SUCCESS;
mm_segment_t oldfs;
struct file *fp;
if(path && eeprom_priv) {
ret = rtw_retrive_from_file(path, eeprom_priv->efuse_eeprom_data, EEPROM_MAX_SIZE);
if(ret == EEPROM_MAX_SIZE)
ret = _SUCCESS;
else
ret = _FAIL;
#if 0
if(isAdaptorInfoFileValid()) {
if(isAdaptorInfoFileValid()) {
return 0;
} else {
return _FAIL;
}
#endif
} else {
DBG_871X("%s NULL pointer\n",__FUNCTION__);
ret = _FAIL;