]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
staging: vt6656: rxtx struct vnt_mic_hdr change tsc_47_16/tsc_15_0
authorMalcolm Priestley <tvboxspy@gmail.com>
Sat, 28 Jun 2014 22:55:39 +0000 (23:55 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 29 Jun 2014 21:25:53 +0000 (14:25 -0700)
Replace with ccmp_pn with size of IEEE80211_CCMP_PN_LEN(6)

memcpy the struct ieee80211_key_seq -> ccmp.pn onto ccmp_pn
removing the need for endian conversion.

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

index 7c9f23246fd711161e9535723391635758f792ad..f4833ff2a9eb1ef6b7f2f06cd23fdffdcd1d0c4a 100644 (file)
@@ -848,13 +848,7 @@ static void vnt_fill_txkey(struct vnt_usb_send_context *tx_context,
 
                ieee80211_get_key_tx_seq(tx_key, &seq);
 
-               mic_hdr->tsc_47_16 = cpu_to_be32((u32)seq.ccmp.pn[3] |
-                                               ((u32)seq.ccmp.pn[2] << 8) |
-                                               ((u32)seq.ccmp.pn[1] << 16) |
-                                               ((u32)seq.ccmp.pn[0] << 24));
-
-               mic_hdr->tsc_15_0 = cpu_to_be16((u16)seq.ccmp.pn[5] |
-                                               ((u16)seq.ccmp.pn[4] << 8));
+               memcpy(mic_hdr->ccmp_pn, seq.ccmp.pn, IEEE80211_CCMP_PN_LEN);
 
                if (ieee80211_has_a4(hdr->frame_control))
                        mic_hdr->hlen = cpu_to_be16(28);
index 847c0556668bedacee782e6939093a9589e3a3f9..26dc21c51e227d7bc60102a8ba2a63a5ed2879fe 100644 (file)
@@ -41,8 +41,7 @@ struct vnt_mic_hdr {
        u8 id;
        u8 tx_priority;
        u8 mic_addr2[6];
-       __be32 tsc_47_16;
-       __be16 tsc_15_0;
+       u8 ccmp_pn[IEEE80211_CCMP_PN_LEN];
        __be16 payload_len;
        __be16 hlen;
        __le16 frame_control;