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>

Backport of r48072

git-svn-id: svn://svn.openwrt.org/openwrt/branches/chaos_calmer@48074 3c298f89-4303-0410-b956-a3cf2f4a3e73
master
Rafał Miłecki 2016-01-02 22:15:40 +00:00
parent 14b19c7d40
commit fec331baef
1 changed files with 2 additions and 1 deletions

View File

@ -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);