diff options
author | Johannes Berg <johannes.berg@intel.com> | 2011-04-01 07:52:48 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-04-04 16:20:07 -0400 |
commit | 26d59535aa08386b97ece58a27bb16fca4f066db (patch) | |
tree | 13949e0c77c36c502d99d417a72188189c87e0b6 /net/mac80211/sta_info.c | |
parent | ccc7c28af205888798b51b6cbc0b557ac1170a49 (diff) |
mac80211: clean up station cleanup timer
We currently run this timer exactly once when
a new mac80211 device is registered, but that
is completely pointless since it will have no
work to do at all. Therefore, remove that and
also simplify some code using the timer.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/sta_info.c')
-rw-r--r-- | net/mac80211/sta_info.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c index 5ec0a7c51b6d..999f8fbf0b4b 100644 --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c | |||
@@ -768,9 +768,8 @@ static void sta_info_cleanup(unsigned long data) | |||
768 | if (!timer_needed) | 768 | if (!timer_needed) |
769 | return; | 769 | return; |
770 | 770 | ||
771 | local->sta_cleanup.expires = | 771 | mod_timer(&local->sta_cleanup, |
772 | round_jiffies(jiffies + STA_INFO_CLEANUP_INTERVAL); | 772 | round_jiffies(jiffies + STA_INFO_CLEANUP_INTERVAL)); |
773 | add_timer(&local->sta_cleanup); | ||
774 | } | 773 | } |
775 | 774 | ||
776 | void sta_info_init(struct ieee80211_local *local) | 775 | void sta_info_init(struct ieee80211_local *local) |
@@ -783,14 +782,6 @@ void sta_info_init(struct ieee80211_local *local) | |||
783 | 782 | ||
784 | setup_timer(&local->sta_cleanup, sta_info_cleanup, | 783 | setup_timer(&local->sta_cleanup, sta_info_cleanup, |
785 | (unsigned long)local); | 784 | (unsigned long)local); |
786 | local->sta_cleanup.expires = | ||
787 | round_jiffies(jiffies + STA_INFO_CLEANUP_INTERVAL); | ||
788 | } | ||
789 | |||
790 | int sta_info_start(struct ieee80211_local *local) | ||
791 | { | ||
792 | add_timer(&local->sta_cleanup); | ||
793 | return 0; | ||
794 | } | 785 | } |
795 | 786 | ||
796 | void sta_info_stop(struct ieee80211_local *local) | 787 | void sta_info_stop(struct ieee80211_local *local) |