aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/core.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2007-04-23 15:20:05 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 01:29:41 -0400
commit704232c2718c9d4b3375ec15a14fc0397970c449 (patch)
tree6ffaa759ebaee36c4242bff6b7630f148efcaea3 /net/wireless/core.h
parent2a5e1c0eb9efe26eed1dd072fe08de5797a7efd5 (diff)
[WIRELESS] cfg80211: New wireless config infrastructure.
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. 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 'net/wireless/core.h')
-rw-r--r--net/wireless/core.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/net/wireless/core.h b/net/wireless/core.h
new file mode 100644
index 000000000000..158db1edb92a
--- /dev/null
+++ b/net/wireless/core.h
@@ -0,0 +1,49 @@
1/*
2 * Wireless configuration interface internals.
3 *
4 * Copyright 2006, 2007 Johannes Berg <johannes@sipsolutions.net>
5 */
6#ifndef __NET_WIRELESS_CORE_H
7#define __NET_WIRELESS_CORE_H
8#include <linux/mutex.h>
9#include <linux/list.h>
10#include <linux/netdevice.h>
11#include <net/genetlink.h>
12#include <net/wireless.h>
13#include <net/cfg80211.h>
14
15struct cfg80211_registered_device {
16 struct cfg80211_ops *ops;
17 struct list_head list;
18 /* we hold this mutex during any call so that
19 * we cannot do multiple calls at once, and also
20 * to avoid the deregister call to proceed while
21 * any call is in progress */
22 struct mutex mtx;
23
24 /* wiphy index, internal only */
25 int idx;
26
27 /* associate netdev list */
28 struct mutex devlist_mtx;
29 struct list_head netdev_list;
30
31 /* must be last because of the way we do wiphy_priv(),
32 * and it should at least be aligned to NETDEV_ALIGN */
33 struct wiphy wiphy __attribute__((__aligned__(NETDEV_ALIGN)));
34};
35
36static inline
37struct cfg80211_registered_device *wiphy_to_dev(struct wiphy *wiphy)
38{
39 BUG_ON(!wiphy);
40 return container_of(wiphy, struct cfg80211_registered_device, wiphy);
41}
42
43extern struct mutex cfg80211_drv_mutex;
44extern struct list_head cfg80211_drv_list;
45
46/* free object */
47extern void cfg80211_dev_free(struct cfg80211_registered_device *drv);
48
49#endif /* __NET_WIRELESS_CORE_H */