]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
rtw88: fix rate mask for 1SS chip
authorPing-Ke Shih <pkshih@realtek.com>
Fri, 20 Dec 2019 09:21:46 +0000 (17:21 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Feb 2020 07:36:30 +0000 (08:36 +0100)
commitabf8d588e3b1805007ea962b524660047ae8c7b1
tree403309fe2ab48ba3d17fb162a23b4efe0610b91c
parent3eee03d0ffb8840d5bdc108778645315874de2b4
rtw88: fix rate mask for 1SS chip

[ Upstream commit 35a68fa5f96a80797e11b6952a47c5a84939a7bf ]

The rate mask is used to tell firmware the supported rate depends on
negotiation. We loop 2 times for all VHT/HT 2SS rate mask first, and then
only keep the part according to chip's NSS.

This commit fixes the logic error of '&' operations for VHT/HT rate, and
we should run this logic before adding legacy rate.

To access HT MCS map, index 0/1 represent MCS 0-7/8-15 respectively. Use
NL80211_BAND_xxx is incorrect, so fix it as well.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>
Reviewed-by: Chris Chiu <chiu@endlessm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/realtek/rtw88/main.c