]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
iwlwifi: send testmode hcmd reply with rx header
authorAmit Beka <amit.beka@intel.com>
Wed, 8 Feb 2012 08:01:35 +0000 (10:01 +0200)
committerWey-Yi Guy <wey-yi.w.guy@intel.com>
Fri, 17 Feb 2012 18:55:10 +0000 (10:55 -0800)
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 <amit.beka@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
drivers/net/wireless/iwlwifi/iwl-testmode.c

index ba5c63a023a25f83241d383a704780eb1eba34fd..80955ed06e821c04fbde46c083de35fa07116ac6 100644 (file)
@@ -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);