diff options
author | Ping-Ke Shih <pkshih@realtek.com> | 2024-08-09 15:20:10 +0800 |
---|---|---|
committer | Ping-Ke Shih <pkshih@realtek.com> | 2024-08-16 19:27:26 +0800 |
commit | 45742881f9eee2a4daeb6008e648a460dd3742cd (patch) | |
tree | cb291750cd40258e18edaa6c0dc85433ca20d2fc /tools/perf/scripts/python/export-to-sqlite.py | |
parent | 56310ddb50b190b3390fdc974aec455d0a516bd2 (diff) |
wifi: rtw89: correct base HT rate mask for firmware
Coverity reported that u8 rx_mask << 24 will become signed 32 bits, which
casting to unsigned 64 bits will do sign extension. For example,
putting 0x80000000 (signed 32 bits) to a u64 variable will become
0xFFFFFFFF_80000000.
The real case we meet is:
rx_mask[0...3] = ff ff 00 00
ra_mask = 0xffffffff_ff0ff000
After this fix:
rx_mask[0...3] = ff ff 00 00
ra_mask = 0x00000000_ff0ff000
Fortunately driver does bitwise-AND with incorrect ra_mask and supported
rates (1ss and 2ss rate only) afterward, so the final rate mask of
original code is still correct.
Addresses-Coverity-ID: 1504762 ("Unintended sign extension")
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20240809072012.84152-5-pkshih@realtek.com
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions