Search Linux Wireless

Re: [PATCH 06/10] d80211: update for wiphy api

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

 



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


[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