Search Linux Wireless

Re: [RFC/RFT] p54: Fix for big-endian architecture

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

 



On Friday 10 October 2008 02:39:14 Larry Finger wrote:
> Christian Lamparter wrote:
> 
> As the original code got the data from bootrec, I kept it the same. On
> reflection, the statement above could be
> 
> priv->rx_mtu = le16_to_cpu(desc->rx_mtu);
> 
> I think which structure it is in is purely a matter of taste, but I will make
> that change, test it, and submit a new patch. The big-endian fix above will also
> need to be changed. I considered converting to a single struct using unions, but
> that would get pretty messy.
> 
> Larry

I finally found the definitions by Intersil (again):
> http://gxaafoot.homelinux.org/cgi-bin/archzoom.cgi/jean-baptiste.note@xxxxxxxxxxxxxx/prism54-usb--devo--0.0--patch-182/islsm_bra.h?diff=2
> tinyurl link: http://tinyurl.com/3wo45y
Unfortunately, back in 2002 noone though about big/little endian and 64bit :-D

/*
 * Each boot record is identified by a unique code, followed
 * by the length (in 32 bit words) of the data in the record. 
 */
struct s_bootrec_hdr {
	unsigned long code;
	unsigned long length;	
};

/* Generic bootrecord structure that can be mapped to each bootrecord */
struct s_bootrecord {
	struct s_bootrec_hdr hdr;
	char start_of_data;
};
[...]

so, what about changing bootrec to:
struct bootrec {
        __le32 code;
        __le32 len;
	char data[0];
} __attribute__((packed));
And put this endless discussion to rest

Regards,
	Chr
--
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