From: Thomas Avery Date: Wed, 28 Mar 2018 22:26:22 +0000 (-0400) Subject: staging: rtl8723bs: Replace yield() call with cond_resched() X-Git-Tag: v4.17-rc1~124^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c22da34a1b9996ffc6aadb4804422e04fe28b7e1;p=thirdparty%2Fkernel%2Flinux.git staging: rtl8723bs: Replace yield() call with cond_resched() Remove yield call(). yield does not guarantee progress, and should not be used. cond_resched() is a safe alternative. Signed-off-by: Thomas Avery Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c index 2816c68b82543..589fab24bb257 100644 --- a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c +++ b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c @@ -4263,7 +4263,7 @@ unsigned int send_beacon(struct adapter *padapter) issue_beacon(padapter, 100); issue++; do { - yield(); + cond_resched(); rtw_hal_get_hwreg(padapter, HW_VAR_BCN_VALID, (u8 *)(&bxmitok)); poll++; } while ((poll%10) != 0 && false == bxmitok && !padapter->bSurpriseRemoved && !padapter->bDriverStopped);