aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
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,
108 int back = (adj > 0) ? 1 : -1; 108 int back = (adj > 0) ? 1 : -1;
109 109
110 sdata = IEEE80211_DEV_TO_SUB_IF(sta->dev); 110 sdata = IEEE80211_DEV_TO_SUB_IF(sta->dev);
111 if (sdata->bss && sdata->bss->force_unicast_rateidx > -1) {
112 /* forced unicast rate - do not change STA rate */
113 return;
114 }
115 111
116 mode = local->oper_hw_mode; 112 mode = local->oper_hw_mode;
117 maxrate = sdata->bss ? sdata->bss->max_ratectrl_rateidx : -1; 113 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,
241{ 237{
242 struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); 238 struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
243 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; 239 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
240 struct ieee80211_sub_if_data *sdata;
244 struct rc_pid_info *pinfo = priv; 241 struct rc_pid_info *pinfo = priv;
245 struct sta_info *sta; 242 struct sta_info *sta;
246 struct rc_pid_sta_info *spinfo; 243 struct rc_pid_sta_info *spinfo;
@@ -251,6 +248,13 @@ static void rate_control_pid_tx_status(void *priv, struct net_device *dev,
251 if (!sta) 248 if (!sta)
252 return; 249 return;
253 250
251 /* Don't update the state if we're not controlling the rate. */
252 sdata = IEEE80211_DEV_TO_SUB_IF(sta->dev);
253 if (sdata->bss && sdata->bss->force_unicast_rateidx > -1) {
254 sta->txrate = sdata->bss->max_ratectrl_rateidx;
255 return;
256 }
257
254 /* Ignore all frames that were sent with a different rate than the rate 258 /* Ignore all frames that were sent with a different rate than the rate
255 * we currently advise mac80211 to use. */ 259 * we currently advise mac80211 to use. */
256 if (status->control.rate != &local->oper_hw_mode->rates[sta->txrate]) 260 if (status->control.rate != &local->oper_hw_mode->rates[sta->txrate])