aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2007-09-20 13:09:35 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:52:14 -0400
commit556829657397b9b05baec6691ead4e22ee8d1567 (patch)
tree44242431553e5e22c0bceaab7a06d9d7bf0dd2f6 /include
parent0800f170263d19b882e519441156c5f6ed190fc1 (diff)
[NL80211]: add netlink interface to cfg80211
Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/nl80211.h97
-rw-r--r--include/net/cfg80211.h11
-rw-r--r--include/net/iw_handler.h8
3 files changed, 109 insertions, 7 deletions
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h
index 9a30ba2ca75e..538ee1dd3d0a 100644
--- a/include/linux/nl80211.h
+++ b/include/linux/nl80211.h
@@ -7,7 +7,97 @@
7 */ 7 */
8 8
9/** 9/**
10 * enum nl80211_commands - supported nl80211 commands
11 *
12 * @NL80211_CMD_UNSPEC: unspecified command to catch errors
13 *
14 * @NL80211_CMD_GET_WIPHY: request information about a wiphy or dump request
15 * to get a list of all present wiphys.
16 * @NL80211_CMD_SET_WIPHY: set wiphy name, needs %NL80211_ATTR_WIPHY and
17 * %NL80211_ATTR_WIPHY_NAME.
18 * @NL80211_CMD_NEW_WIPHY: Newly created wiphy, response to get request
19 * or rename notification. Has attributes %NL80211_ATTR_WIPHY and
20 * %NL80211_ATTR_WIPHY_NAME.
21 * @NL80211_CMD_DEL_WIPHY: Wiphy deleted. Has attributes
22 * %NL80211_ATTR_WIPHY and %NL80211_ATTR_WIPHY_NAME.
23 *
24 * @NL80211_CMD_GET_INTERFACE: Request an interface's configuration;
25 * either a dump request on a %NL80211_ATTR_WIPHY or a specific get
26 * on an %NL80211_ATTR_IFINDEX is supported.
27 * @NL80211_CMD_SET_INTERFACE: Set type of a virtual interface, requires
28 * %NL80211_ATTR_IFINDEX and %NL80211_ATTR_IFTYPE.
29 * @NL80211_CMD_NEW_INTERFACE: Newly created virtual interface or response
30 * to %NL80211_CMD_GET_INTERFACE. Has %NL80211_ATTR_IFINDEX,
31 * %NL80211_ATTR_WIPHY and %NL80211_ATTR_IFTYPE attributes. Can also
32 * be sent from userspace to request creation of a new virtual interface,
33 * then requires attributes %NL80211_ATTR_WIPHY, %NL80211_ATTR_IFTYPE and
34 * %NL80211_ATTR_IFNAME.
35 * @NL80211_CMD_DEL_INTERFACE: Virtual interface was deleted, has attributes
36 * %NL80211_ATTR_IFINDEX and %NL80211_ATTR_WIPHY. Can also be sent from
37 * userspace to request deletion of a virtual interface, then requires
38 * attribute %NL80211_ATTR_IFINDEX.
39 *
40 * @NL80211_CMD_MAX: highest used command number
41 * @__NL80211_CMD_AFTER_LAST: internal use
42 */
43enum nl80211_commands {
44/* don't change the order or add anything inbetween, this is ABI! */
45 NL80211_CMD_UNSPEC,
46
47 NL80211_CMD_GET_WIPHY, /* can dump */
48 NL80211_CMD_SET_WIPHY,
49 NL80211_CMD_NEW_WIPHY,
50 NL80211_CMD_DEL_WIPHY,
51
52 NL80211_CMD_GET_INTERFACE, /* can dump */
53 NL80211_CMD_SET_INTERFACE,
54 NL80211_CMD_NEW_INTERFACE,
55 NL80211_CMD_DEL_INTERFACE,
56
57 /* add commands here */
58
59 /* used to define NL80211_CMD_MAX below */
60 __NL80211_CMD_AFTER_LAST,
61 NL80211_CMD_MAX = __NL80211_CMD_AFTER_LAST - 1
62};
63
64
65/**
66 * enum nl80211_attrs - nl80211 netlink attributes
67 *
68 * @NL80211_ATTR_UNSPEC: unspecified attribute to catch errors
69 *
70 * @NL80211_ATTR_WIPHY: index of wiphy to operate on, cf.
71 * /sys/class/ieee80211/<phyname>/index
72 * @NL80211_ATTR_WIPHY_NAME: wiphy name (used for renaming)
73 *
74 * @NL80211_ATTR_IFINDEX: network interface index of the device to operate on
75 * @NL80211_ATTR_IFNAME: network interface name
76 * @NL80211_ATTR_IFTYPE: type of virtual interface, see &enum nl80211_iftype
77 *
78 * @NL80211_ATTR_MAX: highest attribute number currently defined
79 * @__NL80211_ATTR_AFTER_LAST: internal use
80 */
81enum nl80211_attrs {
82/* don't change the order or add anything inbetween, this is ABI! */
83 NL80211_ATTR_UNSPEC,
84
85 NL80211_ATTR_WIPHY,
86 NL80211_ATTR_WIPHY_NAME,
87
88 NL80211_ATTR_IFINDEX,
89 NL80211_ATTR_IFNAME,
90 NL80211_ATTR_IFTYPE,
91
92 /* add attributes here, update the policy in nl80211.c */
93
94 __NL80211_ATTR_AFTER_LAST,
95 NL80211_ATTR_MAX = __NL80211_ATTR_AFTER_LAST - 1
96};
97
98/**
10 * enum nl80211_iftype - (virtual) interface types 99 * enum nl80211_iftype - (virtual) interface types
100 *
11 * @NL80211_IFTYPE_UNSPECIFIED: unspecified type, driver decides 101 * @NL80211_IFTYPE_UNSPECIFIED: unspecified type, driver decides
12 * @NL80211_IFTYPE_ADHOC: independent BSS member 102 * @NL80211_IFTYPE_ADHOC: independent BSS member
13 * @NL80211_IFTYPE_STATION: managed BSS member 103 * @NL80211_IFTYPE_STATION: managed BSS member
@@ -15,9 +105,10 @@
15 * @NL80211_IFTYPE_AP_VLAN: VLAN interface for access points 105 * @NL80211_IFTYPE_AP_VLAN: VLAN interface for access points
16 * @NL80211_IFTYPE_WDS: wireless distribution interface 106 * @NL80211_IFTYPE_WDS: wireless distribution interface
17 * @NL80211_IFTYPE_MONITOR: monitor interface receiving all frames 107 * @NL80211_IFTYPE_MONITOR: monitor interface receiving all frames
108 * @NL80211_IFTYPE_MAX: highest interface type number currently defined
18 * @__NL80211_IFTYPE_AFTER_LAST: internal use 109 * @__NL80211_IFTYPE_AFTER_LAST: internal use
19 * 110 *
20 * These values are used with the NL80211_ATTR_IFTYPE 111 * These values are used with the %NL80211_ATTR_IFTYPE
21 * to set the type of an interface. 112 * to set the type of an interface.
22 * 113 *
23 */ 114 */
@@ -31,8 +122,8 @@ enum nl80211_iftype {
31 NL80211_IFTYPE_MONITOR, 122 NL80211_IFTYPE_MONITOR,
32 123
33 /* keep last */ 124 /* keep last */
34 __NL80211_IFTYPE_AFTER_LAST 125 __NL80211_IFTYPE_AFTER_LAST,
126 NL80211_IFTYPE_MAX = __NL80211_IFTYPE_AFTER_LAST - 1
35}; 127};
36#define NL80211_IFTYPE_MAX (__NL80211_IFTYPE_AFTER_LAST - 1)
37 128
38#endif /* __LINUX_NL80211_H */ 129#endif /* __LINUX_NL80211_H */
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 7edaef6b29d6..d30960e1755c 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -3,15 +3,15 @@
3 3
4#include <linux/netlink.h> 4#include <linux/netlink.h>
5#include <linux/skbuff.h> 5#include <linux/skbuff.h>
6#include <linux/nl80211.h>
6#include <net/genetlink.h> 7#include <net/genetlink.h>
7 8
8/* 9/*
9 * 802.11 configuration in-kernel interface 10 * 802.11 configuration in-kernel interface
10 * 11 *
11 * Copyright 2006 Johannes Berg <johannes@sipsolutions.net> 12 * Copyright 2006, 2007 Johannes Berg <johannes@sipsolutions.net>
12 */ 13 */
13 14
14
15/* Radiotap header iteration 15/* Radiotap header iteration
16 * implemented in net/wireless/radiotap.c 16 * implemented in net/wireless/radiotap.c
17 * docs in Documentation/networking/radiotap-headers.txt 17 * docs in Documentation/networking/radiotap-headers.txt
@@ -68,11 +68,16 @@ struct wiphy;
68 * @add_virtual_intf: create a new virtual interface with the given name 68 * @add_virtual_intf: create a new virtual interface with the given name
69 * 69 *
70 * @del_virtual_intf: remove the virtual interface determined by ifindex. 70 * @del_virtual_intf: remove the virtual interface determined by ifindex.
71 *
72 * @change_virtual_intf: change type of virtual interface
73 *
71 */ 74 */
72struct cfg80211_ops { 75struct cfg80211_ops {
73 int (*add_virtual_intf)(struct wiphy *wiphy, char *name, 76 int (*add_virtual_intf)(struct wiphy *wiphy, char *name,
74 unsigned int type); 77 enum nl80211_iftype type);
75 int (*del_virtual_intf)(struct wiphy *wiphy, int ifindex); 78 int (*del_virtual_intf)(struct wiphy *wiphy, int ifindex);
79 int (*change_virtual_intf)(struct wiphy *wiphy, int ifindex,
80 enum nl80211_iftype type);
76}; 81};
77 82
78#endif /* __NET_CFG80211_H */ 83#endif /* __NET_CFG80211_H */
diff --git a/include/net/iw_handler.h b/include/net/iw_handler.h
index f23d07ca7c59..369d50e08b99 100644
--- a/include/net/iw_handler.h
+++ b/include/net/iw_handler.h
@@ -431,7 +431,13 @@ struct iw_public_data {
431 * Those may be called only within the kernel. 431 * Those may be called only within the kernel.
432 */ 432 */
433 433
434/* functions that may be called by driver modules */ 434/* First : function strictly used inside the kernel */
435
436/* Handle /proc/net/wireless, called in net/code/dev.c */
437extern int dev_get_wireless_info(char * buffer, char **start, off_t offset,
438 int length);
439
440/* Second : functions that may be called by driver modules */
435 441
436/* Send a single event to user space */ 442/* Send a single event to user space */
437extern void wireless_send_event(struct net_device * dev, 443extern void wireless_send_event(struct net_device * dev,