Skip to content

Commit 3dbfb8a

Browse files
csyuancnbd168
authored andcommitted
Revert "wifi: mt76: mt7996: fill txd by host driver"
This reverts commit 3b522ca. The MTK connac3 has introduced new hardware, SDO (Software Defined Offload), to offload the process of filling the TX descriptor. Initially, there were some issues, but after several fixes, it should now be stable, allowing us to revert this commit. Additionally, activating SDO is essential for the proper functioning of features like TX checksum offload. Signed-off-by: Shayne Chen <shayne.chen@mediatek.com> Link: https://patch.msgid.link/20250328022847.1612082-1-shayne.chen@mediatek.com Signed-off-by: Felix Fietkau <nbd@nbd.name>
1 parent caf4b34 commit 3dbfb8a

File tree

1 file changed

+9
-4
lines changed
  • drivers/net/wireless/mediatek/mt76/mt7996

1 file changed

+9
-4
lines changed

drivers/net/wireless/mediatek/mt76/mt7996/mac.c

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1040,8 +1040,11 @@ int mt7996_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
10401040
return id;
10411041

10421042
pid = mt76_tx_status_skb_add(mdev, wcid, tx_info->skb);
1043-
mt7996_mac_write_txwi(dev, txwi_ptr, tx_info->skb, wcid, key,
1044-
pid, qid, 0);
1043+
memset(txwi_ptr, 0, MT_TXD_SIZE);
1044+
/* Transmit non qos data by 802.11 header and need to fill txd by host*/
1045+
if (!is_8023 || pid >= MT_PACKET_ID_FIRST)
1046+
mt7996_mac_write_txwi(dev, txwi_ptr, tx_info->skb, wcid, key,
1047+
pid, qid, 0);
10451048

10461049
txp = (struct mt76_connac_txp_common *)(txwi + MT_TXD_SIZE);
10471050
for (i = 0; i < nbuf; i++) {
@@ -1058,8 +1061,10 @@ int mt7996_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
10581061
}
10591062
txp->fw.nbuf = nbuf;
10601063

1061-
txp->fw.flags =
1062-
cpu_to_le16(MT_CT_INFO_FROM_HOST | MT_CT_INFO_APPLY_TXD);
1064+
txp->fw.flags = cpu_to_le16(MT_CT_INFO_FROM_HOST);
1065+
1066+
if (!is_8023 || pid >= MT_PACKET_ID_FIRST)
1067+
txp->fw.flags |= cpu_to_le16(MT_CT_INFO_APPLY_TXD);
10631068

10641069
if (!key)
10651070
txp->fw.flags |= cpu_to_le16(MT_CT_INFO_NONE_CIPHER_FRAME);

0 commit comments

Comments
 (0)