aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/core.h
diff options
context:
space:
mode:
Diffstat (limited to 'net/wireless/core.h')
-rw-r--r--net/wireless/core.h42
1 files changed, 34 insertions, 8 deletions
diff --git a/net/wireless/core.h b/net/wireless/core.h
index 0a592e4295f..bfa340c7abb 100644
--- a/net/wireless/core.h
+++ b/net/wireless/core.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * Wireless configuration interface internals. 2 * Wireless configuration interface internals.
3 * 3 *
4 * Copyright 2006, 2007 Johannes Berg <johannes@sipsolutions.net> 4 * Copyright 2006-2009 Johannes Berg <johannes@sipsolutions.net>
5 */ 5 */
6#ifndef __NET_WIRELESS_CORE_H 6#ifndef __NET_WIRELESS_CORE_H
7#define __NET_WIRELESS_CORE_H 7#define __NET_WIRELESS_CORE_H
@@ -10,14 +10,15 @@
10#include <linux/netdevice.h> 10#include <linux/netdevice.h>
11#include <linux/kref.h> 11#include <linux/kref.h>
12#include <linux/rbtree.h> 12#include <linux/rbtree.h>
13#include <linux/mutex.h> 13#include <linux/debugfs.h>
14#include <linux/rfkill.h>
15#include <linux/workqueue.h>
14#include <net/genetlink.h> 16#include <net/genetlink.h>
15#include <net/wireless.h>
16#include <net/cfg80211.h> 17#include <net/cfg80211.h>
17#include "reg.h" 18#include "reg.h"
18 19
19struct cfg80211_registered_device { 20struct cfg80211_registered_device {
20 struct cfg80211_ops *ops; 21 const struct cfg80211_ops *ops;
21 struct list_head list; 22 struct list_head list;
22 /* we hold this mutex during any call so that 23 /* we hold this mutex during any call so that
23 * we cannot do multiple calls at once, and also 24 * we cannot do multiple calls at once, and also
@@ -25,6 +26,11 @@ struct cfg80211_registered_device {
25 * any call is in progress */ 26 * any call is in progress */
26 struct mutex mtx; 27 struct mutex mtx;
27 28
29 /* rfkill support */
30 struct rfkill_ops rfkill_ops;
31 struct rfkill *rfkill;
32 struct work_struct rfkill_sync;
33
28 /* ISO / IEC 3166 alpha2 for which this device is receiving 34 /* ISO / IEC 3166 alpha2 for which this device is receiving
29 * country IEs on, this can help disregard country IEs from APs 35 * country IEs on, this can help disregard country IEs from APs
30 * on the same alpha2 quickly. The alpha2 may differ from 36 * on the same alpha2 quickly. The alpha2 may differ from
@@ -52,6 +58,17 @@ struct cfg80211_registered_device {
52 struct cfg80211_scan_request *scan_req; /* protected by RTNL */ 58 struct cfg80211_scan_request *scan_req; /* protected by RTNL */
53 unsigned long suspend_at; 59 unsigned long suspend_at;
54 60
61#ifdef CONFIG_CFG80211_DEBUGFS
62 /* Debugfs entries */
63 struct wiphy_debugfsdentries {
64 struct dentry *rts_threshold;
65 struct dentry *fragmentation_threshold;
66 struct dentry *short_retry_limit;
67 struct dentry *long_retry_limit;
68 struct dentry *ht40allow_map;
69 } debugfs;
70#endif
71
55 /* must be last because of the way we do wiphy_priv(), 72 /* must be last because of the way we do wiphy_priv(),
56 * and it should at least be aligned to NETDEV_ALIGN */ 73 * and it should at least be aligned to NETDEV_ALIGN */
57 struct wiphy wiphy __attribute__((__aligned__(NETDEV_ALIGN))); 74 struct wiphy wiphy __attribute__((__aligned__(NETDEV_ALIGN)));
@@ -74,10 +91,7 @@ bool wiphy_idx_valid(int wiphy_idx)
74extern struct mutex cfg80211_mutex; 91extern struct mutex cfg80211_mutex;
75extern struct list_head cfg80211_drv_list; 92extern struct list_head cfg80211_drv_list;
76 93
77static inline void assert_cfg80211_lock(void) 94#define assert_cfg80211_lock() WARN_ON(!mutex_is_locked(&cfg80211_mutex))
78{
79 WARN_ON(!mutex_is_locked(&cfg80211_mutex));
80}
81 95
82/* 96/*
83 * You can use this to mark a wiphy_idx as not having an associated wiphy. 97 * You can use this to mark a wiphy_idx as not having an associated wiphy.
@@ -148,4 +162,16 @@ void cfg80211_bss_expire(struct cfg80211_registered_device *dev);
148void cfg80211_bss_age(struct cfg80211_registered_device *dev, 162void cfg80211_bss_age(struct cfg80211_registered_device *dev,
149 unsigned long age_secs); 163 unsigned long age_secs);
150 164
165/* IBSS */
166int cfg80211_join_ibss(struct cfg80211_registered_device *rdev,
167 struct net_device *dev,
168 struct cfg80211_ibss_params *params);
169void cfg80211_clear_ibss(struct net_device *dev, bool nowext);
170int cfg80211_leave_ibss(struct cfg80211_registered_device *rdev,
171 struct net_device *dev, bool nowext);
172
173/* internal helpers */
174int cfg80211_validate_key_settings(struct key_params *params, int key_idx,
175 const u8 *mac_addr);
176
151#endif /* __NET_WIRELESS_CORE_H */ 177#endif /* __NET_WIRELESS_CORE_H */