realtek: eth: remove locking from ndo_open()
ndo_open() runs under rtnl_lock() nevertheless the driver adds
its own locking and disables interrupts. Additionally it sleeps
inside some of the sub functions. This leads to spurious errors:
[ 11.233001] BUG: sleeping function called from invalid context at kernel/locking/mutex.c:271
[ 11.233029] in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 710, name: ip
[ 11.233040] preempt_count:
ffffffff, expected: 0
[ 11.233055] CPU: 0 UID: 0 PID: 710 Comm: ip Tainted: G W O 6.18.39 #0 NONE
[ 11.233082] Hardware name: Hasivo S1100W-8XGT-SE
[ 11.233290] Call Trace:
[ 11.233294] [<
80112108>] show_stack+0x28/0xf0
[ 11.233337] [<
8010bb78>] dump_stack_lvl+0x70/0xb0
[ 11.233378] [<
80168b80>] __might_resched+0x144/0x15c
[ 11.233417] [<
808f2b6c>] mutex_lock+0x20/0x6c
[ 11.233451] [<
80669ad8>] __dev_open+0x14c/0x230
[ 11.233493] [<
80669c00>] netif_open+0x44/0x94
[ 11.233512] [<
8066e51c>] dev_open+0x40/0x78
Remove that anti-pattern.
Link: https://github.com/openwrt/openwrt/pull/24482
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>