Commit c47b0a34 authored by Malcolm Priestley's avatar Malcolm Priestley Committed by Greg Kroah-Hartman

staging: vt6656: Remove always 0 variable dwDiagRefCount

Remove > 0 code.
Signed-off-by: default avatarMalcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e780e3de
...@@ -423,8 +423,7 @@ void CHvInitChannelTable(struct vnt_private *pDevice) ...@@ -423,8 +423,7 @@ void CHvInitChannelTable(struct vnt_private *pDevice)
break; break;
} }
if ((pDevice->dwDiagRefCount != 0) || if (pDevice->b11hEable == true) {
(pDevice->b11hEable == true)) {
if (bMultiBand == true) { if (bMultiBand == true) {
for (ii = 0; ii < CB_MAX_CHANNEL; ii++) { for (ii = 0; ii < CB_MAX_CHANNEL; ii++) {
sChannelTbl[ii+1].bValid = true; sChannelTbl[ii+1].bValid = true;
......
...@@ -697,7 +697,6 @@ struct vnt_private { ...@@ -697,7 +697,6 @@ struct vnt_private {
u8 byBBPreEDIndex; u8 byBBPreEDIndex;
int bRadioCmd; int bRadioCmd;
u32 dwDiagRefCount;
/* For FOE Tuning */ /* For FOE Tuning */
u8 byFOETuning; u8 byFOETuning;
......
...@@ -740,9 +740,6 @@ int RFbSetPower(struct vnt_private *priv, u32 rate, u32 channel) ...@@ -740,9 +740,6 @@ int RFbSetPower(struct vnt_private *priv, u32 rate, u32 channel)
int ret = true; int ret = true;
u8 power = priv->byCCKPwr; u8 power = priv->byCCKPwr;
if (priv->dwDiagRefCount)
return true;
if (channel == 0) if (channel == 0)
return -EINVAL; return -EINVAL;
......
...@@ -978,26 +978,17 @@ static int s_bPacketToWirelessUsb(struct vnt_private *pDevice, u8 byPktType, ...@@ -978,26 +978,17 @@ static int s_bPacketToWirelessUsb(struct vnt_private *pDevice, u8 byPktType,
bSoftWEP = true; /* WEP 256 */ bSoftWEP = true; /* WEP 256 */
} }
// Get pkt type /* Get pkt type */
if (ntohs(psEthHeader->h_proto) > ETH_DATA_LEN) { if (ntohs(psEthHeader->h_proto) > ETH_DATA_LEN)
if (pDevice->dwDiagRefCount == 0) {
cb802_1_H_len = 8; cb802_1_H_len = 8;
} else { else
cb802_1_H_len = 2;
}
} else {
cb802_1_H_len = 0; cb802_1_H_len = 0;
}
cbFrameBodySize = uSkbPacketLen - ETH_HLEN + cb802_1_H_len; cbFrameBodySize = uSkbPacketLen - ETH_HLEN + cb802_1_H_len;
//Set packet type //Set packet type
pTxBufHead->wFIFOCtl |= (u16)(byPktType<<8); pTxBufHead->wFIFOCtl |= (u16)(byPktType<<8);
if (pDevice->dwDiagRefCount != 0) {
bNeedACK = false;
pTxBufHead->wFIFOCtl = pTxBufHead->wFIFOCtl & (~FIFOCTL_NEEDACK);
} else { //if (pDevice->dwDiagRefCount != 0) {
if ((pDevice->eOPMode == OP_MODE_ADHOC) || if ((pDevice->eOPMode == OP_MODE_ADHOC) ||
(pDevice->eOPMode == OP_MODE_AP)) { (pDevice->eOPMode == OP_MODE_AP)) {
if (is_multicast_ether_addr(psEthHeader->h_dest)) { if (is_multicast_ether_addr(psEthHeader->h_dest)) {
...@@ -1008,13 +999,11 @@ static int s_bPacketToWirelessUsb(struct vnt_private *pDevice, u8 byPktType, ...@@ -1008,13 +999,11 @@ static int s_bPacketToWirelessUsb(struct vnt_private *pDevice, u8 byPktType,
bNeedACK = true; bNeedACK = true;
pTxBufHead->wFIFOCtl |= FIFOCTL_NEEDACK; pTxBufHead->wFIFOCtl |= FIFOCTL_NEEDACK;
} }
} } else {
else { /* MSDUs in Infra mode always need ACK */
// MSDUs in Infra mode always need ACK
bNeedACK = true; bNeedACK = true;
pTxBufHead->wFIFOCtl |= FIFOCTL_NEEDACK; pTxBufHead->wFIFOCtl |= FIFOCTL_NEEDACK;
} }
} //if (pDevice->dwDiagRefCount != 0) {
pTxBufHead->wTimeStamp = DEFAULT_MSDU_LIFETIME_RES_64us; pTxBufHead->wTimeStamp = DEFAULT_MSDU_LIFETIME_RES_64us;
...@@ -1183,23 +1172,18 @@ static int s_bPacketToWirelessUsb(struct vnt_private *pDevice, u8 byPktType, ...@@ -1183,23 +1172,18 @@ static int s_bPacketToWirelessUsb(struct vnt_private *pDevice, u8 byPktType,
} }
} }
// 802.1H /* 802.1H */
if (ntohs(psEthHeader->h_proto) > ETH_DATA_LEN) { if (ntohs(psEthHeader->h_proto) > ETH_DATA_LEN) {
if (pDevice->dwDiagRefCount == 0) {
if ((psEthHeader->h_proto == cpu_to_be16(ETH_P_IPX)) || if ((psEthHeader->h_proto == cpu_to_be16(ETH_P_IPX)) ||
(psEthHeader->h_proto == cpu_to_le16(0xF380))) { (psEthHeader->h_proto == cpu_to_le16(0xF380)))
memcpy((u8 *) (pbyPayloadHead), memcpy((u8 *) (pbyPayloadHead),
abySNAP_Bridgetunnel, 6); abySNAP_Bridgetunnel, 6);
} else { else
memcpy((u8 *) (pbyPayloadHead), &abySNAP_RFC1042[0], 6); memcpy((u8 *) (pbyPayloadHead), &abySNAP_RFC1042[0], 6);
}
pbyType = (u8 *) (pbyPayloadHead + 6);
memcpy(pbyType, &(psEthHeader->h_proto), sizeof(u16));
} else {
memcpy((u8 *) (pbyPayloadHead), &(psEthHeader->h_proto), sizeof(u16));
} pbyType = (u8 *) (pbyPayloadHead + 6);
memcpy(pbyType, &(psEthHeader->h_proto), sizeof(u16));
} }
if (pPacket != NULL) { if (pPacket != NULL) {
......
...@@ -283,8 +283,6 @@ void vRunCommand(struct work_struct *work) ...@@ -283,8 +283,6 @@ void vRunCommand(struct work_struct *work)
if (pDevice->Flags & fMP_DISCONNECTED) if (pDevice->Flags & fMP_DISCONNECTED)
return; return;
if (pDevice->dwDiagRefCount != 0)
return;
if (pDevice->bCmdRunning != true) if (pDevice->bCmdRunning != true)
return; return;
......
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