Skip to contentSkip to conversation

update MAINTAINERS for wireless mailing list

PATCH New John W. Linville 6 participants 10 messages Apr 23, 2007 – Apr 26, 2007 4 messages not in the archive

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 update MAINTAINERS for wireless mailing list

From: Johannes Berg <[email protected]>

This patch adds the linux-wireless mailing list to all appropriate entries in the MAINTAINERS file.

---
 MAINTAINERS |   15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)
MAINTAINERS +12 -3
index 6876c8b..a15ec1a 100644
@@ -656,6 +656,7 @@ S:	Supported
 ATMEL WIRELESS DRIVER
 P:	Simon Kelley
 M:	[email protected]
+L:	[email protected]
 W:	http://www.thekelleys.org.uk/atmel
 W:	http://atmelwlandriver.sourceforge.net/
 S:	Maintained
@@ -711,6 +712,7 @@ P:	Larry Finger
 M:	[email protected]
 P:	Stefano Brivio
 M:	[email protected]
+L:	[email protected]
 W:	http://bcm43xx.berlios.de/
 S:	Maintained
 
@@ -1552,6 +1554,7 @@ S:	Supported
 HOST AP DRIVER
 P:	Jouni Malinen
 M:	[email protected]
+L:	[email protected]
 L:	[email protected]
 W:	http://hostap.epitest.fi/
 S:	Maintained
@@ -1838,6 +1841,7 @@ P:	Yi Zhu
 M:	[email protected]
 P:	James Ketrenos
 M:	[email protected]
+L:	[email protected]
 L:	[email protected]
 L:	http://lists.sourceforge.net/mailman/listinfo/ipw2100-devel
 W:	http://ipw2100.sourceforge.net
@@ -1848,6 +1852,7 @@ P:	Yi Zhu
 M:	[email protected]
 P:	James Ketrenos
 M:	[email protected]
+L:	[email protected]
 L:	[email protected]
 L:	http://lists.sourceforge.net/mailman/listinfo/ipw2100-devel
 W:	http://ipw2200.sourceforge.net
@@ -2540,6 +2545,7 @@ P:	Pavel Roskin
 M:	[email protected]
 P:	David Gibson
 M:	[email protected]
+L:	[email protected]
 L:	[email protected]
 L:	[email protected]
 W:	http://www.nongnu.org/orinoco/
@@ -2719,7 +2725,7 @@ S:	Supported
 PRISM54 WIRELESS DRIVER
 P:	Prism54 Development Team
 M:	[email protected]
-L:	[email protected]
+L:	[email protected]
 W:	http://prism54.org
 S:	Maintained
 
@@ -2790,7 +2796,7 @@ S:	Maintained
 RAYLINK/WEBGEAR 802.11 WIRELESS LAN DRIVER
 P:	Corey Thomas
 M:	[email protected]
-L:	[email protected]
+L:	[email protected]
 S:	Maintained
 
 RANDOM NUMBER DRIVER
@@ -3053,7 +3059,7 @@ M:	[email protected]
 P:	Daniel Drake
 M:	[email protected]
 W:	http://softmac.sipsolutions.net/
-L:	[email protected]
+L:	[email protected]
 S:	Maintained
 
 SOFTWARE RAID (Multiple Disks) SUPPORT
@@ -3758,6 +3764,7 @@ S:	Maintained
 WAVELAN NETWORK DRIVER & WIRELESS EXTENSIONS
 P:	Jean Tourrilhes
 M:	[email protected]
+L:	[email protected]
 W:	http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/
 S:	Maintained
 
@@ -3775,6 +3782,7 @@ S:	Maintained
 WL3501 WIRELESS PCMCIA CARD DRIVER
 P:	Arnaldo Carvalho de Melo
 M:	[email protected]
+L:	[email protected]
 W:	http://oops.ghostprotocols.net:81/blog
 S:	Maintained
 
@@ -3838,6 +3846,7 @@ M:	[email protected]
 P:	Ulrich Kunitz
 M:	[email protected]
 W:	http://zd1211.ath.cx/wiki/DriverRewrite
