Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 236065
b: refs/heads/master
c: d0e0086
h: refs/heads/master
i:
  236063: 97db9c3
v: v3
  • Loading branch information
Vipin Mehta authored and Greg Kroah-Hartman committed Feb 18, 2011
1 parent c31d5a4 commit fe90668
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 28f7e85a4b454e4882a91ea13dd17cdf5013168d
refs/heads/master: d0e0086893de668db30f31b8ba407199a0f693d0
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ typedef spinlock_t A_MUTEX_T;

/* Get current time in ms adding a constant offset (in ms) */
#define A_GET_MS(offset) \
(jiffies + ((offset) / 1000) * HZ)
(((jiffies / HZ) * 1000) + (offset))

/*
* Timer Functions
Expand Down
7 changes: 4 additions & 3 deletions trunk/drivers/staging/ath6kl/wlan/src/wlan_node.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ wlan_setup_node(struct ieee80211_node_table *nt, bss_t *ni,

timeoutValue = nt->nt_nodeAge;

ni->ni_tstamp = A_GET_MS (timeoutValue);
ni->ni_tstamp = A_GET_MS (0);
ni->ni_actcnt = WLAN_NODE_INACT_CNT;

IEEE80211_NODE_LOCK_BH(nt);
Expand Down Expand Up @@ -360,7 +360,7 @@ wlan_refresh_inactive_nodes (struct ieee80211_node_table *nt)
if (A_MEMCMP(myBssid, bss->ni_macaddr, sizeof(myBssid)) != 0)
{

if (bss->ni_tstamp <= now || --bss->ni_actcnt == 0)
if (((now - bss->ni_tstamp) > timeoutValue) || --bss->ni_actcnt == 0)
{
/*
* free up all but the current bss - if set
Expand All @@ -381,6 +381,7 @@ wlan_node_timeout (A_ATH_TIMER arg)
bss_t *bss, *nextBss;
u8 myBssid[IEEE80211_ADDR_LEN], reArmTimer = false;
u32 timeoutValue = 0;
u32 now = A_GET_MS(0);

timeoutValue = nt->nt_nodeAge;

Expand All @@ -393,7 +394,7 @@ wlan_node_timeout (A_ATH_TIMER arg)
if (A_MEMCMP(myBssid, bss->ni_macaddr, sizeof(myBssid)) != 0)
{

if (bss->ni_tstamp <= A_GET_MS(0))
if ((now - bss->ni_tstamp) > timeoutValue)
{
/*
* free up all but the current bss - if set
Expand Down

0 comments on commit fe90668

Please sign in to comment.