From: Malcolm Priestley Date: Sat, 24 Aug 2013 11:42:01 +0000 (+0100) Subject: staging: vt6656: device.h Remove dead code bSoftwareGenCrcErr. X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=4235f72fbcabebfeabb65cb7a740985337a1a1d4;p=openwrt%2Fstaging%2Fblogic.git staging: vt6656: device.h Remove dead code bSoftwareGenCrcErr. Probably an error in earlier firmware is never enabled so remove. bPacketToWirelessUsb remove dead if/else and variables. Signed-off-by: Malcolm Priestley Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h index 49869108e7e0..e8f4b194005e 100644 --- a/drivers/staging/vt6656/device.h +++ b/drivers/staging/vt6656/device.h @@ -596,7 +596,6 @@ struct vnt_private { int bCCK; int bEncryptionEnable; int bLongHeader; - int bSoftwareGenCrcErr; int bShortSlotTime; int bProtectMode; int bNonERPPresent; diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c index 14b7defe2b5d..80741c0d8766 100644 --- a/drivers/staging/vt6656/rxtx.c +++ b/drivers/staging/vt6656/rxtx.c @@ -1003,7 +1003,7 @@ static int s_bPacketToWirelessUsb(struct vnt_private *pDevice, u8 byPktType, void *pvTxDataHd; u8 byFBOption = AUTO_FB_NONE, byFragType; u16 wTxBufSize; - u32 dwMICKey0, dwMICKey1, dwMIC_Priority, dwCRC; + u32 dwMICKey0, dwMICKey1, dwMIC_Priority; u32 *pdwMIC_L, *pdwMIC_R; int bSoftWEP = false; @@ -1058,10 +1058,6 @@ static int s_bPacketToWirelessUsb(struct vnt_private *pDevice, u8 byPktType, if (pDevice->bLongHeader) pTxBufHead->wFIFOCtl |= FIFOCTL_LHEAD; - if (pDevice->bSoftwareGenCrcErr) { - pTxBufHead->wFIFOCtl |= FIFOCTL_CRCDIS; // set tx descriptors to NO hardware CRC - } - //Set FRAGCTL_MACHDCNT if (pDevice->bLongHeader) { cbMACHdLen = WLAN_HDR_ADDR3_LEN + 6; @@ -1386,22 +1382,7 @@ static int s_bPacketToWirelessUsb(struct vnt_private *pDevice, u8 byPktType, cbFrameSize -= cbICVlen; } - if (pDevice->bSoftwareGenCrcErr == true) { - unsigned int cbLen; - u32 * pdwCRC; - - dwCRC = 0xFFFFFFFFL; - cbLen = cbFrameSize - cbFCSlen; - // calculate CRC, and wrtie CRC value to end of TD - dwCRC = CRCdwGetCrc32Ex(pbyMacHdr, cbLen, dwCRC); - pdwCRC = (u32 *)(pbyMacHdr + cbLen); - // finally, we must invert dwCRC to get the correct answer - *pdwCRC = ~dwCRC; - // Force Error - *pdwCRC -= 1; - } else { cbFrameSize -= cbFCSlen; - } *pcbHeaderLen = cbHeaderLength; *pcbTotalLen = cbHeaderLength + cbFrameSize ;