diff options
author | Stefano Brivio <stefano.brivio@polimi.it> | 2007-12-22 22:43:57 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:00:53 -0500 |
commit | 13e05aa631b195ce30737b320da17e7542c82ead (patch) | |
tree | 8bb18fb5efb02dd873e969be5c2edd36a7ef5488 /net/mac80211 | |
parent | fa44327c06492c9bd625dbc8dbe35e5d5965fec6 (diff) |
rc80211-pid: fix sta_info refcounting
Fix a bug which caused uncorrect refcounting of PHYs in mac80211. Thanks to
Johannes Berg for spotting this out.
Cc: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/rc80211_pid_algo.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/mac80211/rc80211_pid_algo.c b/net/mac80211/rc80211_pid_algo.c index 3e26280d3142..da3529017da1 100644 --- a/net/mac80211/rc80211_pid_algo.c +++ b/net/mac80211/rc80211_pid_algo.c | |||
@@ -254,7 +254,7 @@ static void rate_control_pid_tx_status(void *priv, struct net_device *dev, | |||
254 | /* Ignore all frames that were sent with a different rate than the rate | 254 | /* Ignore all frames that were sent with a different rate than the rate |
255 | * we currently advise mac80211 to use. */ | 255 | * we currently advise mac80211 to use. */ |
256 | if (status->control.rate != &local->oper_hw_mode->rates[sta->txrate]) | 256 | if (status->control.rate != &local->oper_hw_mode->rates[sta->txrate]) |
257 | return; | 257 | goto ignore; |
258 | 258 | ||
259 | spinfo = sta->rate_ctrl_priv; | 259 | spinfo = sta->rate_ctrl_priv; |
260 | spinfo->tx_num_xmit++; | 260 | spinfo->tx_num_xmit++; |
@@ -295,6 +295,7 @@ static void rate_control_pid_tx_status(void *priv, struct net_device *dev, | |||
295 | if (time_after(jiffies, spinfo->last_sample + period)) | 295 | if (time_after(jiffies, spinfo->last_sample + period)) |
296 | rate_control_pid_sample(pinfo, local, sta); | 296 | rate_control_pid_sample(pinfo, local, sta); |
297 | 297 | ||
298 | ignore: | ||
298 | sta_info_put(sta); | 299 | sta_info_put(sta); |
299 | } | 300 | } |
300 | 301 | ||