Commit b77694be authored by Daniel Kenji Toyama's avatar Daniel Kenji Toyama Committed by Greg Kroah-Hartman

Staging: vt6656: tether.c: Fixed coding style issues

Fixed some indentation and spacing issues.
Signed-off-by: default avatarDaniel Kenji Toyama <kenji.toyama@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 183cd295
...@@ -61,25 +61,25 @@ ...@@ -61,25 +61,25 @@
* Return Value: Hash value * Return Value: Hash value
* *
*/ */
BYTE ETHbyGetHashIndexByCrc32 (PBYTE pbyMultiAddr) BYTE ETHbyGetHashIndexByCrc32(PBYTE pbyMultiAddr)
{ {
int ii; int ii;
BYTE byTmpHash; BYTE byTmpHash;
BYTE byHash = 0; BYTE byHash = 0;
// get the least 6-bits from CRC generator /* get the least 6-bits from CRC generator */
byTmpHash = (BYTE)(CRCdwCrc32(pbyMultiAddr, U_ETHER_ADDR_LEN, byTmpHash = (BYTE)(CRCdwCrc32(pbyMultiAddr, U_ETHER_ADDR_LEN,
0xFFFFFFFFL) & 0x3F); 0xFFFFFFFFL) & 0x3F);
// reverse most bit to least bit /* reverse most bit to least bit */
for (ii = 0; ii < (sizeof(byTmpHash) * 8); ii++) { for (ii = 0; ii < (sizeof(byTmpHash) * 8); ii++) {
byHash <<= 1; byHash <<= 1;
if (byTmpHash & 0x01) if (byTmpHash & 0x01)
byHash |= 1; byHash |= 1;
byTmpHash >>= 1; byTmpHash >>= 1;
} }
// adjust 6-bits to the right most /* adjust 6-bits to the right most */
return (byHash >> 2); return byHash >> 2;
} }
...@@ -96,14 +96,13 @@ BYTE ETHbyGetHashIndexByCrc32 (PBYTE pbyMultiAddr) ...@@ -96,14 +96,13 @@ BYTE ETHbyGetHashIndexByCrc32 (PBYTE pbyMultiAddr)
* Return Value: TRUE if ok; FALSE if error. * Return Value: TRUE if ok; FALSE if error.
* *
*/ */
BOOL ETHbIsBufferCrc32Ok (PBYTE pbyBuffer, UINT cbFrameLength) BOOL ETHbIsBufferCrc32Ok(PBYTE pbyBuffer, UINT cbFrameLength)
{ {
DWORD dwCRC; DWORD dwCRC;
dwCRC = CRCdwGetCrc32(pbyBuffer, cbFrameLength - 4); dwCRC = CRCdwGetCrc32(pbyBuffer, cbFrameLength - 4);
if (cpu_to_le32(*((PDWORD)(pbyBuffer + cbFrameLength - 4))) != dwCRC) { if (cpu_to_le32(*((PDWORD)(pbyBuffer + cbFrameLength - 4))) != dwCRC)
return FALSE; return FALSE;
} return TRUE;
return TRUE;
} }
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