rfkill.h 1.4 KB
Newer Older
L
Larry Finger 已提交
1 2 3 4 5 6 7 8 9
#ifndef B43legacy_RFKILL_H_
#define B43legacy_RFKILL_H_

struct b43legacy_wldev;

#ifdef CONFIG_B43LEGACY_RFKILL

#include <linux/rfkill.h>
#include <linux/workqueue.h>
10 11
#include <linux/input-polldev.h>

L
Larry Finger 已提交
12 13 14 15 16


struct b43legacy_rfkill {
	/* The RFKILL subsystem data structure */
	struct rfkill *rfkill;
17 18
	/* The poll device for the RFKILL input button */
	struct input_polled_dev *poll_dev;
L
Larry Finger 已提交
19 20 21 22
	/* The unique name of this rfkill switch */
	char name[32];
};

23 24 25 26
/* All the init functions return void, because we are not interested
 * in failing the b43 init process when rfkill init failed. */
void b43legacy_rfkill_alloc(struct b43legacy_wldev *dev);
void b43legacy_rfkill_free(struct b43legacy_wldev *dev);
L
Larry Finger 已提交
27 28
void b43legacy_rfkill_init(struct b43legacy_wldev *dev);
void b43legacy_rfkill_exit(struct b43legacy_wldev *dev);
29

J
Jeff Garzik 已提交
30
char *b43legacy_rfkill_led_name(struct b43legacy_wldev *dev);
L
Larry Finger 已提交
31 32 33 34 35 36 37 38 39


#else /* CONFIG_B43LEGACY_RFKILL */
/* No RFKILL support. */

struct b43legacy_rfkill {
	/* empty */
};

40
static inline void b43legacy_rfkill_alloc(struct b43legacy_wldev *dev)
L
Larry Finger 已提交
41 42
{
}
43
static inline void b43legacy_rfkill_free(struct b43legacy_wldev *dev)
L
Larry Finger 已提交
44 45
{
}
46 47 48 49
static inline void b43legacy_rfkill_init(struct b43legacy_wldev *dev)
{
}
static inline void b43legacy_rfkill_exit(struct b43legacy_wldev *dev)
L
Larry Finger 已提交
50 51
{
}
J
Jeff Garzik 已提交
52
static inline char *b43legacy_rfkill_led_name(struct b43legacy_wldev *dev)
L
Larry Finger 已提交
53 54 55 56 57 58 59
{
	return NULL;
}

#endif /* CONFIG_B43LEGACY_RFKILL */

#endif /* B43legacy_RFKILL_H_ */