Linux wireless drivers development
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: linux-wireless@vger.kernel.org
Cc: "John W. Linville" <linville@tuxdriver.com>
Subject: [PATCH] add privid field to wiphy
Date: Fri, 02 Mar 2007 14:29:10 +0100	[thread overview]
Message-ID: <1172842150.3482.41.camel@johannes.berg> (raw)

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,



                 reply	other threads:[~2007-03-02 13:29 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1172842150.3482.41.camel@johannes.berg \
    --to=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox