mirror of https://gitee.com/openkylin/linux.git
staging: vt6656: dead code bRelayPacketSend
After dead code hostapd remove bRelayPacketSend Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
c0fcac91f3
commit
7a24390d0f
|
@ -2073,129 +2073,3 @@ int nsDMA_tx_packet(struct vnt_private *pDevice, struct sk_buff *skb)
|
|||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Description:
|
||||
* Relay packet send (AC1DMA) from rx dpc.
|
||||
*
|
||||
* Parameters:
|
||||
* In:
|
||||
* pDevice - Pointer to the adapter
|
||||
* pPacket - Pointer to rx packet
|
||||
* cbPacketSize - rx ethernet frame size
|
||||
* Out:
|
||||
* TURE, false
|
||||
*
|
||||
* Return Value: Return true if packet is copy to dma1; otherwise false
|
||||
*/
|
||||
|
||||
int bRelayPacketSend(struct vnt_private *pDevice, u8 *pbySkbData, u32 uDataLen,
|
||||
u32 uNodeIndex)
|
||||
{
|
||||
struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
|
||||
struct vnt_tx_buffer *pTX_Buffer;
|
||||
u32 BytesToWrite = 0, uHeaderLen = 0;
|
||||
u8 byPktType = PK_TYPE_11B;
|
||||
int bNeedEncryption = false;
|
||||
PSKeyItem pTransmitKey = NULL;
|
||||
u8 *pbyBSSID;
|
||||
struct vnt_usb_send_context *pContext;
|
||||
u8 byPktTyp;
|
||||
int fConvertedPacket;
|
||||
u32 status;
|
||||
u16 wKeepRate = pDevice->wCurrentRate;
|
||||
|
||||
pContext = s_vGetFreeContext(pDevice);
|
||||
|
||||
if (NULL == pContext) {
|
||||
return false;
|
||||
}
|
||||
|
||||
memcpy(&pDevice->sTxEthHeader, pbySkbData, ETH_HLEN);
|
||||
|
||||
if (pDevice->bEncryptionEnable == true) {
|
||||
bNeedEncryption = true;
|
||||
// get group key
|
||||
pbyBSSID = pDevice->abyBroadcastAddr;
|
||||
if(KeybGetTransmitKey(&(pDevice->sKey), pbyBSSID, GROUP_KEY, &pTransmitKey) == false) {
|
||||
pTransmitKey = NULL;
|
||||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_DEBUG"KEY is NULL. [%d]\n", pMgmt->eCurrMode);
|
||||
} else {
|
||||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_DEBUG"Get GTK.\n");
|
||||
}
|
||||
}
|
||||
|
||||
if ( bNeedEncryption && (pTransmitKey == NULL) ) {
|
||||
pContext->in_use = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
byPktTyp = (u8)pDevice->byPacketType;
|
||||
|
||||
if (pDevice->bFixRate) {
|
||||
if (pDevice->byBBType == BB_TYPE_11B) {
|
||||
if (pDevice->uConnectionRate >= RATE_11M) {
|
||||
pDevice->wCurrentRate = RATE_11M;
|
||||
} else {
|
||||
pDevice->wCurrentRate = (u16)pDevice->uConnectionRate;
|
||||
}
|
||||
} else {
|
||||
if ((pDevice->byBBType == BB_TYPE_11A) &&
|
||||
(pDevice->uConnectionRate <= RATE_6M)) {
|
||||
pDevice->wCurrentRate = RATE_6M;
|
||||
} else {
|
||||
if (pDevice->uConnectionRate >= RATE_54M)
|
||||
pDevice->wCurrentRate = RATE_54M;
|
||||
else
|
||||
pDevice->wCurrentRate = (u16)pDevice->uConnectionRate;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
pDevice->wCurrentRate = pMgmt->sNodeDBTable[uNodeIndex].wTxDataRate;
|
||||
}
|
||||
|
||||
if (wKeepRate != pDevice->wCurrentRate) {
|
||||
bScheduleCommand((void *) pDevice, WLAN_CMD_SETPOWER, NULL);
|
||||
}
|
||||
|
||||
if (pDevice->wCurrentRate <= RATE_11M)
|
||||
byPktType = PK_TYPE_11B;
|
||||
|
||||
BytesToWrite = uDataLen + ETH_FCS_LEN;
|
||||
|
||||
// Convert the packet to an usb frame and copy into our buffer
|
||||
// and send the irp.
|
||||
|
||||
pTX_Buffer = (struct vnt_tx_buffer *)&pContext->data[0];
|
||||
|
||||
fConvertedPacket = s_bPacketToWirelessUsb(pDevice, byPktType,
|
||||
pTX_Buffer, bNeedEncryption,
|
||||
uDataLen, &pDevice->sTxEthHeader,
|
||||
pbySkbData, pTransmitKey, uNodeIndex,
|
||||
pDevice->wCurrentRate,
|
||||
&uHeaderLen, &BytesToWrite
|
||||
);
|
||||
|
||||
if (fConvertedPacket == false) {
|
||||
pContext->in_use = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
pTX_Buffer->byPKTNO = (u8) (((pDevice->wCurrentRate<<4) &0x00F0) | ((pDevice->wSeqCounter - 1) & 0x000F));
|
||||
pTX_Buffer->tx_byte_count = cpu_to_le16((u16)BytesToWrite);
|
||||
|
||||
pContext->skb = NULL;
|
||||
pContext->type = CONTEXT_DATA_PACKET;
|
||||
pContext->buf_len = (u16)BytesToWrite + 4; /* USB header */
|
||||
|
||||
s_vSaveTxPktInfo(pDevice, (u8)(pTX_Buffer->byPKTNO & 0x0F),
|
||||
&pDevice->sTxEthHeader.h_dest[0],
|
||||
(u16)(BytesToWrite - uHeaderLen),
|
||||
pTX_Buffer->fifo_head.wFIFOCtl);
|
||||
|
||||
status = PIPEnsSendBulkOut(pDevice,pContext);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -250,7 +250,5 @@ void vDMA0_tx_80211(struct vnt_private *, struct sk_buff *skb);
|
|||
int nsDMA_tx_packet(struct vnt_private *, struct sk_buff *skb);
|
||||
CMD_STATUS csMgmt_xmit(struct vnt_private *, struct vnt_tx_mgmt *);
|
||||
CMD_STATUS csBeacon_xmit(struct vnt_private *, struct vnt_tx_mgmt *);
|
||||
int bRelayPacketSend(struct vnt_private *, u8 *pbySkbData, u32 uDataLen,
|
||||
u32 uNodeIndex);
|
||||
|
||||
#endif /* __RXTX_H__ */
|
||||
|
|
Loading…
Reference in New Issue