From: Joe Perches <joe@perches.com>
To: Avinash Patil <patila@marvell.com>
Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org,
akarwar@marvell.com, cluo@marvell.com, yangyang@marvell.com,
huxm@marvell.com
Subject: Re: [PATCH 3/4] mwifiex: make tx packet 64 byte DMA aligned
Date: Wed, 17 Dec 2014 02:43:15 -0800 [thread overview]
Message-ID: <1418812995.14140.20.camel@perches.com> (raw)
In-Reply-To: <1418824621-2102-3-git-send-email-patila@marvell.com>
On Wed, 2014-12-17 at 19:27 +0530, Avinash Patil wrote:
> From: Xinming Hu <huxm@marvell.com>
[]
> diff --git a/drivers/net/wireless/mwifiex/11n_aggr.c b/drivers/net/wireless/mwifiex/11n_aggr.c
[]
> @@ -101,6 +101,13 @@ mwifiex_11n_form_amsdu_txpd(struct mwifiex_private *priv,
> {
> struct txpd *local_tx_pd;
> struct mwifiex_txinfo *tx_info = MWIFIEX_SKB_TXCB(skb);
> + u8 pad;
The u8 gets upcasted to unsigned int for the skb_push
so why use u8 at all?
I think unsigned int makes more sense.
> + int headroom = (priv->adapter->iface_type ==
> + MWIFIEX_USB) ? 0 : INTF_HEADER_LEN;
> +
> + pad = ((void *)skb->data - sizeof(*local_tx_pd) -
> + headroom - NULL) & (MWIFIEX_DMA_ALIGN_SZ - 1);
> + skb_push(skb, pad);
>
> skb_push(skb, sizeof(*local_tx_pd));
[]
> diff --git a/drivers/net/wireless/mwifiex/decl.h b/drivers/net/wireless/mwifiex/decl.h
[]
> @@ -32,8 +32,10 @@
>
> #define MWIFIEX_MAX_BSS_NUM (3)
>
> -#define MWIFIEX_MIN_DATA_HEADER_LEN 36 /* sizeof(mwifiex_txpd)
> - * + 4 byte alignment
> +#define MWIFIEX_DMA_ALIGN_SZ 64
> +#define MWIFIEX_MIN_DATA_HEADER_LEN 100 /* sizeof(mwifiex_txpd)
> + * + 4 byte interface header alignment
> + * + 64 byte dma alignment
Maybe better to use those values in the
#define instead.
> diff --git a/drivers/net/wireless/mwifiex/sta_tx.c b/drivers/net/wireless/mwifiex/sta_tx.c
> index b896d73..9796334 100644
> --- a/drivers/net/wireless/mwifiex/sta_tx.c
> +++ b/drivers/net/wireless/mwifiex/sta_tx.c
> @@ -47,8 +47,10 @@ void *mwifiex_process_sta_txpd(struct mwifiex_private *priv,
> struct mwifiex_adapter *adapter = priv->adapter;
> struct txpd *local_tx_pd;
> struct mwifiex_txinfo *tx_info = MWIFIEX_SKB_TXCB(skb);
> - u8 pad;
> + int pad;
here it's int?
next prev parent reply other threads:[~2014-12-17 10:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-17 13:56 [PATCH 1/4] mwifiex: enable -D__CHECK_ENDIAN__ for sparse by default Avinash Patil
2014-12-17 13:56 ` [PATCH 2/4] mwifiex: do not send key material cmd when delete wep key Avinash Patil
2014-12-17 13:57 ` [PATCH 3/4] mwifiex: make tx packet 64 byte DMA aligned Avinash Patil
2014-12-17 10:43 ` Joe Perches [this message]
2014-12-17 13:57 ` [PATCH 4/4] mwifiex: get supported BA stream info from FW Avinash Patil
-- strict thread matches above, loose matches on Subject: below --
2014-12-17 11:54 [PATCH 1/4] mwifiex: enable -D__CHECK_ENDIAN__ for sparse by default Avinash Patil
2014-12-17 11:54 ` [PATCH 3/4] mwifiex: make tx packet 64 byte DMA aligned Avinash Patil
[not found] <1418817043-22511-1-git-send-email-patila@marvell.com>
2014-12-17 11:50 ` Avinash Patil
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=1418812995.14140.20.camel@perches.com \
--to=joe@perches.com \
--cc=akarwar@marvell.com \
--cc=cluo@marvell.com \
--cc=huxm@marvell.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=patila@marvell.com \
--cc=yangyang@marvell.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.