diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2016-01-02 20:38:56 +0000 |
---|---|---|
committer | Rafał Miłecki <zajec5@gmail.com> | 2016-01-02 20:38:56 +0000 |
commit | 0f624b111bb2925797c047209d3fdcd945b76acf (patch) | |
tree | 5046b6a82a2b52986ad9ebf5e2003fe1927c49db /target | |
parent | 20d3ed2dec119e5a1ddf5a4d09de62fddd27a3eb (diff) | |
download | master-187ad058-0f624b111bb2925797c047209d3fdcd945b76acf.tar.gz master-187ad058-0f624b111bb2925797c047209d3fdcd945b76acf.tar.bz2 master-187ad058-0f624b111bb2925797c047209d3fdcd945b76acf.zip |
ledtrig-netdev: don't stop timer on events for different interfaces
This fixes regression introduced in my recent ledtrig-netdev commit.
Events triggered by different interfaces were stopping timer so it
wasn't working for tx/rx mode.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@48072 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target')
-rw-r--r-- | target/linux/generic/files/drivers/leds/ledtrig-netdev.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/target/linux/generic/files/drivers/leds/ledtrig-netdev.c b/target/linux/generic/files/drivers/leds/ledtrig-netdev.c index 5d0f95499b..cfa4dc0758 100644 --- a/target/linux/generic/files/drivers/leds/ledtrig-netdev.c +++ b/target/linux/generic/files/drivers/leds/ledtrig-netdev.c @@ -269,11 +269,12 @@ static int netdev_trig_notify(struct notifier_block *nb, return NOTIFY_DONE; spin_lock_bh(&trigger_data->lock); - del_timer_sync(&trigger_data->timer); if (strcmp(dev->name, trigger_data->device_name)) goto done; + del_timer_sync(&trigger_data->timer); + if (evt == NETDEV_REGISTER || evt == NETDEV_CHANGENAME) { if (trigger_data->net_dev != NULL) dev_put(trigger_data->net_dev); |