aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2x00.h
diff options
context:
space:
mode:
authorIvo van Doorn <ivdoorn@gmail.com>2008-02-03 09:53:40 -0500
committerJohn W. Linville <linville@tuxdriver.com>2008-02-29 15:37:00 -0500
commita9450b70a755abf093600035ef5361c53343fe9a (patch)
tree94b509ea1e73454d327f805273a1fce994d95b1b /drivers/net/wireless/rt2x00/rt2x00.h
parentf2a3c7f5c8e3c1356dbbce1e9ac2e7f4d5365ba9 (diff)
rt2x00: Make use of MAC80211_LED_TRIGGERS
Make use of the led triggers provided by mac80211 to control the led status. This can be enabled through a per-driver configuration option which will automatically enable the generic handler in rt2x00lib. This has been enabled for rt2500usb and rt73usb for the moment since the led class will call set_brightness in irq context which will not work correctly with the usb drivers who need to sleep. Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00.h')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00.h27
1 files changed, 17 insertions, 10 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h
index 93dbe2b286d5..76270e9c31ff 100644
--- a/drivers/net/wireless/rt2x00/rt2x00.h
+++ b/drivers/net/wireless/rt2x00/rt2x00.h
@@ -30,12 +30,14 @@
30#include <linux/skbuff.h> 30#include <linux/skbuff.h>
31#include <linux/workqueue.h> 31#include <linux/workqueue.h>
32#include <linux/firmware.h> 32#include <linux/firmware.h>
33#include <linux/leds.h>
33#include <linux/mutex.h> 34#include <linux/mutex.h>
34#include <linux/etherdevice.h> 35#include <linux/etherdevice.h>
35 36
36#include <net/mac80211.h> 37#include <net/mac80211.h>
37 38
38#include "rt2x00debug.h" 39#include "rt2x00debug.h"
40#include "rt2x00leds.h"
39#include "rt2x00reg.h" 41#include "rt2x00reg.h"
40#include "rt2x00queue.h" 42#include "rt2x00queue.h"
41 43
@@ -512,6 +514,8 @@ struct rt2x00lib_ops {
512 struct link_qual *qual); 514 struct link_qual *qual);
513 void (*reset_tuner) (struct rt2x00_dev *rt2x00dev); 515 void (*reset_tuner) (struct rt2x00_dev *rt2x00dev);
514 void (*link_tuner) (struct rt2x00_dev *rt2x00dev); 516 void (*link_tuner) (struct rt2x00_dev *rt2x00dev);
517 void (*led_brightness) (struct led_classdev *led_cdev,
518 enum led_brightness brightness);
515 519
516 /* 520 /*
517 * TX control handlers 521 * TX control handlers
@@ -665,6 +669,19 @@ struct rt2x00_dev {
665#endif /* CONFIG_RT2X00_LIB_DEBUGFS */ 669#endif /* CONFIG_RT2X00_LIB_DEBUGFS */
666 670
667 /* 671 /*
672 * LED structure for changing the LED status
673 * by mac8011 or the kernel.
674 */
675#ifdef CONFIG_RT2X00_LIB_LEDS
676 unsigned int led_flags;
677 struct rt2x00_trigger trigger_qual;
678 struct rt2x00_led led_radio;
679 struct rt2x00_led led_assoc;
680 struct rt2x00_led led_qual;
681 u16 led_mcu_reg;
682#endif /* CONFIG_RT2X00_LIB_LEDS */
683
684 /*
668 * Device flags. 685 * Device flags.
669 * In these flags the current status and some 686 * In these flags the current status and some
670 * of the device capabilities are stored. 687 * of the device capabilities are stored.
@@ -756,16 +773,6 @@ struct rt2x00_dev {
756 u16 tx_power; 773 u16 tx_power;
757 774
758 /* 775 /*
759 * LED register (for rt61pci & rt73usb).
760 */
761 u16 led_reg;
762
763 /*
764 * Led mode (LED_MODE_*)
765 */
766 u8 led_mode;
767
768 /*
769 * Rssi <-> Dbm offset 776 * Rssi <-> Dbm offset
770 */ 777 */
771 u8 rssi_offset; 778 u8 rssi_offset;