Skip to contentSkip to conversation

staging: rtl8723bs: Replace msleep() with fsleep()

PATCH In review Marcos Andrade 2 participants 2 messages Mar 14 – Mar 15 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: rtl8723bs: Replace msleep() with fsleep()

Replace msleep(10) with fsleep(10 * USEC_PER_MSEC) in _rtw_init_xmit_priv(). fsleep() is the new standard API for delays, as it automatically chooses the best sleep method based on the duration.

---
 drivers/staging/rtl8723bs/core/rtw_xmit.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/staging/rtl8723bs/core/rtw_xmit.c +2 -1
index 4062fe0c1..dab16851f 100644
@@ -5,6 +5,7 @@
  *
  ******************************************************************************/
 #include <drv_types.h>
+#include <linux/delay.h>
 #include <linux/if_ether.h>
 
 static u8 P802_1H_OUI[P80211_OUI_LEN] = { 0x00, 0x00, 0xf8 };
@@ -129,7 +130,7 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, struct adapter *padapter)
 		/* Tx buf allocation may fail sometimes, so sleep and retry. */
 		res = rtw_os_xmit_resource_alloc(padapter, pxmitbuf, (MAX_XMITBUF_SZ + XMITBUF_ALIGN_SZ), true);
 		if (res == _FAIL) {
-			msleep(10);
+			fsleep(10 * USEC_PER_MSEC);
 			res = rtw_os_xmit_resource_alloc(padapter, pxmitbuf, (MAX_XMITBUF_SZ + XMITBUF_ALIGN_SZ), true);
 			if (res == _FAIL)
 				goto exit;
Signature · 1 line
2.53.0
#1 lore raw
Quoted 7 lines · Marcos Andrade

Replace msleep(10) with fsleep(10 * USEC_PER_MSEC) in _rtw_init_xmit_priv(). fsleep() is the new standard API for delays, as it automatically chooses the best sleep method based on the duration.

---

Since this patch requires the other patch this needs to be a patch series. Because since you submitted them as just single patches this one will not apply on its own.

A patch series typically has a cover letter explaining what the patches do and you link them together using git send-email.

Thanks,

ET