summaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorAndrew Lutomirski <luto@myrealbox.com>2008-01-03 21:05:37 -0800
committerDavid S. Miller <davem@davemloft.net>2008-01-28 15:01:04 -0800
commitdf26e7ea049abe5104062f1f3e9ee7ede9d5104f (patch)
tree2de84f0f55e4c5c47077d33a0ed4c91c32230577 /net/mac80211
parent4b475898ec9dc6e62cebcb8fc0b3495c986a4590 (diff)
downloadblackbird-op-linux-df26e7ea049abe5104062f1f3e9ee7ede9d5104f.tar.gz
blackbird-op-linux-df26e7ea049abe5104062f1f3e9ee7ede9d5104f.zip
rc80211_pid should respect fixed rates.
I would argue that mac80211 should handle fixed rates outside the rate control code, which would also allow them to take effect immediately instead of during the rate control callback, but this is pretty close to correct. Signed-Off-By: Andy Lutomirski <luto@myrealbox.com> 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.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/net/mac80211/rc80211_pid_algo.c b/net/mac80211/rc80211_pid_algo.c
index 0995bb9cec21..66cae53a647d 100644
--- a/net/mac80211/rc80211_pid_algo.c
+++ b/net/mac80211/rc80211_pid_algo.c
@@ -108,10 +108,6 @@ static void rate_control_pid_adjust_rate(struct ieee80211_local *local,
int back = (adj > 0) ? 1 : -1;
sdata = IEEE80211_DEV_TO_SUB_IF(sta->dev);
- if (sdata->bss && sdata->bss->force_unicast_rateidx > -1) {
- /* forced unicast rate - do not change STA rate */
- return;
- }
mode = local->oper_hw_mode;
maxrate = sdata->bss ? sdata->bss->max_ratectrl_rateidx : -1;
@@ -241,6 +237,7 @@ static void rate_control_pid_tx_status(void *priv, struct net_device *dev,
{
struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
+ struct ieee80211_sub_if_data *sdata;
struct rc_pid_info *pinfo = priv;
struct sta_info *sta;
struct rc_pid_sta_info *spinfo;
@@ -251,6 +248,13 @@ static void rate_control_pid_tx_status(void *priv, struct net_device *dev,
if (!sta)
return;
+ /* Don't update the state if we're not controlling the rate. */
+ sdata = IEEE80211_DEV_TO_SUB_IF(sta->dev);
+ if (sdata->bss && sdata->bss->force_unicast_rateidx > -1) {
+ sta->txrate = sdata->bss->max_ratectrl_rateidx;
+ return;
+ }
+
/* Ignore all frames that were sent with a different rate than the rate
* we currently advise mac80211 to use. */
if (status->control.rate != &local->oper_hw_mode->rates[sta->txrate])
OpenPOWER on IntegriCloud