* [PATCH] add privid field to wiphy
@ 2007-03-02 13:29 Johannes Berg
0 siblings, 0 replies; only message in thread
From: Johannes Berg @ 2007-03-02 13:29 UTC (permalink / raw)
To: linux-wireless; +Cc: John W. Linville
While working on more sysfs removal (moving all the per-netdev stuff as
well) I noticed that we have no easy way to tell, given a netdev,
whether it belongs to a wiphy mac80211 controls or maybe somebody else.
This patch adds a void *privid field to the wiphy that you can assign to
something global in the driver/stack module to find out whether the
wiphy belongs to you or not when given a netdev with ieee80211_ptr, a
wireless dev or a wiphy by some other code.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
netdevs aren't notified themselves if the name changes but we can
install a notifier chain handler for that, but then need to find out
whether the netdev is ours or not :)
---
include/net/wireless.h | 7 +++++++
1 file changed, 7 insertions(+)
--- wireless-dev.orig/include/net/wireless.h 2007-03-02 14:24:02.184333268 +0100
+++ wireless-dev/include/net/wireless.h 2007-03-02 14:25:46.634333268 +0100
@@ -23,6 +23,13 @@ struct wiphy {
/* permanent MAC address */
u8 perm_addr[ETH_ALEN];
+ /* If multiple wiphys are registered and you're handed e.g.
+ * a regular netdev with assigned ieee80211_ptr, you won't
+ * know whether it points to a wiphy your driver has registered
+ * or not. Assign this to something global to your driver to
+ * help determine whether you own this wiphy or not. */
+ void *privid;
+
/* fields below are read-only, assigned by cfg80211 */
/* the item in /sys/class/ieee80211/ points to this,
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-03-02 13:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-02 13:29 [PATCH] add privid field to wiphy Johannes Berg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox