@@ -633,6 +633,29 @@ mt7915_fw_util_wa_show(struct seq_file *file, void *data)
DEFINE_SHOW_ATTRIBUTE(mt7915_fw_util_wa);
+static int
+mt7915_txs_for_no_skb_set(void *data, u64 val)
+{
+ struct mt7915_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 mt7915_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");
+
static void
mt7915_ampdu_stat_read_phy(struct mt7915_phy *phy,
struct seq_file *file)
@@ -1017,6 +1040,7 @@ int mt7915_init_debugfs(struct mt7915_phy *phy)
&mt7915_fw_util_wm_fops);
debugfs_create_file("fw_util_wa", 0400, dir, dev,
&mt7915_fw_util_wa_fops);
+ debugfs_create_file("force_txs", 0600, dir, dev, &fops_txs_for_no_skb);
debugfs_create_file("implicit_txbf", 0600, dir, dev,
&fops_implicit_txbf);
debugfs_create_file("txpower_sku", 0400, dir, phy,
@@ -1257,7 +1257,8 @@ void mt7915_mac_write_txwi(struct mt7915_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;
txwi[5] = cpu_to_le32(val);
@@ -294,6 +294,11 @@ struct mt7915_dev {
u16 chainmask;
u16 chainshift;
u32 hif_idx;
+ /* 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;
struct work_struct init_work;
struct work_struct rc_work;