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

Ryder Lee ryder.lee at mediatek.com
Thu Dec 31 17:58:15 EST 2020


On Thu, 2020-12-31 at 02:06 +0800, sean.wang at mediatek.com wrote:
> From: Sean Wang <sean.wang at 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 at kernel.org>
> Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
> Co-developed-by: Soul Huang <Soul.Huang at mediatek.com>
> Signed-off-by: Soul Huang <Soul.Huang at mediatek.com>
> Signed-off-by: Sean Wang <sean.wang at mediatek.com>
> ---
>  .../wireless/mediatek/mt76/mt7921/Makefile    |    2 +-
>  .../net/wireless/mediatek/mt76/mt7921/mac.c   | 1364 +++++++++++++++++

Why not put mac.h into this patch?

>  2 files changed, 1365 insertions(+), 1 deletion(-)
>  create mode 100644 drivers/net/wireless/mediatek/mt76/mt7921/mac.c

> +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

Ryder


More information about the Linux-mediatek mailing list