@@ -294,18 +294,11 @@ void ieee80211_check_rate_mask(struct ieee80211_sub_if_data *sdata)
sdata->rc_rateidx_mask[band] = (1 << sband->n_bitrates) - 1;
}
-static bool rc_no_data_or_no_ack_use_min(struct ieee80211_tx_rate_control *txrc)
+static bool rc_no_data_or_no_ack_use_min(u32 flags, __le16 frame_control)
{
- struct sk_buff *skb = txrc->skb;
- struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
- struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
- __le16 fc;
-
- fc = hdr->frame_control;
-
- return (info->flags & (IEEE80211_TX_CTL_NO_ACK |
+ return (flags & (IEEE80211_TX_CTL_NO_ACK |
IEEE80211_TX_CTL_USE_MINRATE)) ||
- !ieee80211_is_data(fc);
+ !ieee80211_is_data(frame_control);
}
static void rc_send_low_basicrate(struct ieee80211_tx_rate *rate,
@@ -396,12 +389,13 @@ static bool rate_control_send_low(struct ieee80211_sta *pubsta,
struct sta_info *sta;
int mcast_rate;
bool use_basicrate = false;
+ __le16 frame_control = hdr->frame_control;
- if (ieee80211_is_data(hdr->frame_control) &&
+ if (ieee80211_is_data(frame_control) &&
(info->flags & IEEE80211_TX_CTL_NO_ACK))
return false;
- if (!pubsta || rc_no_data_or_no_ack_use_min(txrc)) {
+ if (!pubsta || rc_no_data_or_no_ack_use_min(info->flags, frame_control)) {
__rate_control_send_low(txrc->hw, sband, pubsta, info,
txrc->rate_idx_mask);
Signed-off-by: Philipp Borgers <borgers@mi.fu-berlin.de> --- net/mac80211/rate.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-)