aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/ieee80211_rate.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/ieee80211_rate.c')
-rw-r--r--net/mac80211/ieee80211_rate.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/net/mac80211/ieee80211_rate.c b/net/mac80211/ieee80211_rate.c
index b957e67c5fba..ebe29b716b27 100644
--- a/net/mac80211/ieee80211_rate.c
+++ b/net/mac80211/ieee80211_rate.c
@@ -163,7 +163,8 @@ static void rate_control_release(struct kref *kref)
163} 163}
164 164
165void rate_control_get_rate(struct net_device *dev, 165void rate_control_get_rate(struct net_device *dev,
166 struct ieee80211_hw_mode *mode, struct sk_buff *skb, 166 struct ieee80211_supported_band *sband,
167 struct sk_buff *skb,
167 struct rate_selection *sel) 168 struct rate_selection *sel)
168{ 169{
169 struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); 170 struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
@@ -174,17 +175,17 @@ void rate_control_get_rate(struct net_device *dev,
174 175
175 memset(sel, 0, sizeof(struct rate_selection)); 176 memset(sel, 0, sizeof(struct rate_selection));
176 177
177 ref->ops->get_rate(ref->priv, dev, mode, skb, sel); 178 ref->ops->get_rate(ref->priv, dev, sband, skb, sel);
178 179
179 /* Select a non-ERP backup rate. */ 180 /* Select a non-ERP backup rate. */
180 if (!sel->nonerp) { 181 if (!sel->nonerp) {
181 for (i = 0; i < mode->num_rates - 1; i++) { 182 for (i = 0; i < sband->n_bitrates; i++) {
182 struct ieee80211_rate *rate = &mode->rates[i]; 183 struct ieee80211_rate *rate = &sband->bitrates[i];
183 if (sel->rate->rate < rate->rate) 184 if (sel->rate->bitrate < rate->bitrate)
184 break; 185 break;
185 186
186 if (rate_supported(sta, mode, i) && 187 if (rate_supported(sta, sband->band, i) &&
187 !(rate->flags & IEEE80211_RATE_ERP)) 188 !(rate->flags & IEEE80211_RATE_ERP_G))
188 sel->nonerp = rate; 189 sel->nonerp = rate;
189 } 190 }
190 } 191 }