Search Linux Wireless

Re: [PATCH 13/14] rtlwifi: access skb->data to get C2H data by macro

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

 



Pkshih <pkshih@xxxxxxxxxxx> writes:

> On Fri, 2018-06-29 at 10:30 +0300, Kalle Valo wrote:
>> Pkshih <pkshih@xxxxxxxxxxx> writes:
>> 
>> > On Tue, 2018-05-29 at 08:18 +0300, Kalle Valo wrote:
>> >> <pkshih@xxxxxxxxxxx> writes:
>> >> 
>> >
>> > Because C2H data is little endian order, the struct will look like
>> > struct foo {
>> > #ifdef __LITTLE_ENDIAN
>> > 	u8 bar:4;
>> > 	u8 koo:4;
>> > #else
>> > 	u8 koo:4;
>> > 	u8 bar:4;
>> > #endif
>> > }
>> 
>> With u8 you don't need endian check, right? I would assume that with
>> both little and big endian bar and koo would be in the same place.
>
> I think u8 with bitfield would be different between little and big endian
> machines.

To me that does not make any sense, I have never heard about bit
endianness any of the devices I have worked on.

https://en.wikipedia.org/wiki/Endianness

-- 
Kalle Valo




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux