@@ -89,6 +89,30 @@ static int mt76_rx_queues_read(struct seq_file *s, void *data)
return 0;
}
+static int
+mt7915_txs_for_no_skb_set(void *data, u64 val)
+{
+ struct mt76_dev *dev = data;
+
+ dev->txs_for_no_skb_enabled = !!val;
+
+ return 0;
+}
+
+static int
+mt7915_txs_for_no_skb_get(void *data, u64 *val)
+{
+ struct mt76_dev *dev = data;
+
+ *val = dev->txs_for_no_skb_enabled;
+
+ return 0;
+}
+
+DEFINE_DEBUGFS_ATTRIBUTE(fops_txs_for_no_skb, mt7915_txs_for_no_skb_get,
+ mt7915_txs_for_no_skb_set, "%lld\n");
+
+
void mt76_seq_puts_array(struct seq_file *file, const char *str,
s8 *val, int len)
{
@@ -116,6 +140,7 @@ mt76_register_debugfs_fops(struct mt76_phy *phy,
debugfs_create_file_unsafe("regval", 0600, dir, dev, fops);
debugfs_create_file_unsafe("napi_threaded", 0600, dir, dev,
&fops_napi_threaded);
+ debugfs_create_file("force_txs", 0600, dir, dev, &fops_txs_for_no_skb);
debugfs_create_blob("eeprom", 0400, dir, &dev->eeprom);
if (dev->otp.data)
debugfs_create_blob("otp", 0400, dir, &dev->otp);
@@ -860,6 +860,12 @@ struct mt76_dev {
u8 csa_complete;
+ /* Should we request TXS for MT_PACKET_ID_NO_SKB? Doing so gives better
+ * costs but causes a great deal more TXS packet processing by driver and
+ * creation by firmware, so may be a performance drag.
+ */
+ bool txs_for_no_skb_enabled;
+
u32 rxfilter;
#ifdef CONFIG_NL80211_TESTMODE
@@ -541,7 +541,8 @@ void mt76_connac2_mac_write_txwi(struct mt76_dev *dev, __le32 *txwi,
txwi[4] = 0;
val = FIELD_PREP(MT_TXD5_PID, pid);
- if (pid >= MT_PACKET_ID_FIRST) {
+ if (pid >= MT_PACKET_ID_FIRST ||
+ (pid == MT_PACKET_ID_NO_SKB && dev->txs_for_no_skb_enabled)) {
val |= MT_TXD5_TX_STATUS_HOST;
amsdu_en = amsdu_en && !is_mt7921(dev);
}