]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
staging: rtl8723bs: Replace yield() call with cond_resched()
authorThomas Avery <tavery321@gmail.com>
Wed, 28 Mar 2018 22:26:22 +0000 (18:26 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Mar 2018 10:00:15 +0000 (12:00 +0200)
Remove yield call(). yield does not guarantee progress, and should not
be used. cond_resched() is a safe alternative.

Signed-off-by: Thomas Avery <tavery321@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c

index 2816c68b8254301c9d77e9483fb0db0511b3f6e2..589fab24bb2578f501f163e4f7205d693a3ae924 100644 (file)
@@ -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);