Search Linux Wireless

Re: [PATCH 09/17] iwlwifi: EEPROM reading fix

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

 



On 7/27/07, Michael Buesch <mb@xxxxxxxxx> wrote:
> On Friday 27 July 2007 11:26:33 Zhu Yi wrote:
> >               if (!(r & 1)) {
> >                       IWL_ERROR("Time out reading EEPROM[%d]", addr);
> > -                     return -ETIMEDOUT;
> > +                     rc = -ETIMEDOUT;
> > +                     goto done;
> >               }
> >
> >               e[addr / 2] = le16_to_cpu(r >> 16);
>
> Seems like you really want cpu_to_le16() here, as "r" should better
> be CPU-endian when shifting it by >>.
>
> Though, I don't see enough code context here to judge if the
> endianess conversion is correct at all or not.
>
This line is empirically correct. The value r is indeed cpu ordered 32
bit value  I agree that it is a bit awkward but  the reason is in how
the register value is composed in the HW.

Thanks for the comment.
Tomas

> --
> Greetings Michael.
> -
> 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
>
-
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