diff options
Diffstat (limited to 'drivers/staging/r8188eu/os_dep/os_intfs.c')
-rw-r--r-- | drivers/staging/r8188eu/os_dep/os_intfs.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/staging/r8188eu/os_dep/os_intfs.c b/drivers/staging/r8188eu/os_dep/os_intfs.c index e7964a048c99..0bcea66f550b 100644 --- a/drivers/staging/r8188eu/os_dep/os_intfs.c +++ b/drivers/staging/r8188eu/os_dep/os_intfs.c @@ -385,7 +385,8 @@ u32 rtw_start_drv_threads(struct adapter *padapter) if (IS_ERR(padapter->cmdThread)) _status = _FAIL; else - _rtw_down_sema(&padapter->cmdpriv.terminate_cmdthread_sema); /* wait for cmd_thread to run */ + /* wait for rtw_cmd_thread() to start running */ + wait_for_completion(&padapter->cmdpriv.start_cmd_thread); return _status; } @@ -395,7 +396,8 @@ void rtw_stop_drv_threads(struct adapter *padapter) /* Below is to termindate rtw_cmd_thread & event_thread... */ up(&padapter->cmdpriv.cmd_queue_sema); if (padapter->cmdThread) - _rtw_down_sema(&padapter->cmdpriv.terminate_cmdthread_sema); + /* wait for rtw_cmd_thread() to stop running */ + wait_for_completion(&padapter->cmdpriv.stop_cmd_thread); } static u8 rtw_init_default_value(struct adapter *padapter) |