Re: [patch] ipw2x00: shift wrap bugs setting ->rt_tsf

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

 



Hello, Joe,

On 24 October 2014 02:43, Joe Perches <joe@xxxxxxxxxxx> wrote:
>
> struct ipw_rt_hdr {
>         struct ieee80211_radiotap_header rt_hdr;
>         u64 rt_tsf;      /* TSF */      /* XXX */
>         u8 rt_flags;    /* radiotap packet flags *
>         u8 rt_rate;     /* rate in 500kb/s */
>         __le16 rt_channel;      /* channel in mhz */
>         __le16 rt_chbitmask;    /* channel bitfield */
>         s8 rt_dbmsignal;        /* signal in dbM, kluged to signed */
>         s8 rt_dbmnoise;
>         u8 rt_antenna;  /* antenna number */
>         u8 payload[0];  /* payload... */
> } __packed;
>
> Maybe rt_tsf (which is otherwise unused in this code),
> should be __le64 so maybe use (u32) ?
>

Yes, you are right, the field definition should be __le64 as you
suggest. All values in radiotap header are specified in little endian
byte order according to the documentation at www.radiotap.org.

>         ipw_rt->rt_txf = cpu_to_le64((u32)(frame->parent_tsf[3] << 24 |
>                                            frame->parent_tsf[2] << 16 |
>                                            frame->parent_tsf[1] << 8  |
>                                            frame->parent_tsf[0]));
>

That looks fine for me. Will you send a patch?

Stanislav.
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux