提交 73a2d0b8 编写于 作者: P Ping-Ke Shih 提交者: Kalle Valo

rtw88: fix TX secondary channel offset of 40M if current bw is 20M or 40M

TX secondary channel offset is valid only if current bandwidth is 80M,
otherwise leave this value as zero. The wrong value of txsc40 causes
MAC unpredictable behavior.
Signed-off-by: NPing-Ke Shih <pkshih@realtek.com>
Signed-off-by: NYan-Hsuan Chuang <yhchuang@realtek.com>
Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
上级 35a68fa5
......@@ -16,10 +16,12 @@ void rtw_set_channel_mac(struct rtw_dev *rtwdev, u8 channel, u8 bw,
u8 value8;
txsc20 = primary_ch_idx;
if (txsc20 == 1 || txsc20 == 3)
txsc40 = 9;
else
txsc40 = 10;
if (bw == RTW_CHANNEL_WIDTH_80) {
if (txsc20 == 1 || txsc20 == 3)
txsc40 = 9;
else
txsc40 = 10;
}
rtw_write8(rtwdev, REG_DATA_SC,
BIT_TXSC_20M(txsc20) | BIT_TXSC_40M(txsc40));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册