diff options
Diffstat (limited to 'net/mac80211/rc80211_pid_algo.c')
-rw-r--r-- | net/mac80211/rc80211_pid_algo.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/net/mac80211/rc80211_pid_algo.c b/net/mac80211/rc80211_pid_algo.c index a849b745bdb5..e8945413e4a2 100644 --- a/net/mac80211/rc80211_pid_algo.c +++ b/net/mac80211/rc80211_pid_algo.c | |||
@@ -237,8 +237,7 @@ static void rate_control_pid_sample(struct rc_pid_info *pinfo, | |||
237 | } | 237 | } |
238 | 238 | ||
239 | static void rate_control_pid_tx_status(void *priv, struct net_device *dev, | 239 | static void rate_control_pid_tx_status(void *priv, struct net_device *dev, |
240 | struct sk_buff *skb, | 240 | struct sk_buff *skb) |
241 | struct ieee80211_tx_status *status) | ||
242 | { | 241 | { |
243 | struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); | 242 | struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); |
244 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; | 243 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; |
@@ -248,6 +247,7 @@ static void rate_control_pid_tx_status(void *priv, struct net_device *dev, | |||
248 | struct rc_pid_sta_info *spinfo; | 247 | struct rc_pid_sta_info *spinfo; |
249 | unsigned long period; | 248 | unsigned long period; |
250 | struct ieee80211_supported_band *sband; | 249 | struct ieee80211_supported_band *sband; |
250 | struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); | ||
251 | 251 | ||
252 | rcu_read_lock(); | 252 | rcu_read_lock(); |
253 | 253 | ||
@@ -266,28 +266,28 @@ static void rate_control_pid_tx_status(void *priv, struct net_device *dev, | |||
266 | 266 | ||
267 | /* Ignore all frames that were sent with a different rate than the rate | 267 | /* Ignore all frames that were sent with a different rate than the rate |
268 | * we currently advise mac80211 to use. */ | 268 | * we currently advise mac80211 to use. */ |
269 | if (status->control.tx_rate != &sband->bitrates[sta->txrate_idx]) | 269 | if (info->tx_rate_idx != sta->txrate_idx) |
270 | goto unlock; | 270 | goto unlock; |
271 | 271 | ||
272 | spinfo = sta->rate_ctrl_priv; | 272 | spinfo = sta->rate_ctrl_priv; |
273 | spinfo->tx_num_xmit++; | 273 | spinfo->tx_num_xmit++; |
274 | 274 | ||
275 | #ifdef CONFIG_MAC80211_DEBUGFS | 275 | #ifdef CONFIG_MAC80211_DEBUGFS |
276 | rate_control_pid_event_tx_status(&spinfo->events, status); | 276 | rate_control_pid_event_tx_status(&spinfo->events, info); |
277 | #endif | 277 | #endif |
278 | 278 | ||
279 | /* We count frames that totally failed to be transmitted as two bad | 279 | /* We count frames that totally failed to be transmitted as two bad |
280 | * frames, those that made it out but had some retries as one good and | 280 | * frames, those that made it out but had some retries as one good and |
281 | * one bad frame. */ | 281 | * one bad frame. */ |
282 | if (status->excessive_retries) { | 282 | if (info->status.excessive_retries) { |
283 | spinfo->tx_num_failed += 2; | 283 | spinfo->tx_num_failed += 2; |
284 | spinfo->tx_num_xmit++; | 284 | spinfo->tx_num_xmit++; |
285 | } else if (status->retry_count) { | 285 | } else if (info->status.retry_count) { |
286 | spinfo->tx_num_failed++; | 286 | spinfo->tx_num_failed++; |
287 | spinfo->tx_num_xmit++; | 287 | spinfo->tx_num_xmit++; |
288 | } | 288 | } |
289 | 289 | ||
290 | if (status->excessive_retries) { | 290 | if (info->status.excessive_retries) { |
291 | sta->tx_retry_failed++; | 291 | sta->tx_retry_failed++; |
292 | sta->tx_num_consecutive_failures++; | 292 | sta->tx_num_consecutive_failures++; |
293 | sta->tx_num_mpdu_fail++; | 293 | sta->tx_num_mpdu_fail++; |
@@ -295,8 +295,8 @@ static void rate_control_pid_tx_status(void *priv, struct net_device *dev, | |||
295 | sta->tx_num_consecutive_failures = 0; | 295 | sta->tx_num_consecutive_failures = 0; |
296 | sta->tx_num_mpdu_ok++; | 296 | sta->tx_num_mpdu_ok++; |
297 | } | 297 | } |
298 | sta->tx_retry_count += status->retry_count; | 298 | sta->tx_retry_count += info->status.retry_count; |
299 | sta->tx_num_mpdu_fail += status->retry_count; | 299 | sta->tx_num_mpdu_fail += info->status.retry_count; |
300 | 300 | ||
301 | /* Update PID controller state. */ | 301 | /* Update PID controller state. */ |
302 | period = (HZ * pinfo->sampling_period + 500) / 1000; | 302 | period = (HZ * pinfo->sampling_period + 500) / 1000; |
@@ -330,7 +330,7 @@ static void rate_control_pid_get_rate(void *priv, struct net_device *dev, | |||
330 | fc = le16_to_cpu(hdr->frame_control); | 330 | fc = le16_to_cpu(hdr->frame_control); |
331 | if ((fc & IEEE80211_FCTL_FTYPE) != IEEE80211_FTYPE_DATA || | 331 | if ((fc & IEEE80211_FCTL_FTYPE) != IEEE80211_FTYPE_DATA || |
332 | is_multicast_ether_addr(hdr->addr1) || !sta) { | 332 | is_multicast_ether_addr(hdr->addr1) || !sta) { |
333 | sel->rate = rate_lowest(local, sband, sta); | 333 | sel->rate_idx = rate_lowest_index(local, sband, sta); |
334 | rcu_read_unlock(); | 334 | rcu_read_unlock(); |
335 | return; | 335 | return; |
336 | } | 336 | } |
@@ -349,7 +349,7 @@ static void rate_control_pid_get_rate(void *priv, struct net_device *dev, | |||
349 | 349 | ||
350 | rcu_read_unlock(); | 350 | rcu_read_unlock(); |
351 | 351 | ||
352 | sel->rate = &sband->bitrates[rateidx]; | 352 | sel->rate_idx = rateidx; |
353 | 353 | ||
354 | #ifdef CONFIG_MAC80211_DEBUGFS | 354 | #ifdef CONFIG_MAC80211_DEBUGFS |
355 | rate_control_pid_event_tx_rate( | 355 | rate_control_pid_event_tx_rate( |