Search Linux Wireless

[PATCH 1/2] mwifiex: fix cmd_skb headroom decreasing issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Before calling host_to_card() to send the cmd to firmware,
we use skb_push() to add 4 bytes SDIO interface header at
the start of the data buffer. Since cmd_skb data structure
will be re-used at a later time, we need to restore its
headroom by removing the 4 bytes header.

Signed-off-by: Bing Zhao <bzhao@xxxxxxxxxxx>
Signed-off-by: Marc Yang <yangyang@xxxxxxxxxxx>
Signed-off-by: Yogesh Ashok Powar <yogeshp@xxxxxxxxxxx>
---
 drivers/net/wireless/mwifiex/cmdevt.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/mwifiex/cmdevt.c b/drivers/net/wireless/mwifiex/cmdevt.c
index a9aeb31..8676480 100644
--- a/drivers/net/wireless/mwifiex/cmdevt.c
+++ b/drivers/net/wireless/mwifiex/cmdevt.c
@@ -206,6 +206,8 @@ static int mwifiex_dnld_cmd_to_fw(struct mwifiex_private *priv,
 					     cmd_node->cmd_skb->data,
 					     cmd_node->cmd_skb->len, NULL);
 
+	skb_pull(cmd_node->cmd_skb, INTF_HEADER_LEN);
+
 	if (ret == -1) {
 		dev_err(adapter->dev, "DNLD_CMD: host to card failed\n");
 		if (wait_queue)
-- 
1.7.0.2

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux