Skip to content

Commit

Permalink
mwifiex: reset skb length before inserting to free queue
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Amitkumar Karwar authored and linvjw committed Sep 27, 2011
1 parent 4ed5d52 commit 5cf8099
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/net/wireless/mwifiex/cmdevt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5cf8099

Please sign in to comment.