rtl8xxxu_set_basic_rates() sets the wrong initial RTS rate. It sets the next higher rate than the one it should set, e.g. 36M instead of 24M. The while loop is supposed to find the index of the most significant bit which is 1. Signed-off-by: Bitterblue Smith <rtl8821cerfe2@xxxxxxxxx> --- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c index 180907319e8c..b9f3382bd67c 100644 --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c @@ -4839,7 +4839,7 @@ static void rtl8xxxu_set_basic_rates(struct rtl8xxxu_priv *priv, u32 rate_cfg) dev_dbg(&priv->udev->dev, "%s: rates %08x\n", __func__, rate_cfg); - while (rate_cfg) { + while (rate_cfg > 1) { rate_cfg = (rate_cfg >> 1); rate_idx++; } -- 2.43.0