rt2x00: Remove incorrect led blink
authorHelmut Schaa <helmut.schaa@googlemail.com>
Wed, 7 Sep 2011 18:10:45 +0000 (20:10 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 14 Sep 2011 17:56:46 +0000 (13:56 -0400)
rt2800 devices are not capable of configuring arbitrary LED on/off
periods. The LED_CFG register fields ON_PERIOD and OFF_PERIOD are only
used by the hw when the LED mode is set to "blink upon TX".

Hence, remove the blink callback. This will result in software emulation
for LED blinking.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rt2x00/rt2800lib.c

index 6a8e92032e90f4c3c4e345a59be43ee3a15501a1..cdb0133afc33f912e69fe05049feeef7e759a719 100644 (file)
@@ -897,28 +897,12 @@ static void rt2800_brightness_set(struct led_classdev *led_cdev,
        }
 }
 
-static int rt2800_blink_set(struct led_classdev *led_cdev,
-                           unsigned long *delay_on, unsigned long *delay_off)
-{
-       struct rt2x00_led *led =
-           container_of(led_cdev, struct rt2x00_led, led_dev);
-       u32 reg;
-
-       rt2800_register_read(led->rt2x00dev, LED_CFG, &reg);
-       rt2x00_set_field32(&reg, LED_CFG_ON_PERIOD, *delay_on);
-       rt2x00_set_field32(&reg, LED_CFG_OFF_PERIOD, *delay_off);
-       rt2800_register_write(led->rt2x00dev, LED_CFG, reg);
-
-       return 0;
-}
-
 static void rt2800_init_led(struct rt2x00_dev *rt2x00dev,
                     struct rt2x00_led *led, enum led_type type)
 {
        led->rt2x00dev = rt2x00dev;
        led->type = type;
        led->led_dev.brightness_set = rt2800_brightness_set;
-       led->led_dev.blink_set = rt2800_blink_set;
        led->flags = LED_INITIALIZED;
 }
 #endif /* CONFIG_RT2X00_LIB_LEDS */