Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mwifiex: reset skb length before inserting to free queue

After handling command response, cmd skb is inserted into command
free queue(which keeps track of availabile skbs) for reuse purpose.
Skb length is not getting reset to zero here. This patch takes care
of it.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

authored by

Amitkumar Karwar and committed by
John W. Linville
5cf80993 4ed5d521

+3
+3
drivers/net/wireless/mwifiex/cmdevt.c
··· 90 90 cmd_node->data_buf = NULL; 91 91 cmd_node->wait_q_enabled = false; 92 92 93 + if (cmd_node->cmd_skb) 94 + skb_trim(cmd_node->cmd_skb, 0); 95 + 93 96 if (cmd_node->resp_skb) { 94 97 dev_kfree_skb_any(cmd_node->resp_skb); 95 98 cmd_node->resp_skb = NULL;