wifi: rtw89: 8852c: rfk: refine target channel calculation in _rx_dck_channel_calc()
authorPing-Ke Shih <pkshih@realtek.com>
Mon, 9 Dec 2024 04:20:19 +0000 (12:20 +0800)
committerPing-Ke Shih <pkshih@realtek.com>
Thu, 12 Dec 2024 03:06:19 +0000 (11:06 +0800)
commitb6c10a19363787ffdffe08049b9e0b71c101d401
tree86d7d7c1061b1141b5410f4d43816e25a5def841
parentb59b86c5d08be7d761c04affcbcec8184738c200
wifi: rtw89: 8852c: rfk: refine target channel calculation in _rx_dck_channel_calc()

The channel is not possibly 0, so original code is fine. Still want to
avoid Coverity warning, so ensure -32 offset for the channel number which
is larger than 125 only. Actually, don't change logic at all.

Addresses-Coverity-ID: 1628150 ("Overflowed constant")

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20241209042020.21290-1-pkshih@realtek.com
drivers/net/wireless/realtek/rtw89/rtw8852c_rfk.c