mwifiex: reset skb length before inserting to free queue
authorAmitkumar Karwar <[email protected]>
Thu, 22 Sep 2011 04:43:25 +0000 (21:43 -0700)
committerJohn W. Linville <[email protected]>
Tue, 27 Sep 2011 18:34:04 +0000 (14:34 -0400)
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 <[email protected]>
Signed-off-by: Yogesh Ashok Powar <[email protected]>
Signed-off-by: Bing Zhao <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
drivers/net/wireless/mwifiex/cmdevt.c

index b5352afb8714884752474936dc8a031b611ecbf3..d12e25d0c88060c5d8968ee504894b57f64f4f77 100644 (file)
@@ -90,6 +90,9 @@ mwifiex_clean_cmd_node(struct mwifiex_adapter *adapter,
        cmd_node->data_buf = NULL;
        cmd_node->wait_q_enabled = false;
 
+       if (cmd_node->cmd_skb)
+               skb_trim(cmd_node->cmd_skb, 0);
+
        if (cmd_node->resp_skb) {
                dev_kfree_skb_any(cmd_node->resp_skb);
                cmd_node->resp_skb = NULL;