On Thu, 2010-07-22 at 08:34 +0200, Coelho Luciano (Nokia-MS/Helsinki) wrote: > > @@ -191,11 +191,13 @@ static int wl1251_tx_send_packet(struct wl1251 *wl, struct sk_buff *skb, > > if (control->control.hw_key && > > control->control.hw_key->alg == ALG_TKIP) { > > int hdrlen; > > - u16 fc; > > + __le16 fc; > > + u16 length; > > u8 *pos; > > > > - fc = *(u16 *)(skb->data + sizeof(*tx_hdr)); > > - tx_hdr->length += WL1251_TKIP_IV_SPACE; > > + fc = *(__le16 *)(skb->data + sizeof(*tx_hdr)); > > Is this going to work? sizeof(*tx_hdr), and the operation, will be in > the cpu's endianess, right? Wouldn't the following be the right thing to > do then? > > fc = cpu_to_le16(le16_to_cpu(skb->data) + sizeof(*tx_hdr)); Ugh, as Johannes pointed out, what I said here is completely non-sense. Please ignore this before-my-morning-coffee lapse. ;) -- Cheers, Luca. -- 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