Commit 0d174406 authored by Johannes Berg's avatar Johannes Berg Committed by David S. Miller

mac80211: round station cleanup timer

The station cleanup timer runs every ten seconds, the exact
timing is not relevant at all so it can well run together with
other things to save power.
Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 11ee2957
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/skbuff.h> #include <linux/skbuff.h>
#include <linux/if_arp.h> #include <linux/if_arp.h>
#include <linux/timer.h>
#include <net/mac80211.h> #include <net/mac80211.h>
#include "ieee80211_i.h" #include "ieee80211_i.h"
...@@ -306,7 +307,8 @@ static void sta_info_cleanup(unsigned long data) ...@@ -306,7 +307,8 @@ static void sta_info_cleanup(unsigned long data)
} }
read_unlock_bh(&local->sta_lock); read_unlock_bh(&local->sta_lock);
local->sta_cleanup.expires = jiffies + STA_INFO_CLEANUP_INTERVAL; local->sta_cleanup.expires =
round_jiffies(jiffies + STA_INFO_CLEANUP_INTERVAL);
add_timer(&local->sta_cleanup); add_timer(&local->sta_cleanup);
} }
...@@ -345,7 +347,8 @@ void sta_info_init(struct ieee80211_local *local) ...@@ -345,7 +347,8 @@ void sta_info_init(struct ieee80211_local *local)
INIT_LIST_HEAD(&local->sta_list); INIT_LIST_HEAD(&local->sta_list);
init_timer(&local->sta_cleanup); init_timer(&local->sta_cleanup);
local->sta_cleanup.expires = jiffies + STA_INFO_CLEANUP_INTERVAL; local->sta_cleanup.expires =
round_jiffies(jiffies + STA_INFO_CLEANUP_INTERVAL);
local->sta_cleanup.data = (unsigned long) local; local->sta_cleanup.data = (unsigned long) local;
local->sta_cleanup.function = sta_info_cleanup; local->sta_cleanup.function = sta_info_cleanup;
......
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