linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stanislaw Gruszka <sgruszka@redhat.com>
To: Lorenzo Bianconi <lorenzo@kernel.org>
Cc: nbd@nbd.name, ryder.lee@mediatek.com, roychl666@gmail.com,
	linux-wireless@vger.kernel.org, lorenzo.bianconi@redhat.com
Subject: Re: [PATCH 1/4] mt76: move mt76x02_insert_hdr_pad in mt76-core module
Date: Mon, 11 Mar 2019 14:30:59 +0100	[thread overview]
Message-ID: <20190311133058.GC6089@redhat.com> (raw)
In-Reply-To: <0ec618f40f6308f4da8c6a766519dfd66fa5ad57.1552306908.git.lorenzo@kernel.org>

On Mon, Mar 11, 2019 at 01:35:23PM +0100, Lorenzo Bianconi wrote:
> +static inline int mt76_insert_hdr_pad(struct sk_buff *skb)
> +{
> +	int len = ieee80211_get_hdrlen_from_skb(skb);
> +
> +	if (len % 4 == 0)
> +		return 0;
> +
> +	skb_push(skb, 2);
> +	memmove(skb->data, skb->data + 2, len);
> +
> +	skb->data[len] = 0;
> +	skb->data[len + 1] = 0;
> +	return 2;
> +}
<snip>
> @@ -165,7 +165,7 @@ int mt76x02_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
>  	pid = mt76_tx_status_skb_add(mdev, wcid, skb);
>  	txwi->pktid = pid;
>  
> -	ret = mt76x02_insert_hdr_pad(skb);
> +	ret = mt76_insert_hdr_pad(skb);
>  	if (ret < 0)
>  		return ret;

Since you modify this you can make mt76_inser_hdr_pad() return
void since we do not return error any longer.

Stanislaw

  reply	other threads:[~2019-03-11 13:31 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-11 12:35 [PATCH 0/4] move skb mapping before configuring txwi Lorenzo Bianconi
2019-03-11 12:35 ` [PATCH 1/4] mt76: move mt76x02_insert_hdr_pad in mt76-core module Lorenzo Bianconi
2019-03-11 13:30   ` Stanislaw Gruszka [this message]
2019-03-11 14:02     ` Lorenzo Bianconi
2019-03-11 12:35 ` [PATCH 2/4] mt76: mmio: move mt76_insert_hdr_pad in mt76_dma_tx_queue_skb Lorenzo Bianconi
2019-03-11 13:39   ` Stanislaw Gruszka
2019-03-11 14:25     ` Lorenzo Bianconi
2019-03-11 14:58       ` Stanislaw Gruszka
2019-03-11 15:01         ` Lorenzo Bianconi
2019-03-11 12:35 ` [PATCH 3/4] mt76: move skb dma mapping before running tx_prepare_skb Lorenzo Bianconi
2019-03-11 12:35 ` [PATCH 4/4] mt76: introduce mt76_tx_info data structure Lorenzo Bianconi
2019-03-11 13:17 ` [PATCH 0/4] move skb mapping before configuring txwi 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=20190311133058.GC6089@redhat.com \
    --to=sgruszka@redhat.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lorenzo.bianconi@redhat.com \
    --cc=lorenzo@kernel.org \
    --cc=nbd@nbd.name \
    --cc=roychl666@gmail.com \
    --cc=ryder.lee@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).