From: Amitkumar Karwar Date: Tue, 28 Aug 2012 03:32:51 +0000 (-0700) Subject: mwifiex: release semaphore acquired for internal scan operation X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=26fc36ab756d305274f056755705478dc4dda521;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git mwifiex: release semaphore acquired for internal scan operation If "iw connect" command is fired for station interface, when heavy traffic is running on AP interface, internal scan operation performed before actual association is aborted. In this case we missed to release semaphore. Signed-off-by: Amitkumar Karwar Signed-off-by: Kiran Divekar Signed-off-by: Bing Zhao Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/mwifiex/init.c b/drivers/net/wireless/mwifiex/init.c index fad2c8d2bdde..c510563dc00d 100644 --- a/drivers/net/wireless/mwifiex/init.c +++ b/drivers/net/wireless/mwifiex/init.c @@ -92,6 +92,11 @@ static void scan_delay_timer_fn(unsigned long data) kfree(priv->user_scan_cfg); priv->user_scan_cfg = NULL; } + + if (priv->scan_pending_on_block) { + priv->scan_pending_on_block = false; + up(&priv->async_sem); + } goto done; }