Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 78709
b: refs/heads/master
c: df26e7e
h: refs/heads/master
i:
  78707: 397e48a
v: v3
  • Loading branch information
Andrew Lutomirski authored and David S. Miller committed Jan 28, 2008
1 parent e570a6c commit 1731d5f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4b475898ec9dc6e62cebcb8fc0b3495c986a4590
refs/heads/master: df26e7ea049abe5104062f1f3e9ee7ede9d5104f
12 changes: 8 additions & 4 deletions trunk/net/mac80211/rc80211_pid_algo.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -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])
Expand Down

0 comments on commit 1731d5f

Please sign in to comment.