Thread (7 messages) flat view 7 messages, 2 authors, 2021-05-28

Re: [RFC PATCH 1/4] mac80211: call ieee80211_tx_h_rate_ctrl() when dequeue

From: Johannes Berg <johannes@sipsolutions.net>
Date: 2021-05-25 13:00:02
Also in: linux-mediatek

On Thu, 2021-05-20 at 03:56 +0800, Ryder Lee wrote:
+static ieee80211_tx_result
+ieee80211_xmit_fast_finish(struct ieee80211_sub_if_data *sdata,
+			   struct sta_info *sta, u8 pn_offs,
+			   struct ieee80211_key *key,
+			   struct ieee80211_tx_data *tx)
 {
+	struct sk_buff *skb = tx->skb;
 	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
 	struct ieee80211_hdr *hdr = (void *)skb->data;
 	u8 tid = IEEE80211_NUM_TIDS;
 



+	if (!ieee80211_hw_check(&tx->local->hw, HAS_RATE_CONTROL))
+		if (ieee80211_tx_h_rate_ctrl(tx) != TX_CONTINUE)
+			return TX_DROP;
Probably nicer to roll that into one condition:

if (!...() &&
    ..._rate_ctrl(tx) != ...)
	return TX_DROP;


johannes
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help