]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
mwifiex: using right aid value for tdls action frame
authorXinming Hu <huxm@marvell.com>
Wed, 22 Jul 2015 11:53:42 +0000 (04:53 -0700)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 6 Aug 2015 07:13:46 +0000 (10:13 +0300)
Variable pos is u8 here, so memcpy is needed to store u16 aid.
At the same time, aid should be platform independent, upper layer
utility(wpa_supplicant,etc.,) parse it as le16, so keep it le16
here.

Signed-off-by: Xinming Hu <huxm@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/mwifiex/tdls.c

index aa3d3c5ed07b3671b8d9064ff020f8fab998efcd..b3e163de98995ba62767ab904f636853e2847ac3 100644 (file)
@@ -164,7 +164,7 @@ static void mwifiex_tdls_add_aid(struct mwifiex_private *priv,
        pos = (void *)skb_put(skb, 4);
        *pos++ = WLAN_EID_AID;
        *pos++ = 2;
-       *pos++ = le16_to_cpu(assoc_rsp->a_id);
+       memcpy(pos, &assoc_rsp->a_id, sizeof(assoc_rsp->a_id));
 
        return;
 }