Skip to content

Commit

Permalink
beceem: use get_seconds for elapsed time
Browse files Browse the repository at this point in the history
get_seconds is lower overhead and fine if all driver wants to do
is keep track of seconds.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
  • Loading branch information
Stephen Hemminger committed Nov 1, 2010
1 parent 2d08748 commit e4d4625
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions drivers/staging/bcm/CmHost.c
Original file line number Diff line number Diff line change
Expand Up @@ -2053,7 +2053,7 @@ BOOLEAN CmControlResponseMessage(PMINI_ADAPTER Adapter, /**<Pointer to the Adap
case DSA_ACK:
{
UINT uiSearchRuleIndex=0;
struct timeval tv = {0};

BCM_DEBUG_PRINT( Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "VCID:0x%X",
ntohs(pstAddIndication->u16VCID));
uiSearchRuleIndex=SearchFreeSfid(Adapter);
Expand Down Expand Up @@ -2139,12 +2139,9 @@ BOOLEAN CmControlResponseMessage(PMINI_ADAPTER Adapter, /**<Pointer to the Adap
Adapter->LinkUpStatus = 1;
if (netif_msg_link(Adapter))
pr_info(DRV_NAME "%s: link up\n", Adapter->dev->name);
do_gettimeofday(&tv);

atomic_set(&Adapter->TxPktAvail, 1);
wake_up(&Adapter->tx_packet_wait_queue);
Adapter->liTimeSinceLastNetEntry = tv.tv_sec;
BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "============Tx Service Flow Created!");
Adapter->liTimeSinceLastNetEntry = get_seconds();
}
}
}
Expand Down

0 comments on commit e4d4625

Please sign in to comment.