Search Linux Wireless

Re: [PATCH] wl1251: fix sparse-generated warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux