Skip to contentSkip to conversation

staging: rtl8723bs/core/rtw_mlme_ext.c: Replace yield() call with cond_resched

PATCH In review Thomas Avery 2 participants 2 messages Mar 20, 2018 – Mar 22, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: rtl8723bs/core/rtw_mlme_ext.c: Replace yield() call with cond_resched

Remove yield() call, yield() does not guarantee progress, and should not be used. Cond_resched() is a safer alternative

---
 drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c +1 -1
index 7d7756e40bcb..fdcc5b28af22 100644
@@ -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);
Signature · 1 line
2.11.0
maintainer
#1 lore raw
Quoted 7 lines · Thomas Avery

Remove yield() call, yield() does not guarantee progress, and should not be used. Cond_resched() is a safer alternative

---
 drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

You sent me 3 patches in 2 days with almost the same subject for the same driver. Please resend them as a patch series so I know what order to apply them in.

Also, always use scripts/get_maintainer.pl to find the proper people and mailing lists to cc:

thanks,

greg k-h