diff options
author | Zhaoyang Liu <liuzy@marvell.com> | 2015-02-13 10:08:16 -0500 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2015-02-27 03:14:02 -0500 |
commit | 4ce7bc0a4e555f8519e1a2c8a8569f203bd5727c (patch) | |
tree | d6d88fb447e71d653d13456258f62c203d618790 /drivers/net/wireless/mwifiex | |
parent | 31def91b3a192bd414d87b3a408de34eed94d616 (diff) |
mwifiex: fix usb tx data payload offset issue
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>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/mwifiex')
-rw-r--r-- | drivers/net/wireless/mwifiex/txrx.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/wireless/mwifiex/txrx.c b/drivers/net/wireless/mwifiex/txrx.c index ac93557cbdc9..ea4549f0e0b9 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); | |||
80 | int mwifiex_process_tx(struct mwifiex_private *priv, struct sk_buff *skb, | 80 | int mwifiex_process_tx(struct mwifiex_private *priv, struct sk_buff *skb, |
81 | struct mwifiex_tx_param *tx_param) | 81 | struct mwifiex_tx_param *tx_param) |
82 | { | 82 | { |
83 | int ret = -1; | 83 | int hroom, ret = -1; |
84 | struct mwifiex_adapter *adapter = priv->adapter; | 84 | struct mwifiex_adapter *adapter = priv->adapter; |
85 | u8 *head_ptr; | 85 | u8 *head_ptr; |
86 | struct txpd *local_tx_pd = NULL; | 86 | struct txpd *local_tx_pd = NULL; |
87 | 87 | ||
88 | hroom = (adapter->iface_type == MWIFIEX_USB) ? 0 : INTF_HEADER_LEN; | ||
89 | |||
88 | if (priv->bss_role == MWIFIEX_BSS_ROLE_UAP) | 90 | if (priv->bss_role == MWIFIEX_BSS_ROLE_UAP) |
89 | head_ptr = mwifiex_process_uap_txpd(priv, skb); | 91 | head_ptr = mwifiex_process_uap_txpd(priv, skb); |
90 | else | 92 | else |
@@ -92,11 +94,9 @@ int mwifiex_process_tx(struct mwifiex_private *priv, struct sk_buff *skb, | |||
92 | 94 | ||
93 | if (head_ptr) { | 95 | if (head_ptr) { |
94 | if (GET_BSS_ROLE(priv) == MWIFIEX_BSS_ROLE_STA) | 96 | if (GET_BSS_ROLE(priv) == MWIFIEX_BSS_ROLE_STA) |
95 | local_tx_pd = | 97 | local_tx_pd = (struct txpd *)(head_ptr + hroom); |
96 | (struct txpd *) (head_ptr + INTF_HEADER_LEN); | ||
97 | if (adapter->iface_type == MWIFIEX_USB) { | 98 | if (adapter->iface_type == MWIFIEX_USB) { |
98 | adapter->data_sent = true; | 99 | adapter->data_sent = true; |
99 | skb_pull(skb, INTF_HEADER_LEN); | ||
100 | ret = adapter->if_ops.host_to_card(adapter, | 100 | ret = adapter->if_ops.host_to_card(adapter, |
101 | MWIFIEX_USB_EP_DATA, | 101 | MWIFIEX_USB_EP_DATA, |
102 | skb, NULL); | 102 | skb, NULL); |