diff options
author | Johannes Berg <johannes.berg@intel.com> | 2015-05-11 13:12:09 -0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2015-05-11 13:16:04 -0400 |
commit | 658358cec93a7130615cfc1d6843ab07e49625e6 (patch) | |
tree | b0d26db2560c15a72c256e076b5e41433c440922 /net/mac80211/led.c | |
parent | 890b7878e4435518c45d80c5e33c335aab39d4e2 (diff) |
mac80211: fix throughput LED trigger
As I was testing with hwsim, I missed that my previous commit to
make LED work depend on activation broke the code because I missed
removing the old trigger struct and some code was still using it,
now erroneously, causing crashes.
Fix this by always using the correct struct.
Reported-by: Felix Fietkau <nbd@openwrt.org>
Tested-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/led.c')
-rw-r--r-- | net/mac80211/led.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/net/mac80211/led.c b/net/mac80211/led.c index 38f05565eaac..0505845b7ab8 100644 --- a/net/mac80211/led.c +++ b/net/mac80211/led.c | |||
@@ -276,10 +276,10 @@ static void tpt_trig_timer(unsigned long data) | |||
276 | } | 276 | } |
277 | } | 277 | } |
278 | 278 | ||
279 | read_lock(&tpt_trig->trig.leddev_list_lock); | 279 | read_lock(&local->tpt_led.leddev_list_lock); |
280 | list_for_each_entry(led_cdev, &tpt_trig->trig.led_cdevs, trig_list) | 280 | list_for_each_entry(led_cdev, &local->tpt_led.led_cdevs, trig_list) |
281 | led_blink_set(led_cdev, &on, &off); | 281 | led_blink_set(led_cdev, &on, &off); |
282 | read_unlock(&tpt_trig->trig.leddev_list_lock); | 282 | read_unlock(&local->tpt_led.leddev_list_lock); |
283 | } | 283 | } |
284 | 284 | ||
285 | const char * | 285 | const char * |
@@ -341,10 +341,10 @@ static void ieee80211_stop_tpt_led_trig(struct ieee80211_local *local) | |||
341 | tpt_trig->running = false; | 341 | tpt_trig->running = false; |
342 | del_timer_sync(&tpt_trig->timer); | 342 | del_timer_sync(&tpt_trig->timer); |
343 | 343 | ||
344 | read_lock(&tpt_trig->trig.leddev_list_lock); | 344 | read_lock(&local->tpt_led.leddev_list_lock); |
345 | list_for_each_entry(led_cdev, &tpt_trig->trig.led_cdevs, trig_list) | 345 | list_for_each_entry(led_cdev, &local->tpt_led.led_cdevs, trig_list) |
346 | led_set_brightness(led_cdev, LED_OFF); | 346 | led_set_brightness(led_cdev, LED_OFF); |
347 | read_unlock(&tpt_trig->trig.leddev_list_lock); | 347 | read_unlock(&local->tpt_led.leddev_list_lock); |
348 | } | 348 | } |
349 | 349 | ||
350 | void ieee80211_mod_tpt_led_trig(struct ieee80211_local *local, | 350 | void ieee80211_mod_tpt_led_trig(struct ieee80211_local *local, |