mac80211: Prevent running sta_cleanup timer unnecessarily
authorJuuso Oikarinen <juuso.oikarinen@nokia.com>
Mon, 19 Apr 2010 07:12:52 +0000 (10:12 +0300)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 19 Apr 2010 20:41:42 +0000 (16:41 -0400)
commit3393a608c4979a94d1887efc05b792849d361a65
tree0aceeb1e67fd23f82844086fcc5fb6c16b24dafc
parent2aab4c273ad837fbcf2955aee32b9ec4706c2521
mac80211: Prevent running sta_cleanup timer unnecessarily

The sta_cleanup timer is used to periodically expire buffered frames from the
tx buf. The timer is executing periodically, regardless of the need for it.
This is wasting resources.

Fix this simply by not restarting the sta_cleanup timer if the tx buffer was
empty. Restart the timer when there is some more tx-traffic.

Cc: Janne Ylälehto <janne.ylalehto@nokia.com>
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/sta_info.c
net/mac80211/tx.c