mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 02:39:48 +00:00
staging: vt6656: Replace pStatistic->abyTxPktInfo with struct vnt_tx_pkt_info
Change s_vSaveTxPktInfo and BSSvUpdateNodeTxCounter to use vnt_tx_pkt_info relayed to BSSvUpdateNodeTxCounter via INTnsProcessData. pStatistic->abyTxPktInfo[byPktNum].byBroadMultiUni is unused and discarded. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
9a450f9a7a
commit
51934e7f89
5 changed files with 15 additions and 23 deletions
|
@ -1160,10 +1160,10 @@ else {
|
|||
*
|
||||
-*/
|
||||
|
||||
void BSSvUpdateNodeTxCounter(struct vnt_private *pDevice,
|
||||
PSStatCounter pStatistic, u8 byTSR, u8 byPktNO)
|
||||
void BSSvUpdateNodeTxCounter(struct vnt_private *pDevice, u8 byTSR, u8 byPktNO)
|
||||
{
|
||||
struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
|
||||
struct vnt_tx_pkt_info *pkt_info = pDevice->pkt_info;
|
||||
u32 uNodeIndex = 0;
|
||||
u8 byTxRetry;
|
||||
u16 wRate;
|
||||
|
@ -1177,8 +1177,8 @@ void BSSvUpdateNodeTxCounter(struct vnt_private *pDevice,
|
|||
byPktNum = (byPktNO & 0x0F) >> 4;
|
||||
byTxRetry = (byTSR & 0xF0) >> 4;
|
||||
wRate = (u16) (byPktNO & 0xF0) >> 4;
|
||||
wFIFOCtl = pStatistic->abyTxPktInfo[byPktNum].wFIFOCtl;
|
||||
pbyDestAddr = (u8 *) &( pStatistic->abyTxPktInfo[byPktNum].abyDestAddr[0]);
|
||||
wFIFOCtl = pkt_info[byPktNum].fifo_ctl;
|
||||
pbyDestAddr = pkt_info[byPktNum].dest_addr;
|
||||
|
||||
if (wFIFOCtl & FIFOCTL_AUTO_FB_0) {
|
||||
byFallBack = AUTO_FB_0;
|
||||
|
|
|
@ -264,8 +264,7 @@ void BSSvUpdateAPNode(struct vnt_private *, u16 *pwCapInfo,
|
|||
|
||||
void BSSvSecondCallBack(struct work_struct *work);
|
||||
|
||||
void BSSvUpdateNodeTxCounter(struct vnt_private *, PSStatCounter pStatistic,
|
||||
u8 byTSR, u8 byPktNO);
|
||||
void BSSvUpdateNodeTxCounter(struct vnt_private *, u8 byTSR, u8 byPktNO);
|
||||
|
||||
void BSSvRemoveOneNode(struct vnt_private *, u32 uNodeIndex);
|
||||
|
||||
|
|
|
@ -189,6 +189,12 @@ struct vnt_usb_send_context {
|
|||
unsigned char Data[MAX_TOTAL_SIZE_WITH_ALL_HEADERS];
|
||||
};
|
||||
|
||||
/* tx packet info for rxtx */
|
||||
struct vnt_tx_pkt_info {
|
||||
u16 fifo_ctl;
|
||||
u8 dest_addr[ETH_ALEN];
|
||||
};
|
||||
|
||||
/* structure got from configuration file as user-desired default settings */
|
||||
typedef struct _DEFAULT_CONFIG {
|
||||
signed int ZoneType;
|
||||
|
@ -430,6 +436,7 @@ struct vnt_private {
|
|||
/* Variables to track resources for the BULK Out Pipe */
|
||||
struct vnt_usb_send_context *apTD[CB_MAX_TX_DESC];
|
||||
u32 cbTD;
|
||||
struct vnt_tx_pkt_info pkt_info[16];
|
||||
|
||||
/* Variables to track resources for the Interrupt In Pipe */
|
||||
INT_BUFFER intBuf;
|
||||
|
|
|
@ -92,7 +92,6 @@ void INTnsProcessData(struct vnt_private *pDevice)
|
|||
pStats->tx_packets++;
|
||||
|
||||
BSSvUpdateNodeTxCounter(pDevice,
|
||||
&(pDevice->scStatistic),
|
||||
pINTData->byTSR0,
|
||||
pINTData->byPkt0);
|
||||
/*DBG_PRN_GRP01(("TSR0 %02x\n", pINTData->byTSR0));*/
|
||||
|
@ -105,7 +104,6 @@ void INTnsProcessData(struct vnt_private *pDevice)
|
|||
|
||||
|
||||
BSSvUpdateNodeTxCounter(pDevice,
|
||||
&(pDevice->scStatistic),
|
||||
pINTData->byTSR1,
|
||||
pINTData->byPkt1);
|
||||
/*DBG_PRN_GRP01(("TSR1 %02x\n", pINTData->byTSR1));*/
|
||||
|
@ -117,7 +115,6 @@ void INTnsProcessData(struct vnt_private *pDevice)
|
|||
pStats->tx_packets++;
|
||||
|
||||
BSSvUpdateNodeTxCounter(pDevice,
|
||||
&(pDevice->scStatistic),
|
||||
pINTData->byTSR2,
|
||||
pINTData->byPkt2);
|
||||
/*DBG_PRN_GRP01(("TSR2 %02x\n", pINTData->byTSR2));*/
|
||||
|
@ -129,7 +126,6 @@ void INTnsProcessData(struct vnt_private *pDevice)
|
|||
pStats->tx_packets++;
|
||||
|
||||
BSSvUpdateNodeTxCounter(pDevice,
|
||||
&(pDevice->scStatistic),
|
||||
pINTData->byTSR3,
|
||||
pINTData->byPkt3);
|
||||
/*DBG_PRN_GRP01(("TSR3 %02x\n", pINTData->byTSR3));*/
|
||||
|
|
|
@ -167,20 +167,10 @@ static void s_vSaveTxPktInfo(struct vnt_private *pDevice, u8 byPktNum,
|
|||
u8 *pbyDestAddr, u16 wPktLength, u16 wFIFOCtl)
|
||||
{
|
||||
struct net_device_stats *stats = &pDevice->stats;
|
||||
PSStatCounter pStatistic = &pDevice->scStatistic;
|
||||
struct vnt_tx_pkt_info *pkt_info = pDevice->pkt_info;
|
||||
|
||||
if (is_broadcast_ether_addr(pbyDestAddr))
|
||||
pStatistic->abyTxPktInfo[byPktNum].byBroadMultiUni = TX_PKT_BROAD;
|
||||
else if (is_multicast_ether_addr(pbyDestAddr))
|
||||
pStatistic->abyTxPktInfo[byPktNum].byBroadMultiUni = TX_PKT_MULTI;
|
||||
else
|
||||
pStatistic->abyTxPktInfo[byPktNum].byBroadMultiUni = TX_PKT_UNI;
|
||||
|
||||
pStatistic->abyTxPktInfo[byPktNum].wLength = wPktLength;
|
||||
pStatistic->abyTxPktInfo[byPktNum].wFIFOCtl = wFIFOCtl;
|
||||
memcpy(pStatistic->abyTxPktInfo[byPktNum].abyDestAddr,
|
||||
pbyDestAddr,
|
||||
ETH_ALEN);
|
||||
pkt_info[byPktNum].fifo_ctl = wFIFOCtl;
|
||||
memcpy(pkt_info[byPktNum].dest_addr, pbyDestAddr, ETH_ALEN);
|
||||
|
||||
stats->tx_bytes += wPktLength;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue