From: Amit Beka Date: Wed, 8 Feb 2012 08:01:35 +0000 (+0200) Subject: iwlwifi: send testmode hcmd reply with rx header X-Git-Tag: v3.4-rc1~177^2~108^2~301^2~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=edabfa914d52daf8c01511109144fe5af3c4389e;p=platform%2Fkernel%2Flinux-3.10.git iwlwifi: send testmode hcmd reply with rx header When a host command is sent through testmode, the whole reply (including rx header) is returned to the user, and not only the payload of the rx. Before this commit the length was buggy - the reply contained 4 bytes after the end of the payload. Signed-off-by: Amit Beka Signed-off-by: Wey-Yi Guy --- diff --git a/drivers/net/wireless/iwlwifi/iwl-testmode.c b/drivers/net/wireless/iwlwifi/iwl-testmode.c index ba5c63a..80955ed 100644 --- a/drivers/net/wireless/iwlwifi/iwl-testmode.c +++ b/drivers/net/wireless/iwlwifi/iwl-testmode.c @@ -309,7 +309,7 @@ static int iwl_testmode_ucode(struct ieee80211_hw *hw, struct nlattr **tb) } /* The reply is in a page, that we cannot send to user space. */ - memcpy(reply_buf, &(pkt->u), reply_len); + memcpy(reply_buf, &(pkt->hdr), reply_len); iwl_free_pages(priv->shrd, cmd.reply_page); NLA_PUT_U32(skb, IWL_TM_ATTR_COMMAND, IWL_TM_CMD_DEV2APP_UCODE_RX_PKT);