From 8193e7b3b42c40d949f633b6ec19ec24593e8291 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20S=C3=B6ntgen?= Date: Wed, 22 Aug 2018 16:26:51 +0200 Subject: [PATCH] wifi_drv: schedule on socket call kick Issue #2988. --- repos/dde_linux/src/lib/wifi/socket_call.cc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/repos/dde_linux/src/lib/wifi/socket_call.cc b/repos/dde_linux/src/lib/wifi/socket_call.cc index 61041b2375..24a3c0708c 100644 --- a/repos/dde_linux/src/lib/wifi/socket_call.cc +++ b/repos/dde_linux/src/lib/wifi/socket_call.cc @@ -364,8 +364,16 @@ class Lx::Socket break; } + /* + * Save old call opcode as we may only release the blocker + * when actually did something useful, i.e., were called by + * some socket operation and not by kicking the socket. + */ + Call::Opcode old = _call.opcode; + _call.opcode = Call::NONE; - _block.up(); + + if (old != Call::NONE) { _block.up(); } } void submit_and_block() @@ -399,6 +407,7 @@ void Lx::socket_kick() if (!_socket) { return; } _socket->unblock_task(); + Lx::scheduler().schedule(); }