[PATCH 09/20] staging: brcm80211: use endian annotated structures in brcmsmac

Johannes Berg johannes at sipsolutions.net
Sat Sep 24 10:38:41 UTC 2011


On Fri, 2011-09-23 at 19:08 -0700, Franky Lin wrote:

>   * RxTSFTime: RxTSFTime time of first MAC symbol + M_PHY_PLCPRX_DLY
>   * RxChan: gain code, channel radio code, and phy type
>   */
> +struct d11rxhdr_le {
> +	__le16 RxFrameSize;
> +	u16 PAD;
> +	__le16 PhyRxStatus_0;
> +	__le16 PhyRxStatus_1;
> +	__le16 PhyRxStatus_2;
> +	__le16 PhyRxStatus_3;
> +	__le16 PhyRxStatus_4;
> +	__le16 PhyRxStatus_5;
> +	__le16 RxStatus1;
> +	__le16 RxStatus2;
> +	__le16 RxTSFTime;
> +	__le16 RxChan;
> +} __packed;
> +
>  struct d11rxhdr {
>  	u16 RxFrameSize;
>  	u16 PAD;

> +	union {
> +		struct d11rxhdr_le rxh_le;
> +		struct d11rxhdr rxh_cpu;
> +	};

This seems a little strange. Why would it be both in LE and CPU byte
order?

johannes




More information about the devel mailing list