]> git.baikalelectronics.ru Git - kernel.git/commit
rtw88: fix shift of more than 32 bits of a integer
authorColin Ian King <colin.king@canonical.com>
Wed, 1 May 2019 14:19:45 +0000 (15:19 +0100)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 2 May 2019 14:58:15 +0000 (17:58 +0300)
commitfcf3f4b22e53b9da27e54493997727379a7f01de
treef831ee01d0382cbf4f4c37ecc2d122bac74fa87e
parent9479542b480825186cd5cd8c6cfc3533b23a06f1
rtw88: fix shift of more than 32 bits of a integer

Currently the shift of an integer value more than 32 bits can
occur when nss is more than 32.  Fix this by making the integer
constants unsigned long longs before shifting and bit-wise or'ing
with the u64 ra_mask to avoid the undefined shift behaviour.

Addresses-Coverity: ("Bad shift operation")
Fixes: 6e4bd67d96b4 ("rtw88: new Realtek 802.11ac driver")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/realtek/rtw88/main.c