2 Copyright (C) 2004 - 2007 rt2x00 SourceForge Project
3 <http://rt2x00.serialmonkey.com>
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.
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.
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.
23 Abstract: Data structures and definitions for the rt2x00lib module.
32 #define LINK_TUNE_INTERVAL ( round_jiffies(HZ) )
33 #define RFKILL_POLL_INTERVAL ( HZ / 4 )
36 * Radio control handlers.
38 int rt2x00lib_enable_radio(struct rt2x00_dev *rt2x00dev);
39 void rt2x00lib_disable_radio(struct rt2x00_dev *rt2x00dev);
40 void rt2x00lib_toggle_rx(struct rt2x00_dev *rt2x00dev, int enable);
41 void rt2x00lib_reset_link_tuner(struct rt2x00_dev *rt2x00dev);
44 * Initialization handlers.
46 int rt2x00lib_initialize(struct rt2x00_dev *rt2x00dev);
47 void rt2x00lib_uninitialize(struct rt2x00_dev *rt2x00dev);
50 * Configuration handlers.
52 void rt2x00lib_config_mac_addr(struct rt2x00_dev *rt2x00dev, u8 *mac);
53 void rt2x00lib_config_bssid(struct rt2x00_dev *rt2x00dev, u8 *bssid);
54 void rt2x00lib_config_packet_filter(struct rt2x00_dev *rt2x00dev, int filter);
55 void rt2x00lib_config_type(struct rt2x00_dev *rt2x00dev, int type);
56 void rt2x00lib_config(struct rt2x00_dev *rt2x00dev, struct ieee80211_conf *conf);
61 #ifdef CONFIG_RT2X00_LIB_FIRMWARE
62 int rt2x00lib_load_firmware(struct rt2x00_dev *rt2x00dev);
63 void rt2x00lib_free_firmware(struct rt2x00_dev *rt2x00dev);
65 static inline int rt2x00lib_load_firmware(struct rt2x00_dev *rt2x00dev)
69 static inline void rt2x00lib_free_firmware(struct rt2x00_dev *rt2x00dev)
72 #endif /* CONFIG_RT2X00_LIB_FIRMWARE */
77 #ifdef CONFIG_RT2X00_LIB_DEBUGFS
78 void rt2x00debug_register(struct rt2x00_dev *rt2x00dev);
79 void rt2x00debug_deregister(struct rt2x00_dev *rt2x00dev);
81 static inline void rt2x00debug_register(struct rt2x00_dev *rt2x00dev)
85 static inline void rt2x00debug_deregister(struct rt2x00_dev *rt2x00dev)
88 #endif /* CONFIG_RT2X00_LIB_DEBUGFS */
93 #ifdef CONFIG_RT2X00_LIB_RFKILL
94 int rt2x00rfkill_register(struct rt2x00_dev *rt2x00dev);
95 void rt2x00rfkill_unregister(struct rt2x00_dev *rt2x00dev);
96 int rt2x00rfkill_allocate(struct rt2x00_dev *rt2x00dev);
97 void rt2x00rfkill_free(struct rt2x00_dev *rt2x00dev);
99 static inline int rt2x00rfkill_register(struct rt2x00_dev *rt2x00dev)
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.
106 __set_bit(DEVICE_ENABLED_RADIO_HW, &rt2x00dev->flags);
111 static inline void rt2x00rfkill_unregister(struct rt2x00_dev *rt2x00dev)
115 static inline int rt2x00rfkill_allocate(struct rt2x00_dev *rt2x00dev)
120 static inline void rt2x00rfkill_free(struct rt2x00_dev *rt2x00dev)
123 #endif /* CONFIG_RT2X00_LIB_RFKILL */
125 #endif /* RT2X00LIB_H */