summaryrefslogtreecommitdiff
path: root/net/mac80211/rate.c
diff options
context:
space:
mode:
authorRyder Lee <ryder.lee@mediatek.com>2021-06-17 18:31:13 +0200
committerJohannes Berg <johannes.berg@intel.com>2021-06-23 11:29:13 +0200
commit3187ba0cea77c8a4cdaed44fbff02c6e63e509aa (patch)
tree283a5bb8184b27662e8dcdf2cd7ecc6d8420d76d /net/mac80211/rate.c
parent03c3911d2d67a43ad4ffd15b534a5905d6ce5c59 (diff)
mac80211: add rate control support for encap offload
The software rate control cannot deal with encap offload, so fix it. Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Link: https://lore.kernel.org/r/20210617163113.75815-3-nbd@nbd.name Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/rate.c')
-rw-r--r--net/mac80211/rate.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/mac80211/rate.c b/net/mac80211/rate.c
index 9418daa52f68..e5935e3d7a07 100644
--- a/net/mac80211/rate.c
+++ b/net/mac80211/rate.c
@@ -870,7 +870,6 @@ void ieee80211_get_tx_rates(struct ieee80211_vif *vif,
int max_rates)
{
struct ieee80211_sub_if_data *sdata;
- struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
struct ieee80211_supported_band *sband;
@@ -882,7 +881,7 @@ void ieee80211_get_tx_rates(struct ieee80211_vif *vif,
sdata = vif_to_sdata(vif);
sband = sdata->local->hw.wiphy->bands[info->band];
- if (ieee80211_is_data(hdr->frame_control))
+ if (ieee80211_is_tx_data(skb))
rate_control_apply_mask(sdata, sta, sband, dest, max_rates);
if (dest[0].idx < 0)