Thread (1 message) 1 message, 1 author, 2021-01-01

Re: [PATCH -next v4 03/13] mt76: mt7921: add MAC support

From: <sean.wang@mediatek.com>
Date: 2021-01-01 12:41:13
Also in: linux-mediatek

From: Sean Wang <sean.wang@mediatek.com>
On Thu, 2020-12-31 at 02:06 +0800, sean.wang@mediatek.com wrote:
quoted
From: Sean Wang <sean.wang@mediatek.com>

Add Rx packet description parsing, Tx packet description compositon,
handle packet recycling and provide MAC information mt76 core needs to
support mac80211.

Co-developed-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Co-developed-by: Soul Huang <redacted>
Signed-off-by: Soul Huang <redacted>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
---
 .../wireless/mediatek/mt76/mt7921/Makefile    |    2 +-
 .../net/wireless/mediatek/mt76/mt7921/mac.c   | 1364 +++++++++++++++++
Why not put mac.h into this patch?
I remember mcu.c would refer to something in mac.h but it seems better move mac.h to here.
quoted
 2 files changed, 1365 insertions(+), 1 deletion(-)  create mode
100644 drivers/net/wireless/mediatek/mt76/mt7921/mac.c
quoted
+int mt7921_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
+			  enum mt76_txq_id qid, struct mt76_wcid *wcid,
+			  struct ieee80211_sta *sta,
+			  struct mt76_tx_info *tx_info)
+{
+	struct mt7921_dev *dev = container_of(mdev, struct mt7921_dev, mt76);
+	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx_info->skb);
+	struct ieee80211_key_conf *key = info->control.hw_key;
+	struct mt76_tx_cb *cb = mt76_tx_skb_cb(tx_info->skb);
+	struct mt76_txwi_cache *t;
+	struct mt7921_txp_common *txp;
+	int id;
+	u8 *txwi = (u8 *)txwi_ptr;
Moreover, hardware cannot add LLC-SNAP when skb->data_len is 0, which causes Tx stuck. We found this case happened on mt7915 (station mode) quality test with few packets whose skb->len = 14

So,https://github.com/nbd168/wireless/commit/6b6605e4061c94c9909ff82acc0e02bfd3a8d40e
We'll add the fixes in the next version including mcu one you suggested in the other mail thread.

Happy new year
	Sean
Ryder
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help