Commit Graph

11 Commits (74ea99b01d936d7b71ee8d0cd0f7c89617b90314)

Author SHA1 Message Date
Sergey Sergeev 74ea99b01d ledtrig-netdev: don't cancel work on events for different interfaces
This fixes logic bug(in function netdev_trig_notify) introduced in
0b2991a8ed commit.
Events triggered by different interfaces were stopping work queue so it
wasn't working for tx/rx mode.

Signed-off-by: Sergey Sergeev <adron@yapic.net>
7 years ago
Felix Fietkau 0b2991a8ed kernel: make ledtrig-netdev use a work queue for updates
This fixes hangs in igb that happen if the update call interrupts an
already existing dev_get_stats call. In that case the calling CPU
deadlocks because it's trying to acquire the same spinlock recursively.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Rafał Miłecki b836a7c29d 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>

SVN-Revision: 48072
9 years ago
John Crispin df165974c3 ledtrig-netdev: add support for renamed devices
The ppp0 interface is renamed after the connection is established. Due
to a missing NETDEV_REGISTER event, the ledtrig-netdev isn't aware of
the renamed interface and literally ignores the device
(no tx/rx indication, led isn't switched off with 'ifdown wan').

Signed-off-by: Mathias Kresin <openwrt@kresin.me>

SVN-Revision: 48048
9 years ago
Rafał Miłecki e9e3a0682c ledtrig-netdev: reset link status & stats after changing device_name
Previously switching to non-existing device (interface) could result in
leaving LED on.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 47990
9 years ago
Rafał Miłecki 2b1129a7ba ledtrig-netdev: drop locking from timer callback function
We may just delete timer on every trigger update and then start it again
if needed. This will let us avoid both: races and locking in frequently
called timer callback.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 47987
9 years ago
Rafał Miłecki a56aaf73b9 ledtrig-netdev: switch rwlock to spinlock
Read/write lock was adding useless complexity, there wasn't any real
gain in case of this driver.
Also switch to _bh variants to avoid deadlocks.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 47986
9 years ago
Rafał Miłecki 8996164e56 ledtrig-netdev: update base driver instead of patching it for every kernel
All supported kernels require patching ledtrig-netdev in the same way,
so it's safe to just move these changes to the base version of this
driver. We needed these patches for some old kernels 2.6.36 and 3.11.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 47962
9 years ago
Imre Kaloz e1de4e27c1 coding style cleanups, drop old kernel support
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>

SVN-Revision: 41293
10 years ago
John Crispin e3e2a170cd we dont need 1024 bytes buffer. 128 bytes is enough.
SVN-Revision: 27143
13 years ago
Felix Fietkau da1bb88a2b rename target/linux/generic-2.6 to generic
SVN-Revision: 21952
14 years ago