]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
rtw89: fix misconfiguration on hw_scan channel time
authorPo Hao Huang <phhuang@realtek.com>
Fri, 1 Apr 2022 05:50:43 +0000 (13:50 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jun 2022 08:29:32 +0000 (10:29 +0200)
[ Upstream commit 65ee4971a262a024e239e5d2b7f4dee1b3dff40e ]

Without this patch, hw scan won't stay long enough on DFS/passive
channels. Found previous logic error and fix it.

Signed-off-by: Po Hao Huang <phhuang@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20220401055043.12512-5-pkshih@realtek.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/realtek/rtw89/fw.c

index 6deaf8eec6b4783fd18c37c443992198b582f253..a9b5315a517e8f0c37a46da088a3f6bcc38c90fc 100644 (file)
@@ -2065,7 +2065,7 @@ static void rtw89_hw_scan_add_chan(struct rtw89_dev *rtwdev, int chan_type,
                ch_info->num_pkt = 0;
                break;
        case RTW89_CHAN_DFS:
-               ch_info->period = min_t(u8, ch_info->period,
+               ch_info->period = max_t(u8, ch_info->period,
                                        RTW89_DFS_CHAN_TIME);
                ch_info->dwell_time = RTW89_DWELL_TIME;
                break;