blob: da497e01bbb1aad6d34fd68f4150dbe9c49a7a4f [file] [log] [blame]
Michael Buesch8e9f7522007-09-27 21:35:34 +02001#ifndef B43_RFKILL_H_
2#define B43_RFKILL_H_
3
4struct b43_wldev;
5
6
7#ifdef CONFIG_B43_RFKILL
8
9#include <linux/rfkill.h>
Michael Buesch42bb4cd2007-09-28 14:22:33 +020010
Michael Buesch8e9f7522007-09-27 21:35:34 +020011
12struct b43_rfkill {
13 /* The RFKILL subsystem data structure */
14 struct rfkill *rfkill;
Michael Buesch35c7e662007-11-03 14:34:32 +010015 /* Did initialization succeed? Used for freeing. */
16 bool registered;
Michael Buesch8e9f7522007-09-27 21:35:34 +020017 /* The unique name of this rfkill switch */
Michael Buesch35c7e662007-11-03 14:34:32 +010018 char name[sizeof("b43-phy4294967295")];
Michael Buesch8e9f7522007-09-27 21:35:34 +020019};
20
Michael Buesch35c7e662007-11-03 14:34:32 +010021/* The init function returns void, because we are not interested
Michael Buesch42bb4cd2007-09-28 14:22:33 +020022 * in failing the b43 init process when rfkill init failed. */
Michael Buesch8e9f7522007-09-27 21:35:34 +020023void b43_rfkill_init(struct b43_wldev *dev);
24void b43_rfkill_exit(struct b43_wldev *dev);
Michael Buesch42bb4cd2007-09-28 14:22:33 +020025
Johannes Berg19d337d2009-06-02 13:01:37 +020026const char *b43_rfkill_led_name(struct b43_wldev *dev);
Michael Buesch8e9f7522007-09-27 21:35:34 +020027
28
29#else /* CONFIG_B43_RFKILL */
30/* No RFKILL support. */
31
32struct b43_rfkill {
33 /* empty */
34};
35
36static inline void b43_rfkill_init(struct b43_wldev *dev)
37{
38}
39static inline void b43_rfkill_exit(struct b43_wldev *dev)
40{
41}
Michael Buesch8e9f7522007-09-27 21:35:34 +020042static inline char * b43_rfkill_led_name(struct b43_wldev *dev)
43{
44 return NULL;
45}
46
47#endif /* CONFIG_B43_RFKILL */
48
49#endif /* B43_RFKILL_H_ */