mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-29 11:37:59 -04:00
wifi: rtw89: fix scan offload version check logic
The version check with less than should check for smallest upper-bound first, or some branch will be unreachable. Signed-off-by: Po-Hao Huang <phhuang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20260729124354.3231368-3-pkshih@realtek.com
This commit is contained in:
committed by
Ping-Ke Shih
parent
304720870f
commit
58c0d447c5
@@ -7748,12 +7748,12 @@ int rtw89_fw_h2c_scan_offload_be(struct rtw89_dev *rtwdev,
|
||||
|
||||
rtw89_scan_get_6g_disabled_chan(rtwdev, option);
|
||||
|
||||
if (RTW89_CHK_FW_FEATURE(SCAN_OFFLOAD_BE_V1, &rtwdev->fw)) {
|
||||
cfg_len = offsetofend(typeof(*h2c), w9);
|
||||
scan_offload_ver = 1;
|
||||
} else if (RTW89_CHK_FW_FEATURE(SCAN_OFFLOAD_BE_V0, &rtwdev->fw)) {
|
||||
if (RTW89_CHK_FW_FEATURE(SCAN_OFFLOAD_BE_V0, &rtwdev->fw)) {
|
||||
cfg_len = offsetofend(typeof(*h2c), w8);
|
||||
scan_offload_ver = 0;
|
||||
} else if (RTW89_CHK_FW_FEATURE(SCAN_OFFLOAD_BE_V1, &rtwdev->fw)) {
|
||||
cfg_len = offsetofend(typeof(*h2c), w9);
|
||||
scan_offload_ver = 1;
|
||||
}
|
||||
|
||||
len = cfg_len + macc_role_size + opch_size;
|
||||
|
||||
Reference in New Issue
Block a user