Skip to contentSkip to conversation

mt76: mt7915: report qos_ctl without ACK policy

PATCH In review Bo Jiao 2 participants 2 messages Apr 20, 2022

Subsystems (2)
lore
Share & tools
lore

Bo Jiao

author
#0 lore raw

PATCH 1/1 mt76: mt7915: report qos_ctl without ACK policy

From: Bo Jiao <[email protected]>

there is no need to report to the mac80211 layer the ACK policy which may cause rx out-of-order issue, because the hardware rmac module already handle it

---
 drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/net/wireless/mediatek/mt76/mt7915/mac.c +5 -0
index b47aea6..5080280 100644
@@ -675,6 +675,11 @@ mt7915_mac_fill_rx(struct mt7915_dev *dev, struct sk_buff *skb)
 
 		fc = cpu_to_le16(FIELD_GET(MT_RXD6_FRAME_CONTROL, v0));
 		qos_ctl = FIELD_GET(MT_RXD8_QOS_CTL, v2);
+		/*
+		 * there is no need to report the ACK policy to the
+		 * mac80211 layer, because hw has already processed it.
+		 */
+		qos_ctl &= ~IEEE80211_QOS_CTL_ACK_POLICY_MASK;
 		seq_ctrl = FIELD_GET(MT_RXD8_SEQ_CTRL, v2);
 
 		rxd += 4;
Signature · 1 line
2.18.0
maintainer
#1 lore raw
Quoted 15 lines · Bo Jiao

From: Bo Jiao <[email protected]>

there is no need to report to the mac80211 layer the ACK policy which may cause rx out-of-order issue, because the hardware rmac module already handle it

---
  drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 5 +++++
  1 file changed, 5 insertions(+)
drivers/net/wireless/mediatek/mt76/mt7915/mac.c +0 -0
index b47aea6..5080280 100644

drivers/net/wireless/mediatek/mt76/mt7915/mac.c mt7915_mac_fill_rx(struct mt7915_dev *dev, struct sk_buff *skb) · line 682

Quoted 8 lines
drivers/net/wireless/mediatek/mt76/mt7915/mac.c +5 -0
@@ -675,6 +675,11 @@ mt7915_mac_fill_rx(struct mt7915_dev *dev, struct sk_buff *skb)
 
  		fc = cpu_to_le16(FIELD_GET(MT_RXD6_FRAME_CONTROL, v0));
  		qos_ctl = FIELD_GET(MT_RXD8_QOS_CTL, v2);
+		/*
+		 * there is no need to report the ACK policy to the
+		 * mac80211 layer, because hw has already processed it.
+		 */
+		qos_ctl &= ~IEEE80211_QOS_CTL_ACK_POLICY_MASK;

I don't understand this change at all. First of all, the qos_ctl field isn't really reported to the mac80211 layer, it's used in mt76 internally.
The rx reorder code uses it to detect no-ack policy in order to avoid reordering for it.
Since you're masking out the ack policy, the value will be IEEE80211_QOS_CTL_ACK_POLICY_NORMAL, which ends up forcibly enabling rx reordering, even when the policy indicates no-ack. How does this help, and what part does the rmac module already handle?

- Felix