On 02/15/2016 11:06 AM, Eliad Peller wrote: > On Sun, Feb 14, 2016 at 9:37 PM, Grumbach, Emmanuel > <emmanuel.grumbach@xxxxxxxxx> wrote: >> >> On 02/14/2016 09:33 PM, Johannes Berg wrote: >>> On Sun, 2016-02-14 at 19:34 +0200, Emmanuel Grumbach wrote: >>>> Since the 3rd patch needs to be dropped anyway, let's route this one >>>> through my tree as usual. >>> It doesn't really have to be dropped, why? We can just make the same >>> adjustment as for dvm in the patch. >>> >> But I am not sure I really want to play with drivers/staging/vt6656/rxtx.c > here you go: > > diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c > index b668db6..1a2dda0 100644 > --- a/drivers/staging/vt6655/rxtx.c > +++ b/drivers/staging/vt6655/rxtx.c > @@ -1210,7 +1210,7 @@ static void vnt_fill_txkey(struct ieee80211_hdr > *hdr, u8 *key_buffer, > struct sk_buff *skb, u16 payload_len, > struct vnt_mic_hdr *mic_hdr) > { > - struct ieee80211_key_seq seq; > + u64 pn64; > u8 *iv = ((u8 *)hdr + ieee80211_get_hdrlen_from_skb(skb)); > > /* strip header and icv len from payload */ > @@ -1243,9 +1243,13 @@ static void vnt_fill_txkey(struct ieee80211_hdr > *hdr, u8 *key_buffer, > mic_hdr->payload_len = cpu_to_be16(payload_len); > ether_addr_copy(mic_hdr->mic_addr2, hdr->addr2); > > - ieee80211_get_key_tx_seq(tx_key, &seq); > - > - memcpy(mic_hdr->ccmp_pn, seq.ccmp.pn, IEEE80211_CCMP_PN_LEN); > + pn64 = atomic64_read(&tx_key->tx_pn); > + mic_hdr->ccmp_pn[5] = pn64; > + mic_hdr->ccmp_pn[4] = pn64 >> 8; > + mic_hdr->ccmp_pn[3] = pn64 >> 16; > + mic_hdr->ccmp_pn[2] = pn64 >> 24; > + mic_hdr->ccmp_pn[1] = pn64 >> 32; > + mic_hdr->ccmp_pn[0] = pn64 >> 40; > > if (ieee80211_has_a4(hdr->frame_control)) > mic_hdr->hlen = cpu_to_be16(28); > diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c > index efb54f5..76378d2 100644 > --- a/drivers/staging/vt6656/rxtx.c > +++ b/drivers/staging/vt6656/rxtx.c > @@ -719,7 +719,7 @@ static void vnt_fill_txkey(struct > vnt_usb_send_context *tx_context, > u16 payload_len, struct vnt_mic_hdr *mic_hdr) > { > struct ieee80211_hdr *hdr = tx_context->hdr; > - struct ieee80211_key_seq seq; > + u64 pn64; > u8 *iv = ((u8 *)hdr + ieee80211_get_hdrlen_from_skb(skb)); > > /* strip header and icv len from payload */ > @@ -752,9 +752,13 @@ static void vnt_fill_txkey(struct > vnt_usb_send_context *tx_context, > mic_hdr->payload_len = cpu_to_be16(payload_len); > ether_addr_copy(mic_hdr->mic_addr2, hdr->addr2); > > - ieee80211_get_key_tx_seq(tx_key, &seq); > - > - memcpy(mic_hdr->ccmp_pn, seq.ccmp.pn, IEEE80211_CCMP_PN_LEN); > + pn64 = atomic64_read(&tx_key->tx_pn); > + mic_hdr->ccmp_pn[5] = pn64; > + mic_hdr->ccmp_pn[4] = pn64 >> 8; > + mic_hdr->ccmp_pn[3] = pn64 >> 16; > + mic_hdr->ccmp_pn[2] = pn64 >> 24; > + mic_hdr->ccmp_pn[1] = pn64 >> 32; > + mic_hdr->ccmp_pn[0] = pn64 >> 40; > > if (ieee80211_has_a4(hdr->frame_control)) > mic_hdr->hlen = cpu_to_be16(28); > > > Eliad. > Want to send that patch to Greg? :) -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html