Skip to content

Commit 3b522ca

Browse files
ryderlee1110nbd168
authored andcommitted
wifi: mt76: mt7996: fill txd by host driver
The hardware SDO has issue to fill txd for the moment, so fallback to driver filling method. Fixes: 98686cd (wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices) Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
1 parent 230a167 commit 3b522ca

1 file changed

Lines changed: 4 additions & 9 deletions

File tree

  • drivers/net/wireless/mediatek/mt76/mt7996

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

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

11341134
pid = mt76_tx_status_skb_add(mdev, wcid, tx_info->skb);
1135-
memset(txwi_ptr, 0, MT_TXD_SIZE);
1136-
/* Transmit non qos data by 802.11 header and need to fill txd by host*/
1137-
if (!is_8023 || pid >= MT_PACKET_ID_FIRST)
1138-
mt7996_mac_write_txwi(dev, txwi_ptr, tx_info->skb, wcid, key,
1139-
pid, qid, 0);
1135+
mt7996_mac_write_txwi(dev, txwi_ptr, tx_info->skb, wcid, key,
1136+
pid, qid, 0);
11401137

11411138
txp = (struct mt76_connac_txp_common *)(txwi + MT_TXD_SIZE);
11421139
for (i = 0; i < nbuf; i++) {
@@ -1145,10 +1142,8 @@ int mt7996_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
11451142
}
11461143
txp->fw.nbuf = nbuf;
11471144

1148-
txp->fw.flags = cpu_to_le16(MT_CT_INFO_FROM_HOST);
1149-
1150-
if (!is_8023 || pid >= MT_PACKET_ID_FIRST)
1151-
txp->fw.flags |= cpu_to_le16(MT_CT_INFO_APPLY_TXD);
1145+
txp->fw.flags =
1146+
cpu_to_le16(MT_CT_INFO_FROM_HOST | MT_CT_INFO_APPLY_TXD);
11521147

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

0 commit comments

Comments
 (0)