Search Linux Wireless

[PATCH] add privid field to wiphy

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

 



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@xxxxxxxxxxxxxxxx>

---
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,


-
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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