aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2x00lib.h
diff options
context:
space:
mode:
authorIvo van Doorn <IvDoorn@gmail.com>2007-09-25 20:57:13 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:51:39 -0400
commit95ea36275f3c9a1d3d04c217b4b576c657c4e70e (patch)
tree55477b946a46aa871a087857a1dc698d74fe79d2 /drivers/net/wireless/rt2x00/rt2x00lib.h
parentb481de9ca074528fe8c429604e2777db8b89806a (diff)
[RT2x00]: add driver for Ralink wireless hardware
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00lib.h')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00lib.h125
1 files changed, 125 insertions, 0 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00lib.h b/drivers/net/wireless/rt2x00/rt2x00lib.h
new file mode 100644
index 000000000000..3324090a96a7
--- /dev/null
+++ b/drivers/net/wireless/rt2x00/rt2x00lib.h
@@ -0,0 +1,125 @@
1/*
2 Copyright (C) 2004 - 2007 rt2x00 SourceForge Project
3 <http://rt2x00.serialmonkey.com>
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the
17 Free Software Foundation, Inc.,
18 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 */
20
21/*
22 Module: rt2x00lib
23 Abstract: Data structures and definitions for the rt2x00lib module.
24 */
25
26#ifndef RT2X00LIB_H
27#define RT2X00LIB_H
28
29/*
30 * Interval defines
31 */
32#define LINK_TUNE_INTERVAL ( round_jiffies(HZ) )
33#define RFKILL_POLL_INTERVAL ( HZ / 4 )
34
35/*
36 * Radio control handlers.
37 */
38int rt2x00lib_enable_radio(struct rt2x00_dev *rt2x00dev);
39void rt2x00lib_disable_radio(struct rt2x00_dev *rt2x00dev);
40void rt2x00lib_toggle_rx(struct rt2x00_dev *rt2x00dev, int enable);
41void rt2x00lib_reset_link_tuner(struct rt2x00_dev *rt2x00dev);
42
43/*
44 * Initialization handlers.
45 */
46int rt2x00lib_initialize(struct rt2x00_dev *rt2x00dev);
47void rt2x00lib_uninitialize(struct rt2x00_dev *rt2x00dev);
48
49/*
50 * Configuration handlers.
51 */
52void rt2x00lib_config_mac_addr(struct rt2x00_dev *rt2x00dev, u8 *mac);
53void rt2x00lib_config_bssid(struct rt2x00_dev *rt2x00dev, u8 *bssid);
54void rt2x00lib_config_packet_filter(struct rt2x00_dev *rt2x00dev, int filter);
55void rt2x00lib_config_type(struct rt2x00_dev *rt2x00dev, int type);
56void rt2x00lib_config(struct rt2x00_dev *rt2x00dev, struct ieee80211_conf *conf);
57
58/*
59 * Firmware handlers.
60 */
61#ifdef CONFIG_RT2X00_LIB_FIRMWARE
62int rt2x00lib_load_firmware(struct rt2x00_dev *rt2x00dev);
63void rt2x00lib_free_firmware(struct rt2x00_dev *rt2x00dev);
64#else
65static inline int rt2x00lib_load_firmware(struct rt2x00_dev *rt2x00dev)
66{
67 return 0;
68}
69static inline void rt2x00lib_free_firmware(struct rt2x00_dev *rt2x00dev)
70{
71}
72#endif /* CONFIG_RT2X00_LIB_FIRMWARE */
73
74/*
75 * Debugfs handlers.
76 */
77#ifdef CONFIG_RT2X00_LIB_DEBUGFS
78void rt2x00debug_register(struct rt2x00_dev *rt2x00dev);
79void rt2x00debug_deregister(struct rt2x00_dev *rt2x00dev);
80#else
81static inline void rt2x00debug_register(struct rt2x00_dev *rt2x00dev)
82{
83}
84
85static inline void rt2x00debug_deregister(struct rt2x00_dev *rt2x00dev)
86{
87}
88#endif /* CONFIG_RT2X00_LIB_DEBUGFS */
89
90/*
91 * RFkill handlers.
92 */
93#ifdef CONFIG_RT2X00_LIB_RFKILL
94int rt2x00rfkill_register(struct rt2x00_dev *rt2x00dev);
95void rt2x00rfkill_unregister(struct rt2x00_dev *rt2x00dev);
96int rt2x00rfkill_allocate(struct rt2x00_dev *rt2x00dev);
97void rt2x00rfkill_free(struct rt2x00_dev *rt2x00dev);
98#else
99static inline int rt2x00rfkill_register(struct rt2x00_dev *rt2x00dev)
100{
101 /*
102 * Force enable this flag, this will assure that
103 * devices with a hardware button but without rfkill support
104 * can still use their hardware.
105 */
106 __set_bit(DEVICE_ENABLED_RADIO_HW, &rt2x00dev->flags);
107
108 return 0;
109}
110
111static inline void rt2x00rfkill_unregister(struct rt2x00_dev *rt2x00dev)
112{
113}
114
115static inline int rt2x00rfkill_allocate(struct rt2x00_dev *rt2x00dev)
116{
117 return 0;
118}
119
120static inline void rt2x00rfkill_free(struct rt2x00_dev *rt2x00dev)
121{
122}
123#endif /* CONFIG_RT2X00_LIB_RFKILL */
124
125#endif /* RT2X00LIB_H */