staging: vt6656: rxtx: s_vFillTxKey fix pMACHeader sparse warning
authorMalcolm Priestley <tvboxspy@gmail.com>
Sat, 22 Mar 2014 09:01:26 +0000 (09:01 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 18 Apr 2014 23:05:28 +0000 (16:05 -0700)
Endian convert __le16 pMACHeader->frame_control and pMACHeader->seq_ctrl
back to cpu.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vt6656/rxtx.c

index 43e13e2766ed34eb9ef795b841598af63c77c841..9706e1846dbdb63529673c4c886a5ef06fb334b5 100644 (file)
@@ -282,9 +282,10 @@ static void s_vFillTxKey(struct vnt_private *pDevice,
 
                /* MICHDR2 */
                memcpy(mic_hdr->addr3, pMACHeader->addr3, ETH_ALEN);
-               mic_hdr->frame_control = cpu_to_le16(pMACHeader->frame_control
-                                                               & 0xc78f);
-               mic_hdr->seq_ctrl = cpu_to_le16(pMACHeader->seq_ctrl & 0xf);
+               mic_hdr->frame_control = cpu_to_le16(
+                       le16_to_cpu(pMACHeader->frame_control) & 0xc78f);
+               mic_hdr->seq_ctrl = cpu_to_le16(
+                               le16_to_cpu(pMACHeader->seq_ctrl) & 0xf);
 
                if (ieee80211_has_a4(pMACHeader->frame_control))
                        memcpy(mic_hdr->addr4, pMACHeader->addr4, ETH_ALEN);