Commit 4ce7bc0a authored by Zhaoyang Liu's avatar Zhaoyang Liu Committed by Kalle Valo

mwifiex: fix usb tx data payload offset issue

Commit 84b313b3 ("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: default avatarZhaoyang Liu <liuzy@marvell.com>
Signed-off-by: default avatarAmitkumar Karwar <akarwar@marvell.com>
Signed-off-by: default avatarAvinash Patil <patila@marvell.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 31def91b
...@@ -80,11 +80,13 @@ EXPORT_SYMBOL_GPL(mwifiex_handle_rx_packet); ...@@ -80,11 +80,13 @@ EXPORT_SYMBOL_GPL(mwifiex_handle_rx_packet);
int mwifiex_process_tx(struct mwifiex_private *priv, struct sk_buff *skb, int mwifiex_process_tx(struct mwifiex_private *priv, struct sk_buff *skb,
struct mwifiex_tx_param *tx_param) struct mwifiex_tx_param *tx_param)
{ {
int ret = -1; int hroom, ret = -1;
struct mwifiex_adapter *adapter = priv->adapter; struct mwifiex_adapter *adapter = priv->adapter;
u8 *head_ptr; u8 *head_ptr;
struct txpd *local_tx_pd = NULL; struct txpd *local_tx_pd = NULL;
hroom = (adapter->iface_type == MWIFIEX_USB) ? 0 : INTF_HEADER_LEN;
if (priv->bss_role == MWIFIEX_BSS_ROLE_UAP) if (priv->bss_role == MWIFIEX_BSS_ROLE_UAP)
head_ptr = mwifiex_process_uap_txpd(priv, skb); head_ptr = mwifiex_process_uap_txpd(priv, skb);
else else
...@@ -92,11 +94,9 @@ int mwifiex_process_tx(struct mwifiex_private *priv, struct sk_buff *skb, ...@@ -92,11 +94,9 @@ int mwifiex_process_tx(struct mwifiex_private *priv, struct sk_buff *skb,
if (head_ptr) { if (head_ptr) {
if (GET_BSS_ROLE(priv) == MWIFIEX_BSS_ROLE_STA) if (GET_BSS_ROLE(priv) == MWIFIEX_BSS_ROLE_STA)
local_tx_pd = local_tx_pd = (struct txpd *)(head_ptr + hroom);
(struct txpd *) (head_ptr + INTF_HEADER_LEN);
if (adapter->iface_type == MWIFIEX_USB) { if (adapter->iface_type == MWIFIEX_USB) {
adapter->data_sent = true; adapter->data_sent = true;
skb_pull(skb, INTF_HEADER_LEN);
ret = adapter->if_ops.host_to_card(adapter, ret = adapter->if_ops.host_to_card(adapter,
MWIFIEX_USB_EP_DATA, MWIFIEX_USB_EP_DATA,
skb, NULL); skb, NULL);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment