From f749f044fbaadf323e1460f6ca61fea5bbb127fe Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Mon, 23 Mar 2009 14:10:22 +0100 Subject: [PATCH] --- yaml --- r: 136191 b: refs/heads/master c: 2b874e83c970b45c328ab12239b066a43505454c h: refs/heads/master i: 136189: 8ebb2b1611abaabdfcfaeb3a59533417d86f3b13 136187: 3ca07a475c38f5e946b2075fd147c6eb7af5ef47 136183: b9826af67f7154c7a5631a9371ea748ca1741691 136175: fb432afbae407e7c8871cf92b42cd9f8ae66f6b4 136159: c8bb8b69ee727c8cf749fb6007417c32dd8f7459 136127: 4cd60715b67df2803e719d094e93ca368236ae38 136063: eb4becd5e54d54a1e0881773cc568ecb9350a527 135935: 1b738d1dd840094817a68aa3c4004030debf3fa2 135679: d5790cf00576d96afc26454e44d3ae38f8eaf048 135167: 2e3fa839e5d5bbce1870a1480804e1abcc3f411a v: v3 --- [refs] | 2 +- trunk/include/net/mac80211.h | 4 ++++ trunk/net/mac80211/rate.c | 6 ++++-- trunk/net/mac80211/rate.h | 4 +++- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 3b8ede01fee6..c512545ce621 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 4a48e2a484e5cf99da4795cf2d6916e057d533ad +refs/heads/master: 2b874e83c970b45c328ab12239b066a43505454c diff --git a/trunk/include/net/mac80211.h b/trunk/include/net/mac80211.h index d881ed8ad2c1..6f3bc4cc53e5 100644 --- a/trunk/include/net/mac80211.h +++ b/trunk/include/net/mac80211.h @@ -245,6 +245,9 @@ struct ieee80211_bss_conf { * @IEEE80211_TX_CTL_RATE_CTRL_PROBE: internal to mac80211, can be * set by rate control algorithms to indicate probe rate, will * be cleared for fragmented frames (except on the last fragment) + * @IEEE80211_TX_INTFL_RCALGO: mac80211 internal flag, do not test or + * set this flag in the driver; indicates that the rate control + * algorithm was used and should be notified of TX status */ enum mac80211_tx_control_flags { IEEE80211_TX_CTL_REQ_TX_STATUS = BIT(0), @@ -260,6 +263,7 @@ enum mac80211_tx_control_flags { IEEE80211_TX_STAT_AMPDU = BIT(10), IEEE80211_TX_STAT_AMPDU_NO_BACK = BIT(11), IEEE80211_TX_CTL_RATE_CTRL_PROBE = BIT(12), + IEEE80211_TX_INTFL_RCALGO = BIT(13), }; /** diff --git a/trunk/net/mac80211/rate.c b/trunk/net/mac80211/rate.c index 3fa7ab285066..4641f00a1e5c 100644 --- a/trunk/net/mac80211/rate.c +++ b/trunk/net/mac80211/rate.c @@ -219,10 +219,12 @@ void rate_control_get_rate(struct ieee80211_sub_if_data *sdata, info->control.rates[i].count = 1; } - if (sta && sdata->force_unicast_rateidx > -1) + if (sta && sdata->force_unicast_rateidx > -1) { info->control.rates[0].idx = sdata->force_unicast_rateidx; - else + } else { ref->ops->get_rate(ref->priv, ista, priv_sta, txrc); + info->flags |= IEEE80211_TX_INTFL_RCALGO; + } /* * try to enforce the maximum rate the user wanted diff --git a/trunk/net/mac80211/rate.h b/trunk/net/mac80211/rate.h index b9164c9a9563..2ab5ad9e71ce 100644 --- a/trunk/net/mac80211/rate.h +++ b/trunk/net/mac80211/rate.h @@ -44,8 +44,10 @@ static inline void rate_control_tx_status(struct ieee80211_local *local, struct rate_control_ref *ref = local->rate_ctrl; struct ieee80211_sta *ista = &sta->sta; void *priv_sta = sta->rate_ctrl_priv; + struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); - ref->ops->tx_status(ref->priv, sband, ista, priv_sta, skb); + if (likely(info->flags & IEEE80211_TX_INTFL_RCALGO)) + ref->ops->tx_status(ref->priv, sband, ista, priv_sta, skb); }