svn commit: r195460 - projects/mesh11s/sys/net80211
Bruce Evans
brde at optusnet.com.au
Wed Jul 8 18:24:50 UTC 2009
On Wed, 8 Jul 2009, Rui Paulo wrote:
> Log:
> Remove some spurious __packed attributes.
Are they spurious? All uses of __packed are wrong, but they might still
help work around ABI bugs.
> Modified:
> projects/mesh11s/sys/net80211/ieee80211_mesh.h
>
> Modified: projects/mesh11s/sys/net80211/ieee80211_mesh.h
> ==============================================================================
> --- projects/mesh11s/sys/net80211/ieee80211_mesh.h Wed Jul 8 15:25:27 2009 (r195459)
> +++ projects/mesh11s/sys/net80211/ieee80211_mesh.h Wed Jul 8 15:26:34 2009 (r195460)
> @@ -46,7 +46,7 @@ struct ieee80211_meshconf_ie {
> uint8_t conf_authid[4]; /* Auth. Protocol ID */
> uint8_t conf_form; /* Formation Information */
> uint8_t conf_cap;
> -} __packed;
> +};
Broken ABIs (e.g., arm?) may add padding at the end of structs, so it
doesn't help for all members of a struct to have type uint8_t. I think
arm always pads to make the size a multiple of 4. The natural size of
the above struct is 6, so it seems to need __packed.
Bruce
More information about the svn-src-projects
mailing list