All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lorenzo Bianconi <lorenzo@kernel.org>
To: nbd@nbd.name
Cc: linux-wireless@vger.kernel.org, lorenzo.bianconi@redhat.com,
	sean.wang@mediatek.com, deren.wu@mediatek.com,
	ryder.lee@mediatek.com
Subject: Re: [PATCH 2/6] mt76: move mt7615_txp_ptr in mt76_connac module
Date: Wed, 22 Jun 2022 14:11:21 +0200	[thread overview]
Message-ID: <YrMG6caJqbCx1b2+@localhost.localdomain> (raw)
In-Reply-To: <c5a0f03bc5ca1e994bb6010033058d07848bef0c.1655649422.git.lorenzo@kernel.org>

[-- Attachment #1: Type: text/plain, Size: 3487 bytes --]

[...]

> diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/pci.c b/drivers/net/wireless/mediatek/mt76/mt7921/pci.c
> index 624eb75c15cd..dde7709edc6c 100644
> --- a/drivers/net/wireless/mediatek/mt76/mt7921/pci.c
> +++ b/drivers/net/wireless/mediatek/mt76/mt7921/pci.c
> @@ -230,7 +230,7 @@ static int mt7921_pci_probe(struct pci_dev *pdev,
>  {
>  	static const struct mt76_driver_ops drv_ops = {
>  		/* txwi_size = txd size + txp size */
> -		.txwi_size = MT_TXD_SIZE + sizeof(struct mt7921_txp_common),
> +		.txwi_size = MT_TXD_SIZE + sizeof(struct mt76_connac_txp_common),

I spotted a minor issue in this patch, we should use mt76_connac_hw_txp here.
@Felix: please drop this patch, I will post v2 soon.

Regards,
Lorenzo

>  		.drv_flags = MT_DRV_TXWI_NO_FREE | MT_DRV_HW_MGMT_TXQ,
>  		.survey_flags = SURVEY_INFO_TIME_TX |
>  				SURVEY_INFO_TIME_RX |
> diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/pci_mac.c b/drivers/net/wireless/mediatek/mt76/mt7921/pci_mac.c
> index 9608b5ae8820..8e051bdae673 100644
> --- a/drivers/net/wireless/mediatek/mt76/mt7921/pci_mac.c
> +++ b/drivers/net/wireless/mediatek/mt76/mt7921/pci_mac.c
> @@ -9,8 +9,8 @@ static void
>  mt7921_write_hw_txp(struct mt7921_dev *dev, struct mt76_tx_info *tx_info,
>  		    void *txp_ptr, u32 id)
>  {
> -	struct mt7921_hw_txp *txp = txp_ptr;
> -	struct mt7921_txp_ptr *ptr = &txp->ptr[0];
> +	struct mt76_connac_hw_txp *txp = txp_ptr;
> +	struct mt76_connac_txp_ptr *ptr = &txp->ptr[0];
>  	int i, nbuf = tx_info->nbuf - 1;
>  
>  	tx_info->buf[0].len = MT_TXD_SIZE + sizeof(*txp);
> @@ -44,8 +44,8 @@ int mt7921e_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
>  	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_connac_txp_common *txp;
>  	struct mt76_txwi_cache *t;
> -	struct mt7921_txp_common *txp;
>  	int id, pid;
>  	u8 *txwi = (u8 *)txwi_ptr;
>  
> @@ -75,8 +75,8 @@ int mt7921e_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
>  	mt76_connac2_mac_write_txwi(mdev, txwi_ptr, tx_info->skb, wcid, key,
>  				    pid, 0);
>  
> -	txp = (struct mt7921_txp_common *)(txwi + MT_TXD_SIZE);
> -	memset(txp, 0, sizeof(struct mt7921_txp_common));
> +	txp = (struct mt76_connac_txp_common *)(txwi + MT_TXD_SIZE);
> +	memset(txp, 0, sizeof(struct mt76_connac_txp_common));
>  	mt7921_write_hw_txp(dev, tx_info, txp, id);
>  
>  	tx_info->skb = DMA_DUMMY_DATA;
> @@ -87,13 +87,13 @@ int mt7921e_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
>  static void
>  mt7921_txp_skb_unmap(struct mt76_dev *dev, struct mt76_txwi_cache *t)
>  {
> -	struct mt7921_txp_common *txp;
> +	struct mt76_connac_txp_common *txp;
>  	int i;
>  
>  	txp = mt76_connac_txwi_to_txp(dev, t);
>  
>  	for (i = 0; i < ARRAY_SIZE(txp->hw.ptr); i++) {
> -		struct mt7921_txp_ptr *ptr = &txp->hw.ptr[i];
> +		struct mt76_connac_txp_ptr *ptr = &txp->hw.ptr[i];
>  		bool last;
>  		u16 len;
>  
> @@ -271,8 +271,8 @@ void mt7921e_tx_complete_skb(struct mt76_dev *mdev, struct mt76_queue_entry *e)
>  
>  	/* error path */
>  	if (e->skb == DMA_DUMMY_DATA) {
> +		struct mt76_connac_txp_common *txp;
>  		struct mt76_txwi_cache *t;
> -		struct mt7921_txp_common *txp;
>  		u16 token;
>  
>  		txp = mt76_connac_txwi_to_txp(mdev, e->txwi);
> -- 
> 2.36.1
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2022-06-22 12:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-19 20:42 [PATCH 0/6] mt76: move connac txp code in shared module Lorenzo Bianconi
2022-06-19 20:42 ` [PATCH 1/6] mt76: connac: move mt76_connac_fw_txp in common module Lorenzo Bianconi
2022-06-19 20:42 ` [PATCH 2/6] mt76: move mt7615_txp_ptr in mt76_connac module Lorenzo Bianconi
2022-06-22 12:11   ` Lorenzo Bianconi [this message]
2022-06-19 20:42 ` [PATCH 3/6] mt76: connac: move mt76_connac_tx_free in shared code Lorenzo Bianconi
2022-06-19 20:42 ` [PATCH 4/6] mt76: connac: move mt76_connac_tx_complete_skb " Lorenzo Bianconi
2022-06-19 20:42 ` [PATCH 5/6] mt76: connac: move mt76_connac_write_hw_txp " Lorenzo Bianconi
2022-06-19 20:42 ` [PATCH 6/6] mt76: connac: move mt7615_txp_skb_unmap in common code Lorenzo Bianconi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YrMG6caJqbCx1b2+@localhost.localdomain \
    --to=lorenzo@kernel.org \
    --cc=deren.wu@mediatek.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lorenzo.bianconi@redhat.com \
    --cc=nbd@nbd.name \
    --cc=ryder.lee@mediatek.com \
    --cc=sean.wang@mediatek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.