+L:	[email protected]
 L:	[email protected] (subscribers-only)
 S:	Maintained
 
Signature · 5 lines
1.5.0.6

-- 
John W. Linville
[email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw

PATCH 1/1 refactor wireless Kconfig

From: Johannes Berg <[email protected]>

This patch refactors the wireless Kconfig all over and already introduces net/wireless/Kconfig with just the WEXT bit for now, the cfg80211 patch will add to that as well.

---
 drivers/net/Makefile                  |    2 +-
 drivers/net/wireless/Kconfig          |  120 ++++++++++++++-------------------
 drivers/net/wireless/bcm43xx/Kconfig  |    3 +-
 drivers/net/wireless/hostap/Kconfig   |    3 +-
 drivers/net/wireless/zd1211rw/Kconfig |    3 +-
 net/Kconfig                           |   11 ++-
 net/Makefile                          |    2 +
 net/ieee80211/Kconfig                 |    3 +-
 net/wireless/Kconfig                  |   23 ++++++
 net/wireless/Makefile                 |    1 +
 10 files changed, 92 insertions(+), 79 deletions(-)
 create mode 100644 net/wireless/Kconfig
 create mode 100644 net/wireless/Makefile
drivers/net/Makefile +1 -1
index 33af833..5852732 100644
@@ -206,7 +206,7 @@ obj-$(CONFIG_TR) += tokenring/
 obj-$(CONFIG_WAN) += wan/
 obj-$(CONFIG_ARCNET) += arcnet/
 obj-$(CONFIG_NET_PCMCIA) += pcmcia/
-obj-$(CONFIG_NET_RADIO) += wireless/
+obj-y += wireless/
 obj-$(CONFIG_NET_TULIP) += tulip/
 obj-$(CONFIG_HAMRADIO) += hamradio/
 obj-$(CONFIG_IRDA) += irda/
drivers/net/wireless/Kconfig +50 -70

246 lines not on this page · raw message

drivers/net/wireless/bcm43xx/Kconfig +2 -1
index 533993f..ce397e4 100644
@@ -1,6 +1,7 @@
 config BCM43XX
 	tristate "Broadcom BCM43xx wireless support"
-	depends on PCI && IEEE80211 && IEEE80211_SOFTMAC && NET_RADIO && EXPERIMENTAL
+	depends on PCI && IEEE80211 && IEEE80211_SOFTMAC && WLAN_80211 && EXPERIMENTAL
+	select WIRELESS_EXT
 	select FW_LOADER
 	select HW_RANDOM
 	---help---
drivers/net/wireless/hostap/Kconfig +2 -1
index 308f773..1fef331 100644
@@ -1,6 +1,7 @@
 config HOSTAP
 	tristate "IEEE 802.11 for Host AP (Prism2/2.5/3 and WEP/TKIP/CCMP)"
-	depends on NET_RADIO
+	depends on WLAN_80211
+	select WIRELESS_EXT
 	select IEEE80211
 	select IEEE80211_CRYPT_WEP
 	---help---
drivers/net/wireless/zd1211rw/Kconfig +2 -1
index 66ed55b..d1ab24a 100644
@@ -1,6 +1,7 @@
 config ZD1211RW
 	tristate "ZyDAS ZD1211/ZD1211B USB-wireless support"
-	depends on USB && IEEE80211 && IEEE80211_SOFTMAC && NET_RADIO && EXPERIMENTAL
+	depends on USB && IEEE80211_SOFTMAC && WLAN_80211 && EXPERIMENTAL
+	select WIRELESS_EXT
 	select FW_LOADER
 	---help---
 	  This is an experimental driver for the ZyDAS ZD1211/ZD1211B wireless
net/Kconfig +7 -4
index e2d9b3b..ae1817d 100644
@@ -212,14 +212,17 @@ endmenu
 source "net/ax25/Kconfig"
 source "net/irda/Kconfig"
 source "net/bluetooth/Kconfig"
-source "net/ieee80211/Kconfig"
-
-config WIRELESS_EXT
-	bool
 
 config FIB_RULES
 	bool
 
+menu "Wireless"
+
+source "net/wireless/Kconfig"
+source "net/ieee80211/Kconfig"
+
+endmenu
+
 endif   # if NET
 endmenu # Networking
 
net/Makefile +2 -0
index 4854ac5..29bbe19 100644
@@ -52,3 +52,5 @@ obj-$(CONFIG_IUCV)		+= iucv/
 ifeq ($(CONFIG_NET),y)
 obj-$(CONFIG_SYSCTL)		+= sysctl_net.o
 endif
+
+obj-y				+= wireless/
net/ieee80211/Kconfig +2 -1
index 6ef766e..1438ade 100644
@@ -56,7 +56,8 @@ config IEEE80211_CRYPT_CCMP
 
 config IEEE80211_CRYPT_TKIP
 	tristate "IEEE 802.11i TKIP encryption"
-	depends on IEEE80211 && NET_RADIO
+	depends on IEEE80211
+	select WIRELESS_EXT
 	select CRYPTO
 	select CRYPTO_MICHAEL_MIC
 	select CRYPTO_ECB
net/wireless/Kconfig new file +23 -0
new file mode 100644
index 0000000..ca2f05c
@@ -0,0 +1,23 @@
+config WIRELESS_EXT
+	bool "Wireless extensions"
+	default n
+	---help---
+	  This option enables the legacy wireless extensions
+	  (wireless network interface configuration via ioctls.)
+
+	  Wireless extensions will be replaced by cfg80211 and
+	  will be required only by legacy drivers that implement
+	  wireless extension handlers.
+
+	  Say N (if you can) unless you know you need wireless
+	  extensions for external modules.
+
+config NET_WIRELESS_RTNETLINK
+	bool "Wireless Extension API over RtNetlink"
+	depends on WIRELESS_EXT
+	---help---
+	  Support the Wireless Extension API over the RtNetlink socket
+	  in addition to the traditional ioctl interface (selected above).
+
+	  For now, few tools use this facility, but it might grow in the
+	  future. The only downside is that it adds 4.5 kB to your kernel.
net/wireless/Makefile new file +1 -0
new file mode 100644
index 0000000..cf4e3d9
@@ -0,0 +1 @@
+# dummy file for now
Signature · 5 lines
1.5.0.6

-- 
John W. Linville
[email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw

PATCH 1/1 cfg80211: new wireless config infrastructure

From: Johannes Berg <[email protected]>

This patch creates the core cfg80211 code along with some sysfs bits. This is a stripped down version to allow mac80211 to function, but doesn't include any configuration yet except for creating and removing virtual interfaces.

This patch includes the nl80211 header file but it only contains the interface types which the cfg80211 interface for creating virtual interfaces relies on.

---
 CREDITS                   |    6 ++
 MAINTAINERS               |    6 ++
 include/linux/Kbuild      |    1 +
 include/linux/netdevice.h |    4 +
 include/linux/nl80211.h   |   38 ++++++++
 include/net/cfg80211.h    |   36 ++++++++
 include/net/wireless.h    |  139 ++++++++++++++++++++++++++++++
 net/wireless/Kconfig      |    3 +
 net/wireless/Makefile     |    4 +-
 net/wireless/core.c       |  209 +++++++++++++++++++++++++++++++++++++++++++++
 net/wireless/core.h       |   49 +++++++++++
 net/wireless/sysfs.c      |   80 +++++++++++++++++
 net/wireless/sysfs.h      |    9 ++
 13 files changed, 583 insertions(+), 1 deletions(-)
 create mode 100644 include/linux/nl80211.h
 create mode 100644 include/net/cfg80211.h
 create mode 100644 include/net/wireless.h
 create mode 100644 net/wireless/core.c
 create mode 100644 net/wireless/core.h
 create mode 100644 net/wireless/sysfs.c
 create mode 100644 net/wireless/sysfs.h
CREDITS +6 -0
index e3e7271..dede114 100644
@@ -317,6 +317,12 @@ S: 2322 37th Ave SW
 S: Seattle, Washington 98126-2010
 S: USA
 
+N: Johannes Berg
+E: [email protected]
+W: http://johannes.sipsolutions.net/
+P: 1024D/9AB78CA5 AD02 0176 4E29 C137 1DF6 08D2 FC44 CF86 9AB7 8CA5
+D: powerpc & 802.11 hacker
+
 N: Stephen R. van den Berg (AKA BuGless)
 E: berg-C+EoYKesnrCVdxy9aTz+TbwNW4aj8/[email protected]
 D: General kernel, gcc, and libc hacker
MAINTAINERS +6 -0
index a15ec1a..3994eee 100644
@@ -894,6 +894,12 @@ M:	[email protected]
 L:	[email protected]
 S:	Maintained
 
+CFG80211 and NL80211
+P:	Johannes Berg
+M:	[email protected]
+L:	[email protected]
+S:	Maintained
+
 COMMON INTERNET FILE SYSTEM (CIFS)
 P:	Steve French
 M:	[email protected]
include/linux/Kbuild +1 -0
index ea86f2e..4ff0f57 100644
@@ -113,6 +113,7 @@ header-y += netrom.h
 header-y += nfs2.h
 header-y += nfs4_mount.h
 header-y += nfs_mount.h
+header-y += nl80211.h
 header-y += oom.h
 header-y += param.h
 header-y += pci_regs.h
include/linux/netdevice.h +4 -0
index 71fc8ff..584c199 100644
@@ -42,6 +42,8 @@
 struct vlan_group;
 struct ethtool_ops;
 struct netpoll_info;
+/* 802.11 specific */
+struct wireless_dev;
 					/* source back-compat hooks */
 #define SET_ETHTOOL_OPS(netdev,ops) \
 	( (netdev)->ethtool_ops = (ops) )
@@ -400,6 +402,8 @@ struct net_device
 	void                    *ip6_ptr;       /* IPv6 specific data */
 	void			*ec_ptr;	/* Econet specific data	*/
 	void			*ax25_ptr;	/* AX.25 specific data */
+	struct wireless_dev	*ieee80211_ptr;	/* IEEE 802.11 specific data,
+						   assign before registering */
 
 /*
  * Cache line mostly used on receive path (including eth_type_trans())
include/linux/nl80211.h new file +38 -0
new file mode 100644
index 0000000..9a30ba2
@@ -0,0 +1,38 @@
+#ifndef __LINUX_NL80211_H
+#define __LINUX_NL80211_H
+/*
+ * 802.11 netlink interface public header
+ *
+ * Copyright 2006, 2007 Johannes Berg <[email protected]>
+ */
+
+/**
+ * enum nl80211_iftype - (virtual) interface types
+ * @NL80211_IFTYPE_UNSPECIFIED: unspecified type, driver decides
+ * @NL80211_IFTYPE_ADHOC: independent BSS member
+ * @NL80211_IFTYPE_STATION: managed BSS member
+ * @NL80211_IFTYPE_AP: access point
+ * @NL80211_IFTYPE_AP_VLAN: VLAN interface for access points
+ * @NL80211_IFTYPE_WDS: wireless distribution interface
+ * @NL80211_IFTYPE_MONITOR: monitor interface receiving all frames
+ * @__NL80211_IFTYPE_AFTER_LAST: internal use
+ *
+ * These values are used with the NL80211_ATTR_IFTYPE
+ * to set the type of an interface.
+ *
+ */
+enum nl80211_iftype {
+	NL80211_IFTYPE_UNSPECIFIED,
+	NL80211_IFTYPE_ADHOC,
+	NL80211_IFTYPE_STATION,
+	NL80211_IFTYPE_AP,
+	NL80211_IFTYPE_AP_VLAN,
+	NL80211_IFTYPE_WDS,
+	NL80211_IFTYPE_MONITOR,
+
+	/* keep last */
+	__NL80211_IFTYPE_AFTER_LAST
+};
+#define NL80211_IFTYPE_MAX (__NL80211_IFTYPE_AFTER_LAST - 1)
+
+#endif /* __LINUX_NL80211_H */
include/net/cfg80211.h new file +36 -0
new file mode 100644
index 0000000..783a114
@@ -0,0 +1,36 @@
+#ifndef __NET_CFG80211_H
+#define __NET_CFG80211_H
+
+#include <linux/netlink.h>
+#include <linux/skbuff.h>
+#include <net/genetlink.h>
+
+/*
+ * 802.11 configuration in-kernel interface
+ *
+ * Copyright 2006 Johannes Berg <[email protected]>
+ */
+
+/* from net/wireless.h */
+struct wiphy;
+
+/**
+ * struct cfg80211_ops - backend description for wireless configuration
+ *
+ * This struct is registered by fullmac card drivers and/or wireless stacks
+ * in order to handle configuration requests on their interfaces.
+ *
+ * All callbacks except where otherwise noted should return 0
+ * on success or a negative error code.
+ *
+ * @add_virtual_intf: create a new virtual interface with the given name
+ *
+ * @del_virtual_intf: remove the virtual interface determined by ifindex.
+ */
+struct cfg80211_ops {
+	int	(*add_virtual_intf)(struct wiphy *wiphy, char *name,
+				    unsigned int type);
+	int	(*del_virtual_intf)(struct wiphy *wiphy, int ifindex);
+};
+
+#endif /* __NET_CFG80211_H */
include/net/wireless.h new file +139 -0

139 lines not on this page · raw message

net/wireless/Kconfig +3 -0
index ca2f05c..1863c0b 100644
@@ -1,3 +1,6 @@
+config CFG80211
+        tristate "Improved wireless configuration API"
+
 config WIRELESS_EXT
 	bool "Wireless extensions"
 	default n
net/wireless/Makefile +3 -1
index cf4e3d9..3f082ff 100644
@@ -1 +1,3 @@
-# dummy file for now
+obj-$(CONFIG_CFG80211) += cfg80211.o
+
+cfg80211-y += core.o sysfs.o
net/wireless/core.c new file +209 -0

209 lines not on this page · raw message

net/wireless/core.h new file +49 -0

49 lines not on this page · raw message

net/wireless/sysfs.c new file +80 -0

80 lines not on this page · raw message

net/wireless/sysfs.h new file +9 -0
new file mode 100644
index 0000000..65acbeb
@@ -0,0 +1,9 @@
+#ifndef __WIRELESS_SYSFS_H
+#define __WIRELESS_SYSFS_H
+
+extern int wiphy_sysfs_init(void);
+extern void wiphy_sysfs_exit(void);
+
+extern struct class ieee80211_class;
+
+#endif /* __WIRELESS_SYSFS_H */
Signature · 5 lines
1.5.0.6

-- 
John W. Linville
[email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#6 lore raw

PATCH 1/1 remove wext over netlink

From: Johannes Berg <[email protected]>

As scheduled, this patch removes the pointless wext over netlink code.

---
 Documentation/feature-removal-schedule.txt |   12 -
 include/net/iw_handler.h                   |   10 -
 net/core/rtnetlink.c                       |   31 --
 net/core/wireless.c                        |  735 ----------------------------
 net/wireless/Kconfig                       |   10 -
 5 files changed, 0 insertions(+), 798 deletions(-)
Documentation/feature-removal-schedule.txt +0 -12
index 9817b60..976c8a1 100644
@@ -285,18 +285,6 @@ Who:	Richard Purdie <rpurdie-Fm38FmjxZ/[email protected]>
 
 ---------------------------
 
-What:	Wireless extensions over netlink (CONFIG_NET_WIRELESS_RTNETLINK)
-When:	with the merge of wireless-dev, 2.6.22 or later
-Why:	The option/code is
-	 * not enabled on most kernels
-	 * not required by any userspace tools (except an experimental one,
-	   and even there only for some parts, others use ioctl)
-	 * pointless since wext is no longer evolving and the ioctl
-	   interface needs to be kept
-Who:	Johannes Berg <[email protected]>
-
----------------------------
-
 What:	i8xx_tco watchdog driver
 When:	in 2.6.22
 Why:	the i8xx_tco watchdog driver has been replaced by the iTCO_wdt
include/net/iw_handler.h +0 -10
index 8a83018..909ca87 100644
@@ -440,16 +440,6 @@ extern int dev_get_wireless_info(char * buffer, char **start, off_t offset,
 /* Handle IOCTLs, called in net/core/dev.c */
 extern int wireless_process_ioctl(struct ifreq *ifr, unsigned int cmd);
 
-/* Handle RtNetlink requests, called in net/core/rtnetlink.c */
-extern int wireless_rtnetlink_set(struct net_device *	dev,
-				  char *		data,
-				  int			len);
-extern int wireless_rtnetlink_get(struct net_device *	dev,
-				  char *		data,
-				  int			len,
-				  char **		p_buf,
-				  int *			p_len);
-
 /* Second : functions that may be called by driver modules */
 
 /* Send a single event to user space */
net/core/rtnetlink.c +0 -31
index 75cea8e..4fe0f4b 100644
@@ -51,10 +51,6 @@
 #include <net/pkt_sched.h>
 #include <net/fib_rules.h>
 #include <net/rtnetlink.h>
-#ifdef CONFIG_NET_WIRELESS_RTNETLINK
-#include <linux/wireless.h>
-#include <net/iw_handler.h>
-#endif	/* CONFIG_NET_WIRELESS_RTNETLINK */
 
 struct rtnl_link
 {
@@ -684,17 +680,6 @@ static int rtnl_setlink(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg)
 		modified = 1;
 	}
 
-#ifdef CONFIG_NET_WIRELESS_RTNETLINK
-	if (tb[IFLA_WIRELESS]) {
-		/* Call Wireless Extensions.
-		 * Various stuff checked in there... */
-		err = wireless_rtnetlink_set(dev, nla_data(tb[IFLA_WIRELESS]),
-					     nla_len(tb[IFLA_WIRELESS]));
-		if (err < 0)
-			goto errout_dev;
-	}
-#endif	/* CONFIG_NET_WIRELESS_RTNETLINK */
-
 	if (tb[IFLA_BROADCAST]) {
 		nla_memcpy(dev->broadcast, tb[IFLA_BROADCAST], dev->addr_len);
 		send_addr_notify = 1;
@@ -758,22 +743,6 @@ static int rtnl_getlink(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg)
 	} else
 		return -EINVAL;
 
-
-#ifdef CONFIG_NET_WIRELESS_RTNETLINK
-	if (tb[IFLA_WIRELESS]) {
-		/* Call Wireless Extensions. We need to know the size before
-		 * we can alloc. Various stuff checked in there... */
-		err = wireless_rtnetlink_get(dev, nla_data(tb[IFLA_WIRELESS]),
-					     nla_len(tb[IFLA_WIRELESS]),
-					     &iw_buf, &iw_buf_len);
-		if (err < 0)
-			goto errout;
-
-		/* Payload is at an offset in buffer */
-		iw = iw_buf + IW_EV_POINT_OFF;
-	}
-#endif	/* CONFIG_NET_WIRELESS_RTNETLINK */
-
 	nskb = nlmsg_new(if_nlmsg_size(iw_buf_len), GFP_KERNEL);
 	if (nskb == NULL) {
 		err = -ENOBUFS;
net/core/wireless.c +0 -735

751 lines not on this page · raw message

net/wireless/Kconfig +0 -10
index 1863c0b..a228d56 100644
@@ -14,13 +14,3 @@ config WIRELESS_EXT
 
 	  Say N (if you can) unless you know you need wireless
 	  extensions for external modules.
-
-config NET_WIRELESS_RTNETLINK
-	bool "Wireless Extension API over RtNetlink"
-	depends on WIRELESS_EXT
-	---help---
-	  Support the Wireless Extension API over the RtNetlink socket
-	  in addition to the traditional ioctl interface (selected above).
-
-	  For now, few tools use this facility, but it might grow in the
-	  future. The only downside is that it adds 4.5 kB to your kernel.
Signature · 5 lines
1.5.0.6

-- 
John W. Linville
[email protected]
maintainer
#7 lore raw

PATCH 1/1 cfg80211: update comment for locking

In reply to John W. Linville

This patch adds a comment that was part of my rtnl locking patch for cfg80211 but which I forgot for the merge.

---
 include/net/cfg80211.h |    4 ++++
 1 file changed, 4 insertions(+)
include/net/cfg80211.h +4 -0
@@ -23,6 +23,10 @@ struct wiphy;
  * All callbacks except where otherwise noted should return 0
  * on success or a negative error code.
  *
+ * All operations are currently invoked under rtnl for consistency with the
+ * wireless extensions but this is subject to reevaluation as soon as this
+ * code is used more widely and we have a first user without wext.
+ *
  * @add_virtual_intf: create a new virtual interface with the given name
  *
  * @del_virtual_intf: remove the virtual interface determined by ifindex.
#8 lore raw

Re: [PATCH] cfg80211: new wireless config infrastructure

In reply to John W. Linville

Hi there,

Quoted 50 lines · John W. Linville

From: Johannes Berg <[email protected]>

net/wireless/core.c new file +46 -0
@@ -0,0 +1,209 @@
+/*
+ * This is the linux wireless configuration interface.
+ *
+ * Copyright 2006, 2007		Johannes Berg <[email protected]>
+ */
+
+#include <linux/if.h>
+#include <linux/module.h>
+#include <linux/err.h>
+#include <linux/mutex.h>
+#include <linux/list.h>
+#include <linux/nl80211.h>
+#include <linux/debugfs.h>
+#include <linux/notifier.h>
+#include <linux/device.h>
+#include <net/genetlink.h>
+#include <net/cfg80211.h>
+#include <net/wireless.h>
+#include "core.h"
+#include "sysfs.h"
+
+/* name for sysfs, %d is appended */
+#define PHY_NAME "phy"
+
+MODULE_AUTHOR("Johannes Berg");
+MODULE_LICENSE("GPL");
+MODULE_DESCRIPTION("wireless configuration support");
+
+/* RCU might be appropriate here since we usually
+ * only read the list, and that can happen quite
+ * often because we need to do it for each command */
+LIST_HEAD(cfg80211_drv_list);
+DEFINE_MUTEX(cfg80211_drv_mutex);
+static int wiphy_counter;
+
+/* for debugfs */
+static struct dentry *ieee80211_debugfs_dir;
+
+/* exported functions */
+
+struct wiphy *wiphy_new(struct cfg80211_ops *ops, int sizeof_priv)
+{
+	struct cfg80211_registered_device *drv;
+	int alloc_size;
+
+	alloc_size = sizeof(*drv) + sizeof_priv;

net/wireless/core.c line 56

Quoted 10 lines
net/wireless/core.c new file +10 -0
+
+	drv = kzalloc(alloc_size, GFP_KERNEL);
+	if (!drv)
+		return NULL;
+
+	drv->ops = ops;
+
+	mutex_lock(&cfg80211_drv_mutex);
+
+	if (unlikely(wiphy_counter<0)) {
		mutex_unlock(&cfg80211_drv_mutex);

net/wireless/core.c line 69

Quoted 13 lines
net/wireless/core.c new file +13 -0
+		/* ugh, wrapped! */
+		kfree(drv);
+		return NULL;
+	}
+	drv->idx = wiphy_counter;
+
+	/* give it a proper name */
+	snprintf(drv->wiphy.dev.bus_id, BUS_ID_SIZE,
+		 PHY_NAME "%d", drv->idx);
+
+	/* now increase counter for the next time */
+	wiphy_counter++;
+	mutex_unlock(&cfg80211_drv_mutex);

Since drv and its contents are not visible to anyone yet, I suggest the following code flow for that:

mutex_lock(&cfg80211_drv_mutex);

drv->idx = wiphy_counter;

/* increase counter for the next time, if id didn't wrap */ if (drv->idx >= 0)

	wiphy_counter++;

mutex_unlock(&cfg80211_drv_mutex);

if (drv->idx < 0) {
	kfree(drv);
	return NULL;
}

/* give it a proper name */
snprintf(drv->wiphy.dev.bus_id, BUS_ID_SIZE,

	 PHY_NAME "%d", drv->idx);

[enqueue to all lists here]

Rest looks good so far.

Regards

Ingo Oeser

maintainer
#9 lore raw

PATCH 1/1 cfg80211: fix locking in wiphy_new

This patch fixes the locking in wiphy new. Ingo Oeser <[email protected]> noticed that locking in the error case was wrong and also suggested this fix.

---
As with other patches, this is diffed against wireless-dev but applies against net-2.6.22 (or is that net-2.6 now?) with some offset (but no fuzz.)

---
 net/wireless/core.c |   16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)
net/wireless/core.c +10 -6
@@ -189,21 +189,25 @@ struct wiphy *wiphy_new(struct cfg80211_
 
 	mutex_lock(&cfg80211_drv_mutex);
 
-	if (unlikely(wiphy_counter<0)) {
+	drv->idx = wiphy_counter;
+
+	/* now increase counter for the next device unless
+	 * it has wrapped previously */
+	if (wiphy_counter >= 0)
+		wiphy_counter++;
+
+	mutex_unlock(&cfg80211_drv_mutex);
+
+	if (unlikely(drv->idx < 0)) {
 		/* ugh, wrapped! */
 		kfree(drv);
 		return NULL;
 	}
-	drv->idx = wiphy_counter;
 
 	/* give it a proper name */
 	snprintf(drv->wiphy.dev.bus_id, BUS_ID_SIZE,
 		 PHY_NAME "%d", drv->idx);
 
-	/* now increase counter for the next time */
-	wiphy_counter++;
-	mutex_unlock(&cfg80211_drv_mutex);
-
 	mutex_init(&drv->mtx);
 	mutex_init(&drv->devlist_mtx);
 	INIT_LIST_HEAD(&drv->netdev_list);
#10 lore raw

Re: [PATCH] refactor wireless Kconfig

In reply to a message not in the archive

drivers/net/wireless/Kconfig line 14

Quoted 4 lines · On Mon, 23 Apr 2007 14:34:43 -0400 "John W. Linville"…
drivers/net/wireless/Kconfig +2 -2
-comment "Obsolete Wireless cards support (pre-802.11)"
-	depends on NET_RADIO && (INET || ISA || PCMCIA)
+	  This option does not affect the kernel build, it only
+	  let's you choose drivers.
          ^^^^^

drivers/net/wireless/Kconfig config PCMCIA_NETWAVE · line 115

Quoted 8 lines
drivers/net/wireless/Kconfig +8 -0
+config WLAN_80211
+	bool "Wireless LAN (IEEE 802.11)"
+	depends on NETDEVICES
+	---help---
+	  Say Y if you have any 802.11 wireless LAN hardware.
+
+	  This option does not affect the kernel build, it only
+	  let's you choose drivers.
          ^^^^^

--
Ciao
Stefano

#11 lore raw

PATCH 1/1 drivers/net/wireless/Kconfig: correct minor typo

Correct minor typo in drivers/net/wireless/Kconfig identified by Stefano Brivio <stefano.brivio-hl5o88x/[email protected]>.

---

drivers/net/wireless/Kconfig +2 -2
index 880c628..4426841 100644
@@ -11,7 +11,7 @@ config WLAN_PRE80211
 	  Say Y if you have any pre-802.11 wireless LAN hardware.
 
 	  This option does not affect the kernel build, it only
-	  let's you choose drivers.
+	  lets you choose drivers.
 
 config STRIP
 	tristate "STRIP (Metricom starmode radio IP)"
@@ -112,7 +112,7 @@ config WLAN_80211
 	  Say Y if you have any 802.11 wireless LAN hardware.
 
 	  This option does not affect the kernel build, it only
-	  let's you choose drivers.
+	  lets you choose drivers.
 
 config PCMCIA_RAYCS
 	tristate "Aviator/Raytheon 2.4MHz wireless support"
Signature · 2 lines
John W. Linville
[email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]