* [PATCH] mwifiex: fix usb tx data payload offset issue
@ 2015-02-13 15:08 Avinash Patil
2015-02-27 8:14 ` Kalle Valo
0 siblings, 1 reply; 2+ messages in thread
From: Avinash Patil @ 2015-02-13 15:08 UTC (permalink / raw)
To: linux-wireless; +Cc: akarwar, cluo, liuzy, Avinash Patil
From: Zhaoyang Liu <liuzy@marvell.com>
Commit 84b313b35f8158d7 ("mwifiex: make tx packet 64 byte DMA aligned")
induced payload offset issue for USB interface.
There is no USB interface header for tx packets, so there's no need to
pull interface length while processing tx skb.
This patch fixes this issue.
Signed-off-by: Zhaoyang Liu <liuzy@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Avinash Patil <patila@marvell.com>
---
drivers/net/wireless/mwifiex/txrx.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/wireless/mwifiex/txrx.c b/drivers/net/wireless/mwifiex/txrx.c
index ac93557..ea4549f 100644
--- a/drivers/net/wireless/mwifiex/txrx.c
+++ b/drivers/net/wireless/mwifiex/txrx.c
@@ -80,11 +80,13 @@ EXPORT_SYMBOL_GPL(mwifiex_handle_rx_packet);
int mwifiex_process_tx(struct mwifiex_private *priv, struct sk_buff *skb,
struct mwifiex_tx_param *tx_param)
{
- int ret = -1;
+ int hroom, ret = -1;
struct mwifiex_adapter *adapter = priv->adapter;
u8 *head_ptr;
struct txpd *local_tx_pd = NULL;
+ hroom = (adapter->iface_type == MWIFIEX_USB) ? 0 : INTF_HEADER_LEN;
+
if (priv->bss_role == MWIFIEX_BSS_ROLE_UAP)
head_ptr = mwifiex_process_uap_txpd(priv, skb);
else
@@ -92,11 +94,9 @@ int mwifiex_process_tx(struct mwifiex_private *priv, struct sk_buff *skb,
if (head_ptr) {
if (GET_BSS_ROLE(priv) == MWIFIEX_BSS_ROLE_STA)
- local_tx_pd =
- (struct txpd *) (head_ptr + INTF_HEADER_LEN);
+ local_tx_pd = (struct txpd *)(head_ptr + hroom);
if (adapter->iface_type == MWIFIEX_USB) {
adapter->data_sent = true;
- skb_pull(skb, INTF_HEADER_LEN);
ret = adapter->if_ops.host_to_card(adapter,
MWIFIEX_USB_EP_DATA,
skb, NULL);
--
1.8.1.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: mwifiex: fix usb tx data payload offset issue
2015-02-13 15:08 [PATCH] mwifiex: fix usb tx data payload offset issue Avinash Patil
@ 2015-02-27 8:14 ` Kalle Valo
0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2015-02-27 8:14 UTC (permalink / raw)
To: Avinash Patil; +Cc: linux-wireless, akarwar, cluo, liuzy, Avinash Patil
> From: Zhaoyang Liu <liuzy@marvell.com>
>
> Commit 84b313b35f8158d7 ("mwifiex: make tx packet 64 byte DMA aligned")
> induced payload offset issue for USB interface.
>
> There is no USB interface header for tx packets, so there's no need to
> pull interface length while processing tx skb.
>
> This patch fixes this issue.
>
> Signed-off-by: Zhaoyang Liu <liuzy@marvell.com>
> Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
> Signed-off-by: Avinash Patil <patila@marvell.com>
Thanks, applied to wireless-drivers-next.git.
Kalle Valo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-02-27 8:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-13 15:08 [PATCH] mwifiex: fix usb tx data payload offset issue Avinash Patil
2015-02-27 8:14 ` Kalle Valo
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).