On Mon, 2007-02-19 at 21:49 +0100, Jiri Benc wrote: > Couldn't we just allow embedding of wiphy into a custom structure? > Something like: > > struct ieee80211_hw { > struct wiphy wiphy; > ... > } > > This way the memory could become less fragmented and less pointer > dereferencing would be needed. Actually, if you look at the memory layout in ieee80211.c, struct ieee80211_hw is part of the private area allocated along with the struct wiphy, so it really is: [internal stuff] struct wiphy { ... } struct ieee80211_hw { ... } What we could do is add static inline struct wiphy *priv_to_wiphy(void *priv) { return container_of(priv, struct wiphy, priv); } to the net/wireless.h header. Then we could drop the wiphy field completely. johannes
Attachment:
signature.asc
Description: This is a digitally signed message part